mirror of
https://github.com/PeWu/topola-viewer.git
synced 2026-02-18 02:55:48 +00:00
147 lines
372 KiB
JavaScript
147 lines
372 KiB
JavaScript
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index.es-Cczvousg.js","./index-DGkTbY2n.js","./index-CPYpbGHF.css"])))=>i.map(i=>d[i]);
|
||
var Kh=Object.defineProperty;var Xh=(r,e,t)=>e in r?Kh(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var _e=(r,e,t)=>Xh(r,typeof e!="symbol"?e+"":e,t);import{_ as Se,z as So,a as io}from"./index-DGkTbY2n.js";function Zh(r){if(Array.isArray(r))return r}function Qh(r,e){var t=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(t!=null){var i,o,s,f,u=[],c=!0,d=!1;try{if(s=(t=t.call(r)).next,e!==0)for(;!(c=(i=s.call(t)).done)&&(u.push(i.value),u.length!==e);c=!0);}catch(m){d=!0,o=m}finally{try{if(!c&&t.return!=null&&(f=t.return(),Object(f)!==f))return}finally{if(d)throw o}}return u}}function wl(r,e){(e==null||e>r.length)&&(e=r.length);for(var t=0,i=Array(e);t<e;t++)i[t]=r[t];return i}function tc(r,e){if(r){if(typeof r=="string")return wl(r,e);var t={}.toString.call(r).slice(8,-1);return t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set"?Array.from(r):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?wl(r,e):void 0}}function ec(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function yl(r,e){return Zh(r)||Qh(r,e)||tc(r,e)||ec()}function xl(r,e="utf8"){return new TextDecoder(e).decode(r)}const rc=new TextEncoder;function nc(r){return rc.encode(r)}const ic=1024*8,ac=(()=>{const r=new Uint8Array(4),e=new Uint32Array(r.buffer);return!((e[0]=1)&r[0])})(),ao={int8:globalThis.Int8Array,uint8:globalThis.Uint8Array,int16:globalThis.Int16Array,uint16:globalThis.Uint16Array,int32:globalThis.Int32Array,uint32:globalThis.Uint32Array,uint64:globalThis.BigUint64Array,int64:globalThis.BigInt64Array,float32:globalThis.Float32Array,float64:globalThis.Float64Array};class jo{constructor(e=ic,t={}){_e(this,"buffer");_e(this,"byteLength");_e(this,"byteOffset");_e(this,"length");_e(this,"offset");_e(this,"lastWrittenByte");_e(this,"littleEndian");_e(this,"_data");_e(this,"_mark");_e(this,"_marks");let i=!1;typeof e=="number"?e=new ArrayBuffer(e):(i=!0,this.lastWrittenByte=e.byteLength);const o=t.offset?t.offset>>>0:0,s=e.byteLength-o;let f=o;(ArrayBuffer.isView(e)||e instanceof jo)&&(e.byteLength!==e.buffer.byteLength&&(f=e.byteOffset+o),e=e.buffer),i?this.lastWrittenByte=s:this.lastWrittenByte=0,this.buffer=e,this.length=s,this.byteLength=s,this.byteOffset=f,this.offset=0,this.littleEndian=!0,this._data=new DataView(this.buffer,f,s),this._mark=0,this._marks=[]}available(e=1){return this.offset+e<=this.length}isLittleEndian(){return this.littleEndian}setLittleEndian(){return this.littleEndian=!0,this}isBigEndian(){return!this.littleEndian}setBigEndian(){return this.littleEndian=!1,this}skip(e=1){return this.offset+=e,this}back(e=1){return this.offset-=e,this}seek(e){return this.offset=e,this}mark(){return this._mark=this.offset,this}reset(){return this.offset=this._mark,this}pushMark(){return this._marks.push(this.offset),this}popMark(){const e=this._marks.pop();if(e===void 0)throw new Error("Mark stack empty");return this.seek(e),this}rewind(){return this.offset=0,this}ensureAvailable(e=1){if(!this.available(e)){const i=(this.offset+e)*2,o=new Uint8Array(i);o.set(new Uint8Array(this.buffer)),this.buffer=o.buffer,this.length=i,this.byteLength=i,this._data=new DataView(this.buffer)}return this}readBoolean(){return this.readUint8()!==0}readInt8(){return this._data.getInt8(this.offset++)}readUint8(){return this._data.getUint8(this.offset++)}readByte(){return this.readUint8()}readBytes(e=1){return this.readArray(e,"uint8")}readArray(e,t){const i=ao[t].BYTES_PER_ELEMENT*e,o=this.byteOffset+this.offset,s=this.buffer.slice(o,o+i);if(this.littleEndian===ac&&t!=="uint8"&&t!=="int8"){const u=new Uint8Array(this.buffer.slice(o,o+i));u.reverse();const c=new ao[t](u.buffer);return this.offset+=i,c.reverse(),c}const f=new ao[t](s);return this.offset+=i,f}readInt16(){const e=this._data.getInt16(this.offset,this.littleEndian);return this.offset+=2,e}readUint16(){const e=this._data.getUint16(this.offset,this.littleEndian);return this.offset+=2,e}readInt32(){const e=this._data.getInt32(this.offset,this.littleEndian);return this.offset+=4,e}readUint32(){const e=this._data.getUint32(this.offset,this.littleEndian);return this.offset+=4,e}readFloat32(){const e=this._data.getFloat32(this.offset,this.littleEndian);return this.offset+=4,e}readFloat64(){const e=this._data.getFloat64(this.offset,this.littleEndian);return this.offset+=8,e}readBigInt64(){const e=this._data.getBigInt64(this.offset,this.littleEndian);return this.offset+=8,e}readBigUint64(){const e=this._data.getBigUint64(this.offset,this.littleEndian);return this.offset+=8,e}readChar(){return String.fromCharCode(this.readInt8())}readChars(e=1){let t="";for(let i=0;i<e;i++)t+=this.readChar();return t}readUtf8(e=1){return xl(this.readBytes(e))}decodeText(e=1,t="utf8"){return xl(this.readBytes(e),t)}writeBoolean(e){return this.writeUint8(e?255:0),this}writeInt8(e){return this.ensureAvailable(1),this._data.setInt8(this.offset++,e),this._updateLastWrittenByte(),this}writeUint8(e){return this.ensureAvailable(1),this._data.setUint8(this.offset++,e),this._updateLastWrittenByte(),this}writeByte(e){return this.writeUint8(e)}writeBytes(e){this.ensureAvailable(e.length);for(let t=0;t<e.length;t++)this._data.setUint8(this.offset++,e[t]);return this._updateLastWrittenByte(),this}writeInt16(e){return this.ensureAvailable(2),this._data.setInt16(this.offset,e,this.littleEndian),this.offset+=2,this._updateLastWrittenByte(),this}writeUint16(e){return this.ensureAvailable(2),this._data.setUint16(this.offset,e,this.littleEndian),this.offset+=2,this._updateLastWrittenByte(),this}writeInt32(e){return this.ensureAvailable(4),this._data.setInt32(this.offset,e,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeUint32(e){return this.ensureAvailable(4),this._data.setUint32(this.offset,e,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeFloat32(e){return this.ensureAvailable(4),this._data.setFloat32(this.offset,e,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeFloat64(e){return this.ensureAvailable(8),this._data.setFloat64(this.offset,e,this.littleEndian),this.offset+=8,this._updateLastWrittenByte(),this}writeBigInt64(e){return this.ensureAvailable(8),this._data.setBigInt64(this.offset,e,this.littleEndian),this.offset+=8,this._updateLastWrittenByte(),this}writeBigUint64(e){return this.ensureAvailable(8),this._data.setBigUint64(this.offset,e,this.littleEndian),this.offset+=8,this._updateLastWrittenByte(),this}writeChar(e){return this.writeUint8(e.charCodeAt(0))}writeChars(e){for(let t=0;t<e.length;t++)this.writeUint8(e.charCodeAt(t));return this}writeUtf8(e){return this.writeBytes(nc(e))}toArray(){return new Uint8Array(this.buffer,this.byteOffset,this.lastWrittenByte)}getWrittenByteLength(){return this.lastWrittenByte-this.byteOffset}_updateLastWrittenByte(){this.offset>this.lastWrittenByte&&(this.lastWrittenByte=this.offset)}}function Vi(r){let e=r.length;for(;--e>=0;)r[e]=0}const sc=3,oc=258,Iu=29,lc=256,uc=lc+1+Iu,Cu=30,hc=512,cc=new Array((uc+2)*2);Vi(cc);const fc=new Array(Cu*2);Vi(fc);const dc=new Array(hc);Vi(dc);const pc=new Array(oc-sc+1);Vi(pc);const gc=new Array(Iu);Vi(gc);const mc=new Array(Cu);Vi(mc);const bc=(r,e,t,i)=>{let o=r&65535|0,s=r>>>16&65535|0,f=0;for(;t!==0;){f=t>2e3?2e3:t,t-=f;do o=o+e[i++]|0,s=s+o|0;while(--f);o%=65521,s%=65521}return o|s<<16|0};var ko=bc;const vc=()=>{let r,e=[];for(var t=0;t<256;t++){r=t;for(var i=0;i<8;i++)r=r&1?3988292384^r>>>1:r>>>1;e[t]=r}return e},wc=new Uint32Array(vc()),yc=(r,e,t,i)=>{const o=wc,s=i+t;r^=-1;for(let f=i;f<s;f++)r=r>>>8^o[(r^e[f])&255];return r^-1};var un=yc,Po={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},Fu={Z_NO_FLUSH:0,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_DEFLATED:8};const xc=(r,e)=>Object.prototype.hasOwnProperty.call(r,e);var _c=function(r){const e=Array.prototype.slice.call(arguments,1);for(;e.length;){const t=e.shift();if(t){if(typeof t!="object")throw new TypeError(t+"must be non-object");for(const i in t)xc(t,i)&&(r[i]=t[i])}}return r},Ac=r=>{let e=0;for(let i=0,o=r.length;i<o;i++)e+=r[i].length;const t=new Uint8Array(e);for(let i=0,o=0,s=r.length;i<s;i++){let f=r[i];t.set(f,o),o+=f.length}return t},Eu={assign:_c,flattenChunks:Ac};let Ou=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{Ou=!1}const xa=new Uint8Array(256);for(let r=0;r<256;r++)xa[r]=r>=252?6:r>=248?5:r>=240?4:r>=224?3:r>=192?2:1;xa[254]=xa[254]=1;var Nc=r=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(r);let e,t,i,o,s,f=r.length,u=0;for(o=0;o<f;o++)t=r.charCodeAt(o),(t&64512)===55296&&o+1<f&&(i=r.charCodeAt(o+1),(i&64512)===56320&&(t=65536+(t-55296<<10)+(i-56320),o++)),u+=t<128?1:t<2048?2:t<65536?3:4;for(e=new Uint8Array(u),s=0,o=0;s<u;o++)t=r.charCodeAt(o),(t&64512)===55296&&o+1<f&&(i=r.charCodeAt(o+1),(i&64512)===56320&&(t=65536+(t-55296<<10)+(i-56320),o++)),t<128?e[s++]=t:t<2048?(e[s++]=192|t>>>6,e[s++]=128|t&63):t<65536?(e[s++]=224|t>>>12,e[s++]=128|t>>>6&63,e[s++]=128|t&63):(e[s++]=240|t>>>18,e[s++]=128|t>>>12&63,e[s++]=128|t>>>6&63,e[s++]=128|t&63);return e};const Lc=(r,e)=>{if(e<65534&&r.subarray&&Ou)return String.fromCharCode.apply(null,r.length===e?r:r.subarray(0,e));let t="";for(let i=0;i<e;i++)t+=String.fromCharCode(r[i]);return t};var Sc=(r,e)=>{const t=e||r.length;if(typeof TextDecoder=="function"&&TextDecoder.prototype.decode)return new TextDecoder().decode(r.subarray(0,e));let i,o;const s=new Array(t*2);for(o=0,i=0;i<t;){let f=r[i++];if(f<128){s[o++]=f;continue}let u=xa[f];if(u>4){s[o++]=65533,i+=u-1;continue}for(f&=u===2?31:u===3?15:7;u>1&&i<t;)f=f<<6|r[i++]&63,u--;if(u>1){s[o++]=65533;continue}f<65536?s[o++]=f:(f-=65536,s[o++]=55296|f>>10&1023,s[o++]=56320|f&1023)}return Lc(s,o)},kc=(r,e)=>{e=e||r.length,e>r.length&&(e=r.length);let t=e-1;for(;t>=0&&(r[t]&192)===128;)t--;return t<0||t===0?e:t+xa[r[t]]>e?t:e},Io={string2buf:Nc,buf2string:Sc,utf8border:kc};function Pc(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}var Ic=Pc;const ss=16209,Cc=16191;var Fc=function(e,t){let i,o,s,f,u,c,d,m,A,P,p,B,O,M,S,G,Y,D,ot,yt,gt,tt,z,et;const N=e.state;i=e.next_in,z=e.input,o=i+(e.avail_in-5),s=e.next_out,et=e.output,f=s-(t-e.avail_out),u=s+(e.avail_out-257),c=N.dmax,d=N.wsize,m=N.whave,A=N.wnext,P=N.window,p=N.hold,B=N.bits,O=N.lencode,M=N.distcode,S=(1<<N.lenbits)-1,G=(1<<N.distbits)-1;t:do{B<15&&(p+=z[i++]<<B,B+=8,p+=z[i++]<<B,B+=8),Y=O[p&S];e:for(;;){if(D=Y>>>24,p>>>=D,B-=D,D=Y>>>16&255,D===0)et[s++]=Y&65535;else if(D&16){ot=Y&65535,D&=15,D&&(B<D&&(p+=z[i++]<<B,B+=8),ot+=p&(1<<D)-1,p>>>=D,B-=D),B<15&&(p+=z[i++]<<B,B+=8,p+=z[i++]<<B,B+=8),Y=M[p&G];r:for(;;){if(D=Y>>>24,p>>>=D,B-=D,D=Y>>>16&255,D&16){if(yt=Y&65535,D&=15,B<D&&(p+=z[i++]<<B,B+=8,B<D&&(p+=z[i++]<<B,B+=8)),yt+=p&(1<<D)-1,yt>c){e.msg="invalid distance too far back",N.mode=ss;break t}if(p>>>=D,B-=D,D=s-f,yt>D){if(D=yt-D,D>m&&N.sane){e.msg="invalid distance too far back",N.mode=ss;break t}if(gt=0,tt=P,A===0){if(gt+=d-D,D<ot){ot-=D;do et[s++]=P[gt++];while(--D);gt=s-yt,tt=et}}else if(A<D){if(gt+=d+A-D,D-=A,D<ot){ot-=D;do et[s++]=P[gt++];while(--D);if(gt=0,A<ot){D=A,ot-=D;do et[s++]=P[gt++];while(--D);gt=s-yt,tt=et}}}else if(gt+=A-D,D<ot){ot-=D;do et[s++]=P[gt++];while(--D);gt=s-yt,tt=et}for(;ot>2;)et[s++]=tt[gt++],et[s++]=tt[gt++],et[s++]=tt[gt++],ot-=3;ot&&(et[s++]=tt[gt++],ot>1&&(et[s++]=tt[gt++]))}else{gt=s-yt;do et[s++]=et[gt++],et[s++]=et[gt++],et[s++]=et[gt++],ot-=3;while(ot>2);ot&&(et[s++]=et[gt++],ot>1&&(et[s++]=et[gt++]))}}else if((D&64)===0){Y=M[(Y&65535)+(p&(1<<D)-1)];continue r}else{e.msg="invalid distance code",N.mode=ss;break t}break}}else if((D&64)===0){Y=O[(Y&65535)+(p&(1<<D)-1)];continue e}else if(D&32){N.mode=Cc;break t}else{e.msg="invalid literal/length code",N.mode=ss;break t}break}}while(i<o&&s<u);ot=B>>3,i-=ot,B-=ot<<3,p&=(1<<B)-1,e.next_in=i,e.next_out=s,e.avail_in=i<o?5+(o-i):5-(i-o),e.avail_out=s<u?257+(u-s):257-(s-u),N.hold=p,N.bits=B};const Bi=15,_l=852,Al=592,Nl=0,so=1,Ll=2,Ec=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),Oc=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),jc=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),Bc=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]),Mc=(r,e,t,i,o,s,f,u)=>{const c=u.bits;let d=0,m=0,A=0,P=0,p=0,B=0,O=0,M=0,S=0,G=0,Y,D,ot,yt,gt,tt=null,z;const et=new Uint16Array(Bi+1),N=new Uint16Array(Bi+1);let E=null,q,U,it;for(d=0;d<=Bi;d++)et[d]=0;for(m=0;m<i;m++)et[e[t+m]]++;for(p=c,P=Bi;P>=1&&et[P]===0;P--);if(p>P&&(p=P),P===0)return o[s++]=1<<24|64<<16|0,o[s++]=1<<24|64<<16|0,u.bits=1,0;for(A=1;A<P&&et[A]===0;A++);for(p<A&&(p=A),M=1,d=1;d<=Bi;d++)if(M<<=1,M-=et[d],M<0)return-1;if(M>0&&(r===Nl||P!==1))return-1;for(N[1]=0,d=1;d<Bi;d++)N[d+1]=N[d]+et[d];for(m=0;m<i;m++)e[t+m]!==0&&(f[N[e[t+m]]++]=m);if(r===Nl?(tt=E=f,z=20):r===so?(tt=Ec,E=Oc,z=257):(tt=jc,E=Bc,z=0),G=0,m=0,d=A,gt=s,B=p,O=0,ot=-1,S=1<<p,yt=S-1,r===so&&S>_l||r===Ll&&S>Al)return 1;for(;;){q=d-O,f[m]+1<z?(U=0,it=f[m]):f[m]>=z?(U=E[f[m]-z],it=tt[f[m]-z]):(U=96,it=0),Y=1<<d-O,D=1<<B,A=D;do D-=Y,o[gt+(G>>O)+D]=q<<24|U<<16|it|0;while(D!==0);for(Y=1<<d-1;G&Y;)Y>>=1;if(Y!==0?(G&=Y-1,G+=Y):G=0,m++,--et[d]===0){if(d===P)break;d=e[t+f[m]]}if(d>p&&(G&yt)!==ot){for(O===0&&(O=p),gt+=A,B=d-O,M=1<<B;B+O<P&&(M-=et[B+O],!(M<=0));)B++,M<<=1;if(S+=1<<B,r===so&&S>_l||r===Ll&&S>Al)return 1;ot=G&yt,o[ot]=p<<24|B<<16|gt-s|0}}return G!==0&&(o[gt+G]=d-O<<24|64<<16|0),u.bits=p,0};var ya=Mc;const Rc=0,ju=1,Bu=2,{Z_FINISH:Sl,Z_BLOCK:Tc,Z_TREES:os,Z_OK:wi,Z_STREAM_END:Dc,Z_NEED_DICT:qc,Z_STREAM_ERROR:Ur,Z_DATA_ERROR:Mu,Z_MEM_ERROR:Ru,Z_BUF_ERROR:Uc,Z_DEFLATED:kl}=Fu,Ns=16180,Pl=16181,Il=16182,Cl=16183,Fl=16184,El=16185,Ol=16186,jl=16187,Bl=16188,Ml=16189,xs=16190,Fn=16191,oo=16192,Rl=16193,lo=16194,Tl=16195,Dl=16196,ql=16197,Ul=16198,ls=16199,us=16200,zl=16201,Hl=16202,Wl=16203,Vl=16204,Gl=16205,uo=16206,Yl=16207,Jl=16208,Oe=16209,Tu=16210,Du=16211,zc=852,Hc=592,Wc=15,Vc=Wc,$l=r=>(r>>>24&255)+(r>>>8&65280)+((r&65280)<<8)+((r&255)<<24);function Gc(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const yi=r=>{if(!r)return 1;const e=r.state;return!e||e.strm!==r||e.mode<Ns||e.mode>Du?1:0},qu=r=>{if(yi(r))return Ur;const e=r.state;return r.total_in=r.total_out=e.total=0,r.msg="",e.wrap&&(r.adler=e.wrap&1),e.mode=Ns,e.last=0,e.havedict=0,e.flags=-1,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new Int32Array(zc),e.distcode=e.distdyn=new Int32Array(Hc),e.sane=1,e.back=-1,wi},Uu=r=>{if(yi(r))return Ur;const e=r.state;return e.wsize=0,e.whave=0,e.wnext=0,qu(r)},zu=(r,e)=>{let t;if(yi(r))return Ur;const i=r.state;return e<0?(t=0,e=-e):(t=(e>>4)+5,e<48&&(e&=15)),e&&(e<8||e>15)?Ur:(i.window!==null&&i.wbits!==e&&(i.window=null),i.wrap=t,i.wbits=e,Uu(r))},Hu=(r,e)=>{if(!r)return Ur;const t=new Gc;r.state=t,t.strm=r,t.window=null,t.mode=Ns;const i=zu(r,e);return i!==wi&&(r.state=null),i},Yc=r=>Hu(r,Vc);let Kl=!0,ho,co;const Jc=r=>{if(Kl){ho=new Int32Array(512),co=new Int32Array(32);let e=0;for(;e<144;)r.lens[e++]=8;for(;e<256;)r.lens[e++]=9;for(;e<280;)r.lens[e++]=7;for(;e<288;)r.lens[e++]=8;for(ya(ju,r.lens,0,288,ho,0,r.work,{bits:9}),e=0;e<32;)r.lens[e++]=5;ya(Bu,r.lens,0,32,co,0,r.work,{bits:5}),Kl=!1}r.lencode=ho,r.lenbits=9,r.distcode=co,r.distbits=5},Wu=(r,e,t,i)=>{let o;const s=r.state;return s.window===null&&(s.wsize=1<<s.wbits,s.wnext=0,s.whave=0,s.window=new Uint8Array(s.wsize)),i>=s.wsize?(s.window.set(e.subarray(t-s.wsize,t),0),s.wnext=0,s.whave=s.wsize):(o=s.wsize-s.wnext,o>i&&(o=i),s.window.set(e.subarray(t-i,t-i+o),s.wnext),i-=o,i?(s.window.set(e.subarray(t-i,t),0),s.wnext=i,s.whave=s.wsize):(s.wnext+=o,s.wnext===s.wsize&&(s.wnext=0),s.whave<s.wsize&&(s.whave+=o))),0},$c=(r,e)=>{let t,i,o,s,f,u,c,d,m,A,P,p,B,O,M=0,S,G,Y,D,ot,yt,gt,tt;const z=new Uint8Array(4);let et,N;const E=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(yi(r)||!r.output||!r.input&&r.avail_in!==0)return Ur;t=r.state,t.mode===Fn&&(t.mode=oo),f=r.next_out,o=r.output,c=r.avail_out,s=r.next_in,i=r.input,u=r.avail_in,d=t.hold,m=t.bits,A=u,P=c,tt=wi;t:for(;;)switch(t.mode){case Ns:if(t.wrap===0){t.mode=oo;break}for(;m<16;){if(u===0)break t;u--,d+=i[s++]<<m,m+=8}if(t.wrap&2&&d===35615){t.wbits===0&&(t.wbits=15),t.check=0,z[0]=d&255,z[1]=d>>>8&255,t.check=un(t.check,z,2,0),d=0,m=0,t.mode=Pl;break}if(t.head&&(t.head.done=!1),!(t.wrap&1)||(((d&255)<<8)+(d>>8))%31){r.msg="incorrect header check",t.mode=Oe;break}if((d&15)!==kl){r.msg="unknown compression method",t.mode=Oe;break}if(d>>>=4,m-=4,gt=(d&15)+8,t.wbits===0&&(t.wbits=gt),gt>15||gt>t.wbits){r.msg="invalid window size",t.mode=Oe;break}t.dmax=1<<t.wbits,t.flags=0,r.adler=t.check=1,t.mode=d&512?Ml:Fn,d=0,m=0;break;case Pl:for(;m<16;){if(u===0)break t;u--,d+=i[s++]<<m,m+=8}if(t.flags=d,(t.flags&255)!==kl){r.msg="unknown compression method",t.mode=Oe;break}if(t.flags&57344){r.msg="unknown header flags set",t.mode=Oe;break}t.head&&(t.head.text=d>>8&1),t.flags&512&&t.wrap&4&&(z[0]=d&255,z[1]=d>>>8&255,t.check=un(t.check,z,2,0)),d=0,m=0,t.mode=Il;case Il:for(;m<32;){if(u===0)break t;u--,d+=i[s++]<<m,m+=8}t.head&&(t.head.time=d),t.flags&512&&t.wrap&4&&(z[0]=d&255,z[1]=d>>>8&255,z[2]=d>>>16&255,z[3]=d>>>24&255,t.check=un(t.check,z,4,0)),d=0,m=0,t.mode=Cl;case Cl:for(;m<16;){if(u===0)break t;u--,d+=i[s++]<<m,m+=8}t.head&&(t.head.xflags=d&255,t.head.os=d>>8),t.flags&512&&t.wrap&4&&(z[0]=d&255,z[1]=d>>>8&255,t.check=un(t.check,z,2,0)),d=0,m=0,t.mode=Fl;case Fl:if(t.flags&1024){for(;m<16;){if(u===0)break t;u--,d+=i[s++]<<m,m+=8}t.length=d,t.head&&(t.head.extra_len=d),t.flags&512&&t.wrap&4&&(z[0]=d&255,z[1]=d>>>8&255,t.check=un(t.check,z,2,0)),d=0,m=0}else t.head&&(t.head.extra=null);t.mode=El;case El:if(t.flags&1024&&(p=t.length,p>u&&(p=u),p&&(t.head&&(gt=t.head.extra_len-t.length,t.head.extra||(t.head.extra=new Uint8Array(t.head.extra_len)),t.head.extra.set(i.subarray(s,s+p),gt)),t.flags&512&&t.wrap&4&&(t.check=un(t.check,i,p,s)),u-=p,s+=p,t.length-=p),t.length))break t;t.length=0,t.mode=Ol;case Ol:if(t.flags&2048){if(u===0)break t;p=0;do gt=i[s+p++],t.head&>&&t.length<65536&&(t.head.name+=String.fromCharCode(gt));while(gt&&p<u);if(t.flags&512&&t.wrap&4&&(t.check=un(t.check,i,p,s)),u-=p,s+=p,gt)break t}else t.head&&(t.head.name=null);t.length=0,t.mode=jl;case jl:if(t.flags&4096){if(u===0)break t;p=0;do gt=i[s+p++],t.head&>&&t.length<65536&&(t.head.comment+=String.fromCharCode(gt));while(gt&&p<u);if(t.flags&512&&t.wrap&4&&(t.check=un(t.check,i,p,s)),u-=p,s+=p,gt)break t}else t.head&&(t.head.comment=null);t.mode=Bl;case Bl:if(t.flags&512){for(;m<16;){if(u===0)break t;u--,d+=i[s++]<<m,m+=8}if(t.wrap&4&&d!==(t.check&65535)){r.msg="header crc mismatch",t.mode=Oe;break}d=0,m=0}t.head&&(t.head.hcrc=t.flags>>9&1,t.head.done=!0),r.adler=t.check=0,t.mode=Fn;break;case Ml:for(;m<32;){if(u===0)break t;u--,d+=i[s++]<<m,m+=8}r.adler=t.check=$l(d),d=0,m=0,t.mode=xs;case xs:if(t.havedict===0)return r.next_out=f,r.avail_out=c,r.next_in=s,r.avail_in=u,t.hold=d,t.bits=m,qc;r.adler=t.check=1,t.mode=Fn;case Fn:if(e===Tc||e===os)break t;case oo:if(t.last){d>>>=m&7,m-=m&7,t.mode=uo;break}for(;m<3;){if(u===0)break t;u--,d+=i[s++]<<m,m+=8}switch(t.last=d&1,d>>>=1,m-=1,d&3){case 0:t.mode=Rl;break;case 1:if(Jc(t),t.mode=ls,e===os){d>>>=2,m-=2;break t}break;case 2:t.mode=Dl;break;case 3:r.msg="invalid block type",t.mode=Oe}d>>>=2,m-=2;break;case Rl:for(d>>>=m&7,m-=m&7;m<32;){if(u===0)break t;u--,d+=i[s++]<<m,m+=8}if((d&65535)!==(d>>>16^65535)){r.msg="invalid stored block lengths",t.mode=Oe;break}if(t.length=d&65535,d=0,m=0,t.mode=lo,e===os)break t;case lo:t.mode=Tl;case Tl:if(p=t.length,p){if(p>u&&(p=u),p>c&&(p=c),p===0)break t;o.set(i.subarray(s,s+p),f),u-=p,s+=p,c-=p,f+=p,t.length-=p;break}t.mode=Fn;break;case Dl:for(;m<14;){if(u===0)break t;u--,d+=i[s++]<<m,m+=8}if(t.nlen=(d&31)+257,d>>>=5,m-=5,t.ndist=(d&31)+1,d>>>=5,m-=5,t.ncode=(d&15)+4,d>>>=4,m-=4,t.nlen>286||t.ndist>30){r.msg="too many length or distance symbols",t.mode=Oe;break}t.have=0,t.mode=ql;case ql:for(;t.have<t.ncode;){for(;m<3;){if(u===0)break t;u--,d+=i[s++]<<m,m+=8}t.lens[E[t.have++]]=d&7,d>>>=3,m-=3}for(;t.have<19;)t.lens[E[t.have++]]=0;if(t.lencode=t.lendyn,t.lenbits=7,et={bits:t.lenbits},tt=ya(Rc,t.lens,0,19,t.lencode,0,t.work,et),t.lenbits=et.bits,tt){r.msg="invalid code lengths set",t.mode=Oe;break}t.have=0,t.mode=Ul;case Ul:for(;t.have<t.nlen+t.ndist;){for(;M=t.lencode[d&(1<<t.lenbits)-1],S=M>>>24,G=M>>>16&255,Y=M&65535,!(S<=m);){if(u===0)break t;u--,d+=i[s++]<<m,m+=8}if(Y<16)d>>>=S,m-=S,t.lens[t.have++]=Y;else{if(Y===16){for(N=S+2;m<N;){if(u===0)break t;u--,d+=i[s++]<<m,m+=8}if(d>>>=S,m-=S,t.have===0){r.msg="invalid bit length repeat",t.mode=Oe;break}gt=t.lens[t.have-1],p=3+(d&3),d>>>=2,m-=2}else if(Y===17){for(N=S+3;m<N;){if(u===0)break t;u--,d+=i[s++]<<m,m+=8}d>>>=S,m-=S,gt=0,p=3+(d&7),d>>>=3,m-=3}else{for(N=S+7;m<N;){if(u===0)break t;u--,d+=i[s++]<<m,m+=8}d>>>=S,m-=S,gt=0,p=11+(d&127),d>>>=7,m-=7}if(t.have+p>t.nlen+t.ndist){r.msg="invalid bit length repeat",t.mode=Oe;break}for(;p--;)t.lens[t.have++]=gt}}if(t.mode===Oe)break;if(t.lens[256]===0){r.msg="invalid code -- missing end-of-block",t.mode=Oe;break}if(t.lenbits=9,et={bits:t.lenbits},tt=ya(ju,t.lens,0,t.nlen,t.lencode,0,t.work,et),t.lenbits=et.bits,tt){r.msg="invalid literal/lengths set",t.mode=Oe;break}if(t.distbits=6,t.distcode=t.distdyn,et={bits:t.distbits},tt=ya(Bu,t.lens,t.nlen,t.ndist,t.distcode,0,t.work,et),t.distbits=et.bits,tt){r.msg="invalid distances set",t.mode=Oe;break}if(t.mode=ls,e===os)break t;case ls:t.mode=us;case us:if(u>=6&&c>=258){r.next_out=f,r.avail_out=c,r.next_in=s,r.avail_in=u,t.hold=d,t.bits=m,Fc(r,P),f=r.next_out,o=r.output,c=r.avail_out,s=r.next_in,i=r.input,u=r.avail_in,d=t.hold,m=t.bits,t.mode===Fn&&(t.back=-1);break}for(t.back=0;M=t.lencode[d&(1<<t.lenbits)-1],S=M>>>24,G=M>>>16&255,Y=M&65535,!(S<=m);){if(u===0)break t;u--,d+=i[s++]<<m,m+=8}if(G&&(G&240)===0){for(D=S,ot=G,yt=Y;M=t.lencode[yt+((d&(1<<D+ot)-1)>>D)],S=M>>>24,G=M>>>16&255,Y=M&65535,!(D+S<=m);){if(u===0)break t;u--,d+=i[s++]<<m,m+=8}d>>>=D,m-=D,t.back+=D}if(d>>>=S,m-=S,t.back+=S,t.length=Y,G===0){t.mode=Gl;break}if(G&32){t.back=-1,t.mode=Fn;break}if(G&64){r.msg="invalid literal/length code",t.mode=Oe;break}t.extra=G&15,t.mode=zl;case zl:if(t.extra){for(N=t.extra;m<N;){if(u===0)break t;u--,d+=i[s++]<<m,m+=8}t.length+=d&(1<<t.extra)-1,d>>>=t.extra,m-=t.extra,t.back+=t.extra}t.was=t.length,t.mode=Hl;case Hl:for(;M=t.distcode[d&(1<<t.distbits)-1],S=M>>>24,G=M>>>16&255,Y=M&65535,!(S<=m);){if(u===0)break t;u--,d+=i[s++]<<m,m+=8}if((G&240)===0){for(D=S,ot=G,yt=Y;M=t.distcode[yt+((d&(1<<D+ot)-1)>>D)],S=M>>>24,G=M>>>16&255,Y=M&65535,!(D+S<=m);){if(u===0)break t;u--,d+=i[s++]<<m,m+=8}d>>>=D,m-=D,t.back+=D}if(d>>>=S,m-=S,t.back+=S,G&64){r.msg="invalid distance code",t.mode=Oe;break}t.offset=Y,t.extra=G&15,t.mode=Wl;case Wl:if(t.extra){for(N=t.extra;m<N;){if(u===0)break t;u--,d+=i[s++]<<m,m+=8}t.offset+=d&(1<<t.extra)-1,d>>>=t.extra,m-=t.extra,t.back+=t.extra}if(t.offset>t.dmax){r.msg="invalid distance too far back",t.mode=Oe;break}t.mode=Vl;case Vl:if(c===0)break t;if(p=P-c,t.offset>p){if(p=t.offset-p,p>t.whave&&t.sane){r.msg="invalid distance too far back",t.mode=Oe;break}p>t.wnext?(p-=t.wnext,B=t.wsize-p):B=t.wnext-p,p>t.length&&(p=t.length),O=t.window}else O=o,B=f-t.offset,p=t.length;p>c&&(p=c),c-=p,t.length-=p;do o[f++]=O[B++];while(--p);t.length===0&&(t.mode=us);break;case Gl:if(c===0)break t;o[f++]=t.length,c--,t.mode=us;break;case uo:if(t.wrap){for(;m<32;){if(u===0)break t;u--,d|=i[s++]<<m,m+=8}if(P-=c,r.total_out+=P,t.total+=P,t.wrap&4&&P&&(r.adler=t.check=t.flags?un(t.check,o,P,f-P):ko(t.check,o,P,f-P)),P=c,t.wrap&4&&(t.flags?d:$l(d))!==t.check){r.msg="incorrect data check",t.mode=Oe;break}d=0,m=0}t.mode=Yl;case Yl:if(t.wrap&&t.flags){for(;m<32;){if(u===0)break t;u--,d+=i[s++]<<m,m+=8}if(t.wrap&4&&d!==(t.total&4294967295)){r.msg="incorrect length check",t.mode=Oe;break}d=0,m=0}t.mode=Jl;case Jl:tt=Dc;break t;case Oe:tt=Mu;break t;case Tu:return Ru;case Du:default:return Ur}return r.next_out=f,r.avail_out=c,r.next_in=s,r.avail_in=u,t.hold=d,t.bits=m,(t.wsize||P!==r.avail_out&&t.mode<Oe&&(t.mode<uo||e!==Sl))&&Wu(r,r.output,r.next_out,P-r.avail_out),A-=r.avail_in,P-=r.avail_out,r.total_in+=A,r.total_out+=P,t.total+=P,t.wrap&4&&P&&(r.adler=t.check=t.flags?un(t.check,o,P,r.next_out-P):ko(t.check,o,P,r.next_out-P)),r.data_type=t.bits+(t.last?64:0)+(t.mode===Fn?128:0)+(t.mode===ls||t.mode===lo?256:0),(A===0&&P===0||e===Sl)&&tt===wi&&(tt=Uc),tt},Kc=r=>{if(yi(r))return Ur;let e=r.state;return e.window&&(e.window=null),r.state=null,wi},Xc=(r,e)=>{if(yi(r))return Ur;const t=r.state;return(t.wrap&2)===0?Ur:(t.head=e,e.done=!1,wi)},Zc=(r,e)=>{const t=e.length;let i,o,s;return yi(r)||(i=r.state,i.wrap!==0&&i.mode!==xs)?Ur:i.mode===xs&&(o=1,o=ko(o,e,t,0),o!==i.check)?Mu:(s=Wu(r,e,t,t),s?(i.mode=Tu,Ru):(i.havedict=1,wi))};var Qc=Uu,tf=zu,ef=qu,rf=Yc,nf=Hu,af=$c,sf=Kc,of=Xc,lf=Zc,uf="pako inflate (from Nodeca project)",En={inflateReset:Qc,inflateReset2:tf,inflateResetKeep:ef,inflateInit:rf,inflateInit2:nf,inflate:af,inflateEnd:sf,inflateGetHeader:of,inflateSetDictionary:lf,inflateInfo:uf};function hf(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}var cf=hf;const Vu=Object.prototype.toString,{Z_NO_FLUSH:ff,Z_FINISH:df,Z_OK:_a,Z_STREAM_END:fo,Z_NEED_DICT:po,Z_STREAM_ERROR:pf,Z_DATA_ERROR:Xl,Z_MEM_ERROR:gf}=Fu;function Aa(r){this.options=Eu.assign({chunkSize:1024*64,windowBits:15,to:""},r||{});const e=this.options;e.raw&&e.windowBits>=0&&e.windowBits<16&&(e.windowBits=-e.windowBits,e.windowBits===0&&(e.windowBits=-15)),e.windowBits>=0&&e.windowBits<16&&!(r&&r.windowBits)&&(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&(e.windowBits&15)===0&&(e.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Ic,this.strm.avail_out=0;let t=En.inflateInit2(this.strm,e.windowBits);if(t!==_a)throw new Error(Po[t]);if(this.header=new cf,En.inflateGetHeader(this.strm,this.header),e.dictionary&&(typeof e.dictionary=="string"?e.dictionary=Io.string2buf(e.dictionary):Vu.call(e.dictionary)==="[object ArrayBuffer]"&&(e.dictionary=new Uint8Array(e.dictionary)),e.raw&&(t=En.inflateSetDictionary(this.strm,e.dictionary),t!==_a)))throw new Error(Po[t])}Aa.prototype.push=function(r,e){const t=this.strm,i=this.options.chunkSize,o=this.options.dictionary;let s,f,u;if(this.ended)return!1;for(e===~~e?f=e:f=e===!0?df:ff,Vu.call(r)==="[object ArrayBuffer]"?t.input=new Uint8Array(r):t.input=r,t.next_in=0,t.avail_in=t.input.length;;){for(t.avail_out===0&&(t.output=new Uint8Array(i),t.next_out=0,t.avail_out=i),s=En.inflate(t,f),s===po&&o&&(s=En.inflateSetDictionary(t,o),s===_a?s=En.inflate(t,f):s===Xl&&(s=po));t.avail_in>0&&s===fo&&t.state.wrap>0&&r[t.next_in]!==0;)En.inflateReset(t),s=En.inflate(t,f);switch(s){case pf:case Xl:case po:case gf:return this.onEnd(s),this.ended=!0,!1}if(u=t.avail_out,t.next_out&&(t.avail_out===0||s===fo))if(this.options.to==="string"){let c=Io.utf8border(t.output,t.next_out),d=t.next_out-c,m=Io.buf2string(t.output,c);t.next_out=d,t.avail_out=i-d,d&&t.output.set(t.output.subarray(c,c+d),0),this.onData(m)}else this.onData(t.output.length===t.next_out?t.output:t.output.subarray(0,t.next_out));if(!(s===_a&&u===0)){if(s===fo)return s=En.inflateEnd(this.strm),this.onEnd(s),this.ended=!0,!0;if(t.avail_in===0)break}}return!0};Aa.prototype.onData=function(r){this.chunks.push(r)};Aa.prototype.onEnd=function(r){r===_a&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=Eu.flattenChunks(this.chunks)),this.chunks=[],this.err=r,this.msg=this.strm.msg};function mf(r,e){const t=new Aa(e);if(t.push(r),t.err)throw t.msg||Po[t.err];return t.result}var bf=Aa,vf=mf,wf={Inflate:bf,inflate:vf};const{Inflate:yf,inflate:xf}=wf;var Zl=yf,_f=xf;const Gu=[];for(let r=0;r<256;r++){let e=r;for(let t=0;t<8;t++)e&1?e=3988292384^e>>>1:e=e>>>1;Gu[r]=e}const Ql=4294967295;function Af(r,e,t){let i=r;for(let o=0;o<t;o++)i=Gu[(i^e[o])&255]^i>>>8;return i}function Nf(r,e){return(Af(Ql,r,e)^Ql)>>>0}function tu(r,e,t){const i=r.readUint32(),o=Nf(new Uint8Array(r.buffer,r.byteOffset+r.offset-e-4,e),e);if(o!==i)throw new Error(`CRC mismatch for chunk ${t}. Expected ${i}, found ${o}`)}function Yu(r,e,t){for(let i=0;i<t;i++)e[i]=r[i]}function Ju(r,e,t,i){let o=0;for(;o<i;o++)e[o]=r[o];for(;o<t;o++)e[o]=r[o]+e[o-i]&255}function $u(r,e,t,i){let o=0;if(t.length===0)for(;o<i;o++)e[o]=r[o];else for(;o<i;o++)e[o]=r[o]+t[o]&255}function Ku(r,e,t,i,o){let s=0;if(t.length===0){for(;s<o;s++)e[s]=r[s];for(;s<i;s++)e[s]=r[s]+(e[s-o]>>1)&255}else{for(;s<o;s++)e[s]=r[s]+(t[s]>>1)&255;for(;s<i;s++)e[s]=r[s]+(e[s-o]+t[s]>>1)&255}}function Xu(r,e,t,i,o){let s=0;if(t.length===0){for(;s<o;s++)e[s]=r[s];for(;s<i;s++)e[s]=r[s]+e[s-o]&255}else{for(;s<o;s++)e[s]=r[s]+t[s]&255;for(;s<i;s++)e[s]=r[s]+Lf(e[s-o],t[s],t[s-o])&255}}function Lf(r,e,t){const i=r+e-t,o=Math.abs(i-r),s=Math.abs(i-e),f=Math.abs(i-t);return o<=s&&o<=f?r:s<=f?e:t}function Sf(r,e,t,i,o,s){switch(r){case 0:Yu(e,t,o);break;case 1:Ju(e,t,o,s);break;case 2:$u(e,t,i,o);break;case 3:Ku(e,t,i,o,s);break;case 4:Xu(e,t,i,o,s);break;default:throw new Error(`Unsupported filter: ${r}`)}}const kf=new Uint16Array([255]),Pf=new Uint8Array(kf.buffer),If=Pf[0]===255;function Cf(r){const{data:e,width:t,height:i,channels:o,depth:s}=r,f=[{x:0,y:0,xStep:8,yStep:8},{x:4,y:0,xStep:8,yStep:8},{x:0,y:4,xStep:4,yStep:8},{x:2,y:0,xStep:4,yStep:4},{x:0,y:2,xStep:2,yStep:4},{x:1,y:0,xStep:2,yStep:2},{x:0,y:1,xStep:1,yStep:2}],u=Math.ceil(s/8)*o,c=new Uint8Array(i*t*u);let d=0;for(let m=0;m<7;m++){const A=f[m],P=Math.ceil((t-A.x)/A.xStep),p=Math.ceil((i-A.y)/A.yStep);if(P<=0||p<=0)continue;const B=P*u,O=new Uint8Array(B);for(let M=0;M<p;M++){const S=e[d++],G=e.subarray(d,d+B);d+=B;const Y=new Uint8Array(B);Sf(S,G,Y,O,B,u),O.set(Y);for(let D=0;D<P;D++){const ot=A.x+D*A.xStep,yt=A.y+M*A.yStep;if(!(ot>=t||yt>=i))for(let gt=0;gt<u;gt++)c[(yt*t+ot)*u+gt]=Y[D*u+gt]}}}if(s===16){const m=new Uint16Array(c.buffer);if(If)for(let A=0;A<m.length;A++)m[A]=Ff(m[A]);return m}else return c}function Ff(r){return(r&255)<<8|r>>8&255}const Ef=new Uint16Array([255]),Of=new Uint8Array(Ef.buffer),jf=Of[0]===255,Bf=new Uint8Array(0);function eu(r){const{data:e,width:t,height:i,channels:o,depth:s}=r,f=Math.ceil(s/8)*o,u=Math.ceil(s/8*o*t),c=new Uint8Array(i*u);let d=Bf,m=0,A,P;for(let p=0;p<i;p++){switch(A=e.subarray(m+1,m+1+u),P=c.subarray(p*u,(p+1)*u),e[m]){case 0:Yu(A,P,u);break;case 1:Ju(A,P,u,f);break;case 2:$u(A,P,d,u);break;case 3:Ku(A,P,d,u,f);break;case 4:Xu(A,P,d,u,f);break;default:throw new Error(`Unsupported filter: ${e[m]}`)}d=P,m+=u+1}if(s===16){const p=new Uint16Array(c.buffer);if(jf)for(let B=0;B<p.length;B++)p[B]=Mf(p[B]);return p}else return c}function Mf(r){return(r&255)<<8|r>>8&255}const gs=Uint8Array.of(137,80,78,71,13,10,26,10);function ru(r){if(!Rf(r.readBytes(gs.length)))throw new Error("wrong PNG signature")}function Rf(r){if(r.length<gs.length)return!1;for(let e=0;e<gs.length;e++)if(r[e]!==gs[e])return!1;return!0}const Tf="tEXt",Df=0,Zu=new TextDecoder("latin1");function qf(r){if(zf(r),r.length===0||r.length>79)throw new Error("keyword length must be between 1 and 79")}const Uf=/^[\u0000-\u00FF]*$/;function zf(r){if(!Uf.test(r))throw new Error("invalid latin1 text")}function Hf(r,e,t){const i=Qu(e);r[i]=Wf(e,t-i.length-1)}function Qu(r){for(r.mark();r.readByte()!==Df;);const e=r.offset;r.reset();const t=Zu.decode(r.readBytes(e-r.offset-1));return r.skip(1),qf(t),t}function Wf(r,e){return Zu.decode(r.readBytes(e))}const Fr={UNKNOWN:-1,GREYSCALE:0,TRUECOLOUR:2,INDEXED_COLOUR:3,GREYSCALE_ALPHA:4,TRUECOLOUR_ALPHA:6},go={UNKNOWN:-1,DEFLATE:0},nu={UNKNOWN:-1,ADAPTIVE:0},mo={UNKNOWN:-1,NO_INTERLACE:0,ADAM7:1},hs={NONE:0,BACKGROUND:1,PREVIOUS:2},bo={SOURCE:0,OVER:1};class Vf extends jo{constructor(t,i={}){super(t);_e(this,"_checkCrc");_e(this,"_inflator");_e(this,"_png");_e(this,"_apng");_e(this,"_end");_e(this,"_hasPalette");_e(this,"_palette");_e(this,"_hasTransparency");_e(this,"_transparency");_e(this,"_compressionMethod");_e(this,"_filterMethod");_e(this,"_interlaceMethod");_e(this,"_colorType");_e(this,"_isAnimated");_e(this,"_numberOfFrames");_e(this,"_numberOfPlays");_e(this,"_frames");_e(this,"_writingDataChunks");const{checkCrc:o=!1}=i;this._checkCrc=o,this._inflator=new Zl,this._png={width:-1,height:-1,channels:-1,data:new Uint8Array(0),depth:1,text:{}},this._apng={width:-1,height:-1,channels:-1,depth:1,numberOfFrames:1,numberOfPlays:0,text:{},frames:[]},this._end=!1,this._hasPalette=!1,this._palette=[],this._hasTransparency=!1,this._transparency=new Uint16Array(0),this._compressionMethod=go.UNKNOWN,this._filterMethod=nu.UNKNOWN,this._interlaceMethod=mo.UNKNOWN,this._colorType=Fr.UNKNOWN,this._isAnimated=!1,this._numberOfFrames=1,this._numberOfPlays=0,this._frames=[],this._writingDataChunks=!1,this.setBigEndian()}decode(){for(ru(this);!this._end;){const t=this.readUint32(),i=this.readChars(4);this.decodeChunk(t,i)}return this.decodeImage(),this._png}decodeApng(){for(ru(this);!this._end;){const t=this.readUint32(),i=this.readChars(4);this.decodeApngChunk(t,i)}return this.decodeApngImage(),this._apng}decodeChunk(t,i){const o=this.offset;switch(i){case"IHDR":this.decodeIHDR();break;case"PLTE":this.decodePLTE(t);break;case"IDAT":this.decodeIDAT(t);break;case"IEND":this._end=!0;break;case"tRNS":this.decodetRNS(t);break;case"iCCP":this.decodeiCCP(t);break;case Tf:Hf(this._png.text,this,t);break;case"pHYs":this.decodepHYs();break;default:this.skip(t);break}if(this.offset-o!==t)throw new Error(`Length mismatch while decoding chunk ${i}`);this._checkCrc?tu(this,t+4,i):this.skip(4)}decodeApngChunk(t,i){const o=this.offset;switch(i!=="fdAT"&&i!=="IDAT"&&this._writingDataChunks&&this.pushDataToFrame(),i){case"acTL":this.decodeACTL();break;case"fcTL":this.decodeFCTL();break;case"fdAT":this.decodeFDAT(t);break;default:this.decodeChunk(t,i),this.offset=o+t;break}if(this.offset-o!==t)throw new Error(`Length mismatch while decoding chunk ${i}`);this._checkCrc?tu(this,t+4,i):this.skip(4)}decodeIHDR(){const t=this._png;t.width=this.readUint32(),t.height=this.readUint32(),t.depth=Gf(this.readUint8());const i=this.readUint8();this._colorType=i;let o;switch(i){case Fr.GREYSCALE:o=1;break;case Fr.TRUECOLOUR:o=3;break;case Fr.INDEXED_COLOUR:o=1;break;case Fr.GREYSCALE_ALPHA:o=2;break;case Fr.TRUECOLOUR_ALPHA:o=4;break;case Fr.UNKNOWN:default:throw new Error(`Unknown color type: ${i}`)}if(this._png.channels=o,this._compressionMethod=this.readUint8(),this._compressionMethod!==go.DEFLATE)throw new Error(`Unsupported compression method: ${this._compressionMethod}`);this._filterMethod=this.readUint8(),this._interlaceMethod=this.readUint8()}decodeACTL(){this._numberOfFrames=this.readUint32(),this._numberOfPlays=this.readUint32(),this._isAnimated=!0}decodeFCTL(){const t={sequenceNumber:this.readUint32(),width:this.readUint32(),height:this.readUint32(),xOffset:this.readUint32(),yOffset:this.readUint32(),delayNumber:this.readUint16(),delayDenominator:this.readUint16(),disposeOp:this.readUint8(),blendOp:this.readUint8(),data:new Uint8Array(0)};this._frames.push(t)}decodePLTE(t){if(t%3!==0)throw new RangeError(`PLTE field length must be a multiple of 3. Got ${t}`);const i=t/3;this._hasPalette=!0;const o=[];this._palette=o;for(let s=0;s<i;s++)o.push([this.readUint8(),this.readUint8(),this.readUint8()])}decodeIDAT(t){this._writingDataChunks=!0;const i=t,o=this.offset+this.byteOffset;if(this._inflator.push(new Uint8Array(this.buffer,o,i)),this._inflator.err)throw new Error(`Error while decompressing the data: ${this._inflator.err}`);this.skip(t)}decodeFDAT(t){this._writingDataChunks=!0;let i=t,o=this.offset+this.byteOffset;if(o+=4,i-=4,this._inflator.push(new Uint8Array(this.buffer,o,i)),this._inflator.err)throw new Error(`Error while decompressing the data: ${this._inflator.err}`);this.skip(t)}decodetRNS(t){switch(this._colorType){case Fr.GREYSCALE:case Fr.TRUECOLOUR:{if(t%2!==0)throw new RangeError(`tRNS chunk length must be a multiple of 2. Got ${t}`);if(t/2>this._png.width*this._png.height)throw new Error(`tRNS chunk contains more alpha values than there are pixels (${t/2} vs ${this._png.width*this._png.height})`);this._hasTransparency=!0,this._transparency=new Uint16Array(t/2);for(let i=0;i<t/2;i++)this._transparency[i]=this.readUint16();break}case Fr.INDEXED_COLOUR:{if(t>this._palette.length)throw new Error(`tRNS chunk contains more alpha values than there are palette colors (${t} vs ${this._palette.length})`);let i=0;for(;i<t;i++){const o=this.readByte();this._palette[i].push(o)}for(;i<this._palette.length;i++)this._palette[i].push(255);break}case Fr.UNKNOWN:case Fr.GREYSCALE_ALPHA:case Fr.TRUECOLOUR_ALPHA:default:throw new Error(`tRNS chunk is not supported for color type ${this._colorType}`)}}decodeiCCP(t){const i=Qu(this),o=this.readUint8();if(o!==go.DEFLATE)throw new Error(`Unsupported iCCP compression method: ${o}`);const s=this.readBytes(t-i.length-2);this._png.iccEmbeddedProfile={name:i,profile:_f(s)}}decodepHYs(){const t=this.readUint32(),i=this.readUint32(),o=this.readByte();this._png.resolution={x:t,y:i,unit:o}}decodeApngImage(){this._apng.width=this._png.width,this._apng.height=this._png.height,this._apng.channels=this._png.channels,this._apng.depth=this._png.depth,this._apng.numberOfFrames=this._numberOfFrames,this._apng.numberOfPlays=this._numberOfPlays,this._apng.text=this._png.text,this._apng.resolution=this._png.resolution;for(let t=0;t<this._numberOfFrames;t++){const i={sequenceNumber:this._frames[t].sequenceNumber,delayNumber:this._frames[t].delayNumber,delayDenominator:this._frames[t].delayDenominator,data:this._apng.depth===8?new Uint8Array(this._apng.width*this._apng.height*this._apng.channels):new Uint16Array(this._apng.width*this._apng.height*this._apng.channels)},o=this._frames.at(t);if(o){if(o.data=eu({data:o.data,width:o.width,height:o.height,channels:this._apng.channels,depth:this._apng.depth}),this._hasPalette&&(this._apng.palette=this._palette),this._hasTransparency&&(this._apng.transparency=this._transparency),t===0||o.xOffset===0&&o.yOffset===0&&o.width===this._png.width&&o.height===this._png.height)i.data=o.data;else{const s=this._apng.frames.at(t-1);this.disposeFrame(o,s,i),this.addFrameDataToCanvas(i,o)}this._apng.frames.push(i)}}return this._apng}disposeFrame(t,i,o){switch(t.disposeOp){case hs.NONE:break;case hs.BACKGROUND:for(let s=0;s<this._png.height;s++)for(let f=0;f<this._png.width;f++){const u=(s*t.width+f)*this._png.channels;for(let c=0;c<this._png.channels;c++)o.data[u+c]=0}break;case hs.PREVIOUS:o.data.set(i.data);break;default:throw new Error("Unknown disposeOp")}}addFrameDataToCanvas(t,i){const o=1<<this._png.depth,s=(f,u)=>{const c=((f+i.yOffset)*this._png.width+i.xOffset+u)*this._png.channels,d=(f*i.width+u)*this._png.channels;return{index:c,frameIndex:d}};switch(i.blendOp){case bo.SOURCE:for(let f=0;f<i.height;f++)for(let u=0;u<i.width;u++){const{index:c,frameIndex:d}=s(f,u);for(let m=0;m<this._png.channels;m++)t.data[c+m]=i.data[d+m]}break;case bo.OVER:for(let f=0;f<i.height;f++)for(let u=0;u<i.width;u++){const{index:c,frameIndex:d}=s(f,u);for(let m=0;m<this._png.channels;m++){const A=i.data[d+this._png.channels-1]/o,P=m%(this._png.channels-1)===0?1:i.data[d+m],p=Math.floor(A*P+(1-A)*t.data[c+m]);t.data[c+m]+=p}}break;default:throw new Error("Unknown blendOp")}}decodeImage(){var i;if(this._inflator.err)throw new Error(`Error while decompressing the data: ${this._inflator.err}`);const t=this._isAnimated?((i=this._frames)==null?void 0:i.at(0)).data:this._inflator.result;if(this._filterMethod!==nu.ADAPTIVE)throw new Error(`Filter method ${this._filterMethod} not supported`);if(this._interlaceMethod===mo.NO_INTERLACE)this._png.data=eu({data:t,width:this._png.width,height:this._png.height,channels:this._png.channels,depth:this._png.depth});else if(this._interlaceMethod===mo.ADAM7)this._png.data=Cf({data:t,width:this._png.width,height:this._png.height,channels:this._png.channels,depth:this._png.depth});else throw new Error(`Interlace method ${this._interlaceMethod} not supported`);this._hasPalette&&(this._png.palette=this._palette),this._hasTransparency&&(this._png.transparency=this._transparency)}pushDataToFrame(){const t=this._inflator.result,i=this._frames.at(-1);i?i.data=t:this._frames.push({sequenceNumber:0,width:this._png.width,height:this._png.height,xOffset:0,yOffset:0,delayNumber:0,delayDenominator:0,disposeOp:hs.NONE,blendOp:bo.SOURCE,data:t}),this._inflator=new Zl,this._writingDataChunks=!1}}function Gf(r){if(r!==1&&r!==2&&r!==4&&r!==8&&r!==16)throw new Error(`invalid bit depth: ${r}`);return r}var iu;(function(r){r[r.UNKNOWN=0]="UNKNOWN",r[r.METRE=1]="METRE"})(iu||(iu={}));function Yf(r,e){return new Vf(r,e).decode()}var Jt=function(){return typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:this}();function vo(){Jt.console&&typeof Jt.console.log=="function"&&Jt.console.log.apply(Jt.console,arguments)}var Le={log:vo,warn:function(r){Jt.console&&(typeof Jt.console.warn=="function"?Jt.console.warn.apply(Jt.console,arguments):vo.call(null,arguments))},error:function(r){Jt.console&&(typeof Jt.console.error=="function"?Jt.console.error.apply(Jt.console,arguments):vo(r))}};function wo(r,e,t){var i=new XMLHttpRequest;i.open("GET",r),i.responseType="blob",i.onload=function(){mi(i.response,e,t)},i.onerror=function(){Le.error("could not download file")},i.send()}function au(r){var e=new XMLHttpRequest;e.open("HEAD",r,!1);try{e.send()}catch{}return e.status>=200&&e.status<=299}function cs(r){try{r.dispatchEvent(new MouseEvent("click"))}catch{var e=document.createEvent("MouseEvents");e.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),r.dispatchEvent(e)}}var mi=Jt.saveAs||((typeof window>"u"?"undefined":Se(window))!=="object"||window!==Jt?function(){}:typeof HTMLAnchorElement<"u"&&"download"in HTMLAnchorElement.prototype?function(r,e,t){var i=Jt.URL||Jt.webkitURL,o=document.createElement("a");e=e||r.name||"download",o.download=e,o.rel="noopener",typeof r=="string"?(o.href=r,o.origin!==location.origin?au(o.href)?wo(r,e,t):cs(o,o.target="_blank"):cs(o)):(o.href=i.createObjectURL(r),setTimeout(function(){i.revokeObjectURL(o.href)},4e4),setTimeout(function(){cs(o)},0))}:"msSaveOrOpenBlob"in navigator?function(r,e,t){if(e=e||r.name||"download",typeof r=="string")if(au(r))wo(r,e,t);else{var i=document.createElement("a");i.href=r,i.target="_blank",setTimeout(function(){cs(i)})}else navigator.msSaveOrOpenBlob(function(o,s){return s===void 0?s={autoBom:!1}:Se(s)!=="object"&&(Le.warn("Deprecated: Expected third argument to be a object"),s={autoBom:!s}),s.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(o.type)?new Blob(["\uFEFF",o],{type:o.type}):o}(r,t),e)}:function(r,e,t,i){if((i=i||open("","_blank"))&&(i.document.title=i.document.body.innerText="downloading..."),typeof r=="string")return wo(r,e,t);var o=r.type==="application/octet-stream",s=/constructor/i.test(Jt.HTMLElement)||Jt.safari,f=/CriOS\/[\d]+/.test(navigator.userAgent);if((f||o&&s)&&(typeof FileReader>"u"?"undefined":Se(FileReader))==="object"){var u=new FileReader;u.onloadend=function(){var m=u.result;m=f?m:m.replace(/^data:[^;]*;/,"data:attachment/file;"),i?i.location.href=m:location=m,i=null},u.readAsDataURL(r)}else{var c=Jt.URL||Jt.webkitURL,d=c.createObjectURL(r);i?i.location=d:location.href=d,i=null,setTimeout(function(){c.revokeObjectURL(d)},4e4)}});/**
|
||
* A class to parse color values
|
||
* @author Stoyan Stefanov <sstoo@gmail.com>
|
||
* {@link http://www.phpied.com/rgb-color-parser-in-javascript/}
|
||
* @license Use it if you like it
|
||
*/function th(r){var e;r=r||"",this.ok=!1,r.charAt(0)=="#"&&(r=r.substr(1,6)),r={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"}[r=(r=r.replace(/ /g,"")).toLowerCase()]||r;for(var t=[{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(u){return[parseInt(u[1]),parseInt(u[2]),parseInt(u[3])]}},{re:/^(\w{2})(\w{2})(\w{2})$/,example:["#00ff00","336699"],process:function(u){return[parseInt(u[1],16),parseInt(u[2],16),parseInt(u[3],16)]}},{re:/^(\w{1})(\w{1})(\w{1})$/,example:["#fb0","f0f"],process:function(u){return[parseInt(u[1]+u[1],16),parseInt(u[2]+u[2],16),parseInt(u[3]+u[3],16)]}}],i=0;i<t.length;i++){var o=t[i].re,s=t[i].process,f=o.exec(r);f&&(e=s(f),this.r=e[0],this.g=e[1],this.b=e[2],this.ok=!0)}this.r=this.r<0||isNaN(this.r)?0:this.r>255?255:this.r,this.g=this.g<0||isNaN(this.g)?0:this.g>255?255:this.g,this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b,this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},this.toHex=function(){var u=this.r.toString(16),c=this.g.toString(16),d=this.b.toString(16);return u.length==1&&(u="0"+u),c.length==1&&(c="0"+c),d.length==1&&(d="0"+d),"#"+u+c+d}}var ms=Jt.atob.bind(Jt),su=Jt.btoa.bind(Jt);/**
|
||
* @license
|
||
* Joseph Myers does not specify a particular license for his work.
|
||
*
|
||
* Author: Joseph Myers
|
||
* Accessed from: http://www.myersdaily.org/joseph/javascript/md5.js
|
||
*
|
||
* Modified by: Owen Leong
|
||
*/function yo(r,e){var t=r[0],i=r[1],o=r[2],s=r[3];t=fr(t,i,o,s,e[0],7,-680876936),s=fr(s,t,i,o,e[1],12,-389564586),o=fr(o,s,t,i,e[2],17,606105819),i=fr(i,o,s,t,e[3],22,-1044525330),t=fr(t,i,o,s,e[4],7,-176418897),s=fr(s,t,i,o,e[5],12,1200080426),o=fr(o,s,t,i,e[6],17,-1473231341),i=fr(i,o,s,t,e[7],22,-45705983),t=fr(t,i,o,s,e[8],7,1770035416),s=fr(s,t,i,o,e[9],12,-1958414417),o=fr(o,s,t,i,e[10],17,-42063),i=fr(i,o,s,t,e[11],22,-1990404162),t=fr(t,i,o,s,e[12],7,1804603682),s=fr(s,t,i,o,e[13],12,-40341101),o=fr(o,s,t,i,e[14],17,-1502002290),t=dr(t,i=fr(i,o,s,t,e[15],22,1236535329),o,s,e[1],5,-165796510),s=dr(s,t,i,o,e[6],9,-1069501632),o=dr(o,s,t,i,e[11],14,643717713),i=dr(i,o,s,t,e[0],20,-373897302),t=dr(t,i,o,s,e[5],5,-701558691),s=dr(s,t,i,o,e[10],9,38016083),o=dr(o,s,t,i,e[15],14,-660478335),i=dr(i,o,s,t,e[4],20,-405537848),t=dr(t,i,o,s,e[9],5,568446438),s=dr(s,t,i,o,e[14],9,-1019803690),o=dr(o,s,t,i,e[3],14,-187363961),i=dr(i,o,s,t,e[8],20,1163531501),t=dr(t,i,o,s,e[13],5,-1444681467),s=dr(s,t,i,o,e[2],9,-51403784),o=dr(o,s,t,i,e[7],14,1735328473),t=pr(t,i=dr(i,o,s,t,e[12],20,-1926607734),o,s,e[5],4,-378558),s=pr(s,t,i,o,e[8],11,-2022574463),o=pr(o,s,t,i,e[11],16,1839030562),i=pr(i,o,s,t,e[14],23,-35309556),t=pr(t,i,o,s,e[1],4,-1530992060),s=pr(s,t,i,o,e[4],11,1272893353),o=pr(o,s,t,i,e[7],16,-155497632),i=pr(i,o,s,t,e[10],23,-1094730640),t=pr(t,i,o,s,e[13],4,681279174),s=pr(s,t,i,o,e[0],11,-358537222),o=pr(o,s,t,i,e[3],16,-722521979),i=pr(i,o,s,t,e[6],23,76029189),t=pr(t,i,o,s,e[9],4,-640364487),s=pr(s,t,i,o,e[12],11,-421815835),o=pr(o,s,t,i,e[15],16,530742520),t=gr(t,i=pr(i,o,s,t,e[2],23,-995338651),o,s,e[0],6,-198630844),s=gr(s,t,i,o,e[7],10,1126891415),o=gr(o,s,t,i,e[14],15,-1416354905),i=gr(i,o,s,t,e[5],21,-57434055),t=gr(t,i,o,s,e[12],6,1700485571),s=gr(s,t,i,o,e[3],10,-1894986606),o=gr(o,s,t,i,e[10],15,-1051523),i=gr(i,o,s,t,e[1],21,-2054922799),t=gr(t,i,o,s,e[8],6,1873313359),s=gr(s,t,i,o,e[15],10,-30611744),o=gr(o,s,t,i,e[6],15,-1560198380),i=gr(i,o,s,t,e[13],21,1309151649),t=gr(t,i,o,s,e[4],6,-145523070),s=gr(s,t,i,o,e[11],10,-1120210379),o=gr(o,s,t,i,e[2],15,718787259),i=gr(i,o,s,t,e[9],21,-343485551),r[0]=Kn(t,r[0]),r[1]=Kn(i,r[1]),r[2]=Kn(o,r[2]),r[3]=Kn(s,r[3])}function Ls(r,e,t,i,o,s){return e=Kn(Kn(e,r),Kn(i,s)),Kn(e<<o|e>>>32-o,t)}function fr(r,e,t,i,o,s,f){return Ls(e&t|~e&i,r,e,o,s,f)}function dr(r,e,t,i,o,s,f){return Ls(e&i|t&~i,r,e,o,s,f)}function pr(r,e,t,i,o,s,f){return Ls(e^t^i,r,e,o,s,f)}function gr(r,e,t,i,o,s,f){return Ls(t^(e|~i),r,e,o,s,f)}function eh(r){var e,t=r.length,i=[1732584193,-271733879,-1732584194,271733878];for(e=64;e<=r.length;e+=64)yo(i,Jf(r.substring(e-64,e)));r=r.substring(e-64);var o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(e=0;e<r.length;e++)o[e>>2]|=r.charCodeAt(e)<<(e%4<<3);if(o[e>>2]|=128<<(e%4<<3),e>55)for(yo(i,o),e=0;e<16;e++)o[e]=0;return o[14]=8*t,yo(i,o),i}function Jf(r){var e,t=[];for(e=0;e<64;e+=4)t[e>>2]=r.charCodeAt(e)+(r.charCodeAt(e+1)<<8)+(r.charCodeAt(e+2)<<16)+(r.charCodeAt(e+3)<<24);return t}var ou="0123456789abcdef".split("");function $f(r){for(var e="",t=0;t<4;t++)e+=ou[r>>8*t+4&15]+ou[r>>8*t&15];return e}function Kf(r){return String.fromCharCode(255&r,(65280&r)>>8,(16711680&r)>>16,(4278190080&r)>>24)}function Co(r){return eh(r).map(Kf).join("")}var Xf=function(r){for(var e=0;e<r.length;e++)r[e]=$f(r[e]);return r.join("")}(eh("hello"))!="5d41402abc4b2a76b9719d911017c592";function Kn(r,e){if(Xf){var t=(65535&r)+(65535&e);return(r>>16)+(e>>16)+(t>>16)<<16|65535&t}return r+e&4294967295}/**
|
||
* @license
|
||
* FPDF is released under a permissive license: there is no usage restriction.
|
||
* You may embed it freely in your application (commercial or not), with or
|
||
* without modifications.
|
||
*
|
||
* Reference: http://www.fpdf.org/en/script/script37.php
|
||
*/function Fo(r,e){var t,i,o,s;if(r!==t){for(var f=(o=r,s=1+(256/r.length|0),new Array(s+1).join(o)),u=[],c=0;c<256;c++)u[c]=c;var d=0;for(c=0;c<256;c++){var m=u[c];d=(d+m+f.charCodeAt(c))%256,u[c]=u[d],u[d]=m}t=r,i=u}else u=i;var A=e.length,P=0,p=0,B="";for(c=0;c<A;c++)p=(p+(m=u[P=(P+1)%256]))%256,u[P]=u[p],u[p]=m,f=u[(u[P]+u[p])%256],B+=String.fromCharCode(e.charCodeAt(c)^f);return B}/**
|
||
* @license
|
||
* Licensed under the MIT License.
|
||
* http://opensource.org/licenses/mit-license
|
||
* Author: Owen Leong (@owenl131)
|
||
* Date: 15 Oct 2020
|
||
* References:
|
||
* https://www.cs.cmu.edu/~dst/Adobe/Gallery/anon21jul01-pdf-encryption.txt
|
||
* https://github.com/foliojs/pdfkit/blob/master/lib/security.js
|
||
* http://www.fpdf.org/en/script/script37.php
|
||
*/var lu={print:4,modify:8,copy:16,"annot-forms":32};function Ti(r,e,t,i){this.v=1,this.r=2;var o=192;r.forEach(function(u){if(lu.perm!==void 0)throw new Error("Invalid permission: "+u);o+=lu[u]}),this.padding="(¿N^NuAd\0NVÿú\b..\0¶Ðh>/\f©þdSiz";var s=(e+this.padding).substr(0,32),f=(t+this.padding).substr(0,32);this.O=this.processOwnerPassword(s,f),this.P=-(1+(255^o)),this.encryptionKey=Co(s+this.O+this.lsbFirstWord(this.P)+this.hexToBytes(i)).substr(0,5),this.U=Fo(this.encryptionKey,this.padding)}function Di(r){if(/[^\u0000-\u00ff]/.test(r))throw new Error("Invalid PDF Name Object: "+r+", Only accept ASCII characters.");for(var e="",t=r.length,i=0;i<t;i++){var o=r.charCodeAt(i);e+=o<33||o===35||o===37||o===40||o===41||o===47||o===60||o===62||o===91||o===93||o===123||o===125||o>126?"#"+("0"+o.toString(16)).slice(-2):r[i]}return e}function uu(r){if(Se(r)!=="object")throw new Error("Invalid Context passed to initialize PubSub (jsPDF-module)");var e={};this.subscribe=function(t,i,o){if(o=o||!1,typeof t!="string"||typeof i!="function"||typeof o!="boolean")throw new Error("Invalid arguments passed to PubSub.subscribe (jsPDF-module)");e.hasOwnProperty(t)||(e[t]={});var s=Math.random().toString(35);return e[t][s]=[i,!!o],s},this.unsubscribe=function(t){for(var i in e)if(e[i][t])return delete e[i][t],Object.keys(e[i]).length===0&&delete e[i],!0;return!1},this.publish=function(t){if(e.hasOwnProperty(t)){var i=Array.prototype.slice.call(arguments,1),o=[];for(var s in e[t]){var f=e[t][s];try{f[0].apply(r,i)}catch(u){Jt.console&&Le.error("jsPDF PubSub Error",u.message,u)}f[1]&&o.push(s)}o.length&&o.forEach(this.unsubscribe)}},this.getTopics=function(){return e}}function _s(r){if(!(this instanceof _s))return new _s(r);var e="opacity,stroke-opacity".split(",");for(var t in r)r.hasOwnProperty(t)&&e.indexOf(t)>=0&&(this[t]=r[t]);this.id="",this.objectNumber=-1}function rh(r,e){this.gState=r,this.matrix=e,this.id="",this.objectNumber=-1}function bi(r,e,t,i,o){if(!(this instanceof bi))return new bi(r,e,t,i,o);this.type=r==="axial"?2:3,this.coords=e,this.colors=t,rh.call(this,i,o)}function qi(r,e,t,i,o){if(!(this instanceof qi))return new qi(r,e,t,i,o);this.boundingBox=r,this.xStep=e,this.yStep=t,this.stream="",this.cloneIndex=0,rh.call(this,i,o)}function Tt(r){var e,t=typeof arguments[0]=="string"?arguments[0]:"p",i=arguments[1],o=arguments[2],s=arguments[3],f=[],u=1,c=16,d="S",m=null;Se(r=r||{})==="object"&&(t=r.orientation,i=r.unit||i,o=r.format||o,s=r.compress||r.compressPdf||s,(m=r.encryption||null)!==null&&(m.userPassword=m.userPassword||"",m.ownerPassword=m.ownerPassword||"",m.userPermissions=m.userPermissions||[]),u=typeof r.userUnit=="number"?Math.abs(r.userUnit):1,r.precision!==void 0&&(e=r.precision),r.floatPrecision!==void 0&&(c=r.floatPrecision),d=r.defaultPathOperation||"S"),f=r.filters||(s===!0?["FlateEncode"]:f),i=i||"mm",t=(""+(t||"P")).toLowerCase();var A=r.putOnlyUsedFonts||!1,P={},p={internal:{},__private__:{}};p.__private__.PubSub=uu;var B="1.3",O=p.__private__.getPdfVersion=function(){return B};p.__private__.setPdfVersion=function(l){B=l};var M={a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89],a5:[419.53,595.28],a6:[297.64,419.53],a7:[209.76,297.64],a8:[147.4,209.76],a9:[104.88,147.4],a10:[73.7,104.88],b0:[2834.65,4008.19],b1:[2004.09,2834.65],b2:[1417.32,2004.09],b3:[1000.63,1417.32],b4:[708.66,1000.63],b5:[498.9,708.66],b6:[354.33,498.9],b7:[249.45,354.33],b8:[175.75,249.45],b9:[124.72,175.75],b10:[87.87,124.72],c0:[2599.37,3676.54],c1:[1836.85,2599.37],c2:[1298.27,1836.85],c3:[918.43,1298.27],c4:[649.13,918.43],c5:[459.21,649.13],c6:[323.15,459.21],c7:[229.61,323.15],c8:[161.57,229.61],c9:[113.39,161.57],c10:[79.37,113.39],dl:[311.81,623.62],letter:[612,792],"government-letter":[576,756],legal:[612,1008],"junior-legal":[576,360],ledger:[1224,792],tabloid:[792,1224],"credit-card":[153,243]};p.__private__.getPageFormats=function(){return M};var S=p.__private__.getPageFormat=function(l){return M[l]};o=o||"a4";var G="compat",Y="advanced",D=G;function ot(){this.saveGraphicsState(),k(new Gt(ee,0,0,-ee,0,si()*ee).toString()+" cm"),this.setFontSize(this.getFontSize()/ee),d="n",D=Y}function yt(){this.restoreGraphicsState(),d="S",D=G}var gt=p.__private__.combineFontStyleAndFontWeight=function(l,b){if(l=="bold"&&b=="normal"||l=="bold"&&b==400||l=="normal"&&b=="italic"||l=="bold"&&b=="italic")throw new Error("Invalid Combination of fontweight and fontstyle");return b&&(l=b==400||b==="normal"?l==="italic"?"italic":"normal":b!=700&&b!=="bold"||l!=="normal"?(b==700?"bold":b)+""+l:"bold"),l};p.advancedAPI=function(l){var b=D===G;return b&&ot.call(this),typeof l!="function"||(l(this),b&&yt.call(this)),this},p.compatAPI=function(l){var b=D===Y;return b&&yt.call(this),typeof l!="function"||(l(this),b&&ot.call(this)),this},p.isAdvancedAPI=function(){return D===Y};var tt,z=function(l){if(D!==Y)throw new Error(l+" is only available in 'advanced' API mode. You need to call advancedAPI() first.")},et=p.roundToPrecision=p.__private__.roundToPrecision=function(l,b){var F=e||b;if(isNaN(l)||isNaN(F))throw new Error("Invalid argument passed to jsPDF.roundToPrecision");return l.toFixed(F).replace(/0+$/,"")};tt=p.hpf=p.__private__.hpf=typeof c=="number"?function(l){if(isNaN(l))throw new Error("Invalid argument passed to jsPDF.hpf");return et(l,c)}:c==="smart"?function(l){if(isNaN(l))throw new Error("Invalid argument passed to jsPDF.hpf");return et(l,l>-1&&l<1?16:5)}:function(l){if(isNaN(l))throw new Error("Invalid argument passed to jsPDF.hpf");return et(l,16)};var N=p.f2=p.__private__.f2=function(l){if(isNaN(l))throw new Error("Invalid argument passed to jsPDF.f2");return et(l,2)},E=p.__private__.f3=function(l){if(isNaN(l))throw new Error("Invalid argument passed to jsPDF.f3");return et(l,3)},q=p.scale=p.__private__.scale=function(l){if(isNaN(l))throw new Error("Invalid argument passed to jsPDF.scale");return D===G?l*ee:D===Y?l:void 0},U=function(l){return q(function(b){return D===G?si()-b:D===Y?b:void 0}(l))};p.__private__.setPrecision=p.setPrecision=function(l){typeof parseInt(l,10)=="number"&&(e=parseInt(l,10))};var it,ct="00000000000000000000000000000000",pt=p.__private__.getFileId=function(){return ct},rt=p.__private__.setFileId=function(l){return ct=l!==void 0&&/^[a-fA-F0-9]{32}$/.test(l)?l.toUpperCase():ct.split("").map(function(){return"ABCDEF0123456789".charAt(Math.floor(16*Math.random()))}).join(""),m!==null&&(Ke=new Ti(m.userPermissions,m.userPassword,m.ownerPassword,ct)),ct};p.setFileId=function(l){return rt(l),this},p.getFileId=function(){return pt()};var ft=p.__private__.convertDateToPDFDate=function(l){var b=l.getTimezoneOffset(),F=b<0?"+":"-",T=Math.floor(Math.abs(b/60)),$=Math.abs(b%60),ut=[F,R(T),"'",R($),"'"].join("");return["D:",l.getFullYear(),R(l.getMonth()+1),R(l.getDate()),R(l.getHours()),R(l.getMinutes()),R(l.getSeconds()),ut].join("")},At=p.__private__.convertPDFDateToDate=function(l){var b=parseInt(l.substr(2,4),10),F=parseInt(l.substr(6,2),10)-1,T=parseInt(l.substr(8,2),10),$=parseInt(l.substr(10,2),10),ut=parseInt(l.substr(12,2),10),mt=parseInt(l.substr(14,2),10);return new Date(b,F,T,$,ut,mt,0)},xt=p.__private__.setCreationDate=function(l){var b;if(l===void 0&&(l=new Date),l instanceof Date)b=ft(l);else{if(!/^D:(20[0-2][0-9]|203[0-7]|19[7-9][0-9])(0[0-9]|1[0-2])([0-2][0-9]|3[0-1])(0[0-9]|1[0-9]|2[0-3])(0[0-9]|[1-5][0-9])(0[0-9]|[1-5][0-9])(\+0[0-9]|\+1[0-4]|-0[0-9]|-1[0-1])'(0[0-9]|[1-5][0-9])'?$/.test(l))throw new Error("Invalid argument passed to jsPDF.setCreationDate");b=l}return it=b},x=p.__private__.getCreationDate=function(l){var b=it;return l==="jsDate"&&(b=At(it)),b};p.setCreationDate=function(l){return xt(l),this},p.getCreationDate=function(l){return x(l)};var j,R=p.__private__.padd2=function(l){return("0"+parseInt(l)).slice(-2)},V=p.__private__.padd2Hex=function(l){return("00"+(l=l.toString())).substr(l.length)},J=0,Q=[],nt=[],at=0,dt=[],_t=[],St=!1,kt=nt;p.__private__.setCustomOutputDestination=function(l){St=!0,kt=l};var zt=function(l){St||(kt=l)};p.__private__.resetCustomOutputDestination=function(){St=!1,kt=nt};var k=p.__private__.out=function(l){return l=l.toString(),at+=l.length+1,kt.push(l),kt},Lt=p.__private__.write=function(l){return k(arguments.length===1?l.toString():Array.prototype.join.call(arguments," "))},ae=p.__private__.getArrayBuffer=function(l){for(var b=l.length,F=new ArrayBuffer(b),T=new Uint8Array(F);b--;)T[b]=l.charCodeAt(b);return F},Ht=[["Helvetica","helvetica","normal","WinAnsiEncoding"],["Helvetica-Bold","helvetica","bold","WinAnsiEncoding"],["Helvetica-Oblique","helvetica","italic","WinAnsiEncoding"],["Helvetica-BoldOblique","helvetica","bolditalic","WinAnsiEncoding"],["Courier","courier","normal","WinAnsiEncoding"],["Courier-Bold","courier","bold","WinAnsiEncoding"],["Courier-Oblique","courier","italic","WinAnsiEncoding"],["Courier-BoldOblique","courier","bolditalic","WinAnsiEncoding"],["Times-Roman","times","normal","WinAnsiEncoding"],["Times-Bold","times","bold","WinAnsiEncoding"],["Times-Italic","times","italic","WinAnsiEncoding"],["Times-BoldItalic","times","bolditalic","WinAnsiEncoding"],["ZapfDingbats","zapfdingbats","normal",null],["Symbol","symbol","normal",null]];p.__private__.getStandardFonts=function(){return Ht};var vt=r.fontSize||16;p.__private__.setFontSize=p.setFontSize=function(l){return vt=D===Y?l/ee:l,this};var Wt,It=p.__private__.getFontSize=p.getFontSize=function(){return D===G?vt:vt*ee},Ut=r.R2L||!1;p.__private__.setR2L=p.setR2L=function(l){return Ut=l,this},p.__private__.getR2L=p.getR2L=function(){return Ut};var Dt,be=p.__private__.setZoomMode=function(l){if(/^(?:\d+\.\d*|\d*\.\d+|\d+)%$/.test(l))Wt=l;else if(isNaN(l)){if([void 0,null,"fullwidth","fullheight","fullpage","original"].indexOf(l)===-1)throw new Error('zoom must be Integer (e.g. 2), a percentage Value (e.g. 300%) or fullwidth, fullheight, fullpage, original. "'+l+'" is not recognized.');Wt=l}else Wt=parseInt(l,10)};p.__private__.getZoomMode=function(){return Wt};var ue,Zt=p.__private__.setPageMode=function(l){if([void 0,null,"UseNone","UseOutlines","UseThumbs","FullScreen"].indexOf(l)==-1)throw new Error('Page mode must be one of UseNone, UseOutlines, UseThumbs, or FullScreen. "'+l+'" is not recognized.');Dt=l};p.__private__.getPageMode=function(){return Dt};var ce=p.__private__.setLayoutMode=function(l){if([void 0,null,"continuous","single","twoleft","tworight","two"].indexOf(l)==-1)throw new Error('Layout mode must be one of continuous, single, twoleft, tworight. "'+l+'" is not recognized.');ue=l};p.__private__.getLayoutMode=function(){return ue},p.__private__.setDisplayMode=p.setDisplayMode=function(l,b,F){return be(l),ce(b),Zt(F),this};var he={title:"",subject:"",author:"",keywords:"",creator:""};p.__private__.getDocumentProperty=function(l){if(Object.keys(he).indexOf(l)===-1)throw new Error("Invalid argument passed to jsPDF.getDocumentProperty");return he[l]},p.__private__.getDocumentProperties=function(){return he},p.__private__.setDocumentProperties=p.setProperties=p.setDocumentProperties=function(l){for(var b in he)he.hasOwnProperty(b)&&l[b]&&(he[b]=l[b]);return this},p.__private__.setDocumentProperty=function(l,b){if(Object.keys(he).indexOf(l)===-1)throw new Error("Invalid arguments passed to jsPDF.setDocumentProperty");return he[l]=b};var jt,ee,Rt,De,pe,se={},oe={},Fe=[],qt={},ke={},Yt={},Qt={},Ee=null,le=0,Vt=[],ve=new uu(p),Zn=r.hotfixes||[],hr={},dn={},Qr=[],Gt=function l(b,F,T,$,ut,mt){if(!(this instanceof l))return new l(b,F,T,$,ut,mt);isNaN(b)&&(b=1),isNaN(F)&&(F=0),isNaN(T)&&(T=0),isNaN($)&&($=1),isNaN(ut)&&(ut=0),isNaN(mt)&&(mt=0),this._matrix=[b,F,T,$,ut,mt]};Object.defineProperty(Gt.prototype,"sx",{get:function(){return this._matrix[0]},set:function(l){this._matrix[0]=l}}),Object.defineProperty(Gt.prototype,"shy",{get:function(){return this._matrix[1]},set:function(l){this._matrix[1]=l}}),Object.defineProperty(Gt.prototype,"shx",{get:function(){return this._matrix[2]},set:function(l){this._matrix[2]=l}}),Object.defineProperty(Gt.prototype,"sy",{get:function(){return this._matrix[3]},set:function(l){this._matrix[3]=l}}),Object.defineProperty(Gt.prototype,"tx",{get:function(){return this._matrix[4]},set:function(l){this._matrix[4]=l}}),Object.defineProperty(Gt.prototype,"ty",{get:function(){return this._matrix[5]},set:function(l){this._matrix[5]=l}}),Object.defineProperty(Gt.prototype,"a",{get:function(){return this._matrix[0]},set:function(l){this._matrix[0]=l}}),Object.defineProperty(Gt.prototype,"b",{get:function(){return this._matrix[1]},set:function(l){this._matrix[1]=l}}),Object.defineProperty(Gt.prototype,"c",{get:function(){return this._matrix[2]},set:function(l){this._matrix[2]=l}}),Object.defineProperty(Gt.prototype,"d",{get:function(){return this._matrix[3]},set:function(l){this._matrix[3]=l}}),Object.defineProperty(Gt.prototype,"e",{get:function(){return this._matrix[4]},set:function(l){this._matrix[4]=l}}),Object.defineProperty(Gt.prototype,"f",{get:function(){return this._matrix[5]},set:function(l){this._matrix[5]=l}}),Object.defineProperty(Gt.prototype,"rotation",{get:function(){return Math.atan2(this.shx,this.sx)}}),Object.defineProperty(Gt.prototype,"scaleX",{get:function(){return this.decompose().scale.sx}}),Object.defineProperty(Gt.prototype,"scaleY",{get:function(){return this.decompose().scale.sy}}),Object.defineProperty(Gt.prototype,"isIdentity",{get:function(){return this.sx===1&&this.shy===0&&this.shx===0&&this.sy===1&&this.tx===0&&this.ty===0}}),Gt.prototype.join=function(l){return[this.sx,this.shy,this.shx,this.sy,this.tx,this.ty].map(tt).join(l)},Gt.prototype.multiply=function(l){var b=l.sx*this.sx+l.shy*this.shx,F=l.sx*this.shy+l.shy*this.sy,T=l.shx*this.sx+l.sy*this.shx,$=l.shx*this.shy+l.sy*this.sy,ut=l.tx*this.sx+l.ty*this.shx+this.tx,mt=l.tx*this.shy+l.ty*this.sy+this.ty;return new Gt(b,F,T,$,ut,mt)},Gt.prototype.decompose=function(){var l=this.sx,b=this.shy,F=this.shx,T=this.sy,$=this.tx,ut=this.ty,mt=Math.sqrt(l*l+b*b),Ft=(l/=mt)*F+(b/=mt)*T;F-=l*Ft,T-=b*Ft;var Bt=Math.sqrt(F*F+T*T);return Ft/=Bt,l*(T/=Bt)<b*(F/=Bt)&&(l=-l,b=-b,Ft=-Ft,mt=-mt),{scale:new Gt(mt,0,0,Bt,0,0),translate:new Gt(1,0,0,1,$,ut),rotate:new Gt(l,b,-b,l,0,0),skew:new Gt(1,0,Ft,1,0,0)}},Gt.prototype.toString=function(l){return this.join(" ")},Gt.prototype.inversed=function(){var l=this.sx,b=this.shy,F=this.shx,T=this.sy,$=this.tx,ut=this.ty,mt=1/(l*T-b*F),Ft=T*mt,Bt=-b*mt,$t=-F*mt,re=l*mt;return new Gt(Ft,Bt,$t,re,-Ft*$-$t*ut,-Bt*$-re*ut)},Gt.prototype.applyToPoint=function(l){var b=l.x*this.sx+l.y*this.shx+this.tx,F=l.x*this.shy+l.y*this.sy+this.ty;return new yn(b,F)},Gt.prototype.applyToRectangle=function(l){var b=this.applyToPoint(l),F=this.applyToPoint(new yn(l.x+l.w,l.y+l.h));return new ta(b.x,b.y,F.x-b.x,F.y-b.y)},Gt.prototype.clone=function(){var l=this.sx,b=this.shy,F=this.shx,T=this.sy,$=this.tx,ut=this.ty;return new Gt(l,b,F,T,$,ut)},p.Matrix=Gt;var pn=p.matrixMult=function(l,b){return b.multiply(l)},gn=new Gt(1,0,0,1,0,0);p.unitMatrix=p.identityMatrix=gn;var Er=function(l,b){if(!ke[l]){var F=(b instanceof bi?"Sh":"P")+(Object.keys(qt).length+1).toString(10);b.id=F,ke[l]=F,qt[F]=b,ve.publish("addPattern",b)}};p.ShadingPattern=bi,p.TilingPattern=qi,p.addShadingPattern=function(l,b){return z("addShadingPattern()"),Er(l,b),this},p.beginTilingPattern=function(l){z("beginTilingPattern()"),ea(l.boundingBox[0],l.boundingBox[1],l.boundingBox[2]-l.boundingBox[0],l.boundingBox[3]-l.boundingBox[1],l.matrix)},p.endTilingPattern=function(l,b){z("endTilingPattern()"),b.stream=_t[j].join(`
|
||
`),Er(l,b),ve.publish("endTilingPattern",b),Qr.pop().restore()};var Or,Be=p.__private__.newObject=function(){var l=rr();return ir(l,!0),l},rr=p.__private__.newObjectDeferred=function(){return J++,Q[J]=function(){return at},J},ir=function(l,b){return b=typeof b=="boolean"&&b,Q[l]=at,b&&k(l+" 0 obj"),l},Qn=p.__private__.newAdditionalObject=function(){var l={objId:rr(),content:""};return dt.push(l),l},On=rr(),zr=rr(),tn=p.__private__.decodeColorString=function(l){var b=l.split(" ");if(b.length!==2||b[1]!=="g"&&b[1]!=="G")b.length!==5||b[4]!=="k"&&b[4]!=="K"||(b=[(1-b[0])*(1-b[3]),(1-b[1])*(1-b[3]),(1-b[2])*(1-b[3]),"r"]);else{var F=parseFloat(b[0]);b=[F,F,F,"r"]}for(var T="#",$=0;$<3;$++)T+=("0"+Math.floor(255*parseFloat(b[$])).toString(16)).slice(-2);return T},Hr=p.__private__.encodeColorString=function(l){var b;typeof l=="string"&&(l={ch1:l});var F=l.ch1,T=l.ch2,$=l.ch3,ut=l.ch4,mt=l.pdfColorType==="draw"?["G","RG","K"]:["g","rg","k"];if(typeof F=="string"&&F.charAt(0)!=="#"){var Ft=new th(F);if(Ft.ok)F=Ft.toHex();else if(!/^\d*\.?\d*$/.test(F))throw new Error('Invalid color "'+F+'" passed to jsPDF.encodeColorString.')}if(typeof F=="string"&&/^#[0-9A-Fa-f]{3}$/.test(F)&&(F="#"+F[1]+F[1]+F[2]+F[2]+F[3]+F[3]),typeof F=="string"&&/^#[0-9A-Fa-f]{6}$/.test(F)){var Bt=parseInt(F.substr(1),16);F=Bt>>16&255,T=Bt>>8&255,$=255&Bt}if(T===void 0||ut===void 0&&F===T&&T===$)b=typeof F=="string"?F+" "+mt[0]:l.precision===2?N(F/255)+" "+mt[0]:E(F/255)+" "+mt[0];else if(ut===void 0||Se(ut)==="object"){if(ut&&!isNaN(ut.a)&&ut.a===0)return["1.","1.","1.",mt[1]].join(" ");b=typeof F=="string"?[F,T,$,mt[1]].join(" "):l.precision===2?[N(F/255),N(T/255),N($/255),mt[1]].join(" "):[E(F/255),E(T/255),E($/255),mt[1]].join(" ")}else b=typeof F=="string"?[F,T,$,ut,mt[2]].join(" "):l.precision===2?[N(F),N(T),N($),N(ut),mt[2]].join(" "):[E(F),E(T),E($),E(ut),mt[2]].join(" ");return b},Wr=p.__private__.getFilters=function(){return f},jr=p.__private__.putStream=function(l){var b=(l=l||{}).data||"",F=l.filters||Wr(),T=l.alreadyAppliedFilters||[],$=l.addLength1||!1,ut=b.length,mt=l.objectId,Ft=function(Xe){return Xe};if(m!==null&&mt===void 0)throw new Error("ObjectId must be passed to putStream for file encryption");m!==null&&(Ft=Ke.encryptor(mt,0));var Bt={};F===!0&&(F=["FlateEncode"]);var $t=l.additionalKeyValues||[],re=(Bt=Tt.API.processDataByFilters!==void 0?Tt.API.processDataByFilters(b,F):{data:b,reverseChain:[]}).reverseChain+(Array.isArray(T)?T.join(" "):T.toString());if(Bt.data.length!==0&&($t.push({key:"Length",value:Bt.data.length}),$===!0&&$t.push({key:"Length1",value:ut})),re.length!=0)if(re.split("/").length-1==1)$t.push({key:"Filter",value:re});else{$t.push({key:"Filter",value:"["+re+"]"});for(var ge=0;ge<$t.length;ge+=1)if($t[ge].key==="DecodeParms"){for(var je=[],Je=0;Je<Bt.reverseChain.split("/").length-1;Je+=1)je.push("null");je.push($t[ge].value),$t[ge].value="["+je.join(" ")+"]"}}k("<<");for(var Pe=0;Pe<$t.length;Pe++)k("/"+$t[Pe].key+" "+$t[Pe].value);k(">>"),Bt.data.length!==0&&(k("stream"),k(Ft(Bt.data)),k("endstream"))},ti=p.__private__.putPage=function(l){var b=l.number,F=l.data,T=l.objId,$=l.contentsObjId;ir(T,!0),k("<</Type /Page"),k("/Parent "+l.rootDictionaryObjId+" 0 R"),k("/Resources "+l.resourceDictionaryObjId+" 0 R"),k("/MediaBox ["+parseFloat(tt(l.mediaBox.bottomLeftX))+" "+parseFloat(tt(l.mediaBox.bottomLeftY))+" "+tt(l.mediaBox.topRightX)+" "+tt(l.mediaBox.topRightY)+"]"),l.cropBox!==null&&k("/CropBox ["+tt(l.cropBox.bottomLeftX)+" "+tt(l.cropBox.bottomLeftY)+" "+tt(l.cropBox.topRightX)+" "+tt(l.cropBox.topRightY)+"]"),l.bleedBox!==null&&k("/BleedBox ["+tt(l.bleedBox.bottomLeftX)+" "+tt(l.bleedBox.bottomLeftY)+" "+tt(l.bleedBox.topRightX)+" "+tt(l.bleedBox.topRightY)+"]"),l.trimBox!==null&&k("/TrimBox ["+tt(l.trimBox.bottomLeftX)+" "+tt(l.trimBox.bottomLeftY)+" "+tt(l.trimBox.topRightX)+" "+tt(l.trimBox.topRightY)+"]"),l.artBox!==null&&k("/ArtBox ["+tt(l.artBox.bottomLeftX)+" "+tt(l.artBox.bottomLeftY)+" "+tt(l.artBox.topRightX)+" "+tt(l.artBox.topRightY)+"]"),typeof l.userUnit=="number"&&l.userUnit!==1&&k("/UserUnit "+l.userUnit),ve.publish("putPage",{objId:T,pageContext:Vt[b],pageNumber:b,page:F}),k("/Contents "+$+" 0 R"),k(">>"),k("endobj");var ut=F.join(`
|
||
`);return D===Y&&(ut+=`
|
||
Q`),ir($,!0),jr({data:ut,filters:Wr(),objectId:$}),k("endobj"),T},en=p.__private__.putPages=function(){var l,b,F=[];for(l=1;l<=le;l++)Vt[l].objId=rr(),Vt[l].contentsObjId=rr();for(l=1;l<=le;l++)F.push(ti({number:l,data:_t[l],objId:Vt[l].objId,contentsObjId:Vt[l].contentsObjId,mediaBox:Vt[l].mediaBox,cropBox:Vt[l].cropBox,bleedBox:Vt[l].bleedBox,trimBox:Vt[l].trimBox,artBox:Vt[l].artBox,userUnit:Vt[l].userUnit,rootDictionaryObjId:On,resourceDictionaryObjId:zr}));ir(On,!0),k("<</Type /Pages");var T="/Kids [";for(b=0;b<le;b++)T+=F[b]+" 0 R ";k(T+"]"),k("/Count "+le),k(">>"),k("endobj"),ve.publish("postPutPages")},ei=function(l){ve.publish("putFont",{font:l,out:k,newObject:Be,putStream:jr}),l.isAlreadyPutted!==!0&&(l.objectNumber=Be(),k("<<"),k("/Type /Font"),k("/BaseFont /"+Di(l.postScriptName)),k("/Subtype /Type1"),typeof l.encoding=="string"&&k("/Encoding /"+l.encoding),k("/FirstChar 32"),k("/LastChar 255"),k(">>"),k("endobj"))},_i=function(l){l.objectNumber=Be();var b=[];b.push({key:"Type",value:"/XObject"}),b.push({key:"Subtype",value:"/Form"}),b.push({key:"BBox",value:"["+[tt(l.x),tt(l.y),tt(l.x+l.width),tt(l.y+l.height)].join(" ")+"]"}),b.push({key:"Matrix",value:"["+l.matrix.toString()+"]"});var F=l.pages[1].join(`
|
||
`);jr({data:F,additionalKeyValues:b,objectId:l.objectNumber}),k("endobj")},Ai=function(l,b){b||(b=21);var F=Be(),T=function(mt,Ft){var Bt,$t=[],re=1/(Ft-1);for(Bt=0;Bt<1;Bt+=re)$t.push(Bt);if($t.push(1),mt[0].offset!=0){var ge={offset:0,color:mt[0].color};mt.unshift(ge)}if(mt[mt.length-1].offset!=1){var je={offset:1,color:mt[mt.length-1].color};mt.push(je)}for(var Je="",Pe=0,Xe=0;Xe<$t.length;Xe++){for(Bt=$t[Xe];Bt>mt[Pe+1].offset;)Pe++;var $e=mt[Pe].offset,ar=(Bt-$e)/(mt[Pe+1].offset-$e),An=mt[Pe].color,Gr=mt[Pe+1].color;Je+=V(Math.round((1-ar)*An[0]+ar*Gr[0]).toString(16))+V(Math.round((1-ar)*An[1]+ar*Gr[1]).toString(16))+V(Math.round((1-ar)*An[2]+ar*Gr[2]).toString(16))}return Je.trim()}(l.colors,b),$=[];$.push({key:"FunctionType",value:"0"}),$.push({key:"Domain",value:"[0.0 1.0]"}),$.push({key:"Size",value:"["+b+"]"}),$.push({key:"BitsPerSample",value:"8"}),$.push({key:"Range",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),$.push({key:"Decode",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),jr({data:T,additionalKeyValues:$,alreadyAppliedFilters:["/ASCIIHexDecode"],objectId:F}),k("endobj"),l.objectNumber=Be(),k("<< /ShadingType "+l.type),k("/ColorSpace /DeviceRGB");var ut="/Coords ["+tt(parseFloat(l.coords[0]))+" "+tt(parseFloat(l.coords[1]))+" ";l.type===2?ut+=tt(parseFloat(l.coords[2]))+" "+tt(parseFloat(l.coords[3])):ut+=tt(parseFloat(l.coords[2]))+" "+tt(parseFloat(l.coords[3]))+" "+tt(parseFloat(l.coords[4]))+" "+tt(parseFloat(l.coords[5])),k(ut+="]"),l.matrix&&k("/Matrix ["+l.matrix.toString()+"]"),k("/Function "+F+" 0 R"),k("/Extend [true true]"),k(">>"),k("endobj")},Ni=function(l,b){var F=rr(),T=Be();b.push({resourcesOid:F,objectOid:T}),l.objectNumber=T;var $=[];$.push({key:"Type",value:"/Pattern"}),$.push({key:"PatternType",value:"1"}),$.push({key:"PaintType",value:"1"}),$.push({key:"TilingType",value:"1"}),$.push({key:"BBox",value:"["+l.boundingBox.map(tt).join(" ")+"]"}),$.push({key:"XStep",value:tt(l.xStep)}),$.push({key:"YStep",value:tt(l.yStep)}),$.push({key:"Resources",value:F+" 0 R"}),l.matrix&&$.push({key:"Matrix",value:"["+l.matrix.toString()+"]"}),jr({data:l.stream,additionalKeyValues:$,objectId:l.objectNumber}),k("endobj")},Ss=function(l){for(var b in l.objectNumber=Be(),k("<<"),l)switch(b){case"opacity":k("/ca "+N(l[b]));break;case"stroke-opacity":k("/CA "+N(l[b]))}k(">>"),k("endobj")},Gi=function(l){ir(l.resourcesOid,!0),k("<<"),k("/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]"),function(){for(var b in k("/Font <<"),se)se.hasOwnProperty(b)&&(A===!1||A===!0&&P.hasOwnProperty(b))&&k("/"+b+" "+se[b].objectNumber+" 0 R");k(">>")}(),function(){if(Object.keys(qt).length>0){for(var b in k("/Shading <<"),qt)qt.hasOwnProperty(b)&&qt[b]instanceof bi&&qt[b].objectNumber>=0&&k("/"+b+" "+qt[b].objectNumber+" 0 R");ve.publish("putShadingPatternDict"),k(">>")}}(),function(b){if(Object.keys(qt).length>0){for(var F in k("/Pattern <<"),qt)qt.hasOwnProperty(F)&&qt[F]instanceof p.TilingPattern&&qt[F].objectNumber>=0&&qt[F].objectNumber<b&&k("/"+F+" "+qt[F].objectNumber+" 0 R");ve.publish("putTilingPatternDict"),k(">>")}}(l.objectOid),function(){if(Object.keys(Yt).length>0){var b;for(b in k("/ExtGState <<"),Yt)Yt.hasOwnProperty(b)&&Yt[b].objectNumber>=0&&k("/"+b+" "+Yt[b].objectNumber+" 0 R");ve.publish("putGStateDict"),k(">>")}}(),function(){for(var b in k("/XObject <<"),hr)hr.hasOwnProperty(b)&&hr[b].objectNumber>=0&&k("/"+b+" "+hr[b].objectNumber+" 0 R");ve.publish("putXobjectDict"),k(">>")}(),k(">>"),k("endobj")},Na=function(l){oe[l.fontName]=oe[l.fontName]||{},oe[l.fontName][l.fontStyle]=l.id},La=function(l,b,F,T,$){var ut={id:"F"+(Object.keys(se).length+1).toString(10),postScriptName:l,fontName:b,fontStyle:F,encoding:T,isStandardFont:$||!1,metadata:{}};return ve.publish("addFont",{font:ut,instance:this}),se[ut.id]=ut,Na(ut),ut.id},Br=p.__private__.pdfEscape=p.pdfEscape=function(l,b){return function(F,T){var $,ut,mt,Ft,Bt,$t,re,ge,je;if(mt=(T=T||{}).sourceEncoding||"Unicode",Bt=T.outputEncoding,(T.autoencode||Bt)&&se[jt].metadata&&se[jt].metadata[mt]&&se[jt].metadata[mt].encoding&&(Ft=se[jt].metadata[mt].encoding,!Bt&&se[jt].encoding&&(Bt=se[jt].encoding),!Bt&&Ft.codePages&&(Bt=Ft.codePages[0]),typeof Bt=="string"&&(Bt=Ft[Bt]),Bt)){for(re=!1,$t=[],$=0,ut=F.length;$<ut;$++)(ge=Bt[F.charCodeAt($)])?$t.push(String.fromCharCode(ge)):$t.push(F[$]),$t[$].charCodeAt(0)>>8&&(re=!0);F=$t.join("")}for($=F.length;re===void 0&&$!==0;)F.charCodeAt($-1)>>8&&(re=!0),$--;if(!re)return F;for($t=T.noBOM?[]:[254,255],$=0,ut=F.length;$<ut;$++){if((je=(ge=F.charCodeAt($))>>8)>>8)throw new Error("Character at position "+$+" of string '"+F+"' exceeds 16bits. Cannot be encoded into UCS-2 BE");$t.push(je),$t.push(ge-(je<<8))}return String.fromCharCode.apply(void 0,$t)}(l,b).replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},Yi=p.__private__.beginPage=function(l){_t[++le]=[],Vt[le]={objId:0,contentsObjId:0,userUnit:Number(u),artBox:null,bleedBox:null,cropBox:null,trimBox:null,mediaBox:{bottomLeftX:0,bottomLeftY:0,topRightX:Number(l[0]),topRightY:Number(l[1])}},ka(le),zt(_t[j])},Sa=function(l,b){var F,T,$;switch(t=b||t,typeof l=="string"&&(F=S(l.toLowerCase()),Array.isArray(F)&&(T=F[0],$=F[1])),Array.isArray(l)&&(T=l[0]*ee,$=l[1]*ee),isNaN(T)&&(T=o[0],$=o[1]),(T>14400||$>14400)&&(Le.warn("A page in a PDF can not be wider or taller than 14400 userUnit. jsPDF limits the width/height to 14400"),T=Math.min(14400,T),$=Math.min(14400,$)),o=[T,$],t.substr(0,1)){case"l":$>T&&(o=[$,T]);break;case"p":T>$&&(o=[$,T])}Yi(o),Kt(Ki),k(Pi),Zi!==0&&k(Zi+" J"),Qi!==0&&k(Qi+" j"),ve.publish("addPage",{pageNumber:le})},Ji=function(l){l>0&&l<=le&&(_t.splice(l,1),Vt.splice(l,1),le--,j>le&&(j=le),this.setPage(j))},ka=function(l){l>0&&l<=le&&(j=l)},Pa=p.__private__.getNumberOfPages=p.getNumberOfPages=function(){return _t.length-1},Ia=function(l,b,F){var T,$=void 0;return F=F||{},l=l!==void 0?l:se[jt].fontName,b=b!==void 0?b:se[jt].fontStyle,T=l.toLowerCase(),oe[T]!==void 0&&oe[T][b]!==void 0?$=oe[T][b]:oe[l]!==void 0&&oe[l][b]!==void 0?$=oe[l][b]:F.disableWarning===!1&&Le.warn("Unable to look up font label for font '"+l+"', '"+b+"'. Refer to getFontList() for available fonts."),$||F.noFallback||($=oe.times[b])==null&&($=oe.times.normal),$},rn=p.__private__.putInfo=function(){var l=Be(),b=function(T){return T};for(var F in m!==null&&(b=Ke.encryptor(l,0)),k("<<"),k("/Producer ("+Br(b("jsPDF "+Tt.version))+")"),he)he.hasOwnProperty(F)&&he[F]&&k("/"+F.substr(0,1).toUpperCase()+F.substr(1)+" ("+Br(b(he[F]))+")");k("/CreationDate ("+Br(b(it))+")"),k(">>"),k("endobj")},Li=p.__private__.putCatalog=function(l){var b=(l=l||{}).rootDictionaryObjId||On;switch(Be(),k("<<"),k("/Type /Catalog"),k("/Pages "+b+" 0 R"),Wt||(Wt="fullwidth"),Wt){case"fullwidth":k("/OpenAction [3 0 R /FitH null]");break;case"fullheight":k("/OpenAction [3 0 R /FitV null]");break;case"fullpage":k("/OpenAction [3 0 R /Fit]");break;case"original":k("/OpenAction [3 0 R /XYZ null null 1]");break;default:var F=""+Wt;F.substr(F.length-1)==="%"&&(Wt=parseInt(Wt)/100),typeof Wt=="number"&&k("/OpenAction [3 0 R /XYZ null null "+N(Wt)+"]")}switch(ue||(ue="continuous"),ue){case"continuous":k("/PageLayout /OneColumn");break;case"single":k("/PageLayout /SinglePage");break;case"two":case"twoleft":k("/PageLayout /TwoColumnLeft");break;case"tworight":k("/PageLayout /TwoColumnRight")}Dt&&k("/PageMode /"+Dt),ve.publish("putCatalog"),k(">>"),k("endobj")},ks=p.__private__.putTrailer=function(){k("trailer"),k("<<"),k("/Size "+(J+1)),k("/Root "+J+" 0 R"),k("/Info "+(J-1)+" 0 R"),m!==null&&k("/Encrypt "+Ke.oid+" 0 R"),k("/ID [ <"+ct+"> <"+ct+"> ]"),k(">>")},Ye=p.__private__.putHeader=function(){k("%PDF-"+B),k("%ºß¬à")},Ca=p.__private__.putXRef=function(){var l="0000000000";k("xref"),k("0 "+(J+1)),k("0000000000 65535 f ");for(var b=1;b<=J;b++)typeof Q[b]=="function"?k((l+Q[b]()).slice(-10)+" 00000 n "):Q[b]!==void 0?k((l+Q[b]).slice(-10)+" 00000 n "):k("0000000000 00000 n ")},nn=p.__private__.buildDocument=function(){var l;J=0,at=0,nt=[],Q=[],dt=[],On=rr(),zr=rr(),zt(nt),ve.publish("buildDocument"),Ye(),en(),function(){ve.publish("putAdditionalObjects");for(var F=0;F<dt.length;F++){var T=dt[F];ir(T.objId,!0),k(T.content),k("endobj")}ve.publish("postPutAdditionalObjects")}(),l=[],function(){for(var F in se)se.hasOwnProperty(F)&&(A===!1||A===!0&&P.hasOwnProperty(F))&&ei(se[F])}(),function(){var F;for(F in Yt)Yt.hasOwnProperty(F)&&Ss(Yt[F])}(),function(){for(var F in hr)hr.hasOwnProperty(F)&&_i(hr[F])}(),function(F){var T;for(T in qt)qt.hasOwnProperty(T)&&(qt[T]instanceof bi?Ai(qt[T]):qt[T]instanceof qi&&Ni(qt[T],F))}(l),ve.publish("putResources"),l.forEach(Gi),Gi({resourcesOid:zr,objectOid:Number.MAX_SAFE_INTEGER}),ve.publish("postPutResources"),m!==null&&(Ke.oid=Be(),k("<<"),k("/Filter /Standard"),k("/V "+Ke.v),k("/R "+Ke.r),k("/U <"+Ke.toHexString(Ke.U)+">"),k("/O <"+Ke.toHexString(Ke.O)+">"),k("/P "+Ke.P),k(">>"),k("endobj")),rn(),Li();var b=at;return Ca(),ks(),k("startxref"),k(""+b),k("%%EOF"),zt(_t[j]),nt.join(`
|
||
`)},Si=p.__private__.getBlob=function(l){return new Blob([ae(l)],{type:"application/pdf"})},Fa=p.output=p.__private__.output=(Or=function(l,b){switch(typeof(b=b||{})=="string"?b={filename:b}:b.filename=b.filename||"generated.pdf",l){case void 0:return nn();case"save":p.save(b.filename);break;case"arraybuffer":return ae(nn());case"blob":return Si(nn());case"bloburi":case"bloburl":if(Jt.URL!==void 0&&typeof Jt.URL.createObjectURL=="function")return Jt.URL&&Jt.URL.createObjectURL(Si(nn()))||void 0;Le.warn("bloburl is not supported by your system, because URL.createObjectURL is not supported by your browser.");break;case"datauristring":case"dataurlstring":var F="",T=nn();try{F=su(T)}catch{F=su(unescape(encodeURIComponent(T)))}return"data:application/pdf;filename="+b.filename+";base64,"+F;case"pdfobjectnewwindow":if(Object.prototype.toString.call(Jt)==="[object Window]"){var $="https://cdnjs.cloudflare.com/ajax/libs/pdfobject/2.1.1/pdfobject.min.js",ut=' integrity="sha512-4ze/a9/4jqu+tX9dfOqJYSvyYd5M6qum/3HpCLr+/Jqf0whc37VUbkpNGHR7/8pSnCFw47T1fmIpwBV7UySh3g==" crossorigin="anonymous"';b.pdfObjectUrl&&($=b.pdfObjectUrl,ut="");var mt='<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;} </style><body><script src="'+$+'"'+ut+'><\/script><script >PDFObject.embed("'+this.output("dataurlstring")+'", '+JSON.stringify(b)+");<\/script></body></html>",Ft=Jt.open();return Ft!==null&&Ft.document.write(mt),Ft}throw new Error("The option pdfobjectnewwindow just works in a browser-environment.");case"pdfjsnewwindow":if(Object.prototype.toString.call(Jt)==="[object Window]"){var Bt='<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;} </style><body><iframe id="pdfViewer" src="'+(b.pdfJsUrl||"examples/PDF.js/web/viewer.html")+"?file=&downloadName="+b.filename+'" width="500px" height="400px" /></body></html>',$t=Jt.open();if($t!==null){$t.document.write(Bt);var re=this;$t.document.documentElement.querySelector("#pdfViewer").onload=function(){$t.document.title=b.filename,$t.document.documentElement.querySelector("#pdfViewer").contentWindow.PDFViewerApplication.open(re.output("bloburl"))}}return $t}throw new Error("The option pdfjsnewwindow just works in a browser-environment.");case"dataurlnewwindow":if(Object.prototype.toString.call(Jt)!=="[object Window]")throw new Error("The option dataurlnewwindow just works in a browser-environment.");var ge='<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;} </style><body><iframe src="'+this.output("datauristring",b)+'"></iframe></body></html>',je=Jt.open();if(je!==null&&(je.document.write(ge),je.document.title=b.filename),je||typeof safari>"u")return je;break;case"datauri":case"dataurl":return Jt.document.location.href=this.output("datauristring",b);default:return null}},Or.foo=function(){try{return Or.apply(this,arguments)}catch(F){var l=F.stack||"";~l.indexOf(" at ")&&(l=l.split(" at ")[1]);var b="Error in function "+l.split(`
|
||
`)[0].split("<")[0]+": "+F.message;if(!Jt.console)throw new Error(b);Jt.console.error(b,F),Jt.alert&&alert(b)}},Or.foo.bar=Or,Or.foo),Mr=function(l){return Array.isArray(Zn)===!0&&Zn.indexOf(l)>-1};switch(i){case"pt":ee=1;break;case"mm":ee=72/25.4;break;case"cm":ee=72/2.54;break;case"in":ee=72;break;case"px":ee=Mr("px_scaling")==1?.75:96/72;break;case"pc":case"em":ee=12;break;case"ex":ee=6;break;default:if(typeof i!="number")throw new Error("Invalid unit: "+i);ee=i}var Ke=null;xt(),rt();var mn=p.__private__.getPageInfo=p.getPageInfo=function(l){if(isNaN(l)||l%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfo");return{objId:Vt[l].objId,pageNumber:l,pageContext:Vt[l]}},Ea=p.__private__.getPageInfoByObjId=function(l){if(isNaN(l)||l%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfoByObjId");for(var b in Vt)if(Vt[b].objId===l)break;return mn(b)},Ps=p.__private__.getCurrentPageInfo=p.getCurrentPageInfo=function(){return{objId:Vt[j].objId,pageNumber:j,pageContext:Vt[j]}};p.addPage=function(){return Sa.apply(this,arguments),this},p.setPage=function(){return ka.apply(this,arguments),zt.call(this,_t[j]),this},p.insertPage=function(l){return this.addPage(),this.movePage(j,l),this},p.movePage=function(l,b){var F,T;if(l>b){F=_t[l],T=Vt[l];for(var $=l;$>b;$--)_t[$]=_t[$-1],Vt[$]=Vt[$-1];_t[b]=F,Vt[b]=T,this.setPage(b)}else if(l<b){F=_t[l],T=Vt[l];for(var ut=l;ut<b;ut++)_t[ut]=_t[ut+1],Vt[ut]=Vt[ut+1];_t[b]=F,Vt[b]=T,this.setPage(b)}return this},p.deletePage=function(){return Ji.apply(this,arguments),this},p.__private__.text=p.text=function(l,b,F,T,$){var ut,mt,Ft,Bt,$t,re,ge,je,Je,Pe=(T=T||{}).scope||this;if(typeof l=="number"&&typeof b=="number"&&(typeof F=="string"||Array.isArray(F))){var Xe=F;F=b,b=l,l=Xe}if(arguments[3]instanceof Gt==0?(Ft=arguments[4],Bt=arguments[5],Se(ge=arguments[3])==="object"&&ge!==null||(typeof Ft=="string"&&(Bt=Ft,Ft=null),typeof ge=="string"&&(Bt=ge,ge=null),typeof ge=="number"&&(Ft=ge,ge=null),T={flags:ge,angle:Ft,align:Bt})):(z("The transform parameter of text() with a Matrix value"),Je=$),isNaN(b)||isNaN(F)||l==null)throw new Error("Invalid arguments passed to jsPDF.text");if(l.length===0)return Pe;var $e,ar="",An=typeof T.lineHeightFactor=="number"?T.lineHeightFactor:ni,Gr=Pe.internal.scaleFactor;function Nn(we){return we=we.split(" ").join(Array(T.TabLen||9).join(" ")),Br(we,ge)}function na(we){for(var Ae,Ue=we.concat(),Ze=[],kn=Ue.length;kn--;)typeof(Ae=Ue.shift())=="string"?Ze.push(Ae):Array.isArray(we)&&(Ae.length===1||Ae[1]===void 0&&Ae[2]===void 0)?Ze.push(Ae[0]):Ze.push([Ae[0],Ae[1],Ae[2]]);return Ze}function Ci(we,Ae){var Ue;if(typeof we=="string")Ue=Ae(we)[0];else if(Array.isArray(we)){for(var Ze,kn,da=we.concat(),Oi=[],Ha=da.length;Ha--;)typeof(Ze=da.shift())=="string"?Oi.push(Ae(Ze)[0]):Array.isArray(Ze)&&typeof Ze[0]=="string"&&(kn=Ae(Ze[0],Ze[1],Ze[2]),Oi.push([kn[0],kn[1],kn[2]]));Ue=Oi}return Ue}var jn=!1,oi=!0;if(typeof l=="string")jn=!0;else if(Array.isArray(l)){var li=l.concat();mt=[];for(var Bn,sr=li.length;sr--;)(typeof(Bn=li.shift())!="string"||Array.isArray(Bn)&&typeof Bn[0]!="string")&&(oi=!1);jn=oi}if(jn===!1)throw new Error('Type of text must be string or Array. "'+l+'" is not recognized.');typeof l=="string"&&(l=l.match(/[\r?\n]/)?l.split(/\r\n|\r|\n/g):[l]);var ui=vt/Pe.internal.scaleFactor,hi=ui*(An-1);switch(T.baseline){case"bottom":F-=hi;break;case"top":F+=ui-hi;break;case"hanging":F+=ui-2*hi;break;case"middle":F+=ui/2-hi}if((re=T.maxWidth||0)>0&&(typeof l=="string"?l=Pe.splitTextToSize(l,re):Object.prototype.toString.call(l)==="[object Array]"&&(l=l.reduce(function(we,Ae){return we.concat(Pe.splitTextToSize(Ae,re))},[]))),ut={text:l,x:b,y:F,options:T,mutex:{pdfEscape:Br,activeFontKey:jt,fonts:se,activeFontSize:vt}},ve.publish("preProcessText",ut),l=ut.text,Ft=(T=ut.options).angle,Je instanceof Gt==0&&Ft&&typeof Ft=="number"){Ft*=Math.PI/180,T.rotationDirection===0&&(Ft=-Ft),D===Y&&(Ft=-Ft);var ia=Math.cos(Ft),aa=Math.sin(Ft);Je=new Gt(ia,aa,-aa,ia,0,0)}else Ft&&Ft instanceof Gt&&(Je=Ft);D!==Y||Je||(Je=gn),($t=T.charSpace||wn)!==void 0&&(ar+=tt(q($t))+` Tc
|
||
`,this.setCharSpace(this.getCharSpace()||0)),(je=T.horizontalScale)!==void 0&&(ar+=tt(100*je)+` Tz
|
||
`),T.lang;var mr=-1,Ln=T.renderingMode!==void 0?T.renderingMode:T.stroke,Fi=Pe.internal.getCurrentPageInfo().pageContext;switch(Ln){case 0:case!1:case"fill":mr=0;break;case 1:case!0:case"stroke":mr=1;break;case 2:case"fillThenStroke":mr=2;break;case 3:case"invisible":mr=3;break;case 4:case"fillAndAddForClipping":mr=4;break;case 5:case"strokeAndAddPathForClipping":mr=5;break;case 6:case"fillThenStrokeAndAddToPathForClipping":mr=6;break;case 7:case"addToPathForClipping":mr=7}var Ua=Fi.usedRenderingMode!==void 0?Fi.usedRenderingMode:-1;mr!==-1?ar+=mr+` Tr
|
||
`:Ua!==-1&&(ar+=`0 Tr
|
||
`),mr!==-1&&(Fi.usedRenderingMode=mr),Bt=T.align||"left";var Rr,ci=vt*An,sa=Pe.internal.pageSize.getWidth(),oa=se[jt];$t=T.charSpace||wn,re=T.maxWidth||0,ge=Object.assign({autoencode:!0,noBOM:!0},T.flags);var Mn=[],fi=function(we){return Pe.getStringUnitWidth(we,{font:oa,charSpace:$t,fontSize:vt,doKerning:!1})*vt/Gr};if(Object.prototype.toString.call(l)==="[object Array]"){var Ar;mt=na(l),Bt!=="left"&&(Rr=mt.map(fi));var Nr,Rn=0;if(Bt==="right"){b-=Rr[0],l=[],sr=mt.length;for(var Sn=0;Sn<sr;Sn++)Sn===0?(Nr=bn(b),Ar=vn(F)):(Nr=q(Rn-Rr[Sn]),Ar=-ci),l.push([mt[Sn],Nr,Ar]),Rn=Rr[Sn]}else if(Bt==="center"){b-=Rr[0]/2,l=[],sr=mt.length;for(var Tn=0;Tn<sr;Tn++)Tn===0?(Nr=bn(b),Ar=vn(F)):(Nr=q((Rn-Rr[Tn])/2),Ar=-ci),l.push([mt[Tn],Nr,Ar]),Rn=Rr[Tn]}else if(Bt==="left"){l=[],sr=mt.length;for(var la=0;la<sr;la++)l.push(mt[la])}else if(Bt==="justify"&&oa.encoding==="Identity-H"){l=[],sr=mt.length,re=re!==0?re:sa;for(var Ei=0,qe=0;qe<sr;qe++)if(Ar=qe===0?vn(F):-ci,Nr=qe===0?bn(b):Ei,qe<sr-1){var za=q((re-Rr[qe])/(mt[qe].split(" ").length-1)),sn=mt[qe].split(" ");l.push([sn[0]+" ",Nr,Ar]),Ei=0;for(var on=1;on<sn.length;on++){var ua=(fi(sn[on-1]+" "+sn[on])-fi(sn[on]))*Gr+za;on==sn.length-1?l.push([sn[on],ua,0]):l.push([sn[on]+" ",ua,0]),Ei-=ua}}else l.push([mt[qe],Nr,Ar]);l.push(["",Ei,0])}else{if(Bt!=="justify")throw new Error('Unrecognized alignment option, use "left", "center", "right" or "justify".');for(l=[],sr=mt.length,re=re!==0?re:sa,qe=0;qe<sr;qe++){Ar=qe===0?vn(F):-ci,Nr=qe===0?bn(b):0;var ha=mt[qe].split(" ").length-1,ca=ha>0?(re-Rr[qe])/ha:0;qe<sr-1?Mn.push(tt(q(ca))):Mn.push(0),l.push([mt[qe],Nr,Ar])}}}(typeof T.R2L=="boolean"?T.R2L:Ut)===!0&&(l=Ci(l,function(we,Ae,Ue){return[we.split("").reverse().join(""),Ae,Ue]})),ut={text:l,x:b,y:F,options:T,mutex:{pdfEscape:Br,activeFontKey:jt,fonts:se,activeFontSize:vt}},ve.publish("postProcessText",ut),l=ut.text,$e=ut.mutex.isHex||!1;var fa=se[jt].encoding;fa!=="WinAnsiEncoding"&&fa!=="StandardEncoding"||(l=Ci(l,function(we,Ae,Ue){return[Nn(we),Ae,Ue]})),mt=na(l),l=[];for(var Dn,qn,Un,di=Array.isArray(mt[0])?1:0,zn="",pi=function(we,Ae,Ue){var Ze="";return Ue instanceof Gt?(Ue=typeof T.angle=="number"?pn(Ue,new Gt(1,0,0,1,we,Ae)):pn(new Gt(1,0,0,1,we,Ae),Ue),D===Y&&(Ue=pn(new Gt(1,0,0,-1,0,0),Ue)),Ze=Ue.join(" ")+` Tm
|
||
`):Ze=tt(we)+" "+tt(Ae)+` Td
|
||
`,Ze},Tr=0;Tr<mt.length;Tr++){switch(zn="",di){case 1:Un=($e?"<":"(")+mt[Tr][0]+($e?">":")"),Dn=parseFloat(mt[Tr][1]),qn=parseFloat(mt[Tr][2]);break;case 0:Un=($e?"<":"(")+mt[Tr]+($e?">":")"),Dn=bn(b),qn=vn(F)}Mn!==void 0&&Mn[Tr]!==void 0&&(zn=Mn[Tr]+` Tw
|
||
`),Tr===0?l.push(zn+pi(Dn,qn,Je)+Un):di===0?l.push(zn+Un):di===1&&l.push(zn+pi(Dn,qn,Je)+Un)}l=di===0?l.join(` Tj
|
||
T* `):l.join(` Tj
|
||
`),l+=` Tj
|
||
`;var ln=`BT
|
||
/`;return ln+=jt+" "+vt+` Tf
|
||
`,ln+=tt(vt*An)+` TL
|
||
`,ln+=ii+`
|
||
`,ln+=ar,ln+=l,k(ln+="ET"),P[jt]=!0,Pe};var Is=p.__private__.clip=p.clip=function(l){return k(l==="evenodd"?"W*":"W"),this};p.clipEvenOdd=function(){return Is("evenodd")},p.__private__.discardPath=p.discardPath=function(){return k("n"),this};var an=p.__private__.isValidStyle=function(l){var b=!1;return[void 0,null,"S","D","F","DF","FD","f","f*","B","B*","n"].indexOf(l)!==-1&&(b=!0),b};p.__private__.setDefaultPathOperation=p.setDefaultPathOperation=function(l){return an(l)&&(d=l),this};var Oa=p.__private__.getStyle=p.getStyle=function(l){var b=d;switch(l){case"D":case"S":b="S";break;case"F":b="f";break;case"FD":case"DF":b="B";break;case"f":case"f*":case"B":case"B*":b=l}return b},ja=p.close=function(){return k("h"),this};p.stroke=function(){return k("S"),this},p.fill=function(l){return ki("f",l),this},p.fillEvenOdd=function(l){return ki("f*",l),this},p.fillStroke=function(l){return ki("B",l),this},p.fillStrokeEvenOdd=function(l){return ki("B*",l),this};var ki=function(l,b){Se(b)==="object"?Fs(b,l):k(l)},ri=function(l){l===null||D===Y&&l===void 0||(l=Oa(l),k(l))};function Cs(l,b,F,T,$){var ut=new qi(b||this.boundingBox,F||this.xStep,T||this.yStep,this.gState,$||this.matrix);ut.stream=this.stream;var mt=l+"$$"+this.cloneIndex+++"$$";return Er(mt,ut),ut}var Fs=function(l,b){var F=ke[l.key],T=qt[F];if(T instanceof bi)k("q"),k(Es(b)),T.gState&&p.setGState(T.gState),k(l.matrix.toString()+" cm"),k("/"+F+" sh"),k("Q");else if(T instanceof qi){var $=new Gt(1,0,0,-1,0,si());l.matrix&&($=$.multiply(l.matrix||gn),F=Cs.call(T,l.key,l.boundingBox,l.xStep,l.yStep,$).id),k("q"),k("/Pattern cs"),k("/"+F+" scn"),T.gState&&p.setGState(T.gState),k(b),k("Q")}},Es=function(l){switch(l){case"f":case"F":case"n":return"W n";case"f*":return"W* n";case"B":case"S":return"W S";case"B*":return"W* S"}},$i=p.moveTo=function(l,b){return k(tt(q(l))+" "+tt(U(b))+" m"),this},Ba=p.lineTo=function(l,b){return k(tt(q(l))+" "+tt(U(b))+" l"),this},Vr=p.curveTo=function(l,b,F,T,$,ut){return k([tt(q(l)),tt(U(b)),tt(q(F)),tt(U(T)),tt(q($)),tt(U(ut)),"c"].join(" ")),this};p.__private__.line=p.line=function(l,b,F,T,$){if(isNaN(l)||isNaN(b)||isNaN(F)||isNaN(T)||!an($))throw new Error("Invalid arguments passed to jsPDF.line");return D===G?this.lines([[F-l,T-b]],l,b,[1,1],$||"S"):this.lines([[F-l,T-b]],l,b,[1,1]).stroke()},p.__private__.lines=p.lines=function(l,b,F,T,$,ut){var mt,Ft,Bt,$t,re,ge,je,Je,Pe,Xe,$e,ar;if(typeof l=="number"&&(ar=F,F=b,b=l,l=ar),T=T||[1,1],ut=ut||!1,isNaN(b)||isNaN(F)||!Array.isArray(l)||!Array.isArray(T)||!an($)||typeof ut!="boolean")throw new Error("Invalid arguments passed to jsPDF.lines");for($i(b,F),mt=T[0],Ft=T[1],$t=l.length,Xe=b,$e=F,Bt=0;Bt<$t;Bt++)(re=l[Bt]).length===2?(Xe=re[0]*mt+Xe,$e=re[1]*Ft+$e,Ba(Xe,$e)):(ge=re[0]*mt+Xe,je=re[1]*Ft+$e,Je=re[2]*mt+Xe,Pe=re[3]*Ft+$e,Xe=re[4]*mt+Xe,$e=re[5]*Ft+$e,Vr(ge,je,Je,Pe,Xe,$e));return ut&&ja(),ri($),this},p.path=function(l){for(var b=0;b<l.length;b++){var F=l[b],T=F.c;switch(F.op){case"m":$i(T[0],T[1]);break;case"l":Ba(T[0],T[1]);break;case"c":Vr.apply(this,T);break;case"h":ja()}}return this},p.__private__.rect=p.rect=function(l,b,F,T,$){if(isNaN(l)||isNaN(b)||isNaN(F)||isNaN(T)||!an($))throw new Error("Invalid arguments passed to jsPDF.rect");return D===G&&(T=-T),k([tt(q(l)),tt(U(b)),tt(q(F)),tt(q(T)),"re"].join(" ")),ri($),this},p.__private__.triangle=p.triangle=function(l,b,F,T,$,ut,mt){if(isNaN(l)||isNaN(b)||isNaN(F)||isNaN(T)||isNaN($)||isNaN(ut)||!an(mt))throw new Error("Invalid arguments passed to jsPDF.triangle");return this.lines([[F-l,T-b],[$-F,ut-T],[l-$,b-ut]],l,b,[1,1],mt,!0),this},p.__private__.roundedRect=p.roundedRect=function(l,b,F,T,$,ut,mt){if(isNaN(l)||isNaN(b)||isNaN(F)||isNaN(T)||isNaN($)||isNaN(ut)||!an(mt))throw new Error("Invalid arguments passed to jsPDF.roundedRect");var Ft=4/3*(Math.SQRT2-1);return $=Math.min($,.5*F),ut=Math.min(ut,.5*T),this.lines([[F-2*$,0],[$*Ft,0,$,ut-ut*Ft,$,ut],[0,T-2*ut],[0,ut*Ft,-$*Ft,ut,-$,ut],[2*$-F,0],[-$*Ft,0,-$,-ut*Ft,-$,-ut],[0,2*ut-T],[0,-ut*Ft,$*Ft,-ut,$,-ut]],l+$,b,[1,1],mt,!0),this},p.__private__.ellipse=p.ellipse=function(l,b,F,T,$){if(isNaN(l)||isNaN(b)||isNaN(F)||isNaN(T)||!an($))throw new Error("Invalid arguments passed to jsPDF.ellipse");var ut=4/3*(Math.SQRT2-1)*F,mt=4/3*(Math.SQRT2-1)*T;return $i(l+F,b),Vr(l+F,b-mt,l+ut,b-T,l,b-T),Vr(l-ut,b-T,l-F,b-mt,l-F,b),Vr(l-F,b+mt,l-ut,b+T,l,b+T),Vr(l+ut,b+T,l+F,b+mt,l+F,b),ri($),this},p.__private__.circle=p.circle=function(l,b,F,T){if(isNaN(l)||isNaN(b)||isNaN(F)||!an(T))throw new Error("Invalid arguments passed to jsPDF.circle");return this.ellipse(l,b,F,F,T)},p.setFont=function(l,b,F){return F&&(b=gt(b,F)),jt=Ia(l,b,{disableWarning:!1}),this};var Os=p.__private__.getFont=p.getFont=function(){return se[Ia.apply(p,arguments)]};p.__private__.getFontList=p.getFontList=function(){var l,b,F={};for(l in oe)if(oe.hasOwnProperty(l))for(b in F[l]=[],oe[l])oe[l].hasOwnProperty(b)&&F[l].push(b);return F},p.addFont=function(l,b,F,T,$){var ut=["StandardEncoding","MacRomanEncoding","Identity-H","WinAnsiEncoding"];return arguments[3]&&ut.indexOf(arguments[3])!==-1?$=arguments[3]:arguments[3]&&ut.indexOf(arguments[3])==-1&&(F=gt(F,T)),La.call(this,l,b,F,$=$||"Identity-H")};var ni,Ki=r.lineWidth||.200025,js=p.__private__.getLineWidth=p.getLineWidth=function(){return Ki},Kt=p.__private__.setLineWidth=p.setLineWidth=function(l){return Ki=l,k(tt(q(l))+" w"),this};p.__private__.setLineDash=Tt.API.setLineDash=Tt.API.setLineDashPattern=function(l,b){if(l=l||[],b=b||0,isNaN(b)||!Array.isArray(l))throw new Error("Invalid arguments passed to jsPDF.setLineDash");return l=l.map(function(F){return tt(q(F))}).join(" "),b=tt(q(b)),k("["+l+"] "+b+" d"),this};var Bs=p.__private__.getLineHeight=p.getLineHeight=function(){return vt*ni};p.__private__.getLineHeight=p.getLineHeight=function(){return vt*ni};var Ms=p.__private__.setLineHeightFactor=p.setLineHeightFactor=function(l){return typeof(l=l||1.15)=="number"&&(ni=l),this},Rs=p.__private__.getLineHeightFactor=p.getLineHeightFactor=function(){return ni};Ms(r.lineHeight);var bn=p.__private__.getHorizontalCoordinate=function(l){return q(l)},vn=p.__private__.getVerticalCoordinate=function(l){return D===Y?l:Vt[j].mediaBox.topRightY-Vt[j].mediaBox.bottomLeftY-q(l)},Ts=p.__private__.getHorizontalCoordinateString=p.getHorizontalCoordinateString=function(l){return tt(bn(l))},Ds=p.__private__.getVerticalCoordinateString=p.getVerticalCoordinateString=function(l){return tt(vn(l))},Pi=r.strokeColor||"0 G";p.__private__.getStrokeColor=p.getDrawColor=function(){return tn(Pi)},p.__private__.setStrokeColor=p.setDrawColor=function(l,b,F,T){return Pi=Hr({ch1:l,ch2:b,ch3:F,ch4:T,pdfColorType:"draw",precision:2}),k(Pi),this};var Xi=r.fillColor||"0 g";p.__private__.getFillColor=p.getFillColor=function(){return tn(Xi)},p.__private__.setFillColor=p.setFillColor=function(l,b,F,T){return Xi=Hr({ch1:l,ch2:b,ch3:F,ch4:T,pdfColorType:"fill",precision:2}),k(Xi),this};var ii=r.textColor||"0 g",qs=p.__private__.getTextColor=p.getTextColor=function(){return tn(ii)};p.__private__.setTextColor=p.setTextColor=function(l,b,F,T){return ii=Hr({ch1:l,ch2:b,ch3:F,ch4:T,pdfColorType:"text",precision:3}),this};var wn=r.charSpace,Us=p.__private__.getCharSpace=p.getCharSpace=function(){return parseFloat(wn||0)};p.__private__.setCharSpace=p.setCharSpace=function(l){if(isNaN(l))throw new Error("Invalid argument passed to jsPDF.setCharSpace");return wn=l,this};var Zi=0;p.CapJoinStyles={0:0,butt:0,but:0,miter:0,1:1,round:1,rounded:1,circle:1,2:2,projecting:2,project:2,square:2,bevel:2},p.__private__.setLineCap=p.setLineCap=function(l){var b=p.CapJoinStyles[l];if(b===void 0)throw new Error("Line cap style of '"+l+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return Zi=b,k(b+" J"),this};var Qi=0;p.__private__.setLineJoin=p.setLineJoin=function(l){var b=p.CapJoinStyles[l];if(b===void 0)throw new Error("Line join style of '"+l+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return Qi=b,k(b+" j"),this},p.__private__.setLineMiterLimit=p.__private__.setMiterLimit=p.setLineMiterLimit=p.setMiterLimit=function(l){if(l=l||0,isNaN(l))throw new Error("Invalid argument passed to jsPDF.setLineMiterLimit");return k(tt(q(l))+" M"),this},p.GState=_s,p.setGState=function(l){(l=typeof l=="string"?Yt[Qt[l]]:Ma(null,l)).equals(Ee)||(k("/"+l.id+" gs"),Ee=l)};var Ma=function(l,b){if(!l||!Qt[l]){var F=!1;for(var T in Yt)if(Yt.hasOwnProperty(T)&&Yt[T].equals(b)){F=!0;break}if(F)b=Yt[T];else{var $="GS"+(Object.keys(Yt).length+1).toString(10);Yt[$]=b,b.id=$}return l&&(Qt[l]=b.id),ve.publish("addGState",b),b}};p.addGState=function(l,b){return Ma(l,b),this},p.saveGraphicsState=function(){return k("q"),Fe.push({key:jt,size:vt,color:ii}),this},p.restoreGraphicsState=function(){k("Q");var l=Fe.pop();return jt=l.key,vt=l.size,ii=l.color,Ee=null,this},p.setCurrentTransformationMatrix=function(l){return k(l.toString()+" cm"),this},p.comment=function(l){return k("#"+l),this};var yn=function(l,b){var F=l||0;Object.defineProperty(this,"x",{enumerable:!0,get:function(){return F},set:function(ut){isNaN(ut)||(F=parseFloat(ut))}});var T=b||0;Object.defineProperty(this,"y",{enumerable:!0,get:function(){return T},set:function(ut){isNaN(ut)||(T=parseFloat(ut))}});var $="pt";return Object.defineProperty(this,"type",{enumerable:!0,get:function(){return $},set:function(ut){$=ut.toString()}}),this},ta=function(l,b,F,T){yn.call(this,l,b),this.type="rect";var $=F||0;Object.defineProperty(this,"w",{enumerable:!0,get:function(){return $},set:function(mt){isNaN(mt)||($=parseFloat(mt))}});var ut=T||0;return Object.defineProperty(this,"h",{enumerable:!0,get:function(){return ut},set:function(mt){isNaN(mt)||(ut=parseFloat(mt))}}),this},Ii=function(){this.page=le,this.currentPage=j,this.pages=_t.slice(0),this.pagesContext=Vt.slice(0),this.x=Rt,this.y=De,this.matrix=pe,this.width=ra(j),this.height=Ta(j),this.outputDestination=kt,this.id="",this.objectNumber=-1};Ii.prototype.restore=function(){le=this.page,j=this.currentPage,Vt=this.pagesContext,_t=this.pages,Rt=this.x,De=this.y,pe=this.matrix,Ra(j,this.width),xn(j,this.height),kt=this.outputDestination};var ea=function(l,b,F,T,$){Qr.push(new Ii),le=j=0,_t=[],Rt=l,De=b,pe=$,Yi([F,T])};for(var ai in p.beginFormObject=function(l,b,F,T,$){return ea(l,b,F,T,$),this},p.endFormObject=function(l){return function(b){if(dn[b])Qr.pop().restore();else{var F=new Ii,T="Xo"+(Object.keys(hr).length+1).toString(10);F.id=T,dn[b]=T,hr[T]=F,ve.publish("addFormObject",F),Qr.pop().restore()}}(l),this},p.doFormObject=function(l,b){var F=hr[dn[l]];return k("q"),k(b.toString()+" cm"),k("/"+F.id+" Do"),k("Q"),this},p.getFormObject=function(l){var b=hr[dn[l]];return{x:b.x,y:b.y,width:b.width,height:b.height,matrix:b.matrix}},p.save=function(l,b){return l=l||"generated.pdf",(b=b||{}).returnPromise=b.returnPromise||!1,b.returnPromise===!1?(mi(Si(nn()),l),typeof mi.unload=="function"&&Jt.setTimeout&&setTimeout(mi.unload,911),this):new Promise(function(F,T){try{var $=mi(Si(nn()),l);typeof mi.unload=="function"&&Jt.setTimeout&&setTimeout(mi.unload,911),F($)}catch(ut){T(ut.message)}})},Tt.API)Tt.API.hasOwnProperty(ai)&&(ai==="events"&&Tt.API.events.length?function(l,b){var F,T,$;for($=b.length-1;$!==-1;$--)F=b[$][0],T=b[$][1],l.subscribe.apply(l,[F].concat(typeof T=="function"?[T]:T))}(ve,Tt.API.events):p[ai]=Tt.API[ai]);function ra(l){return Vt[l].mediaBox.topRightX-Vt[l].mediaBox.bottomLeftX}function Ra(l,b){Vt[l].mediaBox.topRightX=b+Vt[l].mediaBox.bottomLeftX}function Ta(l){return Vt[l].mediaBox.topRightY-Vt[l].mediaBox.bottomLeftY}function xn(l,b){Vt[l].mediaBox.topRightY=b+Vt[l].mediaBox.bottomLeftY}var _n=p.getPageWidth=function(l){return ra(l=l||j)/ee},Da=p.setPageWidth=function(l,b){Ra(l,b*ee)},si=p.getPageHeight=function(l){return Ta(l=l||j)/ee},qa=p.setPageHeight=function(l,b){xn(l,b*ee)};return p.internal={pdfEscape:Br,getStyle:Oa,getFont:Os,getFontSize:It,getCharSpace:Us,getTextColor:qs,getLineHeight:Bs,getLineHeightFactor:Rs,getLineWidth:js,write:Lt,getHorizontalCoordinate:bn,getVerticalCoordinate:vn,getCoordinateString:Ts,getVerticalCoordinateString:Ds,collections:{},newObject:Be,newAdditionalObject:Qn,newObjectDeferred:rr,newObjectDeferredBegin:ir,getFilters:Wr,putStream:jr,events:ve,scaleFactor:ee,pageSize:{getWidth:function(){return _n(j)},setWidth:function(l){Da(j,l)},getHeight:function(){return si(j)},setHeight:function(l){qa(j,l)}},encryptionOptions:m,encryption:Ke,getEncryptor:function(l){return m!==null?Ke.encryptor(l,0):function(b){return b}},output:Fa,getNumberOfPages:Pa,get pages(){return _t},out:k,f2:N,f3:E,getPageInfo:mn,getPageInfoByObjId:Ea,getCurrentPageInfo:Ps,getPDFVersion:O,Point:yn,Rectangle:ta,Matrix:Gt,hasHotfix:Mr},Object.defineProperty(p.internal.pageSize,"width",{get:function(){return _n(j)},set:function(l){Da(j,l)},enumerable:!0,configurable:!0}),Object.defineProperty(p.internal.pageSize,"height",{get:function(){return si(j)},set:function(l){qa(j,l)},enumerable:!0,configurable:!0}),(function(l){for(var b=0,F=Ht.length;b<F;b++){var T=La.call(this,l[b][0],l[b][1],l[b][2],Ht[b][3],!0);A===!1&&(P[T]=!0);var $=l[b][0].split("-");Na({id:T,fontName:$[0],fontStyle:$[1]||""})}ve.publish("addFonts",{fonts:se,dictionary:oe})}).call(p,Ht),jt="F1",Sa(o,t),ve.publish("initialized"),p}Ti.prototype.lsbFirstWord=function(r){return String.fromCharCode(255&r,r>>8&255,r>>16&255,r>>24&255)},Ti.prototype.toHexString=function(r){return r.split("").map(function(e){return("0"+(255&e.charCodeAt(0)).toString(16)).slice(-2)}).join("")},Ti.prototype.hexToBytes=function(r){for(var e=[],t=0;t<r.length;t+=2)e.push(String.fromCharCode(parseInt(r.substr(t,2),16)));return e.join("")},Ti.prototype.processOwnerPassword=function(r,e){return Fo(Co(e).substr(0,5),r)},Ti.prototype.encryptor=function(r,e){var t=Co(this.encryptionKey+String.fromCharCode(255&r,r>>8&255,r>>16&255,255&e,e>>8&255)).substr(0,10);return function(i){return Fo(t,i)}},_s.prototype.equals=function(r){var e,t="id,objectNumber,equals";if(!r||Se(r)!==Se(this))return!1;var i=0;for(e in this)if(!(t.indexOf(e)>=0)){if(this.hasOwnProperty(e)&&!r.hasOwnProperty(e)||this[e]!==r[e])return!1;i++}for(e in r)r.hasOwnProperty(e)&&t.indexOf(e)<0&&i--;return i===0},Tt.API={events:[]},Tt.version="4.0.0";var Te=Tt.API,Bo=1,xi=function(r){return r.replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},Mi=function(r){return r.replace(/\\\\/g,"\\").replace(/\\\(/g,"(").replace(/\\\)/g,")")},Xt=function(r){return r.toFixed(2)},$n=function(r){return r.toFixed(5)};Te.__acroform__={};var _r=function(r,e){r.prototype=Object.create(e.prototype),r.prototype.constructor=r},hu=function(r){return r*Bo},hn=function(r){var e=new ih,t=Ct.internal.getHeight(r)||0,i=Ct.internal.getWidth(r)||0;return e.BBox=[0,0,Number(Xt(i)),Number(Xt(t))],e},Zf=Te.__acroform__.setBit=function(r,e){if(r=r||0,e=e||0,isNaN(r)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBit");return r|1<<e},Qf=Te.__acroform__.clearBit=function(r,e){if(r=r||0,e=e||0,isNaN(r)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBit");return r&~(1<<e)},t1=Te.__acroform__.getBit=function(r,e){if(isNaN(r)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBit");return r&1<<e?1:0},We=Te.__acroform__.getBitForPdf=function(r,e){if(isNaN(r)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBitForPdf");return t1(r,e-1)},Ve=Te.__acroform__.setBitForPdf=function(r,e){if(isNaN(r)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBitForPdf");return Zf(r,e-1)},Ge=Te.__acroform__.clearBitForPdf=function(r,e){if(isNaN(r)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBitForPdf");return Qf(r,e-1)},e1=Te.__acroform__.calculateCoordinates=function(r,e){var t=e.internal.getHorizontalCoordinate,i=e.internal.getVerticalCoordinate,o=r[0],s=r[1],f=r[2],u=r[3],c={};return c.lowerLeft_X=t(o)||0,c.lowerLeft_Y=i(s+u)||0,c.upperRight_X=t(o+f)||0,c.upperRight_Y=i(s)||0,[Number(Xt(c.lowerLeft_X)),Number(Xt(c.lowerLeft_Y)),Number(Xt(c.upperRight_X)),Number(Xt(c.upperRight_Y))]},r1=function(r){if(r.appearanceStreamContent)return r.appearanceStreamContent;if(r.V||r.DV){var e=[],t=r._V||r.DV,i=Eo(r,t),o=r.scope.internal.getFont(r.fontName,r.fontStyle).id;e.push("/Tx BMC"),e.push("q"),e.push("BT"),e.push(r.scope.__private__.encodeColorString(r.color)),e.push("/"+o+" "+Xt(i.fontSize)+" Tf"),e.push("1 0 0 1 0 0 Tm"),e.push(i.text),e.push("ET"),e.push("Q"),e.push("EMC");var s=hn(r);return s.scope=r.scope,s.stream=e.join(`
|
||
`),s}},Eo=function(r,e){var t=r.fontSize===0?r.maxFontSize:r.fontSize,i={text:"",fontSize:""},o=(e=(e=e.substr(0,1)=="("?e.substr(1):e).substr(e.length-1)==")"?e.substr(0,e.length-1):e).split(" ");o=r.multiline?o.map(function(N){return N.split(`
|
||
`)}):o.map(function(N){return[N]});var s=t,f=Ct.internal.getHeight(r)||0;f=f<0?-f:f;var u=Ct.internal.getWidth(r)||0;u=u<0?-u:u;var c=function(N,E,q){if(N+1<o.length){var U=E+" "+o[N+1][0];return fs(U,r,q).width<=u-4}return!1};s++;t:for(;s>0;){e="",s--;var d,m,A=fs("3",r,s).height,P=r.multiline?f-s:(f-A)/2,p=P+=2,B=0,O=0,M=0;if(s<=0){e=`(...) Tj
|
||
`,e+="% Width of Text: "+fs(e,r,s=12).width+", FieldWidth:"+u+`
|
||
`;break}for(var S="",G=0,Y=0;Y<o.length;Y++)if(o.hasOwnProperty(Y)){var D=!1;if(o[Y].length!==1&&M!==o[Y].length-1){if((A+2)*(G+2)+2>f)continue t;S+=o[Y][M],D=!0,O=Y,Y--}else{S=(S+=o[Y][M]+" ").substr(S.length-1)==" "?S.substr(0,S.length-1):S;var ot=parseInt(Y),yt=c(ot,S,s),gt=Y>=o.length-1;if(yt&&!gt){S+=" ",M=0;continue}if(yt||gt){if(gt)O=ot;else if(r.multiline&&(A+2)*(G+2)+2>f)continue t}else{if(!r.multiline||(A+2)*(G+2)+2>f)continue t;O=ot}}for(var tt="",z=B;z<=O;z++){var et=o[z];if(r.multiline){if(z===O){tt+=et[M]+" ",M=(M+1)%et.length;continue}if(z===B){tt+=et[et.length-1]+" ";continue}}tt+=et[0]+" "}switch(tt=tt.substr(tt.length-1)==" "?tt.substr(0,tt.length-1):tt,m=fs(tt,r,s).width,r.textAlign){case"right":d=u-m-2;break;case"center":d=(u-m)/2;break;default:d=2}e+=Xt(d)+" "+Xt(p)+` Td
|
||
`,e+="("+xi(tt)+`) Tj
|
||
`,e+=-Xt(d)+` 0 Td
|
||
`,p=-(s+2),m=0,B=D?O:O+1,G++,S=""}break}return i.text=e,i.fontSize=s,i},fs=function(r,e,t){var i=e.scope.internal.getFont(e.fontName,e.fontStyle),o=e.scope.getStringUnitWidth(r,{font:i,fontSize:parseFloat(t),charSpace:0})*parseFloat(t);return{height:e.scope.getStringUnitWidth("3",{font:i,fontSize:parseFloat(t),charSpace:0})*parseFloat(t)*1.5,width:o}},n1={fields:[],xForms:[],acroFormDictionaryRoot:null,printedOut:!1,internal:null,isInitialized:!1},i1=function(r,e){var t={type:"reference",object:r};e.internal.getPageInfo(r.page).pageContext.annotations.find(function(i){return i.type===t.type&&i.object===t.object})===void 0&&e.internal.getPageInfo(r.page).pageContext.annotations.push(t)},a1=function(r,e){if(e.scope=r,r.internal!==void 0&&(r.internal.acroformPlugin===void 0||r.internal.acroformPlugin.isInitialized===!1)){if(Xr.FieldNum=0,r.internal.acroformPlugin=JSON.parse(JSON.stringify(n1)),r.internal.acroformPlugin.acroFormDictionaryRoot)throw new Error("Exception while creating AcroformDictionary");Bo=r.internal.scaleFactor,r.internal.acroformPlugin.acroFormDictionaryRoot=new ah,r.internal.acroformPlugin.acroFormDictionaryRoot.scope=r,r.internal.acroformPlugin.acroFormDictionaryRoot._eventID=r.internal.events.subscribe("postPutResources",function(){(function(t){t.internal.events.unsubscribe(t.internal.acroformPlugin.acroFormDictionaryRoot._eventID),delete t.internal.acroformPlugin.acroFormDictionaryRoot._eventID,t.internal.acroformPlugin.printedOut=!0})(r)}),r.internal.events.subscribe("buildDocument",function(){(function(t){t.internal.acroformPlugin.acroFormDictionaryRoot.objId=void 0;var i=t.internal.acroformPlugin.acroFormDictionaryRoot.Fields;for(var o in i)if(i.hasOwnProperty(o)){var s=i[o];s.objId=void 0,s.hasAnnotation&&i1(s,t)}})(r)}),r.internal.events.subscribe("putCatalog",function(){(function(t){if(t.internal.acroformPlugin.acroFormDictionaryRoot===void 0)throw new Error("putCatalogCallback: Root missing.");t.internal.write("/AcroForm "+t.internal.acroformPlugin.acroFormDictionaryRoot.objId+" 0 R")})(r)}),r.internal.events.subscribe("postPutPages",function(t){(function(i,o){var s=!i;for(var f in i||(o.internal.newObjectDeferredBegin(o.internal.acroformPlugin.acroFormDictionaryRoot.objId,!0),o.internal.acroformPlugin.acroFormDictionaryRoot.putStream()),i=i||o.internal.acroformPlugin.acroFormDictionaryRoot.Kids)if(i.hasOwnProperty(f)){var u=i[f],c=[],d=u.Rect;if(u.Rect&&(u.Rect=e1(u.Rect,o)),o.internal.newObjectDeferredBegin(u.objId,!0),u.DA=Ct.createDefaultAppearanceStream(u),Se(u)==="object"&&typeof u.getKeyValueListForStream=="function"&&(c=u.getKeyValueListForStream()),u.Rect=d,u.hasAppearanceStream&&!u.appearanceStreamContent){var m=r1(u);c.push({key:"AP",value:"<</N "+m+">>"}),o.internal.acroformPlugin.xForms.push(m)}if(u.appearanceStreamContent){var A="";for(var P in u.appearanceStreamContent)if(u.appearanceStreamContent.hasOwnProperty(P)){var p=u.appearanceStreamContent[P];if(A+="/"+P+" ",A+="<<",Object.keys(p).length>=1||Array.isArray(p)){for(var f in p)if(p.hasOwnProperty(f)){var B=p[f];typeof B=="function"&&(B=B.call(o,u)),A+="/"+f+" "+B+" ",o.internal.acroformPlugin.xForms.indexOf(B)>=0||o.internal.acroformPlugin.xForms.push(B)}}else typeof(B=p)=="function"&&(B=B.call(o,u)),A+="/"+f+" "+B,o.internal.acroformPlugin.xForms.indexOf(B)>=0||o.internal.acroformPlugin.xForms.push(B);A+=">>"}c.push({key:"AP",value:`<<
|
||
`+A+">>"})}o.internal.putStream({additionalKeyValues:c,objectId:u.objId}),o.internal.out("endobj")}s&&function(O,M){for(var S in O)if(O.hasOwnProperty(S)){var G=S,Y=O[S];M.internal.newObjectDeferredBegin(Y.objId,!0),Se(Y)==="object"&&typeof Y.putStream=="function"&&Y.putStream(),delete O[G]}}(o.internal.acroformPlugin.xForms,o)})(t,r)}),r.internal.acroformPlugin.isInitialized=!0}},nh=Te.__acroform__.arrayToPdfArray=function(r,e,t){var i=function(f){return f};if(Array.isArray(r)){for(var o="[",s=0;s<r.length;s++)switch(s!==0&&(o+=" "),Se(r[s])){case"boolean":case"number":case"object":o+=r[s].toString();break;case"string":r[s].substr(0,1)!=="/"?(e!==void 0&&t&&(i=t.internal.getEncryptor(e)),o+="("+xi(i(r[s].toString()))+")"):o+=r[s].toString()}return o+"]"}throw new Error("Invalid argument passed to jsPDF.__acroform__.arrayToPdfArray")},xo=function(r,e,t){var i=function(o){return o};return e!==void 0&&t&&(i=t.internal.getEncryptor(e)),(r=r||"").toString(),"("+xi(i(r))+")"},cn=function(){this._objId=void 0,this._scope=void 0,Object.defineProperty(this,"objId",{get:function(){if(this._objId===void 0){if(this.scope===void 0)return;this._objId=this.scope.internal.newObjectDeferred()}return this._objId},set:function(r){this._objId=r}}),Object.defineProperty(this,"scope",{value:this._scope,writable:!0})};cn.prototype.toString=function(){return this.objId+" 0 R"},cn.prototype.putStream=function(){var r=this.getKeyValueListForStream();this.scope.internal.putStream({data:this.stream,additionalKeyValues:r,objectId:this.objId}),this.scope.internal.out("endobj")},cn.prototype.getKeyValueListForStream=function(){var r=[],e=Object.getOwnPropertyNames(this).filter(function(s){return s!="content"&&s!="appearanceStreamContent"&&s!="scope"&&s!="objId"&&s.substring(0,1)!="_"});for(var t in e)if(Object.getOwnPropertyDescriptor(this,e[t]).configurable===!1){var i=e[t],o=this[i];o&&(Array.isArray(o)?r.push({key:i,value:nh(o,this.objId,this.scope)}):o instanceof cn?(o.scope=this.scope,r.push({key:i,value:o.objId+" 0 R"})):typeof o!="function"&&r.push({key:i,value:o}))}return r};var ih=function(){cn.call(this),Object.defineProperty(this,"Type",{value:"/XObject",configurable:!1,writable:!0}),Object.defineProperty(this,"Subtype",{value:"/Form",configurable:!1,writable:!0}),Object.defineProperty(this,"FormType",{value:1,configurable:!1,writable:!0});var r,e=[];Object.defineProperty(this,"BBox",{configurable:!1,get:function(){return e},set:function(t){e=t}}),Object.defineProperty(this,"Resources",{value:"2 0 R",configurable:!1,writable:!0}),Object.defineProperty(this,"stream",{enumerable:!1,configurable:!0,set:function(t){r=t.trim()},get:function(){return r||null}})};_r(ih,cn);var ah=function(){cn.call(this);var r,e=[];Object.defineProperty(this,"Kids",{enumerable:!1,configurable:!0,get:function(){return e.length>0?e:void 0}}),Object.defineProperty(this,"Fields",{enumerable:!1,configurable:!1,get:function(){return e}}),Object.defineProperty(this,"DA",{enumerable:!1,configurable:!1,get:function(){if(r){var t=function(i){return i};return this.scope&&(t=this.scope.internal.getEncryptor(this.objId)),"("+xi(t(r))+")"}},set:function(t){r=t}})};_r(ah,cn);var Xr=function r(){cn.call(this);var e=4;Object.defineProperty(this,"F",{enumerable:!1,configurable:!1,get:function(){return e},set:function(S){if(isNaN(S))throw new Error('Invalid value "'+S+'" for attribute F supplied.');e=S}}),Object.defineProperty(this,"showWhenPrinted",{enumerable:!0,configurable:!0,get:function(){return!!We(e,3)},set:function(S){S?this.F=Ve(e,3):this.F=Ge(e,3)}});var t=0;Object.defineProperty(this,"Ff",{enumerable:!1,configurable:!1,get:function(){return t},set:function(S){if(isNaN(S))throw new Error('Invalid value "'+S+'" for attribute Ff supplied.');t=S}});var i=[];Object.defineProperty(this,"Rect",{enumerable:!1,configurable:!1,get:function(){if(i.length!==0)return i},set:function(S){i=S!==void 0?S:[]}}),Object.defineProperty(this,"x",{enumerable:!0,configurable:!0,get:function(){return!i||isNaN(i[0])?0:i[0]},set:function(S){i[0]=S}}),Object.defineProperty(this,"y",{enumerable:!0,configurable:!0,get:function(){return!i||isNaN(i[1])?0:i[1]},set:function(S){i[1]=S}}),Object.defineProperty(this,"width",{enumerable:!0,configurable:!0,get:function(){return!i||isNaN(i[2])?0:i[2]},set:function(S){i[2]=S}}),Object.defineProperty(this,"height",{enumerable:!0,configurable:!0,get:function(){return!i||isNaN(i[3])?0:i[3]},set:function(S){i[3]=S}});var o="";Object.defineProperty(this,"FT",{enumerable:!0,configurable:!1,get:function(){return o},set:function(S){switch(S){case"/Btn":case"/Tx":case"/Ch":case"/Sig":o=S;break;default:throw new Error('Invalid value "'+S+'" for attribute FT supplied.')}}});var s=null;Object.defineProperty(this,"T",{enumerable:!0,configurable:!1,get:function(){if(!s||s.length<1){if(this instanceof As)return;s="FieldObject"+r.FieldNum++}var S=function(G){return G};return this.scope&&(S=this.scope.internal.getEncryptor(this.objId)),"("+xi(S(s))+")"},set:function(S){s=S.toString()}}),Object.defineProperty(this,"fieldName",{configurable:!0,enumerable:!0,get:function(){return s},set:function(S){s=S}});var f="helvetica";Object.defineProperty(this,"fontName",{enumerable:!0,configurable:!0,get:function(){return f},set:function(S){f=S}});var u="normal";Object.defineProperty(this,"fontStyle",{enumerable:!0,configurable:!0,get:function(){return u},set:function(S){u=S}});var c=0;Object.defineProperty(this,"fontSize",{enumerable:!0,configurable:!0,get:function(){return c},set:function(S){c=S}});var d=void 0;Object.defineProperty(this,"maxFontSize",{enumerable:!0,configurable:!0,get:function(){return d===void 0?50/Bo:d},set:function(S){d=S}});var m="black";Object.defineProperty(this,"color",{enumerable:!0,configurable:!0,get:function(){return m},set:function(S){m=S}});var A="/F1 0 Tf 0 g";Object.defineProperty(this,"DA",{enumerable:!0,configurable:!1,get:function(){if(!(!A||this instanceof As||this instanceof vi))return xo(A,this.objId,this.scope)},set:function(S){S=S.toString(),A=S}});var P=null;Object.defineProperty(this,"DV",{enumerable:!1,configurable:!1,get:function(){if(P)return this instanceof nr==0?xo(P,this.objId,this.scope):P},set:function(S){S=S.toString(),P=this instanceof nr==0?S.substr(0,1)==="("?Mi(S.substr(1,S.length-2)):Mi(S):S}}),Object.defineProperty(this,"defaultValue",{enumerable:!0,configurable:!0,get:function(){return this instanceof nr==1?Mi(P.substr(1,P.length-1)):P},set:function(S){S=S.toString(),P=this instanceof nr==1?"/"+S:S}});var p=null;Object.defineProperty(this,"_V",{enumerable:!1,configurable:!1,get:function(){if(p)return p},set:function(S){this.V=S}}),Object.defineProperty(this,"V",{enumerable:!1,configurable:!1,get:function(){if(p)return this instanceof nr==0?xo(p,this.objId,this.scope):p},set:function(S){S=S.toString(),p=this instanceof nr==0?S.substr(0,1)==="("?Mi(S.substr(1,S.length-2)):Mi(S):S}}),Object.defineProperty(this,"value",{enumerable:!0,configurable:!0,get:function(){return this instanceof nr==1?Mi(p.substr(1,p.length-1)):p},set:function(S){S=S.toString(),p=this instanceof nr==1?"/"+S:S}}),Object.defineProperty(this,"hasAnnotation",{enumerable:!0,configurable:!0,get:function(){return this.Rect}}),Object.defineProperty(this,"Type",{enumerable:!0,configurable:!1,get:function(){return this.hasAnnotation?"/Annot":null}}),Object.defineProperty(this,"Subtype",{enumerable:!0,configurable:!1,get:function(){return this.hasAnnotation?"/Widget":null}});var B,O=!1;Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return O},set:function(S){S=!!S,O=S}}),Object.defineProperty(this,"page",{enumerable:!0,configurable:!0,get:function(){if(B)return B},set:function(S){B=S}}),Object.defineProperty(this,"readOnly",{enumerable:!0,configurable:!0,get:function(){return!!We(this.Ff,1)},set:function(S){S?this.Ff=Ve(this.Ff,1):this.Ff=Ge(this.Ff,1)}}),Object.defineProperty(this,"required",{enumerable:!0,configurable:!0,get:function(){return!!We(this.Ff,2)},set:function(S){S?this.Ff=Ve(this.Ff,2):this.Ff=Ge(this.Ff,2)}}),Object.defineProperty(this,"noExport",{enumerable:!0,configurable:!0,get:function(){return!!We(this.Ff,3)},set:function(S){S?this.Ff=Ve(this.Ff,3):this.Ff=Ge(this.Ff,3)}});var M=null;Object.defineProperty(this,"Q",{enumerable:!0,configurable:!1,get:function(){if(M!==null)return M},set:function(S){if([0,1,2].indexOf(S)===-1)throw new Error('Invalid value "'+S+'" for attribute Q supplied.');M=S}}),Object.defineProperty(this,"textAlign",{get:function(){var S;switch(M){case 0:default:S="left";break;case 1:S="center";break;case 2:S="right"}return S},configurable:!0,enumerable:!0,set:function(S){switch(S){case"right":case 2:M=2;break;case"center":case 1:M=1;break;default:M=0}}})};_r(Xr,cn);var Ui=function(){Xr.call(this),this.FT="/Ch",this.V="()",this.fontName="zapfdingbats";var r=0;Object.defineProperty(this,"TI",{enumerable:!0,configurable:!1,get:function(){return r},set:function(t){r=t}}),Object.defineProperty(this,"topIndex",{enumerable:!0,configurable:!0,get:function(){return r},set:function(t){r=t}});var e=[];Object.defineProperty(this,"Opt",{enumerable:!0,configurable:!1,get:function(){return nh(e,this.objId,this.scope)},set:function(t){var i,o;o=[],typeof(i=t)=="string"&&(o=function(s,f,u){u||(u=1);for(var c,d=[];c=f.exec(s);)d.push(c[u]);return d}(i,/\((.*?)\)/g)),e=o}}),this.getOptions=function(){return e},this.setOptions=function(t){e=t,this.sort&&e.sort()},this.addOption=function(t){t=(t=t||"").toString(),e.push(t),this.sort&&e.sort()},this.removeOption=function(t,i){for(i=i||!1,t=(t=t||"").toString();e.indexOf(t)!==-1&&(e.splice(e.indexOf(t),1),i!==!1););},Object.defineProperty(this,"combo",{enumerable:!0,configurable:!0,get:function(){return!!We(this.Ff,18)},set:function(t){t?this.Ff=Ve(this.Ff,18):this.Ff=Ge(this.Ff,18)}}),Object.defineProperty(this,"edit",{enumerable:!0,configurable:!0,get:function(){return!!We(this.Ff,19)},set:function(t){this.combo===!0&&(t?this.Ff=Ve(this.Ff,19):this.Ff=Ge(this.Ff,19))}}),Object.defineProperty(this,"sort",{enumerable:!0,configurable:!0,get:function(){return!!We(this.Ff,20)},set:function(t){t?(this.Ff=Ve(this.Ff,20),e.sort()):this.Ff=Ge(this.Ff,20)}}),Object.defineProperty(this,"multiSelect",{enumerable:!0,configurable:!0,get:function(){return!!We(this.Ff,22)},set:function(t){t?this.Ff=Ve(this.Ff,22):this.Ff=Ge(this.Ff,22)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return!!We(this.Ff,23)},set:function(t){t?this.Ff=Ve(this.Ff,23):this.Ff=Ge(this.Ff,23)}}),Object.defineProperty(this,"commitOnSelChange",{enumerable:!0,configurable:!0,get:function(){return!!We(this.Ff,27)},set:function(t){t?this.Ff=Ve(this.Ff,27):this.Ff=Ge(this.Ff,27)}}),this.hasAppearanceStream=!1};_r(Ui,Xr);var zi=function(){Ui.call(this),this.fontName="helvetica",this.combo=!1};_r(zi,Ui);var Hi=function(){zi.call(this),this.combo=!0};_r(Hi,zi);var bs=function(){Hi.call(this),this.edit=!0};_r(bs,Hi);var nr=function(){Xr.call(this),this.FT="/Btn",Object.defineProperty(this,"noToggleToOff",{enumerable:!0,configurable:!0,get:function(){return!!We(this.Ff,15)},set:function(t){t?this.Ff=Ve(this.Ff,15):this.Ff=Ge(this.Ff,15)}}),Object.defineProperty(this,"radio",{enumerable:!0,configurable:!0,get:function(){return!!We(this.Ff,16)},set:function(t){t?this.Ff=Ve(this.Ff,16):this.Ff=Ge(this.Ff,16)}}),Object.defineProperty(this,"pushButton",{enumerable:!0,configurable:!0,get:function(){return!!We(this.Ff,17)},set:function(t){t?this.Ff=Ve(this.Ff,17):this.Ff=Ge(this.Ff,17)}}),Object.defineProperty(this,"radioIsUnison",{enumerable:!0,configurable:!0,get:function(){return!!We(this.Ff,26)},set:function(t){t?this.Ff=Ve(this.Ff,26):this.Ff=Ge(this.Ff,26)}});var r,e={};Object.defineProperty(this,"MK",{enumerable:!1,configurable:!1,get:function(){var t=function(s){return s};if(this.scope&&(t=this.scope.internal.getEncryptor(this.objId)),Object.keys(e).length!==0){var i,o=[];for(i in o.push("<<"),e)o.push("/"+i+" ("+xi(t(e[i]))+")");return o.push(">>"),o.join(`
|
||
`)}},set:function(t){Se(t)==="object"&&(e=t)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return e.CA||""},set:function(t){typeof t=="string"&&(e.CA=t)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return r},set:function(t){r=t}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return r.substr(1,r.length-1)},set:function(t){r="/"+t}})};_r(nr,Xr);var vs=function(){nr.call(this),this.pushButton=!0};_r(vs,nr);var Wi=function(){nr.call(this),this.radio=!0,this.pushButton=!1;var r=[];Object.defineProperty(this,"Kids",{enumerable:!0,configurable:!1,get:function(){return r},set:function(e){r=e!==void 0?e:[]}})};_r(Wi,nr);var As=function(){var r,e;Xr.call(this),Object.defineProperty(this,"Parent",{enumerable:!1,configurable:!1,get:function(){return r},set:function(o){r=o}}),Object.defineProperty(this,"optionName",{enumerable:!1,configurable:!0,get:function(){return e},set:function(o){e=o}});var t,i={};Object.defineProperty(this,"MK",{enumerable:!1,configurable:!1,get:function(){var o=function(u){return u};this.scope&&(o=this.scope.internal.getEncryptor(this.objId));var s,f=[];for(s in f.push("<<"),i)f.push("/"+s+" ("+xi(o(i[s]))+")");return f.push(">>"),f.join(`
|
||
`)},set:function(o){Se(o)==="object"&&(i=o)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return i.CA||""},set:function(o){typeof o=="string"&&(i.CA=o)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return t},set:function(o){t=o}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return t.substr(1,t.length-1)},set:function(o){t="/"+o}}),this.caption="l",this.appearanceState="Off",this._AppearanceType=Ct.RadioButton.Circle,this.appearanceStreamContent=this._AppearanceType.createAppearanceStream(this.optionName)};_r(As,Xr),Wi.prototype.setAppearance=function(r){if(!("createAppearanceStream"in r)||!("getCA"in r))throw new Error("Couldn't assign Appearance to RadioButton. Appearance was Invalid!");for(var e in this.Kids)if(this.Kids.hasOwnProperty(e)){var t=this.Kids[e];t.appearanceStreamContent=r.createAppearanceStream(t.optionName),t.caption=r.getCA()}},Wi.prototype.createOption=function(r){var e=new As;return e.Parent=this,e.optionName=r,this.Kids.push(e),s1.call(this.scope,e),e};var ws=function(){nr.call(this),this.fontName="zapfdingbats",this.caption="3",this.appearanceState="On",this.value="On",this.textAlign="center",this.appearanceStreamContent=Ct.CheckBox.createAppearanceStream()};_r(ws,nr);var vi=function(){Xr.call(this),this.FT="/Tx",Object.defineProperty(this,"multiline",{enumerable:!0,configurable:!0,get:function(){return!!We(this.Ff,13)},set:function(e){e?this.Ff=Ve(this.Ff,13):this.Ff=Ge(this.Ff,13)}}),Object.defineProperty(this,"fileSelect",{enumerable:!0,configurable:!0,get:function(){return!!We(this.Ff,21)},set:function(e){e?this.Ff=Ve(this.Ff,21):this.Ff=Ge(this.Ff,21)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return!!We(this.Ff,23)},set:function(e){e?this.Ff=Ve(this.Ff,23):this.Ff=Ge(this.Ff,23)}}),Object.defineProperty(this,"doNotScroll",{enumerable:!0,configurable:!0,get:function(){return!!We(this.Ff,24)},set:function(e){e?this.Ff=Ve(this.Ff,24):this.Ff=Ge(this.Ff,24)}}),Object.defineProperty(this,"comb",{enumerable:!0,configurable:!0,get:function(){return!!We(this.Ff,25)},set:function(e){e?this.Ff=Ve(this.Ff,25):this.Ff=Ge(this.Ff,25)}}),Object.defineProperty(this,"richText",{enumerable:!0,configurable:!0,get:function(){return!!We(this.Ff,26)},set:function(e){e?this.Ff=Ve(this.Ff,26):this.Ff=Ge(this.Ff,26)}});var r=null;Object.defineProperty(this,"MaxLen",{enumerable:!0,configurable:!1,get:function(){return r},set:function(e){r=e}}),Object.defineProperty(this,"maxLength",{enumerable:!0,configurable:!0,get:function(){return r},set:function(e){Number.isInteger(e)&&(r=e)}}),Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return this.V||this.DV}})};_r(vi,Xr);var ys=function(){vi.call(this),Object.defineProperty(this,"password",{enumerable:!0,configurable:!0,get:function(){return!!We(this.Ff,14)},set:function(r){r?this.Ff=Ve(this.Ff,14):this.Ff=Ge(this.Ff,14)}}),this.password=!0};_r(ys,vi);var Ct={CheckBox:{createAppearanceStream:function(){return{N:{On:Ct.CheckBox.YesNormal},D:{On:Ct.CheckBox.YesPushDown,Off:Ct.CheckBox.OffPushDown}}},YesPushDown:function(r){var e=hn(r);e.scope=r.scope;var t=[],i=r.scope.internal.getFont(r.fontName,r.fontStyle).id,o=r.scope.__private__.encodeColorString(r.color),s=Eo(r,r.caption);return t.push("0.749023 g"),t.push("0 0 "+Xt(Ct.internal.getWidth(r))+" "+Xt(Ct.internal.getHeight(r))+" re"),t.push("f"),t.push("BMC"),t.push("q"),t.push("0 0 1 rg"),t.push("/"+i+" "+Xt(s.fontSize)+" Tf "+o),t.push("BT"),t.push(s.text),t.push("ET"),t.push("Q"),t.push("EMC"),e.stream=t.join(`
|
||
`),e},YesNormal:function(r){var e=hn(r);e.scope=r.scope;var t=r.scope.internal.getFont(r.fontName,r.fontStyle).id,i=r.scope.__private__.encodeColorString(r.color),o=[],s=Ct.internal.getHeight(r),f=Ct.internal.getWidth(r),u=Eo(r,r.caption);return o.push("1 g"),o.push("0 0 "+Xt(f)+" "+Xt(s)+" re"),o.push("f"),o.push("q"),o.push("0 0 1 rg"),o.push("0 0 "+Xt(f-1)+" "+Xt(s-1)+" re"),o.push("W"),o.push("n"),o.push("0 g"),o.push("BT"),o.push("/"+t+" "+Xt(u.fontSize)+" Tf "+i),o.push(u.text),o.push("ET"),o.push("Q"),e.stream=o.join(`
|
||
`),e},OffPushDown:function(r){var e=hn(r);e.scope=r.scope;var t=[];return t.push("0.749023 g"),t.push("0 0 "+Xt(Ct.internal.getWidth(r))+" "+Xt(Ct.internal.getHeight(r))+" re"),t.push("f"),e.stream=t.join(`
|
||
`),e}},RadioButton:{Circle:{createAppearanceStream:function(r){var e={D:{Off:Ct.RadioButton.Circle.OffPushDown},N:{}};return e.N[r]=Ct.RadioButton.Circle.YesNormal,e.D[r]=Ct.RadioButton.Circle.YesPushDown,e},getCA:function(){return"l"},YesNormal:function(r){var e=hn(r);e.scope=r.scope;var t=[],i=Ct.internal.getWidth(r)<=Ct.internal.getHeight(r)?Ct.internal.getWidth(r)/4:Ct.internal.getHeight(r)/4;i=Number((.9*i).toFixed(5));var o=Ct.internal.Bezier_C,s=Number((i*o).toFixed(5));return t.push("q"),t.push("1 0 0 1 "+$n(Ct.internal.getWidth(r)/2)+" "+$n(Ct.internal.getHeight(r)/2)+" cm"),t.push(i+" 0 m"),t.push(i+" "+s+" "+s+" "+i+" 0 "+i+" c"),t.push("-"+s+" "+i+" -"+i+" "+s+" -"+i+" 0 c"),t.push("-"+i+" -"+s+" -"+s+" -"+i+" 0 -"+i+" c"),t.push(s+" -"+i+" "+i+" -"+s+" "+i+" 0 c"),t.push("f"),t.push("Q"),e.stream=t.join(`
|
||
`),e},YesPushDown:function(r){var e=hn(r);e.scope=r.scope;var t=[],i=Ct.internal.getWidth(r)<=Ct.internal.getHeight(r)?Ct.internal.getWidth(r)/4:Ct.internal.getHeight(r)/4;i=Number((.9*i).toFixed(5));var o=Number((2*i).toFixed(5)),s=Number((o*Ct.internal.Bezier_C).toFixed(5)),f=Number((i*Ct.internal.Bezier_C).toFixed(5));return t.push("0.749023 g"),t.push("q"),t.push("1 0 0 1 "+$n(Ct.internal.getWidth(r)/2)+" "+$n(Ct.internal.getHeight(r)/2)+" cm"),t.push(o+" 0 m"),t.push(o+" "+s+" "+s+" "+o+" 0 "+o+" c"),t.push("-"+s+" "+o+" -"+o+" "+s+" -"+o+" 0 c"),t.push("-"+o+" -"+s+" -"+s+" -"+o+" 0 -"+o+" c"),t.push(s+" -"+o+" "+o+" -"+s+" "+o+" 0 c"),t.push("f"),t.push("Q"),t.push("0 g"),t.push("q"),t.push("1 0 0 1 "+$n(Ct.internal.getWidth(r)/2)+" "+$n(Ct.internal.getHeight(r)/2)+" cm"),t.push(i+" 0 m"),t.push(i+" "+f+" "+f+" "+i+" 0 "+i+" c"),t.push("-"+f+" "+i+" -"+i+" "+f+" -"+i+" 0 c"),t.push("-"+i+" -"+f+" -"+f+" -"+i+" 0 -"+i+" c"),t.push(f+" -"+i+" "+i+" -"+f+" "+i+" 0 c"),t.push("f"),t.push("Q"),e.stream=t.join(`
|
||
`),e},OffPushDown:function(r){var e=hn(r);e.scope=r.scope;var t=[],i=Ct.internal.getWidth(r)<=Ct.internal.getHeight(r)?Ct.internal.getWidth(r)/4:Ct.internal.getHeight(r)/4;i=Number((.9*i).toFixed(5));var o=Number((2*i).toFixed(5)),s=Number((o*Ct.internal.Bezier_C).toFixed(5));return t.push("0.749023 g"),t.push("q"),t.push("1 0 0 1 "+$n(Ct.internal.getWidth(r)/2)+" "+$n(Ct.internal.getHeight(r)/2)+" cm"),t.push(o+" 0 m"),t.push(o+" "+s+" "+s+" "+o+" 0 "+o+" c"),t.push("-"+s+" "+o+" -"+o+" "+s+" -"+o+" 0 c"),t.push("-"+o+" -"+s+" -"+s+" -"+o+" 0 -"+o+" c"),t.push(s+" -"+o+" "+o+" -"+s+" "+o+" 0 c"),t.push("f"),t.push("Q"),e.stream=t.join(`
|
||
`),e}},Cross:{createAppearanceStream:function(r){var e={D:{Off:Ct.RadioButton.Cross.OffPushDown},N:{}};return e.N[r]=Ct.RadioButton.Cross.YesNormal,e.D[r]=Ct.RadioButton.Cross.YesPushDown,e},getCA:function(){return"8"},YesNormal:function(r){var e=hn(r);e.scope=r.scope;var t=[],i=Ct.internal.calculateCross(r);return t.push("q"),t.push("1 1 "+Xt(Ct.internal.getWidth(r)-2)+" "+Xt(Ct.internal.getHeight(r)-2)+" re"),t.push("W"),t.push("n"),t.push(Xt(i.x1.x)+" "+Xt(i.x1.y)+" m"),t.push(Xt(i.x2.x)+" "+Xt(i.x2.y)+" l"),t.push(Xt(i.x4.x)+" "+Xt(i.x4.y)+" m"),t.push(Xt(i.x3.x)+" "+Xt(i.x3.y)+" l"),t.push("s"),t.push("Q"),e.stream=t.join(`
|
||
`),e},YesPushDown:function(r){var e=hn(r);e.scope=r.scope;var t=Ct.internal.calculateCross(r),i=[];return i.push("0.749023 g"),i.push("0 0 "+Xt(Ct.internal.getWidth(r))+" "+Xt(Ct.internal.getHeight(r))+" re"),i.push("f"),i.push("q"),i.push("1 1 "+Xt(Ct.internal.getWidth(r)-2)+" "+Xt(Ct.internal.getHeight(r)-2)+" re"),i.push("W"),i.push("n"),i.push(Xt(t.x1.x)+" "+Xt(t.x1.y)+" m"),i.push(Xt(t.x2.x)+" "+Xt(t.x2.y)+" l"),i.push(Xt(t.x4.x)+" "+Xt(t.x4.y)+" m"),i.push(Xt(t.x3.x)+" "+Xt(t.x3.y)+" l"),i.push("s"),i.push("Q"),e.stream=i.join(`
|
||
`),e},OffPushDown:function(r){var e=hn(r);e.scope=r.scope;var t=[];return t.push("0.749023 g"),t.push("0 0 "+Xt(Ct.internal.getWidth(r))+" "+Xt(Ct.internal.getHeight(r))+" re"),t.push("f"),e.stream=t.join(`
|
||
`),e}}},createDefaultAppearanceStream:function(r){var e=r.scope.internal.getFont(r.fontName,r.fontStyle).id,t=r.scope.__private__.encodeColorString(r.color);return"/"+e+" "+r.fontSize+" Tf "+t}};Ct.internal={Bezier_C:.551915024494,calculateCross:function(r){var e=Ct.internal.getWidth(r),t=Ct.internal.getHeight(r),i=Math.min(e,t);return{x1:{x:(e-i)/2,y:(t-i)/2+i},x2:{x:(e-i)/2+i,y:(t-i)/2},x3:{x:(e-i)/2,y:(t-i)/2},x4:{x:(e-i)/2+i,y:(t-i)/2+i}}}},Ct.internal.getWidth=function(r){var e=0;return Se(r)==="object"&&(e=hu(r.Rect[2])),e},Ct.internal.getHeight=function(r){var e=0;return Se(r)==="object"&&(e=hu(r.Rect[3])),e};var s1=Te.addField=function(r){if(a1(this,r),!(r instanceof Xr))throw new Error("Invalid argument passed to jsPDF.addField.");var e;return(e=r).scope.internal.acroformPlugin.printedOut&&(e.scope.internal.acroformPlugin.printedOut=!1,e.scope.internal.acroformPlugin.acroFormDictionaryRoot=null),e.scope.internal.acroformPlugin.acroFormDictionaryRoot.Fields.push(e),r.page=r.scope.internal.getCurrentPageInfo().pageNumber,this};Te.AcroFormChoiceField=Ui,Te.AcroFormListBox=zi,Te.AcroFormComboBox=Hi,Te.AcroFormEditBox=bs,Te.AcroFormButton=nr,Te.AcroFormPushButton=vs,Te.AcroFormRadioButton=Wi,Te.AcroFormCheckBox=ws,Te.AcroFormTextField=vi,Te.AcroFormPasswordField=ys,Te.AcroFormAppearance=Ct,Te.AcroForm={ChoiceField:Ui,ListBox:zi,ComboBox:Hi,EditBox:bs,Button:nr,PushButton:vs,RadioButton:Wi,CheckBox:ws,TextField:vi,PasswordField:ys,Appearance:Ct},Tt.AcroForm={ChoiceField:Ui,ListBox:zi,ComboBox:Hi,EditBox:bs,Button:nr,PushButton:vs,RadioButton:Wi,CheckBox:ws,TextField:vi,PasswordField:ys,Appearance:Ct};Tt.AcroForm;function sh(r){return r.reduce(function(e,t,i){return e[t]=i,e},{})}(function(r){var e="addImage_";r.__addimage__={};var t="UNKNOWN",i={PNG:[[137,80,78,71]],TIFF:[[77,77,0,42],[73,73,42,0]],JPEG:[[255,216,255,224,void 0,void 0,74,70,73,70,0],[255,216,255,225,void 0,void 0,69,120,105,102,0,0],[255,216,255,219],[255,216,255,238]],JPEG2000:[[0,0,0,12,106,80,32,32]],GIF87a:[[71,73,70,56,55,97]],GIF89a:[[71,73,70,56,57,97]],WEBP:[[82,73,70,70,void 0,void 0,void 0,void 0,87,69,66,80]],BMP:[[66,77],[66,65],[67,73],[67,80],[73,67],[80,84]]},o=r.__addimage__.getImageFileTypeByImageData=function(N,E){var q,U,it,ct,pt,rt=t;if((E=E||t)==="RGBA"||N.data!==void 0&&N.data instanceof Uint8ClampedArray&&"height"in N&&"width"in N)return"RGBA";if(yt(N))for(pt in i)for(it=i[pt],q=0;q<it.length;q+=1){for(ct=!0,U=0;U<it[q].length;U+=1)if(it[q][U]!==void 0&&it[q][U]!==N[U]){ct=!1;break}if(ct===!0){rt=pt;break}}else for(pt in i)for(it=i[pt],q=0;q<it.length;q+=1){for(ct=!0,U=0;U<it[q].length;U+=1)if(it[q][U]!==void 0&&it[q][U]!==N.charCodeAt(U)){ct=!1;break}if(ct===!0){rt=pt;break}}return rt===t&&E!==t&&(rt=E),rt},s=function N(E){for(var q=this.internal.write,U=this.internal.putStream,it=(0,this.internal.getFilters)();it.indexOf("FlateEncode")!==-1;)it.splice(it.indexOf("FlateEncode"),1);E.objectId=this.internal.newObject();var ct=[];if(ct.push({key:"Type",value:"/XObject"}),ct.push({key:"Subtype",value:"/Image"}),ct.push({key:"Width",value:E.width}),ct.push({key:"Height",value:E.height}),E.colorSpace===S.INDEXED?ct.push({key:"ColorSpace",value:"[/Indexed /DeviceRGB "+(E.palette.length/3-1)+" "+("sMask"in E&&E.sMask!==void 0?E.objectId+2:E.objectId+1)+" 0 R]"}):(ct.push({key:"ColorSpace",value:"/"+E.colorSpace}),E.colorSpace===S.DEVICE_CMYK&&ct.push({key:"Decode",value:"[1 0 1 0 1 0 1 0]"})),ct.push({key:"BitsPerComponent",value:E.bitsPerComponent}),"decodeParameters"in E&&E.decodeParameters!==void 0&&ct.push({key:"DecodeParms",value:"<<"+E.decodeParameters+">>"}),"transparency"in E&&Array.isArray(E.transparency)&&E.transparency.length>0){for(var pt="",rt=0,ft=E.transparency.length;rt<ft;rt++)pt+=E.transparency[rt]+" "+E.transparency[rt]+" ";ct.push({key:"Mask",value:"["+pt+"]"})}E.sMask!==void 0&&ct.push({key:"SMask",value:E.objectId+1+" 0 R"});var At=E.filter!==void 0?["/"+E.filter]:void 0;if(U({data:E.data,additionalKeyValues:ct,alreadyAppliedFilters:At,objectId:E.objectId}),q("endobj"),"sMask"in E&&E.sMask!==void 0){var xt,x=(xt=E.sMaskBitsPerComponent)!==null&&xt!==void 0?xt:E.bitsPerComponent,j={width:E.width,height:E.height,colorSpace:"DeviceGray",bitsPerComponent:x,data:E.sMask};"filter"in E&&(j.decodeParameters="/Predictor ".concat(E.predictor," /Colors 1 /BitsPerComponent ").concat(x," /Columns ").concat(E.width),j.filter=E.filter),N.call(this,j)}if(E.colorSpace===S.INDEXED){var R=this.internal.newObject();U({data:tt(new Uint8Array(E.palette)),objectId:R}),q("endobj")}},f=function(){var N=this.internal.collections[e+"images"];for(var E in N)s.call(this,N[E])},u=function(){var N,E=this.internal.collections[e+"images"],q=this.internal.write;for(var U in E)q("/I"+(N=E[U]).index,N.objectId,"0","R")},c=function(){this.internal.collections[e+"images"]||(this.internal.collections[e+"images"]={},this.internal.events.subscribe("putResources",f),this.internal.events.subscribe("putXobjectDict",u))},d=function(){var N=this.internal.collections[e+"images"];return c.call(this),N},m=function(){return Object.keys(this.internal.collections[e+"images"]).length},A=function(N){return typeof r["process"+N.toUpperCase()]=="function"},P=function(N){return Se(N)==="object"&&N.nodeType===1},p=function(N,E){if(N.nodeName==="IMG"&&N.hasAttribute("src")){var q=""+N.getAttribute("src");if(q.indexOf("data:image/")===0)return ms(unescape(q).split("base64,").pop());var U=r.loadFile(q,!0);if(U!==void 0)return U}if(N.nodeName==="CANVAS"){if(N.width===0||N.height===0)throw new Error("Given canvas must have data. Canvas width: "+N.width+", height: "+N.height);var it;switch(E){case"PNG":it="image/png";break;case"WEBP":it="image/webp";break;default:it="image/jpeg"}return ms(N.toDataURL(it,1).split("base64,").pop())}},B=function(N){var E=this.internal.collections[e+"images"];if(E){for(var q in E)if(N===E[q].alias)return E[q]}},O=function(N,E,q){return N||E||(N=-96,E=-96),N<0&&(N=-1*q.width*72/N/this.internal.scaleFactor),E<0&&(E=-1*q.height*72/E/this.internal.scaleFactor),N===0&&(N=E*q.width/q.height),E===0&&(E=N*q.height/q.width),[N,E]},M=function(N,E,q,U,it,ct){var pt=O.call(this,q,U,it),rt=this.internal.getCoordinateString,ft=this.internal.getVerticalCoordinateString,At=d.call(this);if(q=pt[0],U=pt[1],At[it.index]=it,ct){ct*=Math.PI/180;var xt=Math.cos(ct),x=Math.sin(ct),j=function(V){return V.toFixed(4)},R=[j(xt),j(x),j(-1*x),j(xt),0,0,"cm"]}this.internal.write("q"),ct?(this.internal.write([1,"0","0",1,rt(N),ft(E+U),"cm"].join(" ")),this.internal.write(R.join(" ")),this.internal.write([rt(q),"0","0",rt(U),"0","0","cm"].join(" "))):this.internal.write([rt(q),"0","0",rt(U),rt(N),ft(E+U),"cm"].join(" ")),this.isAdvancedAPI()&&this.internal.write([1,0,0,-1,0,0,"cm"].join(" ")),this.internal.write("/I"+it.index+" Do"),this.internal.write("Q")},S=r.color_spaces={DEVICE_RGB:"DeviceRGB",DEVICE_GRAY:"DeviceGray",DEVICE_CMYK:"DeviceCMYK",CAL_GREY:"CalGray",CAL_RGB:"CalRGB",LAB:"Lab",ICC_BASED:"ICCBased",INDEXED:"Indexed",PATTERN:"Pattern",SEPARATION:"Separation",DEVICE_N:"DeviceN"};r.decode={DCT_DECODE:"DCTDecode",FLATE_DECODE:"FlateDecode",LZW_DECODE:"LZWDecode",JPX_DECODE:"JPXDecode",JBIG2_DECODE:"JBIG2Decode",ASCII85_DECODE:"ASCII85Decode",ASCII_HEX_DECODE:"ASCIIHexDecode",RUN_LENGTH_DECODE:"RunLengthDecode",CCITT_FAX_DECODE:"CCITTFaxDecode"};var G=r.image_compression={NONE:"NONE",FAST:"FAST",MEDIUM:"MEDIUM",SLOW:"SLOW"},Y=r.__addimage__.sHashCode=function(N){var E,q,U=0;if(typeof N=="string")for(q=N.length,E=0;E<q;E++)U=(U<<5)-U+N.charCodeAt(E),U|=0;else if(yt(N))for(q=N.byteLength/2,E=0;E<q;E++)U=(U<<5)-U+N[E],U|=0;return U},D=r.__addimage__.validateStringAsBase64=function(N){(N=N||"").toString().trim();var E=!0;return N.length===0&&(E=!1),N.length%4!=0&&(E=!1),/^[A-Za-z0-9+/]+$/.test(N.substr(0,N.length-2))===!1&&(E=!1),/^[A-Za-z0-9/][A-Za-z0-9+/]|[A-Za-z0-9+/]=|==$/.test(N.substr(-2))===!1&&(E=!1),E},ot=r.__addimage__.extractImageFromDataUrl=function(N){if(N==null||!(N=N.trim()).startsWith("data:"))return null;var E=N.indexOf(",");return E<0?null:N.substring(0,E).trim().endsWith("base64")?N.substring(E+1):null};r.__addimage__.isArrayBuffer=function(N){return N instanceof ArrayBuffer};var yt=r.__addimage__.isArrayBufferView=function(N){return N instanceof Int8Array||N instanceof Uint8Array||N instanceof Uint8ClampedArray||N instanceof Int16Array||N instanceof Uint16Array||N instanceof Int32Array||N instanceof Uint32Array||N instanceof Float32Array||N instanceof Float64Array},gt=r.__addimage__.binaryStringToUint8Array=function(N){for(var E=N.length,q=new Uint8Array(E),U=0;U<E;U++)q[U]=N.charCodeAt(U);return q},tt=r.__addimage__.arrayBufferToBinaryString=function(N){for(var E="",q=yt(N)?N:new Uint8Array(N),U=0;U<q.length;U+=8192)E+=String.fromCharCode.apply(null,q.subarray(U,U+8192));return E};r.addImage=function(){var N,E,q,U,it,ct,pt,rt,ft;if(typeof arguments[1]=="number"?(E=t,q=arguments[1],U=arguments[2],it=arguments[3],ct=arguments[4],pt=arguments[5],rt=arguments[6],ft=arguments[7]):(E=arguments[1],q=arguments[2],U=arguments[3],it=arguments[4],ct=arguments[5],pt=arguments[6],rt=arguments[7],ft=arguments[8]),Se(N=arguments[0])==="object"&&!P(N)&&"imageData"in N){var At=N;N=At.imageData,E=At.format||E||t,q=At.x||q||0,U=At.y||U||0,it=At.w||At.width||it,ct=At.h||At.height||ct,pt=At.alias||pt,rt=At.compression||rt,ft=At.rotation||At.angle||ft}var xt=this.internal.getFilters();if(rt===void 0&&xt.indexOf("FlateEncode")!==-1&&(rt="SLOW"),isNaN(q)||isNaN(U))throw new Error("Invalid coordinates passed to jsPDF.addImage");c.call(this);var x=z.call(this,N,E,pt,rt);return M.call(this,q,U,it,ct,x,ft),this};var z=function(N,E,q,U){var it,ct,pt;if(typeof N=="string"&&o(N)===t){N=unescape(N);var rt=et(N,!1);(rt!==""||(rt=r.loadFile(N,!0))!==void 0)&&(N=rt)}if(P(N)&&(N=p(N,E)),E=o(N,E),!A(E))throw new Error("addImage does not support files of type '"+E+"', please ensure that a plugin for '"+E+"' support is added.");if(((pt=q)==null||pt.length===0)&&(q=function(ft){return typeof ft=="string"||yt(ft)?Y(ft):yt(ft.data)?Y(ft.data):null}(N)),(it=B.call(this,q))||(N instanceof Uint8Array||E==="RGBA"||(ct=N,N=gt(N)),it=this["process"+E.toUpperCase()](N,m.call(this),q,function(ft){return ft&&typeof ft=="string"&&(ft=ft.toUpperCase()),ft in r.image_compression?ft:G.NONE}(U),ct)),!it)throw new Error("An unknown error occurred whilst processing the image.");return it},et=r.__addimage__.convertBase64ToBinaryString=function(N,E){E=typeof E!="boolean"||E;var q,U="";if(typeof N=="string"){var it;q=(it=ot(N))!==null&&it!==void 0?it:N;try{U=ms(q)}catch(ct){if(E)throw D(q)?new Error("atob-Error in jsPDF.convertBase64ToBinaryString "+ct.message):new Error("Supplied Data is not a valid base64-String jsPDF.convertBase64ToBinaryString ")}}return U};r.getImageProperties=function(N){var E,q,U="";if(P(N)&&(N=p(N)),typeof N=="string"&&o(N)===t&&((U=et(N,!1))===""&&(U=r.loadFile(N)||""),N=U),q=o(N),!A(q))throw new Error("addImage does not support files of type '"+q+"', please ensure that a plugin for '"+q+"' support is added.");if(N instanceof Uint8Array||(N=gt(N)),!(E=this["process"+q.toUpperCase()](N)))throw new Error("An unknown error occurred whilst processing the image");return E.fileType=q,E}})(Tt.API),function(r){var e=function(t){if(t!==void 0&&t!="")return!0};Tt.API.events.push(["addPage",function(t){this.internal.getPageInfo(t.pageNumber).pageContext.annotations=[]}]),r.events.push(["putPage",function(t){for(var i,o,s,f=this.internal.getCoordinateString,u=this.internal.getVerticalCoordinateString,c=this.internal.getPageInfoByObjId(t.objId),d=t.pageContext.annotations,m=!1,A=0;A<d.length&&!m;A++)switch((i=d[A]).type){case"link":(e(i.options.url)||e(i.options.pageNumber))&&(m=!0);break;case"reference":case"text":case"freetext":m=!0}if(m!=0){this.internal.write("/Annots [");for(var P=0;P<d.length;P++){i=d[P];var p=this.internal.pdfEscape,B=this.internal.getEncryptor(t.objId);switch(i.type){case"reference":this.internal.write(" "+i.object.objId+" 0 R ");break;case"text":var O=this.internal.newAdditionalObject(),M=this.internal.newAdditionalObject(),S=this.internal.getEncryptor(O.objId),G=i.title||"Note";s="<</Type /Annot /Subtype /Text "+(o="/Rect ["+f(i.bounds.x)+" "+u(i.bounds.y+i.bounds.h)+" "+f(i.bounds.x+i.bounds.w)+" "+u(i.bounds.y)+"] ")+"/Contents ("+p(S(i.contents))+")",s+=" /Popup "+M.objId+" 0 R",s+=" /P "+c.objId+" 0 R",s+=" /T ("+p(S(G))+") >>",O.content=s;var Y=O.objId+" 0 R";s="<</Type /Annot /Subtype /Popup "+(o="/Rect ["+f(i.bounds.x+30)+" "+u(i.bounds.y+i.bounds.h)+" "+f(i.bounds.x+i.bounds.w+30)+" "+u(i.bounds.y)+"] ")+" /Parent "+Y,i.open&&(s+=" /Open true"),s+=" >>",M.content=s,this.internal.write(O.objId,"0 R",M.objId,"0 R");break;case"freetext":o="/Rect ["+f(i.bounds.x)+" "+u(i.bounds.y)+" "+f(i.bounds.x+i.bounds.w)+" "+u(i.bounds.y+i.bounds.h)+"] ";var D=i.color||"#000000";s="<</Type /Annot /Subtype /FreeText "+o+"/Contents ("+p(B(i.contents))+")",s+=" /DS(font: Helvetica,sans-serif 12.0pt; text-align:left; color:#"+D+")",s+=" /Border [0 0 0]",s+=" >>",this.internal.write(s);break;case"link":if(i.options.name){var ot=this.annotations._nameMap[i.options.name];i.options.pageNumber=ot.page,i.options.top=ot.y}else i.options.top||(i.options.top=0);if(o="/Rect ["+i.finalBounds.x+" "+i.finalBounds.y+" "+i.finalBounds.w+" "+i.finalBounds.h+"] ",s="",i.options.url)s="<</Type /Annot /Subtype /Link "+o+"/Border [0 0 0] /A <</S /URI /URI ("+p(B(i.options.url))+") >>";else if(i.options.pageNumber)switch(s="<</Type /Annot /Subtype /Link "+o+"/Border [0 0 0] /Dest ["+this.internal.getPageInfo(i.options.pageNumber).objId+" 0 R",i.options.magFactor=i.options.magFactor||"XYZ",i.options.magFactor){case"Fit":s+=" /Fit]";break;case"FitH":s+=" /FitH "+i.options.top+"]";break;case"FitV":i.options.left=i.options.left||0,s+=" /FitV "+i.options.left+"]";break;default:var yt=u(i.options.top);i.options.left=i.options.left||0,i.options.zoom===void 0&&(i.options.zoom=0),s+=" /XYZ "+i.options.left+" "+yt+" "+i.options.zoom+"]"}s!=""&&(s+=" >>",this.internal.write(s))}}this.internal.write("]")}}]),r.createAnnotation=function(t){var i=this.internal.getCurrentPageInfo();switch(t.type){case"link":this.link(t.bounds.x,t.bounds.y,t.bounds.w,t.bounds.h,t);break;case"text":case"freetext":i.pageContext.annotations.push(t)}},r.link=function(t,i,o,s,f){var u=this.internal.getCurrentPageInfo(),c=this.internal.getCoordinateString,d=this.internal.getVerticalCoordinateString;u.pageContext.annotations.push({finalBounds:{x:c(t),y:d(i),w:c(t+o),h:d(i+s)},options:f,type:"link"})},r.textWithLink=function(t,i,o,s){var f,u,c=this.getTextWidth(t),d=this.internal.getLineHeight()/this.internal.scaleFactor;if(s.maxWidth!==void 0){u=s.maxWidth;var m=this.splitTextToSize(t,u).length;f=Math.ceil(d*m)}else u=c,f=d;return this.text(t,i,o,s),o+=.2*d,s.align==="center"&&(i-=c/2),s.align==="right"&&(i-=c),this.link(i,o-d,u,f,s),c},r.getTextWidth=function(t){var i=this.internal.getFontSize();return this.getStringUnitWidth(t)*i/this.internal.scaleFactor}}(Tt.API),function(r){var e={1569:[65152],1570:[65153,65154],1571:[65155,65156],1572:[65157,65158],1573:[65159,65160],1574:[65161,65162,65163,65164],1575:[65165,65166],1576:[65167,65168,65169,65170],1577:[65171,65172],1578:[65173,65174,65175,65176],1579:[65177,65178,65179,65180],1580:[65181,65182,65183,65184],1581:[65185,65186,65187,65188],1582:[65189,65190,65191,65192],1583:[65193,65194],1584:[65195,65196],1585:[65197,65198],1586:[65199,65200],1587:[65201,65202,65203,65204],1588:[65205,65206,65207,65208],1589:[65209,65210,65211,65212],1590:[65213,65214,65215,65216],1591:[65217,65218,65219,65220],1592:[65221,65222,65223,65224],1593:[65225,65226,65227,65228],1594:[65229,65230,65231,65232],1601:[65233,65234,65235,65236],1602:[65237,65238,65239,65240],1603:[65241,65242,65243,65244],1604:[65245,65246,65247,65248],1605:[65249,65250,65251,65252],1606:[65253,65254,65255,65256],1607:[65257,65258,65259,65260],1608:[65261,65262],1609:[65263,65264,64488,64489],1610:[65265,65266,65267,65268],1649:[64336,64337],1655:[64477],1657:[64358,64359,64360,64361],1658:[64350,64351,64352,64353],1659:[64338,64339,64340,64341],1662:[64342,64343,64344,64345],1663:[64354,64355,64356,64357],1664:[64346,64347,64348,64349],1667:[64374,64375,64376,64377],1668:[64370,64371,64372,64373],1670:[64378,64379,64380,64381],1671:[64382,64383,64384,64385],1672:[64392,64393],1676:[64388,64389],1677:[64386,64387],1678:[64390,64391],1681:[64396,64397],1688:[64394,64395],1700:[64362,64363,64364,64365],1702:[64366,64367,64368,64369],1705:[64398,64399,64400,64401],1709:[64467,64468,64469,64470],1711:[64402,64403,64404,64405],1713:[64410,64411,64412,64413],1715:[64406,64407,64408,64409],1722:[64414,64415],1723:[64416,64417,64418,64419],1726:[64426,64427,64428,64429],1728:[64420,64421],1729:[64422,64423,64424,64425],1733:[64480,64481],1734:[64473,64474],1735:[64471,64472],1736:[64475,64476],1737:[64482,64483],1739:[64478,64479],1740:[64508,64509,64510,64511],1744:[64484,64485,64486,64487],1746:[64430,64431],1747:[64432,64433]},t={65247:{65154:65269,65156:65271,65160:65273,65166:65275},65248:{65154:65270,65156:65272,65160:65274,65166:65276},65165:{65247:{65248:{65258:65010}}},1617:{1612:64606,1613:64607,1614:64608,1615:64609,1616:64610}},i={1612:64606,1613:64607,1614:64608,1615:64609,1616:64610},o=[1570,1571,1573,1575];r.__arabicParser__={};var s=r.__arabicParser__.isInArabicSubstitutionA=function(O){return e[O.charCodeAt(0)]!==void 0},f=r.__arabicParser__.isArabicLetter=function(O){return typeof O=="string"&&/^[\u0600-\u06FF\u0750-\u077F\u08A0-\u08FF\uFB50-\uFDFF\uFE70-\uFEFF]+$/.test(O)},u=r.__arabicParser__.isArabicEndLetter=function(O){return f(O)&&s(O)&&e[O.charCodeAt(0)].length<=2},c=r.__arabicParser__.isArabicAlfLetter=function(O){return f(O)&&o.indexOf(O.charCodeAt(0))>=0};r.__arabicParser__.arabicLetterHasIsolatedForm=function(O){return f(O)&&s(O)&&e[O.charCodeAt(0)].length>=1};var d=r.__arabicParser__.arabicLetterHasFinalForm=function(O){return f(O)&&s(O)&&e[O.charCodeAt(0)].length>=2};r.__arabicParser__.arabicLetterHasInitialForm=function(O){return f(O)&&s(O)&&e[O.charCodeAt(0)].length>=3};var m=r.__arabicParser__.arabicLetterHasMedialForm=function(O){return f(O)&&s(O)&&e[O.charCodeAt(0)].length==4},A=r.__arabicParser__.resolveLigatures=function(O){var M=0,S=t,G="",Y=0;for(M=0;M<O.length;M+=1)S[O.charCodeAt(M)]!==void 0?(Y++,typeof(S=S[O.charCodeAt(M)])=="number"&&(G+=String.fromCharCode(S),S=t,Y=0),M===O.length-1&&(S=t,G+=O.charAt(M-(Y-1)),M-=Y-1,Y=0)):(S=t,G+=O.charAt(M-Y),M-=Y,Y=0);return G};r.__arabicParser__.isArabicDiacritic=function(O){return O!==void 0&&i[O.charCodeAt(0)]!==void 0};var P=r.__arabicParser__.getCorrectForm=function(O,M,S){return f(O)?s(O)===!1?-1:!d(O)||!f(M)&&!f(S)||!f(S)&&u(M)||u(O)&&!f(M)||u(O)&&c(M)||u(O)&&u(M)?0:m(O)&&f(M)&&!u(M)&&f(S)&&d(S)?3:u(O)||!f(S)?1:2:-1},p=function(O){var M=0,S=0,G=0,Y="",D="",ot="",yt=(O=O||"").split("\\s+"),gt=[];for(M=0;M<yt.length;M+=1){for(gt.push(""),S=0;S<yt[M].length;S+=1)Y=yt[M][S],D=yt[M][S-1],ot=yt[M][S+1],f(Y)?(G=P(Y,D,ot),gt[M]+=G!==-1?String.fromCharCode(e[Y.charCodeAt(0)][G]):Y):gt[M]+=Y;gt[M]=A(gt[M])}return gt.join(" ")},B=r.__arabicParser__.processArabic=r.processArabic=function(){var O,M=typeof arguments[0]=="string"?arguments[0]:arguments[0].text,S=[];if(Array.isArray(M)){var G=0;for(S=[],G=0;G<M.length;G+=1)Array.isArray(M[G])?S.push([p(M[G][0]),M[G][1],M[G][2]]):S.push([p(M[G])]);O=S}else O=p(M);return typeof arguments[0]=="string"?O:(arguments[0].text=O,arguments[0])};r.events.push(["preProcessText",B])}(Tt.API),Tt.API.autoPrint=function(r){var e;return(r=r||{}).variant=r.variant||"non-conform",r.variant==="javascript"?this.addJS("print({});"):(this.internal.events.subscribe("postPutResources",function(){e=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/S /Named"),this.internal.out("/Type /Action"),this.internal.out("/N /Print"),this.internal.out(">>"),this.internal.out("endobj")}),this.internal.events.subscribe("putCatalog",function(){this.internal.out("/OpenAction "+e+" 0 R")})),this},function(r){var e=function(){var t=void 0;Object.defineProperty(this,"pdf",{get:function(){return t},set:function(u){t=u}});var i=150;Object.defineProperty(this,"width",{get:function(){return i},set:function(u){i=isNaN(u)||Number.isInteger(u)===!1||u<0?150:u,this.getContext("2d").pageWrapXEnabled&&(this.getContext("2d").pageWrapX=i+1)}});var o=300;Object.defineProperty(this,"height",{get:function(){return o},set:function(u){o=isNaN(u)||Number.isInteger(u)===!1||u<0?300:u,this.getContext("2d").pageWrapYEnabled&&(this.getContext("2d").pageWrapY=o+1)}});var s=[];Object.defineProperty(this,"childNodes",{get:function(){return s},set:function(u){s=u}});var f={};Object.defineProperty(this,"style",{get:function(){return f},set:function(u){f=u}}),Object.defineProperty(this,"parentNode",{})};e.prototype.getContext=function(t,i){var o;if((t=t||"2d")!=="2d")return null;for(o in i)this.pdf.context2d.hasOwnProperty(o)&&(this.pdf.context2d[o]=i[o]);return this.pdf.context2d._canvas=this,this.pdf.context2d},e.prototype.toDataURL=function(){throw new Error("toDataURL is not implemented.")},r.events.push(["initialized",function(){this.canvas=new e,this.canvas.pdf=this}])}(Tt.API),function(r){var e={left:0,top:0,bottom:0,right:0},t=!1,i=function(){this.internal.__cell__===void 0&&(this.internal.__cell__={},this.internal.__cell__.padding=3,this.internal.__cell__.headerFunction=void 0,this.internal.__cell__.margins=Object.assign({},e),this.internal.__cell__.margins.width=this.getPageWidth(),o.call(this))},o=function(){this.internal.__cell__.lastCell=new s,this.internal.__cell__.pages=1},s=function(){var c=arguments[0];Object.defineProperty(this,"x",{enumerable:!0,get:function(){return c},set:function(O){c=O}});var d=arguments[1];Object.defineProperty(this,"y",{enumerable:!0,get:function(){return d},set:function(O){d=O}});var m=arguments[2];Object.defineProperty(this,"width",{enumerable:!0,get:function(){return m},set:function(O){m=O}});var A=arguments[3];Object.defineProperty(this,"height",{enumerable:!0,get:function(){return A},set:function(O){A=O}});var P=arguments[4];Object.defineProperty(this,"text",{enumerable:!0,get:function(){return P},set:function(O){P=O}});var p=arguments[5];Object.defineProperty(this,"lineNumber",{enumerable:!0,get:function(){return p},set:function(O){p=O}});var B=arguments[6];return Object.defineProperty(this,"align",{enumerable:!0,get:function(){return B},set:function(O){B=O}}),this};s.prototype.clone=function(){return new s(this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align)},s.prototype.toArray=function(){return[this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align]},r.setHeaderFunction=function(c){return i.call(this),this.internal.__cell__.headerFunction=typeof c=="function"?c:void 0,this},r.getTextDimensions=function(c,d){i.call(this);var m=(d=d||{}).fontSize||this.getFontSize(),A=d.font||this.getFont(),P=d.scaleFactor||this.internal.scaleFactor,p=0,B=0,O=0,M=this;if(!Array.isArray(c)&&typeof c!="string"){if(typeof c!="number")throw new Error("getTextDimensions expects text-parameter to be of type String or type Number or an Array of Strings.");c=String(c)}var S=d.maxWidth;S>0?typeof c=="string"?c=this.splitTextToSize(c,S):Object.prototype.toString.call(c)==="[object Array]"&&(c=c.reduce(function(Y,D){return Y.concat(M.splitTextToSize(D,S))},[])):c=Array.isArray(c)?c:[c];for(var G=0;G<c.length;G++)p<(O=this.getStringUnitWidth(c[G],{font:A})*m)&&(p=O);return p!==0&&(B=c.length),{w:p/=P,h:Math.max((B*m*this.getLineHeightFactor()-m*(this.getLineHeightFactor()-1))/P,0)}},r.cellAddPage=function(){i.call(this),this.addPage();var c=this.internal.__cell__.margins||e;return this.internal.__cell__.lastCell=new s(c.left,c.top,void 0,void 0),this.internal.__cell__.pages+=1,this};var f=r.cell=function(){var c;c=arguments[0]instanceof s?arguments[0]:new s(arguments[0],arguments[1],arguments[2],arguments[3],arguments[4],arguments[5],arguments[6]),i.call(this);var d=this.internal.__cell__.lastCell,m=this.internal.__cell__.padding,A=this.internal.__cell__.margins||e,P=this.internal.__cell__.tableHeaderRow,p=this.internal.__cell__.printHeaders;return d.lineNumber!==void 0&&(d.lineNumber===c.lineNumber?(c.x=(d.x||0)+(d.width||0),c.y=d.y||0):d.y+d.height+c.height+A.bottom>this.getPageHeight()?(this.cellAddPage(),c.y=A.top,p&&P&&(this.printHeaderRow(c.lineNumber,!0),c.y+=P[0].height)):c.y=d.y+d.height||c.y),c.text[0]!==void 0&&(this.rect(c.x,c.y,c.width,c.height,t===!0?"FD":void 0),c.align==="right"?this.text(c.text,c.x+c.width-m,c.y+m,{align:"right",baseline:"top"}):c.align==="center"?this.text(c.text,c.x+c.width/2,c.y+m,{align:"center",baseline:"top",maxWidth:c.width-m-m}):this.text(c.text,c.x+m,c.y+m,{align:"left",baseline:"top",maxWidth:c.width-m-m})),this.internal.__cell__.lastCell=c,this};r.table=function(c,d,m,A,P){if(i.call(this),!m)throw new Error("No data for PDF table.");var p,B,O,M,S=[],G=[],Y=[],D={},ot={},yt=[],gt=[],tt=(P=P||{}).autoSize||!1,z=P.printHeaders!==!1,et=P.css&&P.css["font-size"]!==void 0?16*P.css["font-size"]:P.fontSize||12,N=P.margins||Object.assign({width:this.getPageWidth()},e),E=typeof P.padding=="number"?P.padding:3,q=P.headerBackgroundColor||"#c8c8c8",U=P.headerTextColor||"#000";if(o.call(this),this.internal.__cell__.printHeaders=z,this.internal.__cell__.margins=N,this.internal.__cell__.table_font_size=et,this.internal.__cell__.padding=E,this.internal.__cell__.headerBackgroundColor=q,this.internal.__cell__.headerTextColor=U,this.setFontSize(et),A==null)G=S=Object.keys(m[0]),Y=S.map(function(){return"left"});else if(Array.isArray(A)&&Se(A[0])==="object")for(S=A.map(function(At){return At.name}),G=A.map(function(At){return At.prompt||At.name||""}),Y=A.map(function(At){return At.align||"left"}),p=0;p<A.length;p+=1)ot[A[p].name]=.7499990551181103*A[p].width;else Array.isArray(A)&&typeof A[0]=="string"&&(G=S=A,Y=S.map(function(){return"left"}));if(tt||Array.isArray(A)&&typeof A[0]=="string")for(p=0;p<S.length;p+=1){for(D[M=S[p]]=m.map(function(At){return At[M]}),this.setFont(void 0,"bold"),yt.push(this.getTextDimensions(G[p],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w),B=D[M],this.setFont(void 0,"normal"),O=0;O<B.length;O+=1)yt.push(this.getTextDimensions(B[O],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w);ot[M]=Math.max.apply(null,yt)+E+E,yt=[]}if(z){var it={};for(p=0;p<S.length;p+=1)it[S[p]]={},it[S[p]].text=G[p],it[S[p]].align=Y[p];var ct=u.call(this,it,ot);gt=S.map(function(At){return new s(c,d,ot[At],ct,it[At].text,void 0,it[At].align)}),this.setTableHeaderRow(gt),this.printHeaderRow(1,!1)}var pt=A.reduce(function(At,xt){return At[xt.name]=xt.align,At},{});for(p=0;p<m.length;p+=1){"rowStart"in P&&P.rowStart instanceof Function&&P.rowStart({row:p,data:m[p]},this);var rt=u.call(this,m[p],ot);for(O=0;O<S.length;O+=1){var ft=m[p][S[O]];"cellStart"in P&&P.cellStart instanceof Function&&P.cellStart({row:p,col:O,data:ft},this),f.call(this,new s(c,d,ot[S[O]],rt,ft,p+2,pt[S[O]]))}}return this.internal.__cell__.table_x=c,this.internal.__cell__.table_y=d,this};var u=function(c,d){var m=this.internal.__cell__.padding,A=this.internal.__cell__.table_font_size,P=this.internal.scaleFactor;return Object.keys(c).map(function(p){var B=c[p];return this.splitTextToSize(B.hasOwnProperty("text")?B.text:B,d[p]-m-m)},this).map(function(p){return this.getLineHeightFactor()*p.length*A/P+m+m},this).reduce(function(p,B){return Math.max(p,B)},0)};r.setTableHeaderRow=function(c){i.call(this),this.internal.__cell__.tableHeaderRow=c},r.printHeaderRow=function(c,d){if(i.call(this),!this.internal.__cell__.tableHeaderRow)throw new Error("Property tableHeaderRow does not exist.");var m;if(t=!0,typeof this.internal.__cell__.headerFunction=="function"){var A=this.internal.__cell__.headerFunction(this,this.internal.__cell__.pages);this.internal.__cell__.lastCell=new s(A[0],A[1],A[2],A[3],void 0,-1)}this.setFont(void 0,"bold");for(var P=[],p=0;p<this.internal.__cell__.tableHeaderRow.length;p+=1){m=this.internal.__cell__.tableHeaderRow[p].clone(),d&&(m.y=this.internal.__cell__.margins.top||0,P.push(m)),m.lineNumber=c;var B=this.getTextColor();this.setTextColor(this.internal.__cell__.headerTextColor),this.setFillColor(this.internal.__cell__.headerBackgroundColor),f.call(this,m),this.setTextColor(B)}P.length>0&&this.setTableHeaderRow(P),this.setFont(void 0,"normal"),t=!1}}(Tt.API);var oh={italic:["italic","oblique","normal"],oblique:["oblique","italic","normal"],normal:["normal","oblique","italic"]},lh=["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded"],Oo=sh(lh),uh=[100,200,300,400,500,600,700,800,900],o1=sh(uh);function _o(r){var e=r.family.replace(/"|'/g,"").toLowerCase(),t=function(s){return oh[s=s||"normal"]?s:"normal"}(r.style),i=function(s){return s?typeof s=="number"?s>=100&&s<=900&&s%100==0?s:400:/^\d00$/.test(s)?parseInt(s):s==="bold"?700:400:400}(r.weight),o=function(s){return typeof Oo[s=s||"normal"]=="number"?s:"normal"}(r.stretch);return{family:e,style:t,weight:i,stretch:o,src:r.src||[],ref:r.ref||{name:e,style:[o,t,i].join(" ")}}}function cu(r,e,t,i){var o;for(o=t;o>=0&&o<e.length;o+=i)if(r[e[o]])return r[e[o]];for(o=t;o>=0&&o<e.length;o-=i)if(r[e[o]])return r[e[o]]}var l1={"sans-serif":"helvetica",fixed:"courier",monospace:"courier",terminal:"courier",cursive:"times",fantasy:"times",serif:"times"},fu={caption:"times",icon:"times",menu:"times","message-box":"times","small-caption":"times","status-bar":"times"};function du(r){return[r.stretch,r.style,r.weight,r.family].join(" ")}function pu(r){return r.trimLeft()}function u1(r,e){for(var t=0;t<r.length;){if(r.charAt(t)===e)return[r.substring(0,t),r.substring(t+1)];t+=1}return null}function h1(r){var e=r.match(/^(-[a-z_]|[a-z_])[a-z0-9_-]*/i);return e===null?null:[e[0],r.substring(e[0].length)]}var ds,gu,mu,Ri,ps,bu,vu,wu,Ao=["times"];function yu(r,e,t,i,o){var s=4,f=_u;switch(o){case Tt.API.image_compression.FAST:s=1,f=xu;break;case Tt.API.image_compression.MEDIUM:s=6,f=Au;break;case Tt.API.image_compression.SLOW:s=9,f=Nu}r=function(c,d,m,A){for(var P,p=c.length/d,B=new Uint8Array(c.length+p),O=[c1,xu,_u,Au,Nu],M=0;M<p;M+=1){var S=M*d,G=c.subarray(S,S+d);if(A)B.set(A(G,m,P),S+M);else{for(var Y=O.length,D=[],ot=0;ot<Y;ot+=1)D[ot]=O[ot](G,m,P);var yt=d1(D.concat());B.set(D[yt],S+M)}P=G}return B}(r,e,Math.ceil(t*i/8),f);var u=So(r,{level:s});return Tt.API.__addimage__.arrayBufferToBinaryString(u)}function c1(r){var e=Array.apply([],r);return e.unshift(0),e}function xu(r,e){var t=r.length,i=[];i[0]=1;for(var o=0;o<t;o+=1){var s=r[o-e]||0;i[o+1]=r[o]-s+256&255}return i}function _u(r,e,t){var i=r.length,o=[];o[0]=2;for(var s=0;s<i;s+=1){var f=t&&t[s]||0;o[s+1]=r[s]-f+256&255}return o}function Au(r,e,t){var i=r.length,o=[];o[0]=3;for(var s=0;s<i;s+=1){var f=r[s-e]||0,u=t&&t[s]||0;o[s+1]=r[s]+256-(f+u>>>1)&255}return o}function Nu(r,e,t){var i=r.length,o=[];o[0]=4;for(var s=0;s<i;s+=1){var f=f1(r[s-e]||0,t&&t[s]||0,t&&t[s-e]||0);o[s+1]=r[s]-f+256&255}return o}function f1(r,e,t){if(r===e&&e===t)return r;var i=Math.abs(e-t),o=Math.abs(r-t),s=Math.abs(r+e-t-t);return i<=o&&i<=s?r:o<=s?e:t}function d1(r){var e=r.map(function(t){return t.reduce(function(i,o){return i+Math.abs(o)},0)});return e.indexOf(Math.min.apply(null,e))}function No(r,e,t){var i=e*t,o=Math.floor(i/8),s=16-(i-8*o+t),f=(1<<t)-1;return hh(r,o)>>s&f}function Lu(r,e,t,i){var o=t*i,s=Math.floor(o/8),f=16-(o-8*s+i),u=(1<<i)-1,c=(e&u)<<f;(function(d,m,A){if(m+1<d.byteLength)d.setUint16(m,A,!1);else{var P=A>>8&255;d.setUint8(m,P)}})(r,s,hh(r,s)&~(u<<f)&65535|c)}function hh(r,e){return e+1<r.byteLength?r.getUint16(e,!1):r.getUint8(e)<<8}function p1(r){var e=0;if(r[e++]!==71||r[e++]!==73||r[e++]!==70||r[e++]!==56||(r[e++]+1&253)!=56||r[e++]!==97)throw new Error("Invalid GIF 87a/89a header.");var t=r[e++]|r[e++]<<8,i=r[e++]|r[e++]<<8,o=r[e++],s=o>>7,f=1<<1+(7&o);r[e++],r[e++];var u=null,c=null;s&&(u=e,c=f,e+=3*f);var d=!0,m=[],A=0,P=null,p=0,B=null;for(this.width=t,this.height=i;d&&e<r.length;)switch(r[e++]){case 33:switch(r[e++]){case 255:if(r[e]!==11||r[e+1]==78&&r[e+2]==69&&r[e+3]==84&&r[e+4]==83&&r[e+5]==67&&r[e+6]==65&&r[e+7]==80&&r[e+8]==69&&r[e+9]==50&&r[e+10]==46&&r[e+11]==48&&r[e+12]==3&&r[e+13]==1&&r[e+16]==0)e+=14,B=r[e++]|r[e++]<<8,e++;else for(e+=12;;){if(!((N=r[e++])>=0))throw Error("Invalid block size");if(N===0)break;e+=N}break;case 249:if(r[e++]!==4||r[e+4]!==0)throw new Error("Invalid graphics extension block.");var O=r[e++];A=r[e++]|r[e++]<<8,P=r[e++],1&O||(P=null),p=O>>2&7,e++;break;case 254:for(;;){if(!((N=r[e++])>=0))throw Error("Invalid block size");if(N===0)break;e+=N}break;default:throw new Error("Unknown graphic control label: 0x"+r[e-1].toString(16))}break;case 44:var M=r[e++]|r[e++]<<8,S=r[e++]|r[e++]<<8,G=r[e++]|r[e++]<<8,Y=r[e++]|r[e++]<<8,D=r[e++],ot=D>>6&1,yt=1<<1+(7&D),gt=u,tt=c,z=!1;D>>7&&(z=!0,gt=e,tt=yt,e+=3*yt);var et=e;for(e++;;){var N;if(!((N=r[e++])>=0))throw Error("Invalid block size");if(N===0)break;e+=N}m.push({x:M,y:S,width:G,height:Y,has_local_palette:z,palette_offset:gt,palette_size:tt,data_offset:et,data_length:e-et,transparent_index:P,interlaced:!!ot,delay:A,disposal:p});break;case 59:d=!1;break;default:throw new Error("Unknown gif block: 0x"+r[e-1].toString(16))}this.numFrames=function(){return m.length},this.loopCount=function(){return B},this.frameInfo=function(E){if(E<0||E>=m.length)throw new Error("Frame index out of range.");return m[E]},this.decodeAndBlitFrameBGRA=function(E,q){var U=this.frameInfo(E),it=U.width*U.height,ct=new Uint8Array(it);Su(r,U.data_offset,ct,it);var pt=U.palette_offset,rt=U.transparent_index;rt===null&&(rt=256);var ft=U.width,At=t-ft,xt=ft,x=4*(U.y*t+U.x),j=4*((U.y+U.height)*t+U.x),R=x,V=4*At;U.interlaced===!0&&(V+=4*t*7);for(var J=8,Q=0,nt=ct.length;Q<nt;++Q){var at=ct[Q];if(xt===0&&(xt=ft,(R+=V)>=j&&(V=4*At+4*t*(J-1),R=x+(ft+At)*(J<<1),J>>=1)),at===rt)R+=4;else{var dt=r[pt+3*at],_t=r[pt+3*at+1],St=r[pt+3*at+2];q[R++]=St,q[R++]=_t,q[R++]=dt,q[R++]=255}--xt}},this.decodeAndBlitFrameRGBA=function(E,q){var U=this.frameInfo(E),it=U.width*U.height,ct=new Uint8Array(it);Su(r,U.data_offset,ct,it);var pt=U.palette_offset,rt=U.transparent_index;rt===null&&(rt=256);var ft=U.width,At=t-ft,xt=ft,x=4*(U.y*t+U.x),j=4*((U.y+U.height)*t+U.x),R=x,V=4*At;U.interlaced===!0&&(V+=4*t*7);for(var J=8,Q=0,nt=ct.length;Q<nt;++Q){var at=ct[Q];if(xt===0&&(xt=ft,(R+=V)>=j&&(V=4*At+4*t*(J-1),R=x+(ft+At)*(J<<1),J>>=1)),at===rt)R+=4;else{var dt=r[pt+3*at],_t=r[pt+3*at+1],St=r[pt+3*at+2];q[R++]=dt,q[R++]=_t,q[R++]=St,q[R++]=255}--xt}}}function Su(r,e,t,i){for(var o=r[e++],s=1<<o,f=s+1,u=f+1,c=o+1,d=(1<<c)-1,m=0,A=0,P=0,p=r[e++],B=new Int32Array(4096),O=null;;){for(;m<16&&p!==0;)A|=r[e++]<<m,m+=8,p===1?p=r[e++]:--p;if(m<c)break;var M=A&d;if(A>>=c,m-=c,M!==s){if(M===f)break;for(var S=M<u?M:O,G=0,Y=S;Y>s;)Y=B[Y]>>8,++G;var D=Y;if(P+G+(S!==M?1:0)>i)return void Le.log("Warning, gif stream longer than expected.");t[P++]=D;var ot=P+=G;for(S!==M&&(t[P++]=D),Y=S;G--;)Y=B[Y],t[--ot]=255&Y,Y>>=8;O!==null&&u<4096&&(B[u++]=O<<8|D,u>=d+1&&c<12&&(++c,d=d<<1|1)),O=M}else u=f+1,d=(1<<(c=o+1))-1,O=null}return P!==i&&Le.log("Warning, gif stream shorter than expected."),t}/**
|
||
* @license
|
||
Copyright (c) 2008, Adobe Systems Incorporated
|
||
All rights reserved.
|
||
|
||
Redistribution and use in source and binary forms, with or without
|
||
modification, are permitted provided that the following conditions are
|
||
met:
|
||
|
||
* Redistributions of source code must retain the above copyright notice,
|
||
this list of conditions and the following disclaimer.
|
||
|
||
* Redistributions in binary form must reproduce the above copyright
|
||
notice, this list of conditions and the following disclaimer in the
|
||
documentation and/or other materials provided with the distribution.
|
||
|
||
* Neither the name of Adobe Systems Incorporated nor the names of its
|
||
contributors may be used to endorse or promote products derived from
|
||
this software without specific prior written permission.
|
||
|
||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
|
||
IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||
*/function Lo(r){var e,t,i,o,s,f=Math.floor,u=new Array(64),c=new Array(64),d=new Array(64),m=new Array(64),A=new Array(65535),P=new Array(65535),p=new Array(64),B=new Array(64),O=[],M=0,S=7,G=new Array(64),Y=new Array(64),D=new Array(64),ot=new Array(256),yt=new Array(2048),gt=[0,1,5,6,14,15,27,28,2,4,7,13,16,26,29,42,3,8,12,17,25,30,41,43,9,11,18,24,31,40,44,53,10,19,23,32,39,45,52,54,20,22,33,38,46,51,55,60,21,34,37,47,50,56,59,61,35,36,48,49,57,58,62,63],tt=[0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0],z=[0,1,2,3,4,5,6,7,8,9,10,11],et=[0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,125],N=[1,2,3,0,4,17,5,18,33,49,65,6,19,81,97,7,34,113,20,50,129,145,161,8,35,66,177,193,21,82,209,240,36,51,98,114,130,9,10,22,23,24,25,26,37,38,39,40,41,42,52,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,225,226,227,228,229,230,231,232,233,234,241,242,243,244,245,246,247,248,249,250],E=[0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0],q=[0,1,2,3,4,5,6,7,8,9,10,11],U=[0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,119],it=[0,1,2,3,17,4,5,33,49,6,18,65,81,7,97,113,19,34,50,129,8,20,66,145,161,177,193,9,35,51,82,240,21,98,114,209,10,22,36,52,225,37,241,23,24,25,26,38,39,40,41,42,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,130,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,226,227,228,229,230,231,232,233,234,242,243,244,245,246,247,248,249,250];function ct(x,j){for(var R=0,V=0,J=new Array,Q=1;Q<=16;Q++){for(var nt=1;nt<=x[Q];nt++)J[j[V]]=[],J[j[V]][0]=R,J[j[V]][1]=Q,V++,R++;R*=2}return J}function pt(x){for(var j=x[0],R=x[1]-1;R>=0;)j&1<<R&&(M|=1<<S),R--,--S<0&&(M==255?(rt(255),rt(0)):rt(M),S=7,M=0)}function rt(x){O.push(x)}function ft(x){rt(x>>8&255),rt(255&x)}function At(x,j,R,V,J){for(var Q,nt=J[0],at=J[240],dt=function(vt,Wt){var It,Ut,Dt,be,ue,Zt,ce,he,jt,ee,Rt=0;for(jt=0;jt<8;++jt){It=vt[Rt],Ut=vt[Rt+1],Dt=vt[Rt+2],be=vt[Rt+3],ue=vt[Rt+4],Zt=vt[Rt+5],ce=vt[Rt+6];var De=It+(he=vt[Rt+7]),pe=It-he,se=Ut+ce,oe=Ut-ce,Fe=Dt+Zt,qt=Dt-Zt,ke=be+ue,Yt=be-ue,Qt=De+ke,Ee=De-ke,le=se+Fe,Vt=se-Fe;vt[Rt]=Qt+le,vt[Rt+4]=Qt-le;var ve=.707106781*(Vt+Ee);vt[Rt+2]=Ee+ve,vt[Rt+6]=Ee-ve;var Zn=.382683433*((Qt=Yt+qt)-(Vt=oe+pe)),hr=.5411961*Qt+Zn,dn=1.306562965*Vt+Zn,Qr=.707106781*(le=qt+oe),Gt=pe+Qr,pn=pe-Qr;vt[Rt+5]=pn+hr,vt[Rt+3]=pn-hr,vt[Rt+1]=Gt+dn,vt[Rt+7]=Gt-dn,Rt+=8}for(Rt=0,jt=0;jt<8;++jt){It=vt[Rt],Ut=vt[Rt+8],Dt=vt[Rt+16],be=vt[Rt+24],ue=vt[Rt+32],Zt=vt[Rt+40],ce=vt[Rt+48];var gn=It+(he=vt[Rt+56]),Er=It-he,Or=Ut+ce,Be=Ut-ce,rr=Dt+Zt,ir=Dt-Zt,Qn=be+ue,On=be-ue,zr=gn+Qn,tn=gn-Qn,Hr=Or+rr,Wr=Or-rr;vt[Rt]=zr+Hr,vt[Rt+32]=zr-Hr;var jr=.707106781*(Wr+tn);vt[Rt+16]=tn+jr,vt[Rt+48]=tn-jr;var ti=.382683433*((zr=On+ir)-(Wr=Be+Er)),en=.5411961*zr+ti,ei=1.306562965*Wr+ti,_i=.707106781*(Hr=ir+Be),Ai=Er+_i,Ni=Er-_i;vt[Rt+40]=Ni+en,vt[Rt+24]=Ni-en,vt[Rt+8]=Ai+ei,vt[Rt+56]=Ai-ei,Rt++}for(jt=0;jt<64;++jt)ee=vt[jt]*Wt[jt],p[jt]=ee>0?ee+.5|0:ee-.5|0;return p}(x,j),_t=0;_t<64;++_t)B[gt[_t]]=dt[_t];var St=B[0]-R;R=B[0],St==0?pt(V[0]):(pt(V[P[Q=32767+St]]),pt(A[Q]));for(var kt=63;kt>0&&B[kt]==0;)kt--;if(kt==0)return pt(nt),R;for(var zt,k=1;k<=kt;){for(var Lt=k;B[k]==0&&k<=kt;)++k;var ae=k-Lt;if(ae>=16){zt=ae>>4;for(var Ht=1;Ht<=zt;++Ht)pt(at);ae&=15}Q=32767+B[k],pt(J[(ae<<4)+P[Q]]),pt(A[Q]),k++}return kt!=63&&pt(nt),R}function xt(x){x=Math.min(Math.max(x,1),100),s!=x&&(function(j){for(var R=[16,11,10,16,24,40,51,61,12,12,14,19,26,58,60,55,14,13,16,24,40,57,69,56,14,17,22,29,51,87,80,62,18,22,37,56,68,109,103,77,24,35,55,64,81,104,113,92,49,64,78,87,103,121,120,101,72,92,95,98,112,100,103,99],V=0;V<64;V++){var J=f((R[V]*j+50)/100);J=Math.min(Math.max(J,1),255),u[gt[V]]=J}for(var Q=[17,18,24,47,99,99,99,99,18,21,26,66,99,99,99,99,24,26,56,99,99,99,99,99,47,66,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99],nt=0;nt<64;nt++){var at=f((Q[nt]*j+50)/100);at=Math.min(Math.max(at,1),255),c[gt[nt]]=at}for(var dt=[1,1.387039845,1.306562965,1.175875602,1,.785694958,.5411961,.275899379],_t=0,St=0;St<8;St++)for(var kt=0;kt<8;kt++)d[_t]=1/(u[gt[_t]]*dt[St]*dt[kt]*8),m[_t]=1/(c[gt[_t]]*dt[St]*dt[kt]*8),_t++}(x<50?Math.floor(5e3/x):Math.floor(200-2*x)),s=x)}this.encode=function(x,j){j&&xt(j),O=new Array,M=0,S=7,ft(65496),ft(65504),ft(16),rt(74),rt(70),rt(73),rt(70),rt(0),rt(1),rt(1),rt(0),ft(1),ft(1),rt(0),rt(0),function(){ft(65499),ft(132),rt(0);for(var Ut=0;Ut<64;Ut++)rt(u[Ut]);rt(1);for(var Dt=0;Dt<64;Dt++)rt(c[Dt])}(),function(Ut,Dt){ft(65472),ft(17),rt(8),ft(Dt),ft(Ut),rt(3),rt(1),rt(17),rt(0),rt(2),rt(17),rt(1),rt(3),rt(17),rt(1)}(x.width,x.height),function(){ft(65476),ft(418),rt(0);for(var Ut=0;Ut<16;Ut++)rt(tt[Ut+1]);for(var Dt=0;Dt<=11;Dt++)rt(z[Dt]);rt(16);for(var be=0;be<16;be++)rt(et[be+1]);for(var ue=0;ue<=161;ue++)rt(N[ue]);rt(1);for(var Zt=0;Zt<16;Zt++)rt(E[Zt+1]);for(var ce=0;ce<=11;ce++)rt(q[ce]);rt(17);for(var he=0;he<16;he++)rt(U[he+1]);for(var jt=0;jt<=161;jt++)rt(it[jt])}(),ft(65498),ft(12),rt(3),rt(1),rt(0),rt(2),rt(17),rt(3),rt(17),rt(0),rt(63),rt(0);var R=0,V=0,J=0;M=0,S=7,this.encode.displayName="_encode_";for(var Q,nt,at,dt,_t,St,kt,zt,k,Lt=x.data,ae=x.width,Ht=x.height,vt=4*ae,Wt=0;Wt<Ht;){for(Q=0;Q<vt;){for(_t=vt*Wt+Q,kt=-1,zt=0,k=0;k<64;k++)St=_t+(zt=k>>3)*vt+(kt=4*(7&k)),Wt+zt>=Ht&&(St-=vt*(Wt+1+zt-Ht)),Q+kt>=vt&&(St-=Q+kt-vt+4),nt=Lt[St++],at=Lt[St++],dt=Lt[St++],G[k]=(yt[nt]+yt[at+256|0]+yt[dt+512|0]>>16)-128,Y[k]=(yt[nt+768|0]+yt[at+1024|0]+yt[dt+1280|0]>>16)-128,D[k]=(yt[nt+1280|0]+yt[at+1536|0]+yt[dt+1792|0]>>16)-128;R=At(G,d,R,e,i),V=At(Y,m,V,t,o),J=At(D,m,J,t,o),Q+=32}Wt+=8}if(S>=0){var It=[];It[1]=S+1,It[0]=(1<<S+1)-1,pt(It)}return ft(65497),new Uint8Array(O)},r=r||50,function(){for(var x=String.fromCharCode,j=0;j<256;j++)ot[j]=x(j)}(),e=ct(tt,z),t=ct(E,q),i=ct(et,N),o=ct(U,it),function(){for(var x=1,j=2,R=1;R<=15;R++){for(var V=x;V<j;V++)P[32767+V]=R,A[32767+V]=[],A[32767+V][1]=R,A[32767+V][0]=V;for(var J=-(j-1);J<=-x;J++)P[32767+J]=R,A[32767+J]=[],A[32767+J][1]=R,A[32767+J][0]=j-1+J;x<<=1,j<<=1}}(),function(){for(var x=0;x<256;x++)yt[x]=19595*x,yt[x+256|0]=38470*x,yt[x+512|0]=7471*x+32768,yt[x+768|0]=-11059*x,yt[x+1024|0]=-21709*x,yt[x+1280|0]=32768*x+8421375,yt[x+1536|0]=-27439*x,yt[x+1792|0]=-5329*x}(),xt(r)}/**
|
||
* @license
|
||
* Copyright (c) 2017 Aras Abbasi
|
||
*
|
||
* Licensed under the MIT License.
|
||
* http://opensource.org/licenses/mit-license
|
||
*/function Kr(r,e){if(this.pos=0,this.buffer=r,this.datav=new DataView(r.buffer),this.is_with_alpha=!!e,this.bottom_up=!0,this.flag=String.fromCharCode(this.buffer[0])+String.fromCharCode(this.buffer[1]),this.pos+=2,["BM","BA","CI","CP","IC","PT"].indexOf(this.flag)===-1)throw new Error("Invalid BMP File");this.parseHeader(),this.parseBGR()}function ku(r){function e(z){if(!z)throw Error("assert :P")}function t(z,et,N){for(var E=0;4>E;E++)if(z[et+E]!=N.charCodeAt(E))return!0;return!1}function i(z,et,N,E,q){for(var U=0;U<q;U++)z[et+U]=N[E+U]}function o(z,et,N,E){for(var q=0;q<E;q++)z[et+q]=N}function s(z){return new Int32Array(z)}function f(z,et){for(var N=[],E=0;E<z;E++)N.push(new et);return N}function u(z,et){var N=[];return function E(q,U,it){for(var ct=it[U],pt=0;pt<ct&&(q.push(it.length>U+1?[]:new et),!(it.length<U+1));pt++)E(q[pt],U+1,it)}(N,0,z),N}var c=function(){var z=this;function et(n,a){for(var h=1<<a-1>>>0;n&h;)h>>>=1;return h?(n&h-1)+h:n}function N(n,a,h,g,v){e(!(g%h));do n[a+(g-=h)]=v;while(0<g)}function E(n,a,h,g,v){if(e(2328>=v),512>=v)var w=s(512);else if((w=s(v))==null)return 0;return function(y,_,L,I,H,Z){var C,W,K=_,st=1<<L,X=s(16),lt=s(16);for(e(H!=0),e(I!=null),e(y!=null),e(0<L),W=0;W<H;++W){if(15<I[W])return 0;++X[I[W]]}if(X[0]==H)return 0;for(lt[1]=0,C=1;15>C;++C){if(X[C]>1<<C)return 0;lt[C+1]=lt[C]+X[C]}for(W=0;W<H;++W)C=I[W],0<I[W]&&(Z[lt[C]++]=W);if(lt[15]==1)return(I=new q).g=0,I.value=Z[0],N(y,K,1,st,I),st;var ht,wt=-1,bt=st-1,Mt=0,Pt=1,ne=1,Et=1<<L;for(W=0,C=1,H=2;C<=L;++C,H<<=1){if(Pt+=ne<<=1,0>(ne-=X[C]))return 0;for(;0<X[C];--X[C])(I=new q).g=C,I.value=Z[W++],N(y,K+Mt,H,Et,I),Mt=et(Mt,C)}for(C=L+1,H=2;15>=C;++C,H<<=1){if(Pt+=ne<<=1,0>(ne-=X[C]))return 0;for(;0<X[C];--X[C]){if(I=new q,(Mt&bt)!=wt){for(K+=Et,ht=1<<(wt=C)-L;15>wt&&!(0>=(ht-=X[wt]));)++wt,ht<<=1;st+=Et=1<<(ht=wt-L),y[_+(wt=Mt&bt)].g=ht+L,y[_+wt].value=K-_-wt}I.g=C-L,I.value=Z[W++],N(y,K+(Mt>>L),H,Et,I),Mt=et(Mt,C)}}return Pt!=2*lt[15]-1?0:st}(n,a,h,g,v,w)}function q(){this.value=this.g=0}function U(){this.value=this.g=0}function it(){this.G=f(5,q),this.H=s(5),this.jc=this.Qb=this.qb=this.nd=0,this.pd=f(fi,U)}function ct(n,a,h,g){e(n!=null),e(a!=null),e(2147483648>g),n.Ca=254,n.I=0,n.b=-8,n.Ka=0,n.oa=a,n.pa=h,n.Jd=a,n.Yc=h+g,n.Zc=4<=g?h+g-4+1:h,nt(n)}function pt(n,a){for(var h=0;0<a--;)h|=dt(n,128)<<a;return h}function rt(n,a){var h=pt(n,a);return at(n)?-h:h}function ft(n,a,h,g){var v,w=0;for(e(n!=null),e(a!=null),e(4294967288>g),n.Sb=g,n.Ra=0,n.u=0,n.h=0,4<g&&(g=4),v=0;v<g;++v)w+=a[h+v]<<8*v;n.Ra=w,n.bb=g,n.oa=a,n.pa=h}function At(n){for(;8<=n.u&&n.bb<n.Sb;)n.Ra>>>=8,n.Ra+=n.oa[n.pa+n.bb]<<Rn-8>>>0,++n.bb,n.u-=8;V(n)&&(n.h=1,n.u=0)}function xt(n,a){if(e(0<=a),!n.h&&a<=Nr){var h=R(n)&Ar[a];return n.u+=a,At(n),h}return n.h=1,n.u=0}function x(){this.b=this.Ca=this.I=0,this.oa=[],this.pa=0,this.Jd=[],this.Yc=0,this.Zc=[],this.Ka=0}function j(){this.Ra=0,this.oa=[],this.h=this.u=this.bb=this.Sb=this.pa=0}function R(n){return n.Ra>>>(n.u&Rn-1)>>>0}function V(n){return e(n.bb<=n.Sb),n.h||n.bb==n.Sb&&n.u>Rn}function J(n,a){n.u=a,n.h=V(n)}function Q(n){n.u>=Sn&&(e(n.u>=Sn),At(n))}function nt(n){e(n!=null&&n.oa!=null),n.pa<n.Zc?(n.I=(n.oa[n.pa++]|n.I<<8)>>>0,n.b+=8):(e(n!=null&&n.oa!=null),n.pa<n.Yc?(n.b+=8,n.I=n.oa[n.pa++]|n.I<<8):n.Ka?n.b=0:(n.I<<=8,n.b+=8,n.Ka=1))}function at(n){return pt(n,1)}function dt(n,a){var h=n.Ca;0>n.b&&nt(n);var g=n.b,v=h*a>>>8,w=(n.I>>>g>v)+0;for(w?(h-=v,n.I-=v+1<<g>>>0):h=v+1,g=h,v=0;256<=g;)v+=8,g>>=8;return g=7^v+Tn[g],n.b-=g,n.Ca=(h<<g)-1,w}function _t(n,a,h){n[a+0]=h>>24&255,n[a+1]=h>>16&255,n[a+2]=h>>8&255,n[a+3]=255&h}function St(n,a){return n[a+0]|n[a+1]<<8}function kt(n,a){return St(n,a)|n[a+2]<<16}function zt(n,a){return St(n,a)|St(n,a+2)<<16}function k(n,a){var h=1<<a;return e(n!=null),e(0<a),n.X=s(h),n.X==null?0:(n.Mb=32-a,n.Xa=a,1)}function Lt(n,a){e(n!=null),e(a!=null),e(n.Xa==a.Xa),i(a.X,0,n.X,0,1<<a.Xa)}function ae(){this.X=[],this.Xa=this.Mb=0}function Ht(n,a,h,g){e(h!=null),e(g!=null);var v=h[0],w=g[0];return v==0&&(v=(n*w+a/2)/a),w==0&&(w=(a*v+n/2)/n),0>=v||0>=w?0:(h[0]=v,g[0]=w,1)}function vt(n,a){return n+(1<<a)-1>>>a}function Wt(n,a){return((4278255360&n)+(4278255360&a)>>>0&4278255360)+((16711935&n)+(16711935&a)>>>0&16711935)>>>0}function It(n,a){z[a]=function(h,g,v,w,y,_,L){var I;for(I=0;I<y;++I){var H=z[n](_[L+I-1],v,w+I);_[L+I]=Wt(h[g+I],H)}}}function Ut(){this.ud=this.hd=this.jd=0}function Dt(n,a){return((4278124286&(n^a))>>>1)+(n&a)>>>0}function be(n){return 0<=n&&256>n?n:0>n?0:255<n?255:void 0}function ue(n,a){return be(n+(n-a+.5>>1))}function Zt(n,a,h){return Math.abs(a-h)-Math.abs(n-h)}function ce(n,a,h,g,v,w,y){for(g=w[y-1],h=0;h<v;++h)w[y+h]=g=Wt(n[a+h],g)}function he(n,a,h,g,v){var w;for(w=0;w<h;++w){var y=n[a+w],_=y>>8&255,L=16711935&(L=(L=16711935&y)+((_<<16)+_));g[v+w]=(4278255360&y)+L>>>0}}function jt(n,a){a.jd=255&n,a.hd=n>>8&255,a.ud=n>>16&255}function ee(n,a,h,g,v,w){var y;for(y=0;y<g;++y){var _=a[h+y],L=_>>>8,I=_,H=255&(H=(H=_>>>16)+((n.jd<<24>>24)*(L<<24>>24)>>>5));I=255&(I=(I+=(n.hd<<24>>24)*(L<<24>>24)>>>5)+((n.ud<<24>>24)*(H<<24>>24)>>>5)),v[w+y]=(4278255360&_)+(H<<16)+I}}function Rt(n,a,h,g,v){z[a]=function(w,y,_,L,I,H,Z,C,W){for(L=Z;L<C;++L)for(Z=0;Z<W;++Z)I[H++]=v(_[g(w[y++])])},z[n]=function(w,y,_,L,I,H,Z){var C=8>>w.b,W=w.Ea,K=w.K[0],st=w.w;if(8>C)for(w=(1<<w.b)-1,st=(1<<C)-1;y<_;++y){var X,lt=0;for(X=0;X<W;++X)X&w||(lt=g(L[I++])),H[Z++]=v(K[lt&st]),lt>>=C}else z["VP8LMapColor"+h](L,I,K,st,H,Z,y,_,W)}}function De(n,a,h,g,v){for(h=a+h;a<h;){var w=n[a++];g[v++]=w>>16&255,g[v++]=w>>8&255,g[v++]=255&w}}function pe(n,a,h,g,v){for(h=a+h;a<h;){var w=n[a++];g[v++]=w>>16&255,g[v++]=w>>8&255,g[v++]=255&w,g[v++]=w>>24&255}}function se(n,a,h,g,v){for(h=a+h;a<h;){var w=(y=n[a++])>>16&240|y>>12&15,y=240&y|y>>28&15;g[v++]=w,g[v++]=y}}function oe(n,a,h,g,v){for(h=a+h;a<h;){var w=(y=n[a++])>>16&248|y>>13&7,y=y>>5&224|y>>3&31;g[v++]=w,g[v++]=y}}function Fe(n,a,h,g,v){for(h=a+h;a<h;){var w=n[a++];g[v++]=255&w,g[v++]=w>>8&255,g[v++]=w>>16&255}}function qt(n,a,h,g,v,w){if(w==0)for(h=a+h;a<h;)_t(g,((w=n[a++])[0]>>24|w[1]>>8&65280|w[2]<<8&16711680|w[3]<<24)>>>0),v+=32;else i(g,v,n,a,h)}function ke(n,a){z[a][0]=z[n+"0"],z[a][1]=z[n+"1"],z[a][2]=z[n+"2"],z[a][3]=z[n+"3"],z[a][4]=z[n+"4"],z[a][5]=z[n+"5"],z[a][6]=z[n+"6"],z[a][7]=z[n+"7"],z[a][8]=z[n+"8"],z[a][9]=z[n+"9"],z[a][10]=z[n+"10"],z[a][11]=z[n+"11"],z[a][12]=z[n+"12"],z[a][13]=z[n+"13"],z[a][14]=z[n+"0"],z[a][15]=z[n+"0"]}function Yt(n){return n==Ws||n==Vs||n==$a||n==Gs}function Qt(){this.eb=[],this.size=this.A=this.fb=0}function Ee(){this.y=[],this.f=[],this.ea=[],this.F=[],this.Tc=this.Ed=this.Cd=this.Fd=this.lb=this.Db=this.Ab=this.fa=this.J=this.W=this.N=this.O=0}function le(){this.Rd=this.height=this.width=this.S=0,this.f={},this.f.RGBA=new Qt,this.f.kb=new Ee,this.sd=null}function Vt(){this.width=[0],this.height=[0],this.Pd=[0],this.Qd=[0],this.format=[0]}function ve(){this.Id=this.fd=this.Md=this.hb=this.ib=this.da=this.bd=this.cd=this.j=this.v=this.Da=this.Sd=this.ob=0}function Zn(n){return alert("todo:WebPSamplerProcessPlane"),n.T}function hr(n,a){var h=n.T,g=a.ba.f.RGBA,v=g.eb,w=g.fb+n.ka*g.A,y=qr[a.ba.S],_=n.y,L=n.O,I=n.f,H=n.N,Z=n.ea,C=n.W,W=a.cc,K=a.dc,st=a.Mc,X=a.Nc,lt=n.ka,ht=n.ka+n.T,wt=n.U,bt=wt+1>>1;for(lt==0?y(_,L,null,null,I,H,Z,C,I,H,Z,C,v,w,null,null,wt):(y(a.ec,a.fc,_,L,W,K,st,X,I,H,Z,C,v,w-g.A,v,w,wt),++h);lt+2<ht;lt+=2)W=I,K=H,st=Z,X=C,H+=n.Rc,C+=n.Rc,w+=2*g.A,y(_,(L+=2*n.fa)-n.fa,_,L,W,K,st,X,I,H,Z,C,v,w-g.A,v,w,wt);return L+=n.fa,n.j+ht<n.o?(i(a.ec,a.fc,_,L,wt),i(a.cc,a.dc,I,H,bt),i(a.Mc,a.Nc,Z,C,bt),h--):1&ht||y(_,L,null,null,I,H,Z,C,I,H,Z,C,v,w+g.A,null,null,wt),h}function dn(n,a,h){var g=n.F,v=[n.J];if(g!=null){var w=n.U,y=a.ba.S,_=y==Ja||y==$a;a=a.ba.f.RGBA;var L=[0],I=n.ka;L[0]=n.T,n.Kb&&(I==0?--L[0]:(--I,v[0]-=n.width),n.j+n.ka+n.T==n.o&&(L[0]=n.o-n.j-I));var H=a.eb;I=a.fb+I*a.A,n=Ho(g,v[0],n.width,w,L,H,I+(_?0:3),a.A),e(h==L),n&&Yt(y)&&pa(H,I,_,w,L,a.A)}return 0}function Qr(n){var a=n.ma,h=a.ba.S,g=11>h,v=h==Ga||h==Ya||h==Ja||h==Hs||h==12||Yt(h);if(a.memory=null,a.Ib=null,a.Jb=null,a.Nd=null,!sa(a.Oa,n,v?11:12))return 0;if(v&&Yt(h)&&na(),n.da)alert("todo:use_scaling");else{if(g){if(a.Ib=Zn,n.Kb){if(h=n.U+1>>1,a.memory=s(n.U+2*h),a.memory==null)return 0;a.ec=a.memory,a.fc=0,a.cc=a.ec,a.dc=a.fc+n.U,a.Mc=a.cc,a.Nc=a.dc+h,a.Ib=hr,na()}}else alert("todo:EmitYUV");v&&(a.Jb=dn,g&&Gr())}if(g&&!al){for(n=0;256>n;++n)Fh[n]=89858*(n-128)+Xa>>Ka,jh[n]=-22014*(n-128)+Xa,Oh[n]=-45773*(n-128),Eh[n]=113618*(n-128)+Xa>>Ka;for(n=ma;n<$s;++n)a=76283*(n-16)+Xa>>Ka,Bh[n-ma]=rn(a,255),Mh[n-ma]=rn(a+8>>4,15);al=1}return 1}function Gt(n){var a=n.ma,h=n.U,g=n.T;return e(!(1&n.ka)),0>=h||0>=g?0:(h=a.Ib(n,a),a.Jb!=null&&a.Jb(n,a,h),a.Dc+=h,1)}function pn(n){n.ma.memory=null}function gn(n,a,h,g){return xt(n,8)!=47?0:(a[0]=xt(n,14)+1,h[0]=xt(n,14)+1,g[0]=xt(n,1),xt(n,3)!=0?0:!n.h)}function Er(n,a){if(4>n)return n+1;var h=n-2>>1;return(2+(1&n)<<h)+xt(a,h)+1}function Or(n,a){return 120<a?a-120:1<=(h=((h=bh[a-1])>>4)*n+(8-(15&h)))?h:1;var h}function Be(n,a,h){var g=R(h),v=n[a+=255&g].g-8;return 0<v&&(J(h,h.u+8),g=R(h),a+=n[a].value,a+=g&(1<<v)-1),J(h,h.u+n[a].g),n[a].value}function rr(n,a,h){return h.g+=n.g,h.value+=n.value<<a>>>0,e(8>=h.g),n.g}function ir(n,a,h){var g=n.xc;return e((a=g==0?0:n.vc[n.md*(h>>g)+(a>>g)])<n.Wb),n.Ya[a]}function Qn(n,a,h,g){var v=n.ab,w=n.c*a,y=n.C;a=y+a;var _=h,L=g;for(g=n.Ta,h=n.Ua;0<v--;){var I=n.gc[v],H=y,Z=a,C=_,W=L,K=(L=g,_=h,I.Ea);switch(e(H<Z),e(Z<=I.nc),I.hc){case 2:qe(C,W,(Z-H)*K,L,_);break;case 0:var st=H,X=Z,lt=L,ht=_,wt=(Et=I).Ea;st==0&&(la(C,W,null,null,1,lt,ht),ce(C,W+1,0,0,wt-1,lt,ht+1),W+=wt,ht+=wt,++st);for(var bt=1<<Et.b,Mt=bt-1,Pt=vt(wt,Et.b),ne=Et.K,Et=Et.w+(st>>Et.b)*Pt;st<X;){var fe=ne,Qe=Et,ie=1;for(Ei(C,W,lt,ht-wt,1,lt,ht);ie<wt;){var Ot=(ie&~Mt)+bt;Ot>wt&&(Ot=wt),(0,ha[fe[Qe++]>>8&15])(C,W+ +ie,lt,ht+ie-wt,Ot-ie,lt,ht+ie),ie=Ot}W+=wt,ht+=wt,++st&Mt||(Et+=Pt)}Z!=I.nc&&i(L,_-K,L,_+(Z-H-1)*K,K);break;case 1:for(K=C,X=W,wt=(C=I.Ea)-(ht=C&~(lt=(W=1<<I.b)-1)),st=vt(C,I.b),bt=I.K,I=I.w+(H>>I.b)*st;H<Z;){for(Mt=bt,Pt=I,ne=new Ut,Et=X+ht,fe=X+C;X<Et;)jt(Mt[Pt++],ne),ca(ne,K,X,W,L,_),X+=W,_+=W;X<fe&&(jt(Mt[Pt++],ne),ca(ne,K,X,wt,L,_),X+=wt,_+=wt),++H<||(I+=st)}break;case 3:if(C==L&&W==_&&0<I.b){for(X=L,C=K=_+(Z-H)*K-(ht=(Z-H)*vt(I.Ea,I.b)),W=L,lt=_,st=[],ht=(wt=ht)-1;0<=ht;--ht)st[ht]=W[lt+ht];for(ht=wt-1;0<=ht;--ht)X[C+ht]=st[ht];za(I,H,Z,L,K,L,_)}else za(I,H,Z,C,W,L,_)}_=g,L=h}L!=h&&i(g,h,_,L,w)}function On(n,a){var h=n.V,g=n.Ba+n.c*n.C,v=a-n.C;if(e(a<=n.l.o),e(16>=v),0<v){var w=n.l,y=n.Ta,_=n.Ua,L=w.width;if(Qn(n,v,h,g),v=_=[_],e((h=n.C)<(g=a)),e(w.v<w.va),g>w.o&&(g=w.o),h<w.j){var I=w.j-h;h=w.j,v[0]+=I*L}if(h>=g?h=0:(v[0]+=4*w.v,w.ka=h-w.j,w.U=w.va-w.v,w.T=g-h,h=1),h){if(_=_[0],11>(h=n.ca).S){var H=h.f.RGBA,Z=(g=h.S,v=w.U,w=w.T,I=H.eb,H.A),C=w;for(H=H.fb+n.Ma*H.A;0<C--;){var W=y,K=_,st=v,X=I,lt=H;switch(g){case Va:fa(W,K,st,X,lt);break;case Ga:Dn(W,K,st,X,lt);break;case Ws:Dn(W,K,st,X,lt),pa(X,lt,0,st,1,0);break;case Ko:di(W,K,st,X,lt);break;case Ya:qt(W,K,st,X,lt,1);break;case Vs:qt(W,K,st,X,lt,1),pa(X,lt,0,st,1,0);break;case Ja:qt(W,K,st,X,lt,0);break;case $a:qt(W,K,st,X,lt,0),pa(X,lt,1,st,1,0);break;case Hs:qn(W,K,st,X,lt);break;case Gs:qn(W,K,st,X,lt),zo(X,lt,st,1,0);break;case Xo:Un(W,K,st,X,lt);break;default:e(0)}_+=L,H+=Z}n.Ma+=w}else alert("todo:EmitRescaledRowsYUVA");e(n.Ma<=h.height)}}n.C=a,e(n.C<=n.i)}function zr(n){var a;if(0<n.ua)return 0;for(a=0;a<n.Wb;++a){var h=n.Ya[a].G,g=n.Ya[a].H;if(0<h[1][g[1]+0].g||0<h[2][g[2]+0].g||0<h[3][g[3]+0].g)return 0}return 1}function tn(n,a,h,g,v,w){if(n.Z!=0){var y=n.qd,_=n.rd;for(e(Wn[n.Z]!=null);a<h;++a)Wn[n.Z](y,_,g,v,g,v,w),y=g,_=v,v+=w;n.qd=y,n.rd=_}}function Hr(n,a){var h=n.l.ma,g=h.Z==0||h.Z==1?n.l.j:n.C;if(g=n.C<g?g:n.C,e(a<=n.l.o),a>g){var v=n.l.width,w=h.ca,y=h.tb+v*g,_=n.V,L=n.Ba+n.c*g,I=n.gc;e(n.ab==1),e(I[0].hc==3),on(I[0],g,a,_,L,w,y),tn(h,g,a,w,y,v)}n.C=n.Ma=a}function Wr(n,a,h,g,v,w,y){var _=n.$/g,L=n.$%g,I=n.m,H=n.s,Z=h+n.$,C=Z;v=h+g*v;var W=h+g*w,K=280+H.ua,st=n.Pb?_:16777216,X=0<H.ua?H.Wa:null,lt=H.wc,ht=Z<W?ir(H,L,_):null;e(n.C<w),e(W<=v);var wt=!1;t:for(;;){for(;wt||Z<W;){var bt=0;if(_>=st){var Mt=Z-h;e((st=n).Pb),st.wd=st.m,st.xd=Mt,0<st.s.ua&&Lt(st.s.Wa,st.s.vb),st=_+wh}if(L<||(ht=ir(H,L,_)),e(ht!=null),ht.Qb&&(a[Z]=ht.qb,wt=!0),!wt)if(Q(I),ht.jc){bt=I,Mt=a;var Pt=Z,ne=ht.pd[R(bt)&fi-1];e(ht.jc),256>ne.g?(J(bt,bt.u+ne.g),Mt[Pt]=ne.value,bt=0):(J(bt,bt.u+ne.g-256),e(256<=ne.value),bt=ne.value),bt==0&&(wt=!0)}else bt=Be(ht.G[0],ht.H[0],I);if(I.h)break;if(wt||256>bt){if(!wt)if(ht.nd)a[Z]=(ht.qb|bt<<8)>>>0;else{if(Q(I),wt=Be(ht.G[1],ht.H[1],I),Q(I),Mt=Be(ht.G[2],ht.H[2],I),Pt=Be(ht.G[3],ht.H[3],I),I.h)break;a[Z]=(Pt<<24|wt<<16|bt<<8|Mt)>>>0}if(wt=!1,++Z,++L>=g&&(L=0,++_,y!=null&&_<=w&&!(_%16)&&y(n,_),X!=null))for(;C<Z;)bt=a[C++],X.X[(506832829*bt&4294967295)>>>X.Mb]=bt}else if(280>bt){if(bt=Er(bt-256,I),Mt=Be(ht.G[4],ht.H[4],I),Q(I),Mt=Or(g,Mt=Er(Mt,I)),I.h)break;if(Z-h<Mt||v-Z<bt)break t;for(Pt=0;Pt<bt;++Pt)a[Z+Pt]=a[Z+Pt-Mt];for(Z+=bt,L+=bt;L>=g;)L-=g,++_,y!=null&&_<=w&&!(_%16)&&y(n,_);if(e(Z<=v),L<&&(ht=ir(H,L,_)),X!=null)for(;C<Z;)bt=a[C++],X.X[(506832829*bt&4294967295)>>>X.Mb]=bt}else{if(!(bt<K))break t;for(wt=bt-280,e(X!=null);C<Z;)bt=a[C++],X.X[(506832829*bt&4294967295)>>>X.Mb]=bt;bt=Z,e(!(wt>>>(Mt=X).Xa)),a[bt]=Mt.X[wt],wt=!0}wt||e(I.h==V(I))}if(n.Pb&&I.h&&Z<v)e(n.m.h),n.a=5,n.m=n.wd,n.$=n.xd,0<n.s.ua&&Lt(n.s.vb,n.s.Wa);else{if(I.h)break t;y!=null&&y(n,_>w?w:_),n.a=0,n.$=Z-h}return 1}return n.a=3,0}function jr(n){e(n!=null),n.vc=null,n.yc=null,n.Ya=null;var a=n.Wa;a!=null&&(a.X=null),n.vb=null,e(n!=null)}function ti(){var n=new $t;return n==null?null:(n.a=0,n.xb=tl,ke("Predictor","VP8LPredictors"),ke("Predictor","VP8LPredictors_C"),ke("PredictorAdd","VP8LPredictorsAdd"),ke("PredictorAdd","VP8LPredictorsAdd_C"),qe=he,ca=ee,fa=De,Dn=pe,qn=se,Un=oe,di=Fe,z.VP8LMapColor32b=sn,z.VP8LMapColor8b=ua,n)}function en(n,a,h,g,v){var w=1,y=[n],_=[a],L=g.m,I=g.s,H=null,Z=0;t:for(;;){if(h)for(;w&&xt(L,1);){var C=y,W=_,K=g,st=1,X=K.m,lt=K.gc[K.ab],ht=xt(X,2);if(K.Oc&1<<ht)w=0;else{switch(K.Oc|=1<<ht,lt.hc=ht,lt.Ea=C[0],lt.nc=W[0],lt.K=[null],++K.ab,e(4>=K.ab),ht){case 0:case 1:lt.b=xt(X,3)+2,st=en(vt(lt.Ea,lt.b),vt(lt.nc,lt.b),0,K,lt.K),lt.K=lt.K[0];break;case 3:var wt,bt=xt(X,8)+1,Mt=16<bt?0:4<bt?1:2<bt?2:3;if(C[0]=vt(lt.Ea,Mt),lt.b=Mt,wt=st=en(bt,1,0,K,lt.K)){var Pt,ne=bt,Et=lt,fe=1<<(8>>Et.b),Qe=s(fe);if(Qe==null)wt=0;else{var ie=Et.K[0],Ot=Et.w;for(Qe[0]=Et.K[0][0],Pt=1;Pt<1*ne;++Pt)Qe[Pt]=Wt(ie[Ot+Pt],Qe[Pt-1]);for(;Pt<4*fe;++Pt)Qe[Pt]=0;Et.K[0]=null,Et.K[0]=Qe,wt=1}}st=wt;break;case 2:break;default:e(0)}w=st}}if(y=y[0],_=_[0],w&&xt(L,1)&&!(w=1<=(Z=xt(L,4))&&11>=Z)){g.a=3;break t}var Nt;if(Nt=w)e:{var ze,te,de,Ce=g,or=y,br=_,Me=Z,cr=h,vr=Ce.m,tr=Ce.s,me=[null],ye=1,Re=0,xe=vh[Me];r:for(;;){if(cr&&xt(vr,1)){var lr=xt(vr,3)+2,Jr=vt(or,lr),He=vt(br,lr),yr=Jr*He;if(!en(Jr,He,0,Ce,me))break r;for(me=me[0],tr.xc=lr,ze=0;ze<yr;++ze){var Ne=me[ze]>>8&65535;me[ze]=Ne,Ne>=ye&&(ye=Ne+1)}}if(vr.h)break r;for(te=0;5>te;++te){var er=Zo[te];!te&&0<Me&&(er+=1<<Me),Re<er&&(Re=er)}var Sr=f(ye*xe,q),wr=ye,kr=f(wr,it);if(kr==null)var Pr=null;else e(65536>=wr),Pr=kr;var xr=s(Re);if(Pr==null||xr==null||Sr==null){Ce.a=1;break r}var Ir=Sr;for(ze=de=0;ze<ye;++ze){var Ie=Pr[ze],Cr=Ie.G,$r=Ie.H,gi=0,In=1,ur=0;for(te=0;5>te;++te){er=Zo[te],Cr[te]=Ir,$r[te]=de,!te&&0<Me&&(er+=1<<Me);i:{var Qa,Ks=er,ts=Ce,ba=xr,Dh=Ir,qh=de,Xs=0,Vn=ts.m,Uh=xt(Vn,1);if(o(ba,0,0,Ks),Uh){var zh=xt(Vn,1)+1,Hh=xt(Vn,1),ll=xt(Vn,Hh==0?1:8);ba[ll]=1,zh==2&&(ba[ll=xt(Vn,8)]=1);var es=1}else{var ul=s(19),hl=xt(Vn,4)+4;if(19<hl){ts.a=3;var rs=0;break i}for(Qa=0;Qa<hl;++Qa)ul[mh[Qa]]=xt(Vn,3);var Zs=void 0,va=void 0,cl=ts,Wh=ul,ns=Ks,fl=ba,Qs=0,Gn=cl.m,dl=8,pl=f(128,q);n:for(;E(pl,0,7,Wh,19);){if(xt(Gn,1)){var Vh=2+2*xt(Gn,3);if((Zs=2+xt(Gn,Vh))>ns)break n}else Zs=ns;for(va=0;va<ns&&Zs--;){Q(Gn);var gl=pl[0+(127&R(Gn))];J(Gn,Gn.u+gl.g);var ji=gl.value;if(16>ji)fl[va++]=ji,ji!=0&&(dl=ji);else{var Gh=ji==16,ml=ji-16,Yh=ph[ml],bl=xt(Gn,dh[ml])+Yh;if(va+bl>ns)break n;for(var Jh=Gh?dl:0;0<bl--;)fl[va++]=Jh}}Qs=1;break n}Qs||(cl.a=3),es=Qs}(es=es&&!Vn.h)&&(Xs=E(Dh,qh,8,ba,Ks)),es&&Xs!=0?rs=Xs:(ts.a=3,rs=0)}if(rs==0)break r;if(In&&gh[te]==1&&(In=Ir[de].g==0),gi+=Ir[de].g,de+=rs,3>=te){var wa,to=xr[0];for(wa=1;wa<er;++wa)xr[wa]>to&&(to=xr[wa]);ur+=to}}if(Ie.nd=In,Ie.Qb=0,In&&(Ie.qb=(Cr[3][$r[3]+0].value<<24|Cr[1][$r[1]+0].value<<16|Cr[2][$r[2]+0].value)>>>0,gi==0&&256>Cr[0][$r[0]+0].value&&(Ie.Qb=1,Ie.qb+=Cr[0][$r[0]+0].value<<8)),Ie.jc=!Ie.Qb&&6>ur,Ie.jc){var is,Cn=Ie;for(is=0;is<fi;++is){var Yn=is,Jn=Cn.pd[Yn],as=Cn.G[0][Cn.H[0]+Yn];256<=as.value?(Jn.g=as.g+256,Jn.value=as.value):(Jn.g=0,Jn.value=0,Yn>>=rr(as,8,Jn),Yn>>=rr(Cn.G[1][Cn.H[1]+Yn],16,Jn),Yn>>=rr(Cn.G[2][Cn.H[2]+Yn],0,Jn),rr(Cn.G[3][Cn.H[3]+Yn],24,Jn))}}}tr.vc=me,tr.Wb=ye,tr.Ya=Pr,tr.yc=Sr,Nt=1;break e}Nt=0}if(!(w=Nt)){g.a=3;break t}if(0<Z){if(I.ua=1<<Z,!k(I.Wa,Z)){g.a=1,w=0;break t}}else I.ua=0;var eo=g,vl=y,$h=_,ro=eo.s,no=ro.xc;if(eo.c=vl,eo.i=$h,ro.md=vt(vl,no),ro.wc=no==0?-1:(1<<no)-1,h){g.xb=Sh;break t}if((H=s(y*_))==null){g.a=1,w=0;break t}w=(w=Wr(g,H,0,y,_,_,null))&&!L.h;break t}return w?(v!=null?v[0]=H:(e(H==null),e(h)),g.$=0,h||jr(I)):jr(I),w}function ei(n,a){var h=n.c*n.i,g=h+a+16*a;return e(n.c<=a),n.V=s(g),n.V==null?(n.Ta=null,n.Ua=0,n.a=1,0):(n.Ta=n.V,n.Ua=n.Ba+h+a,1)}function _i(n,a){var h=n.C,g=a-h,v=n.V,w=n.Ba+n.c*h;for(e(a<=n.l.o);0<g;){var y=16<g?16:g,_=n.l.ma,L=n.l.width,I=L*y,H=_.ca,Z=_.tb+L*h,C=n.Ta,W=n.Ua;Qn(n,y,v,w),Wo(C,W,H,Z,I),tn(_,h,h+y,H,Z,L),g-=y,v+=y*n.c,h+=y}e(h==a),n.C=n.Ma=a}function Ai(){this.ub=this.yd=this.td=this.Rb=0}function Ni(){this.Kd=this.Ld=this.Ud=this.Td=this.i=this.c=0}function Ss(){this.Fb=this.Bb=this.Cb=0,this.Zb=s(4),this.Lb=s(4)}function Gi(){this.Yb=function(){var n=[];return function a(h,g,v){for(var w=v[g],y=0;y<w&&(h.push(v.length>g+1?[]:0),!(v.length<g+1));y++)a(h[y],g+1,v)}(n,0,[3,11]),n}()}function Na(){this.jb=s(3),this.Wc=u([4,8],Gi),this.Xc=u([4,17],Gi)}function La(){this.Pc=this.wb=this.Tb=this.zd=0,this.vd=new s(4),this.od=new s(4)}function Br(){this.ld=this.La=this.dd=this.tc=0}function Yi(){this.Na=this.la=0}function Sa(){this.Sc=[0,0],this.Eb=[0,0],this.Qc=[0,0],this.ia=this.lc=0}function Ji(){this.ad=s(384),this.Za=0,this.Ob=s(16),this.$b=this.Ad=this.ia=this.Gc=this.Hc=this.Dd=0}function ka(){this.uc=this.M=this.Nb=0,this.wa=Array(new Br),this.Y=0,this.ya=Array(new Ji),this.aa=0,this.l=new Li}function Pa(){this.y=s(16),this.f=s(8),this.ea=s(8)}function Ia(){this.cb=this.a=0,this.sc="",this.m=new x,this.Od=new Ai,this.Kc=new Ni,this.ed=new La,this.Qa=new Ss,this.Ic=this.$c=this.Aa=0,this.D=new ka,this.Xb=this.Va=this.Hb=this.zb=this.yb=this.Ub=this.za=0,this.Jc=f(8,x),this.ia=0,this.pb=f(4,Sa),this.Pa=new Na,this.Bd=this.kc=0,this.Ac=[],this.Bc=0,this.zc=[0,0,0,0],this.Gd=Array(new Pa),this.Hd=0,this.rb=Array(new Yi),this.sb=0,this.wa=Array(new Br),this.Y=0,this.oc=[],this.pc=0,this.sa=[],this.ta=0,this.qa=[],this.ra=0,this.Ha=[],this.B=this.R=this.Ia=0,this.Ec=[],this.M=this.ja=this.Vb=this.Fc=0,this.ya=Array(new Ji),this.L=this.aa=0,this.gd=u([4,2],Br),this.ga=null,this.Fa=[],this.Cc=this.qc=this.P=0,this.Gb=[],this.Uc=0,this.mb=[],this.nb=0,this.rc=[],this.Ga=this.Vc=0}function rn(n,a){return 0>n?0:n>a?a:n}function Li(){this.T=this.U=this.ka=this.height=this.width=0,this.y=[],this.f=[],this.ea=[],this.Rc=this.fa=this.W=this.N=this.O=0,this.ma="void",this.put="VP8IoPutHook",this.ac="VP8IoSetupHook",this.bc="VP8IoTeardownHook",this.ha=this.Kb=0,this.data=[],this.hb=this.ib=this.da=this.o=this.j=this.va=this.v=this.Da=this.ob=this.w=0,this.F=[],this.J=0}function ks(){var n=new Ia;return n!=null&&(n.a=0,n.sc="OK",n.cb=0,n.Xb=0,ga||(ga=Si)),n}function Ye(n,a,h){return n.a==0&&(n.a=a,n.sc=h,n.cb=0),0}function Ca(n,a,h){return 3<=h&&n[a+0]==157&&n[a+1]==1&&n[a+2]==42}function nn(n,a){if(n==null)return 0;if(n.a=0,n.sc="OK",a==null)return Ye(n,2,"null VP8Io passed to VP8GetHeaders()");var h=a.data,g=a.w,v=a.ha;if(4>v)return Ye(n,7,"Truncated header.");var w=h[g+0]|h[g+1]<<8|h[g+2]<<16,y=n.Od;if(y.Rb=!(1&w),y.td=w>>1&7,y.yd=w>>4&1,y.ub=w>>5,3<y.td)return Ye(n,3,"Incorrect keyframe parameters.");if(!y.yd)return Ye(n,4,"Frame not displayable.");g+=3,v-=3;var _=n.Kc;if(y.Rb){if(7>v)return Ye(n,7,"cannot parse picture header");if(!Ca(h,g,v))return Ye(n,3,"Bad code word");_.c=16383&(h[g+4]<<8|h[g+3]),_.Td=h[g+4]>>6,_.i=16383&(h[g+6]<<8|h[g+5]),_.Ud=h[g+6]>>6,g+=7,v-=7,n.za=_.c+15>>4,n.Ub=_.i+15>>4,a.width=_.c,a.height=_.i,a.Da=0,a.j=0,a.v=0,a.va=a.width,a.o=a.height,a.da=0,a.ib=a.width,a.hb=a.height,a.U=a.width,a.T=a.height,o((w=n.Pa).jb,0,255,w.jb.length),e((w=n.Qa)!=null),w.Cb=0,w.Bb=0,w.Fb=1,o(w.Zb,0,0,w.Zb.length),o(w.Lb,0,0,w.Lb)}if(y.ub>v)return Ye(n,7,"bad partition length");ct(w=n.m,h,g,y.ub),g+=y.ub,v-=y.ub,y.Rb&&(_.Ld=at(w),_.Kd=at(w)),_=n.Qa;var L,I=n.Pa;if(e(w!=null),e(_!=null),_.Cb=at(w),_.Cb){if(_.Bb=at(w),at(w)){for(_.Fb=at(w),L=0;4>L;++L)_.Zb[L]=at(w)?rt(w,7):0;for(L=0;4>L;++L)_.Lb[L]=at(w)?rt(w,6):0}if(_.Bb)for(L=0;3>L;++L)I.jb[L]=at(w)?pt(w,8):255}else _.Bb=0;if(w.Ka)return Ye(n,3,"cannot parse segment header");if((_=n.ed).zd=at(w),_.Tb=pt(w,6),_.wb=pt(w,3),_.Pc=at(w),_.Pc&&at(w)){for(I=0;4>I;++I)at(w)&&(_.vd[I]=rt(w,6));for(I=0;4>I;++I)at(w)&&(_.od[I]=rt(w,6))}if(n.L=_.Tb==0?0:_.zd?1:2,w.Ka)return Ye(n,3,"cannot parse filter header");var H=v;if(v=L=g,g=L+H,_=H,n.Xb=(1<<pt(n.m,2))-1,H<3*(I=n.Xb))h=7;else{for(L+=3*I,_-=3*I,H=0;H<I;++H){var Z=h[v+0]|h[v+1]<<8|h[v+2]<<16;Z>_&&(Z=_),ct(n.Jc[+H],h,L,Z),L+=Z,_-=Z,v+=3}ct(n.Jc[+I],h,L,_),h=L<g?0:5}if(h!=0)return Ye(n,h,"cannot parse partitions");for(h=pt(L=n.m,7),v=at(L)?rt(L,4):0,g=at(L)?rt(L,4):0,_=at(L)?rt(L,4):0,I=at(L)?rt(L,4):0,L=at(L)?rt(L,4):0,H=n.Qa,Z=0;4>Z;++Z){if(H.Cb){var C=H.Zb[Z];H.Fb||(C+=h)}else{if(0<Z){n.pb[Z]=n.pb[0];continue}C=h}var W=n.pb[Z];W.Sc[0]=Ys[rn(C+v,127)],W.Sc[1]=Js[rn(C+0,127)],W.Eb[0]=2*Ys[rn(C+g,127)],W.Eb[1]=101581*Js[rn(C+_,127)]>>16,8>W.Eb[1]&&(W.Eb[1]=8),W.Qc[0]=Ys[rn(C+I,117)],W.Qc[1]=Js[rn(C+L,127)],W.lc=C+L}if(!y.Rb)return Ye(n,4,"Not a key frame.");for(at(w),y=n.Pa,h=0;4>h;++h){for(v=0;8>v;++v)for(g=0;3>g;++g)for(_=0;11>_;++_)I=dt(w,Nh[h][v][g][_])?pt(w,8):_h[h][v][g][_],y.Wc[h][v].Yb[g][_]=I;for(v=0;17>v;++v)y.Xc[h][v]=y.Wc[h][Lh[v]]}return n.kc=at(w),n.kc&&(n.Bd=pt(w,8)),n.cb=1}function Si(n,a,h,g,v,w,y){var _=a[v].Yb[h];for(h=0;16>v;++v){if(!dt(n,_[h+0]))return v;for(;!dt(n,_[h+1]);)if(_=a[++v].Yb[0],h=0,v==16)return 16;var L=a[v+1].Yb;if(dt(n,_[h+2])){var I=n,H=0;if(dt(I,(C=_)[(Z=h)+3]))if(dt(I,C[Z+6])){for(_=0,Z=2*(H=dt(I,C[Z+8]))+(C=dt(I,C[Z+9+H])),H=0,C=yh[Z];C[_];++_)H+=H+dt(I,C[_]);H+=3+(8<<Z)}else dt(I,C[Z+7])?(H=7+2*dt(I,165),H+=dt(I,145)):H=5+dt(I,159);else H=dt(I,C[Z+4])?3+dt(I,C[Z+5]):2;_=L[2]}else H=1,_=L[1];L=y+xh[v],0>(I=n).b&&nt(I);var Z,C=I.b,W=(Z=I.Ca>>1)-(I.I>>C)>>31;--I.b,I.Ca+=W,I.Ca|=1,I.I-=(Z+1&W)<<C,w[L]=((H^W)-W)*g[(0<v)+0]}return 16}function Fa(n){var a=n.rb[n.sb-1];a.la=0,a.Na=0,o(n.zc,0,0,n.zc.length),n.ja=0}function Mr(n,a,h,g,v){v=n[a+h+32*g]+(v>>3),n[a+h+32*g]=-256&v?0>v?0:255:v}function Ke(n,a,h,g,v,w){Mr(n,a,0,h,g+v),Mr(n,a,1,h,g+w),Mr(n,a,2,h,g-w),Mr(n,a,3,h,g-v)}function mn(n){return(20091*n>>16)+n}function Ea(n,a,h,g){var v,w=0,y=s(16);for(v=0;4>v;++v){var _=n[a+0]+n[a+8],L=n[a+0]-n[a+8],I=(35468*n[a+4]>>16)-mn(n[a+12]),H=mn(n[a+4])+(35468*n[a+12]>>16);y[w+0]=_+H,y[w+1]=L+I,y[w+2]=L-I,y[w+3]=_-H,w+=4,a++}for(v=w=0;4>v;++v)_=(n=y[w+0]+4)+y[w+8],L=n-y[w+8],I=(35468*y[w+4]>>16)-mn(y[w+12]),Mr(h,g,0,0,_+(H=mn(y[w+4])+(35468*y[w+12]>>16))),Mr(h,g,1,0,L+I),Mr(h,g,2,0,L-I),Mr(h,g,3,0,_-H),w++,g+=32}function Ps(n,a,h,g){var v=n[a+0]+4,w=35468*n[a+4]>>16,y=mn(n[a+4]),_=35468*n[a+1]>>16;Ke(h,g,0,v+y,n=mn(n[a+1]),_),Ke(h,g,1,v+w,n,_),Ke(h,g,2,v-w,n,_),Ke(h,g,3,v-y,n,_)}function Is(n,a,h,g,v){Ea(n,a,h,g),v&&Ea(n,a+16,h,g+4)}function an(n,a,h,g){pi(n,a+0,h,g,1),pi(n,a+32,h,g+128,1)}function Oa(n,a,h,g){var v;for(n=n[a+0]+4,v=0;4>v;++v)for(a=0;4>a;++a)Mr(h,g,a,v,n)}function ja(n,a,h,g){n[a+0]&&we(n,a+0,h,g),n[a+16]&&we(n,a+16,h,g+4),n[a+32]&&we(n,a+32,h,g+128),n[a+48]&&we(n,a+48,h,g+128+4)}function ki(n,a,h,g){var v,w=s(16);for(v=0;4>v;++v){var y=n[a+0+v]+n[a+12+v],_=n[a+4+v]+n[a+8+v],L=n[a+4+v]-n[a+8+v],I=n[a+0+v]-n[a+12+v];w[0+v]=y+_,w[8+v]=y-_,w[4+v]=I+L,w[12+v]=I-L}for(v=0;4>v;++v)y=(n=w[0+4*v]+3)+w[3+4*v],_=w[1+4*v]+w[2+4*v],L=w[1+4*v]-w[2+4*v],I=n-w[3+4*v],h[g+0]=y+_>>3,h[g+16]=I+L>>3,h[g+32]=y-_>>3,h[g+48]=I-L>>3,g+=64}function ri(n,a,h){var g,v=a-32,w=Lr,y=255-n[v-1];for(g=0;g<h;++g){var _,L=w,I=y+n[a-1];for(_=0;_<h;++_)n[a+_]=L[I+n[v+_]];a+=32}}function Cs(n,a){ri(n,a,4)}function Fs(n,a){ri(n,a,8)}function Es(n,a){ri(n,a,16)}function $i(n,a){var h;for(h=0;16>h;++h)i(n,a+32*h,n,a-32,16)}function Ba(n,a){var h;for(h=16;0<h;--h)o(n,a,n[a-1],16),a+=32}function Vr(n,a,h){var g;for(g=0;16>g;++g)o(a,h+32*g,n,16)}function Os(n,a){var h,g=16;for(h=0;16>h;++h)g+=n[a-1+32*h]+n[a+h-32];Vr(g>>5,n,a)}function ni(n,a){var h,g=8;for(h=0;16>h;++h)g+=n[a-1+32*h];Vr(g>>4,n,a)}function Ki(n,a){var h,g=8;for(h=0;16>h;++h)g+=n[a+h-32];Vr(g>>4,n,a)}function js(n,a){Vr(128,n,a)}function Kt(n,a,h){return n+2*a+h+2>>2}function Bs(n,a){var h,g=a-32;for(g=new Uint8Array([Kt(n[g-1],n[g+0],n[g+1]),Kt(n[g+0],n[g+1],n[g+2]),Kt(n[g+1],n[g+2],n[g+3]),Kt(n[g+2],n[g+3],n[g+4])]),h=0;4>h;++h)i(n,a+32*h,g,0,g.length)}function Ms(n,a){var h=n[a-1],g=n[a-1+32],v=n[a-1+64],w=n[a-1+96];_t(n,a+0,16843009*Kt(n[a-1-32],h,g)),_t(n,a+32,16843009*Kt(h,g,v)),_t(n,a+64,16843009*Kt(g,v,w)),_t(n,a+96,16843009*Kt(v,w,w))}function Rs(n,a){var h,g=4;for(h=0;4>h;++h)g+=n[a+h-32]+n[a-1+32*h];for(g>>=3,h=0;4>h;++h)o(n,a+32*h,g,4)}function bn(n,a){var h=n[a-1+0],g=n[a-1+32],v=n[a-1+64],w=n[a-1-32],y=n[a+0-32],_=n[a+1-32],L=n[a+2-32],I=n[a+3-32];n[a+0+96]=Kt(g,v,n[a-1+96]),n[a+1+96]=n[a+0+64]=Kt(h,g,v),n[a+2+96]=n[a+1+64]=n[a+0+32]=Kt(w,h,g),n[a+3+96]=n[a+2+64]=n[a+1+32]=n[a+0+0]=Kt(y,w,h),n[a+3+64]=n[a+2+32]=n[a+1+0]=Kt(_,y,w),n[a+3+32]=n[a+2+0]=Kt(L,_,y),n[a+3+0]=Kt(I,L,_)}function vn(n,a){var h=n[a+1-32],g=n[a+2-32],v=n[a+3-32],w=n[a+4-32],y=n[a+5-32],_=n[a+6-32],L=n[a+7-32];n[a+0+0]=Kt(n[a+0-32],h,g),n[a+1+0]=n[a+0+32]=Kt(h,g,v),n[a+2+0]=n[a+1+32]=n[a+0+64]=Kt(g,v,w),n[a+3+0]=n[a+2+32]=n[a+1+64]=n[a+0+96]=Kt(v,w,y),n[a+3+32]=n[a+2+64]=n[a+1+96]=Kt(w,y,_),n[a+3+64]=n[a+2+96]=Kt(y,_,L),n[a+3+96]=Kt(_,L,L)}function Ts(n,a){var h=n[a-1+0],g=n[a-1+32],v=n[a-1+64],w=n[a-1-32],y=n[a+0-32],_=n[a+1-32],L=n[a+2-32],I=n[a+3-32];n[a+0+0]=n[a+1+64]=w+y+1>>1,n[a+1+0]=n[a+2+64]=y+_+1>>1,n[a+2+0]=n[a+3+64]=_+L+1>>1,n[a+3+0]=L+I+1>>1,n[a+0+96]=Kt(v,g,h),n[a+0+64]=Kt(g,h,w),n[a+0+32]=n[a+1+96]=Kt(h,w,y),n[a+1+32]=n[a+2+96]=Kt(w,y,_),n[a+2+32]=n[a+3+96]=Kt(y,_,L),n[a+3+32]=Kt(_,L,I)}function Ds(n,a){var h=n[a+0-32],g=n[a+1-32],v=n[a+2-32],w=n[a+3-32],y=n[a+4-32],_=n[a+5-32],L=n[a+6-32],I=n[a+7-32];n[a+0+0]=h+g+1>>1,n[a+1+0]=n[a+0+64]=g+v+1>>1,n[a+2+0]=n[a+1+64]=v+w+1>>1,n[a+3+0]=n[a+2+64]=w+y+1>>1,n[a+0+32]=Kt(h,g,v),n[a+1+32]=n[a+0+96]=Kt(g,v,w),n[a+2+32]=n[a+1+96]=Kt(v,w,y),n[a+3+32]=n[a+2+96]=Kt(w,y,_),n[a+3+64]=Kt(y,_,L),n[a+3+96]=Kt(_,L,I)}function Pi(n,a){var h=n[a-1+0],g=n[a-1+32],v=n[a-1+64],w=n[a-1+96];n[a+0+0]=h+g+1>>1,n[a+2+0]=n[a+0+32]=g+v+1>>1,n[a+2+32]=n[a+0+64]=v+w+1>>1,n[a+1+0]=Kt(h,g,v),n[a+3+0]=n[a+1+32]=Kt(g,v,w),n[a+3+32]=n[a+1+64]=Kt(v,w,w),n[a+3+64]=n[a+2+64]=n[a+0+96]=n[a+1+96]=n[a+2+96]=n[a+3+96]=w}function Xi(n,a){var h=n[a-1+0],g=n[a-1+32],v=n[a-1+64],w=n[a-1+96],y=n[a-1-32],_=n[a+0-32],L=n[a+1-32],I=n[a+2-32];n[a+0+0]=n[a+2+32]=h+y+1>>1,n[a+0+32]=n[a+2+64]=g+h+1>>1,n[a+0+64]=n[a+2+96]=v+g+1>>1,n[a+0+96]=w+v+1>>1,n[a+3+0]=Kt(_,L,I),n[a+2+0]=Kt(y,_,L),n[a+1+0]=n[a+3+32]=Kt(h,y,_),n[a+1+32]=n[a+3+64]=Kt(g,h,y),n[a+1+64]=n[a+3+96]=Kt(v,g,h),n[a+1+96]=Kt(w,v,g)}function ii(n,a){var h;for(h=0;8>h;++h)i(n,a+32*h,n,a-32,8)}function qs(n,a){var h;for(h=0;8>h;++h)o(n,a,n[a-1],8),a+=32}function wn(n,a,h){var g;for(g=0;8>g;++g)o(a,h+32*g,n,8)}function Us(n,a){var h,g=8;for(h=0;8>h;++h)g+=n[a+h-32]+n[a-1+32*h];wn(g>>4,n,a)}function Zi(n,a){var h,g=4;for(h=0;8>h;++h)g+=n[a+h-32];wn(g>>3,n,a)}function Qi(n,a){var h,g=4;for(h=0;8>h;++h)g+=n[a-1+32*h];wn(g>>3,n,a)}function Ma(n,a){wn(128,n,a)}function yn(n,a,h){var g=n[a-h],v=n[a+0],w=3*(v-g)+zs[1020+n[a-2*h]-n[a+h]],y=Wa[112+(w+4>>3)];n[a-h]=Lr[255+g+Wa[112+(w+3>>3)]],n[a+0]=Lr[255+v-y]}function ta(n,a,h,g){var v=n[a+0],w=n[a+h];return Dr[255+n[a-2*h]-n[a-h]]>g||Dr[255+w-v]>g}function Ii(n,a,h,g){return 4*Dr[255+n[a-h]-n[a+0]]+Dr[255+n[a-2*h]-n[a+h]]<=g}function ea(n,a,h,g,v){var w=n[a-3*h],y=n[a-2*h],_=n[a-h],L=n[a+0],I=n[a+h],H=n[a+2*h],Z=n[a+3*h];return 4*Dr[255+_-L]+Dr[255+y-I]>g?0:Dr[255+n[a-4*h]-w]<=v&&Dr[255+w-y]<=v&&Dr[255+y-_]<=v&&Dr[255+Z-H]<=v&&Dr[255+H-I]<=v&&Dr[255+I-L]<=v}function ai(n,a,h,g){var v=2*g+1;for(g=0;16>g;++g)Ii(n,a+g,h,v)&&yn(n,a+g,h)}function ra(n,a,h,g){var v=2*g+1;for(g=0;16>g;++g)Ii(n,a+g*h,1,v)&&yn(n,a+g*h,1)}function Ra(n,a,h,g){var v;for(v=3;0<v;--v)ai(n,a+=4*h,h,g)}function Ta(n,a,h,g){var v;for(v=3;0<v;--v)ra(n,a+=4,h,g)}function xn(n,a,h,g,v,w,y,_){for(w=2*w+1;0<v--;){if(ea(n,a,h,w,y))if(ta(n,a,h,_))yn(n,a,h);else{var L=n,I=a,H=h,Z=L[I-2*H],C=L[I-H],W=L[I+0],K=L[I+H],st=L[I+2*H],X=27*(ht=zs[1020+3*(W-C)+zs[1020+Z-K]])+63>>7,lt=18*ht+63>>7,ht=9*ht+63>>7;L[I-3*H]=Lr[255+L[I-3*H]+ht],L[I-2*H]=Lr[255+Z+lt],L[I-H]=Lr[255+C+X],L[I+0]=Lr[255+W-X],L[I+H]=Lr[255+K-lt],L[I+2*H]=Lr[255+st-ht]}a+=g}}function _n(n,a,h,g,v,w,y,_){for(w=2*w+1;0<v--;){if(ea(n,a,h,w,y))if(ta(n,a,h,_))yn(n,a,h);else{var L=n,I=a,H=h,Z=L[I-H],C=L[I+0],W=L[I+H],K=Wa[112+(4+(st=3*(C-Z))>>3)],st=Wa[112+(st+3>>3)],X=K+1>>1;L[I-2*H]=Lr[255+L[I-2*H]+X],L[I-H]=Lr[255+Z+st],L[I+0]=Lr[255+C-K],L[I+H]=Lr[255+W-X]}a+=g}}function Da(n,a,h,g,v,w){xn(n,a,h,1,16,g,v,w)}function si(n,a,h,g,v,w){xn(n,a,1,h,16,g,v,w)}function qa(n,a,h,g,v,w){var y;for(y=3;0<y;--y)_n(n,a+=4*h,h,1,16,g,v,w)}function l(n,a,h,g,v,w){var y;for(y=3;0<y;--y)_n(n,a+=4,1,h,16,g,v,w)}function b(n,a,h,g,v,w,y,_){xn(n,a,v,1,8,w,y,_),xn(h,g,v,1,8,w,y,_)}function F(n,a,h,g,v,w,y,_){xn(n,a,1,v,8,w,y,_),xn(h,g,1,v,8,w,y,_)}function T(n,a,h,g,v,w,y,_){_n(n,a+4*v,v,1,8,w,y,_),_n(h,g+4*v,v,1,8,w,y,_)}function $(n,a,h,g,v,w,y,_){_n(n,a+4,1,v,8,w,y,_),_n(h,g+4,1,v,8,w,y,_)}function ut(){this.ba=new le,this.ec=[],this.cc=[],this.Mc=[],this.Dc=this.Nc=this.dc=this.fc=0,this.Oa=new ve,this.memory=0,this.Ib="OutputFunc",this.Jb="OutputAlphaFunc",this.Nd="OutputRowFunc"}function mt(){this.data=[],this.offset=this.kd=this.ha=this.w=0,this.na=[],this.xa=this.gb=this.Ja=this.Sa=this.P=0}function Ft(){this.nc=this.Ea=this.b=this.hc=0,this.K=[],this.w=0}function Bt(){this.ua=0,this.Wa=new ae,this.vb=new ae,this.md=this.xc=this.wc=0,this.vc=[],this.Wb=0,this.Ya=new it,this.yc=new q}function $t(){this.xb=this.a=0,this.l=new Li,this.ca=new le,this.V=[],this.Ba=0,this.Ta=[],this.Ua=0,this.m=new j,this.Pb=0,this.wd=new j,this.Ma=this.$=this.C=this.i=this.c=this.xd=0,this.s=new Bt,this.ab=0,this.gc=f(4,Ft),this.Oc=0}function re(){this.Lc=this.Z=this.$a=this.i=this.c=0,this.l=new Li,this.ic=0,this.ca=[],this.tb=0,this.qd=null,this.rd=0}function ge(n,a,h,g,v,w,y){for(n=n==null?0:n[a+0],a=0;a<y;++a)v[w+a]=n+h[g+a]&255,n=v[w+a]}function je(n,a,h,g,v,w,y){var _;if(n==null)ge(null,null,h,g,v,w,y);else for(_=0;_<y;++_)v[w+_]=n[a+_]+h[g+_]&255}function Je(n,a,h,g,v,w,y){if(n==null)ge(null,null,h,g,v,w,y);else{var _,L=n[a+0],I=L,H=L;for(_=0;_<y;++_)I=H+(L=n[a+_])-I,H=h[g+_]+(-256&I?0>I?0:255:I)&255,I=L,v[w+_]=H}}function Pe(n,a,h,g){var v=a.width,w=a.o;if(e(n!=null&&a!=null),0>h||0>=g||h+g>w)return null;if(!n.Cc){if(n.ga==null){var y;if(n.ga=new re,(y=n.ga==null)||(y=a.width*a.o,e(n.Gb.length==0),n.Gb=s(y),n.Uc=0,n.Gb==null?y=0:(n.mb=n.Gb,n.nb=n.Uc,n.rc=null,y=1),y=!y),!y){y=n.ga;var _=n.Fa,L=n.P,I=n.qc,H=n.mb,Z=n.nb,C=L+1,W=I-1,K=y.l;if(e(_!=null&&H!=null&&a!=null),Wn[0]=null,Wn[1]=ge,Wn[2]=je,Wn[3]=Je,y.ca=H,y.tb=Z,y.c=a.width,y.i=a.height,e(0<y.c&&0<y.i),1>=I)a=0;else if(y.$a=3&_[L+0],y.Z=_[L+0]>>2&3,y.Lc=_[L+0]>>4&3,L=_[L+0]>>6&3,0>y.$a||1<y.$a||4<=y.Z||1<y.Lc||L)a=0;else if(K.put=Gt,K.ac=Qr,K.bc=pn,K.ma=y,K.width=a.width,K.height=a.height,K.Da=a.Da,K.v=a.v,K.va=a.va,K.j=a.j,K.o=a.o,y.$a)t:{e(y.$a==1),a=ti();e:for(;;){if(a==null){a=0;break t}if(e(y!=null),y.mc=a,a.c=y.c,a.i=y.i,a.l=y.l,a.l.ma=y,a.l.width=y.c,a.l.height=y.i,a.a=0,ft(a.m,_,C,W),!en(y.c,y.i,1,a,null)||(a.ab==1&&a.gc[0].hc==3&&zr(a.s)?(y.ic=1,_=a.c*a.i,a.Ta=null,a.Ua=0,a.V=s(_),a.Ba=0,a.V==null?(a.a=1,a=0):a=1):(y.ic=0,a=ei(a,y.c)),!a))break e;a=1;break t}y.mc=null,a=0}else a=W>=y.c*y.i;y=!a}if(y)return null;n.ga.Lc!=1?n.Ga=0:g=w-h}e(n.ga!=null),e(h+g<=w);t:{if(a=(_=n.ga).c,w=_.l.o,_.$a==0){if(C=n.rc,W=n.Vc,K=n.Fa,L=n.P+1+h*a,I=n.mb,H=n.nb+h*a,e(L<=n.P+n.qc),_.Z!=0)for(e(Wn[_.Z]!=null),y=0;y<g;++y)Wn[_.Z](C,W,K,L,I,H,a),C=I,W=H,H+=a,L+=a;else for(y=0;y<g;++y)i(I,H,K,L,a),C=I,W=H,H+=a,L+=a;n.rc=C,n.Vc=W}else{if(e(_.mc!=null),a=h+g,e((y=_.mc)!=null),e(a<=y.i),y.C>=a)a=1;else if(_.ic||Gr(),_.ic){_=y.V,C=y.Ba,W=y.c;var st=y.i,X=(K=1,L=y.$/W,I=y.$%W,H=y.m,Z=y.s,y.$),lt=W*st,ht=W*a,wt=Z.wc,bt=X<ht?ir(Z,I,L):null;e(X<=lt),e(a<=st),e(zr(Z));e:for(;;){for(;!H.h&&X<ht;){if(I&wt||(bt=ir(Z,I,L)),e(bt!=null),Q(H),256>(st=Be(bt.G[0],bt.H[0],H)))_[C+X]=st,++X,++I>=W&&(I=0,++L<=a&&!(L%16)&&Hr(y,L));else{if(!(280>st)){K=0;break e}st=Er(st-256,H);var Mt,Pt=Be(bt.G[4],bt.H[4],H);if(Q(H),!(X>=(Pt=Or(W,Pt=Er(Pt,H)))&<-X>=st)){K=0;break e}for(Mt=0;Mt<st;++Mt)_[C+X+Mt]=_[C+X+Mt-Pt];for(X+=st,I+=st;I>=W;)I-=W,++L<=a&&!(L%16)&&Hr(y,L);X<ht&&I&wt&&(bt=ir(Z,I,L))}e(H.h==V(H))}Hr(y,L>a?a:L);break e}!K||H.h&&X<lt?(K=0,y.a=H.h?5:3):y.$=X,a=K}else a=Wr(y,y.V,y.Ba,y.c,y.i,a,_i);if(!a){g=0;break t}}h+g>=w&&(n.Cc=1),g=1}if(!g)return null;if(n.Cc&&((g=n.ga)!=null&&(g.mc=null),n.ga=null,0<n.Ga))return alert("todo:WebPDequantizeLevels"),null}return n.nb+h*v}function Xe(n,a,h,g,v,w){for(;0<v--;){var y,_=n,L=a+(h?1:0),I=n,H=a+(h?0:3);for(y=0;y<g;++y){var Z=I[H+4*y];Z!=255&&(Z*=32897,_[L+4*y+0]=_[L+4*y+0]*Z>>23,_[L+4*y+1]=_[L+4*y+1]*Z>>23,_[L+4*y+2]=_[L+4*y+2]*Z>>23)}a+=w}}function $e(n,a,h,g,v){for(;0<g--;){var w;for(w=0;w<h;++w){var y=n[a+2*w+0],_=15&(I=n[a+2*w+1]),L=4369*_,I=(240&I|I>>4)*L>>16;n[a+2*w+0]=(240&y|y>>4)*L>>16&240|(15&y|y<<4)*L>>16>>4&15,n[a+2*w+1]=240&I|_}a+=v}}function ar(n,a,h,g,v,w,y,_){var L,I,H=255;for(I=0;I<v;++I){for(L=0;L<g;++L){var Z=n[a+L];w[y+4*L]=Z,H&=Z}a+=h,y+=_}return H!=255}function An(n,a,h,g,v){var w;for(w=0;w<v;++w)h[g+w]=n[a+w]>>8}function Gr(){pa=Xe,zo=$e,Ho=ar,Wo=An}function Nn(n,a,h){z[n]=function(g,v,w,y,_,L,I,H,Z,C,W,K,st,X,lt,ht,wt){var bt,Mt=wt-1>>1,Pt=_[L+0]|I[H+0]<<16,ne=Z[C+0]|W[K+0]<<16;e(g!=null);var Et=3*Pt+ne+131074>>2;for(a(g[v+0],255&Et,Et>>16,st,X),w!=null&&(Et=3*ne+Pt+131074>>2,a(w[y+0],255&Et,Et>>16,lt,ht)),bt=1;bt<=Mt;++bt){var fe=_[L+bt]|I[H+bt]<<16,Qe=Z[C+bt]|W[K+bt]<<16,ie=Pt+fe+ne+Qe+524296,Ot=ie+2*(fe+ne)>>3;Et=Ot+Pt>>1,Pt=(ie=ie+2*(Pt+Qe)>>3)+fe>>1,a(g[v+2*bt-1],255&Et,Et>>16,st,X+(2*bt-1)*h),a(g[v+2*bt-0],255&Pt,Pt>>16,st,X+(2*bt-0)*h),w!=null&&(Et=ie+ne>>1,Pt=Ot+Qe>>1,a(w[y+2*bt-1],255&Et,Et>>16,lt,ht+(2*bt-1)*h),a(w[y+2*bt+0],255&Pt,Pt>>16,lt,ht+(2*bt+0)*h)),Pt=fe,ne=Qe}1&wt||(Et=3*Pt+ne+131074>>2,a(g[v+wt-1],255&Et,Et>>16,st,X+(wt-1)*h),w!=null&&(Et=3*ne+Pt+131074>>2,a(w[y+wt-1],255&Et,Et>>16,lt,ht+(wt-1)*h)))}}function na(){qr[Va]=kh,qr[Ga]=el,qr[Ko]=Ph,qr[Ya]=rl,qr[Ja]=nl,qr[Hs]=il,qr[Xo]=Ih,qr[Ws]=el,qr[Vs]=rl,qr[$a]=nl,qr[Gs]=il}function Ci(n){return n&-16384?0>n?0:255:n>>Ch}function jn(n,a){return Ci((19077*n>>8)+(26149*a>>8)-14234)}function oi(n,a,h){return Ci((19077*n>>8)-(6419*a>>8)-(13320*h>>8)+8708)}function li(n,a){return Ci((19077*n>>8)+(33050*a>>8)-17685)}function Bn(n,a,h,g,v){g[v+0]=jn(n,h),g[v+1]=oi(n,a,h),g[v+2]=li(n,a)}function sr(n,a,h,g,v){g[v+0]=li(n,a),g[v+1]=oi(n,a,h),g[v+2]=jn(n,h)}function ui(n,a,h,g,v){var w=oi(n,a,h);a=w<<3&224|li(n,a)>>3,g[v+0]=248&jn(n,h)|w>>5,g[v+1]=a}function hi(n,a,h,g,v){var w=240&li(n,a)|15;g[v+0]=240&jn(n,h)|oi(n,a,h)>>4,g[v+1]=w}function ia(n,a,h,g,v){g[v+0]=255,Bn(n,a,h,g,v+1)}function aa(n,a,h,g,v){sr(n,a,h,g,v),g[v+3]=255}function mr(n,a,h,g,v){Bn(n,a,h,g,v),g[v+3]=255}function Ln(n,a,h){z[n]=function(g,v,w,y,_,L,I,H,Z){for(var C=H+(-2&Z)*h;H!=C;)a(g[v+0],w[y+0],_[L+0],I,H),a(g[v+1],w[y+0],_[L+0],I,H+h),v+=2,++y,++L,H+=2*h;1&Z&&a(g[v+0],w[y+0],_[L+0],I,H)}}function Fi(n,a,h){return h==0?n==0?a==0?6:5:a==0?4:0:h}function Ua(n,a,h,g,v){switch(n>>>30){case 3:pi(a,h,g,v,0);break;case 2:Tr(a,h,g,v);break;case 1:we(a,h,g,v)}}function Rr(n,a){var h,g,v=a.M,w=a.Nb,y=n.oc,_=n.pc+40,L=n.oc,I=n.pc+584,H=n.oc,Z=n.pc+600;for(h=0;16>h;++h)y[_+32*h-1]=129;for(h=0;8>h;++h)L[I+32*h-1]=129,H[Z+32*h-1]=129;for(0<v?y[_-1-32]=L[I-1-32]=H[Z-1-32]=129:(o(y,_-32-1,127,21),o(L,I-32-1,127,9),o(H,Z-32-1,127,9)),g=0;g<n.za;++g){var C=a.ya[a.aa+g];if(0<g){for(h=-1;16>h;++h)i(y,_+32*h-4,y,_+32*h+12,4);for(h=-1;8>h;++h)i(L,I+32*h-4,L,I+32*h+4,4),i(H,Z+32*h-4,H,Z+32*h+4,4)}var W=n.Gd,K=n.Hd+g,st=C.ad,X=C.Hc;if(0<v&&(i(y,_-32,W[K].y,0,16),i(L,I-32,W[K].f,0,8),i(H,Z-32,W[K].ea,0,8)),C.Za){var lt=y,ht=_-32+16;for(0<v&&(g>=n.za-1?o(lt,ht,W[K].y[15],4):i(lt,ht,W[K+1].y,0,4)),h=0;4>h;h++)lt[ht+128+h]=lt[ht+256+h]=lt[ht+384+h]=lt[ht+0+h];for(h=0;16>h;++h,X<<=2)lt=y,ht=_+sl[h],Yr[C.Ob[h]](lt,ht),Ua(X,st,16*+h,lt,ht)}else if(lt=Fi(g,v,C.Ob[0]),Hn[lt](y,_),X!=0)for(h=0;16>h;++h,X<<=2)Ua(X,st,16*+h,y,_+sl[h]);for(h=C.Gc,lt=Fi(g,v,C.Dd),Pn[lt](L,I),Pn[lt](H,Z),X=st,lt=L,ht=I,255&(C=0|h)&&(170&C?ln(X,256,lt,ht):Ae(X,256,lt,ht)),C=H,X=Z,255&(h>>=8)&&(170&h?ln(st,320,C,X):Ae(st,320,C,X)),v<n.Ub-1&&(i(W[K].y,0,y,_+480,16),i(W[K].f,0,L,I+224,8),i(W[K].ea,0,H,Z+224,8)),h=8*w*n.B,W=n.sa,K=n.ta+16*g+16*w*n.R,st=n.qa,C=n.ra+8*g+h,X=n.Ha,lt=n.Ia+8*g+h,h=0;16>h;++h)i(W,K+h*n.R,y,_+32*h,16);for(h=0;8>h;++h)i(st,C+h*n.B,L,I+32*h,8),i(X,lt+h*n.B,H,Z+32*h,8)}}function ci(n,a,h,g,v,w,y,_,L){var I=[0],H=[0],Z=0,C=L!=null?L.kd:0,W=L??new mt;if(n==null||12>h)return 7;W.data=n,W.w=a,W.ha=h,a=[a],h=[h],W.gb=[W.gb];t:{var K=a,st=h,X=W.gb;if(e(n!=null),e(st!=null),e(X!=null),X[0]=0,12<=st[0]&&!t(n,K[0],"RIFF")){if(t(n,K[0]+8,"WEBP")){X=3;break t}var lt=zt(n,K[0]+4);if(12>lt||4294967286<lt){X=3;break t}if(C&<>st[0]-8){X=7;break t}X[0]=lt,K[0]+=12,st[0]-=12}X=0}if(X!=0)return X;for(lt=0<W.gb[0],h=h[0];;){t:{var ht=n;st=a,X=h;var wt=I,bt=H,Mt=K=[0];if((Et=Z=[Z])[0]=0,8>X[0])X=7;else{if(!t(ht,st[0],"VP8X")){if(zt(ht,st[0]+4)!=10){X=3;break t}if(18>X[0]){X=7;break t}var Pt=zt(ht,st[0]+8),ne=1+kt(ht,st[0]+12);if(2147483648<=ne*(ht=1+kt(ht,st[0]+15))){X=3;break t}Mt!=null&&(Mt[0]=Pt),wt!=null&&(wt[0]=ne),bt!=null&&(bt[0]=ht),st[0]+=18,X[0]-=18,Et[0]=1}X=0}}if(Z=Z[0],K=K[0],X!=0)return X;if(st=!!(2&K),!lt&&Z)return 3;if(w!=null&&(w[0]=!!(16&K)),y!=null&&(y[0]=st),_!=null&&(_[0]=0),y=I[0],K=H[0],Z&&st&&L==null){X=0;break}if(4>h){X=7;break}if(lt&&Z||!lt&&!Z&&!t(n,a[0],"ALPH")){h=[h],W.na=[W.na],W.P=[W.P],W.Sa=[W.Sa];t:{Pt=n,X=a,lt=h;var Et=W.gb;wt=W.na,bt=W.P,Mt=W.Sa,ne=22,e(Pt!=null),e(lt!=null),ht=X[0];var fe=lt[0];for(e(wt!=null),e(Mt!=null),wt[0]=null,bt[0]=null,Mt[0]=0;;){if(X[0]=ht,lt[0]=fe,8>fe){X=7;break t}var Qe=zt(Pt,ht+4);if(4294967286<Qe){X=3;break t}var ie=8+Qe+1&-2;if(ne+=ie,0<Et&&ne>Et){X=3;break t}if(!t(Pt,ht,"VP8 ")||!t(Pt,ht,"VP8L")){X=0;break t}if(fe[0]<ie){X=7;break t}t(Pt,ht,"ALPH")||(wt[0]=Pt,bt[0]=ht+8,Mt[0]=Qe),ht+=ie,fe-=ie}}if(h=h[0],W.na=W.na[0],W.P=W.P[0],W.Sa=W.Sa[0],X!=0)break}h=[h],W.Ja=[W.Ja],W.xa=[W.xa];t:if(Et=n,X=a,lt=h,wt=W.gb[0],bt=W.Ja,Mt=W.xa,Pt=X[0],ht=!t(Et,Pt,"VP8 "),ne=!t(Et,Pt,"VP8L"),e(Et!=null),e(lt!=null),e(bt!=null),e(Mt!=null),8>lt[0])X=7;else{if(ht||ne){if(Et=zt(Et,Pt+4),12<=wt&&Et>wt-12){X=3;break t}if(C&&Et>lt[0]-8){X=7;break t}bt[0]=Et,X[0]+=8,lt[0]-=8,Mt[0]=ne}else Mt[0]=5<=lt[0]&&Et[Pt+0]==47&&!(Et[Pt+4]>>5),bt[0]=lt[0];X=0}if(h=h[0],W.Ja=W.Ja[0],W.xa=W.xa[0],a=a[0],X!=0)break;if(4294967286<W.Ja)return 3;if(_==null||st||(_[0]=W.xa?2:1),y=[y],K=[K],W.xa){if(5>h){X=7;break}_=y,C=K,st=w,n==null||5>h?n=0:5<=h&&n[a+0]==47&&!(n[a+4]>>5)?(lt=[0],Et=[0],wt=[0],ft(bt=new j,n,a,h),gn(bt,lt,Et,wt)?(_!=null&&(_[0]=lt[0]),C!=null&&(C[0]=Et[0]),st!=null&&(st[0]=wt[0]),n=1):n=0):n=0}else{if(10>h){X=7;break}_=K,n==null||10>h||!Ca(n,a+3,h-3)?n=0:(C=n[a+0]|n[a+1]<<8|n[a+2]<<16,st=16383&(n[a+7]<<8|n[a+6]),n=16383&(n[a+9]<<8|n[a+8]),1&C||3<(C>>1&7)||!(C>>4&1)||C>>5>=W.Ja||!st||!n?n=0:(y&&(y[0]=st),_&&(_[0]=n),n=1))}if(!n||(y=y[0],K=K[0],Z&&(I[0]!=y||H[0]!=K)))return 3;L!=null&&(L[0]=W,L.offset=a-L.w,e(4294967286>a-L.w),e(L.offset==L.ha-h));break}return X==0||X==7&&Z&&L==null?(w!=null&&(w[0]|=W.na!=null&&0<W.na.length),g!=null&&(g[0]=y),v!=null&&(v[0]=K),0):X}function sa(n,a,h){var g=a.width,v=a.height,w=0,y=0,_=g,L=v;if(a.Da=n!=null&&0<n.Da,a.Da&&(_=n.cd,L=n.bd,w=n.v,y=n.j,11>h||(w&=-2,y&=-2),0>w||0>y||0>=_||0>=L||w+_>g||y+L>v))return 0;if(a.v=w,a.j=y,a.va=w+_,a.o=y+L,a.U=_,a.T=L,a.da=n!=null&&0<n.da,a.da){if(!Ht(_,L,h=[n.ib],w=[n.hb]))return 0;a.ib=h[0],a.hb=w[0]}return a.ob=n!=null&&n.ob,a.Kb=n==null||!n.Sd,a.da&&(a.ob=a.ib<3*g/4&&a.hb<3*v/4,a.Kb=0),1}function oa(n){if(n==null)return 2;if(11>n.S){var a=n.f.RGBA;a.fb+=(n.height-1)*a.A,a.A=-a.A}else a=n.f.kb,n=n.height,a.O+=(n-1)*a.fa,a.fa=-a.fa,a.N+=(n-1>>1)*a.Ab,a.Ab=-a.Ab,a.W+=(n-1>>1)*a.Db,a.Db=-a.Db,a.F!=null&&(a.J+=(n-1)*a.lb,a.lb=-a.lb);return 0}function Mn(n,a,h,g){if(g==null||0>=n||0>=a)return 2;if(h!=null){if(h.Da){var v=h.cd,w=h.bd,y=-2&h.v,_=-2&h.j;if(0>y||0>_||0>=v||0>=w||y+v>n||_+w>a)return 2;n=v,a=w}if(h.da){if(!Ht(n,a,v=[h.ib],w=[h.hb]))return 2;n=v[0],a=w[0]}}g.width=n,g.height=a;t:{var L=g.width,I=g.height;if(n=g.S,0>=L||0>=I||!(n>=Va&&13>n))n=2;else{if(0>=g.Rd&&g.sd==null){y=w=v=a=0;var H=(_=L*ol[n])*I;if(11>n||(w=(I+1)/2*(a=(L+1)/2),n==12&&(y=(v=L)*I)),(I=s(H+2*w+y))==null){n=1;break t}g.sd=I,11>n?((L=g.f.RGBA).eb=I,L.fb=0,L.A=_,L.size=H):((L=g.f.kb).y=I,L.O=0,L.fa=_,L.Fd=H,L.f=I,L.N=0+H,L.Ab=a,L.Cd=w,L.ea=I,L.W=0+H+w,L.Db=a,L.Ed=w,n==12&&(L.F=I,L.J=0+H+2*w),L.Tc=y,L.lb=v)}if(a=1,v=g.S,w=g.width,y=g.height,v>=Va&&13>v)if(11>v)n=g.f.RGBA,a&=(_=Math.abs(n.A))*(y-1)+w<=n.size,a&=_>=w*ol[v],a&=n.eb!=null;else{n=g.f.kb,_=(w+1)/2,H=(y+1)/2,L=Math.abs(n.fa),I=Math.abs(n.Ab);var Z=Math.abs(n.Db),C=Math.abs(n.lb),W=C*(y-1)+w;a&=L*(y-1)+w<=n.Fd,a&=I*(H-1)+_<=n.Cd,a=(a&=Z*(H-1)+_<=n.Ed)&L>=w&I>=_&Z>=_,a&=n.y!=null,a&=n.f!=null,a&=n.ea!=null,v==12&&(a&=C>=w,a&=W<=n.Tc,a&=n.F!=null)}else a=0;n=a?0:2}}return n!=0||h!=null&&h.fd&&(n=oa(g)),n}var fi=64,Ar=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535,131071,262143,524287,1048575,2097151,4194303,8388607,16777215],Nr=24,Rn=32,Sn=8,Tn=[0,0,1,1,2,2,2,2,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7];It("Predictor0","PredictorAdd0"),z.Predictor0=function(){return 4278190080},z.Predictor1=function(n){return n},z.Predictor2=function(n,a,h){return a[h+0]},z.Predictor3=function(n,a,h){return a[h+1]},z.Predictor4=function(n,a,h){return a[h-1]},z.Predictor5=function(n,a,h){return Dt(Dt(n,a[h+1]),a[h+0])},z.Predictor6=function(n,a,h){return Dt(n,a[h-1])},z.Predictor7=function(n,a,h){return Dt(n,a[h+0])},z.Predictor8=function(n,a,h){return Dt(a[h-1],a[h+0])},z.Predictor9=function(n,a,h){return Dt(a[h+0],a[h+1])},z.Predictor10=function(n,a,h){return Dt(Dt(n,a[h-1]),Dt(a[h+0],a[h+1]))},z.Predictor11=function(n,a,h){var g=a[h+0];return 0>=Zt(g>>24&255,n>>24&255,(a=a[h-1])>>24&255)+Zt(g>>16&255,n>>16&255,a>>16&255)+Zt(g>>8&255,n>>8&255,a>>8&255)+Zt(255&g,255&n,255&a)?g:n},z.Predictor12=function(n,a,h){var g=a[h+0];return(be((n>>24&255)+(g>>24&255)-((a=a[h-1])>>24&255))<<24|be((n>>16&255)+(g>>16&255)-(a>>16&255))<<16|be((n>>8&255)+(g>>8&255)-(a>>8&255))<<8|be((255&n)+(255&g)-(255&a)))>>>0},z.Predictor13=function(n,a,h){var g=a[h-1];return(ue((n=Dt(n,a[h+0]))>>24&255,g>>24&255)<<24|ue(n>>16&255,g>>16&255)<<16|ue(n>>8&255,g>>8&255)<<8|ue(255&n,255&g))>>>0};var la=z.PredictorAdd0;z.PredictorAdd1=ce,It("Predictor2","PredictorAdd2"),It("Predictor3","PredictorAdd3"),It("Predictor4","PredictorAdd4"),It("Predictor5","PredictorAdd5"),It("Predictor6","PredictorAdd6"),It("Predictor7","PredictorAdd7"),It("Predictor8","PredictorAdd8"),It("Predictor9","PredictorAdd9"),It("Predictor10","PredictorAdd10"),It("Predictor11","PredictorAdd11"),It("Predictor12","PredictorAdd12"),It("Predictor13","PredictorAdd13");var Ei=z.PredictorAdd2;Rt("ColorIndexInverseTransform","MapARGB","32b",function(n){return n>>8&255},function(n){return n}),Rt("VP8LColorIndexInverseTransformAlpha","MapAlpha","8b",function(n){return n},function(n){return n>>8&255});var qe,za=z.ColorIndexInverseTransform,sn=z.MapARGB,on=z.VP8LColorIndexInverseTransformAlpha,ua=z.MapAlpha,ha=z.VP8LPredictorsAdd=[];ha.length=16,(z.VP8LPredictors=[]).length=16,(z.VP8LPredictorsAdd_C=[]).length=16,(z.VP8LPredictors_C=[]).length=16;var ca,fa,Dn,qn,Un,di,zn,pi,Tr,ln,we,Ae,Ue,Ze,kn,da,Oi,Ha,Mo,Ro,To,Do,qo,Uo,pa,zo,Ho,Wo,Vo=s(511),Go=s(2041),Yo=s(225),Jo=s(767),$o=0,zs=Go,Wa=Yo,Lr=Jo,Dr=Vo,Va=0,Ga=1,Ko=2,Ya=3,Ja=4,Hs=5,Xo=6,Ws=7,Vs=8,$a=9,Gs=10,dh=[2,3,7],ph=[3,3,11],Zo=[280,256,256,256,40],gh=[0,1,1,1,0],mh=[17,18,0,1,2,3,4,5,16,6,7,8,9,10,11,12,13,14,15],bh=[24,7,23,25,40,6,39,41,22,26,38,42,56,5,55,57,21,27,54,58,37,43,72,4,71,73,20,28,53,59,70,74,36,44,88,69,75,52,60,3,87,89,19,29,86,90,35,45,68,76,85,91,51,61,104,2,103,105,18,30,102,106,34,46,84,92,67,77,101,107,50,62,120,1,119,121,83,93,17,31,100,108,66,78,118,122,33,47,117,123,49,63,99,109,82,94,0,116,124,65,79,16,32,98,110,48,115,125,81,95,64,114,126,97,111,80,113,127,96,112],vh=[2954,2956,2958,2962,2970,2986,3018,3082,3212,3468,3980,5004],wh=8,Ys=[4,5,6,7,8,9,10,10,11,12,13,14,15,16,17,17,18,19,20,20,21,21,22,22,23,23,24,25,25,26,27,28,29,30,31,32,33,34,35,36,37,37,38,39,40,41,42,43,44,45,46,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,76,77,78,79,80,81,82,83,84,85,86,87,88,89,91,93,95,96,98,100,101,102,104,106,108,110,112,114,116,118,122,124,126,128,130,132,134,136,138,140,143,145,148,151,154,157],Js=[4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,60,62,64,66,68,70,72,74,76,78,80,82,84,86,88,90,92,94,96,98,100,102,104,106,108,110,112,114,116,119,122,125,128,131,134,137,140,143,146,149,152,155,158,161,164,167,170,173,177,181,185,189,193,197,201,205,209,213,217,221,225,229,234,239,245,249,254,259,264,269,274,279,284],ga=null,yh=[[173,148,140,0],[176,155,140,135,0],[180,157,141,134,130,0],[254,254,243,230,196,177,153,140,133,130,129,0]],xh=[0,1,4,8,5,2,3,6,9,12,13,10,7,11,14,15],Qo=[-0,1,-1,2,-2,3,4,6,-3,5,-4,-5,-6,7,-7,8,-8,-9],_h=[[[[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128]],[[253,136,254,255,228,219,128,128,128,128,128],[189,129,242,255,227,213,255,219,128,128,128],[106,126,227,252,214,209,255,255,128,128,128]],[[1,98,248,255,236,226,255,255,128,128,128],[181,133,238,254,221,234,255,154,128,128,128],[78,134,202,247,198,180,255,219,128,128,128]],[[1,185,249,255,243,255,128,128,128,128,128],[184,150,247,255,236,224,128,128,128,128,128],[77,110,216,255,236,230,128,128,128,128,128]],[[1,101,251,255,241,255,128,128,128,128,128],[170,139,241,252,236,209,255,255,128,128,128],[37,116,196,243,228,255,255,255,128,128,128]],[[1,204,254,255,245,255,128,128,128,128,128],[207,160,250,255,238,128,128,128,128,128,128],[102,103,231,255,211,171,128,128,128,128,128]],[[1,152,252,255,240,255,128,128,128,128,128],[177,135,243,255,234,225,128,128,128,128,128],[80,129,211,255,194,224,128,128,128,128,128]],[[1,1,255,128,128,128,128,128,128,128,128],[246,1,255,128,128,128,128,128,128,128,128],[255,128,128,128,128,128,128,128,128,128,128]]],[[[198,35,237,223,193,187,162,160,145,155,62],[131,45,198,221,172,176,220,157,252,221,1],[68,47,146,208,149,167,221,162,255,223,128]],[[1,149,241,255,221,224,255,255,128,128,128],[184,141,234,253,222,220,255,199,128,128,128],[81,99,181,242,176,190,249,202,255,255,128]],[[1,129,232,253,214,197,242,196,255,255,128],[99,121,210,250,201,198,255,202,128,128,128],[23,91,163,242,170,187,247,210,255,255,128]],[[1,200,246,255,234,255,128,128,128,128,128],[109,178,241,255,231,245,255,255,128,128,128],[44,130,201,253,205,192,255,255,128,128,128]],[[1,132,239,251,219,209,255,165,128,128,128],[94,136,225,251,218,190,255,255,128,128,128],[22,100,174,245,186,161,255,199,128,128,128]],[[1,182,249,255,232,235,128,128,128,128,128],[124,143,241,255,227,234,128,128,128,128,128],[35,77,181,251,193,211,255,205,128,128,128]],[[1,157,247,255,236,231,255,255,128,128,128],[121,141,235,255,225,227,255,255,128,128,128],[45,99,188,251,195,217,255,224,128,128,128]],[[1,1,251,255,213,255,128,128,128,128,128],[203,1,248,255,255,128,128,128,128,128,128],[137,1,177,255,224,255,128,128,128,128,128]]],[[[253,9,248,251,207,208,255,192,128,128,128],[175,13,224,243,193,185,249,198,255,255,128],[73,17,171,221,161,179,236,167,255,234,128]],[[1,95,247,253,212,183,255,255,128,128,128],[239,90,244,250,211,209,255,255,128,128,128],[155,77,195,248,188,195,255,255,128,128,128]],[[1,24,239,251,218,219,255,205,128,128,128],[201,51,219,255,196,186,128,128,128,128,128],[69,46,190,239,201,218,255,228,128,128,128]],[[1,191,251,255,255,128,128,128,128,128,128],[223,165,249,255,213,255,128,128,128,128,128],[141,124,248,255,255,128,128,128,128,128,128]],[[1,16,248,255,255,128,128,128,128,128,128],[190,36,230,255,236,255,128,128,128,128,128],[149,1,255,128,128,128,128,128,128,128,128]],[[1,226,255,128,128,128,128,128,128,128,128],[247,192,255,128,128,128,128,128,128,128,128],[240,128,255,128,128,128,128,128,128,128,128]],[[1,134,252,255,255,128,128,128,128,128,128],[213,62,250,255,255,128,128,128,128,128,128],[55,93,255,128,128,128,128,128,128,128,128]],[[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128]]],[[[202,24,213,235,186,191,220,160,240,175,255],[126,38,182,232,169,184,228,174,255,187,128],[61,46,138,219,151,178,240,170,255,216,128]],[[1,112,230,250,199,191,247,159,255,255,128],[166,109,228,252,211,215,255,174,128,128,128],[39,77,162,232,172,180,245,178,255,255,128]],[[1,52,220,246,198,199,249,220,255,255,128],[124,74,191,243,183,193,250,221,255,255,128],[24,71,130,219,154,170,243,182,255,255,128]],[[1,182,225,249,219,240,255,224,128,128,128],[149,150,226,252,216,205,255,171,128,128,128],[28,108,170,242,183,194,254,223,255,255,128]],[[1,81,230,252,204,203,255,192,128,128,128],[123,102,209,247,188,196,255,233,128,128,128],[20,95,153,243,164,173,255,203,128,128,128]],[[1,222,248,255,216,213,128,128,128,128,128],[168,175,246,252,235,205,255,255,128,128,128],[47,116,215,255,211,212,255,255,128,128,128]],[[1,121,236,253,212,214,255,255,128,128,128],[141,84,213,252,201,202,255,219,128,128,128],[42,80,160,240,162,185,255,205,128,128,128]],[[1,1,255,128,128,128,128,128,128,128,128],[244,1,255,128,128,128,128,128,128,128,128],[238,1,255,128,128,128,128,128,128,128,128]]]],Ah=[[[231,120,48,89,115,113,120,152,112],[152,179,64,126,170,118,46,70,95],[175,69,143,80,85,82,72,155,103],[56,58,10,171,218,189,17,13,152],[114,26,17,163,44,195,21,10,173],[121,24,80,195,26,62,44,64,85],[144,71,10,38,171,213,144,34,26],[170,46,55,19,136,160,33,206,71],[63,20,8,114,114,208,12,9,226],[81,40,11,96,182,84,29,16,36]],[[134,183,89,137,98,101,106,165,148],[72,187,100,130,157,111,32,75,80],[66,102,167,99,74,62,40,234,128],[41,53,9,178,241,141,26,8,107],[74,43,26,146,73,166,49,23,157],[65,38,105,160,51,52,31,115,128],[104,79,12,27,217,255,87,17,7],[87,68,71,44,114,51,15,186,23],[47,41,14,110,182,183,21,17,194],[66,45,25,102,197,189,23,18,22]],[[88,88,147,150,42,46,45,196,205],[43,97,183,117,85,38,35,179,61],[39,53,200,87,26,21,43,232,171],[56,34,51,104,114,102,29,93,77],[39,28,85,171,58,165,90,98,64],[34,22,116,206,23,34,43,166,73],[107,54,32,26,51,1,81,43,31],[68,25,106,22,64,171,36,225,114],[34,19,21,102,132,188,16,76,124],[62,18,78,95,85,57,50,48,51]],[[193,101,35,159,215,111,89,46,111],[60,148,31,172,219,228,21,18,111],[112,113,77,85,179,255,38,120,114],[40,42,1,196,245,209,10,25,109],[88,43,29,140,166,213,37,43,154],[61,63,30,155,67,45,68,1,209],[100,80,8,43,154,1,51,26,71],[142,78,78,16,255,128,34,197,171],[41,40,5,102,211,183,4,1,221],[51,50,17,168,209,192,23,25,82]],[[138,31,36,171,27,166,38,44,229],[67,87,58,169,82,115,26,59,179],[63,59,90,180,59,166,93,73,154],[40,40,21,116,143,209,34,39,175],[47,15,16,183,34,223,49,45,183],[46,17,33,183,6,98,15,32,183],[57,46,22,24,128,1,54,17,37],[65,32,73,115,28,128,23,128,205],[40,3,9,115,51,192,18,6,223],[87,37,9,115,59,77,64,21,47]],[[104,55,44,218,9,54,53,130,226],[64,90,70,205,40,41,23,26,57],[54,57,112,184,5,41,38,166,213],[30,34,26,133,152,116,10,32,134],[39,19,53,221,26,114,32,73,255],[31,9,65,234,2,15,1,118,73],[75,32,12,51,192,255,160,43,51],[88,31,35,67,102,85,55,186,85],[56,21,23,111,59,205,45,37,192],[55,38,70,124,73,102,1,34,98]],[[125,98,42,88,104,85,117,175,82],[95,84,53,89,128,100,113,101,45],[75,79,123,47,51,128,81,171,1],[57,17,5,71,102,57,53,41,49],[38,33,13,121,57,73,26,1,85],[41,10,67,138,77,110,90,47,114],[115,21,2,10,102,255,166,23,6],[101,29,16,10,85,128,101,196,26],[57,18,10,102,102,213,34,20,43],[117,20,15,36,163,128,68,1,26]],[[102,61,71,37,34,53,31,243,192],[69,60,71,38,73,119,28,222,37],[68,45,128,34,1,47,11,245,171],[62,17,19,70,146,85,55,62,70],[37,43,37,154,100,163,85,160,1],[63,9,92,136,28,64,32,201,85],[75,15,9,9,64,255,184,119,16],[86,6,28,5,64,255,25,248,1],[56,8,17,132,137,255,55,116,128],[58,15,20,82,135,57,26,121,40]],[[164,50,31,137,154,133,25,35,218],[51,103,44,131,131,123,31,6,158],[86,40,64,135,148,224,45,183,128],[22,26,17,131,240,154,14,1,209],[45,16,21,91,64,222,7,1,197],[56,21,39,155,60,138,23,102,213],[83,12,13,54,192,255,68,47,28],[85,26,85,85,128,128,32,146,171],[18,11,7,63,144,171,4,4,246],[35,27,10,146,174,171,12,26,128]],[[190,80,35,99,180,80,126,54,45],[85,126,47,87,176,51,41,20,32],[101,75,128,139,118,146,116,128,85],[56,41,15,176,236,85,37,9,62],[71,30,17,119,118,255,17,18,138],[101,38,60,138,55,70,43,26,142],[146,36,19,30,171,255,97,27,20],[138,45,61,62,219,1,81,188,64],[32,41,20,117,151,142,20,21,163],[112,19,12,61,195,128,48,4,24]]],Nh=[[[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[176,246,255,255,255,255,255,255,255,255,255],[223,241,252,255,255,255,255,255,255,255,255],[249,253,253,255,255,255,255,255,255,255,255]],[[255,244,252,255,255,255,255,255,255,255,255],[234,254,254,255,255,255,255,255,255,255,255],[253,255,255,255,255,255,255,255,255,255,255]],[[255,246,254,255,255,255,255,255,255,255,255],[239,253,254,255,255,255,255,255,255,255,255],[254,255,254,255,255,255,255,255,255,255,255]],[[255,248,254,255,255,255,255,255,255,255,255],[251,255,254,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[251,254,254,255,255,255,255,255,255,255,255],[254,255,254,255,255,255,255,255,255,255,255]],[[255,254,253,255,254,255,255,255,255,255,255],[250,255,254,255,254,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[217,255,255,255,255,255,255,255,255,255,255],[225,252,241,253,255,255,254,255,255,255,255],[234,250,241,250,253,255,253,254,255,255,255]],[[255,254,255,255,255,255,255,255,255,255,255],[223,254,254,255,255,255,255,255,255,255,255],[238,253,254,254,255,255,255,255,255,255,255]],[[255,248,254,255,255,255,255,255,255,255,255],[249,254,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,255,255,255,255,255,255,255,255,255],[247,254,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[252,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,254,255,255,255,255,255,255,255,255],[253,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,253,255,255,255,255,255,255,255,255],[250,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[186,251,250,255,255,255,255,255,255,255,255],[234,251,244,254,255,255,255,255,255,255,255],[251,251,243,253,254,255,254,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[236,253,254,255,255,255,255,255,255,255,255],[251,253,253,254,254,255,255,255,255,255,255]],[[255,254,254,255,255,255,255,255,255,255,255],[254,254,254,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,255,255,255,255,255,255,255,255,255],[254,254,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[248,255,255,255,255,255,255,255,255,255,255],[250,254,252,254,255,255,255,255,255,255,255],[248,254,249,253,255,255,255,255,255,255,255]],[[255,253,253,255,255,255,255,255,255,255,255],[246,253,253,255,255,255,255,255,255,255,255],[252,254,251,254,254,255,255,255,255,255,255]],[[255,254,252,255,255,255,255,255,255,255,255],[248,254,253,255,255,255,255,255,255,255,255],[253,255,254,254,255,255,255,255,255,255,255]],[[255,251,254,255,255,255,255,255,255,255,255],[245,251,254,255,255,255,255,255,255,255,255],[253,253,254,255,255,255,255,255,255,255,255]],[[255,251,253,255,255,255,255,255,255,255,255],[252,253,254,255,255,255,255,255,255,255,255],[255,254,255,255,255,255,255,255,255,255,255]],[[255,252,255,255,255,255,255,255,255,255,255],[249,255,254,255,255,255,255,255,255,255,255],[255,255,254,255,255,255,255,255,255,255,255]],[[255,255,253,255,255,255,255,255,255,255,255],[250,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]]],Lh=[0,1,2,3,6,4,5,6,6,6,6,6,6,6,6,7,0],Hn=[],Yr=[],Pn=[],Sh=1,tl=2,Wn=[],qr=[];Nn("UpsampleRgbLinePair",Bn,3),Nn("UpsampleBgrLinePair",sr,3),Nn("UpsampleRgbaLinePair",mr,4),Nn("UpsampleBgraLinePair",aa,4),Nn("UpsampleArgbLinePair",ia,4),Nn("UpsampleRgba4444LinePair",hi,2),Nn("UpsampleRgb565LinePair",ui,2);var kh=z.UpsampleRgbLinePair,Ph=z.UpsampleBgrLinePair,el=z.UpsampleRgbaLinePair,rl=z.UpsampleBgraLinePair,nl=z.UpsampleArgbLinePair,il=z.UpsampleRgba4444LinePair,Ih=z.UpsampleRgb565LinePair,Ka=16,Xa=1<<Ka-1,ma=-227,$s=482,Ch=6,al=0,Fh=s(256),Eh=s(256),Oh=s(256),jh=s(256),Bh=s($s-ma),Mh=s($s-ma);Ln("YuvToRgbRow",Bn,3),Ln("YuvToBgrRow",sr,3),Ln("YuvToRgbaRow",mr,4),Ln("YuvToBgraRow",aa,4),Ln("YuvToArgbRow",ia,4),Ln("YuvToRgba4444Row",hi,2),Ln("YuvToRgb565Row",ui,2);var sl=[0,4,8,12,128,132,136,140,256,260,264,268,384,388,392,396],Za=[0,2,8],Rh=[8,7,6,4,4,2,2,2,1,1,1,1],Th=1;this.WebPDecodeRGBA=function(n,a,h,g,v){var w=Ga,y=new ut,_=new le;y.ba=_,_.S=w,_.width=[_.width],_.height=[_.height];var L=_.width,I=_.height,H=new Vt;if(H==null||n==null)var Z=2;else e(H!=null),Z=ci(n,a,h,H.width,H.height,H.Pd,H.Qd,H.format,null);if(Z!=0?L=0:(L!=null&&(L[0]=H.width[0]),I!=null&&(I[0]=H.height[0]),L=1),L){_.width=_.width[0],_.height=_.height[0],g!=null&&(g[0]=_.width),v!=null&&(v[0]=_.height);t:{if(g=new Li,(v=new mt).data=n,v.w=a,v.ha=h,v.kd=1,a=[0],e(v!=null),((n=ci(v.data,v.w,v.ha,null,null,null,a,null,v))==0||n==7)&&a[0]&&(n=4),(a=n)==0){if(e(y!=null),g.data=v.data,g.w=v.w+v.offset,g.ha=v.ha-v.offset,g.put=Gt,g.ac=Qr,g.bc=pn,g.ma=y,v.xa){if((n=ti())==null){y=1;break t}if(function(C,W){var K=[0],st=[0],X=[0];e:for(;;){if(C==null)return 0;if(W==null)return C.a=2,0;if(C.l=W,C.a=0,ft(C.m,W.data,W.w,W.ha),!gn(C.m,K,st,X)){C.a=3;break e}if(C.xb=tl,W.width=K[0],W.height=st[0],!en(K[0],st[0],1,C,null))break e;return 1}return e(C.a!=0),0}(n,g)){if(g=(a=Mn(g.width,g.height,y.Oa,y.ba))==0){e:{g=n;r:for(;;){if(g==null){g=0;break e}if(e(g.s.yc!=null),e(g.s.Ya!=null),e(0<g.s.Wb),e((h=g.l)!=null),e((v=h.ma)!=null),g.xb!=0){if(g.ca=v.ba,g.tb=v.tb,e(g.ca!=null),!sa(v.Oa,h,Ya)){g.a=2;break r}if(!ei(g,h.width)||h.da)break r;if((h.da||Yt(g.ca.S))&&Gr(),11>g.ca.S||(alert("todo:WebPInitConvertARGBToYUV"),g.ca.f.kb.F!=null&&Gr()),g.Pb&&0<g.s.ua&&g.s.vb.X==null&&!k(g.s.vb,g.s.Wa.Xa)){g.a=1;break r}g.xb=0}if(!Wr(g,g.V,g.Ba,g.c,g.i,h.o,On))break r;v.Dc=g.Ma,g=1;break e}e(g.a!=0),g=0}g=!g}g&&(a=n.a)}else a=n.a}else{if((n=new ks)==null){y=1;break t}if(n.Fa=v.na,n.P=v.P,n.qc=v.Sa,nn(n,g)){if((a=Mn(g.width,g.height,y.Oa,y.ba))==0){if(n.Aa=0,h=y.Oa,e((v=n)!=null),h!=null){if(0<(L=0>(L=h.Md)?0:100<L?255:255*L/100)){for(I=H=0;4>I;++I)12>(Z=v.pb[I]).lc&&(Z.ia=L*Rh[0>Z.lc?0:Z.lc]>>3),H|=Z.ia;H&&(alert("todo:VP8InitRandom"),v.ia=1)}v.Ga=h.Id,100<v.Ga?v.Ga=100:0>v.Ga&&(v.Ga=0)}(function(C,W){if(C==null)return 0;if(W==null)return Ye(C,2,"NULL VP8Io parameter in VP8Decode().");if(!C.cb&&!nn(C,W))return 0;if(e(C.cb),W.ac==null||W.ac(W)){W.ob&&(C.L=0);var K=Za[C.L];if(C.L==2?(C.yb=0,C.zb=0):(C.yb=W.v-K>>4,C.zb=W.j-K>>4,0>C.yb&&(C.yb=0),0>C.zb&&(C.zb=0)),C.Va=W.o+15+K>>4,C.Hb=W.va+15+K>>4,C.Hb>C.za&&(C.Hb=C.za),C.Va>C.Ub&&(C.Va=C.Ub),0<C.L){var st=C.ed;for(K=0;4>K;++K){var X;if(C.Qa.Cb){var lt=C.Qa.Lb[K];C.Qa.Fb||(lt+=st.Tb)}else lt=st.Tb;for(X=0;1>=X;++X){var ht=C.gd[K][X],wt=lt;if(st.Pc&&(wt+=st.vd[0],X&&(wt+=st.od[0])),0<(wt=0>wt?0:63<wt?63:wt)){var bt=wt;0<st.wb&&(bt=4<st.wb?bt>>2:bt>>1)>9-st.wb&&(bt=9-st.wb),1>bt&&(bt=1),ht.dd=bt,ht.tc=2*wt+bt,ht.ld=40<=wt?2:15<=wt?1:0}else ht.tc=0;ht.La=X}}}K=0}else Ye(C,6,"Frame setup failed"),K=C.a;if(K=K==0){if(K){C.$c=0,0<C.Aa||(C.Ic=Th);e:{K=C.Ic,st=4*(bt=C.za);var Mt=32*bt,Pt=bt+1,ne=0<C.L?bt*(0<C.Aa?2:1):0,Et=(C.Aa==2?2:1)*bt;if((ht=st+832+(X=3*(16*K+Za[C.L])/2*Mt)+(lt=C.Fa!=null&&0<C.Fa.length?C.Kc.c*C.Kc.i:0))!=ht)K=0;else{if(ht>C.Vb){if(C.Vb=0,C.Ec=s(ht),C.Fc=0,C.Ec==null){K=Ye(C,1,"no memory during frame initialization.");break e}C.Vb=ht}ht=C.Ec,wt=C.Fc,C.Ac=ht,C.Bc=wt,wt+=st,C.Gd=f(Mt,Pa),C.Hd=0,C.rb=f(Pt+1,Yi),C.sb=1,C.wa=ne?f(ne,Br):null,C.Y=0,C.D.Nb=0,C.D.wa=C.wa,C.D.Y=C.Y,0<C.Aa&&(C.D.Y+=bt),e(!0),C.oc=ht,C.pc=wt,wt+=832,C.ya=f(Et,Ji),C.aa=0,C.D.ya=C.ya,C.D.aa=C.aa,C.Aa==2&&(C.D.aa+=bt),C.R=16*bt,C.B=8*bt,bt=(Mt=Za[C.L])*C.R,Mt=Mt/2*C.B,C.sa=ht,C.ta=wt+bt,C.qa=C.sa,C.ra=C.ta+16*K*C.R+Mt,C.Ha=C.qa,C.Ia=C.ra+8*K*C.B+Mt,C.$c=0,wt+=X,C.mb=lt?ht:null,C.nb=lt?wt:null,e(wt+lt<=C.Fc+C.Vb),Fa(C),o(C.Ac,C.Bc,0,st),K=1}}if(K){if(W.ka=0,W.y=C.sa,W.O=C.ta,W.f=C.qa,W.N=C.ra,W.ea=C.Ha,W.Vd=C.Ia,W.fa=C.R,W.Rc=C.B,W.F=null,W.J=0,!$o){for(K=-255;255>=K;++K)Vo[255+K]=0>K?-K:K;for(K=-1020;1020>=K;++K)Go[1020+K]=-128>K?-128:127<K?127:K;for(K=-112;112>=K;++K)Yo[112+K]=-16>K?-16:15<K?15:K;for(K=-255;510>=K;++K)Jo[255+K]=0>K?0:255<K?255:K;$o=1}zn=ki,pi=Is,ln=an,we=Oa,Ae=ja,Tr=Ps,Ue=Da,Ze=si,kn=b,da=F,Oi=qa,Ha=l,Mo=T,Ro=$,To=ai,Do=ra,qo=Ra,Uo=Ta,Yr[0]=Rs,Yr[1]=Cs,Yr[2]=Bs,Yr[3]=Ms,Yr[4]=bn,Yr[5]=Ts,Yr[6]=vn,Yr[7]=Ds,Yr[8]=Xi,Yr[9]=Pi,Hn[0]=Os,Hn[1]=Es,Hn[2]=$i,Hn[3]=Ba,Hn[4]=ni,Hn[5]=Ki,Hn[6]=js,Pn[0]=Us,Pn[1]=Fs,Pn[2]=ii,Pn[3]=qs,Pn[4]=Qi,Pn[5]=Zi,Pn[6]=Ma,K=1}else K=0}K&&(K=function(fe,Qe){for(fe.M=0;fe.M<fe.Va;++fe.M){var ie,Ot=fe.Jc[fe.M&fe.Xb],Nt=fe.m,ze=fe;for(ie=0;ie<ze.za;++ie){var te=Nt,de=ze,Ce=de.Ac,or=de.Bc+4*ie,br=de.zc,Me=de.ya[de.aa+ie];if(de.Qa.Bb?Me.$b=dt(te,de.Pa.jb[0])?2+dt(te,de.Pa.jb[2]):dt(te,de.Pa.jb[1]):Me.$b=0,de.kc&&(Me.Ad=dt(te,de.Bd)),Me.Za=!dt(te,145)+0,Me.Za){var cr=Me.Ob,vr=0;for(de=0;4>de;++de){var tr,me=br[0+de];for(tr=0;4>tr;++tr){me=Ah[Ce[or+tr]][me];for(var ye=Qo[dt(te,me[0])];0<ye;)ye=Qo[2*ye+dt(te,me[ye])];me=-ye,Ce[or+tr]=me}i(cr,vr,Ce,or,4),vr+=4,br[0+de]=me}}else me=dt(te,156)?dt(te,128)?1:3:dt(te,163)?2:0,Me.Ob[0]=me,o(Ce,or,me,4),o(br,0,me,4);Me.Dd=dt(te,142)?dt(te,114)?dt(te,183)?1:3:2:0}if(ze.m.Ka)return Ye(fe,7,"Premature end-of-partition0 encountered.");for(;fe.ja<fe.za;++fe.ja){if(ze=Ot,te=(Nt=fe).rb[Nt.sb-1],Ce=Nt.rb[Nt.sb+Nt.ja],ie=Nt.ya[Nt.aa+Nt.ja],or=Nt.kc?ie.Ad:0)te.la=Ce.la=0,ie.Za||(te.Na=Ce.Na=0),ie.Hc=0,ie.Gc=0,ie.ia=0;else{var Re,xe;if(te=Ce,Ce=ze,or=Nt.Pa.Xc,br=Nt.ya[Nt.aa+Nt.ja],Me=Nt.pb[br.$b],de=br.ad,cr=0,vr=Nt.rb[Nt.sb-1],me=tr=0,o(de,cr,0,384),br.Za)var lr=0,Jr=or[3];else{ye=s(16);var He=te.Na+vr.Na;if(He=ga(Ce,or[1],He,Me.Eb,0,ye,0),te.Na=vr.Na=(0<He)+0,1<He)zn(ye,0,de,cr);else{var yr=ye[0]+3>>3;for(ye=0;256>ye;ye+=16)de[cr+ye]=yr}lr=1,Jr=or[0]}var Ne=15&te.la,er=15&vr.la;for(ye=0;4>ye;++ye){var Sr=1&er;for(yr=xe=0;4>yr;++yr)Ne=Ne>>1|(Sr=(He=ga(Ce,Jr,He=Sr+(1&Ne),Me.Sc,lr,de,cr))>lr)<<7,xe=xe<<2|(3<He?3:1<He?2:de[cr+0]!=0),cr+=16;Ne>>=4,er=er>>1|Sr<<7,tr=(tr<<8|xe)>>>0}for(Jr=Ne,lr=er>>4,Re=0;4>Re;Re+=2){for(xe=0,Ne=te.la>>4+Re,er=vr.la>>4+Re,ye=0;2>ye;++ye){for(Sr=1&er,yr=0;2>yr;++yr)He=Sr+(1&Ne),Ne=Ne>>1|(Sr=0<(He=ga(Ce,or[2],He,Me.Qc,0,de,cr)))<<3,xe=xe<<2|(3<He?3:1<He?2:de[cr+0]!=0),cr+=16;Ne>>=2,er=er>>1|Sr<<5}me|=xe<<4*Re,Jr|=Ne<<4<<Re,lr|=(240&er)<<Re}te.la=Jr,vr.la=lr,br.Hc=tr,br.Gc=me,br.ia=43690&me?0:Me.ia,or=!(tr|me)}if(0<Nt.L&&(Nt.wa[Nt.Y+Nt.ja]=Nt.gd[ie.$b][ie.Za],Nt.wa[Nt.Y+Nt.ja].La|=!or),ze.Ka)return Ye(fe,7,"Premature end-of-file encountered.")}if(Fa(fe),Nt=Qe,ze=1,ie=(Ot=fe).D,te=0<Ot.L&&Ot.M>=Ot.zb&&Ot.M<=Ot.Va,Ot.Aa==0)e:{if(ie.M=Ot.M,ie.uc=te,Rr(Ot,ie),ze=1,ie=(xe=Ot.D).Nb,te=(me=Za[Ot.L])*Ot.R,Ce=me/2*Ot.B,ye=16*ie*Ot.R,yr=8*ie*Ot.B,or=Ot.sa,br=Ot.ta-te+ye,Me=Ot.qa,de=Ot.ra-Ce+yr,cr=Ot.Ha,vr=Ot.Ia-Ce+yr,er=(Ne=xe.M)==0,tr=Ne>=Ot.Va-1,Ot.Aa==2&&Rr(Ot,xe),xe.uc)for(Sr=(He=Ot).D.M,e(He.D.uc),xe=He.yb;xe<He.Hb;++xe){lr=xe,Jr=Sr;var wr=(kr=(ur=He).D).Nb;Re=ur.R;var kr=kr.wa[kr.Y+lr],Pr=ur.sa,xr=ur.ta+16*wr*Re+16*lr,Ir=kr.dd,Ie=kr.tc;if(Ie!=0)if(e(3<=Ie),ur.L==1)0<lr&&Do(Pr,xr,Re,Ie+4),kr.La&&Uo(Pr,xr,Re,Ie),0<Jr&&To(Pr,xr,Re,Ie+4),kr.La&&qo(Pr,xr,Re,Ie);else{var Cr=ur.B,$r=ur.qa,gi=ur.ra+8*wr*Cr+8*lr,In=ur.Ha,ur=ur.Ia+8*wr*Cr+8*lr;wr=kr.ld,0<lr&&(Ze(Pr,xr,Re,Ie+4,Ir,wr),da($r,gi,In,ur,Cr,Ie+4,Ir,wr)),kr.La&&(Ha(Pr,xr,Re,Ie,Ir,wr),Ro($r,gi,In,ur,Cr,Ie,Ir,wr)),0<Jr&&(Ue(Pr,xr,Re,Ie+4,Ir,wr),kn($r,gi,In,ur,Cr,Ie+4,Ir,wr)),kr.La&&(Oi(Pr,xr,Re,Ie,Ir,wr),Mo($r,gi,In,ur,Cr,Ie,Ir,wr))}}if(Ot.ia&&alert("todo:DitherRow"),Nt.put!=null){if(xe=16*Ne,Ne=16*(Ne+1),er?(Nt.y=Ot.sa,Nt.O=Ot.ta+ye,Nt.f=Ot.qa,Nt.N=Ot.ra+yr,Nt.ea=Ot.Ha,Nt.W=Ot.Ia+yr):(xe-=me,Nt.y=or,Nt.O=br,Nt.f=Me,Nt.N=de,Nt.ea=cr,Nt.W=vr),tr||(Ne-=me),Ne>Nt.o&&(Ne=Nt.o),Nt.F=null,Nt.J=null,Ot.Fa!=null&&0<Ot.Fa.length&&xe<Ne&&(Nt.J=Pe(Ot,Nt,xe,Ne-xe),Nt.F=Ot.mb,Nt.F==null&&Nt.F.length==0)){ze=Ye(Ot,3,"Could not decode alpha data.");break e}xe<Nt.j&&(me=Nt.j-xe,xe=Nt.j,e(!(1&me)),Nt.O+=Ot.R*me,Nt.N+=Ot.B*(me>>1),Nt.W+=Ot.B*(me>>1),Nt.F!=null&&(Nt.J+=Nt.width*me)),xe<Ne&&(Nt.O+=Nt.v,Nt.N+=Nt.v>>1,Nt.W+=Nt.v>>1,Nt.F!=null&&(Nt.J+=Nt.v),Nt.ka=xe-Nt.j,Nt.U=Nt.va-Nt.v,Nt.T=Ne-xe,ze=Nt.put(Nt))}ie+1!=Ot.Ic||tr||(i(Ot.sa,Ot.ta-te,or,br+16*Ot.R,te),i(Ot.qa,Ot.ra-Ce,Me,de+8*Ot.B,Ce),i(Ot.Ha,Ot.Ia-Ce,cr,vr+8*Ot.B,Ce))}if(!ze)return Ye(fe,6,"Output aborted.")}return 1}(C,W)),W.bc!=null&&W.bc(W),K&=1}return K?(C.cb=0,K):0})(n,g)||(a=n.a)}}else a=n.a}a==0&&y.Oa!=null&&y.Oa.fd&&(a=oa(y.ba))}y=a}w=y!=0?null:11>w?_.f.RGBA.eb:_.f.kb.y}else w=null;return w};var ol=[3,4,3,4,4,2,2,4,4,4,2,1,1]};function d(z,et){for(var N="",E=0;E<4;E++)N+=String.fromCharCode(z[et++]);return N}function m(z,et){return z[et+0]|z[et+1]<<8}function A(z,et){return(z[et+0]|z[et+1]<<8|z[et+2]<<16)>>>0}function P(z,et){return(z[et+0]|z[et+1]<<8|z[et+2]<<16|z[et+3]<<24)>>>0}new c;var p=[0],B=[0],O=[],M=new c,S=r,G=function(z,et){var N={},E=0,q=!1,U=0,it=0;if(N.frames=[],!function(x,j){for(var R=0;R<4;R++)if(x[j+R]!="RIFF".charCodeAt(R))return!0;return!1}(z,et)){for(P(z,et+=4),et+=8;et<z.length;){var ct=d(z,et),pt=P(z,et+=4);et+=4;var rt=pt+(1&pt);switch(ct){case"VP8 ":case"VP8L":N.frames[E]===void 0&&(N.frames[E]={}),(xt=N.frames[E]).src_off=q?it:et-8,xt.src_size=U+pt+8,E++,q&&(q=!1,U=0,it=0);break;case"VP8X":(xt=N.header={}).feature_flags=z[et];var ft=et+4;xt.canvas_width=1+A(z,ft),ft+=3,xt.canvas_height=1+A(z,ft),ft+=3;break;case"ALPH":q=!0,U=rt+8,it=et-8;break;case"ANIM":(xt=N.header).bgcolor=P(z,et),ft=et+4,xt.loop_count=m(z,ft),ft+=2;break;case"ANMF":var At,xt;(xt=N.frames[E]={}).offset_x=2*A(z,et),et+=3,xt.offset_y=2*A(z,et),et+=3,xt.width=1+A(z,et),et+=3,xt.height=1+A(z,et),et+=3,xt.duration=A(z,et),et+=3,At=z[et++],xt.dispose=1&At,xt.blend=At>>1&1}ct!="ANMF"&&(et+=rt)}return N}}(S,0);G.response=S,G.rgbaoutput=!0,G.dataurl=!1;var Y=G.header?G.header:null,D=G.frames?G.frames:null;if(Y){Y.loop_counter=Y.loop_count,p=[Y.canvas_height],B=[Y.canvas_width];for(var ot=0;ot<D.length&&D[ot].blend!=0;ot++);}var yt=D[0],gt=M.WebPDecodeRGBA(S,yt.src_off,yt.src_size,B,p);yt.rgba=gt,yt.imgwidth=B[0],yt.imgheight=p[0];for(var tt=0;tt<B[0]*p[0]*4;tt++)O[tt]=gt[tt];return this.width=B,this.height=p,this.data=O,this}(function(r){var e,t,i,o,s,f,u,c,d,m=function(x){return x=x||{},this.isStrokeTransparent=x.isStrokeTransparent||!1,this.strokeOpacity=x.strokeOpacity||1,this.strokeStyle=x.strokeStyle||"#000000",this.fillStyle=x.fillStyle||"#000000",this.isFillTransparent=x.isFillTransparent||!1,this.fillOpacity=x.fillOpacity||1,this.font=x.font||"10px sans-serif",this.textBaseline=x.textBaseline||"alphabetic",this.textAlign=x.textAlign||"left",this.lineWidth=x.lineWidth||1,this.lineJoin=x.lineJoin||"miter",this.lineCap=x.lineCap||"butt",this.path=x.path||[],this.transform=x.transform!==void 0?x.transform.clone():new c,this.globalCompositeOperation=x.globalCompositeOperation||"normal",this.globalAlpha=x.globalAlpha||1,this.clip_path=x.clip_path||[],this.currentPoint=x.currentPoint||new f,this.miterLimit=x.miterLimit||10,this.lastPoint=x.lastPoint||new f,this.lineDashOffset=x.lineDashOffset||0,this.lineDash=x.lineDash||[],this.margin=x.margin||[0,0,0,0],this.prevPageLastElemOffset=x.prevPageLastElemOffset||0,this.ignoreClearRect=typeof x.ignoreClearRect!="boolean"||x.ignoreClearRect,this};r.events.push(["initialized",function(){this.context2d=new A(this),e=this.internal.f2,t=this.internal.getCoordinateString,i=this.internal.getVerticalCoordinateString,o=this.internal.getHorizontalCoordinate,s=this.internal.getVerticalCoordinate,f=this.internal.Point,u=this.internal.Rectangle,c=this.internal.Matrix,d=new m}]);var A=function(x){Object.defineProperty(this,"canvas",{get:function(){return{parentNode:!1,style:!1}}});var j=x;Object.defineProperty(this,"pdf",{get:function(){return j}});var R=!1;Object.defineProperty(this,"pageWrapXEnabled",{get:function(){return R},set:function(k){R=!!k}});var V=!1;Object.defineProperty(this,"pageWrapYEnabled",{get:function(){return V},set:function(k){V=!!k}});var J=0;Object.defineProperty(this,"posX",{get:function(){return J},set:function(k){isNaN(k)||(J=k)}});var Q=0;Object.defineProperty(this,"posY",{get:function(){return Q},set:function(k){isNaN(k)||(Q=k)}}),Object.defineProperty(this,"margin",{get:function(){return d.margin},set:function(k){var Lt;typeof k=="number"?Lt=[k,k,k,k]:((Lt=new Array(4))[0]=k[0],Lt[1]=k.length>=2?k[1]:Lt[0],Lt[2]=k.length>=3?k[2]:Lt[0],Lt[3]=k.length>=4?k[3]:Lt[1]),d.margin=Lt}});var nt=!1;Object.defineProperty(this,"autoPaging",{get:function(){return nt},set:function(k){nt=k}});var at=0;Object.defineProperty(this,"lastBreak",{get:function(){return at},set:function(k){at=k}});var dt=[];Object.defineProperty(this,"pageBreaks",{get:function(){return dt},set:function(k){dt=k}}),Object.defineProperty(this,"ctx",{get:function(){return d},set:function(k){k instanceof m&&(d=k)}}),Object.defineProperty(this,"path",{get:function(){return d.path},set:function(k){d.path=k}});var _t=[];Object.defineProperty(this,"ctxStack",{get:function(){return _t},set:function(k){_t=k}}),Object.defineProperty(this,"fillStyle",{get:function(){return this.ctx.fillStyle},set:function(k){var Lt;Lt=P(k),this.ctx.fillStyle=Lt.style,this.ctx.isFillTransparent=Lt.a===0,this.ctx.fillOpacity=Lt.a,this.pdf.setFillColor(Lt.r,Lt.g,Lt.b,{a:Lt.a}),this.pdf.setTextColor(Lt.r,Lt.g,Lt.b,{a:Lt.a})}}),Object.defineProperty(this,"strokeStyle",{get:function(){return this.ctx.strokeStyle},set:function(k){var Lt=P(k);this.ctx.strokeStyle=Lt.style,this.ctx.isStrokeTransparent=Lt.a===0,this.ctx.strokeOpacity=Lt.a,Lt.a===0?this.pdf.setDrawColor(255,255,255):(Lt.a,this.pdf.setDrawColor(Lt.r,Lt.g,Lt.b))}}),Object.defineProperty(this,"lineCap",{get:function(){return this.ctx.lineCap},set:function(k){["butt","round","square"].indexOf(k)!==-1&&(this.ctx.lineCap=k,this.pdf.setLineCap(k))}}),Object.defineProperty(this,"lineWidth",{get:function(){return this.ctx.lineWidth},set:function(k){isNaN(k)||(this.ctx.lineWidth=k,this.pdf.setLineWidth(k))}}),Object.defineProperty(this,"lineJoin",{get:function(){return this.ctx.lineJoin},set:function(k){["bevel","round","miter"].indexOf(k)!==-1&&(this.ctx.lineJoin=k,this.pdf.setLineJoin(k))}}),Object.defineProperty(this,"miterLimit",{get:function(){return this.ctx.miterLimit},set:function(k){isNaN(k)||(this.ctx.miterLimit=k,this.pdf.setMiterLimit(k))}}),Object.defineProperty(this,"textBaseline",{get:function(){return this.ctx.textBaseline},set:function(k){this.ctx.textBaseline=k}}),Object.defineProperty(this,"textAlign",{get:function(){return this.ctx.textAlign},set:function(k){["right","end","center","left","start"].indexOf(k)!==-1&&(this.ctx.textAlign=k)}});var St=null,kt=null,zt=null;Object.defineProperty(this,"fontFaces",{get:function(){return zt},set:function(k){St=null,kt=null,zt=k}}),Object.defineProperty(this,"font",{get:function(){return this.ctx.font},set:function(k){var Lt;if(this.ctx.font=k,(Lt=/^\s*(?=(?:(?:[-a-z]+\s*){0,2}(italic|oblique))?)(?=(?:(?:[-a-z]+\s*){0,2}(small-caps))?)(?=(?:(?:[-a-z]+\s*){0,2}(bold(?:er)?|lighter|[1-9]00))?)(?:(?:normal|\1|\2|\3)\s*){0,3}((?:xx?-)?(?:small|large)|medium|smaller|larger|[.\d]+(?:\%|in|[cem]m|ex|p[ctx]))(?:\s*\/\s*(normal|[.\d]+(?:\%|in|[cem]m|ex|p[ctx])))?\s*([-_,\"\'\sa-z0-9]+?)\s*$/i.exec(k))!==null){var ae=Lt[1];Lt[2];var Ht=Lt[3],vt=Lt[4];Lt[5];var Wt=Lt[6],It=/^([.\d]+)((?:%|in|[cem]m|ex|p[ctx]))$/i.exec(vt)[2];vt=Math.floor(It==="px"?parseFloat(vt)*this.pdf.internal.scaleFactor:It==="em"?parseFloat(vt)*this.pdf.getFontSize():parseFloat(vt)*this.pdf.internal.scaleFactor),this.pdf.setFontSize(vt);var Ut=function(Rt){var De,pe,se=[],oe=Rt.trim();if(oe==="")return Ao;if(oe in fu)return[fu[oe]];for(;oe!=="";){switch(pe=null,De=(oe=pu(oe)).charAt(0)){case'"':case"'":pe=u1(oe.substring(1),De);break;default:pe=h1(oe)}if(pe===null||(se.push(pe[0]),(oe=pu(pe[1]))!==""&&oe.charAt(0)!==","))return Ao;oe=oe.replace(/^,/,"")}return se}(Wt);if(this.fontFaces){var Dt=function(Rt,De){var pe=Rt.getFontList(),se=JSON.stringify(pe);if(St===null||kt!==se){var oe=function(Fe){var qt=[];return Object.keys(Fe).forEach(function(ke){Fe[ke].forEach(function(Yt){var Qt=null;switch(Yt){case"bold":Qt={family:ke,weight:"bold"};break;case"italic":Qt={family:ke,style:"italic"};break;case"bolditalic":Qt={family:ke,weight:"bold",style:"italic"};break;case"":case"normal":Qt={family:ke}}Qt!==null&&(Qt.ref={name:ke,style:Yt},qt.push(Qt))})}),qt}(pe);St=function(Fe){for(var qt={},ke=0;ke<Fe.length;++ke){var Yt=_o(Fe[ke]),Qt=Yt.family,Ee=Yt.stretch,le=Yt.style,Vt=Yt.weight;qt[Qt]=qt[Qt]||{},qt[Qt][Ee]=qt[Qt][Ee]||{},qt[Qt][Ee][le]=qt[Qt][Ee][le]||{},qt[Qt][Ee][le][Vt]=Yt}return qt}(oe.concat(De)),kt=se}return St}(this.pdf,this.fontFaces),be=Ut.map(function(Rt){return{family:Rt,stretch:"normal",weight:Ht,style:ae}}),ue=function(Rt,De,pe){for(var se=(pe=pe||{}).defaultFontFamily||"times",oe=Object.assign({},l1,pe.genericFontFamilies||{}),Fe=null,qt=null,ke=0;ke<De.length;++ke)if(oe[(Fe=_o(De[ke])).family]&&(Fe.family=oe[Fe.family]),Rt.hasOwnProperty(Fe.family)){qt=Rt[Fe.family];break}if(!(qt=qt||Rt[se]))throw new Error("Could not find a font-family for the rule '"+du(Fe)+"' and default family '"+se+"'.");if(qt=function(Yt,Qt){if(Qt[Yt])return Qt[Yt];var Ee=Oo[Yt],le=Ee<=Oo.normal?-1:1,Vt=cu(Qt,lh,Ee,le);if(!Vt)throw new Error("Could not find a matching font-stretch value for "+Yt);return Vt}(Fe.stretch,qt),qt=function(Yt,Qt){if(Qt[Yt])return Qt[Yt];for(var Ee=oh[Yt],le=0;le<Ee.length;++le)if(Qt[Ee[le]])return Qt[Ee[le]];throw new Error("Could not find a matching font-style for "+Yt)}(Fe.style,qt),!(qt=function(Yt,Qt){if(Qt[Yt])return Qt[Yt];if(Yt===400&&Qt[500])return Qt[500];if(Yt===500&&Qt[400])return Qt[400];var Ee=o1[Yt],le=cu(Qt,uh,Ee,Yt<400?-1:1);if(!le)throw new Error("Could not find a matching font-weight for value "+Yt);return le}(Fe.weight,qt)))throw new Error("Failed to resolve a font for the rule '"+du(Fe)+"'.");return qt}(Dt,be);this.pdf.setFont(ue.ref.name,ue.ref.style)}else{var Zt="";(Ht==="bold"||parseInt(Ht,10)>=700||ae==="bold")&&(Zt="bold"),ae==="italic"&&(Zt+="italic"),Zt.length===0&&(Zt="normal");for(var ce="",he={arial:"Helvetica",Arial:"Helvetica",verdana:"Helvetica",Verdana:"Helvetica",helvetica:"Helvetica",Helvetica:"Helvetica","sans-serif":"Helvetica",fixed:"Courier",monospace:"Courier",terminal:"Courier",cursive:"Times",fantasy:"Times",serif:"Times"},jt=0;jt<Ut.length;jt++){if(this.pdf.internal.getFont(Ut[jt],Zt,{noFallback:!0,disableWarning:!0})!==void 0){ce=Ut[jt];break}if(Zt==="bolditalic"&&this.pdf.internal.getFont(Ut[jt],"bold",{noFallback:!0,disableWarning:!0})!==void 0)ce=Ut[jt],Zt="bold";else if(this.pdf.internal.getFont(Ut[jt],"normal",{noFallback:!0,disableWarning:!0})!==void 0){ce=Ut[jt],Zt="normal";break}}if(ce===""){for(var ee=0;ee<Ut.length;ee++)if(he[Ut[ee]]){ce=he[Ut[ee]];break}}ce=ce===""?"Times":ce,this.pdf.setFont(ce,Zt)}}}}),Object.defineProperty(this,"globalCompositeOperation",{get:function(){return this.ctx.globalCompositeOperation},set:function(k){this.ctx.globalCompositeOperation=k}}),Object.defineProperty(this,"globalAlpha",{get:function(){return this.ctx.globalAlpha},set:function(k){this.ctx.globalAlpha=k}}),Object.defineProperty(this,"lineDashOffset",{get:function(){return this.ctx.lineDashOffset},set:function(k){this.ctx.lineDashOffset=k,xt.call(this)}}),Object.defineProperty(this,"lineDash",{get:function(){return this.ctx.lineDash},set:function(k){this.ctx.lineDash=k,xt.call(this)}}),Object.defineProperty(this,"ignoreClearRect",{get:function(){return this.ctx.ignoreClearRect},set:function(k){this.ctx.ignoreClearRect=!!k}})};A.prototype.setLineDash=function(x){this.lineDash=x},A.prototype.getLineDash=function(){return this.lineDash.length%2?this.lineDash.concat(this.lineDash):this.lineDash.slice()},A.prototype.fill=function(){D.call(this,"fill",!1)},A.prototype.stroke=function(){D.call(this,"stroke",!1)},A.prototype.beginPath=function(){this.path=[{type:"begin"}]},A.prototype.moveTo=function(x,j){if(isNaN(x)||isNaN(j))throw Le.error("jsPDF.context2d.moveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.moveTo");var R=this.ctx.transform.applyToPoint(new f(x,j));this.path.push({type:"mt",x:R.x,y:R.y}),this.ctx.lastPoint=new f(x,j)},A.prototype.closePath=function(){var x=new f(0,0),j=0;for(j=this.path.length-1;j!==-1;j--)if(this.path[j].type==="begin"&&Se(this.path[j+1])==="object"&&typeof this.path[j+1].x=="number"){x=new f(this.path[j+1].x,this.path[j+1].y);break}this.path.push({type:"close"}),this.ctx.lastPoint=new f(x.x,x.y)},A.prototype.lineTo=function(x,j){if(isNaN(x)||isNaN(j))throw Le.error("jsPDF.context2d.lineTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.lineTo");var R=this.ctx.transform.applyToPoint(new f(x,j));this.path.push({type:"lt",x:R.x,y:R.y}),this.ctx.lastPoint=new f(R.x,R.y)},A.prototype.clip=function(){this.ctx.clip_path=JSON.parse(JSON.stringify(this.path)),D.call(this,null,!0)},A.prototype.quadraticCurveTo=function(x,j,R,V){if(isNaN(R)||isNaN(V)||isNaN(x)||isNaN(j))throw Le.error("jsPDF.context2d.quadraticCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.quadraticCurveTo");var J=this.ctx.transform.applyToPoint(new f(R,V)),Q=this.ctx.transform.applyToPoint(new f(x,j));this.path.push({type:"qct",x1:Q.x,y1:Q.y,x:J.x,y:J.y}),this.ctx.lastPoint=new f(J.x,J.y)},A.prototype.bezierCurveTo=function(x,j,R,V,J,Q){if(isNaN(J)||isNaN(Q)||isNaN(x)||isNaN(j)||isNaN(R)||isNaN(V))throw Le.error("jsPDF.context2d.bezierCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.bezierCurveTo");var nt=this.ctx.transform.applyToPoint(new f(J,Q)),at=this.ctx.transform.applyToPoint(new f(x,j)),dt=this.ctx.transform.applyToPoint(new f(R,V));this.path.push({type:"bct",x1:at.x,y1:at.y,x2:dt.x,y2:dt.y,x:nt.x,y:nt.y}),this.ctx.lastPoint=new f(nt.x,nt.y)},A.prototype.arc=function(x,j,R,V,J,Q){if(isNaN(x)||isNaN(j)||isNaN(R)||isNaN(V)||isNaN(J))throw Le.error("jsPDF.context2d.arc: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.arc");if(Q=!!Q,!this.ctx.transform.isIdentity){var nt=this.ctx.transform.applyToPoint(new f(x,j));x=nt.x,j=nt.y;var at=this.ctx.transform.applyToPoint(new f(0,R)),dt=this.ctx.transform.applyToPoint(new f(0,0));R=Math.sqrt(Math.pow(at.x-dt.x,2)+Math.pow(at.y-dt.y,2))}Math.abs(J-V)>=2*Math.PI&&(V=0,J=2*Math.PI),this.path.push({type:"arc",x,y:j,radius:R,startAngle:V,endAngle:J,counterclockwise:Q})},A.prototype.arcTo=function(x,j,R,V,J){throw new Error("arcTo not implemented.")},A.prototype.rect=function(x,j,R,V){if(isNaN(x)||isNaN(j)||isNaN(R)||isNaN(V))throw Le.error("jsPDF.context2d.rect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rect");this.moveTo(x,j),this.lineTo(x+R,j),this.lineTo(x+R,j+V),this.lineTo(x,j+V),this.lineTo(x,j),this.lineTo(x+R,j),this.lineTo(x,j)},A.prototype.fillRect=function(x,j,R,V){if(isNaN(x)||isNaN(j)||isNaN(R)||isNaN(V))throw Le.error("jsPDF.context2d.fillRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillRect");if(!p.call(this)){var J={};this.lineCap!=="butt"&&(J.lineCap=this.lineCap,this.lineCap="butt"),this.lineJoin!=="miter"&&(J.lineJoin=this.lineJoin,this.lineJoin="miter"),this.beginPath(),this.rect(x,j,R,V),this.fill(),J.hasOwnProperty("lineCap")&&(this.lineCap=J.lineCap),J.hasOwnProperty("lineJoin")&&(this.lineJoin=J.lineJoin)}},A.prototype.strokeRect=function(x,j,R,V){if(isNaN(x)||isNaN(j)||isNaN(R)||isNaN(V))throw Le.error("jsPDF.context2d.strokeRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeRect");B.call(this)||(this.beginPath(),this.rect(x,j,R,V),this.stroke())},A.prototype.clearRect=function(x,j,R,V){if(isNaN(x)||isNaN(j)||isNaN(R)||isNaN(V))throw Le.error("jsPDF.context2d.clearRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.clearRect");this.ignoreClearRect||(this.fillStyle="#ffffff",this.fillRect(x,j,R,V))},A.prototype.save=function(x){x=typeof x!="boolean"||x;for(var j=this.pdf.internal.getCurrentPageInfo().pageNumber,R=0;R<this.pdf.internal.getNumberOfPages();R++)this.pdf.setPage(R+1),this.pdf.internal.out("q");if(this.pdf.setPage(j),x){this.ctx.fontSize=this.pdf.internal.getFontSize();var V=new m(this.ctx);this.ctxStack.push(this.ctx),this.ctx=V}},A.prototype.restore=function(x){x=typeof x!="boolean"||x;for(var j=this.pdf.internal.getCurrentPageInfo().pageNumber,R=0;R<this.pdf.internal.getNumberOfPages();R++)this.pdf.setPage(R+1),this.pdf.internal.out("Q");this.pdf.setPage(j),x&&this.ctxStack.length!==0&&(this.ctx=this.ctxStack.pop(),this.fillStyle=this.ctx.fillStyle,this.strokeStyle=this.ctx.strokeStyle,this.font=this.ctx.font,this.lineCap=this.ctx.lineCap,this.lineWidth=this.ctx.lineWidth,this.lineJoin=this.ctx.lineJoin,this.lineDash=this.ctx.lineDash,this.lineDashOffset=this.ctx.lineDashOffset)},A.prototype.toDataURL=function(){throw new Error("toDataUrl not implemented.")};var P=function(x){var j,R,V,J;if(x.isCanvasGradient===!0&&(x=x.getColor()),!x)return{r:0,g:0,b:0,a:0,style:x};if(/transparent|rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*0+\s*\)/.test(x))j=0,R=0,V=0,J=0;else{var Q=/rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/.exec(x);if(Q!==null)j=parseInt(Q[1]),R=parseInt(Q[2]),V=parseInt(Q[3]),J=1;else if((Q=/rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)/.exec(x))!==null)j=parseInt(Q[1]),R=parseInt(Q[2]),V=parseInt(Q[3]),J=parseFloat(Q[4]);else{if(J=1,typeof x=="string"&&x.charAt(0)!=="#"){var nt=new th(x);x=nt.ok?nt.toHex():"#000000"}x.length===4?(j=x.substring(1,2),j+=j,R=x.substring(2,3),R+=R,V=x.substring(3,4),V+=V):(j=x.substring(1,3),R=x.substring(3,5),V=x.substring(5,7)),j=parseInt(j,16),R=parseInt(R,16),V=parseInt(V,16)}}return{r:j,g:R,b:V,a:J,style:x}},p=function(){return this.ctx.isFillTransparent||this.globalAlpha==0},B=function(){return!!(this.ctx.isStrokeTransparent||this.globalAlpha==0)};A.prototype.fillText=function(x,j,R,V){if(isNaN(j)||isNaN(R)||typeof x!="string")throw Le.error("jsPDF.context2d.fillText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillText");if(V=isNaN(V)?void 0:V,!p.call(this)){var J=rt(this.ctx.transform.rotation),Q=this.ctx.transform.scaleX;E.call(this,{text:x,x:j,y:R,scale:Q,angle:J,align:this.textAlign,maxWidth:V})}},A.prototype.strokeText=function(x,j,R,V){if(isNaN(j)||isNaN(R)||typeof x!="string")throw Le.error("jsPDF.context2d.strokeText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeText");if(!B.call(this)){V=isNaN(V)?void 0:V;var J=rt(this.ctx.transform.rotation),Q=this.ctx.transform.scaleX;E.call(this,{text:x,x:j,y:R,scale:Q,renderingMode:"stroke",angle:J,align:this.textAlign,maxWidth:V})}},A.prototype.measureText=function(x){if(typeof x!="string")throw Le.error("jsPDF.context2d.measureText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.measureText");var j=this.pdf,R=this.pdf.internal.scaleFactor,V=j.internal.getFontSize(),J=j.getStringUnitWidth(x)*V/j.internal.scaleFactor;return new function(Q){var nt=(Q=Q||{}).width||0;return Object.defineProperty(this,"width",{get:function(){return nt}}),this}({width:J*=Math.round(96*R/72*1e4)/1e4})},A.prototype.scale=function(x,j){if(isNaN(x)||isNaN(j))throw Le.error("jsPDF.context2d.scale: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.scale");var R=new c(x,0,0,j,0,0);this.ctx.transform=this.ctx.transform.multiply(R)},A.prototype.rotate=function(x){if(isNaN(x))throw Le.error("jsPDF.context2d.rotate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rotate");var j=new c(Math.cos(x),Math.sin(x),-Math.sin(x),Math.cos(x),0,0);this.ctx.transform=this.ctx.transform.multiply(j)},A.prototype.translate=function(x,j){if(isNaN(x)||isNaN(j))throw Le.error("jsPDF.context2d.translate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.translate");var R=new c(1,0,0,1,x,j);this.ctx.transform=this.ctx.transform.multiply(R)},A.prototype.transform=function(x,j,R,V,J,Q){if(isNaN(x)||isNaN(j)||isNaN(R)||isNaN(V)||isNaN(J)||isNaN(Q))throw Le.error("jsPDF.context2d.transform: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.transform");var nt=new c(x,j,R,V,J,Q);this.ctx.transform=this.ctx.transform.multiply(nt)},A.prototype.setTransform=function(x,j,R,V,J,Q){x=isNaN(x)?1:x,j=isNaN(j)?0:j,R=isNaN(R)?0:R,V=isNaN(V)?1:V,J=isNaN(J)?0:J,Q=isNaN(Q)?0:Q,this.ctx.transform=new c(x,j,R,V,J,Q)};var O=function(){return this.margin[0]>0||this.margin[1]>0||this.margin[2]>0||this.margin[3]>0};A.prototype.drawImage=function(x,j,R,V,J,Q,nt,at,dt){var _t=this.pdf.getImageProperties(x),St=1,kt=1,zt=1,k=1;V!==void 0&&at!==void 0&&(zt=at/V,k=dt/J,St=_t.width/V*at/V,kt=_t.height/J*dt/J),Q===void 0&&(Q=j,nt=R,j=0,R=0),V!==void 0&&at===void 0&&(at=V,dt=J),V===void 0&&at===void 0&&(at=_t.width,dt=_t.height);var Lt=this.ctx.transform.decompose(),ae=rt(Lt.rotate.shx),Ht=new c,vt=(Ht=(Ht=(Ht=Ht.multiply(Lt.translate)).multiply(Lt.skew)).multiply(Lt.scale)).applyToRectangle(new u(Q-j*zt,nt-R*k,V*St,J*kt));if(this.autoPaging){for(var Wt,It=M.call(this,vt),Ut=[],Dt=0;Dt<It.length;Dt+=1)Ut.indexOf(It[Dt])===-1&&Ut.push(It[Dt]);Y(Ut);for(var be=Ut[0],ue=Ut[Ut.length-1],Zt=be;Zt<ue+1;Zt++){this.pdf.setPage(Zt);var ce=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],he=Zt===1?this.posY+this.margin[0]:this.margin[0],jt=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],ee=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],Rt=Zt===1?0:jt+(Zt-2)*ee;if(this.ctx.clip_path.length!==0){var De=this.path;Wt=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=G(Wt,this.posX+this.margin[3],-Rt+he+this.ctx.prevPageLastElemOffset),ot.call(this,"fill",!0),this.path=De}var pe=JSON.parse(JSON.stringify(vt));pe=G([pe],this.posX+this.margin[3],-Rt+he+this.ctx.prevPageLastElemOffset)[0];var se=(Zt>be||Zt<ue)&&O.call(this);se&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],ce,ee,null).clip().discardPath()),this.pdf.addImage(x,"JPEG",pe.x,pe.y,pe.w,pe.h,null,null,ae),se&&this.pdf.restoreGraphicsState()}}else this.pdf.addImage(x,"JPEG",vt.x,vt.y,vt.w,vt.h,null,null,ae)};var M=function(x,j,R){var V=[];j=j||this.pdf.internal.pageSize.width,R=R||this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2];var J=this.posY+this.ctx.prevPageLastElemOffset;switch(x.type){default:case"mt":case"lt":V.push(Math.floor((x.y+J)/R)+1);break;case"arc":V.push(Math.floor((x.y+J-x.radius)/R)+1),V.push(Math.floor((x.y+J+x.radius)/R)+1);break;case"qct":var Q=ft(this.ctx.lastPoint.x,this.ctx.lastPoint.y,x.x1,x.y1,x.x,x.y);V.push(Math.floor((Q.y+J)/R)+1),V.push(Math.floor((Q.y+Q.h+J)/R)+1);break;case"bct":var nt=At(this.ctx.lastPoint.x,this.ctx.lastPoint.y,x.x1,x.y1,x.x2,x.y2,x.x,x.y);V.push(Math.floor((nt.y+J)/R)+1),V.push(Math.floor((nt.y+nt.h+J)/R)+1);break;case"rect":V.push(Math.floor((x.y+J)/R)+1),V.push(Math.floor((x.y+x.h+J)/R)+1)}for(var at=0;at<V.length;at+=1)for(;this.pdf.internal.getNumberOfPages()<V[at];)S.call(this);return V},S=function(){var x=this.fillStyle,j=this.strokeStyle,R=this.font,V=this.lineCap,J=this.lineWidth,Q=this.lineJoin;this.pdf.addPage(),this.fillStyle=x,this.strokeStyle=j,this.font=R,this.lineCap=V,this.lineWidth=J,this.lineJoin=Q},G=function(x,j,R){for(var V=0;V<x.length;V++)switch(x[V].type){case"bct":x[V].x2+=j,x[V].y2+=R;case"qct":x[V].x1+=j,x[V].y1+=R;default:x[V].x+=j,x[V].y+=R}return x},Y=function(x){return x.sort(function(j,R){return j-R})},D=function(x,j){var R=this.fillStyle,V=this.strokeStyle,J=this.lineCap,Q=this.lineWidth,nt=Math.abs(Q*this.ctx.transform.scaleX),at=this.lineJoin;if(this.autoPaging){for(var dt,_t,St=JSON.parse(JSON.stringify(this.path)),kt=JSON.parse(JSON.stringify(this.path)),zt=[],k=0;k<kt.length;k++)if(kt[k].x!==void 0)for(var Lt=M.call(this,kt[k]),ae=0;ae<Lt.length;ae+=1)zt.indexOf(Lt[ae])===-1&&zt.push(Lt[ae]);for(var Ht=0;Ht<zt.length;Ht++)for(;this.pdf.internal.getNumberOfPages()<zt[Ht];)S.call(this);Y(zt);for(var vt=zt[0],Wt=zt[zt.length-1],It=vt;It<Wt+1;It++){this.pdf.setPage(It),this.fillStyle=R,this.strokeStyle=V,this.lineCap=J,this.lineWidth=nt,this.lineJoin=at;var Ut=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],Dt=It===1?this.posY+this.margin[0]:this.margin[0],be=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],ue=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],Zt=It===1?0:be+(It-2)*ue;if(this.ctx.clip_path.length!==0){var ce=this.path;dt=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=G(dt,this.posX+this.margin[3],-Zt+Dt+this.ctx.prevPageLastElemOffset),ot.call(this,x,!0),this.path=ce}if(_t=JSON.parse(JSON.stringify(St)),this.path=G(_t,this.posX+this.margin[3],-Zt+Dt+this.ctx.prevPageLastElemOffset),j===!1||It===0){var he=(It>vt||It<Wt)&&O.call(this);he&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],Ut,ue,null).clip().discardPath()),ot.call(this,x,j),he&&this.pdf.restoreGraphicsState()}this.lineWidth=Q}this.path=St}else this.lineWidth=nt,ot.call(this,x,j),this.lineWidth=Q},ot=function(x,j){if((x!=="stroke"||j||!B.call(this))&&(x==="stroke"||j||!p.call(this))){for(var R,V,J=[],Q=this.path,nt=0;nt<Q.length;nt++){var at=Q[nt];switch(at.type){case"begin":J.push({begin:!0});break;case"close":J.push({close:!0});break;case"mt":J.push({start:at,deltas:[],abs:[]});break;case"lt":var dt=J.length;if(Q[nt-1]&&!isNaN(Q[nt-1].x)&&(R=[at.x-Q[nt-1].x,at.y-Q[nt-1].y],dt>0)){for(;dt>=0;dt--)if(J[dt-1].close!==!0&&J[dt-1].begin!==!0){J[dt-1].deltas.push(R),J[dt-1].abs.push(at);break}}break;case"bct":R=[at.x1-Q[nt-1].x,at.y1-Q[nt-1].y,at.x2-Q[nt-1].x,at.y2-Q[nt-1].y,at.x-Q[nt-1].x,at.y-Q[nt-1].y],J[J.length-1].deltas.push(R);break;case"qct":var _t=Q[nt-1].x+2/3*(at.x1-Q[nt-1].x),St=Q[nt-1].y+2/3*(at.y1-Q[nt-1].y),kt=at.x+2/3*(at.x1-at.x),zt=at.y+2/3*(at.y1-at.y),k=at.x,Lt=at.y;R=[_t-Q[nt-1].x,St-Q[nt-1].y,kt-Q[nt-1].x,zt-Q[nt-1].y,k-Q[nt-1].x,Lt-Q[nt-1].y],J[J.length-1].deltas.push(R);break;case"arc":J.push({deltas:[],abs:[],arc:!0}),Array.isArray(J[J.length-1].abs)&&J[J.length-1].abs.push(at)}}V=j?null:x==="stroke"?"stroke":"fill";for(var ae=!1,Ht=0;Ht<J.length;Ht++)if(J[Ht].arc)for(var vt=J[Ht].abs,Wt=0;Wt<vt.length;Wt++){var It=vt[Wt];It.type==="arc"?tt.call(this,It.x,It.y,It.radius,It.startAngle,It.endAngle,It.counterclockwise,void 0,j,!ae):q.call(this,It.x,It.y),ae=!0}else if(J[Ht].close===!0)this.pdf.internal.out("h"),ae=!1;else if(J[Ht].begin!==!0){var Ut=J[Ht].start.x,Dt=J[Ht].start.y;U.call(this,J[Ht].deltas,Ut,Dt),ae=!0}V&&z.call(this,V),j&&et.call(this)}},yt=function(x){var j=this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor,R=j*(this.pdf.internal.getLineHeightFactor()-1);switch(this.ctx.textBaseline){case"bottom":return x-R;case"top":return x+j-R;case"hanging":return x+j-2*R;case"middle":return x+j/2-R;default:return x}},gt=function(x){return x+this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor*(this.pdf.internal.getLineHeightFactor()-1)};A.prototype.createLinearGradient=function(){var x=function(){};return x.colorStops=[],x.addColorStop=function(j,R){this.colorStops.push([j,R])},x.getColor=function(){return this.colorStops.length===0?"#000000":this.colorStops[0][1]},x.isCanvasGradient=!0,x},A.prototype.createPattern=function(){return this.createLinearGradient()},A.prototype.createRadialGradient=function(){return this.createLinearGradient()};var tt=function(x,j,R,V,J,Q,nt,at,dt){for(var _t=ct.call(this,R,V,J,Q),St=0;St<_t.length;St++){var kt=_t[St];St===0&&(dt?N.call(this,kt.x1+x,kt.y1+j):q.call(this,kt.x1+x,kt.y1+j)),it.call(this,x,j,kt.x2,kt.y2,kt.x3,kt.y3,kt.x4,kt.y4)}at?et.call(this):z.call(this,nt)},z=function(x){switch(x){case"stroke":this.pdf.internal.out("S");break;case"fill":this.pdf.internal.out("f")}},et=function(){this.pdf.clip(),this.pdf.discardPath()},N=function(x,j){this.pdf.internal.out(t(x)+" "+i(j)+" m")},E=function(x){var j;switch(x.align){case"right":case"end":j="right";break;case"center":j="center";break;default:j="left"}var R,V,J,Q=this.pdf.getTextDimensions(x.text),nt=yt.call(this,x.y),at=gt.call(this,nt)-Q.h,dt=this.ctx.transform.applyToPoint(new f(x.x,nt));if(this.autoPaging){var _t=this.ctx.transform.decompose(),St=new c;St=(St=(St=St.multiply(_t.translate)).multiply(_t.skew)).multiply(_t.scale);for(var kt=this.ctx.transform.applyToRectangle(new u(x.x,nt,Q.w,Q.h)),zt=St.applyToRectangle(new u(x.x,at,Q.w,Q.h)),k=M.call(this,zt),Lt=[],ae=0;ae<k.length;ae+=1)Lt.indexOf(k[ae])===-1&&Lt.push(k[ae]);Y(Lt);for(var Ht=Lt[0],vt=Lt[Lt.length-1],Wt=Ht;Wt<vt+1;Wt++){this.pdf.setPage(Wt);var It=Wt===1?this.posY+this.margin[0]:this.margin[0],Ut=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],Dt=this.pdf.internal.pageSize.height-this.margin[2],be=Dt-this.margin[0],ue=this.pdf.internal.pageSize.width-this.margin[1],Zt=ue-this.margin[3],ce=Wt===1?0:Ut+(Wt-2)*be;if(this.ctx.clip_path.length!==0){var he=this.path;R=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=G(R,this.posX+this.margin[3],-1*ce+It),ot.call(this,"fill",!0),this.path=he}var jt=G([JSON.parse(JSON.stringify(zt))],this.posX+this.margin[3],-ce+It+this.ctx.prevPageLastElemOffset)[0];x.scale>=.01&&(V=this.pdf.internal.getFontSize(),this.pdf.setFontSize(V*x.scale),J=this.lineWidth,this.lineWidth=J*x.scale);var ee=this.autoPaging!=="text";if(ee||jt.y+jt.h<=Dt){if(ee||jt.y>=It&&jt.x<=ue){var Rt=ee?x.text:this.pdf.splitTextToSize(x.text,x.maxWidth||ue-jt.x)[0],De=G([JSON.parse(JSON.stringify(kt))],this.posX+this.margin[3],-ce+It+this.ctx.prevPageLastElemOffset)[0],pe=ee&&(Wt>Ht||Wt<vt)&&O.call(this);pe&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],Zt,be,null).clip().discardPath()),this.pdf.text(Rt,De.x,De.y,{angle:x.angle,align:j,renderingMode:x.renderingMode}),pe&&this.pdf.restoreGraphicsState()}}else jt.y<Dt&&(this.ctx.prevPageLastElemOffset+=Dt-jt.y);x.scale>=.01&&(this.pdf.setFontSize(V),this.lineWidth=J)}}else x.scale>=.01&&(V=this.pdf.internal.getFontSize(),this.pdf.setFontSize(V*x.scale),J=this.lineWidth,this.lineWidth=J*x.scale),this.pdf.text(x.text,dt.x+this.posX,dt.y+this.posY,{angle:x.angle,align:j,renderingMode:x.renderingMode,maxWidth:x.maxWidth}),x.scale>=.01&&(this.pdf.setFontSize(V),this.lineWidth=J)},q=function(x,j,R,V){R=R||0,V=V||0,this.pdf.internal.out(t(x+R)+" "+i(j+V)+" l")},U=function(x,j,R){return this.pdf.lines(x,j,R,null,null)},it=function(x,j,R,V,J,Q,nt,at){this.pdf.internal.out([e(o(R+x)),e(s(V+j)),e(o(J+x)),e(s(Q+j)),e(o(nt+x)),e(s(at+j)),"c"].join(" "))},ct=function(x,j,R,V){for(var J=2*Math.PI,Q=Math.PI/2;j>R;)j-=J;var nt=Math.abs(R-j);nt<J&&V&&(nt=J-nt);for(var at=[],dt=V?-1:1,_t=j;nt>1e-5;){var St=_t+dt*Math.min(nt,Q);at.push(pt.call(this,x,_t,St)),nt-=Math.abs(St-_t),_t=St}return at},pt=function(x,j,R){var V=(R-j)/2,J=x*Math.cos(V),Q=x*Math.sin(V),nt=J,at=-Q,dt=nt*nt+at*at,_t=dt+nt*J+at*Q,St=4/3*(Math.sqrt(2*dt*_t)-_t)/(nt*Q-at*J),kt=nt-St*at,zt=at+St*nt,k=kt,Lt=-zt,ae=V+j,Ht=Math.cos(ae),vt=Math.sin(ae);return{x1:x*Math.cos(j),y1:x*Math.sin(j),x2:kt*Ht-zt*vt,y2:kt*vt+zt*Ht,x3:k*Ht-Lt*vt,y3:k*vt+Lt*Ht,x4:x*Math.cos(R),y4:x*Math.sin(R)}},rt=function(x){return 180*x/Math.PI},ft=function(x,j,R,V,J,Q){var nt=x+.5*(R-x),at=j+.5*(V-j),dt=J+.5*(R-J),_t=Q+.5*(V-Q),St=Math.min(x,J,nt,dt),kt=Math.max(x,J,nt,dt),zt=Math.min(j,Q,at,_t),k=Math.max(j,Q,at,_t);return new u(St,zt,kt-St,k-zt)},At=function(x,j,R,V,J,Q,nt,at){var dt,_t,St,kt,zt,k,Lt,ae,Ht,vt,Wt,It,Ut,Dt,be=R-x,ue=V-j,Zt=J-R,ce=Q-V,he=nt-J,jt=at-Q;for(_t=0;_t<41;_t++)Ht=(Lt=(St=x+(dt=_t/40)*be)+dt*((zt=R+dt*Zt)-St))+dt*(zt+dt*(J+dt*he-zt)-Lt),vt=(ae=(kt=j+dt*ue)+dt*((k=V+dt*ce)-kt))+dt*(k+dt*(Q+dt*jt-k)-ae),_t==0?(Wt=Ht,It=vt,Ut=Ht,Dt=vt):(Wt=Math.min(Wt,Ht),It=Math.min(It,vt),Ut=Math.max(Ut,Ht),Dt=Math.max(Dt,vt));return new u(Math.round(Wt),Math.round(It),Math.round(Ut-Wt),Math.round(Dt-It))},xt=function(){if(this.prevLineDash||this.ctx.lineDash.length||this.ctx.lineDashOffset){var x,j,R=(x=this.ctx.lineDash,j=this.ctx.lineDashOffset,JSON.stringify({lineDash:x,lineDashOffset:j}));this.prevLineDash!==R&&(this.pdf.setLineDash(this.ctx.lineDash,this.ctx.lineDashOffset),this.prevLineDash=R)}}})(Tt.API),function(r){var e=function(f){var u,c,d,m,A,P,p,B,O,M;for(c=[],d=0,m=(f+=u="\0\0\0\0".slice(f.length%4||4)).length;m>d;d+=4)(A=(f.charCodeAt(d)<<24)+(f.charCodeAt(d+1)<<16)+(f.charCodeAt(d+2)<<8)+f.charCodeAt(d+3))!==0?(P=(A=((A=((A=((A=(A-(M=A%85))/85)-(O=A%85))/85)-(B=A%85))/85)-(p=A%85))/85)%85,c.push(P+33,p+33,B+33,O+33,M+33)):c.push(122);return function(S,G){for(var Y=G;Y>0;Y--)S.pop()}(c,u.length),String.fromCharCode.apply(String,c)+"~>"},t=function(f){var u,c,d,m,A,P=String,p="length",B=255,O="charCodeAt",M="slice",S="replace";for(f[M](-2),f=f[M](0,-2)[S](/\s/g,"")[S]("z","!!!!!"),d=[],m=0,A=(f+=u="uuuuu"[M](f[p]%5||5))[p];A>m;m+=5)c=52200625*(f[O](m)-33)+614125*(f[O](m+1)-33)+7225*(f[O](m+2)-33)+85*(f[O](m+3)-33)+(f[O](m+4)-33),d.push(B&c>>24,B&c>>16,B&c>>8,B&c);return function(G,Y){for(var D=Y;D>0;D--)G.pop()}(d,u[p]),P.fromCharCode.apply(P,d)},i=function(f){return f.split("").map(function(u){return("0"+u.charCodeAt().toString(16)).slice(-2)}).join("")+">"},o=function(f){var u=new RegExp(/^([0-9A-Fa-f]{2})+$/);if((f=f.replace(/\s/g,"")).indexOf(">")!==-1&&(f=f.substr(0,f.indexOf(">"))),f.length%2&&(f+="0"),u.test(f)===!1)return"";for(var c="",d=0;d<f.length;d+=2)c+=String.fromCharCode("0x"+(f[d]+f[d+1]));return c},s=function(f){for(var u=new Uint8Array(f.length),c=f.length;c--;)u[c]=f.charCodeAt(c);return(u=So(u)).reduce(function(d,m){return d+String.fromCharCode(m)},"")};r.processDataByFilters=function(f,u){var c=0,d=f||"",m=[];for(typeof(u=u||[])=="string"&&(u=[u]),c=0;c<u.length;c+=1)switch(u[c]){case"ASCII85Decode":case"/ASCII85Decode":d=t(d),m.push("/ASCII85Encode");break;case"ASCII85Encode":case"/ASCII85Encode":d=e(d),m.push("/ASCII85Decode");break;case"ASCIIHexDecode":case"/ASCIIHexDecode":d=o(d),m.push("/ASCIIHexEncode");break;case"ASCIIHexEncode":case"/ASCIIHexEncode":d=i(d),m.push("/ASCIIHexDecode");break;case"FlateEncode":case"/FlateEncode":d=s(d),m.push("/FlateDecode");break;default:throw new Error('The filter: "'+u[c]+'" is not implemented')}return{data:d,reverseChain:m.reverse().join(" ")}}}(Tt.API),function(r){r.loadFile=function(e,t,i){return function(o,s,f){s=s!==!1,f=typeof f=="function"?f:function(){};var u=void 0;try{u=function(c,d,m){var A=new XMLHttpRequest,P=0,p=function(B){var O=B.length,M=[],S=String.fromCharCode;for(P=0;P<O;P+=1)M.push(S(255&B.charCodeAt(P)));return M.join("")};if(A.open("GET",c,!d),A.overrideMimeType("text/plain; charset=x-user-defined"),d===!1&&(A.onload=function(){A.status===200?m(p(this.responseText)):m(void 0)}),A.send(null),d&&A.status===200)return p(A.responseText)}(o,s,f)}catch{}return u}(e,t,i)},r.allowFsRead=void 0,r.loadImageFile=r.loadFile}(Tt.API),function(r){function e(){return(Jt.html2canvas?Promise.resolve(Jt.html2canvas):io(()=>import("./html2canvas.esm-CBrSDip1.js"),[],import.meta.url)).catch(function(u){return Promise.reject(new Error("Could not load html2canvas: "+u))}).then(function(u){return u.default?u.default:u})}function t(){return(Jt.DOMPurify?Promise.resolve(Jt.DOMPurify):io(()=>import("./purify.es-Ci5xwkH_.js"),[],import.meta.url)).catch(function(u){return Promise.reject(new Error("Could not load dompurify: "+u))}).then(function(u){return u.default?u.default:u})}var i=function(u){var c=Se(u);return c==="undefined"?"undefined":c==="string"||u instanceof String?"string":c==="number"||u instanceof Number?"number":c==="function"||u instanceof Function?"function":u&&u.constructor===Array?"array":u&&u.nodeType===1?"element":c==="object"?"object":"unknown"},o=function(u,c){var d=document.createElement(u);for(var m in c.className&&(d.className=c.className),c.innerHTML&&c.dompurify&&(d.innerHTML=c.dompurify.sanitize(c.innerHTML)),c.style)d.style[m]=c.style[m];return d},s=function u(c,d){for(var m=c.nodeType===3?document.createTextNode(c.nodeValue):c.cloneNode(!1),A=c.firstChild;A;A=A.nextSibling)d!==!0&&A.nodeType===1&&A.nodeName==="SCRIPT"||m.appendChild(u(A,d));return c.nodeType===1&&(c.nodeName==="CANVAS"?(m.width=c.width,m.height=c.height,m.getContext("2d").drawImage(c,0,0)):c.nodeName!=="TEXTAREA"&&c.nodeName!=="SELECT"||(m.value=c.value),m.addEventListener("load",function(){m.scrollTop=c.scrollTop,m.scrollLeft=c.scrollLeft},!0)),m},f=function u(c){var d=Object.assign(u.convert(Promise.resolve()),JSON.parse(JSON.stringify(u.template))),m=u.convert(Promise.resolve(),d);return(m=m.setProgress(1,u,1,[u])).set(c)};(f.prototype=Object.create(Promise.prototype)).constructor=f,f.convert=function(u,c){return u.__proto__=c||f.prototype,u},f.template={prop:{src:null,container:null,overlay:null,canvas:null,img:null,pdf:null,pageSize:null,callback:function(){}},progress:{val:0,state:null,n:0,stack:[]},opt:{filename:"file.pdf",margin:[0,0,0,0],enableLinks:!0,x:0,y:0,html2canvas:{},jsPDF:{},backgroundColor:"transparent"}},f.prototype.from=function(u,c){return this.then(function(){switch(c=c||function(d){switch(i(d)){case"string":return"string";case"element":return d.nodeName.toLowerCase()==="canvas"?"canvas":"element";default:return"unknown"}}(u),c){case"string":return this.then(t).then(function(d){return this.set({src:o("div",{innerHTML:u,dompurify:d})})});case"element":return this.set({src:u});case"canvas":return this.set({canvas:u});case"img":return this.set({img:u});default:return this.error("Unknown source type.")}})},f.prototype.to=function(u){switch(u){case"container":return this.toContainer();case"canvas":return this.toCanvas();case"img":return this.toImg();case"pdf":return this.toPdf();default:return this.error("Invalid target.")}},f.prototype.toContainer=function(){return this.thenList([function(){return this.prop.src||this.error("Cannot duplicate - no source HTML.")},function(){return this.prop.pageSize||this.setPageSize()}]).then(function(){var u={position:"relative",display:"inline-block",width:(typeof this.opt.width!="number"||isNaN(this.opt.width)||typeof this.opt.windowWidth!="number"||isNaN(this.opt.windowWidth)?Math.max(this.prop.src.clientWidth,this.prop.src.scrollWidth,this.prop.src.offsetWidth):this.opt.windowWidth)+"px",left:0,right:0,top:0,margin:"auto",backgroundColor:this.opt.backgroundColor},c=s(this.prop.src,this.opt.html2canvas.javascriptEnabled);c.tagName==="BODY"&&(u.height=Math.max(document.body.scrollHeight,document.body.offsetHeight,document.documentElement.clientHeight,document.documentElement.scrollHeight,document.documentElement.offsetHeight)+"px"),this.prop.overlay=o("div",{className:"html2pdf__overlay",style:{position:"fixed",overflow:"hidden",zIndex:1e3,left:"-100000px",right:0,bottom:0,top:0}}),this.prop.container=o("div",{className:"html2pdf__container",style:u}),this.prop.container.appendChild(c),this.prop.container.firstChild.appendChild(o("div",{style:{clear:"both",border:"0 none transparent",margin:0,padding:0,height:0}})),this.prop.container.style.float="none",this.prop.overlay.appendChild(this.prop.container),document.body.appendChild(this.prop.overlay),this.prop.container.firstChild.style.position="relative",this.prop.container.height=Math.max(this.prop.container.firstChild.clientHeight,this.prop.container.firstChild.scrollHeight,this.prop.container.firstChild.offsetHeight)+"px"})},f.prototype.toCanvas=function(){var u=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(u).then(e).then(function(c){var d=Object.assign({},this.opt.html2canvas);return delete d.onrendered,c(this.prop.container,d)}).then(function(c){(this.opt.html2canvas.onrendered||function(){})(c),this.prop.canvas=c,document.body.removeChild(this.prop.overlay)})},f.prototype.toContext2d=function(){var u=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(u).then(e).then(function(c){var d=this.opt.jsPDF,m=this.opt.fontFaces,A=typeof this.opt.width!="number"||isNaN(this.opt.width)||typeof this.opt.windowWidth!="number"||isNaN(this.opt.windowWidth)?1:this.opt.width/this.opt.windowWidth,P=Object.assign({async:!0,allowTaint:!0,scale:A,scrollX:this.opt.scrollX||0,scrollY:this.opt.scrollY||0,backgroundColor:"#ffffff",imageTimeout:15e3,logging:!0,proxy:null,removeContainer:!0,foreignObjectRendering:!1,useCORS:!1},this.opt.html2canvas);if(delete P.onrendered,d.context2d.autoPaging=this.opt.autoPaging===void 0||this.opt.autoPaging,d.context2d.posX=this.opt.x,d.context2d.posY=this.opt.y,d.context2d.margin=this.opt.margin,d.context2d.fontFaces=m,m)for(var p=0;p<m.length;++p){var B=m[p],O=B.src.find(function(M){return M.format==="truetype"});O&&d.addFont(O.url,B.ref.name,B.ref.style)}return P.windowHeight=P.windowHeight||0,P.windowHeight=P.windowHeight==0?Math.max(this.prop.container.clientHeight,this.prop.container.scrollHeight,this.prop.container.offsetHeight):P.windowHeight,d.context2d.save(!0),c(this.prop.container,P)}).then(function(c){this.opt.jsPDF.context2d.restore(!0),(this.opt.html2canvas.onrendered||function(){})(c),this.prop.canvas=c,document.body.removeChild(this.prop.overlay)})},f.prototype.toImg=function(){return this.thenList([function(){return this.prop.canvas||this.toCanvas()}]).then(function(){var u=this.prop.canvas.toDataURL("image/"+this.opt.image.type,this.opt.image.quality);this.prop.img=document.createElement("img"),this.prop.img.src=u})},f.prototype.toPdf=function(){return this.thenList([function(){return this.toContext2d()}]).then(function(){this.prop.pdf=this.prop.pdf||this.opt.jsPDF})},f.prototype.output=function(u,c,d){return(d=d||"pdf").toLowerCase()==="img"||d.toLowerCase()==="image"?this.outputImg(u,c):this.outputPdf(u,c)},f.prototype.outputPdf=function(u,c){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then(function(){return this.prop.pdf.output(u,c)})},f.prototype.outputImg=function(u){return this.thenList([function(){return this.prop.img||this.toImg()}]).then(function(){switch(u){case void 0:case"img":return this.prop.img;case"datauristring":case"dataurlstring":return this.prop.img.src;case"datauri":case"dataurl":return document.location.href=this.prop.img.src;default:throw'Image output type "'+u+'" is not supported.'}})},f.prototype.save=function(u){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).set(u?{filename:u}:null).then(function(){this.prop.pdf.save(this.opt.filename)})},f.prototype.doCallback=function(){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then(function(){this.prop.callback(this.prop.pdf)})},f.prototype.set=function(u){if(i(u)!=="object")return this;var c=Object.keys(u||{}).map(function(d){if(d in f.template.prop)return function(){this.prop[d]=u[d]};switch(d){case"margin":return this.setMargin.bind(this,u.margin);case"jsPDF":return function(){return this.opt.jsPDF=u.jsPDF,this.setPageSize()};case"pageSize":return this.setPageSize.bind(this,u.pageSize);default:return function(){this.opt[d]=u[d]}}},this);return this.then(function(){return this.thenList(c)})},f.prototype.get=function(u,c){return this.then(function(){var d=u in f.template.prop?this.prop[u]:this.opt[u];return c?c(d):d})},f.prototype.setMargin=function(u){return this.then(function(){switch(i(u)){case"number":u=[u,u,u,u];case"array":if(u.length===2&&(u=[u[0],u[1],u[0],u[1]]),u.length===4)break;default:return this.error("Invalid margin array.")}this.opt.margin=u}).then(this.setPageSize)},f.prototype.setPageSize=function(u){function c(d,m){return Math.floor(d*m/72*96)}return this.then(function(){(u=u||Tt.getPageSize(this.opt.jsPDF)).hasOwnProperty("inner")||(u.inner={width:u.width-this.opt.margin[1]-this.opt.margin[3],height:u.height-this.opt.margin[0]-this.opt.margin[2]},u.inner.px={width:c(u.inner.width,u.k),height:c(u.inner.height,u.k)},u.inner.ratio=u.inner.height/u.inner.width),this.prop.pageSize=u})},f.prototype.setProgress=function(u,c,d,m){return u!=null&&(this.progress.val=u),c!=null&&(this.progress.state=c),d!=null&&(this.progress.n=d),m!=null&&(this.progress.stack=m),this.progress.ratio=this.progress.val/this.progress.state,this},f.prototype.updateProgress=function(u,c,d,m){return this.setProgress(u?this.progress.val+u:null,c||null,d?this.progress.n+d:null,m?this.progress.stack.concat(m):null)},f.prototype.then=function(u,c){var d=this;return this.thenCore(u,c,function(m,A){return d.updateProgress(null,null,1,[m]),Promise.prototype.then.call(this,function(P){return d.updateProgress(null,m),P}).then(m,A).then(function(P){return d.updateProgress(1),P})})},f.prototype.thenCore=function(u,c,d){d=d||Promise.prototype.then;var m=this;u&&(u=u.bind(m)),c&&(c=c.bind(m));var A=Promise.toString().indexOf("[native code]")!==-1&&Promise.name==="Promise"?m:f.convert(Object.assign({},m),Promise.prototype),P=d.call(A,u,c);return f.convert(P,m.__proto__)},f.prototype.thenExternal=function(u,c){return Promise.prototype.then.call(this,u,c)},f.prototype.thenList=function(u){var c=this;return u.forEach(function(d){c=c.thenCore(d)}),c},f.prototype.catch=function(u){u&&(u=u.bind(this));var c=Promise.prototype.catch.call(this,u);return f.convert(c,this)},f.prototype.catchExternal=function(u){return Promise.prototype.catch.call(this,u)},f.prototype.error=function(u){return this.then(function(){throw new Error(u)})},f.prototype.using=f.prototype.set,f.prototype.saveAs=f.prototype.save,f.prototype.export=f.prototype.output,f.prototype.run=f.prototype.then,Tt.getPageSize=function(u,c,d){if(Se(u)==="object"){var m=u;u=m.orientation,c=m.unit||c,d=m.format||d}c=c||"mm",d=d||"a4",u=(""+(u||"P")).toLowerCase();var A,P=(""+d).toLowerCase(),p={a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89],a5:[419.53,595.28],a6:[297.64,419.53],a7:[209.76,297.64],a8:[147.4,209.76],a9:[104.88,147.4],a10:[73.7,104.88],b0:[2834.65,4008.19],b1:[2004.09,2834.65],b2:[1417.32,2004.09],b3:[1000.63,1417.32],b4:[708.66,1000.63],b5:[498.9,708.66],b6:[354.33,498.9],b7:[249.45,354.33],b8:[175.75,249.45],b9:[124.72,175.75],b10:[87.87,124.72],c0:[2599.37,3676.54],c1:[1836.85,2599.37],c2:[1298.27,1836.85],c3:[918.43,1298.27],c4:[649.13,918.43],c5:[459.21,649.13],c6:[323.15,459.21],c7:[229.61,323.15],c8:[161.57,229.61],c9:[113.39,161.57],c10:[79.37,113.39],dl:[311.81,623.62],letter:[612,792],"government-letter":[576,756],legal:[612,1008],"junior-legal":[576,360],ledger:[1224,792],tabloid:[792,1224],"credit-card":[153,243]};switch(c){case"pt":A=1;break;case"mm":A=72/25.4;break;case"cm":A=72/2.54;break;case"in":A=72;break;case"px":A=.75;break;case"pc":case"em":A=12;break;case"ex":A=6;break;default:throw"Invalid unit: "+c}var B,O=0,M=0;if(p.hasOwnProperty(P))O=p[P][1]/A,M=p[P][0]/A;else try{O=d[1],M=d[0]}catch{throw new Error("Invalid format: "+d)}if(u==="p"||u==="portrait")u="p",M>O&&(B=M,M=O,O=B);else{if(u!=="l"&&u!=="landscape")throw"Invalid orientation: "+u;u="l",O>M&&(B=M,M=O,O=B)}return{width:M,height:O,unit:c,k:A,orientation:u}},r.html=function(u,c){(c=c||{}).callback=c.callback||function(){},c.html2canvas=c.html2canvas||{},c.html2canvas.canvas=c.html2canvas.canvas||this.canvas,c.jsPDF=c.jsPDF||this,c.fontFaces=c.fontFaces?c.fontFaces.map(_o):null;var d=new f(c);return c.worker?d:d.from(u).doCallback()}}(Tt.API),Tt.API.addJS=function(r){return mu=r,this.internal.events.subscribe("postPutResources",function(){ds=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/Names [(EmbeddedJS) "+(ds+1)+" 0 R]"),this.internal.out(">>"),this.internal.out("endobj"),gu=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/S /JavaScript"),this.internal.out("/JS ("+mu+")"),this.internal.out(">>"),this.internal.out("endobj")}),this.internal.events.subscribe("putCatalog",function(){ds!==void 0&&gu!==void 0&&this.internal.out("/Names <</JavaScript "+ds+" 0 R>>")}),this},function(r){var e;r.events.push(["postPutResources",function(){var t=this,i=/^(\d+) 0 obj$/;if(this.outline.root.children.length>0)for(var o=t.outline.render().split(/\r\n/),s=0;s<o.length;s++){var f=o[s],u=i.exec(f);if(u!=null){var c=u[1];t.internal.newObjectDeferredBegin(c,!1)}t.internal.write(f)}if(this.outline.createNamedDestinations){var d=this.internal.pages.length,m=[];for(s=0;s<d;s++){var A=t.internal.newObject();m.push(A);var P=t.internal.getPageInfo(s+1);t.internal.write("<< /D["+P.objId+" 0 R /XYZ null null null]>> endobj")}var p=t.internal.newObject();for(t.internal.write("<< /Names [ "),s=0;s<m.length;s++)t.internal.write("(page_"+(s+1)+")"+m[s]+" 0 R");t.internal.write(" ] >>","endobj"),e=t.internal.newObject(),t.internal.write("<< /Dests "+p+" 0 R"),t.internal.write(">>","endobj")}}]),r.events.push(["putCatalog",function(){var t=this;t.outline.root.children.length>0&&(t.internal.write("/Outlines",this.outline.makeRef(this.outline.root)),this.outline.createNamedDestinations&&t.internal.write("/Names "+e+" 0 R"))}]),r.events.push(["initialized",function(){var t=this;t.outline={createNamedDestinations:!1,root:{children:[]}},t.outline.add=function(i,o,s){var f={title:o,options:s,children:[]};return i==null&&(i=this.root),i.children.push(f),f},t.outline.render=function(){return this.ctx={},this.ctx.val="",this.ctx.pdf=t,this.genIds_r(this.root),this.renderRoot(this.root),this.renderItems(this.root),this.ctx.val},t.outline.genIds_r=function(i){i.id=t.internal.newObjectDeferred();for(var o=0;o<i.children.length;o++)this.genIds_r(i.children[o])},t.outline.renderRoot=function(i){this.objStart(i),this.line("/Type /Outlines"),i.children.length>0&&(this.line("/First "+this.makeRef(i.children[0])),this.line("/Last "+this.makeRef(i.children[i.children.length-1]))),this.line("/Count "+this.count_r({count:0},i)),this.objEnd()},t.outline.renderItems=function(i){for(var o=this.ctx.pdf.internal.getVerticalCoordinateString,s=0;s<i.children.length;s++){var f=i.children[s];this.objStart(f),this.line("/Title "+this.makeString(f.title)),this.line("/Parent "+this.makeRef(i)),s>0&&this.line("/Prev "+this.makeRef(i.children[s-1])),s<i.children.length-1&&this.line("/Next "+this.makeRef(i.children[s+1])),f.children.length>0&&(this.line("/First "+this.makeRef(f.children[0])),this.line("/Last "+this.makeRef(f.children[f.children.length-1])));var u=this.count=this.count_r({count:0},f);if(u>0&&this.line("/Count "+u),f.options&&f.options.pageNumber){var c=t.internal.getPageInfo(f.options.pageNumber);this.line("/Dest ["+c.objId+" 0 R /XYZ 0 "+o(0)+" 0]")}this.objEnd()}for(var d=0;d<i.children.length;d++)this.renderItems(i.children[d])},t.outline.line=function(i){this.ctx.val+=i+`\r
|
||
`},t.outline.makeRef=function(i){return i.id+" 0 R"},t.outline.makeString=function(i){return"("+t.internal.pdfEscape(i)+")"},t.outline.objStart=function(i){this.ctx.val+=`\r
|
||
`+i.id+` 0 obj\r
|
||
<<\r
|
||
`},t.outline.objEnd=function(){this.ctx.val+=`>> \r
|
||
endobj\r
|
||
`},t.outline.count_r=function(i,o){for(var s=0;s<o.children.length;s++)i.count++,this.count_r(i,o.children[s]);return i.count}}])}(Tt.API),function(r){var e=[192,193,194,195,196,197,198,199];r.processJPEG=function(t,i,o,s,f,u){var c,d=this.decode.DCT_DECODE,m=null;if(typeof t=="string"||this.__addimage__.isArrayBuffer(t)||this.__addimage__.isArrayBufferView(t)){switch(t=f||t,t=this.__addimage__.isArrayBuffer(t)?new Uint8Array(t):t,c=function(A){for(var P,p=256*A.charCodeAt(4)+A.charCodeAt(5),B=A.length,O={width:0,height:0,numcomponents:1},M=4;M<B;M+=2){if(M+=p,e.indexOf(A.charCodeAt(M+1))!==-1){P=256*A.charCodeAt(M+5)+A.charCodeAt(M+6),O={width:256*A.charCodeAt(M+7)+A.charCodeAt(M+8),height:P,numcomponents:A.charCodeAt(M+9)};break}p=256*A.charCodeAt(M+2)+A.charCodeAt(M+3)}return O}(t=this.__addimage__.isArrayBufferView(t)?this.__addimage__.arrayBufferToBinaryString(t):t),c.numcomponents){case 1:u=this.color_spaces.DEVICE_GRAY;break;case 4:u=this.color_spaces.DEVICE_CMYK;break;case 3:u=this.color_spaces.DEVICE_RGB}m={data:t,width:c.width,height:c.height,colorSpace:u,bitsPerComponent:8,filter:d,index:i,alias:o}}return m}}(Tt.API),Tt.API.processPNG=function(r,e,t,i){if(this.__addimage__.isArrayBuffer(r)&&(r=new Uint8Array(r)),this.__addimage__.isArrayBufferView(r)){var o,s=Yf(r,{checkCrc:!0}),f=s.width,u=s.height,c=s.channels,d=s.palette,m=s.depth;o=d&&c===1?function(tt){for(var z=tt.width,et=tt.height,N=tt.data,E=tt.palette,q=tt.depth,U=!1,it=[],ct=[],pt=void 0,rt=!1,ft=0,At=0;At<E.length;At++){var xt=yl(E[At],4),x=xt[0],j=xt[1],R=xt[2],V=xt[3];it.push(x,j,R),V!=null&&(V===0?(ft++,ct.length<1&&ct.push(At)):V<255&&(rt=!0))}if(rt||ft>1){U=!0,ct=void 0;var J=z*et;pt=new Uint8Array(J);for(var Q=new DataView(N.buffer),nt=0;nt<J;nt++){var at=No(Q,nt,q),dt=yl(E[at],4)[3];pt[nt]=dt}}else ft===0&&(ct=void 0);return{colorSpace:"Indexed",colorsPerPixel:1,sMaskBitsPerComponent:U?8:void 0,colorBytes:N,alphaBytes:pt,needSMask:U,palette:it,mask:ct}}(s):c===2||c===4?function(tt){for(var z=tt.data,et=tt.width,N=tt.height,E=tt.channels,q=tt.depth,U=E===2?"DeviceGray":"DeviceRGB",it=E-1,ct=et*N,pt=it,rt=ct*pt,ft=1*ct,At=Math.ceil(rt*q/8),xt=Math.ceil(ft*q/8),x=new Uint8Array(At),j=new Uint8Array(xt),R=new DataView(z.buffer),V=new DataView(x.buffer),J=new DataView(j.buffer),Q=!1,nt=0;nt<ct;nt++){for(var at=nt*E,dt=0;dt<pt;dt++)Lu(V,No(R,at+dt,q),nt*pt+dt,q);var _t=No(R,at+pt,q);_t<(1<<q)-1&&(Q=!0),Lu(J,_t,1*nt,q)}return{colorSpace:U,colorsPerPixel:it,sMaskBitsPerComponent:Q?q:void 0,colorBytes:x,alphaBytes:j,needSMask:Q}}(s):function(tt){var z=tt.data,et=tt.channels===1?"DeviceGray":"DeviceRGB";return{colorSpace:et,colorsPerPixel:et==="DeviceGray"?1:3,colorBytes:z instanceof Uint16Array?function(N){for(var E=N.length,q=new Uint8Array(2*E),U=new DataView(q.buffer,q.byteOffset,q.byteLength),it=0;it<E;it++)U.setUint16(2*it,N[it],!1);return q}(z):z,needSMask:!1}}(s);var A,P,p,B=o,O=B.colorSpace,M=B.colorsPerPixel,S=B.sMaskBitsPerComponent,G=B.colorBytes,Y=B.alphaBytes,D=B.needSMask,ot=B.palette,yt=B.mask,gt=null;return i!==Tt.API.image_compression.NONE&&typeof So=="function"?(gt=function(tt){var z;switch(tt){case Tt.API.image_compression.FAST:z=11;break;case Tt.API.image_compression.MEDIUM:z=13;break;case Tt.API.image_compression.SLOW:z=14;break;default:z=12}return z}(i),A=this.decode.FLATE_DECODE,P="/Predictor ".concat(gt," /Colors ").concat(M," /BitsPerComponent ").concat(m," /Columns ").concat(f),r=yu(G,Math.ceil(f*M*m/8),M,m,i),D&&(p=yu(Y,Math.ceil(f*S/8),1,S,i))):(A=void 0,P=void 0,r=G,D&&(p=Y)),(this.__addimage__.isArrayBuffer(r)||this.__addimage__.isArrayBufferView(r))&&(r=this.__addimage__.arrayBufferToBinaryString(r)),(p&&this.__addimage__.isArrayBuffer(p)||this.__addimage__.isArrayBufferView(p))&&(p=this.__addimage__.arrayBufferToBinaryString(p)),{alias:t,data:r,index:e,filter:A,decodeParameters:P,transparency:yt,palette:ot,sMask:p,predictor:gt,width:f,height:u,bitsPerComponent:m,sMaskBitsPerComponent:S,colorSpace:O}}},function(r){r.processGIF89A=function(e,t,i,o){var s=new p1(e),f=s.width,u=s.height,c=[];s.decodeAndBlitFrameRGBA(0,c);var d={data:c,width:f,height:u},m=new Lo(100).encode(d,100);return r.processJPEG.call(this,m,t,i,o)},r.processGIF87A=r.processGIF89A}(Tt.API),Kr.prototype.parseHeader=function(){if(this.fileSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.reserved=this.datav.getUint32(this.pos,!0),this.pos+=4,this.offset=this.datav.getUint32(this.pos,!0),this.pos+=4,this.headerSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.width=this.datav.getUint32(this.pos,!0),this.pos+=4,this.height=this.datav.getInt32(this.pos,!0),this.pos+=4,this.planes=this.datav.getUint16(this.pos,!0),this.pos+=2,this.bitPP=this.datav.getUint16(this.pos,!0),this.pos+=2,this.compress=this.datav.getUint32(this.pos,!0),this.pos+=4,this.rawSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.hr=this.datav.getUint32(this.pos,!0),this.pos+=4,this.vr=this.datav.getUint32(this.pos,!0),this.pos+=4,this.colors=this.datav.getUint32(this.pos,!0),this.pos+=4,this.importantColors=this.datav.getUint32(this.pos,!0),this.pos+=4,this.bitPP===16&&this.is_with_alpha&&(this.bitPP=15),this.bitPP<15){var r=this.colors===0?1<<this.bitPP:this.colors;this.palette=new Array(r);for(var e=0;e<r;e++){var t=this.datav.getUint8(this.pos++,!0),i=this.datav.getUint8(this.pos++,!0),o=this.datav.getUint8(this.pos++,!0),s=this.datav.getUint8(this.pos++,!0);this.palette[e]={red:o,green:i,blue:t,quad:s}}}this.height<0&&(this.height*=-1,this.bottom_up=!1)},Kr.prototype.parseBGR=function(){this.pos=this.offset;try{var r="bit"+this.bitPP,e=this.width*this.height*4;this.data=new Uint8Array(e),this[r]()}catch(t){Le.log("bit decode error:"+t)}},Kr.prototype.bit1=function(){var r,e=Math.ceil(this.width/8),t=e%4;for(r=this.height-1;r>=0;r--){for(var i=this.bottom_up?r:this.height-1-r,o=0;o<e;o++)for(var s=this.datav.getUint8(this.pos++,!0),f=i*this.width*4+8*o*4,u=0;u<8&&8*o+u<this.width;u++){var c=this.palette[s>>7-u&1];this.data[f+4*u]=c.blue,this.data[f+4*u+1]=c.green,this.data[f+4*u+2]=c.red,this.data[f+4*u+3]=255}t!==0&&(this.pos+=4-t)}},Kr.prototype.bit4=function(){for(var r=Math.ceil(this.width/2),e=r%4,t=this.height-1;t>=0;t--){for(var i=this.bottom_up?t:this.height-1-t,o=0;o<r;o++){var s=this.datav.getUint8(this.pos++,!0),f=i*this.width*4+2*o*4,u=s>>4,c=15&s,d=this.palette[u];if(this.data[f]=d.blue,this.data[f+1]=d.green,this.data[f+2]=d.red,this.data[f+3]=255,2*o+1>=this.width)break;d=this.palette[c],this.data[f+4]=d.blue,this.data[f+4+1]=d.green,this.data[f+4+2]=d.red,this.data[f+4+3]=255}e!==0&&(this.pos+=4-e)}},Kr.prototype.bit8=function(){for(var r=this.width%4,e=this.height-1;e>=0;e--){for(var t=this.bottom_up?e:this.height-1-e,i=0;i<this.width;i++){var o=this.datav.getUint8(this.pos++,!0),s=t*this.width*4+4*i;if(o<this.palette.length){var f=this.palette[o];this.data[s]=f.red,this.data[s+1]=f.green,this.data[s+2]=f.blue,this.data[s+3]=255}else this.data[s]=255,this.data[s+1]=255,this.data[s+2]=255,this.data[s+3]=255}r!==0&&(this.pos+=4-r)}},Kr.prototype.bit15=function(){for(var r=this.width%3,e=parseInt("11111",2),t=this.height-1;t>=0;t--){for(var i=this.bottom_up?t:this.height-1-t,o=0;o<this.width;o++){var s=this.datav.getUint16(this.pos,!0);this.pos+=2;var f=(s&e)/e*255|0,u=(s>>5&e)/e*255|0,c=(s>>10&e)/e*255|0,d=s>>15?255:0,m=i*this.width*4+4*o;this.data[m]=c,this.data[m+1]=u,this.data[m+2]=f,this.data[m+3]=d}this.pos+=r}},Kr.prototype.bit16=function(){for(var r=this.width%3,e=parseInt("11111",2),t=parseInt("111111",2),i=this.height-1;i>=0;i--){for(var o=this.bottom_up?i:this.height-1-i,s=0;s<this.width;s++){var f=this.datav.getUint16(this.pos,!0);this.pos+=2;var u=(f&e)/e*255|0,c=(f>>5&t)/t*255|0,d=(f>>11)/e*255|0,m=o*this.width*4+4*s;this.data[m]=d,this.data[m+1]=c,this.data[m+2]=u,this.data[m+3]=255}this.pos+=r}},Kr.prototype.bit24=function(){for(var r=this.height-1;r>=0;r--){for(var e=this.bottom_up?r:this.height-1-r,t=0;t<this.width;t++){var i=this.datav.getUint8(this.pos++,!0),o=this.datav.getUint8(this.pos++,!0),s=this.datav.getUint8(this.pos++,!0),f=e*this.width*4+4*t;this.data[f]=s,this.data[f+1]=o,this.data[f+2]=i,this.data[f+3]=255}this.pos+=this.width%4}},Kr.prototype.bit32=function(){for(var r=this.height-1;r>=0;r--)for(var e=this.bottom_up?r:this.height-1-r,t=0;t<this.width;t++){var i=this.datav.getUint8(this.pos++,!0),o=this.datav.getUint8(this.pos++,!0),s=this.datav.getUint8(this.pos++,!0),f=this.datav.getUint8(this.pos++,!0),u=e*this.width*4+4*t;this.data[u]=s,this.data[u+1]=o,this.data[u+2]=i,this.data[u+3]=f}},Kr.prototype.getData=function(){return this.data},function(r){r.processBMP=function(e,t,i,o){var s=new Kr(e,!1),f=s.width,u=s.height,c={data:s.getData(),width:f,height:u},d=new Lo(100).encode(c,100);return r.processJPEG.call(this,d,t,i,o)}}(Tt.API),ku.prototype.getData=function(){return this.data},function(r){r.processWEBP=function(e,t,i,o){var s=new ku(e),f=s.width,u=s.height,c={data:s.getData(),width:f,height:u},d=new Lo(100).encode(c,100);return r.processJPEG.call(this,d,t,i,o)}}(Tt.API),Tt.API.processRGBA=function(r,e,t){for(var i=r.data,o=i.length,s=new Uint8Array(o/4*3),f=new Uint8Array(o/4),u=0,c=0,d=0;d<o;d+=4){var m=i[d],A=i[d+1],P=i[d+2],p=i[d+3];s[u++]=m,s[u++]=A,s[u++]=P,f[c++]=p}var B=this.__addimage__.arrayBufferToBinaryString(s);return{alpha:this.__addimage__.arrayBufferToBinaryString(f),data:B,index:e,alias:t,colorSpace:"DeviceRGB",bitsPerComponent:8,width:r.width,height:r.height}},Tt.API.setLanguage=function(r){return this.internal.languageSettings===void 0&&(this.internal.languageSettings={},this.internal.languageSettings.isSubscribed=!1),{af:"Afrikaans",sq:"Albanian",ar:"Arabic (Standard)","ar-DZ":"Arabic (Algeria)","ar-BH":"Arabic (Bahrain)","ar-EG":"Arabic (Egypt)","ar-IQ":"Arabic (Iraq)","ar-JO":"Arabic (Jordan)","ar-KW":"Arabic (Kuwait)","ar-LB":"Arabic (Lebanon)","ar-LY":"Arabic (Libya)","ar-MA":"Arabic (Morocco)","ar-OM":"Arabic (Oman)","ar-QA":"Arabic (Qatar)","ar-SA":"Arabic (Saudi Arabia)","ar-SY":"Arabic (Syria)","ar-TN":"Arabic (Tunisia)","ar-AE":"Arabic (U.A.E.)","ar-YE":"Arabic (Yemen)",an:"Aragonese",hy:"Armenian",as:"Assamese",ast:"Asturian",az:"Azerbaijani",eu:"Basque",be:"Belarusian",bn:"Bengali",bs:"Bosnian",br:"Breton",bg:"Bulgarian",my:"Burmese",ca:"Catalan",ch:"Chamorro",ce:"Chechen",zh:"Chinese","zh-HK":"Chinese (Hong Kong)","zh-CN":"Chinese (PRC)","zh-SG":"Chinese (Singapore)","zh-TW":"Chinese (Taiwan)",cv:"Chuvash",co:"Corsican",cr:"Cree",hr:"Croatian",cs:"Czech",da:"Danish",nl:"Dutch (Standard)","nl-BE":"Dutch (Belgian)",en:"English","en-AU":"English (Australia)","en-BZ":"English (Belize)","en-CA":"English (Canada)","en-IE":"English (Ireland)","en-JM":"English (Jamaica)","en-NZ":"English (New Zealand)","en-PH":"English (Philippines)","en-ZA":"English (South Africa)","en-TT":"English (Trinidad & Tobago)","en-GB":"English (United Kingdom)","en-US":"English (United States)","en-ZW":"English (Zimbabwe)",eo:"Esperanto",et:"Estonian",fo:"Faeroese",fj:"Fijian",fi:"Finnish",fr:"French (Standard)","fr-BE":"French (Belgium)","fr-CA":"French (Canada)","fr-FR":"French (France)","fr-LU":"French (Luxembourg)","fr-MC":"French (Monaco)","fr-CH":"French (Switzerland)",fy:"Frisian",fur:"Friulian",gd:"Gaelic (Scots)","gd-IE":"Gaelic (Irish)",gl:"Galacian",ka:"Georgian",de:"German (Standard)","de-AT":"German (Austria)","de-DE":"German (Germany)","de-LI":"German (Liechtenstein)","de-LU":"German (Luxembourg)","de-CH":"German (Switzerland)",el:"Greek",gu:"Gujurati",ht:"Haitian",he:"Hebrew",hi:"Hindi",hu:"Hungarian",is:"Icelandic",id:"Indonesian",iu:"Inuktitut",ga:"Irish",it:"Italian (Standard)","it-CH":"Italian (Switzerland)",ja:"Japanese",kn:"Kannada",ks:"Kashmiri",kk:"Kazakh",km:"Khmer",ky:"Kirghiz",tlh:"Klingon",ko:"Korean","ko-KP":"Korean (North Korea)","ko-KR":"Korean (South Korea)",la:"Latin",lv:"Latvian",lt:"Lithuanian",lb:"Luxembourgish",mk:"North Macedonia",ms:"Malay",ml:"Malayalam",mt:"Maltese",mi:"Maori",mr:"Marathi",mo:"Moldavian",nv:"Navajo",ng:"Ndonga",ne:"Nepali",no:"Norwegian",nb:"Norwegian (Bokmal)",nn:"Norwegian (Nynorsk)",oc:"Occitan",or:"Oriya",om:"Oromo",fa:"Persian","fa-IR":"Persian/Iran",pl:"Polish",pt:"Portuguese","pt-BR":"Portuguese (Brazil)",pa:"Punjabi","pa-IN":"Punjabi (India)","pa-PK":"Punjabi (Pakistan)",qu:"Quechua",rm:"Rhaeto-Romanic",ro:"Romanian","ro-MO":"Romanian (Moldavia)",ru:"Russian","ru-MO":"Russian (Moldavia)",sz:"Sami (Lappish)",sg:"Sango",sa:"Sanskrit",sc:"Sardinian",sd:"Sindhi",si:"Singhalese",sr:"Serbian",sk:"Slovak",sl:"Slovenian",so:"Somani",sb:"Sorbian",es:"Spanish","es-AR":"Spanish (Argentina)","es-BO":"Spanish (Bolivia)","es-CL":"Spanish (Chile)","es-CO":"Spanish (Colombia)","es-CR":"Spanish (Costa Rica)","es-DO":"Spanish (Dominican Republic)","es-EC":"Spanish (Ecuador)","es-SV":"Spanish (El Salvador)","es-GT":"Spanish (Guatemala)","es-HN":"Spanish (Honduras)","es-MX":"Spanish (Mexico)","es-NI":"Spanish (Nicaragua)","es-PA":"Spanish (Panama)","es-PY":"Spanish (Paraguay)","es-PE":"Spanish (Peru)","es-PR":"Spanish (Puerto Rico)","es-ES":"Spanish (Spain)","es-UY":"Spanish (Uruguay)","es-VE":"Spanish (Venezuela)",sx:"Sutu",sw:"Swahili",sv:"Swedish","sv-FI":"Swedish (Finland)","sv-SV":"Swedish (Sweden)",ta:"Tamil",tt:"Tatar",te:"Teluga",th:"Thai",tig:"Tigre",ts:"Tsonga",tn:"Tswana",tr:"Turkish",tk:"Turkmen",uk:"Ukrainian",hsb:"Upper Sorbian",ur:"Urdu",ve:"Venda",vi:"Vietnamese",vo:"Volapuk",wa:"Walloon",cy:"Welsh",xh:"Xhosa",ji:"Yiddish",zu:"Zulu"}[r]!==void 0&&(this.internal.languageSettings.languageCode=r,this.internal.languageSettings.isSubscribed===!1&&(this.internal.events.subscribe("putCatalog",function(){this.internal.write("/Lang ("+this.internal.languageSettings.languageCode+")")}),this.internal.languageSettings.isSubscribed=!0)),this},Ri=Tt.API,ps=Ri.getCharWidthsArray=function(r,e){var t,i,o=(e=e||{}).font||this.internal.getFont(),s=e.fontSize||this.internal.getFontSize(),f=e.charSpace||this.internal.getCharSpace(),u=e.widths?e.widths:o.metadata.Unicode.widths,c=u.fof?u.fof:1,d=e.kerning?e.kerning:o.metadata.Unicode.kerning,m=d.fof?d.fof:1,A=e.doKerning!==!1,P=0,p=r.length,B=0,O=u[0]||c,M=[];for(t=0;t<p;t++)i=r.charCodeAt(t),typeof o.metadata.widthOfString=="function"?M.push((o.metadata.widthOfGlyph(o.metadata.characterToGlyph(i))+f*(1e3/s)||0)/1e3):(P=A&&Se(d[i])==="object"&&!isNaN(parseInt(d[i][B],10))?d[i][B]/m:0,M.push((u[i]||O)/c+P)),B=i;return M},bu=Ri.getStringUnitWidth=function(r,e){var t=(e=e||{}).fontSize||this.internal.getFontSize(),i=e.font||this.internal.getFont(),o=e.charSpace||this.internal.getCharSpace();return Ri.processArabic&&(r=Ri.processArabic(r)),typeof i.metadata.widthOfString=="function"?i.metadata.widthOfString(r,t,o)/t:ps.apply(this,arguments).reduce(function(s,f){return s+f},0)},vu=function(r,e,t,i){for(var o=[],s=0,f=r.length,u=0;s!==f&&u+e[s]<t;)u+=e[s],s++;o.push(r.slice(0,s));var c=s;for(u=0;s!==f;)u+e[s]>i&&(o.push(r.slice(c,s)),u=0,c=s),u+=e[s],s++;return c!==s&&o.push(r.slice(c,s)),o},wu=function(r,e,t){t||(t={});var i,o,s,f,u,c,d,m=[],A=[m],P=t.textIndent||0,p=0,B=0,O=r.split(" "),M=ps.apply(this,[" ",t])[0];if(c=t.lineIndent===-1?O[0].length+2:t.lineIndent||0){var S=Array(c).join(" "),G=[];O.map(function(D){(D=D.split(/\s*\n/)).length>1?G=G.concat(D.map(function(ot,yt){return(yt&&ot.length?`
|
||
`:"")+ot})):G.push(D[0])}),O=G,c=bu.apply(this,[S,t])}for(s=0,f=O.length;s<f;s++){var Y=0;if(i=O[s],c&&i[0]==`
|
||
`&&(i=i.substr(1),Y=1),P+p+(B=(o=ps.apply(this,[i,t])).reduce(function(D,ot){return D+ot},0))>e||Y){if(B>e){for(u=vu.apply(this,[i,o,e-(P+p),e]),m.push(u.shift()),m=[u.pop()];u.length;)A.push([u.shift()]);B=o.slice(i.length-(m[0]?m[0].length:0)).reduce(function(D,ot){return D+ot},0)}else m=[i];A.push(m),P=B+c,p=M}else m.push(i),P+=p+B,p=M}return d=c?function(D,ot){return(ot?S:"")+D.join(" ")}:function(D){return D.join(" ")},A.map(d)},Ri.splitTextToSize=function(r,e,t){var i,o=(t=t||{}).fontSize||this.internal.getFontSize(),s=(function(m){if(m.widths&&m.kerning)return{widths:m.widths,kerning:m.kerning};var A=this.internal.getFont(m.fontName,m.fontStyle),P="Unicode";return A.metadata[P]?{widths:A.metadata[P].widths||{0:1},kerning:A.metadata[P].kerning||{}}:{font:A.metadata,fontSize:this.internal.getFontSize(),charSpace:this.internal.getCharSpace()}}).call(this,t);i=Array.isArray(r)?r:String(r).split(/\r?\n/);var f=1*this.internal.scaleFactor*e/o;s.textIndent=t.textIndent?1*t.textIndent*this.internal.scaleFactor/o:0,s.lineIndent=t.lineIndent;var u,c,d=[];for(u=0,c=i.length;u<c;u++)d=d.concat(wu.apply(this,[i[u],f,s]));return d},function(r){r.__fontmetrics__=r.__fontmetrics__||{};for(var e="0123456789abcdef",t="klmnopqrstuvwxyz",i={},o={},s=0;s<16;s++)i[t[s]]=e[s],o[e[s]]=t[s];var f=function(P){return"0x"+parseInt(P,10).toString(16)},u=r.__fontmetrics__.compress=function(P){var p,B,O,M,S=["{"];for(var G in P){if(p=P[G],isNaN(parseInt(G,10))?B="'"+G+"'":(G=parseInt(G,10),B=(B=f(G).slice(2)).slice(0,-1)+o[B.slice(-1)]),typeof p=="number")p<0?(O=f(p).slice(3),M="-"):(O=f(p).slice(2),M=""),O=M+O.slice(0,-1)+o[O.slice(-1)];else{if(Se(p)!=="object")throw new Error("Don't know what to do with value type "+Se(p)+".");O=u(p)}S.push(B+O)}return S.push("}"),S.join("")},c=r.__fontmetrics__.uncompress=function(P){if(typeof P!="string")throw new Error("Invalid argument passed to uncompress.");for(var p,B,O,M,S={},G=1,Y=S,D=[],ot="",yt="",gt=P.length-1,tt=1;tt<gt;tt+=1)(M=P[tt])=="'"?p?(O=p.join(""),p=void 0):p=[]:p?p.push(M):M=="{"?(D.push([Y,O]),Y={},O=void 0):M=="}"?((B=D.pop())[0][B[1]]=Y,O=void 0,Y=B[0]):M=="-"?G=-1:O===void 0?i.hasOwnProperty(M)?(ot+=i[M],O=parseInt(ot,16)*G,G=1,ot=""):ot+=M:i.hasOwnProperty(M)?(yt+=i[M],Y[O]=parseInt(yt,16)*G,G=1,O=void 0,yt=""):yt+=M;return S},d={codePages:["WinAnsiEncoding"],WinAnsiEncoding:c("{19m8n201n9q201o9r201s9l201t9m201u8m201w9n201x9o201y8o202k8q202l8r202m9p202q8p20aw8k203k8t203t8v203u9v2cq8s212m9t15m8w15n9w2dw9s16k8u16l9u17s9z17x8y17y9y}")},m={Unicode:{Courier:d,"Courier-Bold":d,"Courier-BoldOblique":d,"Courier-Oblique":d,Helvetica:d,"Helvetica-Bold":d,"Helvetica-BoldOblique":d,"Helvetica-Oblique":d,"Times-Roman":d,"Times-Bold":d,"Times-BoldItalic":d,"Times-Italic":d}},A={Unicode:{"Courier-Oblique":c("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-BoldItalic":c("{'widths'{k3o2q4ycx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2r202m2n2n3m2o3m2p5n202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5n4l4m4m4m4n4m4o4s4p4m4q4m4r4s4s4y4t2r4u3m4v4m4w3x4x5t4y4s4z4s5k3x5l4s5m4m5n3r5o3x5p4s5q4m5r5t5s4m5t3x5u3x5v2l5w1w5x2l5y3t5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q2l6r3m6s3r6t1w6u1w6v3m6w1w6x4y6y3r6z3m7k3m7l3m7m2r7n2r7o1w7p3r7q2w7r4m7s3m7t2w7u2r7v2n7w1q7x2n7y3t202l3mcl4mal2ram3man3mao3map3mar3mas2lat4uau1uav3maw3way4uaz2lbk2sbl3t'fof'6obo2lbp3tbq3mbr1tbs2lbu1ybv3mbz3mck4m202k3mcm4mcn4mco4mcp4mcq5ycr4mcs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz2w203k6o212m6o2dw2l2cq2l3t3m3u2l17s3x19m3m}'kerning'{cl{4qu5kt5qt5rs17ss5ts}201s{201ss}201t{cks4lscmscnscoscpscls2wu2yu201ts}201x{2wu2yu}2k{201ts}2w{4qx5kx5ou5qx5rs17su5tu}2x{17su5tu5ou}2y{4qx5kx5ou5qx5rs17ss5ts}'fof'-6ofn{17sw5tw5ou5qw5rs}7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qs}3v{17su5tu5os5qs}7p{17su5tu}ck{4qu5kt5qt5rs17ss5ts}4l{4qu5kt5qt5rs17ss5ts}cm{4qu5kt5qt5rs17ss5ts}cn{4qu5kt5qt5rs17ss5ts}co{4qu5kt5qt5rs17ss5ts}cp{4qu5kt5qt5rs17ss5ts}6l{4qu5ou5qw5rt17su5tu}5q{ckuclucmucnucoucpu4lu}5r{ckuclucmucnucoucpu4lu}7q{cksclscmscnscoscps4ls}6p{4qu5ou5qw5rt17sw5tw}ek{4qu5ou5qw5rt17su5tu}el{4qu5ou5qw5rt17su5tu}em{4qu5ou5qw5rt17su5tu}en{4qu5ou5qw5rt17su5tu}eo{4qu5ou5qw5rt17su5tu}ep{4qu5ou5qw5rt17su5tu}es{17ss5ts5qs4qu}et{4qu5ou5qw5rt17sw5tw}eu{4qu5ou5qw5rt17ss5ts}ev{17ss5ts5qs4qu}6z{17sw5tw5ou5qw5rs}fm{17sw5tw5ou5qw5rs}7n{201ts}fo{17sw5tw5ou5qw5rs}fp{17sw5tw5ou5qw5rs}fq{17sw5tw5ou5qw5rs}7r{cksclscmscnscoscps4ls}fs{17sw5tw5ou5qw5rs}ft{17su5tu}fu{17su5tu}fv{17su5tu}fw{17su5tu}fz{cksclscmscnscoscps4ls}}}"),"Helvetica-Bold":c("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"),Courier:c("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-BoldOblique":c("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Bold":c("{'widths'{k3q2q5ncx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2l202m2n2n3m2o3m2p6o202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5x4l4s4m4m4n4s4o4s4p4m4q3x4r4y4s4y4t2r4u3m4v4y4w4m4x5y4y4s4z4y5k3x5l4y5m4s5n3r5o4m5p4s5q4s5r6o5s4s5t4s5u4m5v2l5w1w5x2l5y3u5z3m6k2l6l3m6m3r6n2w6o3r6p2w6q2l6r3m6s3r6t1w6u2l6v3r6w1w6x5n6y3r6z3m7k3r7l3r7m2w7n2r7o2l7p3r7q3m7r4s7s3m7t3m7u2w7v2r7w1q7x2r7y3o202l3mcl4sal2lam3man3mao3map3mar3mas2lat4uau1yav3maw3tay4uaz2lbk2sbl3t'fof'6obo2lbp3rbr1tbs2lbu2lbv3mbz3mck4s202k3mcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3rek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3m3u2l17s4s19m3m}'kerning'{cl{4qt5ks5ot5qy5rw17sv5tv}201t{cks4lscmscnscoscpscls4wv}2k{201ts}2w{4qu5ku7mu5os5qx5ru17su5tu}2x{17su5tu5ou5qs}2y{4qv5kv7mu5ot5qz5ru17su5tu}'fof'-6o7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qu}3v{17su5tu5os5qu}fu{17su5tu5ou5qu}7p{17su5tu5ou5qu}ck{4qt5ks5ot5qy5rw17sv5tv}4l{4qt5ks5ot5qy5rw17sv5tv}cm{4qt5ks5ot5qy5rw17sv5tv}cn{4qt5ks5ot5qy5rw17sv5tv}co{4qt5ks5ot5qy5rw17sv5tv}cp{4qt5ks5ot5qy5rw17sv5tv}6l{17st5tt5ou5qu}17s{ckuclucmucnucoucpu4lu4wu}5o{ckuclucmucnucoucpu4lu4wu}5q{ckzclzcmzcnzcozcpz4lz4wu}5r{ckxclxcmxcnxcoxcpx4lx4wu}5t{ckuclucmucnucoucpu4lu4wu}7q{ckuclucmucnucoucpu4lu}6p{17sw5tw5ou5qu}ek{17st5tt5qu}el{17st5tt5ou5qu}em{17st5tt5qu}en{17st5tt5qu}eo{17st5tt5qu}ep{17st5tt5ou5qu}es{17ss5ts5qu}et{17sw5tw5ou5qu}eu{17sw5tw5ou5qu}ev{17ss5ts5qu}6z{17sw5tw5ou5qu5rs}fm{17sw5tw5ou5qu5rs}fn{17sw5tw5ou5qu5rs}fo{17sw5tw5ou5qu5rs}fp{17sw5tw5ou5qu5rs}fq{17sw5tw5ou5qu5rs}7r{cktcltcmtcntcotcpt4lt5os}fs{17sw5tw5ou5qu5rs}ft{17su5tu5ou5qu}7m{5os}fv{17su5tu5ou5qu}fw{17su5tu5ou5qu}fz{cksclscmscnscoscps4ls}}}"),Symbol:c("{'widths'{k3uaw4r19m3m2k1t2l2l202m2y2n3m2p5n202q6o3k3m2s2l2t2l2v3r2w1t3m3m2y1t2z1wbk2sbl3r'fof'6o3n3m3o3m3p3m3q3m3r3m3s3m3t3m3u1w3v1w3w3r3x3r3y3r3z2wbp3t3l3m5v2l5x2l5z3m2q4yfr3r7v3k7w1o7x3k}'kerning'{'fof'-6o}}"),Helvetica:c("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}"),"Helvetica-BoldOblique":c("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"),ZapfDingbats:c("{'widths'{k4u2k1w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-Bold":c("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Italic":c("{'widths'{k3n2q4ycx2l201n3m201o5t201s2l201t2l201u2l201w3r201x3r201y3r2k1t2l2l202m2n2n3m2o3m2p5n202q5t2r1p2s2l2t2l2u3m2v4n2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w4n3x4n3y4n3z3m4k5w4l3x4m3x4n4m4o4s4p3x4q3x4r4s4s4s4t2l4u2w4v4m4w3r4x5n4y4m4z4s5k3x5l4s5m3x5n3m5o3r5p4s5q3x5r5n5s3x5t3r5u3r5v2r5w1w5x2r5y2u5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q1w6r3m6s3m6t1w6u1w6v2w6w1w6x4s6y3m6z3m7k3m7l3m7m2r7n2r7o1w7p3m7q2w7r4m7s2w7t2w7u2r7v2s7w1v7x2s7y3q202l3mcl3xal2ram3man3mao3map3mar3mas2lat4wau1vav3maw4nay4waz2lbk2sbl4n'fof'6obo2lbp3mbq3obr1tbs2lbu1zbv3mbz3mck3x202k3mcm3xcn3xco3xcp3xcq5tcr4mcs3xct3xcu3xcv3xcw2l2m2ucy2lcz2ldl4mdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr4nfs3mft3mfu3mfv3mfw3mfz2w203k6o212m6m2dw2l2cq2l3t3m3u2l17s3r19m3m}'kerning'{cl{5kt4qw}201s{201sw}201t{201tw2wy2yy6q-t}201x{2wy2yy}2k{201tw}2w{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}2x{17ss5ts5os}2y{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}'fof'-6o6t{17ss5ts5qs}7t{5os}3v{5qs}7p{17su5tu5qs}ck{5kt4qw}4l{5kt4qw}cm{5kt4qw}cn{5kt4qw}co{5kt4qw}cp{5kt4qw}6l{4qs5ks5ou5qw5ru17su5tu}17s{2ks}5q{ckvclvcmvcnvcovcpv4lv}5r{ckuclucmucnucoucpu4lu}5t{2ks}6p{4qs5ks5ou5qw5ru17su5tu}ek{4qs5ks5ou5qw5ru17su5tu}el{4qs5ks5ou5qw5ru17su5tu}em{4qs5ks5ou5qw5ru17su5tu}en{4qs5ks5ou5qw5ru17su5tu}eo{4qs5ks5ou5qw5ru17su5tu}ep{4qs5ks5ou5qw5ru17su5tu}es{5ks5qs4qs}et{4qs5ks5ou5qw5ru17su5tu}eu{4qs5ks5qw5ru17su5tu}ev{5ks5qs4qs}ex{17ss5ts5qs}6z{4qv5ks5ou5qw5ru17su5tu}fm{4qv5ks5ou5qw5ru17su5tu}fn{4qv5ks5ou5qw5ru17su5tu}fo{4qv5ks5ou5qw5ru17su5tu}fp{4qv5ks5ou5qw5ru17su5tu}fq{4qv5ks5ou5qw5ru17su5tu}7r{5os}fs{4qv5ks5ou5qw5ru17su5tu}ft{17su5tu5qs}fu{17su5tu5qs}fv{17su5tu5qs}fw{17su5tu5qs}}}"),"Times-Roman":c("{'widths'{k3n2q4ycx2l201n3m201o6o201s2l201t2l201u2l201w2w201x2w201y2w2k1t2l2l202m2n2n3m2o3m2p5n202q6o2r1m2s2l2t2l2u3m2v3s2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v1w3w3s3x3s3y3s3z2w4k5w4l4s4m4m4n4m4o4s4p3x4q3r4r4s4s4s4t2l4u2r4v4s4w3x4x5t4y4s4z4s5k3r5l4s5m4m5n3r5o3x5p4s5q4s5r5y5s4s5t4s5u3x5v2l5w1w5x2l5y2z5z3m6k2l6l2w6m3m6n2w6o3m6p2w6q2l6r3m6s3m6t1w6u1w6v3m6w1w6x4y6y3m6z3m7k3m7l3m7m2l7n2r7o1w7p3m7q3m7r4s7s3m7t3m7u2w7v3k7w1o7x3k7y3q202l3mcl4sal2lam3man3mao3map3mar3mas2lat4wau1vav3maw3say4waz2lbk2sbl3s'fof'6obo2lbp3mbq2xbr1tbs2lbu1zbv3mbz2wck4s202k3mcm4scn4sco4scp4scq5tcr4mcs3xct3xcu3xcv3xcw2l2m2tcy2lcz2ldl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek2wel2wem2wen2weo2wep2weq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr3sfs3mft3mfu3mfv3mfw3mfz3m203k6o212m6m2dw2l2cq2l3t3m3u1w17s4s19m3m}'kerning'{cl{4qs5ku17sw5ou5qy5rw201ss5tw201ws}201s{201ss}201t{ckw4lwcmwcnwcowcpwclw4wu201ts}2k{201ts}2w{4qs5kw5os5qx5ru17sx5tx}2x{17sw5tw5ou5qu}2y{4qs5kw5os5qx5ru17sx5tx}'fof'-6o7t{ckuclucmucnucoucpu4lu5os5rs}3u{17su5tu5qs}3v{17su5tu5qs}7p{17sw5tw5qs}ck{4qs5ku17sw5ou5qy5rw201ss5tw201ws}4l{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cm{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cn{4qs5ku17sw5ou5qy5rw201ss5tw201ws}co{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cp{4qs5ku17sw5ou5qy5rw201ss5tw201ws}6l{17su5tu5os5qw5rs}17s{2ktclvcmvcnvcovcpv4lv4wuckv}5o{ckwclwcmwcnwcowcpw4lw4wu}5q{ckyclycmycnycoycpy4ly4wu5ms}5r{cktcltcmtcntcotcpt4lt4ws}5t{2ktclvcmvcnvcovcpv4lv4wuckv}7q{cksclscmscnscoscps4ls}6p{17su5tu5qw5rs}ek{5qs5rs}el{17su5tu5os5qw5rs}em{17su5tu5os5qs5rs}en{17su5qs5rs}eo{5qs5rs}ep{17su5tu5os5qw5rs}es{5qs}et{17su5tu5qw5rs}eu{17su5tu5qs5rs}ev{5qs}6z{17sv5tv5os5qx5rs}fm{5os5qt5rs}fn{17sv5tv5os5qx5rs}fo{17sv5tv5os5qx5rs}fp{5os5qt5rs}fq{5os5qt5rs}7r{ckuclucmucnucoucpu4lu5os}fs{17sv5tv5os5qx5rs}ft{17ss5ts5qs}fu{17sw5tw5qs}fv{17sw5tw5qs}fw{17ss5ts5qs}fz{ckuclucmucnucoucpu4lu5os5rs}}}"),"Helvetica-Oblique":c("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}")}};r.events.push(["addFont",function(P){var p=P.font,B=A.Unicode[p.postScriptName];B&&(p.metadata.Unicode={},p.metadata.Unicode.widths=B.widths,p.metadata.Unicode.kerning=B.kerning);var O=m.Unicode[p.postScriptName];O&&(p.metadata.Unicode.encoding=O,p.encoding=O.codePages[0])}])}(Tt.API),function(r){var e=function(t){for(var i=t.length,o=new Uint8Array(i),s=0;s<i;s++)o[s]=t.charCodeAt(s);return o};r.API.events.push(["addFont",function(t){var i=void 0,o=t.font,s=t.instance;if(!o.isStandardFont){if(s===void 0)throw new Error("Font does not exist in vFS, import fonts or remove declaration doc.addFont('"+o.postScriptName+"').");if(typeof(i=s.existsFileInVFS(o.postScriptName)===!1?s.loadFile(o.postScriptName):s.getFileFromVFS(o.postScriptName))!="string")throw new Error("Font is not stored as string-data in vFS, import fonts or remove declaration doc.addFont('"+o.postScriptName+"').");(function(f,u){u=/^\x00\x01\x00\x00/.test(u)?e(u):e(ms(u)),f.metadata=r.API.TTFFont.open(u),f.metadata.Unicode=f.metadata.Unicode||{encoding:{},kerning:{},widths:[]},f.metadata.glyIdsUsed=[0]})(o,i)}}])}(Tt),Tt.API.addSvgAsImage=function(r,e,t,i,o,s,f,u){if(isNaN(e)||isNaN(t))throw Le.error("jsPDF.addSvgAsImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addSvgAsImage");if(isNaN(i)||isNaN(o))throw Le.error("jsPDF.addSvgAsImage: Invalid measurements",arguments),new Error("Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage");var c=document.createElement("canvas");c.width=i,c.height=o;var d=c.getContext("2d");d.fillStyle="#fff",d.fillRect(0,0,c.width,c.height);var m={ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0},A=this;return(Jt.canvg?Promise.resolve(Jt.canvg):io(()=>import("./index.es-Cczvousg.js"),__vite__mapDeps([0,1,2]),import.meta.url)).catch(function(P){return Promise.reject(new Error("Could not load canvg: "+P))}).then(function(P){return P.default?P.default:P}).then(function(P){return P.fromString(d,r,m)},function(){return Promise.reject(new Error("Could not load canvg."))}).then(function(P){return P.render(m)}).then(function(){A.addImage(c.toDataURL("image/jpeg",1),e,t,i,o,f,u)})},Tt.API.putTotalPages=function(r){var e,t=0;parseInt(this.internal.getFont().id.substr(1),10)<15?(e=new RegExp(r,"g"),t=this.internal.getNumberOfPages()):(e=new RegExp(this.pdfEscape16(r,this.internal.getFont()),"g"),t=this.pdfEscape16(this.internal.getNumberOfPages()+"",this.internal.getFont()));for(var i=1;i<=this.internal.getNumberOfPages();i++)for(var o=0;o<this.internal.pages[i].length;o++)this.internal.pages[i][o]=this.internal.pages[i][o].replace(e,t);return this},Tt.API.viewerPreferences=function(r,e){var t;r=r||{},e=e||!1;var i,o,s,f={HideToolbar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideMenubar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideWindowUI:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},FitWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},CenterWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},DisplayDocTitle:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.4},NonFullScreenPageMode:{defaultValue:"UseNone",value:"UseNone",type:"name",explicitSet:!1,valueSet:["UseNone","UseOutlines","UseThumbs","UseOC"],pdfVersion:1.3},Direction:{defaultValue:"L2R",value:"L2R",type:"name",explicitSet:!1,valueSet:["L2R","R2L"],pdfVersion:1.3},ViewArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},ViewClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintScaling:{defaultValue:"AppDefault",value:"AppDefault",type:"name",explicitSet:!1,valueSet:["AppDefault","None"],pdfVersion:1.6},Duplex:{defaultValue:"",value:"none",type:"name",explicitSet:!1,valueSet:["Simplex","DuplexFlipShortEdge","DuplexFlipLongEdge","none"],pdfVersion:1.7},PickTrayByPDFSize:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.7},PrintPageRange:{defaultValue:"",value:"",type:"array",explicitSet:!1,valueSet:null,pdfVersion:1.7},NumCopies:{defaultValue:1,value:1,type:"integer",explicitSet:!1,valueSet:null,pdfVersion:1.7}},u=Object.keys(f),c=[],d=0,m=0,A=0;function P(B,O){var M,S=!1;for(M=0;M<B.length;M+=1)B[M]===O&&(S=!0);return S}if(this.internal.viewerpreferences===void 0&&(this.internal.viewerpreferences={},this.internal.viewerpreferences.configuration=JSON.parse(JSON.stringify(f)),this.internal.viewerpreferences.isSubscribed=!1),t=this.internal.viewerpreferences.configuration,r==="reset"||e===!0){var p=u.length;for(A=0;A<p;A+=1)t[u[A]].value=t[u[A]].defaultValue,t[u[A]].explicitSet=!1}if(Se(r)==="object"){for(o in r)if(s=r[o],P(u,o)&&s!==void 0){if(t[o].type==="boolean"&&typeof s=="boolean")t[o].value=s;else if(t[o].type==="name"&&P(t[o].valueSet,s))t[o].value=s;else if(t[o].type==="integer"&&Number.isInteger(s))t[o].value=s;else if(t[o].type==="array"){for(d=0;d<s.length;d+=1)if(i=!0,s[d].length===1&&typeof s[d][0]=="number")c.push(String(s[d]-1));else if(s[d].length>1){for(m=0;m<s[d].length;m+=1)typeof s[d][m]!="number"&&(i=!1);i===!0&&c.push([s[d][0]-1,s[d][1]-1].join(" "))}t[o].value="["+c.join(" ")+"]"}else t[o].value=t[o].defaultValue;t[o].explicitSet=!0}}return this.internal.viewerpreferences.isSubscribed===!1&&(this.internal.events.subscribe("putCatalog",function(){var B,O=[];for(B in t)t[B].explicitSet===!0&&(t[B].type==="name"?O.push("/"+B+" /"+t[B].value):O.push("/"+B+" "+t[B].value));O.length!==0&&this.internal.write(`/ViewerPreferences
|
||
<<
|
||
`+O.join(`
|
||
`)+`
|
||
>>`)}),this.internal.viewerpreferences.isSubscribed=!0),this.internal.viewerpreferences.configuration=t,this},function(r){var e=function(){var i='<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><rdf:Description rdf:about="" xmlns:jspdf="'+this.internal.__metadata__.namespaceuri+'"><jspdf:metadata>',o=unescape(encodeURIComponent('<x:xmpmeta xmlns:x="adobe:ns:meta/">')),s=unescape(encodeURIComponent(i)),f=unescape(encodeURIComponent(this.internal.__metadata__.metadata)),u=unescape(encodeURIComponent("</jspdf:metadata></rdf:Description></rdf:RDF>")),c=unescape(encodeURIComponent("</x:xmpmeta>")),d=s.length+f.length+u.length+o.length+c.length;this.internal.__metadata__.metadata_object_number=this.internal.newObject(),this.internal.write("<< /Type /Metadata /Subtype /XML /Length "+d+" >>"),this.internal.write("stream"),this.internal.write(o+s+f+u+c),this.internal.write("endstream"),this.internal.write("endobj")},t=function(){this.internal.__metadata__.metadata_object_number&&this.internal.write("/Metadata "+this.internal.__metadata__.metadata_object_number+" 0 R")};r.addMetadata=function(i,o){return this.internal.__metadata__===void 0&&(this.internal.__metadata__={metadata:i,namespaceuri:o||"http://jspdf.default.namespaceuri/"},this.internal.events.subscribe("putCatalog",t),this.internal.events.subscribe("postPutResources",e)),this}}(Tt.API),function(r){var e=r.API,t=e.pdfEscape16=function(s,f){for(var u,c=f.metadata.Unicode.widths,d=["","0","00","000","0000"],m=[""],A=0,P=s.length;A<P;++A){if(u=f.metadata.characterToGlyph(s.charCodeAt(A)),f.metadata.glyIdsUsed.push(u),f.metadata.toUnicode[u]=s.charCodeAt(A),c.indexOf(u)==-1&&(c.push(u),c.push([parseInt(f.metadata.widthOfGlyph(u),10)])),u=="0")return m.join("");u=u.toString(16),m.push(d[4-u.length],u)}return m.join("")},i=function(s){var f,u,c,d,m,A,P;for(m=`/CIDInit /ProcSet findresource begin
|
||
12 dict begin
|
||
begincmap
|
||
/CIDSystemInfo <<
|
||
/Registry (Adobe)
|
||
/Ordering (UCS)
|
||
/Supplement 0
|
||
>> def
|
||
/CMapName /Adobe-Identity-UCS def
|
||
/CMapType 2 def
|
||
1 begincodespacerange
|
||
<0000><ffff>
|
||
endcodespacerange`,c=[],A=0,P=(u=Object.keys(s).sort(function(p,B){return p-B})).length;A<P;A++)f=u[A],c.length>=100&&(m+=`
|
||
`+c.length+` beginbfchar
|
||
`+c.join(`
|
||
`)+`
|
||
endbfchar`,c=[]),s[f]!==void 0&&s[f]!==null&&typeof s[f].toString=="function"&&(d=("0000"+s[f].toString(16)).slice(-4),f=("0000"+(+f).toString(16)).slice(-4),c.push("<"+f+"><"+d+">"));return c.length&&(m+=`
|
||
`+c.length+` beginbfchar
|
||
`+c.join(`
|
||
`)+`
|
||
endbfchar
|
||
`),m+`endcmap
|
||
CMapName currentdict /CMap defineresource pop
|
||
end
|
||
end`};e.events.push(["putFont",function(s){(function(f){var u=f.font,c=f.out,d=f.newObject,m=f.putStream;if(u.metadata instanceof r.API.TTFFont&&u.encoding==="Identity-H"){for(var A=u.metadata.Unicode.widths,P=u.metadata.subset.encode(u.metadata.glyIdsUsed,1),p="",B=0;B<P.length;B++)p+=String.fromCharCode(P[B]);var O=d();m({data:p,addLength1:!0,objectId:O}),c("endobj");var M=d();m({data:i(u.metadata.toUnicode),addLength1:!0,objectId:M}),c("endobj");var S=d();c("<<"),c("/Type /FontDescriptor"),c("/FontName /"+Di(u.fontName)),c("/FontFile2 "+O+" 0 R"),c("/FontBBox "+r.API.PDFObject.convert(u.metadata.bbox)),c("/Flags "+u.metadata.flags),c("/StemV "+u.metadata.stemV),c("/ItalicAngle "+u.metadata.italicAngle),c("/Ascent "+u.metadata.ascender),c("/Descent "+u.metadata.decender),c("/CapHeight "+u.metadata.capHeight),c(">>"),c("endobj");var G=d();c("<<"),c("/Type /Font"),c("/BaseFont /"+Di(u.fontName)),c("/FontDescriptor "+S+" 0 R"),c("/W "+r.API.PDFObject.convert(A)),c("/CIDToGIDMap /Identity"),c("/DW 1000"),c("/Subtype /CIDFontType2"),c("/CIDSystemInfo"),c("<<"),c("/Supplement 0"),c("/Registry (Adobe)"),c("/Ordering ("+u.encoding+")"),c(">>"),c(">>"),c("endobj"),u.objectNumber=d(),c("<<"),c("/Type /Font"),c("/Subtype /Type0"),c("/ToUnicode "+M+" 0 R"),c("/BaseFont /"+Di(u.fontName)),c("/Encoding /"+u.encoding),c("/DescendantFonts ["+G+" 0 R]"),c(">>"),c("endobj"),u.isAlreadyPutted=!0}})(s)}]),e.events.push(["putFont",function(s){(function(f){var u=f.font,c=f.out,d=f.newObject,m=f.putStream;if(u.metadata instanceof r.API.TTFFont&&u.encoding==="WinAnsiEncoding"){for(var A=u.metadata.rawData,P="",p=0;p<A.length;p++)P+=String.fromCharCode(A[p]);var B=d();m({data:P,addLength1:!0,objectId:B}),c("endobj");var O=d();m({data:i(u.metadata.toUnicode),addLength1:!0,objectId:O}),c("endobj");var M=d();c("<<"),c("/Descent "+u.metadata.decender),c("/CapHeight "+u.metadata.capHeight),c("/StemV "+u.metadata.stemV),c("/Type /FontDescriptor"),c("/FontFile2 "+B+" 0 R"),c("/Flags 96"),c("/FontBBox "+r.API.PDFObject.convert(u.metadata.bbox)),c("/FontName /"+Di(u.fontName)),c("/ItalicAngle "+u.metadata.italicAngle),c("/Ascent "+u.metadata.ascender),c(">>"),c("endobj"),u.objectNumber=d();for(var S=0;S<u.metadata.hmtx.widths.length;S++)u.metadata.hmtx.widths[S]=parseInt(u.metadata.hmtx.widths[S]*(1e3/u.metadata.head.unitsPerEm));c("<</Subtype/TrueType/Type/Font/ToUnicode "+O+" 0 R/BaseFont/"+Di(u.fontName)+"/FontDescriptor "+M+" 0 R/Encoding/"+u.encoding+" /FirstChar 29 /LastChar 255 /Widths "+r.API.PDFObject.convert(u.metadata.hmtx.widths)+">>"),c("endobj"),u.isAlreadyPutted=!0}})(s)}]);var o=function(s){var f,u=s.text||"",c=s.x,d=s.y,m=s.options||{},A=s.mutex||{},P=A.pdfEscape,p=A.activeFontKey,B=A.fonts,O=p,M="",S=0,G="",Y=B[O].encoding;if(B[O].encoding!=="Identity-H")return{text:u,x:c,y:d,options:m,mutex:A};for(G=u,O=p,Array.isArray(u)&&(G=u[0]),S=0;S<G.length;S+=1)B[O].metadata.hasOwnProperty("cmap")&&(f=B[O].metadata.cmap.unicode.codeMap[G[S].charCodeAt(0)]),f||G[S].charCodeAt(0)<256&&B[O].metadata.hasOwnProperty("Unicode")?M+=G[S]:M+="";var D="";return parseInt(O.slice(1))<14||Y==="WinAnsiEncoding"?D=P(M,O).split("").map(function(ot){return ot.charCodeAt(0).toString(16)}).join(""):Y==="Identity-H"&&(D=t(M,B[O])),A.isHex=!0,{text:D,x:c,y:d,options:m,mutex:A}};e.events.push(["postProcessText",function(s){var f=s.text||"",u=[],c={text:f,x:s.x,y:s.y,options:s.options,mutex:s.mutex};if(Array.isArray(f)){var d=0;for(d=0;d<f.length;d+=1)Array.isArray(f[d])&&f[d].length===3?u.push([o(Object.assign({},c,{text:f[d][0]})).text,f[d][1],f[d][2]]):u.push(o(Object.assign({},c,{text:f[d]})).text);s.text=u}else s.text=o(Object.assign({},c,{text:f})).text}])}(Tt),function(r){var e=function(){return this.internal.vFS===void 0&&(this.internal.vFS={}),!0};r.existsFileInVFS=function(t){return e.call(this),this.internal.vFS[t]!==void 0},r.addFileToVFS=function(t,i){return e.call(this),this.internal.vFS[t]=i,this},r.getFileFromVFS=function(t){return e.call(this),this.internal.vFS[t]!==void 0?this.internal.vFS[t]:null}}(Tt.API),function(r){r.__bidiEngine__=r.prototype.__bidiEngine__=function(i){var o,s,f,u,c,d,m,A=e,P=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],p=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],B={L:0,R:1,EN:2,AN:3,N:4,B:5,S:6},O={0:0,5:1,6:2,7:3,32:4,251:5,254:6,255:7},M=["(",")","(","<",">","<","[","]","[","{","}","{","«","»","«","‹","›","‹","⁅","⁆","⁅","⁽","⁾","⁽","₍","₎","₍","≤","≥","≤","〈","〉","〈","﹙","﹚","﹙","﹛","﹜","﹛","﹝","﹞","﹝","﹤","﹥","﹤"],S=new RegExp(/^([1-4|9]|1[0-9]|2[0-9]|3[0168]|4[04589]|5[012]|7[78]|159|16[0-9]|17[0-2]|21[569]|22[03489]|250)$/),G=!1,Y=0;this.__bidiEngine__={};var D=function(N){var E=N.charCodeAt(),q=E>>8,U=O[q];return U!==void 0?A[256*U+(255&E)]:q===252||q===253?"AL":S.test(q)?"L":q===8?"R":"N"},ot=function(N){for(var E,q=0;q<N.length;q++){if((E=D(N.charAt(q)))==="L")return!1;if(E==="R")return!0}return!1},yt=function(N,E,q,U){var it,ct,pt,rt,ft=E[U];switch(ft){case"L":case"R":case"LRE":case"RLE":case"LRO":case"RLO":case"PDF":G=!1;break;case"N":case"AN":break;case"EN":G&&(ft="AN");break;case"AL":G=!0,ft="R";break;case"WS":case"BN":ft="N";break;case"CS":U<1||U+1>=E.length||(it=q[U-1])!=="EN"&&it!=="AN"||(ct=E[U+1])!=="EN"&&ct!=="AN"?ft="N":G&&(ct="AN"),ft=ct===it?ct:"N";break;case"ES":ft=(it=U>0?q[U-1]:"B")==="EN"&&U+1<E.length&&E[U+1]==="EN"?"EN":"N";break;case"ET":if(U>0&&q[U-1]==="EN"){ft="EN";break}if(G){ft="N";break}for(pt=U+1,rt=E.length;pt<rt&&E[pt]==="ET";)pt++;ft=pt<rt&&E[pt]==="EN"?"EN":"N";break;case"NSM":if(f&&!u){for(rt=E.length,pt=U+1;pt<rt&&E[pt]==="NSM";)pt++;if(pt<rt){var At=N[U],xt=At>=1425&&At<=2303||At===64286;if(it=E[pt],xt&&(it==="R"||it==="AL")){ft="R";break}}}ft=U<1||(it=E[U-1])==="B"?"N":q[U-1];break;case"B":G=!1,o=!0,ft=Y;break;case"S":s=!0,ft="N"}return ft},gt=function(N,E,q){var U=N.split("");return q&&tt(U,q,{hiLevel:Y}),U.reverse(),E&&E.reverse(),U.join("")},tt=function(N,E,q){var U,it,ct,pt,rt,ft=-1,At=N.length,xt=0,x=[],j=Y?p:P,R=[];for(G=!1,o=!1,s=!1,it=0;it<At;it++)R[it]=D(N[it]);for(ct=0;ct<At;ct++){if(rt=xt,x[ct]=yt(N,R,x,ct),U=240&(xt=j[rt][B[x[ct]]]),xt&=15,E[ct]=pt=j[xt][5],U>0)if(U===16){for(it=ft;it<ct;it++)E[it]=1;ft=-1}else ft=-1;if(j[xt][6])ft===-1&&(ft=ct);else if(ft>-1){for(it=ft;it<ct;it++)E[it]=pt;ft=-1}R[ct]==="B"&&(E[ct]=0),q.hiLevel|=pt}s&&function(V,J,Q){for(var nt=0;nt<Q;nt++)if(V[nt]==="S"){J[nt]=Y;for(var at=nt-1;at>=0&&V[at]==="WS";at--)J[at]=Y}}(R,E,At)},z=function(N,E,q,U,it){if(!(it.hiLevel<N)){if(N===1&&Y===1&&!o)return E.reverse(),void(q&&q.reverse());for(var ct,pt,rt,ft,At=E.length,xt=0;xt<At;){if(U[xt]>=N){for(rt=xt+1;rt<At&&U[rt]>=N;)rt++;for(ft=xt,pt=rt-1;ft<pt;ft++,pt--)ct=E[ft],E[ft]=E[pt],E[pt]=ct,q&&(ct=q[ft],q[ft]=q[pt],q[pt]=ct);xt=rt}xt++}}},et=function(N,E,q){var U=N.split(""),it={hiLevel:Y};return q||(q=[]),tt(U,q,it),function(ct,pt,rt){if(rt.hiLevel!==0&&m)for(var ft,At=0;At<ct.length;At++)pt[At]===1&&(ft=M.indexOf(ct[At]))>=0&&(ct[At]=M[ft+1])}(U,q,it),z(2,U,E,q,it),z(1,U,E,q,it),U.join("")};return this.__bidiEngine__.doBidiReorder=function(N,E,q){if(function(it,ct){if(ct)for(var pt=0;pt<it.length;pt++)ct[pt]=pt;u===void 0&&(u=ot(it)),d===void 0&&(d=ot(it))}(N,E),f||!c||d)if(f&&c&&u^d)Y=u?1:0,N=gt(N,E,q);else if(!f&&c&&d)Y=u?1:0,N=et(N,E,q),N=gt(N,E);else if(!f||u||c||d){if(f&&!c&&u^d)N=gt(N,E),u?(Y=0,N=et(N,E,q)):(Y=1,N=et(N,E,q),N=gt(N,E));else if(f&&u&&!c&&d)Y=1,N=et(N,E,q),N=gt(N,E);else if(!f&&!c&&u^d){var U=m;u?(Y=1,N=et(N,E,q),Y=0,m=!1,N=et(N,E,q),m=U):(Y=0,N=et(N,E,q),N=gt(N,E),Y=1,m=!1,N=et(N,E,q),m=U,N=gt(N,E))}}else Y=0,N=et(N,E,q);else Y=u?1:0,N=et(N,E,q);return N},this.__bidiEngine__.setOptions=function(N){N&&(f=N.isInputVisual,c=N.isOutputVisual,u=N.isInputRtl,d=N.isOutputRtl,m=N.isSymmetricSwapping)},this.__bidiEngine__.setOptions(i),this.__bidiEngine__};var e=["BN","BN","BN","BN","BN","BN","BN","BN","BN","S","B","S","WS","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","B","B","B","S","WS","N","N","ET","ET","ET","N","N","N","N","N","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","BN","BN","BN","BN","BN","BN","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","CS","N","ET","ET","ET","ET","N","N","N","N","L","N","N","BN","N","N","ET","ET","EN","EN","N","L","N","N","N","EN","L","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","N","N","N","N","N","ET","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","R","NSM","R","NSM","NSM","R","NSM","NSM","R","NSM","N","N","N","N","N","N","N","N","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","N","N","N","N","N","R","R","R","R","R","N","N","N","N","N","N","N","N","N","N","N","AN","AN","AN","AN","AN","AN","N","N","AL","ET","ET","AL","CS","AL","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AN","AN","AN","AN","AN","AN","AN","AN","AN","AN","ET","AN","AN","AL","AL","AL","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AN","N","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","NSM","NSM","N","NSM","NSM","NSM","NSM","AL","AL","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","AL","AL","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AL","N","N","N","N","N","N","N","N","N","N","N","N","N","N","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","R","R","N","N","N","N","R","N","N","N","N","N","WS","WS","WS","WS","WS","WS","WS","WS","WS","WS","WS","BN","BN","BN","L","R","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","WS","B","LRE","RLE","PDF","LRO","RLO","CS","ET","ET","ET","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","CS","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","WS","BN","BN","BN","BN","BN","N","LRI","RLI","FSI","PDI","BN","BN","BN","BN","BN","BN","EN","L","N","N","EN","EN","EN","EN","EN","EN","ES","ES","N","N","N","L","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","ES","ES","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","L","L","N","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","N","N","N","N","N","R","NSM","R","R","R","R","R","R","R","R","R","R","ES","R","R","R","R","R","R","R","R","R","R","R","R","R","N","R","R","R","R","R","N","R","N","R","R","N","R","R","N","R","R","R","R","R","R","R","R","R","R","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","CS","N","CS","N","N","CS","N","N","N","N","N","N","N","N","N","ET","N","N","ES","ES","N","N","N","N","N","ET","ET","N","N","N","N","N","AL","AL","AL","AL","AL","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","N","BN","N","N","N","ET","ET","ET","N","N","N","N","N","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","L","L","L","L","L","L","N","N","L","L","L","L","L","L","N","N","L","L","L","L","L","L","N","N","L","L","L","N","N","N","ET","ET","N","N","N","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N"],t=new r.__bidiEngine__({isInputVisual:!0});r.API.events.push(["postProcessText",function(i){var o=i.text;i.x,i.y;var s=i.options||{};i.mutex,s.lang;var f=[];if(s.isInputVisual=typeof s.isInputVisual!="boolean"||s.isInputVisual,t.setOptions(s),Object.prototype.toString.call(o)==="[object Array]"){var u=0;for(f=[],u=0;u<o.length;u+=1)Object.prototype.toString.call(o[u])==="[object Array]"?f.push([t.doBidiReorder(o[u][0]),o[u][1],o[u][2]]):f.push([t.doBidiReorder(o[u])]);i.text=f}else i.text=t.doBidiReorder(o);t.setOptions({isInputVisual:!0})}])}(Tt),Tt.API.TTFFont=function(){function r(e){var t;if(this.rawData=e,t=this.contents=new Xn(e),this.contents.pos=4,t.readString(4)==="ttcf")throw new Error("TTCF not supported.");t.pos=0,this.parse(),this.subset=new I1(this),this.registerTTF()}return r.open=function(e){return new r(e)},r.prototype.parse=function(){return this.directory=new g1(this.contents),this.head=new b1(this),this.name=new _1(this),this.cmap=new ch(this),this.toUnicode={},this.hhea=new v1(this),this.maxp=new A1(this),this.hmtx=new N1(this),this.post=new y1(this),this.os2=new w1(this),this.loca=new P1(this),this.glyf=new L1(this),this.ascender=this.os2.exists&&this.os2.ascender||this.hhea.ascender,this.decender=this.os2.exists&&this.os2.decender||this.hhea.decender,this.lineGap=this.os2.exists&&this.os2.lineGap||this.hhea.lineGap,this.bbox=[this.head.xMin,this.head.yMin,this.head.xMax,this.head.yMax]},r.prototype.registerTTF=function(){var e,t,i,o,s;if(this.scaleFactor=1e3/this.head.unitsPerEm,this.bbox=(function(){var f,u,c,d;for(d=[],f=0,u=(c=this.bbox).length;f<u;f++)e=c[f],d.push(Math.round(e*this.scaleFactor));return d}).call(this),this.stemV=0,this.post.exists?(i=255&(o=this.post.italic_angle),32768&(t=o>>16)&&(t=-(1+(65535^t))),this.italicAngle=+(t+"."+i)):this.italicAngle=0,this.ascender=Math.round(this.ascender*this.scaleFactor),this.decender=Math.round(this.decender*this.scaleFactor),this.lineGap=Math.round(this.lineGap*this.scaleFactor),this.capHeight=this.os2.exists&&this.os2.capHeight||this.ascender,this.xHeight=this.os2.exists&&this.os2.xHeight||0,this.familyClass=(this.os2.exists&&this.os2.familyClass||0)>>8,this.isSerif=(s=this.familyClass)===1||s===2||s===3||s===4||s===5||s===7,this.isScript=this.familyClass===10,this.flags=0,this.post.isFixedPitch&&(this.flags|=1),this.isSerif&&(this.flags|=2),this.isScript&&(this.flags|=8),this.italicAngle!==0&&(this.flags|=64),this.flags|=32,!this.cmap.unicode)throw new Error("No unicode cmap for font")},r.prototype.characterToGlyph=function(e){var t;return((t=this.cmap.unicode)!=null?t.codeMap[e]:void 0)||0},r.prototype.widthOfGlyph=function(e){var t;return t=1e3/this.head.unitsPerEm,this.hmtx.forGlyph(e).advance*t},r.prototype.widthOfString=function(e,t,i){var o,s,f,u;for(f=0,s=0,u=(e=""+e).length;0<=u?s<u:s>u;s=0<=u?++s:--s)o=e.charCodeAt(s),f+=this.widthOfGlyph(this.characterToGlyph(o))+i*(1e3/t)||0;return f*(t/1e3)},r.prototype.lineHeight=function(e,t){var i;return t==null&&(t=!1),i=t?this.lineGap:0,(this.ascender+i-this.decender)/1e3*e},r}();var Zr,Xn=function(){function r(e){this.data=e??[],this.pos=0,this.length=this.data.length}return r.prototype.readByte=function(){return this.data[this.pos++]},r.prototype.writeByte=function(e){return this.data[this.pos++]=e},r.prototype.readUInt32=function(){return 16777216*this.readByte()+(this.readByte()<<16)+(this.readByte()<<8)+this.readByte()},r.prototype.writeUInt32=function(e){return this.writeByte(e>>>24&255),this.writeByte(e>>16&255),this.writeByte(e>>8&255),this.writeByte(255&e)},r.prototype.readInt32=function(){var e;return(e=this.readUInt32())>=2147483648?e-4294967296:e},r.prototype.writeInt32=function(e){return e<0&&(e+=4294967296),this.writeUInt32(e)},r.prototype.readUInt16=function(){return this.readByte()<<8|this.readByte()},r.prototype.writeUInt16=function(e){return this.writeByte(e>>8&255),this.writeByte(255&e)},r.prototype.readInt16=function(){var e;return(e=this.readUInt16())>=32768?e-65536:e},r.prototype.writeInt16=function(e){return e<0&&(e+=65536),this.writeUInt16(e)},r.prototype.readString=function(e){var t,i;for(i=[],t=0;0<=e?t<e:t>e;t=0<=e?++t:--t)i[t]=String.fromCharCode(this.readByte());return i.join("")},r.prototype.writeString=function(e){var t,i,o;for(o=[],t=0,i=e.length;0<=i?t<i:t>i;t=0<=i?++t:--t)o.push(this.writeByte(e.charCodeAt(t)));return o},r.prototype.readShort=function(){return this.readInt16()},r.prototype.writeShort=function(e){return this.writeInt16(e)},r.prototype.readLongLong=function(){var e,t,i,o,s,f,u,c;return e=this.readByte(),t=this.readByte(),i=this.readByte(),o=this.readByte(),s=this.readByte(),f=this.readByte(),u=this.readByte(),c=this.readByte(),128&e?-1*(72057594037927940*(255^e)+281474976710656*(255^t)+1099511627776*(255^i)+4294967296*(255^o)+16777216*(255^s)+65536*(255^f)+256*(255^u)+(255^c)+1):72057594037927940*e+281474976710656*t+1099511627776*i+4294967296*o+16777216*s+65536*f+256*u+c},r.prototype.writeLongLong=function(e){var t,i;return t=Math.floor(e/4294967296),i=4294967295&e,this.writeByte(t>>24&255),this.writeByte(t>>16&255),this.writeByte(t>>8&255),this.writeByte(255&t),this.writeByte(i>>24&255),this.writeByte(i>>16&255),this.writeByte(i>>8&255),this.writeByte(255&i)},r.prototype.readInt=function(){return this.readInt32()},r.prototype.writeInt=function(e){return this.writeInt32(e)},r.prototype.read=function(e){var t,i;for(t=[],i=0;0<=e?i<e:i>e;i=0<=e?++i:--i)t.push(this.readByte());return t},r.prototype.write=function(e){var t,i,o,s;for(s=[],i=0,o=e.length;i<o;i++)t=e[i],s.push(this.writeByte(t));return s},r}(),g1=function(){var r;function e(t){var i,o,s;for(this.scalarType=t.readInt(),this.tableCount=t.readShort(),this.searchRange=t.readShort(),this.entrySelector=t.readShort(),this.rangeShift=t.readShort(),this.tables={},o=0,s=this.tableCount;0<=s?o<s:o>s;o=0<=s?++o:--o)i={tag:t.readString(4),checksum:t.readInt(),offset:t.readInt(),length:t.readInt()},this.tables[i.tag]=i}return e.prototype.encode=function(t){var i,o,s,f,u,c,d,m,A,P,p,B,O;for(O in p=Object.keys(t).length,c=Math.log(2),A=16*Math.floor(Math.log(p)/c),f=Math.floor(A/c),m=16*p-A,(o=new Xn).writeInt(this.scalarType),o.writeShort(p),o.writeShort(A),o.writeShort(f),o.writeShort(m),s=16*p,d=o.pos+s,u=null,B=[],t)for(P=t[O],o.writeString(O),o.writeInt(r(P)),o.writeInt(d),o.writeInt(P.length),B=B.concat(P),O==="head"&&(u=d),d+=P.length;d%4;)B.push(0),d++;return o.write(B),i=2981146554-r(o.data),o.pos=u+8,o.writeUInt32(i),o.data},r=function(t){var i,o,s,f;for(t=fh.call(t);t.length%4;)t.push(0);for(s=new Xn(t),o=0,i=0,f=t.length;i<f;i=i+=4)o+=s.readUInt32();return 4294967295&o},e}(),m1={}.hasOwnProperty,fn=function(r,e){for(var t in e)m1.call(e,t)&&(r[t]=e[t]);function i(){this.constructor=r}return i.prototype=e.prototype,r.prototype=new i,r.__super__=e.prototype,r};Zr=function(){function r(e){var t;this.file=e,t=this.file.directory.tables[this.tag],this.exists=!!t,t&&(this.offset=t.offset,this.length=t.length,this.parse(this.file.contents))}return r.prototype.parse=function(){},r.prototype.encode=function(){},r.prototype.raw=function(){return this.exists?(this.file.contents.pos=this.offset,this.file.contents.read(this.length)):null},r}();var b1=function(){function r(){return r.__super__.constructor.apply(this,arguments)}return fn(r,Zr),r.prototype.tag="head",r.prototype.parse=function(e){return e.pos=this.offset,this.version=e.readInt(),this.revision=e.readInt(),this.checkSumAdjustment=e.readInt(),this.magicNumber=e.readInt(),this.flags=e.readShort(),this.unitsPerEm=e.readShort(),this.created=e.readLongLong(),this.modified=e.readLongLong(),this.xMin=e.readShort(),this.yMin=e.readShort(),this.xMax=e.readShort(),this.yMax=e.readShort(),this.macStyle=e.readShort(),this.lowestRecPPEM=e.readShort(),this.fontDirectionHint=e.readShort(),this.indexToLocFormat=e.readShort(),this.glyphDataFormat=e.readShort()},r.prototype.encode=function(e){var t;return(t=new Xn).writeInt(this.version),t.writeInt(this.revision),t.writeInt(this.checkSumAdjustment),t.writeInt(this.magicNumber),t.writeShort(this.flags),t.writeShort(this.unitsPerEm),t.writeLongLong(this.created),t.writeLongLong(this.modified),t.writeShort(this.xMin),t.writeShort(this.yMin),t.writeShort(this.xMax),t.writeShort(this.yMax),t.writeShort(this.macStyle),t.writeShort(this.lowestRecPPEM),t.writeShort(this.fontDirectionHint),t.writeShort(e),t.writeShort(this.glyphDataFormat),t.data},r}(),Pu=function(){function r(e,t){var i,o,s,f,u,c,d,m,A,P,p,B,O,M,S,G,Y;switch(this.platformID=e.readUInt16(),this.encodingID=e.readShort(),this.offset=t+e.readInt(),A=e.pos,e.pos=this.offset,this.format=e.readUInt16(),this.length=e.readUInt16(),this.language=e.readUInt16(),this.isUnicode=this.platformID===3&&this.encodingID===1&&this.format===4||this.platformID===0&&this.format===4,this.codeMap={},this.format){case 0:for(c=0;c<256;++c)this.codeMap[c]=e.readByte();break;case 4:for(p=e.readUInt16(),P=p/2,e.pos+=6,s=function(){var D,ot;for(ot=[],c=D=0;0<=P?D<P:D>P;c=0<=P?++D:--D)ot.push(e.readUInt16());return ot}(),e.pos+=2,O=function(){var D,ot;for(ot=[],c=D=0;0<=P?D<P:D>P;c=0<=P?++D:--D)ot.push(e.readUInt16());return ot}(),d=function(){var D,ot;for(ot=[],c=D=0;0<=P?D<P:D>P;c=0<=P?++D:--D)ot.push(e.readUInt16());return ot}(),m=function(){var D,ot;for(ot=[],c=D=0;0<=P?D<P:D>P;c=0<=P?++D:--D)ot.push(e.readUInt16());return ot}(),o=(this.length-e.pos+this.offset)/2,u=function(){var D,ot;for(ot=[],c=D=0;0<=o?D<o:D>o;c=0<=o?++D:--D)ot.push(e.readUInt16());return ot}(),c=S=0,Y=s.length;S<Y;c=++S)for(M=s[c],i=G=B=O[c];B<=M?G<=M:G>=M;i=B<=M?++G:--G)m[c]===0?f=i+d[c]:(f=u[m[c]/2+(i-B)-(P-c)]||0)!==0&&(f+=d[c]),this.codeMap[i]=65535&f}e.pos=A}return r.encode=function(e,t){var i,o,s,f,u,c,d,m,A,P,p,B,O,M,S,G,Y,D,ot,yt,gt,tt,z,et,N,E,q,U,it,ct,pt,rt,ft,At,xt,x,j,R,V,J,Q,nt,at,dt,_t,St;switch(U=new Xn,f=Object.keys(e).sort(function(kt,zt){return kt-zt}),t){case"macroman":for(O=0,M=function(){var kt=[];for(B=0;B<256;++B)kt.push(0);return kt}(),G={0:0},s={},it=0,ft=f.length;it<ft;it++)G[at=e[o=f[it]]]==null&&(G[at]=++O),s[o]={old:e[o],new:G[e[o]]},M[o]=G[e[o]];return U.writeUInt16(1),U.writeUInt16(0),U.writeUInt32(12),U.writeUInt16(0),U.writeUInt16(262),U.writeUInt16(0),U.write(M),{charMap:s,subtable:U.data,maxGlyphID:O+1};case"unicode":for(E=[],A=[],Y=0,G={},i={},S=d=null,ct=0,At=f.length;ct<At;ct++)G[ot=e[o=f[ct]]]==null&&(G[ot]=++Y),i[o]={old:ot,new:G[ot]},u=G[ot]-o,S!=null&&u===d||(S&&A.push(S),E.push(o),d=u),S=o;for(S&&A.push(S),A.push(65535),E.push(65535),et=2*(z=E.length),tt=2*Math.pow(Math.log(z)/Math.LN2,2),P=Math.log(tt/2)/Math.LN2,gt=2*z-tt,c=[],yt=[],p=[],B=pt=0,xt=E.length;pt<xt;B=++pt){if(N=E[B],m=A[B],N===65535){c.push(0),yt.push(0);break}if(N-(q=i[N].new)>=32768)for(c.push(0),yt.push(2*(p.length+z-B)),o=rt=N;N<=m?rt<=m:rt>=m;o=N<=m?++rt:--rt)p.push(i[o].new);else c.push(q-N),yt.push(0)}for(U.writeUInt16(3),U.writeUInt16(1),U.writeUInt32(12),U.writeUInt16(4),U.writeUInt16(16+8*z+2*p.length),U.writeUInt16(0),U.writeUInt16(et),U.writeUInt16(tt),U.writeUInt16(P),U.writeUInt16(gt),Q=0,x=A.length;Q<x;Q++)o=A[Q],U.writeUInt16(o);for(U.writeUInt16(0),nt=0,j=E.length;nt<j;nt++)o=E[nt],U.writeUInt16(o);for(dt=0,R=c.length;dt<R;dt++)u=c[dt],U.writeUInt16(u);for(_t=0,V=yt.length;_t<V;_t++)D=yt[_t],U.writeUInt16(D);for(St=0,J=p.length;St<J;St++)O=p[St],U.writeUInt16(O);return{charMap:i,subtable:U.data,maxGlyphID:Y+1}}},r}(),ch=function(){function r(){return r.__super__.constructor.apply(this,arguments)}return fn(r,Zr),r.prototype.tag="cmap",r.prototype.parse=function(e){var t,i,o;for(e.pos=this.offset,this.version=e.readUInt16(),o=e.readUInt16(),this.tables=[],this.unicode=null,i=0;0<=o?i<o:i>o;i=0<=o?++i:--i)t=new Pu(e,this.offset),this.tables.push(t),t.isUnicode&&this.unicode==null&&(this.unicode=t);return!0},r.encode=function(e,t){var i,o;return t==null&&(t="macroman"),i=Pu.encode(e,t),(o=new Xn).writeUInt16(0),o.writeUInt16(1),i.table=o.data.concat(i.subtable),i},r}(),v1=function(){function r(){return r.__super__.constructor.apply(this,arguments)}return fn(r,Zr),r.prototype.tag="hhea",r.prototype.parse=function(e){return e.pos=this.offset,this.version=e.readInt(),this.ascender=e.readShort(),this.decender=e.readShort(),this.lineGap=e.readShort(),this.advanceWidthMax=e.readShort(),this.minLeftSideBearing=e.readShort(),this.minRightSideBearing=e.readShort(),this.xMaxExtent=e.readShort(),this.caretSlopeRise=e.readShort(),this.caretSlopeRun=e.readShort(),this.caretOffset=e.readShort(),e.pos+=8,this.metricDataFormat=e.readShort(),this.numberOfMetrics=e.readUInt16()},r}(),w1=function(){function r(){return r.__super__.constructor.apply(this,arguments)}return fn(r,Zr),r.prototype.tag="OS/2",r.prototype.parse=function(e){if(e.pos=this.offset,this.version=e.readUInt16(),this.averageCharWidth=e.readShort(),this.weightClass=e.readUInt16(),this.widthClass=e.readUInt16(),this.type=e.readShort(),this.ySubscriptXSize=e.readShort(),this.ySubscriptYSize=e.readShort(),this.ySubscriptXOffset=e.readShort(),this.ySubscriptYOffset=e.readShort(),this.ySuperscriptXSize=e.readShort(),this.ySuperscriptYSize=e.readShort(),this.ySuperscriptXOffset=e.readShort(),this.ySuperscriptYOffset=e.readShort(),this.yStrikeoutSize=e.readShort(),this.yStrikeoutPosition=e.readShort(),this.familyClass=e.readShort(),this.panose=function(){var t,i;for(i=[],t=0;t<10;++t)i.push(e.readByte());return i}(),this.charRange=function(){var t,i;for(i=[],t=0;t<4;++t)i.push(e.readInt());return i}(),this.vendorID=e.readString(4),this.selection=e.readShort(),this.firstCharIndex=e.readShort(),this.lastCharIndex=e.readShort(),this.version>0&&(this.ascent=e.readShort(),this.descent=e.readShort(),this.lineGap=e.readShort(),this.winAscent=e.readShort(),this.winDescent=e.readShort(),this.codePageRange=function(){var t,i;for(i=[],t=0;t<2;t=++t)i.push(e.readInt());return i}(),this.version>1))return this.xHeight=e.readShort(),this.capHeight=e.readShort(),this.defaultChar=e.readShort(),this.breakChar=e.readShort(),this.maxContext=e.readShort()},r}(),y1=function(){function r(){return r.__super__.constructor.apply(this,arguments)}return fn(r,Zr),r.prototype.tag="post",r.prototype.parse=function(e){var t,i,o;switch(e.pos=this.offset,this.format=e.readInt(),this.italicAngle=e.readInt(),this.underlinePosition=e.readShort(),this.underlineThickness=e.readShort(),this.isFixedPitch=e.readInt(),this.minMemType42=e.readInt(),this.maxMemType42=e.readInt(),this.minMemType1=e.readInt(),this.maxMemType1=e.readInt(),this.format){case 65536:case 196608:break;case 131072:var s;for(i=e.readUInt16(),this.glyphNameIndex=[],s=0;0<=i?s<i:s>i;s=0<=i?++s:--s)this.glyphNameIndex.push(e.readUInt16());for(this.names=[],o=[];e.pos<this.offset+this.length;)t=e.readByte(),o.push(this.names.push(e.readString(t)));return o;case 151552:return i=e.readUInt16(),this.offsets=e.read(i);case 262144:return this.map=(function(){var f,u,c;for(c=[],s=f=0,u=this.file.maxp.numGlyphs;0<=u?f<u:f>u;s=0<=u?++f:--f)c.push(e.readUInt32());return c}).call(this)}},r}(),x1=function(r,e){this.raw=r,this.length=r.length,this.platformID=e.platformID,this.encodingID=e.encodingID,this.languageID=e.languageID},_1=function(){function r(){return r.__super__.constructor.apply(this,arguments)}return fn(r,Zr),r.prototype.tag="name",r.prototype.parse=function(e){var t,i,o,s,f,u,c,d,m,A,P;for(e.pos=this.offset,e.readShort(),t=e.readShort(),u=e.readShort(),i=[],s=0;0<=t?s<t:s>t;s=0<=t?++s:--s)i.push({platformID:e.readShort(),encodingID:e.readShort(),languageID:e.readShort(),nameID:e.readShort(),length:e.readShort(),offset:this.offset+u+e.readShort()});for(c={},s=m=0,A=i.length;m<A;s=++m)o=i[s],e.pos=o.offset,d=e.readString(o.length),f=new x1(d,o),c[P=o.nameID]==null&&(c[P]=[]),c[o.nameID].push(f);this.strings=c,this.copyright=c[0],this.fontFamily=c[1],this.fontSubfamily=c[2],this.uniqueSubfamily=c[3],this.fontName=c[4],this.version=c[5];try{this.postscriptName=c[6][0].raw.replace(/[\x00-\x19\x80-\xff]/g,"")}catch{this.postscriptName=c[4][0].raw.replace(/[\x00-\x19\x80-\xff]/g,"")}return this.trademark=c[7],this.manufacturer=c[8],this.designer=c[9],this.description=c[10],this.vendorUrl=c[11],this.designerUrl=c[12],this.license=c[13],this.licenseUrl=c[14],this.preferredFamily=c[15],this.preferredSubfamily=c[17],this.compatibleFull=c[18],this.sampleText=c[19]},r}(),A1=function(){function r(){return r.__super__.constructor.apply(this,arguments)}return fn(r,Zr),r.prototype.tag="maxp",r.prototype.parse=function(e){return e.pos=this.offset,this.version=e.readInt(),this.numGlyphs=e.readUInt16(),this.maxPoints=e.readUInt16(),this.maxContours=e.readUInt16(),this.maxCompositePoints=e.readUInt16(),this.maxComponentContours=e.readUInt16(),this.maxZones=e.readUInt16(),this.maxTwilightPoints=e.readUInt16(),this.maxStorage=e.readUInt16(),this.maxFunctionDefs=e.readUInt16(),this.maxInstructionDefs=e.readUInt16(),this.maxStackElements=e.readUInt16(),this.maxSizeOfInstructions=e.readUInt16(),this.maxComponentElements=e.readUInt16(),this.maxComponentDepth=e.readUInt16()},r}(),N1=function(){function r(){return r.__super__.constructor.apply(this,arguments)}return fn(r,Zr),r.prototype.tag="hmtx",r.prototype.parse=function(e){var t,i,o,s,f,u,c;for(e.pos=this.offset,this.metrics=[],t=0,u=this.file.hhea.numberOfMetrics;0<=u?t<u:t>u;t=0<=u?++t:--t)this.metrics.push({advance:e.readUInt16(),lsb:e.readInt16()});for(o=this.file.maxp.numGlyphs-this.file.hhea.numberOfMetrics,this.leftSideBearings=function(){var d,m;for(m=[],t=d=0;0<=o?d<o:d>o;t=0<=o?++d:--d)m.push(e.readInt16());return m}(),this.widths=(function(){var d,m,A,P;for(P=[],d=0,m=(A=this.metrics).length;d<m;d++)s=A[d],P.push(s.advance);return P}).call(this),i=this.widths[this.widths.length-1],c=[],t=f=0;0<=o?f<o:f>o;t=0<=o?++f:--f)c.push(this.widths.push(i));return c},r.prototype.forGlyph=function(e){return e in this.metrics?this.metrics[e]:{advance:this.metrics[this.metrics.length-1].advance,lsb:this.leftSideBearings[e-this.metrics.length]}},r}(),fh=[].slice,L1=function(){function r(){return r.__super__.constructor.apply(this,arguments)}return fn(r,Zr),r.prototype.tag="glyf",r.prototype.parse=function(){return this.cache={}},r.prototype.glyphFor=function(e){var t,i,o,s,f,u,c,d,m,A;return e in this.cache?this.cache[e]:(s=this.file.loca,t=this.file.contents,i=s.indexOf(e),(o=s.lengthOf(e))===0?this.cache[e]=null:(t.pos=this.offset+i,f=(u=new Xn(t.read(o))).readShort(),d=u.readShort(),A=u.readShort(),c=u.readShort(),m=u.readShort(),this.cache[e]=f===-1?new k1(u,d,A,c,m):new S1(u,f,d,A,c,m),this.cache[e]))},r.prototype.encode=function(e,t,i){var o,s,f,u,c;for(f=[],s=[],u=0,c=t.length;u<c;u++)o=e[t[u]],s.push(f.length),o&&(f=f.concat(o.encode(i)));return s.push(f.length),{table:f,offsets:s}},r}(),S1=function(){function r(e,t,i,o,s,f){this.raw=e,this.numberOfContours=t,this.xMin=i,this.yMin=o,this.xMax=s,this.yMax=f,this.compound=!1}return r.prototype.encode=function(){return this.raw.data},r}(),k1=function(){function r(e,t,i,o,s){var f,u;for(this.raw=e,this.xMin=t,this.yMin=i,this.xMax=o,this.yMax=s,this.compound=!0,this.glyphIDs=[],this.glyphOffsets=[],f=this.raw;u=f.readShort(),this.glyphOffsets.push(f.pos),this.glyphIDs.push(f.readUInt16()),32&u;)f.pos+=1&u?4:2,128&u?f.pos+=8:64&u?f.pos+=4:8&u&&(f.pos+=2)}return r.prototype.encode=function(){var e,t,i;for(t=new Xn(fh.call(this.raw.data)),e=0,i=this.glyphIDs.length;e<i;++e)t.pos=this.glyphOffsets[e];return t.data},r}(),P1=function(){function r(){return r.__super__.constructor.apply(this,arguments)}return fn(r,Zr),r.prototype.tag="loca",r.prototype.parse=function(e){var t,i;return e.pos=this.offset,t=this.file.head.indexToLocFormat,this.offsets=t===0?(function(){var o,s;for(s=[],i=0,o=this.length;i<o;i+=2)s.push(2*e.readUInt16());return s}).call(this):(function(){var o,s;for(s=[],i=0,o=this.length;i<o;i+=4)s.push(e.readUInt32());return s}).call(this)},r.prototype.indexOf=function(e){return this.offsets[e]},r.prototype.lengthOf=function(e){return this.offsets[e+1]-this.offsets[e]},r.prototype.encode=function(e,t){for(var i=new Uint32Array(this.offsets.length),o=0,s=0,f=0;f<i.length;++f)if(i[f]=o,s<t.length&&t[s]==f){++s,i[f]=o;var u=this.offsets[f],c=this.offsets[f+1]-u;c>0&&(o+=c)}for(var d=new Array(4*i.length),m=0;m<i.length;++m)d[4*m+3]=255&i[m],d[4*m+2]=(65280&i[m])>>8,d[4*m+1]=(16711680&i[m])>>16,d[4*m]=(4278190080&i[m])>>24;return d},r}(),I1=function(){function r(e){this.font=e,this.subset={},this.unicodes={},this.next=33}return r.prototype.generateCmap=function(){var e,t,i,o,s;for(t in o=this.font.cmap.tables[0].codeMap,e={},s=this.subset)i=s[t],e[t]=o[i];return e},r.prototype.glyphsFor=function(e){var t,i,o,s,f,u,c;for(o={},f=0,u=e.length;f<u;f++)o[s=e[f]]=this.font.glyf.glyphFor(s);for(s in t=[],o)(i=o[s])!=null&&i.compound&&t.push.apply(t,i.glyphIDs);if(t.length>0)for(s in c=this.glyphsFor(t))i=c[s],o[s]=i;return o},r.prototype.encode=function(e,t){var i,o,s,f,u,c,d,m,A,P,p,B,O,M,S;for(o in i=ch.encode(this.generateCmap(),"unicode"),f=this.glyphsFor(e),p={0:0},S=i.charMap)p[(c=S[o]).old]=c.new;for(B in P=i.maxGlyphID,f)B in p||(p[B]=P++);return m=function(G){var Y,D;for(Y in D={},G)D[G[Y]]=Y;return D}(p),A=Object.keys(m).sort(function(G,Y){return G-Y}),O=function(){var G,Y,D;for(D=[],G=0,Y=A.length;G<Y;G++)u=A[G],D.push(m[u]);return D}(),s=this.font.glyf.encode(f,O,p),d=this.font.loca.encode(s.offsets,O),M={cmap:this.font.cmap.raw(),glyf:s.table,loca:d,hmtx:this.font.hmtx.raw(),hhea:this.font.hhea.raw(),maxp:this.font.maxp.raw(),post:this.font.post.raw(),name:this.font.name.raw(),head:this.font.head.encode(t)},this.font.os2.exists&&(M["OS/2"]=this.font.os2.raw()),this.font.directory.encode(M)},r}();Tt.API.PDFObject=function(){var r;function e(){}return r=function(t,i){return(Array(i+1).join("0")+t).slice(-i)},e.convert=function(t){var i,o,s,f;if(Array.isArray(t))return"["+function(){var u,c,d;for(d=[],u=0,c=t.length;u<c;u++)i=t[u],d.push(e.convert(i));return d}().join(" ")+"]";if(typeof t=="string")return"/"+t;if(t!=null&&t.isString)return"("+t+")";if(t instanceof Date)return"(D:"+r(t.getUTCFullYear(),4)+r(t.getUTCMonth(),2)+r(t.getUTCDate(),2)+r(t.getUTCHours(),2)+r(t.getUTCMinutes(),2)+r(t.getUTCSeconds(),2)+"Z)";if({}.toString.call(t)==="[object Object]"){for(o in s=["<<"],t)f=t[o],s.push("/"+o+" "+e.convert(f));return s.push(">>"),s.join(`
|
||
`)}return""+t},e}();export{Ct as AcroFormAppearance,nr as AcroFormButton,ws as AcroFormCheckBox,Ui as AcroFormChoiceField,Hi as AcroFormComboBox,bs as AcroFormEditBox,zi as AcroFormListBox,ys as AcroFormPasswordField,vs as AcroFormPushButton,Wi as AcroFormRadioButton,vi as AcroFormTextField,_s as GState,bi as ShadingPattern,qi as TilingPattern,Tt as default,Tt as jsPDF};
|