171 lines
400 KiB
Java
171 lines
400 KiB
Java
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["js/index.es-Dv2Hmdq3.js","js/antd-vue-vendor-BPnV8VqP.js","js/vue-vendor-C7Zq48Yl.js","js/stackblur-es-AyqGX0Lm.js"])))=>i.map(i=>d[i]);
|
||
var Mu=Object.defineProperty;var Uu=(t,n,e)=>n in t?Mu(t,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[n]=e;var Ae=(t,n,e)=>Uu(t,typeof n!="symbol"?n+"":n,e);import{_ as il}from"./index-BI6CMai0.js";import{cj as Pe}from"./antd-vue-vendor-BPnV8VqP.js";import{z as Il}from"./browser-B0xVgIeL.js";import"./vue-vendor-C7Zq48Yl.js";import"./vxe-table-vendor-B88kchpX.js";function qu(t){if(Array.isArray(t))return t}function zu(t,n){var e=t==null?null:typeof Symbol!="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(e!=null){var i,a,o,c,l=[],f=!0,d=!1;try{if(o=(e=e.call(t)).next,n===0){if(Object(e)!==e)return;f=!1}else for(;!(f=(i=o.call(e)).done)&&(l.push(i.value),l.length!==n);f=!0);}catch(m){d=!0,a=m}finally{try{if(!f&&e.return!=null&&(c=e.return(),Object(c)!==c))return}finally{if(d)throw a}}return l}}function Rh(t,n){(n==null||n>t.length)&&(n=t.length);for(var e=0,i=Array(n);e<n;e++)i[e]=t[e];return i}function Hu(t,n){if(t){if(typeof t=="string")return Rh(t,n);var e={}.toString.call(t).slice(8,-1);return e==="Object"&&t.constructor&&(e=t.constructor.name),e==="Map"||e==="Set"?Array.from(t):e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?Rh(t,n):void 0}}function Wu(){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 jh(t,n){return qu(t)||zu(t,n)||Hu(t,n)||Wu()}function Bh(t,n="utf8"){return new TextDecoder(n).decode(t)}const Gu=new TextEncoder;function Vu(t){return Gu.encode(t)}const Zu=1024*8,$u=(()=>{const t=new Uint8Array(4),n=new Uint32Array(t.buffer);return!((n[0]=1)&t[0])})(),rl={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 Wl{constructor(n=Zu,e={}){Ae(this,"buffer");Ae(this,"byteLength");Ae(this,"byteOffset");Ae(this,"length");Ae(this,"offset");Ae(this,"lastWrittenByte");Ae(this,"littleEndian");Ae(this,"_data");Ae(this,"_mark");Ae(this,"_marks");let i=!1;typeof n=="number"?n=new ArrayBuffer(n):(i=!0,this.lastWrittenByte=n.byteLength);const a=e.offset?e.offset>>>0:0,o=n.byteLength-a;let c=a;(ArrayBuffer.isView(n)||n instanceof Wl)&&(n.byteLength!==n.buffer.byteLength&&(c=n.byteOffset+a),n=n.buffer),i?this.lastWrittenByte=o:this.lastWrittenByte=0,this.buffer=n,this.length=o,this.byteLength=o,this.byteOffset=c,this.offset=0,this.littleEndian=!0,this._data=new DataView(this.buffer,c,o),this._mark=0,this._marks=[]}available(n=1){return this.offset+n<=this.length}isLittleEndian(){return this.littleEndian}setLittleEndian(){return this.littleEndian=!0,this}isBigEndian(){return!this.littleEndian}setBigEndian(){return this.littleEndian=!1,this}skip(n=1){return this.offset+=n,this}back(n=1){return this.offset-=n,this}seek(n){return this.offset=n,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 n=this._marks.pop();if(n===void 0)throw new Error("Mark stack empty");return this.seek(n),this}rewind(){return this.offset=0,this}ensureAvailable(n=1){if(!this.available(n)){const i=(this.offset+n)*2,a=new Uint8Array(i);a.set(new Uint8Array(this.buffer)),this.buffer=a.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(n=1){return this.readArray(n,"uint8")}readArray(n,e){const i=rl[e].BYTES_PER_ELEMENT*n,a=this.byteOffset+this.offset,o=this.buffer.slice(a,a+i);if(this.littleEndian===$u&&e!=="uint8"&&e!=="int8"){const l=new Uint8Array(this.buffer.slice(a,a+i));l.reverse();const f=new rl[e](l.buffer);return this.offset+=i,f.reverse(),f}const c=new rl[e](o);return this.offset+=i,c}readInt16(){const n=this._data.getInt16(this.offset,this.littleEndian);return this.offset+=2,n}readUint16(){const n=this._data.getUint16(this.offset,this.littleEndian);return this.offset+=2,n}readInt32(){const n=this._data.getInt32(this.offset,this.littleEndian);return this.offset+=4,n}readUint32(){const n=this._data.getUint32(this.offset,this.littleEndian);return this.offset+=4,n}readFloat32(){const n=this._data.getFloat32(this.offset,this.littleEndian);return this.offset+=4,n}readFloat64(){const n=this._data.getFloat64(this.offset,this.littleEndian);return this.offset+=8,n}readBigInt64(){const n=this._data.getBigInt64(this.offset,this.littleEndian);return this.offset+=8,n}readBigUint64(){const n=this._data.getBigUint64(this.offset,this.littleEndian);return this.offset+=8,n}readChar(){return String.fromCharCode(this.readInt8())}readChars(n=1){let e="";for(let i=0;i<n;i++)e+=this.readChar();return e}readUtf8(n=1){return Bh(this.readBytes(n))}decodeText(n=1,e="utf8"){return Bh(this.readBytes(n),e)}writeBoolean(n){return this.writeUint8(n?255:0),this}writeInt8(n){return this.ensureAvailable(1),this._data.setInt8(this.offset++,n),this._updateLastWrittenByte(),this}writeUint8(n){return this.ensureAvailable(1),this._data.setUint8(this.offset++,n),this._updateLastWrittenByte(),this}writeByte(n){return this.writeUint8(n)}writeBytes(n){this.ensureAvailable(n.length);for(let e=0;e<n.length;e++)this._data.setUint8(this.offset++,n[e]);return this._updateLastWrittenByte(),this}writeInt16(n){return this.ensureAvailable(2),this._data.setInt16(this.offset,n,this.littleEndian),this.offset+=2,this._updateLastWrittenByte(),this}writeUint16(n){return this.ensureAvailable(2),this._data.setUint16(this.offset,n,this.littleEndian),this.offset+=2,this._updateLastWrittenByte(),this}writeInt32(n){return this.ensureAvailable(4),this._data.setInt32(this.offset,n,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeUint32(n){return this.ensureAvailable(4),this._data.setUint32(this.offset,n,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeFloat32(n){return this.ensureAvailable(4),this._data.setFloat32(this.offset,n,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeFloat64(n){return this.ensureAvailable(8),this._data.setFloat64(this.offset,n,this.littleEndian),this.offset+=8,this._updateLastWrittenByte(),this}writeBigInt64(n){return this.ensureAvailable(8),this._data.setBigInt64(this.offset,n,this.littleEndian),this.offset+=8,this._updateLastWrittenByte(),this}writeBigUint64(n){return this.ensureAvailable(8),this._data.setBigUint64(this.offset,n,this.littleEndian),this.offset+=8,this._updateLastWrittenByte(),this}writeChar(n){return this.writeUint8(n.charCodeAt(0))}writeChars(n){for(let e=0;e<n.length;e++)this.writeUint8(n.charCodeAt(e));return this}writeUtf8(n){return this.writeBytes(Vu(n))}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)}}/*! pako 2.1.0 https://github.com/nodeca/pako @license (MIT AND Zlib) */const Yu=4,Dh=0,Mh=1,Ku=2;function La(t){let n=t.length;for(;--n>=0;)t[n]=0}const Xu=0,Qc=1,Ju=2,Qu=3,t1=258,Gl=29,uo=256,ro=uo+1+Gl,va=30,Vl=19,tf=2*ro+1,Or=15,al=16,e1=7,Zl=256,ef=16,nf=17,rf=18,Cl=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),os=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),n1=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),af=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),i1=512,qi=new Array((ro+2)*2);La(qi);const eo=new Array(va*2);La(eo);const ao=new Array(i1);La(ao);const oo=new Array(t1-Qu+1);La(oo);const $l=new Array(Gl);La($l);const ds=new Array(va);La(ds);function ol(t,n,e,i,a){this.static_tree=t,this.extra_bits=n,this.extra_base=e,this.elems=i,this.max_length=a,this.has_stree=t&&t.length}let of,sf,lf;function sl(t,n){this.dyn_tree=t,this.max_code=0,this.stat_desc=n}const hf=t=>t<256?ao[t]:ao[256+(t>>>7)],so=(t,n)=>{t.pending_buf[t.pending++]=n&255,t.pending_buf[t.pending++]=n>>>8&255},Fn=(t,n,e)=>{t.bi_valid>al-e?(t.bi_buf|=n<<t.bi_valid&65535,so(t,t.bi_buf),t.bi_buf=n>>al-t.bi_valid,t.bi_valid+=e-al):(t.bi_buf|=n<<t.bi_valid&65535,t.bi_valid+=e)},yi=(t,n,e)=>{Fn(t,e[n*2],e[n*2+1])},cf=(t,n)=>{let e=0;do e|=t&1,t>>>=1,e<<=1;while(--n>0);return e>>>1},r1=t=>{t.bi_valid===16?(so(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=t.bi_buf&255,t.bi_buf>>=8,t.bi_valid-=8)},a1=(t,n)=>{const e=n.dyn_tree,i=n.max_code,a=n.stat_desc.static_tree,o=n.stat_desc.has_stree,c=n.stat_desc.extra_bits,l=n.stat_desc.extra_base,f=n.stat_desc.max_length;let d,m,A,L,p,T,O=0;for(L=0;L<=Or;L++)t.bl_count[L]=0;for(e[t.heap[t.heap_max]*2+1]=0,d=t.heap_max+1;d<tf;d++)m=t.heap[d],L=e[e[m*2+1]*2+1]+1,L>f&&(L=f,O++),e[m*2+1]=L,!(m>i)&&(t.bl_count[L]++,p=0,m>=l&&(p=c[m-l]),T=e[m*2],t.opt_len+=T*(L+p),o&&(t.static_len+=T*(a[m*2+1]+p)));if(O!==0){do{for(L=f-1;t.bl_count[L]===0;)L--;t.bl_count[L]--,t.bl_count[L+1]+=2,t.bl_count[f]--,O-=2}while(O>0);for(L=f;L!==0;L--)for(m=t.bl_count[L];m!==0;)A=t.heap[--d],!(A>i)&&(e[A*2+1]!==L&&(t.opt_len+=(L-e[A*2+1])*e[A*2],e[A*2+1]=L),m--)}},ff=(t,n,e)=>{const i=new Array(Or+1);let a=0,o,c;for(o=1;o<=Or;o++)a=a+e[o-1]<<1,i[o]=a;for(c=0;c<=n;c++){let l=t[c*2+1];l!==0&&(t[c*2]=cf(i[l]++,l))}},o1=()=>{let t,n,e,i,a;const o=new Array(Or+1);for(e=0,i=0;i<Gl-1;i++)for($l[i]=e,t=0;t<1<<Cl[i];t++)oo[e++]=i;for(oo[e-1]=i,a=0,i=0;i<16;i++)for(ds[i]=a,t=0;t<1<<os[i];t++)ao[a++]=i;for(a>>=7;i<va;i++)for(ds[i]=a<<7,t=0;t<1<<os[i]-7;t++)ao[256+a++]=i;for(n=0;n<=Or;n++)o[n]=0;for(t=0;t<=143;)qi[t*2+1]=8,t++,o[8]++;for(;t<=255;)qi[t*2+1]=9,t++,o[9]++;for(;t<=279;)qi[t*2+1]=7,t++,o[7]++;for(;t<=287;)qi[t*2+1]=8,t++,o[8]++;for(ff(qi,ro+1,o),t=0;t<va;t++)eo[t*2+1]=5,eo[t*2]=cf(t,5);of=new ol(qi,Cl,uo+1,ro,Or),sf=new ol(eo,os,0,va,Or),lf=new ol(new Array(0),n1,0,Vl,e1)},uf=t=>{let n;for(n=0;n<ro;n++)t.dyn_ltree[n*2]=0;for(n=0;n<va;n++)t.dyn_dtree[n*2]=0;for(n=0;n<Vl;n++)t.bl_tree[n*2]=0;t.dyn_ltree[Zl*2]=1,t.opt_len=t.static_len=0,t.sym_next=t.matches=0},df=t=>{t.bi_valid>8?so(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0},Uh=(t,n,e,i)=>{const a=n*2,o=e*2;return t[a]<t[o]||t[a]===t[o]&&i[n]<=i[e]},ll=(t,n,e)=>{const i=t.heap[e];let a=e<<1;for(;a<=t.heap_len&&(a<t.heap_len&&Uh(n,t.heap[a+1],t.heap[a],t.depth)&&a++,!Uh(n,i,t.heap[a],t.depth));)t.heap[e]=t.heap[a],e=a,a<<=1;t.heap[e]=i},qh=(t,n,e)=>{let i,a,o=0,c,l;if(t.sym_next!==0)do i=t.pending_buf[t.sym_buf+o++]&255,i+=(t.pending_buf[t.sym_buf+o++]&255)<<8,a=t.pending_buf[t.sym_buf+o++],i===0?yi(t,a,n):(c=oo[a],yi(t,c+uo+1,n),l=Cl[c],l!==0&&(a-=$l[c],Fn(t,a,l)),i--,c=hf(i),yi(t,c,e),l=os[c],l!==0&&(i-=ds[c],Fn(t,i,l)));while(o<t.sym_next);yi(t,Zl,n)},Fl=(t,n)=>{const e=n.dyn_tree,i=n.stat_desc.static_tree,a=n.stat_desc.has_stree,o=n.stat_desc.elems;let c,l,f=-1,d;for(t.heap_len=0,t.heap_max=tf,c=0;c<o;c++)e[c*2]!==0?(t.heap[++t.heap_len]=f=c,t.depth[c]=0):e[c*2+1]=0;for(;t.heap_len<2;)d=t.heap[++t.heap_len]=f<2?++f:0,e[d*2]=1,t.depth[d]=0,t.opt_len--,a&&(t.static_len-=i[d*2+1]);for(n.max_code=f,c=t.heap_len>>1;c>=1;c--)ll(t,e,c);d=o;do c=t.heap[1],t.heap[1]=t.heap[t.heap_len--],ll(t,e,1),l=t.heap[1],t.heap[--t.heap_max]=c,t.heap[--t.heap_max]=l,e[d*2]=e[c*2]+e[l*2],t.depth[d]=(t.depth[c]>=t.depth[l]?t.depth[c]:t.depth[l])+1,e[c*2+1]=e[l*2+1]=d,t.heap[1]=d++,ll(t,e,1);while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],a1(t,n),ff(e,f,t.bl_count)},zh=(t,n,e)=>{let i,a=-1,o,c=n[1],l=0,f=7,d=4;for(c===0&&(f=138,d=3),n[(e+1)*2+1]=65535,i=0;i<=e;i++)o=c,c=n[(i+1)*2+1],!(++l<f&&o===c)&&(l<d?t.bl_tree[o*2]+=l:o!==0?(o!==a&&t.bl_tree[o*2]++,t.bl_tree[ef*2]++):l<=10?t.bl_tree[nf*2]++:t.bl_tree[rf*2]++,l=0,a=o,c===0?(f=138,d=3):o===c?(f=6,d=3):(f=7,d=4))},Hh=(t,n,e)=>{let i,a=-1,o,c=n[1],l=0,f=7,d=4;for(c===0&&(f=138,d=3),i=0;i<=e;i++)if(o=c,c=n[(i+1)*2+1],!(++l<f&&o===c)){if(l<d)do yi(t,o,t.bl_tree);while(--l!==0);else o!==0?(o!==a&&(yi(t,o,t.bl_tree),l--),yi(t,ef,t.bl_tree),Fn(t,l-3,2)):l<=10?(yi(t,nf,t.bl_tree),Fn(t,l-3,3)):(yi(t,rf,t.bl_tree),Fn(t,l-11,7));l=0,a=o,c===0?(f=138,d=3):o===c?(f=6,d=3):(f=7,d=4)}},s1=t=>{let n;for(zh(t,t.dyn_ltree,t.l_desc.max_code),zh(t,t.dyn_dtree,t.d_desc.max_code),Fl(t,t.bl_desc),n=Vl-1;n>=3&&t.bl_tree[af[n]*2+1]===0;n--);return t.opt_len+=3*(n+1)+5+5+4,n},l1=(t,n,e,i)=>{let a;for(Fn(t,n-257,5),Fn(t,e-1,5),Fn(t,i-4,4),a=0;a<i;a++)Fn(t,t.bl_tree[af[a]*2+1],3);Hh(t,t.dyn_ltree,n-1),Hh(t,t.dyn_dtree,e-1)},h1=t=>{let n=4093624447,e;for(e=0;e<=31;e++,n>>>=1)if(n&1&&t.dyn_ltree[e*2]!==0)return Dh;if(t.dyn_ltree[18]!==0||t.dyn_ltree[20]!==0||t.dyn_ltree[26]!==0)return Mh;for(e=32;e<uo;e++)if(t.dyn_ltree[e*2]!==0)return Mh;return Dh};let Wh=!1;const c1=t=>{Wh||(o1(),Wh=!0),t.l_desc=new sl(t.dyn_ltree,of),t.d_desc=new sl(t.dyn_dtree,sf),t.bl_desc=new sl(t.bl_tree,lf),t.bi_buf=0,t.bi_valid=0,uf(t)},pf=(t,n,e,i)=>{Fn(t,(Xu<<1)+(i?1:0),3),df(t),so(t,e),so(t,~e),e&&t.pending_buf.set(t.window.subarray(n,n+e),t.pending),t.pending+=e},f1=t=>{Fn(t,Qc<<1,3),yi(t,Zl,qi),r1(t)},u1=(t,n,e,i)=>{let a,o,c=0;t.level>0?(t.strm.data_type===Ku&&(t.strm.data_type=h1(t)),Fl(t,t.l_desc),Fl(t,t.d_desc),c=s1(t),a=t.opt_len+3+7>>>3,o=t.static_len+3+7>>>3,o<=a&&(a=o)):a=o=e+5,e+4<=a&&n!==-1?pf(t,n,e,i):t.strategy===Yu||o===a?(Fn(t,(Qc<<1)+(i?1:0),3),qh(t,qi,eo)):(Fn(t,(Ju<<1)+(i?1:0),3),l1(t,t.l_desc.max_code+1,t.d_desc.max_code+1,c+1),qh(t,t.dyn_ltree,t.dyn_dtree)),uf(t),i&&df(t)},d1=(t,n,e)=>(t.pending_buf[t.sym_buf+t.sym_next++]=n,t.pending_buf[t.sym_buf+t.sym_next++]=n>>8,t.pending_buf[t.sym_buf+t.sym_next++]=e,n===0?t.dyn_ltree[e*2]++:(t.matches++,n--,t.dyn_ltree[(oo[e]+uo+1)*2]++,t.dyn_dtree[hf(n)*2]++),t.sym_next===t.sym_end);var p1=c1,g1=pf,m1=u1,b1=d1,v1=f1,w1={_tr_init:p1,_tr_stored_block:g1,_tr_flush_block:m1,_tr_tally:b1,_tr_align:v1};const _1=(t,n,e,i)=>{let a=t&65535|0,o=t>>>16&65535|0,c=0;for(;e!==0;){c=e>2e3?2e3:e,e-=c;do a=a+n[i++]|0,o=o+a|0;while(--c);a%=65521,o%=65521}return a|o<<16|0};var lo=_1;const y1=()=>{let t,n=[];for(var e=0;e<256;e++){t=e;for(var i=0;i<8;i++)t=t&1?3988292384^t>>>1:t>>>1;n[e]=t}return n},x1=new Uint32Array(y1()),A1=(t,n,e,i)=>{const a=x1,o=i+e;t^=-1;for(let c=i;c<o;c++)t=t>>>8^a[(t^n[c])&255];return t^-1};var on=A1,Br={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"},Sa={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};const{_tr_init:N1,_tr_stored_block:Ol,_tr_flush_block:L1,_tr_tally:lr,_tr_align:S1}=w1,{Z_NO_FLUSH:hr,Z_PARTIAL_FLUSH:k1,Z_FULL_FLUSH:P1,Z_FINISH:Xn,Z_BLOCK:Gh,Z_OK:dn,Z_STREAM_END:Vh,Z_STREAM_ERROR:Ai,Z_DATA_ERROR:E1,Z_BUF_ERROR:hl,Z_DEFAULT_COMPRESSION:I1,Z_FILTERED:C1,Z_HUFFMAN_ONLY:Xo,Z_RLE:F1,Z_FIXED:O1,Z_DEFAULT_STRATEGY:T1,Z_UNKNOWN:R1,Z_DEFLATED:vs}=Sa,j1=9,B1=15,D1=8,M1=29,U1=256,Tl=U1+1+M1,q1=30,z1=19,H1=2*Tl+1,W1=15,de=3,or=258,Ni=or+de+1,G1=32,Aa=42,Yl=57,Rl=69,jl=73,Bl=91,Dl=103,Tr=113,Qa=666,Pn=1,ka=2,Dr=3,Pa=4,V1=3,Rr=(t,n)=>(t.msg=Br[n],n),Zh=t=>t*2-(t>4?9:0),ar=t=>{let n=t.length;for(;--n>=0;)t[n]=0},Z1=t=>{let n,e,i,a=t.w_size;n=t.hash_size,i=n;do e=t.head[--i],t.head[i]=e>=a?e-a:0;while(--n);n=a,i=n;do e=t.prev[--i],t.prev[i]=e>=a?e-a:0;while(--n)};let $1=(t,n,e)=>(n<<t.hash_shift^e)&t.hash_mask,cr=$1;const zn=t=>{const n=t.state;let e=n.pending;e>t.avail_out&&(e=t.avail_out),e!==0&&(t.output.set(n.pending_buf.subarray(n.pending_out,n.pending_out+e),t.next_out),t.next_out+=e,n.pending_out+=e,t.total_out+=e,t.avail_out-=e,n.pending-=e,n.pending===0&&(n.pending_out=0))},Hn=(t,n)=>{L1(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,n),t.block_start=t.strstart,zn(t.strm)},ve=(t,n)=>{t.pending_buf[t.pending++]=n},Ja=(t,n)=>{t.pending_buf[t.pending++]=n>>>8&255,t.pending_buf[t.pending++]=n&255},Ml=(t,n,e,i)=>{let a=t.avail_in;return a>i&&(a=i),a===0?0:(t.avail_in-=a,n.set(t.input.subarray(t.next_in,t.next_in+a),e),t.state.wrap===1?t.adler=lo(t.adler,n,a,e):t.state.wrap===2&&(t.adler=on(t.adler,n,a,e)),t.next_in+=a,t.total_in+=a,a)},gf=(t,n)=>{let e=t.max_chain_length,i=t.strstart,a,o,c=t.prev_length,l=t.nice_match;const f=t.strstart>t.w_size-Ni?t.strstart-(t.w_size-Ni):0,d=t.window,m=t.w_mask,A=t.prev,L=t.strstart+or;let p=d[i+c-1],T=d[i+c];t.prev_length>=t.good_match&&(e>>=2),l>t.lookahead&&(l=t.lookahead);do if(a=n,!(d[a+c]!==T||d[a+c-1]!==p||d[a]!==d[i]||d[++a]!==d[i+1])){i+=2,a++;do;while(d[++i]===d[++a]&&d[++i]===d[++a]&&d[++i]===d[++a]&&d[++i]===d[++a]&&d[++i]===d[++a]&&d[++i]===d[++a]&&d[++i]===d[++a]&&d[++i]===d[++a]&&i<L);if(o=or-(L-i),i=L-or,o>c){if(t.match_start=n,c=o,o>=l)break;p=d[i+c-1],T=d[i+c]}}while((n=A[n&m])>f&&--e!==0);return c<=t.lookahead?c:t.lookahead},Na=t=>{const n=t.w_size;let e,i,a;do{if(i=t.window_size-t.lookahead-t.strstart,t.strstart>=n+(n-Ni)&&(t.window.set(t.window.subarray(n,n+n-i),0),t.match_start-=n,t.strstart-=n,t.block_start-=n,t.insert>t.strstart&&(t.insert=t.strstart),Z1(t),i+=n),t.strm.avail_in===0)break;if(e=Ml(t.strm,t.window,t.strstart+t.lookahead,i),t.lookahead+=e,t.lookahead+t.insert>=de)for(a=t.strstart-t.insert,t.ins_h=t.window[a],t.ins_h=cr(t,t.ins_h,t.window[a+1]);t.insert&&(t.ins_h=cr(t,t.ins_h,t.window[a+de-1]),t.prev[a&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=a,a++,t.insert--,!(t.lookahead+t.insert<de)););}while(t.lookahead<Ni&&t.strm.avail_in!==0)},mf=(t,n)=>{let e=t.pending_buf_size-5>t.w_size?t.w_size:t.pending_buf_size-5,i,a,o,c=0,l=t.strm.avail_in;do{if(i=65535,o=t.bi_valid+42>>3,t.strm.avail_out<o||(o=t.strm.avail_out-o,a=t.strstart-t.block_start,i>a+t.strm.avail_in&&(i=a+t.strm.avail_in),i>o&&(i=o),i<e&&(i===0&&n!==Xn||n===hr||i!==a+t.strm.avail_in)))break;c=n===Xn&&i===a+t.strm.avail_in?1:0,Ol(t,0,0,c),t.pending_buf[t.pending-4]=i,t.pending_buf[t.pending-3]=i>>8,t.pending_buf[t.pending-2]=~i,t.pending_buf[t.pending-1]=~i>>8,zn(t.strm),a&&(a>i&&(a=i),t.strm.output.set(t.window.subarray(t.block_start,t.block_start+a),t.strm.next_out),t.strm.next_out+=a,t.strm.avail_out-=a,t.strm.total_out+=a,t.block_start+=a,i-=a),i&&(Ml(t.strm,t.strm.output,t.strm.next_out,i),t.strm.next_out+=i,t.strm.avail_out-=i,t.strm.total_out+=i)}while(c===0);return l-=t.strm.avail_in,l&&(l>=t.w_size?(t.matches=2,t.window.set(t.strm.input.subarray(t.strm.next_in-t.w_size,t.strm.next_in),0),t.strstart=t.w_size,t.insert=t.strstart):(t.window_size-t.strstart<=l&&(t.strstart-=t.w_size,t.window.set(t.window.subarray(t.w_size,t.w_size+t.strstart),0),t.matches<2&&t.matches++,t.insert>t.strstart&&(t.insert=t.strstart)),t.window.set(t.strm.input.subarray(t.strm.next_in-l,t.strm.next_in),t.strstart),t.strstart+=l,t.insert+=l>t.w_size-t.insert?t.w_size-t.insert:l),t.block_start=t.strstart),t.high_water<t.strstart&&(t.high_water=t.strstart),c?Pa:n!==hr&&n!==Xn&&t.strm.avail_in===0&&t.strstart===t.block_start?ka:(o=t.window_size-t.strstart,t.strm.avail_in>o&&t.block_start>=t.w_size&&(t.block_start-=t.w_size,t.strstart-=t.w_size,t.window.set(t.window.subarray(t.w_size,t.w_size+t.strstart),0),t.matches<2&&t.matches++,o+=t.w_size,t.insert>t.strstart&&(t.insert=t.strstart)),o>t.strm.avail_in&&(o=t.strm.avail_in),o&&(Ml(t.strm,t.window,t.strstart,o),t.strstart+=o,t.insert+=o>t.w_size-t.insert?t.w_size-t.insert:o),t.high_water<t.strstart&&(t.high_water=t.strstart),o=t.bi_valid+42>>3,o=t.pending_buf_size-o>65535?65535:t.pending_buf_size-o,e=o>t.w_size?t.w_size:o,a=t.strstart-t.block_start,(a>=e||(a||n===Xn)&&n!==hr&&t.strm.avail_in===0&&a<=o)&&(i=a>o?o:a,c=n===Xn&&t.strm.avail_in===0&&i===a?1:0,Ol(t,t.block_start,i,c),t.block_start+=i,zn(t.strm)),c?Dr:Pn)},cl=(t,n)=>{let e,i;for(;;){if(t.lookahead<Ni){if(Na(t),t.lookahead<Ni&&n===hr)return Pn;if(t.lookahead===0)break}if(e=0,t.lookahead>=de&&(t.ins_h=cr(t,t.ins_h,t.window[t.strstart+de-1]),e=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),e!==0&&t.strstart-e<=t.w_size-Ni&&(t.match_length=gf(t,e)),t.match_length>=de)if(i=lr(t,t.strstart-t.match_start,t.match_length-de),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=de){t.match_length--;do t.strstart++,t.ins_h=cr(t,t.ins_h,t.window[t.strstart+de-1]),e=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart;while(--t.match_length!==0);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=cr(t,t.ins_h,t.window[t.strstart+1]);else i=lr(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(i&&(Hn(t,!1),t.strm.avail_out===0))return Pn}return t.insert=t.strstart<de-1?t.strstart:de-1,n===Xn?(Hn(t,!0),t.strm.avail_out===0?Dr:Pa):t.sym_next&&(Hn(t,!1),t.strm.avail_out===0)?Pn:ka},fa=(t,n)=>{let e,i,a;for(;;){if(t.lookahead<Ni){if(Na(t),t.lookahead<Ni&&n===hr)return Pn;if(t.lookahead===0)break}if(e=0,t.lookahead>=de&&(t.ins_h=cr(t,t.ins_h,t.window[t.strstart+de-1]),e=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=de-1,e!==0&&t.prev_length<t.max_lazy_match&&t.strstart-e<=t.w_size-Ni&&(t.match_length=gf(t,e),t.match_length<=5&&(t.strategy===C1||t.match_length===de&&t.strstart-t.match_start>4096)&&(t.match_length=de-1)),t.prev_length>=de&&t.match_length<=t.prev_length){a=t.strstart+t.lookahead-de,i=lr(t,t.strstart-1-t.prev_match,t.prev_length-de),t.lookahead-=t.prev_length-1,t.prev_length-=2;do++t.strstart<=a&&(t.ins_h=cr(t,t.ins_h,t.window[t.strstart+de-1]),e=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart);while(--t.prev_length!==0);if(t.match_available=0,t.match_length=de-1,t.strstart++,i&&(Hn(t,!1),t.strm.avail_out===0))return Pn}else if(t.match_available){if(i=lr(t,0,t.window[t.strstart-1]),i&&Hn(t,!1),t.strstart++,t.lookahead--,t.strm.avail_out===0)return Pn}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(i=lr(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<de-1?t.strstart:de-1,n===Xn?(Hn(t,!0),t.strm.avail_out===0?Dr:Pa):t.sym_next&&(Hn(t,!1),t.strm.avail_out===0)?Pn:ka},Y1=(t,n)=>{let e,i,a,o;const c=t.window;for(;;){if(t.lookahead<=or){if(Na(t),t.lookahead<=or&&n===hr)return Pn;if(t.lookahead===0)break}if(t.match_length=0,t.lookahead>=de&&t.strstart>0&&(a=t.strstart-1,i=c[a],i===c[++a]&&i===c[++a]&&i===c[++a])){o=t.strstart+or;do;while(i===c[++a]&&i===c[++a]&&i===c[++a]&&i===c[++a]&&i===c[++a]&&i===c[++a]&&i===c[++a]&&i===c[++a]&&a<o);t.match_length=or-(o-a),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=de?(e=lr(t,1,t.match_length-de),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(e=lr(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),e&&(Hn(t,!1),t.strm.avail_out===0))return Pn}return t.insert=0,n===Xn?(Hn(t,!0),t.strm.avail_out===0?Dr:Pa):t.sym_next&&(Hn(t,!1),t.strm.avail_out===0)?Pn:ka},K1=(t,n)=>{let e;for(;;){if(t.lookahead===0&&(Na(t),t.lookahead===0)){if(n===hr)return Pn;break}if(t.match_length=0,e=lr(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,e&&(Hn(t,!1),t.strm.avail_out===0))return Pn}return t.insert=0,n===Xn?(Hn(t,!0),t.strm.avail_out===0?Dr:Pa):t.sym_next&&(Hn(t,!1),t.strm.avail_out===0)?Pn:ka};function wi(t,n,e,i,a){this.good_length=t,this.max_lazy=n,this.nice_length=e,this.max_chain=i,this.func=a}const to=[new wi(0,0,0,0,mf),new wi(4,4,8,4,cl),new wi(4,5,16,8,cl),new wi(4,6,32,32,cl),new wi(4,4,16,16,fa),new wi(8,16,32,32,fa),new wi(8,16,128,128,fa),new wi(8,32,128,256,fa),new wi(32,128,258,1024,fa),new wi(32,258,258,4096,fa)],X1=t=>{t.window_size=2*t.w_size,ar(t.head),t.max_lazy_match=to[t.level].max_lazy,t.good_match=to[t.level].good_length,t.nice_match=to[t.level].nice_length,t.max_chain_length=to[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=de-1,t.match_available=0,t.ins_h=0};function J1(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=vs,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(H1*2),this.dyn_dtree=new Uint16Array((2*q1+1)*2),this.bl_tree=new Uint16Array((2*z1+1)*2),ar(this.dyn_ltree),ar(this.dyn_dtree),ar(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(W1+1),this.heap=new Uint16Array(2*Tl+1),ar(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(2*Tl+1),ar(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const po=t=>{if(!t)return 1;const n=t.state;return!n||n.strm!==t||n.status!==Aa&&n.status!==Yl&&n.status!==Rl&&n.status!==jl&&n.status!==Bl&&n.status!==Dl&&n.status!==Tr&&n.status!==Qa?1:0},bf=t=>{if(po(t))return Rr(t,Ai);t.total_in=t.total_out=0,t.data_type=R1;const n=t.state;return n.pending=0,n.pending_out=0,n.wrap<0&&(n.wrap=-n.wrap),n.status=n.wrap===2?Yl:n.wrap?Aa:Tr,t.adler=n.wrap===2?0:1,n.last_flush=-2,N1(n),dn},vf=t=>{const n=bf(t);return n===dn&&X1(t.state),n},Q1=(t,n)=>po(t)||t.state.wrap!==2?Ai:(t.state.gzhead=n,dn),wf=(t,n,e,i,a,o)=>{if(!t)return Ai;let c=1;if(n===I1&&(n=6),i<0?(c=0,i=-i):i>15&&(c=2,i-=16),a<1||a>j1||e!==vs||i<8||i>15||n<0||n>9||o<0||o>O1||i===8&&c!==1)return Rr(t,Ai);i===8&&(i=9);const l=new J1;return t.state=l,l.strm=t,l.status=Aa,l.wrap=c,l.gzhead=null,l.w_bits=i,l.w_size=1<<l.w_bits,l.w_mask=l.w_size-1,l.hash_bits=a+7,l.hash_size=1<<l.hash_bits,l.hash_mask=l.hash_size-1,l.hash_shift=~~((l.hash_bits+de-1)/de),l.window=new Uint8Array(l.w_size*2),l.head=new Uint16Array(l.hash_size),l.prev=new Uint16Array(l.w_size),l.lit_bufsize=1<<a+6,l.pending_buf_size=l.lit_bufsize*4,l.pending_buf=new Uint8Array(l.pending_buf_size),l.sym_buf=l.lit_bufsize,l.sym_end=(l.lit_bufsize-1)*3,l.level=n,l.strategy=o,l.method=e,vf(t)},t2=(t,n)=>wf(t,n,vs,B1,D1,T1),e2=(t,n)=>{if(po(t)||n>Gh||n<0)return t?Rr(t,Ai):Ai;const e=t.state;if(!t.output||t.avail_in!==0&&!t.input||e.status===Qa&&n!==Xn)return Rr(t,t.avail_out===0?hl:Ai);const i=e.last_flush;if(e.last_flush=n,e.pending!==0){if(zn(t),t.avail_out===0)return e.last_flush=-1,dn}else if(t.avail_in===0&&Zh(n)<=Zh(i)&&n!==Xn)return Rr(t,hl);if(e.status===Qa&&t.avail_in!==0)return Rr(t,hl);if(e.status===Aa&&e.wrap===0&&(e.status=Tr),e.status===Aa){let a=vs+(e.w_bits-8<<4)<<8,o=-1;if(e.strategy>=Xo||e.level<2?o=0:e.level<6?o=1:e.level===6?o=2:o=3,a|=o<<6,e.strstart!==0&&(a|=G1),a+=31-a%31,Ja(e,a),e.strstart!==0&&(Ja(e,t.adler>>>16),Ja(e,t.adler&65535)),t.adler=1,e.status=Tr,zn(t),e.pending!==0)return e.last_flush=-1,dn}if(e.status===Yl){if(t.adler=0,ve(e,31),ve(e,139),ve(e,8),e.gzhead)ve(e,(e.gzhead.text?1:0)+(e.gzhead.hcrc?2:0)+(e.gzhead.extra?4:0)+(e.gzhead.name?8:0)+(e.gzhead.comment?16:0)),ve(e,e.gzhead.time&255),ve(e,e.gzhead.time>>8&255),ve(e,e.gzhead.time>>16&255),ve(e,e.gzhead.time>>24&255),ve(e,e.level===9?2:e.strategy>=Xo||e.level<2?4:0),ve(e,e.gzhead.os&255),e.gzhead.extra&&e.gzhead.extra.length&&(ve(e,e.gzhead.extra.length&255),ve(e,e.gzhead.extra.length>>8&255)),e.gzhead.hcrc&&(t.adler=on(t.adler,e.pending_buf,e.pending,0)),e.gzindex=0,e.status=Rl;else if(ve(e,0),ve(e,0),ve(e,0),ve(e,0),ve(e,0),ve(e,e.level===9?2:e.strategy>=Xo||e.level<2?4:0),ve(e,V1),e.status=Tr,zn(t),e.pending!==0)return e.last_flush=-1,dn}if(e.status===Rl){if(e.gzhead.extra){let a=e.pending,o=(e.gzhead.extra.length&65535)-e.gzindex;for(;e.pending+o>e.pending_buf_size;){let l=e.pending_buf_size-e.pending;if(e.pending_buf.set(e.gzhead.extra.subarray(e.gzindex,e.gzindex+l),e.pending),e.pending=e.pending_buf_size,e.gzhead.hcrc&&e.pending>a&&(t.adler=on(t.adler,e.pending_buf,e.pending-a,a)),e.gzindex+=l,zn(t),e.pending!==0)return e.last_flush=-1,dn;a=0,o-=l}let c=new Uint8Array(e.gzhead.extra);e.pending_buf.set(c.subarray(e.gzindex,e.gzindex+o),e.pending),e.pending+=o,e.gzhead.hcrc&&e.pending>a&&(t.adler=on(t.adler,e.pending_buf,e.pending-a,a)),e.gzindex=0}e.status=jl}if(e.status===jl){if(e.gzhead.name){let a=e.pending,o;do{if(e.pending===e.pending_buf_size){if(e.gzhead.hcrc&&e.pending>a&&(t.adler=on(t.adler,e.pending_buf,e.pending-a,a)),zn(t),e.pending!==0)return e.last_flush=-1,dn;a=0}e.gzindex<e.gzhead.name.length?o=e.gzhead.name.charCodeAt(e.gzindex++)&255:o=0,ve(e,o)}while(o!==0);e.gzhead.hcrc&&e.pending>a&&(t.adler=on(t.adler,e.pending_buf,e.pending-a,a)),e.gzindex=0}e.status=Bl}if(e.status===Bl){if(e.gzhead.comment){let a=e.pending,o;do{if(e.pending===e.pending_buf_size){if(e.gzhead.hcrc&&e.pending>a&&(t.adler=on(t.adler,e.pending_buf,e.pending-a,a)),zn(t),e.pending!==0)return e.last_flush=-1,dn;a=0}e.gzindex<e.gzhead.comment.length?o=e.gzhead.comment.charCodeAt(e.gzindex++)&255:o=0,ve(e,o)}while(o!==0);e.gzhead.hcrc&&e.pending>a&&(t.adler=on(t.adler,e.pending_buf,e.pending-a,a))}e.status=Dl}if(e.status===Dl){if(e.gzhead.hcrc){if(e.pending+2>e.pending_buf_size&&(zn(t),e.pending!==0))return e.last_flush=-1,dn;ve(e,t.adler&255),ve(e,t.adler>>8&255),t.adler=0}if(e.status=Tr,zn(t),e.pending!==0)return e.last_flush=-1,dn}if(t.avail_in!==0||e.lookahead!==0||n!==hr&&e.status!==Qa){let a=e.level===0?mf(e,n):e.strategy===Xo?K1(e,n):e.strategy===F1?Y1(e,n):to[e.level].func(e,n);if((a===Dr||a===Pa)&&(e.status=Qa),a===Pn||a===Dr)return t.avail_out===0&&(e.last_flush=-1),dn;if(a===ka&&(n===k1?S1(e):n!==Gh&&(Ol(e,0,0,!1),n===P1&&(ar(e.head),e.lookahead===0&&(e.strstart=0,e.block_start=0,e.insert=0))),zn(t),t.avail_out===0))return e.last_flush=-1,dn}return n!==Xn?dn:e.wrap<=0?Vh:(e.wrap===2?(ve(e,t.adler&255),ve(e,t.adler>>8&255),ve(e,t.adler>>16&255),ve(e,t.adler>>24&255),ve(e,t.total_in&255),ve(e,t.total_in>>8&255),ve(e,t.total_in>>16&255),ve(e,t.total_in>>24&255)):(Ja(e,t.adler>>>16),Ja(e,t.adler&65535)),zn(t),e.wrap>0&&(e.wrap=-e.wrap),e.pending!==0?dn:Vh)},n2=t=>{if(po(t))return Ai;const n=t.state.status;return t.state=null,n===Tr?Rr(t,E1):dn},i2=(t,n)=>{let e=n.length;if(po(t))return Ai;const i=t.state,a=i.wrap;if(a===2||a===1&&i.status!==Aa||i.lookahead)return Ai;if(a===1&&(t.adler=lo(t.adler,n,e,0)),i.wrap=0,e>=i.w_size){a===0&&(ar(i.head),i.strstart=0,i.block_start=0,i.insert=0);let f=new Uint8Array(i.w_size);f.set(n.subarray(e-i.w_size,e),0),n=f,e=i.w_size}const o=t.avail_in,c=t.next_in,l=t.input;for(t.avail_in=e,t.next_in=0,t.input=n,Na(i);i.lookahead>=de;){let f=i.strstart,d=i.lookahead-(de-1);do i.ins_h=cr(i,i.ins_h,i.window[f+de-1]),i.prev[f&i.w_mask]=i.head[i.ins_h],i.head[i.ins_h]=f,f++;while(--d);i.strstart=f,i.lookahead=de-1,Na(i)}return i.strstart+=i.lookahead,i.block_start=i.strstart,i.insert=i.lookahead,i.lookahead=0,i.match_length=i.prev_length=de-1,i.match_available=0,t.next_in=c,t.input=l,t.avail_in=o,i.wrap=a,dn};var r2=t2,a2=wf,o2=vf,s2=bf,l2=Q1,h2=e2,c2=n2,f2=i2,u2="pako deflate (from Nodeca project)",no={deflateInit:r2,deflateInit2:a2,deflateReset:o2,deflateResetKeep:s2,deflateSetHeader:l2,deflate:h2,deflateEnd:c2,deflateSetDictionary:f2,deflateInfo:u2};const d2=(t,n)=>Object.prototype.hasOwnProperty.call(t,n);var p2=function(t){const n=Array.prototype.slice.call(arguments,1);for(;n.length;){const e=n.shift();if(e){if(typeof e!="object")throw new TypeError(e+"must be non-object");for(const i in e)d2(e,i)&&(t[i]=e[i])}}return t},g2=t=>{let n=0;for(let i=0,a=t.length;i<a;i++)n+=t[i].length;const e=new Uint8Array(n);for(let i=0,a=0,o=t.length;i<o;i++){let c=t[i];e.set(c,a),a+=c.length}return e},ws={assign:p2,flattenChunks:g2};let _f=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(t){_f=!1}const ho=new Uint8Array(256);for(let t=0;t<256;t++)ho[t]=t>=252?6:t>=248?5:t>=240?4:t>=224?3:t>=192?2:1;ho[254]=ho[254]=1;var m2=t=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(t);let n,e,i,a,o,c=t.length,l=0;for(a=0;a<c;a++)e=t.charCodeAt(a),(e&64512)===55296&&a+1<c&&(i=t.charCodeAt(a+1),(i&64512)===56320&&(e=65536+(e-55296<<10)+(i-56320),a++)),l+=e<128?1:e<2048?2:e<65536?3:4;for(n=new Uint8Array(l),o=0,a=0;o<l;a++)e=t.charCodeAt(a),(e&64512)===55296&&a+1<c&&(i=t.charCodeAt(a+1),(i&64512)===56320&&(e=65536+(e-55296<<10)+(i-56320),a++)),e<128?n[o++]=e:e<2048?(n[o++]=192|e>>>6,n[o++]=128|e&63):e<65536?(n[o++]=224|e>>>12,n[o++]=128|e>>>6&63,n[o++]=128|e&63):(n[o++]=240|e>>>18,n[o++]=128|e>>>12&63,n[o++]=128|e>>>6&63,n[o++]=128|e&63);return n};const b2=(t,n)=>{if(n<65534&&t.subarray&&_f)return String.fromCharCode.apply(null,t.length===n?t:t.subarray(0,n));let e="";for(let i=0;i<n;i++)e+=String.fromCharCode(t[i]);return e};var v2=(t,n)=>{const e=n||t.length;if(typeof TextDecoder=="function"&&TextDecoder.prototype.decode)return new TextDecoder().decode(t.subarray(0,n));let i,a;const o=new Array(e*2);for(a=0,i=0;i<e;){let c=t[i++];if(c<128){o[a++]=c;continue}let l=ho[c];if(l>4){o[a++]=65533,i+=l-1;continue}for(c&=l===2?31:l===3?15:7;l>1&&i<e;)c=c<<6|t[i++]&63,l--;if(l>1){o[a++]=65533;continue}c<65536?o[a++]=c:(c-=65536,o[a++]=55296|c>>10&1023,o[a++]=56320|c&1023)}return b2(o,a)},w2=(t,n)=>{n=n||t.length,n>t.length&&(n=t.length);let e=n-1;for(;e>=0&&(t[e]&192)===128;)e--;return e<0||e===0?n:e+ho[t[e]]>n?e:n},co={string2buf:m2,buf2string:v2,utf8border:w2};function _2(){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 yf=_2;const xf=Object.prototype.toString,{Z_NO_FLUSH:y2,Z_SYNC_FLUSH:x2,Z_FULL_FLUSH:A2,Z_FINISH:N2,Z_OK:ps,Z_STREAM_END:L2,Z_DEFAULT_COMPRESSION:S2,Z_DEFAULT_STRATEGY:k2,Z_DEFLATED:P2}=Sa;function go(t){this.options=ws.assign({level:S2,method:P2,chunkSize:16384,windowBits:15,memLevel:8,strategy:k2},t||{});let n=this.options;n.raw&&n.windowBits>0?n.windowBits=-n.windowBits:n.gzip&&n.windowBits>0&&n.windowBits<16&&(n.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new yf,this.strm.avail_out=0;let e=no.deflateInit2(this.strm,n.level,n.method,n.windowBits,n.memLevel,n.strategy);if(e!==ps)throw new Error(Br[e]);if(n.header&&no.deflateSetHeader(this.strm,n.header),n.dictionary){let i;if(typeof n.dictionary=="string"?i=co.string2buf(n.dictionary):xf.call(n.dictionary)==="[object ArrayBuffer]"?i=new Uint8Array(n.dictionary):i=n.dictionary,e=no.deflateSetDictionary(this.strm,i),e!==ps)throw new Error(Br[e]);this._dict_set=!0}}go.prototype.push=function(t,n){const e=this.strm,i=this.options.chunkSize;let a,o;if(this.ended)return!1;for(n===~~n?o=n:o=n===!0?N2:y2,typeof t=="string"?e.input=co.string2buf(t):xf.call(t)==="[object ArrayBuffer]"?e.input=new Uint8Array(t):e.input=t,e.next_in=0,e.avail_in=e.input.length;;){if(e.avail_out===0&&(e.output=new Uint8Array(i),e.next_out=0,e.avail_out=i),(o===x2||o===A2)&&e.avail_out<=6){this.onData(e.output.subarray(0,e.next_out)),e.avail_out=0;continue}if(a=no.deflate(e,o),a===L2)return e.next_out>0&&this.onData(e.output.subarray(0,e.next_out)),a=no.deflateEnd(this.strm),this.onEnd(a),this.ended=!0,a===ps;if(e.avail_out===0){this.onData(e.output);continue}if(o>0&&e.next_out>0){this.onData(e.output.subarray(0,e.next_out)),e.avail_out=0;continue}if(e.avail_in===0)break}return!0};go.prototype.onData=function(t){this.chunks.push(t)};go.prototype.onEnd=function(t){t===ps&&(this.result=ws.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};function Kl(t,n){const e=new go(n);if(e.push(t,!0),e.err)throw e.msg||Br[e.err];return e.result}function E2(t,n){return n=n||{},n.raw=!0,Kl(t,n)}function I2(t,n){return n=n||{},n.gzip=!0,Kl(t,n)}var C2=go,F2=Kl,O2=E2,T2=I2,R2=Sa,j2={Deflate:C2,deflate:F2,deflateRaw:O2,gzip:T2,constants:R2};const Jo=16209,B2=16191;var D2=function(n,e){let i,a,o,c,l,f,d,m,A,L,p,T,O,j,k,Z,$,M,lt,_t,mt,tt,z,et;const N=n.state;i=n.next_in,z=n.input,a=i+(n.avail_in-5),o=n.next_out,et=n.output,c=o-(e-n.avail_out),l=o+(n.avail_out-257),f=N.dmax,d=N.wsize,m=N.whave,A=N.wnext,L=N.window,p=N.hold,T=N.bits,O=N.lencode,j=N.distcode,k=(1<<N.lenbits)-1,Z=(1<<N.distbits)-1;t:do{T<15&&(p+=z[i++]<<T,T+=8,p+=z[i++]<<T,T+=8),$=O[p&k];e:for(;;){if(M=$>>>24,p>>>=M,T-=M,M=$>>>16&255,M===0)et[o++]=$&65535;else if(M&16){lt=$&65535,M&=15,M&&(T<M&&(p+=z[i++]<<T,T+=8),lt+=p&(1<<M)-1,p>>>=M,T-=M),T<15&&(p+=z[i++]<<T,T+=8,p+=z[i++]<<T,T+=8),$=j[p&Z];n:for(;;){if(M=$>>>24,p>>>=M,T-=M,M=$>>>16&255,M&16){if(_t=$&65535,M&=15,T<M&&(p+=z[i++]<<T,T+=8,T<M&&(p+=z[i++]<<T,T+=8)),_t+=p&(1<<M)-1,_t>f){n.msg="invalid distance too far back",N.mode=Jo;break t}if(p>>>=M,T-=M,M=o-c,_t>M){if(M=_t-M,M>m&&N.sane){n.msg="invalid distance too far back",N.mode=Jo;break t}if(mt=0,tt=L,A===0){if(mt+=d-M,M<lt){lt-=M;do et[o++]=L[mt++];while(--M);mt=o-_t,tt=et}}else if(A<M){if(mt+=d+A-M,M-=A,M<lt){lt-=M;do et[o++]=L[mt++];while(--M);if(mt=0,A<lt){M=A,lt-=M;do et[o++]=L[mt++];while(--M);mt=o-_t,tt=et}}}else if(mt+=A-M,M<lt){lt-=M;do et[o++]=L[mt++];while(--M);mt=o-_t,tt=et}for(;lt>2;)et[o++]=tt[mt++],et[o++]=tt[mt++],et[o++]=tt[mt++],lt-=3;lt&&(et[o++]=tt[mt++],lt>1&&(et[o++]=tt[mt++]))}else{mt=o-_t;do et[o++]=et[mt++],et[o++]=et[mt++],et[o++]=et[mt++],lt-=3;while(lt>2);lt&&(et[o++]=et[mt++],lt>1&&(et[o++]=et[mt++]))}}else if((M&64)===0){$=j[($&65535)+(p&(1<<M)-1)];continue n}else{n.msg="invalid distance code",N.mode=Jo;break t}break}}else if((M&64)===0){$=O[($&65535)+(p&(1<<M)-1)];continue e}else if(M&32){N.mode=B2;break t}else{n.msg="invalid literal/length code",N.mode=Jo;break t}break}}while(i<a&&o<l);lt=T>>3,i-=lt,T-=lt<<3,p&=(1<<T)-1,n.next_in=i,n.next_out=o,n.avail_in=i<a?5+(a-i):5-(i-a),n.avail_out=o<l?257+(l-o):257-(o-l),N.hold=p,N.bits=T};const ua=15,$h=852,Yh=592,Kh=0,fl=1,Xh=2,M2=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]),U2=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]),q2=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]),z2=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]),H2=(t,n,e,i,a,o,c,l)=>{const f=l.bits;let d=0,m=0,A=0,L=0,p=0,T=0,O=0,j=0,k=0,Z=0,$,M,lt,_t,mt,tt=null,z;const et=new Uint16Array(ua+1),N=new Uint16Array(ua+1);let F=null,U,q,it;for(d=0;d<=ua;d++)et[d]=0;for(m=0;m<i;m++)et[n[e+m]]++;for(p=f,L=ua;L>=1&&et[L]===0;L--);if(p>L&&(p=L),L===0)return a[o++]=1<<24|64<<16|0,a[o++]=1<<24|64<<16|0,l.bits=1,0;for(A=1;A<L&&et[A]===0;A++);for(p<A&&(p=A),j=1,d=1;d<=ua;d++)if(j<<=1,j-=et[d],j<0)return-1;if(j>0&&(t===Kh||L!==1))return-1;for(N[1]=0,d=1;d<ua;d++)N[d+1]=N[d]+et[d];for(m=0;m<i;m++)n[e+m]!==0&&(c[N[n[e+m]]++]=m);if(t===Kh?(tt=F=c,z=20):t===fl?(tt=M2,F=U2,z=257):(tt=q2,F=z2,z=0),Z=0,m=0,d=A,mt=o,T=p,O=0,lt=-1,k=1<<p,_t=k-1,t===fl&&k>$h||t===Xh&&k>Yh)return 1;for(;;){U=d-O,c[m]+1<z?(q=0,it=c[m]):c[m]>=z?(q=F[c[m]-z],it=tt[c[m]-z]):(q=96,it=0),$=1<<d-O,M=1<<T,A=M;do M-=$,a[mt+(Z>>O)+M]=U<<24|q<<16|it|0;while(M!==0);for($=1<<d-1;Z&$;)$>>=1;if($!==0?(Z&=$-1,Z+=$):Z=0,m++,--et[d]===0){if(d===L)break;d=n[e+c[m]]}if(d>p&&(Z&_t)!==lt){for(O===0&&(O=p),mt+=A,T=d-O,j=1<<T;T+O<L&&(j-=et[T+O],!(j<=0));)T++,j<<=1;if(k+=1<<T,t===fl&&k>$h||t===Xh&&k>Yh)return 1;lt=Z&_t,a[lt]=p<<24|T<<16|mt-o|0}}return Z!==0&&(a[mt+Z]=d-O<<24|64<<16|0),l.bits=p,0};var io=H2;const W2=0,Af=1,Nf=2,{Z_FINISH:Jh,Z_BLOCK:G2,Z_TREES:Qo,Z_OK:Mr,Z_STREAM_END:V2,Z_NEED_DICT:Z2,Z_STREAM_ERROR:Jn,Z_DATA_ERROR:Lf,Z_MEM_ERROR:Sf,Z_BUF_ERROR:$2,Z_DEFLATED:Qh}=Sa,_s=16180,tc=16181,ec=16182,nc=16183,ic=16184,rc=16185,ac=16186,oc=16187,sc=16188,lc=16189,gs=16190,Ui=16191,ul=16192,hc=16193,dl=16194,cc=16195,fc=16196,uc=16197,dc=16198,ts=16199,es=16200,pc=16201,gc=16202,mc=16203,bc=16204,vc=16205,pl=16206,wc=16207,_c=16208,Be=16209,kf=16210,Pf=16211,Y2=852,K2=592,X2=15,J2=X2,yc=t=>(t>>>24&255)+(t>>>8&65280)+((t&65280)<<8)+((t&255)<<24);function Q2(){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 qr=t=>{if(!t)return 1;const n=t.state;return!n||n.strm!==t||n.mode<_s||n.mode>Pf?1:0},Ef=t=>{if(qr(t))return Jn;const n=t.state;return t.total_in=t.total_out=n.total=0,t.msg="",n.wrap&&(t.adler=n.wrap&1),n.mode=_s,n.last=0,n.havedict=0,n.flags=-1,n.dmax=32768,n.head=null,n.hold=0,n.bits=0,n.lencode=n.lendyn=new Int32Array(Y2),n.distcode=n.distdyn=new Int32Array(K2),n.sane=1,n.back=-1,Mr},If=t=>{if(qr(t))return Jn;const n=t.state;return n.wsize=0,n.whave=0,n.wnext=0,Ef(t)},Cf=(t,n)=>{let e;if(qr(t))return Jn;const i=t.state;return n<0?(e=0,n=-n):(e=(n>>4)+5,n<48&&(n&=15)),n&&(n<8||n>15)?Jn:(i.window!==null&&i.wbits!==n&&(i.window=null),i.wrap=e,i.wbits=n,If(t))},Ff=(t,n)=>{if(!t)return Jn;const e=new Q2;t.state=e,e.strm=t,e.window=null,e.mode=_s;const i=Cf(t,n);return i!==Mr&&(t.state=null),i},t0=t=>Ff(t,J2);let xc=!0,gl,ml;const e0=t=>{if(xc){gl=new Int32Array(512),ml=new Int32Array(32);let n=0;for(;n<144;)t.lens[n++]=8;for(;n<256;)t.lens[n++]=9;for(;n<280;)t.lens[n++]=7;for(;n<288;)t.lens[n++]=8;for(io(Af,t.lens,0,288,gl,0,t.work,{bits:9}),n=0;n<32;)t.lens[n++]=5;io(Nf,t.lens,0,32,ml,0,t.work,{bits:5}),xc=!1}t.lencode=gl,t.lenbits=9,t.distcode=ml,t.distbits=5},Of=(t,n,e,i)=>{let a;const o=t.state;return o.window===null&&(o.wsize=1<<o.wbits,o.wnext=0,o.whave=0,o.window=new Uint8Array(o.wsize)),i>=o.wsize?(o.window.set(n.subarray(e-o.wsize,e),0),o.wnext=0,o.whave=o.wsize):(a=o.wsize-o.wnext,a>i&&(a=i),o.window.set(n.subarray(e-i,e-i+a),o.wnext),i-=a,i?(o.window.set(n.subarray(e-i,e),0),o.wnext=i,o.whave=o.wsize):(o.wnext+=a,o.wnext===o.wsize&&(o.wnext=0),o.whave<o.wsize&&(o.whave+=a))),0},n0=(t,n)=>{let e,i,a,o,c,l,f,d,m,A,L,p,T,O,j=0,k,Z,$,M,lt,_t,mt,tt;const z=new Uint8Array(4);let et,N;const F=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(qr(t)||!t.output||!t.input&&t.avail_in!==0)return Jn;e=t.state,e.mode===Ui&&(e.mode=ul),c=t.next_out,a=t.output,f=t.avail_out,o=t.next_in,i=t.input,l=t.avail_in,d=e.hold,m=e.bits,A=l,L=f,tt=Mr;t:for(;;)switch(e.mode){case _s:if(e.wrap===0){e.mode=ul;break}for(;m<16;){if(l===0)break t;l--,d+=i[o++]<<m,m+=8}if(e.wrap&2&&d===35615){e.wbits===0&&(e.wbits=15),e.check=0,z[0]=d&255,z[1]=d>>>8&255,e.check=on(e.check,z,2,0),d=0,m=0,e.mode=tc;break}if(e.head&&(e.head.done=!1),!(e.wrap&1)||(((d&255)<<8)+(d>>8))%31){t.msg="incorrect header check",e.mode=Be;break}if((d&15)!==Qh){t.msg="unknown compression method",e.mode=Be;break}if(d>>>=4,m-=4,mt=(d&15)+8,e.wbits===0&&(e.wbits=mt),mt>15||mt>e.wbits){t.msg="invalid window size",e.mode=Be;break}e.dmax=1<<e.wbits,e.flags=0,t.adler=e.check=1,e.mode=d&512?lc:Ui,d=0,m=0;break;case tc:for(;m<16;){if(l===0)break t;l--,d+=i[o++]<<m,m+=8}if(e.flags=d,(e.flags&255)!==Qh){t.msg="unknown compression method",e.mode=Be;break}if(e.flags&57344){t.msg="unknown header flags set",e.mode=Be;break}e.head&&(e.head.text=d>>8&1),e.flags&512&&e.wrap&4&&(z[0]=d&255,z[1]=d>>>8&255,e.check=on(e.check,z,2,0)),d=0,m=0,e.mode=ec;case ec:for(;m<32;){if(l===0)break t;l--,d+=i[o++]<<m,m+=8}e.head&&(e.head.time=d),e.flags&512&&e.wrap&4&&(z[0]=d&255,z[1]=d>>>8&255,z[2]=d>>>16&255,z[3]=d>>>24&255,e.check=on(e.check,z,4,0)),d=0,m=0,e.mode=nc;case nc:for(;m<16;){if(l===0)break t;l--,d+=i[o++]<<m,m+=8}e.head&&(e.head.xflags=d&255,e.head.os=d>>8),e.flags&512&&e.wrap&4&&(z[0]=d&255,z[1]=d>>>8&255,e.check=on(e.check,z,2,0)),d=0,m=0,e.mode=ic;case ic:if(e.flags&1024){for(;m<16;){if(l===0)break t;l--,d+=i[o++]<<m,m+=8}e.length=d,e.head&&(e.head.extra_len=d),e.flags&512&&e.wrap&4&&(z[0]=d&255,z[1]=d>>>8&255,e.check=on(e.check,z,2,0)),d=0,m=0}else e.head&&(e.head.extra=null);e.mode=rc;case rc:if(e.flags&1024&&(p=e.length,p>l&&(p=l),p&&(e.head&&(mt=e.head.extra_len-e.length,e.head.extra||(e.head.extra=new Uint8Array(e.head.extra_len)),e.head.extra.set(i.subarray(o,o+p),mt)),e.flags&512&&e.wrap&4&&(e.check=on(e.check,i,p,o)),l-=p,o+=p,e.length-=p),e.length))break t;e.length=0,e.mode=ac;case ac:if(e.flags&2048){if(l===0)break t;p=0;do mt=i[o+p++],e.head&&mt&&e.length<65536&&(e.head.name+=String.fromCharCode(mt));while(mt&&p<l);if(e.flags&512&&e.wrap&4&&(e.check=on(e.check,i,p,o)),l-=p,o+=p,mt)break t}else e.head&&(e.head.name=null);e.length=0,e.mode=oc;case oc:if(e.flags&4096){if(l===0)break t;p=0;do mt=i[o+p++],e.head&&mt&&e.length<65536&&(e.head.comment+=String.fromCharCode(mt));while(mt&&p<l);if(e.flags&512&&e.wrap&4&&(e.check=on(e.check,i,p,o)),l-=p,o+=p,mt)break t}else e.head&&(e.head.comment=null);e.mode=sc;case sc:if(e.flags&512){for(;m<16;){if(l===0)break t;l--,d+=i[o++]<<m,m+=8}if(e.wrap&4&&d!==(e.check&65535)){t.msg="header crc mismatch",e.mode=Be;break}d=0,m=0}e.head&&(e.head.hcrc=e.flags>>9&1,e.head.done=!0),t.adler=e.check=0,e.mode=Ui;break;case lc:for(;m<32;){if(l===0)break t;l--,d+=i[o++]<<m,m+=8}t.adler=e.check=yc(d),d=0,m=0,e.mode=gs;case gs:if(e.havedict===0)return t.next_out=c,t.avail_out=f,t.next_in=o,t.avail_in=l,e.hold=d,e.bits=m,Z2;t.adler=e.check=1,e.mode=Ui;case Ui:if(n===G2||n===Qo)break t;case ul:if(e.last){d>>>=m&7,m-=m&7,e.mode=pl;break}for(;m<3;){if(l===0)break t;l--,d+=i[o++]<<m,m+=8}switch(e.last=d&1,d>>>=1,m-=1,d&3){case 0:e.mode=hc;break;case 1:if(e0(e),e.mode=ts,n===Qo){d>>>=2,m-=2;break t}break;case 2:e.mode=fc;break;case 3:t.msg="invalid block type",e.mode=Be}d>>>=2,m-=2;break;case hc:for(d>>>=m&7,m-=m&7;m<32;){if(l===0)break t;l--,d+=i[o++]<<m,m+=8}if((d&65535)!==(d>>>16^65535)){t.msg="invalid stored block lengths",e.mode=Be;break}if(e.length=d&65535,d=0,m=0,e.mode=dl,n===Qo)break t;case dl:e.mode=cc;case cc:if(p=e.length,p){if(p>l&&(p=l),p>f&&(p=f),p===0)break t;a.set(i.subarray(o,o+p),c),l-=p,o+=p,f-=p,c+=p,e.length-=p;break}e.mode=Ui;break;case fc:for(;m<14;){if(l===0)break t;l--,d+=i[o++]<<m,m+=8}if(e.nlen=(d&31)+257,d>>>=5,m-=5,e.ndist=(d&31)+1,d>>>=5,m-=5,e.ncode=(d&15)+4,d>>>=4,m-=4,e.nlen>286||e.ndist>30){t.msg="too many length or distance symbols",e.mode=Be;break}e.have=0,e.mode=uc;case uc:for(;e.have<e.ncode;){for(;m<3;){if(l===0)break t;l--,d+=i[o++]<<m,m+=8}e.lens[F[e.have++]]=d&7,d>>>=3,m-=3}for(;e.have<19;)e.lens[F[e.have++]]=0;if(e.lencode=e.lendyn,e.lenbits=7,et={bits:e.lenbits},tt=io(W2,e.lens,0,19,e.lencode,0,e.work,et),e.lenbits=et.bits,tt){t.msg="invalid code lengths set",e.mode=Be;break}e.have=0,e.mode=dc;case dc:for(;e.have<e.nlen+e.ndist;){for(;j=e.lencode[d&(1<<e.lenbits)-1],k=j>>>24,Z=j>>>16&255,$=j&65535,!(k<=m);){if(l===0)break t;l--,d+=i[o++]<<m,m+=8}if($<16)d>>>=k,m-=k,e.lens[e.have++]=$;else{if($===16){for(N=k+2;m<N;){if(l===0)break t;l--,d+=i[o++]<<m,m+=8}if(d>>>=k,m-=k,e.have===0){t.msg="invalid bit length repeat",e.mode=Be;break}mt=e.lens[e.have-1],p=3+(d&3),d>>>=2,m-=2}else if($===17){for(N=k+3;m<N;){if(l===0)break t;l--,d+=i[o++]<<m,m+=8}d>>>=k,m-=k,mt=0,p=3+(d&7),d>>>=3,m-=3}else{for(N=k+7;m<N;){if(l===0)break t;l--,d+=i[o++]<<m,m+=8}d>>>=k,m-=k,mt=0,p=11+(d&127),d>>>=7,m-=7}if(e.have+p>e.nlen+e.ndist){t.msg="invalid bit length repeat",e.mode=Be;break}for(;p--;)e.lens[e.have++]=mt}}if(e.mode===Be)break;if(e.lens[256]===0){t.msg="invalid code -- missing end-of-block",e.mode=Be;break}if(e.lenbits=9,et={bits:e.lenbits},tt=io(Af,e.lens,0,e.nlen,e.lencode,0,e.work,et),e.lenbits=et.bits,tt){t.msg="invalid literal/lengths set",e.mode=Be;break}if(e.distbits=6,e.distcode=e.distdyn,et={bits:e.distbits},tt=io(Nf,e.lens,e.nlen,e.ndist,e.distcode,0,e.work,et),e.distbits=et.bits,tt){t.msg="invalid distances set",e.mode=Be;break}if(e.mode=ts,n===Qo)break t;case ts:e.mode=es;case es:if(l>=6&&f>=258){t.next_out=c,t.avail_out=f,t.next_in=o,t.avail_in=l,e.hold=d,e.bits=m,D2(t,L),c=t.next_out,a=t.output,f=t.avail_out,o=t.next_in,i=t.input,l=t.avail_in,d=e.hold,m=e.bits,e.mode===Ui&&(e.back=-1);break}for(e.back=0;j=e.lencode[d&(1<<e.lenbits)-1],k=j>>>24,Z=j>>>16&255,$=j&65535,!(k<=m);){if(l===0)break t;l--,d+=i[o++]<<m,m+=8}if(Z&&(Z&240)===0){for(M=k,lt=Z,_t=$;j=e.lencode[_t+((d&(1<<M+lt)-1)>>M)],k=j>>>24,Z=j>>>16&255,$=j&65535,!(M+k<=m);){if(l===0)break t;l--,d+=i[o++]<<m,m+=8}d>>>=M,m-=M,e.back+=M}if(d>>>=k,m-=k,e.back+=k,e.length=$,Z===0){e.mode=vc;break}if(Z&32){e.back=-1,e.mode=Ui;break}if(Z&64){t.msg="invalid literal/length code",e.mode=Be;break}e.extra=Z&15,e.mode=pc;case pc:if(e.extra){for(N=e.extra;m<N;){if(l===0)break t;l--,d+=i[o++]<<m,m+=8}e.length+=d&(1<<e.extra)-1,d>>>=e.extra,m-=e.extra,e.back+=e.extra}e.was=e.length,e.mode=gc;case gc:for(;j=e.distcode[d&(1<<e.distbits)-1],k=j>>>24,Z=j>>>16&255,$=j&65535,!(k<=m);){if(l===0)break t;l--,d+=i[o++]<<m,m+=8}if((Z&240)===0){for(M=k,lt=Z,_t=$;j=e.distcode[_t+((d&(1<<M+lt)-1)>>M)],k=j>>>24,Z=j>>>16&255,$=j&65535,!(M+k<=m);){if(l===0)break t;l--,d+=i[o++]<<m,m+=8}d>>>=M,m-=M,e.back+=M}if(d>>>=k,m-=k,e.back+=k,Z&64){t.msg="invalid distance code",e.mode=Be;break}e.offset=$,e.extra=Z&15,e.mode=mc;case mc:if(e.extra){for(N=e.extra;m<N;){if(l===0)break t;l--,d+=i[o++]<<m,m+=8}e.offset+=d&(1<<e.extra)-1,d>>>=e.extra,m-=e.extra,e.back+=e.extra}if(e.offset>e.dmax){t.msg="invalid distance too far back",e.mode=Be;break}e.mode=bc;case bc:if(f===0)break t;if(p=L-f,e.offset>p){if(p=e.offset-p,p>e.whave&&e.sane){t.msg="invalid distance too far back",e.mode=Be;break}p>e.wnext?(p-=e.wnext,T=e.wsize-p):T=e.wnext-p,p>e.length&&(p=e.length),O=e.window}else O=a,T=c-e.offset,p=e.length;p>f&&(p=f),f-=p,e.length-=p;do a[c++]=O[T++];while(--p);e.length===0&&(e.mode=es);break;case vc:if(f===0)break t;a[c++]=e.length,f--,e.mode=es;break;case pl:if(e.wrap){for(;m<32;){if(l===0)break t;l--,d|=i[o++]<<m,m+=8}if(L-=f,t.total_out+=L,e.total+=L,e.wrap&4&&L&&(t.adler=e.check=e.flags?on(e.check,a,L,c-L):lo(e.check,a,L,c-L)),L=f,e.wrap&4&&(e.flags?d:yc(d))!==e.check){t.msg="incorrect data check",e.mode=Be;break}d=0,m=0}e.mode=wc;case wc:if(e.wrap&&e.flags){for(;m<32;){if(l===0)break t;l--,d+=i[o++]<<m,m+=8}if(e.wrap&4&&d!==(e.total&4294967295)){t.msg="incorrect length check",e.mode=Be;break}d=0,m=0}e.mode=_c;case _c:tt=V2;break t;case Be:tt=Lf;break t;case kf:return Sf;case Pf:default:return Jn}return t.next_out=c,t.avail_out=f,t.next_in=o,t.avail_in=l,e.hold=d,e.bits=m,(e.wsize||L!==t.avail_out&&e.mode<Be&&(e.mode<pl||n!==Jh))&&Of(t,t.output,t.next_out,L-t.avail_out),A-=t.avail_in,L-=t.avail_out,t.total_in+=A,t.total_out+=L,e.total+=L,e.wrap&4&&L&&(t.adler=e.check=e.flags?on(e.check,a,L,t.next_out-L):lo(e.check,a,L,t.next_out-L)),t.data_type=e.bits+(e.last?64:0)+(e.mode===Ui?128:0)+(e.mode===ts||e.mode===dl?256:0),(A===0&&L===0||n===Jh)&&tt===Mr&&(tt=$2),tt},i0=t=>{if(qr(t))return Jn;let n=t.state;return n.window&&(n.window=null),t.state=null,Mr},r0=(t,n)=>{if(qr(t))return Jn;const e=t.state;return(e.wrap&2)===0?Jn:(e.head=n,n.done=!1,Mr)},a0=(t,n)=>{const e=n.length;let i,a,o;return qr(t)||(i=t.state,i.wrap!==0&&i.mode!==gs)?Jn:i.mode===gs&&(a=1,a=lo(a,n,e,0),a!==i.check)?Lf:(o=Of(t,n,e,e),o?(i.mode=kf,Sf):(i.havedict=1,Mr))};var o0=If,s0=Cf,l0=Ef,h0=t0,c0=Ff,f0=n0,u0=i0,d0=r0,p0=a0,g0="pako inflate (from Nodeca project)",zi={inflateReset:o0,inflateReset2:s0,inflateResetKeep:l0,inflateInit:h0,inflateInit2:c0,inflate:f0,inflateEnd:u0,inflateGetHeader:d0,inflateSetDictionary:p0,inflateInfo:g0};function m0(){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 b0=m0;const Tf=Object.prototype.toString,{Z_NO_FLUSH:v0,Z_FINISH:w0,Z_OK:fo,Z_STREAM_END:bl,Z_NEED_DICT:vl,Z_STREAM_ERROR:_0,Z_DATA_ERROR:Ac,Z_MEM_ERROR:y0}=Sa;function mo(t){this.options=ws.assign({chunkSize:1024*64,windowBits:15,to:""},t||{});const n=this.options;n.raw&&n.windowBits>=0&&n.windowBits<16&&(n.windowBits=-n.windowBits,n.windowBits===0&&(n.windowBits=-15)),n.windowBits>=0&&n.windowBits<16&&!(t&&t.windowBits)&&(n.windowBits+=32),n.windowBits>15&&n.windowBits<48&&(n.windowBits&15)===0&&(n.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new yf,this.strm.avail_out=0;let e=zi.inflateInit2(this.strm,n.windowBits);if(e!==fo)throw new Error(Br[e]);if(this.header=new b0,zi.inflateGetHeader(this.strm,this.header),n.dictionary&&(typeof n.dictionary=="string"?n.dictionary=co.string2buf(n.dictionary):Tf.call(n.dictionary)==="[object ArrayBuffer]"&&(n.dictionary=new Uint8Array(n.dictionary)),n.raw&&(e=zi.inflateSetDictionary(this.strm,n.dictionary),e!==fo)))throw new Error(Br[e])}mo.prototype.push=function(t,n){const e=this.strm,i=this.options.chunkSize,a=this.options.dictionary;let o,c,l;if(this.ended)return!1;for(n===~~n?c=n:c=n===!0?w0:v0,Tf.call(t)==="[object ArrayBuffer]"?e.input=new Uint8Array(t):e.input=t,e.next_in=0,e.avail_in=e.input.length;;){for(e.avail_out===0&&(e.output=new Uint8Array(i),e.next_out=0,e.avail_out=i),o=zi.inflate(e,c),o===vl&&a&&(o=zi.inflateSetDictionary(e,a),o===fo?o=zi.inflate(e,c):o===Ac&&(o=vl));e.avail_in>0&&o===bl&&e.state.wrap>0&&t[e.next_in]!==0;)zi.inflateReset(e),o=zi.inflate(e,c);switch(o){case _0:case Ac:case vl:case y0:return this.onEnd(o),this.ended=!0,!1}if(l=e.avail_out,e.next_out&&(e.avail_out===0||o===bl))if(this.options.to==="string"){let f=co.utf8border(e.output,e.next_out),d=e.next_out-f,m=co.buf2string(e.output,f);e.next_out=d,e.avail_out=i-d,d&&e.output.set(e.output.subarray(f,f+d),0),this.onData(m)}else this.onData(e.output.length===e.next_out?e.output:e.output.subarray(0,e.next_out));if(!(o===fo&&l===0)){if(o===bl)return o=zi.inflateEnd(this.strm),this.onEnd(o),this.ended=!0,!0;if(e.avail_in===0)break}}return!0};mo.prototype.onData=function(t){this.chunks.push(t)};mo.prototype.onEnd=function(t){t===fo&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=ws.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};function Xl(t,n){const e=new mo(n);if(e.push(t),e.err)throw e.msg||Br[e.err];return e.result}function x0(t,n){return n=n||{},n.raw=!0,Xl(t,n)}var A0=mo,N0=Xl,L0=x0,S0=Xl,k0=Sa,P0={Inflate:A0,inflate:N0,inflateRaw:L0,ungzip:S0,constants:k0};const{Deflate:$5,deflate:Y5,deflateRaw:K5,gzip:X5}=j2,{Inflate:E0,inflate:I0,inflateRaw:J5,ungzip:Q5}=P0;var Nc=E0,C0=I0;const Rf=[];for(let t=0;t<256;t++){let n=t;for(let e=0;e<8;e++)n&1?n=3988292384^n>>>1:n=n>>>1;Rf[t]=n}const Lc=4294967295;function F0(t,n,e){let i=t;for(let a=0;a<e;a++)i=Rf[(i^n[a])&255]^i>>>8;return i}function O0(t,n){return(F0(Lc,t,n)^Lc)>>>0}function Sc(t,n,e){const i=t.readUint32(),a=O0(new Uint8Array(t.buffer,t.byteOffset+t.offset-n-4,n),n);if(a!==i)throw new Error(`CRC mismatch for chunk ${e}. Expected ${i}, found ${a}`)}function jf(t,n,e){for(let i=0;i<e;i++)n[i]=t[i]}function Bf(t,n,e,i){let a=0;for(;a<i;a++)n[a]=t[a];for(;a<e;a++)n[a]=t[a]+n[a-i]&255}function Df(t,n,e,i){let a=0;if(e.length===0)for(;a<i;a++)n[a]=t[a];else for(;a<i;a++)n[a]=t[a]+e[a]&255}function Mf(t,n,e,i,a){let o=0;if(e.length===0){for(;o<a;o++)n[o]=t[o];for(;o<i;o++)n[o]=t[o]+(n[o-a]>>1)&255}else{for(;o<a;o++)n[o]=t[o]+(e[o]>>1)&255;for(;o<i;o++)n[o]=t[o]+(n[o-a]+e[o]>>1)&255}}function Uf(t,n,e,i,a){let o=0;if(e.length===0){for(;o<a;o++)n[o]=t[o];for(;o<i;o++)n[o]=t[o]+n[o-a]&255}else{for(;o<a;o++)n[o]=t[o]+e[o]&255;for(;o<i;o++)n[o]=t[o]+T0(n[o-a],e[o],e[o-a])&255}}function T0(t,n,e){const i=t+n-e,a=Math.abs(i-t),o=Math.abs(i-n),c=Math.abs(i-e);return a<=o&&a<=c?t:o<=c?n:e}function R0(t,n,e,i,a,o){switch(t){case 0:jf(n,e,a);break;case 1:Bf(n,e,a,o);break;case 2:Df(n,e,i,a);break;case 3:Mf(n,e,i,a,o);break;case 4:Uf(n,e,i,a,o);break;default:throw new Error(`Unsupported filter: ${t}`)}}const j0=new Uint16Array([255]),B0=new Uint8Array(j0.buffer),D0=B0[0]===255;function M0(t){const{data:n,width:e,height:i,channels:a,depth:o}=t,c=[{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}],l=Math.ceil(o/8)*a,f=new Uint8Array(i*e*l);let d=0;for(let m=0;m<7;m++){const A=c[m],L=Math.ceil((e-A.x)/A.xStep),p=Math.ceil((i-A.y)/A.yStep);if(L<=0||p<=0)continue;const T=L*l,O=new Uint8Array(T);for(let j=0;j<p;j++){const k=n[d++],Z=n.subarray(d,d+T);d+=T;const $=new Uint8Array(T);R0(k,Z,$,O,T,l),O.set($);for(let M=0;M<L;M++){const lt=A.x+M*A.xStep,_t=A.y+j*A.yStep;if(!(lt>=e||_t>=i))for(let mt=0;mt<l;mt++)f[(_t*e+lt)*l+mt]=$[M*l+mt]}}}if(o===16){const m=new Uint16Array(f.buffer);if(D0)for(let A=0;A<m.length;A++)m[A]=U0(m[A]);return m}else return f}function U0(t){return(t&255)<<8|t>>8&255}const q0=new Uint16Array([255]),z0=new Uint8Array(q0.buffer),H0=z0[0]===255,W0=new Uint8Array(0);function kc(t){const{data:n,width:e,height:i,channels:a,depth:o}=t,c=Math.ceil(o/8)*a,l=Math.ceil(o/8*a*e),f=new Uint8Array(i*l);let d=W0,m=0,A,L;for(let p=0;p<i;p++){switch(A=n.subarray(m+1,m+1+l),L=f.subarray(p*l,(p+1)*l),n[m]){case 0:jf(A,L,l);break;case 1:Bf(A,L,l,c);break;case 2:Df(A,L,d,l);break;case 3:Mf(A,L,d,l,c);break;case 4:Uf(A,L,d,l,c);break;default:throw new Error(`Unsupported filter: ${n[m]}`)}d=L,m+=l+1}if(o===16){const p=new Uint16Array(f.buffer);if(H0)for(let T=0;T<p.length;T++)p[T]=G0(p[T]);return p}else return f}function G0(t){return(t&255)<<8|t>>8&255}const ss=Uint8Array.of(137,80,78,71,13,10,26,10);function Pc(t){if(!V0(t.readBytes(ss.length)))throw new Error("wrong PNG signature")}function V0(t){if(t.length<ss.length)return!1;for(let n=0;n<ss.length;n++)if(t[n]!==ss[n])return!1;return!0}const Z0="tEXt",$0=0,qf=new TextDecoder("latin1");function Y0(t){if(X0(t),t.length===0||t.length>79)throw new Error("keyword length must be between 1 and 79")}const K0=/^[\u0000-\u00FF]*$/;function X0(t){if(!K0.test(t))throw new Error("invalid latin1 text")}function J0(t,n,e){const i=zf(n);t[i]=Q0(n,e-i.length-1)}function zf(t){for(t.mark();t.readByte()!==$0;);const n=t.offset;t.reset();const e=qf.decode(t.readBytes(n-t.offset-1));return t.skip(1),Y0(e),e}function Q0(t,n){return qf.decode(t.readBytes(n))}const qn={UNKNOWN:-1,GREYSCALE:0,TRUECOLOUR:2,INDEXED_COLOUR:3,GREYSCALE_ALPHA:4,TRUECOLOUR_ALPHA:6},wl={UNKNOWN:-1,DEFLATE:0},Ec={UNKNOWN:-1,ADAPTIVE:0},_l={UNKNOWN:-1,NO_INTERLACE:0,ADAM7:1},ns={NONE:0,BACKGROUND:1,PREVIOUS:2},yl={SOURCE:0,OVER:1};class t5 extends Wl{constructor(e,i={}){super(e);Ae(this,"_checkCrc");Ae(this,"_inflator");Ae(this,"_png");Ae(this,"_apng");Ae(this,"_end");Ae(this,"_hasPalette");Ae(this,"_palette");Ae(this,"_hasTransparency");Ae(this,"_transparency");Ae(this,"_compressionMethod");Ae(this,"_filterMethod");Ae(this,"_interlaceMethod");Ae(this,"_colorType");Ae(this,"_isAnimated");Ae(this,"_numberOfFrames");Ae(this,"_numberOfPlays");Ae(this,"_frames");Ae(this,"_writingDataChunks");const{checkCrc:a=!1}=i;this._checkCrc=a,this._inflator=new Nc,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=wl.UNKNOWN,this._filterMethod=Ec.UNKNOWN,this._interlaceMethod=_l.UNKNOWN,this._colorType=qn.UNKNOWN,this._isAnimated=!1,this._numberOfFrames=1,this._numberOfPlays=0,this._frames=[],this._writingDataChunks=!1,this.setBigEndian()}decode(){for(Pc(this);!this._end;){const e=this.readUint32(),i=this.readChars(4);this.decodeChunk(e,i)}return this.decodeImage(),this._png}decodeApng(){for(Pc(this);!this._end;){const e=this.readUint32(),i=this.readChars(4);this.decodeApngChunk(e,i)}return this.decodeApngImage(),this._apng}decodeChunk(e,i){const a=this.offset;switch(i){case"IHDR":this.decodeIHDR();break;case"PLTE":this.decodePLTE(e);break;case"IDAT":this.decodeIDAT(e);break;case"IEND":this._end=!0;break;case"tRNS":this.decodetRNS(e);break;case"iCCP":this.decodeiCCP(e);break;case Z0:J0(this._png.text,this,e);break;case"pHYs":this.decodepHYs();break;default:this.skip(e);break}if(this.offset-a!==e)throw new Error(`Length mismatch while decoding chunk ${i}`);this._checkCrc?Sc(this,e+4,i):this.skip(4)}decodeApngChunk(e,i){const a=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(e);break;default:this.decodeChunk(e,i),this.offset=a+e;break}if(this.offset-a!==e)throw new Error(`Length mismatch while decoding chunk ${i}`);this._checkCrc?Sc(this,e+4,i):this.skip(4)}decodeIHDR(){const e=this._png;e.width=this.readUint32(),e.height=this.readUint32(),e.depth=e5(this.readUint8());const i=this.readUint8();this._colorType=i;let a;switch(i){case qn.GREYSCALE:a=1;break;case qn.TRUECOLOUR:a=3;break;case qn.INDEXED_COLOUR:a=1;break;case qn.GREYSCALE_ALPHA:a=2;break;case qn.TRUECOLOUR_ALPHA:a=4;break;case qn.UNKNOWN:default:throw new Error(`Unknown color type: ${i}`)}if(this._png.channels=a,this._compressionMethod=this.readUint8(),this._compressionMethod!==wl.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 e={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(e)}decodePLTE(e){if(e%3!==0)throw new RangeError(`PLTE field length must be a multiple of 3. Got ${e}`);const i=e/3;this._hasPalette=!0;const a=[];this._palette=a;for(let o=0;o<i;o++)a.push([this.readUint8(),this.readUint8(),this.readUint8()])}decodeIDAT(e){this._writingDataChunks=!0;const i=e,a=this.offset+this.byteOffset;if(this._inflator.push(new Uint8Array(this.buffer,a,i)),this._inflator.err)throw new Error(`Error while decompressing the data: ${this._inflator.err}`);this.skip(e)}decodeFDAT(e){this._writingDataChunks=!0;let i=e,a=this.offset+this.byteOffset;if(a+=4,i-=4,this._inflator.push(new Uint8Array(this.buffer,a,i)),this._inflator.err)throw new Error(`Error while decompressing the data: ${this._inflator.err}`);this.skip(e)}decodetRNS(e){switch(this._colorType){case qn.GREYSCALE:case qn.TRUECOLOUR:{if(e%2!==0)throw new RangeError(`tRNS chunk length must be a multiple of 2. Got ${e}`);if(e/2>this._png.width*this._png.height)throw new Error(`tRNS chunk contains more alpha values than there are pixels (${e/2} vs ${this._png.width*this._png.height})`);this._hasTransparency=!0,this._transparency=new Uint16Array(e/2);for(let i=0;i<e/2;i++)this._transparency[i]=this.readUint16();break}case qn.INDEXED_COLOUR:{if(e>this._palette.length)throw new Error(`tRNS chunk contains more alpha values than there are palette colors (${e} vs ${this._palette.length})`);let i=0;for(;i<e;i++){const a=this.readByte();this._palette[i].push(a)}for(;i<this._palette.length;i++)this._palette[i].push(255);break}case qn.UNKNOWN:case qn.GREYSCALE_ALPHA:case qn.TRUECOLOUR_ALPHA:default:throw new Error(`tRNS chunk is not supported for color type ${this._colorType}`)}}decodeiCCP(e){const i=zf(this),a=this.readUint8();if(a!==wl.DEFLATE)throw new Error(`Unsupported iCCP compression method: ${a}`);const o=this.readBytes(e-i.length-2);this._png.iccEmbeddedProfile={name:i,profile:C0(o)}}decodepHYs(){const e=this.readUint32(),i=this.readUint32(),a=this.readByte();this._png.resolution={x:e,y:i,unit:a}}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 e=0;e<this._numberOfFrames;e++){const i={sequenceNumber:this._frames[e].sequenceNumber,delayNumber:this._frames[e].delayNumber,delayDenominator:this._frames[e].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)},a=this._frames.at(e);if(a){if(a.data=kc({data:a.data,width:a.width,height:a.height,channels:this._apng.channels,depth:this._apng.depth}),this._hasPalette&&(this._apng.palette=this._palette),this._hasTransparency&&(this._apng.transparency=this._transparency),e===0||a.xOffset===0&&a.yOffset===0&&a.width===this._png.width&&a.height===this._png.height)i.data=a.data;else{const o=this._apng.frames.at(e-1);this.disposeFrame(a,o,i),this.addFrameDataToCanvas(i,a)}this._apng.frames.push(i)}}return this._apng}disposeFrame(e,i,a){switch(e.disposeOp){case ns.NONE:break;case ns.BACKGROUND:for(let o=0;o<this._png.height;o++)for(let c=0;c<this._png.width;c++){const l=(o*e.width+c)*this._png.channels;for(let f=0;f<this._png.channels;f++)a.data[l+f]=0}break;case ns.PREVIOUS:a.data.set(i.data);break;default:throw new Error("Unknown disposeOp")}}addFrameDataToCanvas(e,i){const a=1<<this._png.depth,o=(c,l)=>{const f=((c+i.yOffset)*this._png.width+i.xOffset+l)*this._png.channels,d=(c*i.width+l)*this._png.channels;return{index:f,frameIndex:d}};switch(i.blendOp){case yl.SOURCE:for(let c=0;c<i.height;c++)for(let l=0;l<i.width;l++){const{index:f,frameIndex:d}=o(c,l);for(let m=0;m<this._png.channels;m++)e.data[f+m]=i.data[d+m]}break;case yl.OVER:for(let c=0;c<i.height;c++)for(let l=0;l<i.width;l++){const{index:f,frameIndex:d}=o(c,l);for(let m=0;m<this._png.channels;m++){const A=i.data[d+this._png.channels-1]/a,L=m%(this._png.channels-1)===0?1:i.data[d+m],p=Math.floor(A*L+(1-A)*e.data[f+m]);e.data[f+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 e=this._isAnimated?((i=this._frames)==null?void 0:i.at(0)).data:this._inflator.result;if(this._filterMethod!==Ec.ADAPTIVE)throw new Error(`Filter method ${this._filterMethod} not supported`);if(this._interlaceMethod===_l.NO_INTERLACE)this._png.data=kc({data:e,width:this._png.width,height:this._png.height,channels:this._png.channels,depth:this._png.depth});else if(this._interlaceMethod===_l.ADAM7)this._png.data=M0({data:e,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 e=this._inflator.result,i=this._frames.at(-1);i?i.data=e:this._frames.push({sequenceNumber:0,width:this._png.width,height:this._png.height,xOffset:0,yOffset:0,delayNumber:0,delayDenominator:0,disposeOp:ns.NONE,blendOp:yl.SOURCE,data:e}),this._inflator=new Nc,this._writingDataChunks=!1}}function e5(t){if(t!==1&&t!==2&&t!==4&&t!==8&&t!==16)throw new Error(`invalid bit depth: ${t}`);return t}var Ic;(function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.METRE=1]="METRE"})(Ic||(Ic={}));function n5(t,n){return new t5(t,n).decode()}var Yt=(function(){return typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:this})();function xl(){Yt.console&&typeof Yt.console.log=="function"&&Yt.console.log.apply(Yt.console,arguments)}var ke={log:xl,warn:function(t){Yt.console&&(typeof Yt.console.warn=="function"?Yt.console.warn.apply(Yt.console,arguments):xl.call(null,arguments))},error:function(t){Yt.console&&(typeof Yt.console.error=="function"?Yt.console.error.apply(Yt.console,arguments):xl(t))}};function Al(t,n,e){var i=new XMLHttpRequest;i.open("GET",t),i.responseType="blob",i.onload=function(){Cr(i.response,n,e)},i.onerror=function(){ke.error("could not download file")},i.send()}function Cc(t){var n=new XMLHttpRequest;n.open("HEAD",t,!1);try{n.send()}catch(e){}return n.status>=200&&n.status<=299}function is(t){try{t.dispatchEvent(new MouseEvent("click"))}catch(e){var n=document.createEvent("MouseEvents");n.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),t.dispatchEvent(n)}}var Cr=Yt.saveAs||((typeof window=="undefined"?"undefined":Pe(window))!=="object"||window!==Yt?function(){}:typeof HTMLAnchorElement!="undefined"&&"download"in HTMLAnchorElement.prototype?function(t,n,e){var i=Yt.URL||Yt.webkitURL,a=document.createElement("a");n=n||t.name||"download",a.download=n,a.rel="noopener",typeof t=="string"?(a.href=t,a.origin!==location.origin?Cc(a.href)?Al(t,n,e):is(a,a.target="_blank"):is(a)):(a.href=i.createObjectURL(t),setTimeout(function(){i.revokeObjectURL(a.href)},4e4),setTimeout(function(){is(a)},0))}:"msSaveOrOpenBlob"in navigator?function(t,n,e){if(n=n||t.name||"download",typeof t=="string")if(Cc(t))Al(t,n,e);else{var i=document.createElement("a");i.href=t,i.target="_blank",setTimeout(function(){is(i)})}else navigator.msSaveOrOpenBlob((function(a,o){return o===void 0?o={autoBom:!1}:Pe(o)!=="object"&&(ke.warn("Deprecated: Expected third argument to be a object"),o={autoBom:!o}),o.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(a.type)?new Blob(["\uFEFF",a],{type:a.type}):a})(t,e),n)}:function(t,n,e,i){if((i=i||open("","_blank"))&&(i.document.title=i.document.body.innerText="downloading..."),typeof t=="string")return Al(t,n,e);var a=t.type==="application/octet-stream",o=/constructor/i.test(Yt.HTMLElement)||Yt.safari,c=/CriOS\/[\d]+/.test(navigator.userAgent);if((c||a&&o)&&(typeof FileReader=="undefined"?"undefined":Pe(FileReader))==="object"){var l=new FileReader;l.onloadend=function(){var m=l.result;m=c?m:m.replace(/^data:[^;]*;/,"data:attachment/file;"),i?i.location.href=m:location=m,i=null},l.readAsDataURL(t)}else{var f=Yt.URL||Yt.webkitURL,d=f.createObjectURL(t);i?i.location=d:location.href=d,i=null,setTimeout(function(){f.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 Hf(t){var n;t=t||"",this.ok=!1,t.charAt(0)=="#"&&(t=t.substr(1,6)),t={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"}[t=(t=t.replace(/ /g,"")).toLowerCase()]||t;for(var e=[{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(l){return[parseInt(l[1]),parseInt(l[2]),parseInt(l[3])]}},{re:/^(\w{2})(\w{2})(\w{2})$/,example:["#00ff00","336699"],process:function(l){return[parseInt(l[1],16),parseInt(l[2],16),parseInt(l[3],16)]}},{re:/^(\w{1})(\w{1})(\w{1})$/,example:["#fb0","f0f"],process:function(l){return[parseInt(l[1]+l[1],16),parseInt(l[2]+l[2],16),parseInt(l[3]+l[3],16)]}}],i=0;i<e.length;i++){var a=e[i].re,o=e[i].process,c=a.exec(t);c&&(n=o(c),this.r=n[0],this.g=n[1],this.b=n[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 l=this.r.toString(16),f=this.g.toString(16),d=this.b.toString(16);return l.length==1&&(l="0"+l),f.length==1&&(f="0"+f),d.length==1&&(d="0"+d),"#"+l+f+d}}var ls=Yt.atob.bind(Yt),Fc=Yt.btoa.bind(Yt);/**
|
||
* @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 Nl(t,n){var e=t[0],i=t[1],a=t[2],o=t[3];e=wn(e,i,a,o,n[0],7,-680876936),o=wn(o,e,i,a,n[1],12,-389564586),a=wn(a,o,e,i,n[2],17,606105819),i=wn(i,a,o,e,n[3],22,-1044525330),e=wn(e,i,a,o,n[4],7,-176418897),o=wn(o,e,i,a,n[5],12,1200080426),a=wn(a,o,e,i,n[6],17,-1473231341),i=wn(i,a,o,e,n[7],22,-45705983),e=wn(e,i,a,o,n[8],7,1770035416),o=wn(o,e,i,a,n[9],12,-1958414417),a=wn(a,o,e,i,n[10],17,-42063),i=wn(i,a,o,e,n[11],22,-1990404162),e=wn(e,i,a,o,n[12],7,1804603682),o=wn(o,e,i,a,n[13],12,-40341101),a=wn(a,o,e,i,n[14],17,-1502002290),e=_n(e,i=wn(i,a,o,e,n[15],22,1236535329),a,o,n[1],5,-165796510),o=_n(o,e,i,a,n[6],9,-1069501632),a=_n(a,o,e,i,n[11],14,643717713),i=_n(i,a,o,e,n[0],20,-373897302),e=_n(e,i,a,o,n[5],5,-701558691),o=_n(o,e,i,a,n[10],9,38016083),a=_n(a,o,e,i,n[15],14,-660478335),i=_n(i,a,o,e,n[4],20,-405537848),e=_n(e,i,a,o,n[9],5,568446438),o=_n(o,e,i,a,n[14],9,-1019803690),a=_n(a,o,e,i,n[3],14,-187363961),i=_n(i,a,o,e,n[8],20,1163531501),e=_n(e,i,a,o,n[13],5,-1444681467),o=_n(o,e,i,a,n[2],9,-51403784),a=_n(a,o,e,i,n[7],14,1735328473),e=yn(e,i=_n(i,a,o,e,n[12],20,-1926607734),a,o,n[5],4,-378558),o=yn(o,e,i,a,n[8],11,-2022574463),a=yn(a,o,e,i,n[11],16,1839030562),i=yn(i,a,o,e,n[14],23,-35309556),e=yn(e,i,a,o,n[1],4,-1530992060),o=yn(o,e,i,a,n[4],11,1272893353),a=yn(a,o,e,i,n[7],16,-155497632),i=yn(i,a,o,e,n[10],23,-1094730640),e=yn(e,i,a,o,n[13],4,681279174),o=yn(o,e,i,a,n[0],11,-358537222),a=yn(a,o,e,i,n[3],16,-722521979),i=yn(i,a,o,e,n[6],23,76029189),e=yn(e,i,a,o,n[9],4,-640364487),o=yn(o,e,i,a,n[12],11,-421815835),a=yn(a,o,e,i,n[15],16,530742520),e=xn(e,i=yn(i,a,o,e,n[2],23,-995338651),a,o,n[0],6,-198630844),o=xn(o,e,i,a,n[7],10,1126891415),a=xn(a,o,e,i,n[14],15,-1416354905),i=xn(i,a,o,e,n[5],21,-57434055),e=xn(e,i,a,o,n[12],6,1700485571),o=xn(o,e,i,a,n[3],10,-1894986606),a=xn(a,o,e,i,n[10],15,-1051523),i=xn(i,a,o,e,n[1],21,-2054922799),e=xn(e,i,a,o,n[8],6,1873313359),o=xn(o,e,i,a,n[15],10,-30611744),a=xn(a,o,e,i,n[6],15,-1560198380),i=xn(i,a,o,e,n[13],21,1309151649),e=xn(e,i,a,o,n[4],6,-145523070),o=xn(o,e,i,a,n[11],10,-1120210379),a=xn(a,o,e,i,n[2],15,718787259),i=xn(i,a,o,e,n[9],21,-343485551),t[0]=sr(e,t[0]),t[1]=sr(i,t[1]),t[2]=sr(a,t[2]),t[3]=sr(o,t[3])}function ys(t,n,e,i,a,o){return n=sr(sr(n,t),sr(i,o)),sr(n<<a|n>>>32-a,e)}function wn(t,n,e,i,a,o,c){return ys(n&e|~n&i,t,n,a,o,c)}function _n(t,n,e,i,a,o,c){return ys(n&i|e&~i,t,n,a,o,c)}function yn(t,n,e,i,a,o,c){return ys(n^e^i,t,n,a,o,c)}function xn(t,n,e,i,a,o,c){return ys(e^(n|~i),t,n,a,o,c)}function Wf(t){var n,e=t.length,i=[1732584193,-271733879,-1732584194,271733878];for(n=64;n<=t.length;n+=64)Nl(i,i5(t.substring(n-64,n)));t=t.substring(n-64);var a=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(n=0;n<t.length;n++)a[n>>2]|=t.charCodeAt(n)<<(n%4<<3);if(a[n>>2]|=128<<(n%4<<3),n>55)for(Nl(i,a),n=0;n<16;n++)a[n]=0;return a[14]=8*e,Nl(i,a),i}function i5(t){var n,e=[];for(n=0;n<64;n+=4)e[n>>2]=t.charCodeAt(n)+(t.charCodeAt(n+1)<<8)+(t.charCodeAt(n+2)<<16)+(t.charCodeAt(n+3)<<24);return e}var Oc="0123456789abcdef".split("");function r5(t){for(var n="",e=0;e<4;e++)n+=Oc[t>>8*e+4&15]+Oc[t>>8*e&15];return n}function a5(t){return String.fromCharCode(255&t,(65280&t)>>8,(16711680&t)>>16,(4278190080&t)>>24)}function Ul(t){return Wf(t).map(a5).join("")}var o5=(function(t){for(var n=0;n<t.length;n++)t[n]=r5(t[n]);return t.join("")})(Wf("hello"))!="5d41402abc4b2a76b9719d911017c592";function sr(t,n){if(o5){var e=(65535&t)+(65535&n);return(t>>16)+(n>>16)+(e>>16)<<16|65535&e}return t+n&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 ql(t,n){var e,i,a,o;if(t!==e){for(var c=(a=t,o=1+(256/t.length|0),new Array(o+1).join(a)),l=[],f=0;f<256;f++)l[f]=f;var d=0;for(f=0;f<256;f++){var m=l[f];d=(d+m+c.charCodeAt(f))%256,l[f]=l[d],l[d]=m}e=t,i=l}else l=i;var A=n.length,L=0,p=0,T="";for(f=0;f<A;f++)p=(p+(m=l[L=(L+1)%256]))%256,l[L]=l[p],l[p]=m,c=l[(l[L]+l[p])%256],T+=String.fromCharCode(n.charCodeAt(f)^c);return T}/**
|
||
* @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 Tc={print:4,modify:8,copy:16,"annot-forms":32};function ga(t,n,e,i){this.v=1,this.r=2;var a=192;t.forEach(function(l){if(Tc.perm!==void 0)throw new Error("Invalid permission: "+l);a+=Tc[l]}),this.padding="(¿N^NuAd\0NVÿú\b..\0¶Ðh>/\f©þdSiz";var o=(n+this.padding).substr(0,32),c=(e+this.padding).substr(0,32);this.O=this.processOwnerPassword(o,c),this.P=-(1+(255^a)),this.encryptionKey=Ul(o+this.O+this.lsbFirstWord(this.P)+this.hexToBytes(i)).substr(0,5),this.U=ql(this.encryptionKey,this.padding)}function ma(t){if(/[^\u0000-\u00ff]/.test(t))throw new Error("Invalid PDF Name Object: "+t+", Only accept ASCII characters.");for(var n="",e=t.length,i=0;i<e;i++){var a=t.charCodeAt(i);n+=a<33||a===35||a===37||a===40||a===41||a===47||a===60||a===62||a===91||a===93||a===123||a===125||a>126?"#"+("0"+a.toString(16)).slice(-2):t[i]}return n}function Rc(t){if(Pe(t)!=="object")throw new Error("Invalid Context passed to initialize PubSub (jsPDF-module)");var n={};this.subscribe=function(e,i,a){if(a=a||!1,typeof e!="string"||typeof i!="function"||typeof a!="boolean")throw new Error("Invalid arguments passed to PubSub.subscribe (jsPDF-module)");n.hasOwnProperty(e)||(n[e]={});var o=Math.random().toString(35);return n[e][o]=[i,!!a],o},this.unsubscribe=function(e){for(var i in n)if(n[i][e])return delete n[i][e],Object.keys(n[i]).length===0&&delete n[i],!0;return!1},this.publish=function(e){if(n.hasOwnProperty(e)){var i=Array.prototype.slice.call(arguments,1),a=[];for(var o in n[e]){var c=n[e][o];try{c[0].apply(t,i)}catch(l){Yt.console&&ke.error("jsPDF PubSub Error",l.message,l)}c[1]&&a.push(o)}a.length&&a.forEach(this.unsubscribe)}},this.getTopics=function(){return n}}function ms(t){if(!(this instanceof ms))return new ms(t);var n="opacity,stroke-opacity".split(",");for(var e in t)t.hasOwnProperty(e)&&n.indexOf(e)>=0&&(this[e]=t[e]);this.id="",this.objectNumber=-1}function Gf(t,n){this.gState=t,this.matrix=n,this.id="",this.objectNumber=-1}function Fr(t,n,e,i,a){if(!(this instanceof Fr))return new Fr(t,n,e,i,a);this.type=t==="axial"?2:3,this.coords=n,this.colors=e,Gf.call(this,i,a)}function ba(t,n,e,i,a){if(!(this instanceof ba))return new ba(t,n,e,i,a);this.boundingBox=t,this.xStep=n,this.yStep=e,this.stream="",this.cloneIndex=0,Gf.call(this,i,a)}function Dt(t){var n,e=typeof arguments[0]=="string"?arguments[0]:"p",i=arguments[1],a=arguments[2],o=arguments[3],c=[],l=1,f=16,d="S",m=null;Pe(t=t||{})==="object"&&(e=t.orientation,i=t.unit||i,a=t.format||a,o=t.compress||t.compressPdf||o,(m=t.encryption||null)!==null&&(m.userPassword=m.userPassword||"",m.ownerPassword=m.ownerPassword||"",m.userPermissions=m.userPermissions||[]),l=typeof t.userUnit=="number"?Math.abs(t.userUnit):1,t.precision!==void 0&&(n=t.precision),t.floatPrecision!==void 0&&(f=t.floatPrecision),d=t.defaultPathOperation||"S"),c=t.filters||(o===!0?["FlateEncode"]:c),i=i||"mm",e=(""+(e||"P")).toLowerCase();var A=t.putOnlyUsedFonts||!1,L={},p={internal:{},__private__:{}};p.__private__.PubSub=Rc;var T="1.3",O=p.__private__.getPdfVersion=function(){return T};p.__private__.setPdfVersion=function(h){T=h};var j={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 j};var k=p.__private__.getPageFormat=function(h){return j[h]};a=a||"a4";var Z="compat",$="advanced",M=Z;function lt(){this.saveGraphicsState(),P(new Vt(ne,0,0,-ne,0,vr()*ne).toString()+" cm"),this.setFontSize(this.getFontSize()/ne),d="n",M=$}function _t(){this.restoreGraphicsState(),d="S",M=Z}var mt=p.__private__.combineFontStyleAndFontWeight=function(h,b){if(h=="bold"&&b=="normal"||h=="bold"&&b==400||h=="normal"&&b=="italic"||h=="bold"&&b=="italic")throw new Error("Invalid Combination of fontweight and fontstyle");return b&&(h=b==400||b==="normal"?h==="italic"?"italic":"normal":b!=700&&b!=="bold"||h!=="normal"?(b==700?"bold":b)+""+h:"bold"),h};p.advancedAPI=function(h){var b=M===Z;return b&<.call(this),typeof h!="function"||(h(this),b&&_t.call(this)),this},p.compatAPI=function(h){var b=M===$;return b&&_t.call(this),typeof h!="function"||(h(this),b&<.call(this)),this},p.isAdvancedAPI=function(){return M===$};var tt,z=function(h){if(M!==$)throw new Error(h+" is only available in 'advanced' API mode. You need to call advancedAPI() first.")},et=p.roundToPrecision=p.__private__.roundToPrecision=function(h,b){var E=n||b;if(isNaN(h)||isNaN(E))throw new Error("Invalid argument passed to jsPDF.roundToPrecision");return h.toFixed(E).replace(/0+$/,"")};tt=p.hpf=p.__private__.hpf=typeof f=="number"?function(h){if(isNaN(h))throw new Error("Invalid argument passed to jsPDF.hpf");return et(h,f)}:f==="smart"?function(h){if(isNaN(h))throw new Error("Invalid argument passed to jsPDF.hpf");return et(h,h>-1&&h<1?16:5)}:function(h){if(isNaN(h))throw new Error("Invalid argument passed to jsPDF.hpf");return et(h,16)};var N=p.f2=p.__private__.f2=function(h){if(isNaN(h))throw new Error("Invalid argument passed to jsPDF.f2");return et(h,2)},F=p.__private__.f3=function(h){if(isNaN(h))throw new Error("Invalid argument passed to jsPDF.f3");return et(h,3)},U=p.scale=p.__private__.scale=function(h){if(isNaN(h))throw new Error("Invalid argument passed to jsPDF.scale");return M===Z?h*ne:M===$?h:void 0},q=function(h){return U((function(b){return M===Z?vr()-b:M===$?b:void 0})(h))};p.__private__.setPrecision=p.setPrecision=function(h){typeof parseInt(h,10)=="number"&&(n=parseInt(h,10))};var it,ft="00000000000000000000000000000000",pt=p.__private__.getFileId=function(){return ft},nt=p.__private__.setFileId=function(h){return ft=h!==void 0&&/^[a-fA-F0-9]{32}$/.test(h)?h.toUpperCase():ft.split("").map(function(){return"ABCDEF0123456789".charAt(Math.floor(16*Math.random()))}).join(""),m!==null&&(hn=new ga(m.userPermissions,m.userPassword,m.ownerPassword,ft)),ft};p.setFileId=function(h){return nt(h),this},p.getFileId=function(){return pt()};var ut=p.__private__.convertDateToPDFDate=function(h){var b=h.getTimezoneOffset(),E=b<0?"+":"-",D=Math.floor(Math.abs(b/60)),V=Math.abs(b%60),ot=[E,B(D),"'",B(V),"'"].join("");return["D:",h.getFullYear(),B(h.getMonth()+1),B(h.getDate()),B(h.getHours()),B(h.getMinutes()),B(h.getSeconds()),ot].join("")},At=p.__private__.convertPDFDateToDate=function(h){var b=parseInt(h.substr(2,4),10),E=parseInt(h.substr(6,2),10)-1,D=parseInt(h.substr(8,2),10),V=parseInt(h.substr(10,2),10),ot=parseInt(h.substr(12,2),10),gt=parseInt(h.substr(14,2),10);return new Date(b,E,D,V,ot,gt,0)},yt=p.__private__.setCreationDate=function(h){var b;if(h===void 0&&(h=new Date),h instanceof Date)b=ut(h);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(h))throw new Error("Invalid argument passed to jsPDF.setCreationDate");b=h}return it=b},y=p.__private__.getCreationDate=function(h){var b=it;return h==="jsDate"&&(b=At(it)),b};p.setCreationDate=function(h){return yt(h),this},p.getCreationDate=function(h){return y(h)};var R,B=p.__private__.padd2=function(h){return("0"+parseInt(h)).slice(-2)},G=p.__private__.padd2Hex=function(h){return("00"+(h=h.toString())).substr(h.length)},Y=0,Q=[],rt=[],at=0,dt=[],xt=[],St=!1,kt=rt;p.__private__.setCustomOutputDestination=function(h){St=!0,kt=h};var zt=function(h){St||(kt=h)};p.__private__.resetCustomOutputDestination=function(){St=!1,kt=rt};var P=p.__private__.out=function(h){return h=h.toString(),at+=h.length+1,kt.push(h),kt},Lt=p.__private__.write=function(h){return P(arguments.length===1?h.toString():Array.prototype.join.call(arguments," "))},ae=p.__private__.getArrayBuffer=function(h){for(var b=h.length,E=new ArrayBuffer(b),D=new Uint8Array(E);b--;)D[b]=h.charCodeAt(b);return E},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=t.fontSize||16;p.__private__.setFontSize=p.setFontSize=function(h){return vt=M===$?h/ne:h,this};var Wt,Et=p.__private__.getFontSize=p.getFontSize=function(){return M===Z?vt:vt*ne},qt=t.R2L||!1;p.__private__.setR2L=p.setR2L=function(h){return qt=h,this},p.__private__.getR2L=p.getR2L=function(){return qt};var Mt,we=p.__private__.setZoomMode=function(h){if(/^(?:\d+\.\d*|\d*\.\d+|\d+)%$/.test(h))Wt=h;else if(isNaN(h)){if([void 0,null,"fullwidth","fullheight","fullpage","original"].indexOf(h)===-1)throw new Error('zoom must be Integer (e.g. 2), a percentage Value (e.g. 300%) or fullwidth, fullheight, fullpage, original. "'+h+'" is not recognized.');Wt=h}else Wt=parseInt(h,10)};p.__private__.getZoomMode=function(){return Wt};var he,Jt=p.__private__.setPageMode=function(h){if([void 0,null,"UseNone","UseOutlines","UseThumbs","FullScreen"].indexOf(h)==-1)throw new Error('Page mode must be one of UseNone, UseOutlines, UseThumbs, or FullScreen. "'+h+'" is not recognized.');Mt=h};p.__private__.getPageMode=function(){return Mt};var fe=p.__private__.setLayoutMode=function(h){if([void 0,null,"continuous","single","twoleft","tworight","two"].indexOf(h)==-1)throw new Error('Layout mode must be one of continuous, single, twoleft, tworight. "'+h+'" is not recognized.');he=h};p.__private__.getLayoutMode=function(){return he},p.__private__.setDisplayMode=p.setDisplayMode=function(h,b,E){return we(h),fe(b),Jt(E),this};var ce={title:"",subject:"",author:"",keywords:"",creator:""};p.__private__.getDocumentProperty=function(h){if(Object.keys(ce).indexOf(h)===-1)throw new Error("Invalid argument passed to jsPDF.getDocumentProperty");return ce[h]},p.__private__.getDocumentProperties=function(){return ce},p.__private__.setDocumentProperties=p.setProperties=p.setDocumentProperties=function(h){for(var b in ce)ce.hasOwnProperty(b)&&h[b]&&(ce[b]=h[b]);return this},p.__private__.setDocumentProperty=function(h,b){if(Object.keys(ce).indexOf(h)===-1)throw new Error("Invalid arguments passed to jsPDF.setDocumentProperty");return ce[h]=b};var Rt,ne,Bt,We,me,oe={},se={},Re=[],Ut={},Ee={},Zt={},Qt={},je=null,le=0,Gt=[],_e=new Rc(p),ur=t.hotfixes||[],pn={},Si={},hi=[],Vt=function h(b,E,D,V,ot,gt){if(!(this instanceof h))return new h(b,E,D,V,ot,gt);isNaN(b)&&(b=1),isNaN(E)&&(E=0),isNaN(D)&&(D=0),isNaN(V)&&(V=1),isNaN(ot)&&(ot=0),isNaN(gt)&&(gt=0),this._matrix=[b,E,D,V,ot,gt]};Object.defineProperty(Vt.prototype,"sx",{get:function(){return this._matrix[0]},set:function(h){this._matrix[0]=h}}),Object.defineProperty(Vt.prototype,"shy",{get:function(){return this._matrix[1]},set:function(h){this._matrix[1]=h}}),Object.defineProperty(Vt.prototype,"shx",{get:function(){return this._matrix[2]},set:function(h){this._matrix[2]=h}}),Object.defineProperty(Vt.prototype,"sy",{get:function(){return this._matrix[3]},set:function(h){this._matrix[3]=h}}),Object.defineProperty(Vt.prototype,"tx",{get:function(){return this._matrix[4]},set:function(h){this._matrix[4]=h}}),Object.defineProperty(Vt.prototype,"ty",{get:function(){return this._matrix[5]},set:function(h){this._matrix[5]=h}}),Object.defineProperty(Vt.prototype,"a",{get:function(){return this._matrix[0]},set:function(h){this._matrix[0]=h}}),Object.defineProperty(Vt.prototype,"b",{get:function(){return this._matrix[1]},set:function(h){this._matrix[1]=h}}),Object.defineProperty(Vt.prototype,"c",{get:function(){return this._matrix[2]},set:function(h){this._matrix[2]=h}}),Object.defineProperty(Vt.prototype,"d",{get:function(){return this._matrix[3]},set:function(h){this._matrix[3]=h}}),Object.defineProperty(Vt.prototype,"e",{get:function(){return this._matrix[4]},set:function(h){this._matrix[4]=h}}),Object.defineProperty(Vt.prototype,"f",{get:function(){return this._matrix[5]},set:function(h){this._matrix[5]=h}}),Object.defineProperty(Vt.prototype,"rotation",{get:function(){return Math.atan2(this.shx,this.sx)}}),Object.defineProperty(Vt.prototype,"scaleX",{get:function(){return this.decompose().scale.sx}}),Object.defineProperty(Vt.prototype,"scaleY",{get:function(){return this.decompose().scale.sy}}),Object.defineProperty(Vt.prototype,"isIdentity",{get:function(){return this.sx===1&&this.shy===0&&this.shx===0&&this.sy===1&&this.tx===0&&this.ty===0}}),Vt.prototype.join=function(h){return[this.sx,this.shy,this.shx,this.sy,this.tx,this.ty].map(tt).join(h)},Vt.prototype.multiply=function(h){var b=h.sx*this.sx+h.shy*this.shx,E=h.sx*this.shy+h.shy*this.sy,D=h.shx*this.sx+h.sy*this.shx,V=h.shx*this.shy+h.sy*this.sy,ot=h.tx*this.sx+h.ty*this.shx+this.tx,gt=h.tx*this.shy+h.ty*this.sy+this.ty;return new Vt(b,E,D,V,ot,gt)},Vt.prototype.decompose=function(){var h=this.sx,b=this.shy,E=this.shx,D=this.sy,V=this.tx,ot=this.ty,gt=Math.sqrt(h*h+b*b),Ft=(h/=gt)*E+(b/=gt)*D;E-=h*Ft,D-=b*Ft;var Ct=Math.sqrt(E*E+D*D);return Ft/=Ct,h*(D/=Ct)<b*(E/=Ct)&&(h=-h,b=-b,Ft=-Ft,gt=-gt),{scale:new Vt(gt,0,0,Ct,0,0),translate:new Vt(1,0,0,1,V,ot),rotate:new Vt(h,b,-b,h,0,0),skew:new Vt(1,0,Ft,1,0,0)}},Vt.prototype.toString=function(h){return this.join(" ")},Vt.prototype.inversed=function(){var h=this.sx,b=this.shy,E=this.shx,D=this.sy,V=this.tx,ot=this.ty,gt=1/(h*D-b*E),Ft=D*gt,Ct=-b*gt,Kt=-E*gt,te=h*gt;return new Vt(Ft,Ct,Kt,te,-Ft*V-Kt*ot,-Ct*V-te*ot)},Vt.prototype.applyToPoint=function(h){var b=h.x*this.sx+h.y*this.shx+this.tx,E=h.x*this.shy+h.y*this.sy+this.ty;return new br(b,E)},Vt.prototype.applyToRectangle=function(h){var b=this.applyToPoint(h),E=this.applyToPoint(new br(h.x+h.w,h.y+h.h));return new Ba(b.x,b.y,E.x-b.x,E.y-b.y)},Vt.prototype.clone=function(){var h=this.sx,b=this.shy,E=this.shx,D=this.sy,V=this.tx,ot=this.ty;return new Vt(h,b,E,D,V,ot)},p.Matrix=Vt;var ki=p.matrixMult=function(h,b){return b.multiply(h)},Pi=new Vt(1,0,0,1,0,0);p.unitMatrix=p.identityMatrix=Pi;var Wn=function(h,b){if(!Ee[h]){var E=(b instanceof Fr?"Sh":"P")+(Object.keys(Ut).length+1).toString(10);b.id=E,Ee[h]=E,Ut[E]=b,_e.publish("addPattern",b)}};p.ShadingPattern=Fr,p.TilingPattern=ba,p.addShadingPattern=function(h,b){return z("addShadingPattern()"),Wn(h,b),this},p.beginTilingPattern=function(h){z("beginTilingPattern()"),Da(h.boundingBox[0],h.boundingBox[1],h.boundingBox[2]-h.boundingBox[0],h.boundingBox[3]-h.boundingBox[1],h.matrix)},p.endTilingPattern=function(h,b){z("endTilingPattern()"),b.stream=xt[R].join(`
|
||
`),Wn(h,b),_e.publish("endTilingPattern",b),hi.pop().restore()};var Gn,Ue=p.__private__.newObject=function(){var h=an();return ln(h,!0),h},an=p.__private__.newObjectDeferred=function(){return Y++,Q[Y]=function(){return at},Y},ln=function(h,b){return b=typeof b=="boolean"&&b,Q[h]=at,b&&P(h+" 0 obj"),h},dr=p.__private__.newAdditionalObject=function(){var h={objId:an(),content:""};return dt.push(h),h},Hi=an(),Qn=an(),ci=p.__private__.decodeColorString=function(h){var b=h.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 E=parseFloat(b[0]);b=[E,E,E,"r"]}for(var D="#",V=0;V<3;V++)D+=("0"+Math.floor(255*parseFloat(b[V])).toString(16)).slice(-2);return D},ti=p.__private__.encodeColorString=function(h){var b;typeof h=="string"&&(h={ch1:h});var E=h.ch1,D=h.ch2,V=h.ch3,ot=h.ch4,gt=h.pdfColorType==="draw"?["G","RG","K"]:["g","rg","k"];if(typeof E=="string"&&E.charAt(0)!=="#"){var Ft=new Hf(E);if(Ft.ok)E=Ft.toHex();else if(!/^\d*\.?\d*$/.test(E))throw new Error('Invalid color "'+E+'" passed to jsPDF.encodeColorString.')}if(typeof E=="string"&&/^#[0-9A-Fa-f]{3}$/.test(E)&&(E="#"+E[1]+E[1]+E[2]+E[2]+E[3]+E[3]),typeof E=="string"&&/^#[0-9A-Fa-f]{6}$/.test(E)){var Ct=parseInt(E.substr(1),16);E=Ct>>16&255,D=Ct>>8&255,V=255&Ct}if(D===void 0||ot===void 0&&E===D&&D===V)b=typeof E=="string"?E+" "+gt[0]:h.precision===2?N(E/255)+" "+gt[0]:F(E/255)+" "+gt[0];else if(ot===void 0||Pe(ot)==="object"){if(ot&&!isNaN(ot.a)&&ot.a===0)return["1.","1.","1.",gt[1]].join(" ");b=typeof E=="string"?[E,D,V,gt[1]].join(" "):h.precision===2?[N(E/255),N(D/255),N(V/255),gt[1]].join(" "):[F(E/255),F(D/255),F(V/255),gt[1]].join(" ")}else b=typeof E=="string"?[E,D,V,ot,gt[2]].join(" "):h.precision===2?[N(E),N(D),N(V),N(ot),gt[2]].join(" "):[F(E),F(D),F(V),F(ot),gt[2]].join(" ");return b},ei=p.__private__.getFilters=function(){return c},Vn=p.__private__.putStream=function(h){var b=(h=h||{}).data||"",E=h.filters||ei(),D=h.alreadyAppliedFilters||[],V=h.addLength1||!1,ot=b.length,gt=h.objectId,Ft=function(Oe){return Oe};if(m!==null&>===void 0)throw new Error("ObjectId must be passed to putStream for file encryption");m!==null&&(Ft=hn.encryptor(gt,0));var Ct={};E===!0&&(E=["FlateEncode"]);var Kt=h.additionalKeyValues||[],te=(Ct=Dt.API.processDataByFilters!==void 0?Dt.API.processDataByFilters(b,E):{data:b,reverseChain:[]}).reverseChain+(Array.isArray(D)?D.join(" "):D.toString());if(Ct.data.length!==0&&(Kt.push({key:"Length",value:Ct.data.length}),V===!0&&Kt.push({key:"Length1",value:ot})),te.length!=0)if(te.split("/").length-1==1)Kt.push({key:"Filter",value:te});else{Kt.push({key:"Filter",value:"["+te+"]"});for(var pe=0;pe<Kt.length;pe+=1)if(Kt[pe].key==="DecodeParms"){for(var Je=[],Le=0;Le<Ct.reverseChain.split("/").length-1;Le+=1)Je.push("null");Je.push(Kt[pe].value),Kt[pe].value="["+Je.join(" ")+"]"}}P("<<");for(var Ne=0;Ne<Kt.length;Ne++)P("/"+Kt[Ne].key+" "+Kt[Ne].value);P(">>"),Ct.data.length!==0&&(P("stream"),P(Ft(Ct.data)),P("endstream"))},pr=p.__private__.putPage=function(h){var b=h.number,E=h.data,D=h.objId,V=h.contentsObjId;ln(D,!0),P("<</Type /Page"),P("/Parent "+h.rootDictionaryObjId+" 0 R"),P("/Resources "+h.resourceDictionaryObjId+" 0 R"),P("/MediaBox ["+parseFloat(tt(h.mediaBox.bottomLeftX))+" "+parseFloat(tt(h.mediaBox.bottomLeftY))+" "+tt(h.mediaBox.topRightX)+" "+tt(h.mediaBox.topRightY)+"]"),h.cropBox!==null&&P("/CropBox ["+tt(h.cropBox.bottomLeftX)+" "+tt(h.cropBox.bottomLeftY)+" "+tt(h.cropBox.topRightX)+" "+tt(h.cropBox.topRightY)+"]"),h.bleedBox!==null&&P("/BleedBox ["+tt(h.bleedBox.bottomLeftX)+" "+tt(h.bleedBox.bottomLeftY)+" "+tt(h.bleedBox.topRightX)+" "+tt(h.bleedBox.topRightY)+"]"),h.trimBox!==null&&P("/TrimBox ["+tt(h.trimBox.bottomLeftX)+" "+tt(h.trimBox.bottomLeftY)+" "+tt(h.trimBox.topRightX)+" "+tt(h.trimBox.topRightY)+"]"),h.artBox!==null&&P("/ArtBox ["+tt(h.artBox.bottomLeftX)+" "+tt(h.artBox.bottomLeftY)+" "+tt(h.artBox.topRightX)+" "+tt(h.artBox.topRightY)+"]"),typeof h.userUnit=="number"&&h.userUnit!==1&&P("/UserUnit "+h.userUnit),_e.publish("putPage",{objId:D,pageContext:Gt[b],pageNumber:b,page:E}),P("/Contents "+V+" 0 R"),P(">>"),P("endobj");var ot=E.join(`
|
||
`);return M===$&&(ot+=`
|
||
Q`),ln(V,!0),Vn({data:ot,filters:ei(),objectId:V}),P("endobj"),D},fi=p.__private__.putPages=function(){var h,b,E=[];for(h=1;h<=le;h++)Gt[h].objId=an(),Gt[h].contentsObjId=an();for(h=1;h<=le;h++)E.push(pr({number:h,data:xt[h],objId:Gt[h].objId,contentsObjId:Gt[h].contentsObjId,mediaBox:Gt[h].mediaBox,cropBox:Gt[h].cropBox,bleedBox:Gt[h].bleedBox,trimBox:Gt[h].trimBox,artBox:Gt[h].artBox,userUnit:Gt[h].userUnit,rootDictionaryObjId:Hi,resourceDictionaryObjId:Qn}));ln(Hi,!0),P("<</Type /Pages");var D="/Kids [";for(b=0;b<le;b++)D+=E[b]+" 0 R ";P(D+"]"),P("/Count "+le),P(">>"),P("endobj"),_e.publish("postPutPages")},gr=function(h){_e.publish("putFont",{font:h,out:P,newObject:Ue,putStream:Vn}),h.isAlreadyPutted!==!0&&(h.objectNumber=Ue(),P("<<"),P("/Type /Font"),P("/BaseFont /"+ma(h.postScriptName)),P("/Subtype /Type1"),typeof h.encoding=="string"&&P("/Encoding /"+h.encoding),P("/FirstChar 32"),P("/LastChar 255"),P(">>"),P("endobj"))},Hr=function(h){h.objectNumber=Ue();var b=[];b.push({key:"Type",value:"/XObject"}),b.push({key:"Subtype",value:"/Form"}),b.push({key:"BBox",value:"["+[tt(h.x),tt(h.y),tt(h.x+h.width),tt(h.y+h.height)].join(" ")+"]"}),b.push({key:"Matrix",value:"["+h.matrix.toString()+"]"});var E=h.pages[1].join(`
|
||
`);Vn({data:E,additionalKeyValues:b,objectId:h.objectNumber}),P("endobj")},Wr=function(h,b){b||(b=21);var E=Ue(),D=(function(gt,Ft){var Ct,Kt=[],te=1/(Ft-1);for(Ct=0;Ct<1;Ct+=te)Kt.push(Ct);if(Kt.push(1),gt[0].offset!=0){var pe={offset:0,color:gt[0].color};gt.unshift(pe)}if(gt[gt.length-1].offset!=1){var Je={offset:1,color:gt[gt.length-1].color};gt.push(Je)}for(var Le="",Ne=0,Oe=0;Oe<Kt.length;Oe++){for(Ct=Kt[Oe];Ct>gt[Ne+1].offset;)Ne++;var De=gt[Ne].offset,Me=(Ct-De)/(gt[Ne+1].offset-De),gn=gt[Ne].color,Ti=gt[Ne+1].color;Le+=G(Math.round((1-Me)*gn[0]+Me*Ti[0]).toString(16))+G(Math.round((1-Me)*gn[1]+Me*Ti[1]).toString(16))+G(Math.round((1-Me)*gn[2]+Me*Ti[2]).toString(16))}return Le.trim()})(h.colors,b),V=[];V.push({key:"FunctionType",value:"0"}),V.push({key:"Domain",value:"[0.0 1.0]"}),V.push({key:"Size",value:"["+b+"]"}),V.push({key:"BitsPerSample",value:"8"}),V.push({key:"Range",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),V.push({key:"Decode",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),Vn({data:D,additionalKeyValues:V,alreadyAppliedFilters:["/ASCIIHexDecode"],objectId:E}),P("endobj"),h.objectNumber=Ue(),P("<< /ShadingType "+h.type),P("/ColorSpace /DeviceRGB");var ot="/Coords ["+tt(parseFloat(h.coords[0]))+" "+tt(parseFloat(h.coords[1]))+" ";h.type===2?ot+=tt(parseFloat(h.coords[2]))+" "+tt(parseFloat(h.coords[3])):ot+=tt(parseFloat(h.coords[2]))+" "+tt(parseFloat(h.coords[3]))+" "+tt(parseFloat(h.coords[4]))+" "+tt(parseFloat(h.coords[5])),P(ot+="]"),h.matrix&&P("/Matrix ["+h.matrix.toString()+"]"),P("/Function "+E+" 0 R"),P("/Extend [true true]"),P(">>"),P("endobj")},Gr=function(h,b){var E=an(),D=Ue();b.push({resourcesOid:E,objectOid:D}),h.objectNumber=D;var V=[];V.push({key:"Type",value:"/Pattern"}),V.push({key:"PatternType",value:"1"}),V.push({key:"PaintType",value:"1"}),V.push({key:"TilingType",value:"1"}),V.push({key:"BBox",value:"["+h.boundingBox.map(tt).join(" ")+"]"}),V.push({key:"XStep",value:tt(h.xStep)}),V.push({key:"YStep",value:tt(h.yStep)}),V.push({key:"Resources",value:E+" 0 R"}),h.matrix&&V.push({key:"Matrix",value:"["+h.matrix.toString()+"]"}),Vn({data:h.stream,additionalKeyValues:V,objectId:h.objectNumber}),P("endobj")},xs=function(h){for(var b in h.objectNumber=Ue(),P("<<"),h)switch(b){case"opacity":P("/ca "+N(h[b]));break;case"stroke-opacity":P("/CA "+N(h[b]))}P(">>"),P("endobj")},Ea=function(h){ln(h.resourcesOid,!0),P("<<"),P("/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]"),(function(){for(var b in P("/Font <<"),oe)oe.hasOwnProperty(b)&&(A===!1||A===!0&&L.hasOwnProperty(b))&&P("/"+b+" "+oe[b].objectNumber+" 0 R");P(">>")})(),(function(){if(Object.keys(Ut).length>0){for(var b in P("/Shading <<"),Ut)Ut.hasOwnProperty(b)&&Ut[b]instanceof Fr&&Ut[b].objectNumber>=0&&P("/"+b+" "+Ut[b].objectNumber+" 0 R");_e.publish("putShadingPatternDict"),P(">>")}})(),(function(b){if(Object.keys(Ut).length>0){for(var E in P("/Pattern <<"),Ut)Ut.hasOwnProperty(E)&&Ut[E]instanceof p.TilingPattern&&Ut[E].objectNumber>=0&&Ut[E].objectNumber<b&&P("/"+E+" "+Ut[E].objectNumber+" 0 R");_e.publish("putTilingPatternDict"),P(">>")}})(h.objectOid),(function(){if(Object.keys(Zt).length>0){var b;for(b in P("/ExtGState <<"),Zt)Zt.hasOwnProperty(b)&&Zt[b].objectNumber>=0&&P("/"+b+" "+Zt[b].objectNumber+" 0 R");_e.publish("putGStateDict"),P(">>")}})(),(function(){for(var b in P("/XObject <<"),pn)pn.hasOwnProperty(b)&&pn[b].objectNumber>=0&&P("/"+b+" "+pn[b].objectNumber+" 0 R");_e.publish("putXobjectDict"),P(">>")})(),P(">>"),P("endobj")},bo=function(h){se[h.fontName]=se[h.fontName]||{},se[h.fontName][h.fontStyle]=h.id},vo=function(h,b,E,D,V){var ot={id:"F"+(Object.keys(oe).length+1).toString(10),postScriptName:h,fontName:b,fontStyle:E,encoding:D,isStandardFont:V||!1,metadata:{}};return _e.publish("addFont",{font:ot,instance:this}),oe[ot.id]=ot,bo(ot),ot.id},Zn=p.__private__.pdfEscape=p.pdfEscape=function(h,b){return(function(E,D){var V,ot,gt,Ft,Ct,Kt,te,pe,Je;if(gt=(D=D||{}).sourceEncoding||"Unicode",Ct=D.outputEncoding,(D.autoencode||Ct)&&oe[Rt].metadata&&oe[Rt].metadata[gt]&&oe[Rt].metadata[gt].encoding&&(Ft=oe[Rt].metadata[gt].encoding,!Ct&&oe[Rt].encoding&&(Ct=oe[Rt].encoding),!Ct&&Ft.codePages&&(Ct=Ft.codePages[0]),typeof Ct=="string"&&(Ct=Ft[Ct]),Ct)){for(te=!1,Kt=[],V=0,ot=E.length;V<ot;V++)(pe=Ct[E.charCodeAt(V)])?Kt.push(String.fromCharCode(pe)):Kt.push(E[V]),Kt[V].charCodeAt(0)>>8&&(te=!0);E=Kt.join("")}for(V=E.length;te===void 0&&V!==0;)E.charCodeAt(V-1)>>8&&(te=!0),V--;if(!te)return E;for(Kt=D.noBOM?[]:[254,255],V=0,ot=E.length;V<ot;V++){if((Je=(pe=E.charCodeAt(V))>>8)>>8)throw new Error("Character at position "+V+" of string '"+E+"' exceeds 16bits. Cannot be encoded into UCS-2 BE");Kt.push(Je),Kt.push(pe-(Je<<8))}return String.fromCharCode.apply(void 0,Kt)})(h,b).replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},Ia=p.__private__.beginPage=function(h){xt[++le]=[],Gt[le]={objId:0,contentsObjId:0,userUnit:Number(l),artBox:null,bleedBox:null,cropBox:null,trimBox:null,mediaBox:{bottomLeftX:0,bottomLeftY:0,topRightX:Number(h[0]),topRightY:Number(h[1])}},_o(le),zt(xt[R])},wo=function(h,b){var E,D,V;switch(e=b||e,typeof h=="string"&&(E=k(h.toLowerCase()),Array.isArray(E)&&(D=E[0],V=E[1])),Array.isArray(h)&&(D=h[0]*ne,V=h[1]*ne),isNaN(D)&&(D=a[0],V=a[1]),(D>14400||V>14400)&&(ke.warn("A page in a PDF can not be wider or taller than 14400 userUnit. jsPDF limits the width/height to 14400"),D=Math.min(14400,D),V=Math.min(14400,V)),a=[D,V],e.substr(0,1)){case"l":V>D&&(a=[V,D]);break;case"p":D>V&&(a=[V,D])}Ia(a),Fs($t),P(Xr),Ra!==0&&P(Ra+" J"),Vi!==0&&P(Vi+" j"),_e.publish("addPage",{pageNumber:le})},Ca=function(h){h>0&&h<=le&&(xt.splice(h,1),Gt.splice(h,1),le--,R>le&&(R=le),this.setPage(R))},_o=function(h){h>0&&h<=le&&(R=h)},yo=p.__private__.getNumberOfPages=p.getNumberOfPages=function(){return xt.length-1},xo=function(h,b,E){var D,V=void 0;return E=E||{},h=h!==void 0?h:oe[Rt].fontName,b=b!==void 0?b:oe[Rt].fontStyle,D=h.toLowerCase(),se[D]!==void 0&&se[D][b]!==void 0?V=se[D][b]:se[h]!==void 0&&se[h][b]!==void 0?V=se[h][b]:E.disableWarning===!1&&ke.warn("Unable to look up font label for font '"+h+"', '"+b+"'. Refer to getFontList() for available fonts."),V||E.noFallback||(V=se.times[b])==null&&(V=se.times.normal),V},ui=p.__private__.putInfo=function(){var h=Ue(),b=function(D){return D};for(var E in m!==null&&(b=hn.encryptor(h,0)),P("<<"),P("/Producer ("+Zn(b("jsPDF "+Dt.version))+")"),ce)ce.hasOwnProperty(E)&&ce[E]&&P("/"+E.substr(0,1).toUpperCase()+E.substr(1)+" ("+Zn(b(ce[E]))+")");P("/CreationDate ("+Zn(b(it))+")"),P(">>"),P("endobj")},Vr=p.__private__.putCatalog=function(h){var b=(h=h||{}).rootDictionaryObjId||Hi;switch(Ue(),P("<<"),P("/Type /Catalog"),P("/Pages "+b+" 0 R"),Wt||(Wt="fullwidth"),Wt){case"fullwidth":P("/OpenAction [3 0 R /FitH null]");break;case"fullheight":P("/OpenAction [3 0 R /FitV null]");break;case"fullpage":P("/OpenAction [3 0 R /Fit]");break;case"original":P("/OpenAction [3 0 R /XYZ null null 1]");break;default:var E=""+Wt;E.substr(E.length-1)==="%"&&(Wt=parseInt(Wt)/100),typeof Wt=="number"&&P("/OpenAction [3 0 R /XYZ null null "+N(Wt)+"]")}switch(he||(he="continuous"),he){case"continuous":P("/PageLayout /OneColumn");break;case"single":P("/PageLayout /SinglePage");break;case"two":case"twoleft":P("/PageLayout /TwoColumnLeft");break;case"tworight":P("/PageLayout /TwoColumnRight")}Mt&&P("/PageMode /"+Mt),_e.publish("putCatalog"),P(">>"),P("endobj")},As=p.__private__.putTrailer=function(){P("trailer"),P("<<"),P("/Size "+(Y+1)),P("/Root "+Y+" 0 R"),P("/Info "+(Y-1)+" 0 R"),m!==null&&P("/Encrypt "+hn.oid+" 0 R"),P("/ID [ <"+ft+"> <"+ft+"> ]"),P(">>")},Xe=p.__private__.putHeader=function(){P("%PDF-"+T),P("%ºß¬à")},Ao=p.__private__.putXRef=function(){var h="0000000000";P("xref"),P("0 "+(Y+1)),P("0000000000 65535 f ");for(var b=1;b<=Y;b++)typeof Q[b]=="function"?P((h+Q[b]()).slice(-10)+" 00000 n "):Q[b]!==void 0?P((h+Q[b]).slice(-10)+" 00000 n "):P("0000000000 00000 n ")},di=p.__private__.buildDocument=function(){var h;Y=0,at=0,rt=[],Q=[],dt=[],Hi=an(),Qn=an(),zt(rt),_e.publish("buildDocument"),Xe(),fi(),(function(){_e.publish("putAdditionalObjects");for(var E=0;E<dt.length;E++){var D=dt[E];ln(D.objId,!0),P(D.content),P("endobj")}_e.publish("postPutAdditionalObjects")})(),h=[],(function(){for(var E in oe)oe.hasOwnProperty(E)&&(A===!1||A===!0&&L.hasOwnProperty(E))&&gr(oe[E])})(),(function(){var E;for(E in Zt)Zt.hasOwnProperty(E)&&xs(Zt[E])})(),(function(){for(var E in pn)pn.hasOwnProperty(E)&&Hr(pn[E])})(),(function(E){var D;for(D in Ut)Ut.hasOwnProperty(D)&&(Ut[D]instanceof Fr?Wr(Ut[D]):Ut[D]instanceof ba&&Gr(Ut[D],E))})(h),_e.publish("putResources"),h.forEach(Ea),Ea({resourcesOid:Qn,objectOid:Number.MAX_SAFE_INTEGER}),_e.publish("postPutResources"),m!==null&&(hn.oid=Ue(),P("<<"),P("/Filter /Standard"),P("/V "+hn.v),P("/R "+hn.r),P("/U <"+hn.toHexString(hn.U)+">"),P("/O <"+hn.toHexString(hn.O)+">"),P("/P "+hn.P),P(">>"),P("endobj")),ui(),Vr();var b=at;return Ao(),As(),P("startxref"),P(""+b),P("%%EOF"),zt(xt[R]),rt.join(`
|
||
`)},Zr=p.__private__.getBlob=function(h){return new Blob([ae(h)],{type:"application/pdf"})},Fa=function(h){for(;h.firstChild;)h.removeChild(h.firstChild)},Tn=function(h){var b,E=h.document,D=E.documentElement,V=E.head,ot=E.body;return V||(V=E.createElement("head"),D.appendChild(V)),ot||(ot=E.createElement("body"),D.appendChild(ot)),Fa(V),Fa(ot),(b=E.createElement("style")).appendChild(E.createTextNode("html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;}")),V.appendChild(b),{document:E,body:ot}},$r=p.output=p.__private__.output=(Gn=function(h,b){switch(typeof(b=b||{})=="string"?b={filename:b}:b.filename=b.filename||"generated.pdf",h){case void 0:return di();case"save":p.save(b.filename);break;case"arraybuffer":return ae(di());case"blob":return Zr(di());case"bloburi":case"bloburl":if(Yt.URL!==void 0&&typeof Yt.URL.createObjectURL=="function")return Yt.URL&&Yt.URL.createObjectURL(Zr(di()))||void 0;ke.warn("bloburl is not supported by your system, because URL.createObjectURL is not supported by your browser.");break;case"datauristring":case"dataurlstring":var E="",D=di();try{E=Fc(D)}catch(gn){E=Fc(unescape(encodeURIComponent(D)))}return"data:application/pdf;filename="+encodeURIComponent(b.filename)+";base64,"+E;case"pdfobjectnewwindow":if(Object.prototype.toString.call(Yt)==="[object Window]"){var V="https://cdnjs.cloudflare.com/ajax/libs/pdfobject/2.1.1/pdfobject.min.js",ot=!b.pdfObjectUrl;ot||(V=b.pdfObjectUrl);var gt=Yt.open();if(gt!==null){var Ft=Tn(gt),Ct=Ft.document.createElement("script"),Kt=this;Ct.src=V,ot&&(Ct.integrity="sha512-4ze/a9/4jqu+tX9dfOqJYSvyYd5M6qum/3HpCLr+/Jqf0whc37VUbkpNGHR7/8pSnCFw47T1fmIpwBV7UySh3g==",Ct.crossOrigin="anonymous"),Ct.onload=function(){gt.PDFObject.embed(Kt.output("dataurlstring"),b)},Ft.body.appendChild(Ct)}return gt}throw new Error("The option pdfobjectnewwindow just works in a browser-environment.");case"pdfjsnewwindow":if(Object.prototype.toString.call(Yt)==="[object Window]"){var te=b.pdfJsUrl||"examples/PDF.js/web/viewer.html",pe=Yt.open();if(pe!==null){var Je=Tn(pe),Le=Je.document.createElement("iframe"),Ne=te.indexOf("?")===-1?"?":"&";Kt=this,Le.id="pdfViewer",Le.width="500px",Le.height="400px",Le.src=te+Ne+"file=&downloadName="+encodeURIComponent(b.filename),Le.onload=function(){pe.document.title=b.filename,Le.contentWindow.PDFViewerApplication.open(Kt.output("bloburl"))},Je.body.appendChild(Le)}return pe}throw new Error("The option pdfjsnewwindow just works in a browser-environment.");case"dataurlnewwindow":if(Object.prototype.toString.call(Yt)!=="[object Window]")throw new Error("The option dataurlnewwindow just works in a browser-environment.");var Oe=Yt.open();if(Oe!==null){var De=Tn(Oe),Me=De.document.createElement("iframe");Me.src=this.output("datauristring",b),De.body.appendChild(Me),Oe.document.title=b.filename}if(Oe||typeof safari=="undefined")return Oe;break;case"datauri":case"dataurl":return Yt.document.location.href=this.output("datauristring",b);default:return null}},Gn.foo=function(){try{return Gn.apply(this,arguments)}catch(E){var h=E.stack||"";~h.indexOf(" at ")&&(h=h.split(" at ")[1]);var b="Error in function "+h.split(`
|
||
`)[0].split("<")[0]+": "+E.message;if(!Yt.console)throw new Error(b);Yt.console.error(b,E),Yt.alert&&alert(b)}},Gn.foo.bar=Gn,Gn.foo),Ei=function(h){return Array.isArray(ur)===!0&&ur.indexOf(h)>-1};switch(i){case"pt":ne=1;break;case"mm":ne=72/25.4;break;case"cm":ne=72/2.54;break;case"in":ne=72;break;case"px":ne=Ei("px_scaling")==1?.75:96/72;break;case"pc":case"em":ne=12;break;case"ex":ne=6;break;default:if(typeof i!="number")throw new Error("Invalid unit: "+i);ne=i}var hn=null;yt(),nt();var No=p.__private__.getPageInfo=p.getPageInfo=function(h){if(isNaN(h)||h%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfo");return{objId:Gt[h].objId,pageNumber:h,pageContext:Gt[h]}},Ns=p.__private__.getPageInfoByObjId=function(h){if(isNaN(h)||h%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfoByObjId");for(var b in Gt)if(Gt[b].objId===h)break;return No(b)},Ls=p.__private__.getCurrentPageInfo=p.getCurrentPageInfo=function(){return{objId:Gt[R].objId,pageNumber:R,pageContext:Gt[R]}};p.addPage=function(){return wo.apply(this,arguments),this},p.setPage=function(){return _o.apply(this,arguments),zt.call(this,xt[R]),this},p.insertPage=function(h){return this.addPage(),this.movePage(R,h),this},p.movePage=function(h,b){var E,D;if(h>b){E=xt[h],D=Gt[h];for(var V=h;V>b;V--)xt[V]=xt[V-1],Gt[V]=Gt[V-1];xt[b]=E,Gt[b]=D,this.setPage(b)}else if(h<b){E=xt[h],D=Gt[h];for(var ot=h;ot<b;ot++)xt[ot]=xt[ot+1],Gt[ot]=Gt[ot+1];xt[b]=E,Gt[b]=D,this.setPage(b)}return this},p.deletePage=function(){return Ca.apply(this,arguments),this},p.__private__.text=p.text=function(h,b,E,D,V){var ot,gt,Ft,Ct,Kt,te,pe,Je,Le,Ne=(D=D||{}).scope||this;if(typeof h=="number"&&typeof b=="number"&&(typeof E=="string"||Array.isArray(E))){var Oe=E;E=b,b=h,h=Oe}if(arguments[3]instanceof Vt==0?(Ft=arguments[4],Ct=arguments[5],Pe(pe=arguments[3])==="object"&&pe!==null||(typeof Ft=="string"&&(Ct=Ft,Ft=null),typeof pe=="string"&&(Ct=pe,pe=null),typeof pe=="number"&&(Ft=pe,pe=null),D={flags:pe,angle:Ft,align:Ct})):(z("The transform parameter of text() with a Matrix value"),Le=V),isNaN(b)||isNaN(E)||h==null)throw new Error("Invalid arguments passed to jsPDF.text");if(h.length===0)return Ne;var De,Me="",gn=typeof D.lineHeightFactor=="number"?D.lineHeightFactor:mr,Ti=Ne.internal.scaleFactor;function Ma(Ie){return Ie=Ie.split(" ").join(Array(D.TabLen||9).join(" ")),Zn(Ie,pe)}function wr(Ie){for(var Ce,Ge=Ie.concat(),tn=[],ji=Ge.length;ji--;)typeof(Ce=Ge.shift())=="string"?tn.push(Ce):Array.isArray(Ie)&&(Ce.length===1||Ce[1]===void 0&&Ce[2]===void 0)?tn.push(Ce[0]):tn.push([Ce[0],Ce[1],Ce[2]]);return tn}function _r(Ie,Ce){var Ge;if(typeof Ie=="string")Ge=Ce(Ie)[0];else if(Array.isArray(Ie)){for(var tn,ji,Ga=Ie.concat(),ha=[],To=Ga.length;To--;)typeof(tn=Ga.shift())=="string"?ha.push(Ce(tn)[0]):Array.isArray(tn)&&typeof tn[0]=="string"&&(ji=Ce(tn[0],tn[1],tn[2]),ha.push([ji[0],ji[1],ji[2]]));Ge=ha}return Ge}var Zi=!1,yr=!0;if(typeof h=="string")Zi=!0;else if(Array.isArray(h)){var ea=h.concat();gt=[];for(var na,mn=ea.length;mn--;)(typeof(na=ea.shift())!="string"||Array.isArray(na)&&typeof na[0]!="string")&&(yr=!1);Zi=yr}if(Zi===!1)throw new Error('Type of text must be string or Array. "'+h+'" is not recognized.');typeof h=="string"&&(h=h.match(/[\r?\n]/)?h.split(/\r\n|\r|\n/g):[h]);var xr=vt/Ne.internal.scaleFactor,Ar=xr*(gn-1);switch(D.baseline){case"bottom":E-=Ar;break;case"top":E+=xr-Ar;break;case"hanging":E+=xr-2*Ar;break;case"middle":E+=xr/2-Ar}if((te=D.maxWidth||0)>0&&(typeof h=="string"?h=Ne.splitTextToSize(h,te):Object.prototype.toString.call(h)==="[object Array]"&&(h=h.reduce(function(Ie,Ce){return Ie.concat(Ne.splitTextToSize(Ce,te))},[]))),ot={text:h,x:b,y:E,options:D,mutex:{pdfEscape:Zn,activeFontKey:Rt,fonts:oe,activeFontSize:vt}},_e.publish("preProcessText",ot),h=ot.text,Ft=(D=ot.options).angle,Le instanceof Vt==0&&Ft&&typeof Ft=="number"){Ft*=Math.PI/180,D.rotationDirection===0&&(Ft=-Ft),M===$&&(Ft=-Ft);var Ua=Math.cos(Ft),mi=Math.sin(Ft);Le=new Vt(Ua,mi,-mi,Ua,0,0)}else Ft&&Ft instanceof Vt&&(Le=Ft);M!==$||Le||(Le=Pi),(Kt=D.charSpace||Jr)!==void 0&&(Me+=tt(U(Kt))+` Tc
|
||
`,this.setCharSpace(this.getCharSpace()||0)),(Je=D.horizontalScale)!==void 0&&(Me+=tt(100*Je)+` Tz
|
||
`),D.lang;var An=-1,Fo=D.renderingMode!==void 0?D.renderingMode:D.stroke,ia=Ne.internal.getCurrentPageInfo().pageContext;switch(Fo){case 0:case!1:case"fill":An=0;break;case 1:case!0:case"stroke":An=1;break;case 2:case"fillThenStroke":An=2;break;case 3:case"invisible":An=3;break;case 4:case"fillAndAddForClipping":An=4;break;case 5:case"strokeAndAddPathForClipping":An=5;break;case 6:case"fillThenStrokeAndAddToPathForClipping":An=6;break;case 7:case"addToPathForClipping":An=7}var Oo=ia.usedRenderingMode!==void 0?ia.usedRenderingMode:-1;An!==-1?Me+=An+` Tr
|
||
`:Oo!==-1&&(Me+=`0 Tr
|
||
`),An!==-1&&(ia.usedRenderingMode=An),Ct=D.align||"left";var $n,Nr=vt*gn,qa=Ne.internal.pageSize.getWidth(),ra=oe[Rt];Kt=D.charSpace||Jr,te=D.maxWidth||0,pe=Object.assign({autoencode:!0,noBOM:!0},D.flags);var Lr=[],za=function(Ie){return Ne.getStringUnitWidth(Ie,{font:ra,charSpace:Kt,fontSize:vt,doKerning:!1})*vt/Ti};if(Object.prototype.toString.call(h)==="[object Array]"){var Nn;gt=wr(h),Ct!=="left"&&($n=gt.map(za));var En,aa=0;if(Ct==="right"){b-=$n[0],h=[],mn=gt.length;for(var $i=0;$i<mn;$i++)$i===0?(En=Ii(b),Nn=Ci(E)):(En=U(aa-$n[$i]),Nn=-Nr),h.push([gt[$i],En,Nn]),aa=$n[$i]}else if(Ct==="center"){b-=$n[0]/2,h=[],mn=gt.length;for(var Yi=0;Yi<mn;Yi++)Yi===0?(En=Ii(b),Nn=Ci(E)):(En=U((aa-$n[Yi])/2),Nn=-Nr),h.push([gt[Yi],En,Nn]),aa=$n[Yi]}else if(Ct==="left"){h=[],mn=gt.length;for(var oa=0;oa<mn;oa++)h.push(gt[oa])}else if(Ct==="justify"&&ra.encoding==="Identity-H"){h=[],mn=gt.length,te=te!==0?te:qa;for(var Sr=0,Qe=0;Qe<mn;Qe++)if(Nn=Qe===0?Ci(E):-Nr,En=Qe===0?Ii(b):Sr,Qe<mn-1){var Us=U((te-$n[Qe])/(gt[Qe].split(" ").length-1)),bi=gt[Qe].split(" ");h.push([bi[0]+" ",En,Nn]),Sr=0;for(var ni=1;ni<bi.length;ni++){var kr=(za(bi[ni-1]+" "+bi[ni])-za(bi[ni]))*Ti+Us;ni==bi.length-1?h.push([bi[ni],kr,0]):h.push([bi[ni]+" ",kr,0]),Sr-=kr}}else h.push([gt[Qe],En,Nn]);h.push(["",Sr,0])}else{if(Ct!=="justify")throw new Error('Unrecognized alignment option, use "left", "center", "right" or "justify".');for(h=[],mn=gt.length,te=te!==0?te:qa,Qe=0;Qe<mn;Qe++){Nn=Qe===0?Ci(E):-Nr,En=Qe===0?Ii(b):0;var Ha=gt[Qe].split(" ").length-1,Wa=Ha>0?(te-$n[Qe])/Ha:0;Qe<mn-1?Lr.push(tt(U(Wa))):Lr.push(0),h.push([gt[Qe],En,Nn])}}}(typeof D.R2L=="boolean"?D.R2L:qt)===!0&&(h=_r(h,function(Ie,Ce,Ge){return[Ie.split("").reverse().join(""),Ce,Ge]})),ot={text:h,x:b,y:E,options:D,mutex:{pdfEscape:Zn,activeFontKey:Rt,fonts:oe,activeFontSize:vt}},_e.publish("postProcessText",ot),h=ot.text,De=ot.mutex.isHex||!1;var sa=oe[Rt].encoding;sa!=="WinAnsiEncoding"&&sa!=="StandardEncoding"||(h=_r(h,function(Ie,Ce,Ge){return[Ma(Ie),Ce,Ge]})),gt=wr(h),h=[];for(var Pr,Er,Ki,Ri=Array.isArray(gt[0])?1:0,Xi="",la=function(Ie,Ce,Ge){var tn="";return Ge instanceof Vt?(Ge=typeof D.angle=="number"?ki(Ge,new Vt(1,0,0,1,Ie,Ce)):ki(new Vt(1,0,0,1,Ie,Ce),Ge),M===$&&(Ge=ki(new Vt(1,0,0,-1,0,0),Ge)),tn=Ge.join(" ")+` Tm
|
||
`):tn=tt(Ie)+" "+tt(Ce)+` Td
|
||
`,tn},bn=0;bn<gt.length;bn++){switch(Xi="",Ri){case 1:Ki=(De?"<":"(")+gt[bn][0]+(De?">":")"),Pr=parseFloat(gt[bn][1]),Er=parseFloat(gt[bn][2]);break;case 0:Ki=(De?"<":"(")+gt[bn]+(De?">":")"),Pr=Ii(b),Er=Ci(E)}Lr!==void 0&&Lr[bn]!==void 0&&(Xi=Lr[bn]+` Tw
|
||
`),bn===0?h.push(Xi+la(Pr,Er,Le)+Ki):Ri===0?h.push(Xi+Ki):Ri===1&&h.push(Xi+la(Pr,Er,Le)+Ki)}h=Ri===0?h.join(` Tj
|
||
T* `):h.join(` Tj
|
||
`),h+=` Tj
|
||
`;var vi=`BT
|
||
/`;return vi+=Rt+" "+vt+` Tf
|
||
`,vi+=tt(vt*gn)+` TL
|
||
`,vi+=gi+`
|
||
`,vi+=Me,vi+=h,P(vi+="ET"),L[Rt]=!0,Ne};var Ss=p.__private__.clip=p.clip=function(h){return P(h==="evenodd"?"W*":"W"),this};p.clipEvenOdd=function(){return Ss("evenodd")},p.__private__.discardPath=p.discardPath=function(){return P("n"),this};var pi=p.__private__.isValidStyle=function(h){var b=!1;return[void 0,null,"S","D","F","DF","FD","f","f*","B","B*","n"].indexOf(h)!==-1&&(b=!0),b};p.__private__.setDefaultPathOperation=p.setDefaultPathOperation=function(h){return pi(h)&&(d=h),this};var Lo=p.__private__.getStyle=p.getStyle=function(h){var b=d;switch(h){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=h}return b},Yr=p.close=function(){return P("h"),this};p.stroke=function(){return P("S"),this},p.fill=function(h){return Kr("f",h),this},p.fillEvenOdd=function(h){return Kr("f*",h),this},p.fillStroke=function(h){return Kr("B",h),this},p.fillStrokeEvenOdd=function(h){return Kr("B*",h),this};var Kr=function(h,b){Pe(b)==="object"?Ps(b,h):P(h)},Oa=function(h){h===null||M===$&&h===void 0||(h=Lo(h),P(h))};function ks(h,b,E,D,V){var ot=new ba(b||this.boundingBox,E||this.xStep,D||this.yStep,this.gState,V||this.matrix);ot.stream=this.stream;var gt=h+"$$"+this.cloneIndex+++"$$";return Wn(gt,ot),ot}var Ps=function(h,b){var E=Ee[h.key],D=Ut[E];if(D instanceof Fr)P("q"),P(Es(b)),D.gState&&p.setGState(D.gState),P(h.matrix.toString()+" cm"),P("/"+E+" sh"),P("Q");else if(D instanceof ba){var V=new Vt(1,0,0,-1,0,vr());h.matrix&&(V=V.multiply(h.matrix||Pi),E=ks.call(D,h.key,h.boundingBox,h.xStep,h.yStep,V).id),P("q"),P("/Pattern cs"),P("/"+E+" scn"),D.gState&&p.setGState(D.gState),P(b),P("Q")}},Es=function(h){switch(h){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"}},Wi=p.moveTo=function(h,b){return P(tt(U(h))+" "+tt(q(b))+" m"),this},So=p.lineTo=function(h,b){return P(tt(U(h))+" "+tt(q(b))+" l"),this},Gi=p.curveTo=function(h,b,E,D,V,ot){return P([tt(U(h)),tt(q(b)),tt(U(E)),tt(q(D)),tt(U(V)),tt(q(ot)),"c"].join(" ")),this};p.__private__.line=p.line=function(h,b,E,D,V){if(isNaN(h)||isNaN(b)||isNaN(E)||isNaN(D)||!pi(V))throw new Error("Invalid arguments passed to jsPDF.line");return M===Z?this.lines([[E-h,D-b]],h,b,[1,1],V||"S"):this.lines([[E-h,D-b]],h,b,[1,1]).stroke()},p.__private__.lines=p.lines=function(h,b,E,D,V,ot){var gt,Ft,Ct,Kt,te,pe,Je,Le,Ne,Oe,De,Me;if(typeof h=="number"&&(Me=E,E=b,b=h,h=Me),D=D||[1,1],ot=ot||!1,isNaN(b)||isNaN(E)||!Array.isArray(h)||!Array.isArray(D)||!pi(V)||typeof ot!="boolean")throw new Error("Invalid arguments passed to jsPDF.lines");for(Wi(b,E),gt=D[0],Ft=D[1],Kt=h.length,Oe=b,De=E,Ct=0;Ct<Kt;Ct++)(te=h[Ct]).length===2?(Oe=te[0]*gt+Oe,De=te[1]*Ft+De,So(Oe,De)):(pe=te[0]*gt+Oe,Je=te[1]*Ft+De,Le=te[2]*gt+Oe,Ne=te[3]*Ft+De,Oe=te[4]*gt+Oe,De=te[5]*Ft+De,Gi(pe,Je,Le,Ne,Oe,De));return ot&&Yr(),Oa(V),this},p.path=function(h){for(var b=0;b<h.length;b++){var E=h[b],D=E.c;switch(E.op){case"m":Wi(D[0],D[1]);break;case"l":So(D[0],D[1]);break;case"c":Gi.apply(this,D);break;case"h":Yr()}}return this},p.__private__.rect=p.rect=function(h,b,E,D,V){if(isNaN(h)||isNaN(b)||isNaN(E)||isNaN(D)||!pi(V))throw new Error("Invalid arguments passed to jsPDF.rect");return M===Z&&(D=-D),P([tt(U(h)),tt(q(b)),tt(U(E)),tt(U(D)),"re"].join(" ")),Oa(V),this},p.__private__.triangle=p.triangle=function(h,b,E,D,V,ot,gt){if(isNaN(h)||isNaN(b)||isNaN(E)||isNaN(D)||isNaN(V)||isNaN(ot)||!pi(gt))throw new Error("Invalid arguments passed to jsPDF.triangle");return this.lines([[E-h,D-b],[V-E,ot-D],[h-V,b-ot]],h,b,[1,1],gt,!0),this},p.__private__.roundedRect=p.roundedRect=function(h,b,E,D,V,ot,gt){if(isNaN(h)||isNaN(b)||isNaN(E)||isNaN(D)||isNaN(V)||isNaN(ot)||!pi(gt))throw new Error("Invalid arguments passed to jsPDF.roundedRect");var Ft=4/3*(Math.SQRT2-1);return V=Math.min(V,.5*E),ot=Math.min(ot,.5*D),this.lines([[E-2*V,0],[V*Ft,0,V,ot-ot*Ft,V,ot],[0,D-2*ot],[0,ot*Ft,-V*Ft,ot,-V,ot],[2*V-E,0],[-V*Ft,0,-V,-ot*Ft,-V,-ot],[0,2*ot-D],[0,-ot*Ft,V*Ft,-ot,V,-ot]],h+V,b,[1,1],gt,!0),this},p.__private__.ellipse=p.ellipse=function(h,b,E,D,V){if(isNaN(h)||isNaN(b)||isNaN(E)||isNaN(D)||!pi(V))throw new Error("Invalid arguments passed to jsPDF.ellipse");var ot=4/3*(Math.SQRT2-1)*E,gt=4/3*(Math.SQRT2-1)*D;return Wi(h+E,b),Gi(h+E,b-gt,h+ot,b-D,h,b-D),Gi(h-ot,b-D,h-E,b-gt,h-E,b),Gi(h-E,b+gt,h-ot,b+D,h,b+D),Gi(h+ot,b+D,h+E,b+gt,h+E,b),Oa(V),this},p.__private__.circle=p.circle=function(h,b,E,D){if(isNaN(h)||isNaN(b)||isNaN(E)||!pi(D))throw new Error("Invalid arguments passed to jsPDF.circle");return this.ellipse(h,b,E,E,D)},p.setFont=function(h,b,E){return E&&(b=mt(b,E)),Rt=xo(h,b,{disableWarning:!1}),this};var Is=p.__private__.getFont=p.getFont=function(){return oe[xo.apply(p,arguments)]};p.__private__.getFontList=p.getFontList=function(){var h,b,E={};for(h in se)if(se.hasOwnProperty(h))for(b in E[h]=[],se[h])se[h].hasOwnProperty(b)&&E[h].push(b);return E},p.addFont=function(h,b,E,D,V){var ot=["StandardEncoding","MacRomanEncoding","Identity-H","WinAnsiEncoding"];return arguments[3]&&ot.indexOf(arguments[3])!==-1?V=arguments[3]:arguments[3]&&ot.indexOf(arguments[3])==-1&&(E=mt(E,D)),vo.call(this,h,b,E,V=V||"Identity-H")};var mr,$t=t.lineWidth||.200025,Cs=p.__private__.getLineWidth=p.getLineWidth=function(){return $t},Fs=p.__private__.setLineWidth=p.setLineWidth=function(h){return $t=h,P(tt(U(h))+" w"),this};p.__private__.setLineDash=Dt.API.setLineDash=Dt.API.setLineDashPattern=function(h,b){if(h=h||[],b=b||0,isNaN(b)||!Array.isArray(h))throw new Error("Invalid arguments passed to jsPDF.setLineDash");return h=h.map(function(E){return tt(U(E))}).join(" "),b=tt(U(b)),P("["+h+"] "+b+" d"),this};var Os=p.__private__.getLineHeight=p.getLineHeight=function(){return vt*mr};p.__private__.getLineHeight=p.getLineHeight=function(){return vt*mr};var Ts=p.__private__.setLineHeightFactor=p.setLineHeightFactor=function(h){return typeof(h=h||1.15)=="number"&&(mr=h),this},Rs=p.__private__.getLineHeightFactor=p.getLineHeightFactor=function(){return mr};Ts(t.lineHeight);var Ii=p.__private__.getHorizontalCoordinate=function(h){return U(h)},Ci=p.__private__.getVerticalCoordinate=function(h){return M===$?h:Gt[R].mediaBox.topRightY-Gt[R].mediaBox.bottomLeftY-U(h)},js=p.__private__.getHorizontalCoordinateString=p.getHorizontalCoordinateString=function(h){return tt(Ii(h))},Bs=p.__private__.getVerticalCoordinateString=p.getVerticalCoordinateString=function(h){return tt(Ci(h))},Xr=t.strokeColor||"0 G";p.__private__.getStrokeColor=p.getDrawColor=function(){return ci(Xr)},p.__private__.setStrokeColor=p.setDrawColor=function(h,b,E,D){return Xr=ti({ch1:h,ch2:b,ch3:E,ch4:D,pdfColorType:"draw",precision:2}),P(Xr),this};var Ta=t.fillColor||"0 g";p.__private__.getFillColor=p.getFillColor=function(){return ci(Ta)},p.__private__.setFillColor=p.setFillColor=function(h,b,E,D){return Ta=ti({ch1:h,ch2:b,ch3:E,ch4:D,pdfColorType:"fill",precision:2}),P(Ta),this};var gi=t.textColor||"0 g",Ds=p.__private__.getTextColor=p.getTextColor=function(){return ci(gi)};p.__private__.setTextColor=p.setTextColor=function(h,b,E,D){return gi=ti({ch1:h,ch2:b,ch3:E,ch4:D,pdfColorType:"text",precision:3}),this};var Jr=t.charSpace,Ms=p.__private__.getCharSpace=p.getCharSpace=function(){return parseFloat(Jr||0)};p.__private__.setCharSpace=p.setCharSpace=function(h){if(isNaN(h))throw new Error("Invalid argument passed to jsPDF.setCharSpace");return Jr=h,this};var Ra=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(h){var b=p.CapJoinStyles[h];if(b===void 0)throw new Error("Line cap style of '"+h+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return Ra=b,P(b+" J"),this};var Vi=0;p.__private__.setLineJoin=p.setLineJoin=function(h){var b=p.CapJoinStyles[h];if(b===void 0)throw new Error("Line join style of '"+h+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return Vi=b,P(b+" j"),this},p.__private__.setLineMiterLimit=p.__private__.setMiterLimit=p.setLineMiterLimit=p.setMiterLimit=function(h){if(h=h||0,isNaN(h))throw new Error("Invalid argument passed to jsPDF.setLineMiterLimit");return P(tt(U(h))+" M"),this},p.GState=ms,p.setGState=function(h){(h=typeof h=="string"?Zt[Qt[h]]:ja(null,h)).equals(je)||(P("/"+h.id+" gs"),je=h)};var ja=function(h,b){if(!h||!Qt[h]){var E=!1;for(var D in Zt)if(Zt.hasOwnProperty(D)&&Zt[D].equals(b)){E=!0;break}if(E)b=Zt[D];else{var V="GS"+(Object.keys(Zt).length+1).toString(10);Zt[V]=b,b.id=V}return h&&(Qt[h]=b.id),_e.publish("addGState",b),b}};p.addGState=function(h,b){return ja(h,b),this},p.saveGraphicsState=function(){return P("q"),Re.push({key:Rt,size:vt,color:gi}),this},p.restoreGraphicsState=function(){P("Q");var h=Re.pop();return Rt=h.key,vt=h.size,gi=h.color,je=null,this},p.setCurrentTransformationMatrix=function(h){return P(h.toString()+" cm"),this},p.comment=function(h){return P("#"+h),this};var br=function(h,b){var E=h||0;Object.defineProperty(this,"x",{enumerable:!0,get:function(){return E},set:function(ot){isNaN(ot)||(E=parseFloat(ot))}});var D=b||0;Object.defineProperty(this,"y",{enumerable:!0,get:function(){return D},set:function(ot){isNaN(ot)||(D=parseFloat(ot))}});var V="pt";return Object.defineProperty(this,"type",{enumerable:!0,get:function(){return V},set:function(ot){V=ot.toString()}}),this},Ba=function(h,b,E,D){br.call(this,h,b),this.type="rect";var V=E||0;Object.defineProperty(this,"w",{enumerable:!0,get:function(){return V},set:function(gt){isNaN(gt)||(V=parseFloat(gt))}});var ot=D||0;return Object.defineProperty(this,"h",{enumerable:!0,get:function(){return ot},set:function(gt){isNaN(gt)||(ot=parseFloat(gt))}}),this},Qr=function(){this.page=le,this.currentPage=R,this.pages=xt.slice(0),this.pagesContext=Gt.slice(0),this.x=Bt,this.y=We,this.matrix=me,this.width=ko(R),this.height=Oi(R),this.outputDestination=kt,this.id="",this.objectNumber=-1};Qr.prototype.restore=function(){le=this.page,R=this.currentPage,Gt=this.pagesContext,xt=this.pages,Bt=this.x,We=this.y,me=this.matrix,Fi(R,this.width),Po(R,this.height),kt=this.outputDestination};var Da=function(h,b,E,D,V){hi.push(new Qr),le=R=0,xt=[],Bt=h,We=b,me=V,Ia([E,D])};for(var ta in p.beginFormObject=function(h,b,E,D,V){return Da(h,b,E,D,V),this},p.endFormObject=function(h){return(function(b){if(Si[b])hi.pop().restore();else{var E=new Qr,D="Xo"+(Object.keys(pn).length+1).toString(10);E.id=D,Si[b]=D,pn[D]=E,_e.publish("addFormObject",E),hi.pop().restore()}})(h),this},p.doFormObject=function(h,b){var E=pn[Si[h]];return P("q"),P(b.toString()+" cm"),P("/"+E.id+" Do"),P("Q"),this},p.getFormObject=function(h){var b=pn[Si[h]];return{x:b.x,y:b.y,width:b.width,height:b.height,matrix:b.matrix}},p.save=function(h,b){return h=h||"generated.pdf",(b=b||{}).returnPromise=b.returnPromise||!1,b.returnPromise===!1?(Cr(Zr(di()),h),typeof Cr.unload=="function"&&Yt.setTimeout&&setTimeout(Cr.unload,911),this):new Promise(function(E,D){try{var V=Cr(Zr(di()),h);typeof Cr.unload=="function"&&Yt.setTimeout&&setTimeout(Cr.unload,911),E(V)}catch(ot){D(ot.message)}})},Dt.API)Dt.API.hasOwnProperty(ta)&&(ta==="events"&&Dt.API.events.length?(function(h,b){var E,D,V;for(V=b.length-1;V!==-1;V--)E=b[V][0],D=b[V][1],h.subscribe.apply(h,[E].concat(typeof D=="function"?[D]:D))})(_e,Dt.API.events):p[ta]=Dt.API[ta]);function ko(h){return Gt[h].mediaBox.topRightX-Gt[h].mediaBox.bottomLeftX}function Fi(h,b){Gt[h].mediaBox.topRightX=b+Gt[h].mediaBox.bottomLeftX}function Oi(h){return Gt[h].mediaBox.topRightY-Gt[h].mediaBox.bottomLeftY}function Po(h,b){Gt[h].mediaBox.topRightY=b+Gt[h].mediaBox.bottomLeftY}var Eo=p.getPageWidth=function(h){return ko(h=h||R)/ne},Io=p.setPageWidth=function(h,b){Fi(h,b*ne)},vr=p.getPageHeight=function(h){return Oi(h=h||R)/ne},Co=p.setPageHeight=function(h,b){Po(h,b*ne)};return p.internal={pdfEscape:Zn,getStyle:Lo,getFont:Is,getFontSize:Et,getCharSpace:Ms,getTextColor:Ds,getLineHeight:Os,getLineHeightFactor:Rs,getLineWidth:Cs,write:Lt,getHorizontalCoordinate:Ii,getVerticalCoordinate:Ci,getCoordinateString:js,getVerticalCoordinateString:Bs,collections:{},newObject:Ue,newAdditionalObject:dr,newObjectDeferred:an,newObjectDeferredBegin:ln,getFilters:ei,putStream:Vn,events:_e,scaleFactor:ne,pageSize:{getWidth:function(){return Eo(R)},setWidth:function(h){Io(R,h)},getHeight:function(){return vr(R)},setHeight:function(h){Co(R,h)}},encryptionOptions:m,encryption:hn,getEncryptor:function(h){return m!==null?hn.encryptor(h,0):function(b){return b}},output:$r,getNumberOfPages:yo,get pages(){return xt},out:P,f2:N,f3:F,getPageInfo:No,getPageInfoByObjId:Ns,getCurrentPageInfo:Ls,getPDFVersion:O,Point:br,Rectangle:Ba,Matrix:Vt,hasHotfix:Ei},Object.defineProperty(p.internal.pageSize,"width",{get:function(){return Eo(R)},set:function(h){Io(R,h)},enumerable:!0,configurable:!0}),Object.defineProperty(p.internal.pageSize,"height",{get:function(){return vr(R)},set:function(h){Co(R,h)},enumerable:!0,configurable:!0}),function(h){for(var b=0,E=Ht.length;b<E;b++){var D=vo.call(this,h[b][0],h[b][1],h[b][2],Ht[b][3],!0);A===!1&&(L[D]=!0);var V=h[b][0].split("-");bo({id:D,fontName:V[0],fontStyle:V[1]||""})}_e.publish("addFonts",{fonts:oe,dictionary:se})}.call(p,Ht),Rt="F1",wo(a,e),_e.publish("initialized"),p}ga.prototype.lsbFirstWord=function(t){return String.fromCharCode(255&t,t>>8&255,t>>16&255,t>>24&255)},ga.prototype.toHexString=function(t){return t.split("").map(function(n){return("0"+(255&n.charCodeAt(0)).toString(16)).slice(-2)}).join("")},ga.prototype.hexToBytes=function(t){for(var n=[],e=0;e<t.length;e+=2)n.push(String.fromCharCode(parseInt(t.substr(e,2),16)));return n.join("")},ga.prototype.processOwnerPassword=function(t,n){return ql(Ul(n).substr(0,5),t)},ga.prototype.encryptor=function(t,n){var e=Ul(this.encryptionKey+String.fromCharCode(255&t,t>>8&255,t>>16&255,255&n,n>>8&255)).substr(0,10);return function(i){return ql(e,i)}},ms.prototype.equals=function(t){var n,e="id,objectNumber,equals";if(!t||Pe(t)!==Pe(this))return!1;var i=0;for(n in this)if(!(e.indexOf(n)>=0)){if(this.hasOwnProperty(n)&&!t.hasOwnProperty(n)||this[n]!==t[n])return!1;i++}for(n in t)t.hasOwnProperty(n)&&e.indexOf(n)<0&&i--;return i===0},Dt.API={events:[]},Dt.version="4.2.1";var He=Dt.API,Jl=1,zr=function(t){return t.replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},da=function(t){return t.replace(/\\\\/g,"\\").replace(/\\\(/g,"(").replace(/\\\)/g,")")},Ur=function(t){return t.toString().replace(/#/g,"#23").replace(/[\s\n\r()<>[\]{}\/%]/g,function(n){var e=n.charCodeAt(0).toString(16).toUpperCase();return"#"+(e.length===1?"0"+e:e)})},Xt=function(t){return t.toFixed(2)},rr=function(t){return t.toFixed(5)};He.__acroform__={};var On=function(t,n){t.prototype=Object.create(n.prototype),t.prototype.constructor=t},jc=function(t){return t*Jl},_i=function(t){var n=new Zf,e=It.internal.getHeight(t)||0,i=It.internal.getWidth(t)||0;return n.BBox=[0,0,Number(Xt(i)),Number(Xt(e))],n},s5=He.__acroform__.setBit=function(t,n){if(t=t||0,n=n||0,isNaN(t)||isNaN(n))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBit");return t|1<<n},l5=He.__acroform__.clearBit=function(t,n){if(t=t||0,n=n||0,isNaN(t)||isNaN(n))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBit");return t&~(1<<n)},h5=He.__acroform__.getBit=function(t,n){if(isNaN(t)||isNaN(n))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBit");return t&1<<n?1:0},$e=He.__acroform__.getBitForPdf=function(t,n){if(isNaN(t)||isNaN(n))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBitForPdf");return h5(t,n-1)},Ye=He.__acroform__.setBitForPdf=function(t,n){if(isNaN(t)||isNaN(n))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBitForPdf");return s5(t,n-1)},Ke=He.__acroform__.clearBitForPdf=function(t,n){if(isNaN(t)||isNaN(n))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBitForPdf");return l5(t,n-1)},c5=He.__acroform__.calculateCoordinates=function(t,n){var e=n.internal.getHorizontalCoordinate,i=n.internal.getVerticalCoordinate,a=t[0],o=t[1],c=t[2],l=t[3],f={};return f.lowerLeft_X=e(a)||0,f.lowerLeft_Y=i(o+l)||0,f.upperRight_X=e(a+c)||0,f.upperRight_Y=i(o)||0,[Number(Xt(f.lowerLeft_X)),Number(Xt(f.lowerLeft_Y)),Number(Xt(f.upperRight_X)),Number(Xt(f.upperRight_Y))]},f5=function(t){if(t.appearanceStreamContent)return t.appearanceStreamContent;if(t.V||t.DV){var n=[],e=t._V||t.DV,i=zl(t,e),a=t.scope.internal.getFont(t.fontName,t.fontStyle).id;n.push("/Tx BMC"),n.push("q"),n.push("BT"),n.push(t.scope.__private__.encodeColorString(t.color)),n.push("/"+a+" "+Xt(i.fontSize)+" Tf"),n.push("1 0 0 1 0 0 Tm"),n.push(i.text),n.push("ET"),n.push("Q"),n.push("EMC");var o=_i(t);return o.scope=t.scope,o.stream=n.join(`
|
||
`),o}},zl=function(t,n){var e=t.fontSize===0?t.maxFontSize:t.fontSize,i={text:"",fontSize:""},a=(n=(n=n.substr(0,1)=="("?n.substr(1):n).substr(n.length-1)==")"?n.substr(0,n.length-1):n).split(" ");a=t.multiline?a.map(function(N){return N.split(`
|
||
`)}):a.map(function(N){return[N]});var o=e,c=It.internal.getHeight(t)||0;c=c<0?-c:c;var l=It.internal.getWidth(t)||0;l=l<0?-l:l;var f=function(N,F,U){if(N+1<a.length){var q=F+" "+a[N+1][0];return rs(q,t,U).width<=l-4}return!1};o++;t:for(;o>0;){n="",o--;var d,m,A=rs("3",t,o).height,L=t.multiline?c-o:(c-A)/2,p=L+=2,T=0,O=0,j=0;if(o<=0){n=`(...) Tj
|
||
`,n+="% Width of Text: "+rs(n,t,o=12).width+", FieldWidth:"+l+`
|
||
`;break}for(var k="",Z=0,$=0;$<a.length;$++)if(a.hasOwnProperty($)){var M=!1;if(a[$].length!==1&&j!==a[$].length-1){if((A+2)*(Z+2)+2>c)continue t;k+=a[$][j],M=!0,O=$,$--}else{k=(k+=a[$][j]+" ").substr(k.length-1)==" "?k.substr(0,k.length-1):k;var lt=parseInt($),_t=f(lt,k,o),mt=$>=a.length-1;if(_t&&!mt){k+=" ",j=0;continue}if(_t||mt){if(mt)O=lt;else if(t.multiline&&(A+2)*(Z+2)+2>c)continue t}else{if(!t.multiline||(A+2)*(Z+2)+2>c)continue t;O=lt}}for(var tt="",z=T;z<=O;z++){var et=a[z];if(t.multiline){if(z===O){tt+=et[j]+" ",j=(j+1)%et.length;continue}if(z===T){tt+=et[et.length-1]+" ";continue}}tt+=et[0]+" "}switch(tt=tt.substr(tt.length-1)==" "?tt.substr(0,tt.length-1):tt,m=rs(tt,t,o).width,t.textAlign){case"right":d=l-m-2;break;case"center":d=(l-m)/2;break;default:d=2}n+=Xt(d)+" "+Xt(p)+` Td
|
||
`,n+="("+zr(tt)+`) Tj
|
||
`,n+=-Xt(d)+` 0 Td
|
||
`,p=-(o+2),m=0,T=M?O:O+1,Z++,k=""}break}return i.text=n,i.fontSize=o,i},rs=function(t,n,e){var i=n.scope.internal.getFont(n.fontName,n.fontStyle),a=n.scope.getStringUnitWidth(t,{font:i,fontSize:parseFloat(e),charSpace:0})*parseFloat(e);return{height:n.scope.getStringUnitWidth("3",{font:i,fontSize:parseFloat(e),charSpace:0})*parseFloat(e)*1.5,width:a}},u5={fields:[],xForms:[],acroFormDictionaryRoot:null,printedOut:!1,internal:null,isInitialized:!1},d5=function(t,n){var e={type:"reference",object:t};n.internal.getPageInfo(t.page).pageContext.annotations.find(function(i){return i.type===e.type&&i.object===e.object})===void 0&&n.internal.getPageInfo(t.page).pageContext.annotations.push(e)},p5=function(t,n){if(n.scope=t,t.internal!==void 0&&(t.internal.acroformPlugin===void 0||t.internal.acroformPlugin.isInitialized===!1)){if(si.FieldNum=0,t.internal.acroformPlugin=JSON.parse(JSON.stringify(u5)),t.internal.acroformPlugin.acroFormDictionaryRoot)throw new Error("Exception while creating AcroformDictionary");Jl=t.internal.scaleFactor,t.internal.acroformPlugin.acroFormDictionaryRoot=new $f,t.internal.acroformPlugin.acroFormDictionaryRoot.scope=t,t.internal.acroformPlugin.acroFormDictionaryRoot._eventID=t.internal.events.subscribe("postPutResources",function(){(function(e){e.internal.events.unsubscribe(e.internal.acroformPlugin.acroFormDictionaryRoot._eventID),delete e.internal.acroformPlugin.acroFormDictionaryRoot._eventID,e.internal.acroformPlugin.printedOut=!0})(t)}),t.internal.events.subscribe("buildDocument",function(){(function(e){e.internal.acroformPlugin.acroFormDictionaryRoot.objId=void 0;var i=e.internal.acroformPlugin.acroFormDictionaryRoot.Fields;for(var a in i)if(i.hasOwnProperty(a)){var o=i[a];o.objId=void 0,o.hasAnnotation&&d5(o,e)}})(t)}),t.internal.events.subscribe("putCatalog",function(){(function(e){if(e.internal.acroformPlugin.acroFormDictionaryRoot===void 0)throw new Error("putCatalogCallback: Root missing.");e.internal.write("/AcroForm "+e.internal.acroformPlugin.acroFormDictionaryRoot.objId+" 0 R")})(t)}),t.internal.events.subscribe("postPutPages",function(e){(function(i,a){var o=!i;for(var c in i||(a.internal.newObjectDeferredBegin(a.internal.acroformPlugin.acroFormDictionaryRoot.objId,!0),a.internal.acroformPlugin.acroFormDictionaryRoot.putStream()),i=i||a.internal.acroformPlugin.acroFormDictionaryRoot.Kids)if(i.hasOwnProperty(c)){var l=i[c],f=[],d=l.Rect;if(l.Rect&&(l.Rect=c5(l.Rect,a)),a.internal.newObjectDeferredBegin(l.objId,!0),l.DA=It.createDefaultAppearanceStream(l),Pe(l)==="object"&&typeof l.getKeyValueListForStream=="function"&&(f=l.getKeyValueListForStream()),l.Rect=d,l.hasAppearanceStream&&!l.appearanceStreamContent){var m=f5(l);f.push({key:"AP",value:"<</N "+m+">>"}),a.internal.acroformPlugin.xForms.push(m)}if(l.appearanceStreamContent){var A="";for(var L in l.appearanceStreamContent)if(l.appearanceStreamContent.hasOwnProperty(L)){var p=l.appearanceStreamContent[L];if(A+="/"+L+" ",A+="<<",Object.keys(p).length>=1||Array.isArray(p)){for(var c in p)if(p.hasOwnProperty(c)){var T=p[c];typeof T=="function"&&(T=T.call(a,l)),A+="/"+c+" "+T+" ",a.internal.acroformPlugin.xForms.indexOf(T)>=0||a.internal.acroformPlugin.xForms.push(T)}}else typeof(T=p)=="function"&&(T=T.call(a,l)),A+="/"+c+" "+T,a.internal.acroformPlugin.xForms.indexOf(T)>=0||a.internal.acroformPlugin.xForms.push(T);A+=">>"}f.push({key:"AP",value:`<<
|
||
`+A+">>"})}a.internal.putStream({additionalKeyValues:f,objectId:l.objId}),a.internal.out("endobj")}o&&(function(O,j){for(var k in O)if(O.hasOwnProperty(k)){var Z=k,$=O[k];j.internal.newObjectDeferredBegin($.objId,!0),Pe($)==="object"&&typeof $.putStream=="function"&&$.putStream(),delete O[Z]}})(a.internal.acroformPlugin.xForms,a)})(e,t)}),t.internal.acroformPlugin.isInitialized=!0}},Vf=He.__acroform__.arrayToPdfArray=function(t,n,e){var i=function(c){return c};if(Array.isArray(t)){for(var a="[",o=0;o<t.length;o++)switch(o!==0&&(a+=" "),Pe(t[o])){case"boolean":case"number":case"object":a+=t[o].toString();break;case"string":t[o].substr(0,1)==="/"?a+="/"+Ur(t[o].substr(1)):(n!==void 0&&e&&(i=e.internal.getEncryptor(n)),a+="("+zr(i(t[o].toString()))+")")}return a+"]"}throw new Error("Invalid argument passed to jsPDF.__acroform__.arrayToPdfArray")},Ll=function(t,n,e){var i=function(a){return a};return n!==void 0&&e&&(i=e.internal.getEncryptor(n)),(t=t||"").toString(),"("+zr(i(t))+")"},xi=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(t){this._objId=t}}),Object.defineProperty(this,"scope",{value:this._scope,writable:!0})};xi.prototype.toString=function(){return this.objId+" 0 R"},xi.prototype.putStream=function(){var t=this.getKeyValueListForStream();this.scope.internal.putStream({data:this.stream,additionalKeyValues:t,objectId:this.objId}),this.scope.internal.out("endobj")},xi.prototype.getKeyValueListForStream=function(){var t=[],n=Object.getOwnPropertyNames(this).filter(function(o){return o!="content"&&o!="appearanceStreamContent"&&o!="scope"&&o!="objId"&&o.substring(0,1)!="_"});for(var e in n)if(Object.getOwnPropertyDescriptor(this,n[e]).configurable===!1){var i=n[e],a=this[i];a&&(Array.isArray(a)?t.push({key:i,value:Vf(a,this.objId,this.scope)}):a instanceof xi?(a.scope=this.scope,t.push({key:i,value:a.objId+" 0 R"})):typeof a!="function"&&t.push({key:i,value:a}))}return t};var Zf=function(){xi.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 t,n=[];Object.defineProperty(this,"BBox",{configurable:!1,get:function(){return n},set:function(e){n=e}}),Object.defineProperty(this,"Resources",{value:"2 0 R",configurable:!1,writable:!0}),Object.defineProperty(this,"stream",{enumerable:!1,configurable:!0,set:function(e){t=e.trim()},get:function(){return t||null}})};On(Zf,xi);var $f=function(){xi.call(this);var t,n=[];Object.defineProperty(this,"Kids",{enumerable:!1,configurable:!0,get:function(){return n.length>0?n:void 0}}),Object.defineProperty(this,"Fields",{enumerable:!1,configurable:!1,get:function(){return n}}),Object.defineProperty(this,"DA",{enumerable:!1,configurable:!1,get:function(){if(t){var e=function(i){return i};return this.scope&&(e=this.scope.internal.getEncryptor(this.objId)),"("+zr(e(t))+")"}},set:function(e){t=e}})};On($f,xi);var si=function t(){xi.call(this);var n=4;Object.defineProperty(this,"F",{enumerable:!1,configurable:!1,get:function(){return n},set:function(k){if(isNaN(k))throw new Error('Invalid value "'+k+'" for attribute F supplied.');n=k}}),Object.defineProperty(this,"showWhenPrinted",{enumerable:!0,configurable:!0,get:function(){return!!$e(n,3)},set:function(k){k?this.F=Ye(n,3):this.F=Ke(n,3)}});var e=0;Object.defineProperty(this,"Ff",{enumerable:!1,configurable:!1,get:function(){return e},set:function(k){if(isNaN(k))throw new Error('Invalid value "'+k+'" for attribute Ff supplied.');e=k}});var i=[];Object.defineProperty(this,"Rect",{enumerable:!1,configurable:!1,get:function(){if(i.length!==0)return i},set:function(k){i=k!==void 0?k:[]}}),Object.defineProperty(this,"x",{enumerable:!0,configurable:!0,get:function(){return!i||isNaN(i[0])?0:i[0]},set:function(k){i[0]=k}}),Object.defineProperty(this,"y",{enumerable:!0,configurable:!0,get:function(){return!i||isNaN(i[1])?0:i[1]},set:function(k){i[1]=k}}),Object.defineProperty(this,"width",{enumerable:!0,configurable:!0,get:function(){return!i||isNaN(i[2])?0:i[2]},set:function(k){i[2]=k}}),Object.defineProperty(this,"height",{enumerable:!0,configurable:!0,get:function(){return!i||isNaN(i[3])?0:i[3]},set:function(k){i[3]=k}});var a="";Object.defineProperty(this,"FT",{enumerable:!0,configurable:!1,get:function(){return a},set:function(k){switch(k){case"/Btn":case"/Tx":case"/Ch":case"/Sig":a=k;break;default:throw new Error('Invalid value "'+k+'" for attribute FT supplied.')}}});var o=null;Object.defineProperty(this,"T",{enumerable:!0,configurable:!1,get:function(){if(!o||o.length<1){if(this instanceof bs)return;o="FieldObject"+t.FieldNum++}var k=function(Z){return Z};return this.scope&&(k=this.scope.internal.getEncryptor(this.objId)),"("+zr(k(o))+")"},set:function(k){o=k.toString()}}),Object.defineProperty(this,"fieldName",{configurable:!0,enumerable:!0,get:function(){return o},set:function(k){o=k}});var c="helvetica";Object.defineProperty(this,"fontName",{enumerable:!0,configurable:!0,get:function(){return c},set:function(k){c=k}});var l="normal";Object.defineProperty(this,"fontStyle",{enumerable:!0,configurable:!0,get:function(){return l},set:function(k){l=k}});var f=0;Object.defineProperty(this,"fontSize",{enumerable:!0,configurable:!0,get:function(){return f},set:function(k){f=k}});var d=void 0;Object.defineProperty(this,"maxFontSize",{enumerable:!0,configurable:!0,get:function(){return d===void 0?50/Jl:d},set:function(k){d=k}});var m="black";Object.defineProperty(this,"color",{enumerable:!0,configurable:!0,get:function(){return m},set:function(k){m=k}});var A="/F1 0 Tf 0 g";Object.defineProperty(this,"DA",{enumerable:!0,configurable:!1,get:function(){if(!(!A||this instanceof bs||this instanceof jr))return Ll(A,this.objId,this.scope)},set:function(k){k=k.toString(),A=k}});var L=null;Object.defineProperty(this,"DV",{enumerable:!1,configurable:!1,get:function(){if(L)return this instanceof sn==0?Ll(L,this.objId,this.scope):L},set:function(k){k=k.toString(),L=this instanceof sn==0?k.substr(0,1)==="("?da(k.substr(1,k.length-2)):da(k):k}}),Object.defineProperty(this,"defaultValue",{enumerable:!0,configurable:!0,get:function(){return this instanceof sn==1?da(L.substr(1,L.length-1)):L},set:function(k){k=k.toString(),L=this instanceof sn==1?"/"+Ur(k):k}});var p=null;Object.defineProperty(this,"_V",{enumerable:!1,configurable:!1,get:function(){if(p)return p},set:function(k){this.V=k}}),Object.defineProperty(this,"V",{enumerable:!1,configurable:!1,get:function(){if(p)return this instanceof sn==0?Ll(p,this.objId,this.scope):p},set:function(k){k=k.toString(),p=this instanceof sn==0?k.substr(0,1)==="("?da(k.substr(1,k.length-2)):da(k):k}}),Object.defineProperty(this,"value",{enumerable:!0,configurable:!0,get:function(){return this instanceof sn==1?da(p.substr(1,p.length-1)):p},set:function(k){k=k.toString(),p=this instanceof sn==1?"/"+Ur(k):k}}),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 T,O=!1;Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return O},set:function(k){k=!!k,O=k}}),Object.defineProperty(this,"page",{enumerable:!0,configurable:!0,get:function(){if(T)return T},set:function(k){T=k}}),Object.defineProperty(this,"readOnly",{enumerable:!0,configurable:!0,get:function(){return!!$e(this.Ff,1)},set:function(k){k?this.Ff=Ye(this.Ff,1):this.Ff=Ke(this.Ff,1)}}),Object.defineProperty(this,"required",{enumerable:!0,configurable:!0,get:function(){return!!$e(this.Ff,2)},set:function(k){k?this.Ff=Ye(this.Ff,2):this.Ff=Ke(this.Ff,2)}}),Object.defineProperty(this,"noExport",{enumerable:!0,configurable:!0,get:function(){return!!$e(this.Ff,3)},set:function(k){k?this.Ff=Ye(this.Ff,3):this.Ff=Ke(this.Ff,3)}});var j=null;Object.defineProperty(this,"Q",{enumerable:!0,configurable:!1,get:function(){if(j!==null)return j},set:function(k){if([0,1,2].indexOf(k)===-1)throw new Error('Invalid value "'+k+'" for attribute Q supplied.');j=k}}),Object.defineProperty(this,"textAlign",{get:function(){var k;switch(j){case 0:default:k="left";break;case 1:k="center";break;case 2:k="right"}return k},configurable:!0,enumerable:!0,set:function(k){switch(k){case"right":case 2:j=2;break;case"center":case 1:j=1;break;default:j=0}}})};On(si,xi);var wa=function(){si.call(this),this.FT="/Ch",this.V="()",this.fontName="zapfdingbats";var t=0;Object.defineProperty(this,"TI",{enumerable:!0,configurable:!1,get:function(){return t},set:function(e){t=e}}),Object.defineProperty(this,"topIndex",{enumerable:!0,configurable:!0,get:function(){return t},set:function(e){t=e}});var n=[];Object.defineProperty(this,"Opt",{enumerable:!0,configurable:!1,get:function(){return Vf(n,this.objId,this.scope)},set:function(e){var i,a;a=[],typeof(i=e)=="string"&&(a=(function(o,c,l){l||(l=1);for(var f,d=[];f=c.exec(o);)d.push(f[l]);return d})(i,/\((.*?)\)/g)),n=a}}),this.getOptions=function(){return n},this.setOptions=function(e){n=e,this.sort&&n.sort()},this.addOption=function(e){e=(e=e||"").toString(),n.push(e),this.sort&&n.sort()},this.removeOption=function(e,i){for(i=i||!1,e=(e=e||"").toString();n.indexOf(e)!==-1&&(n.splice(n.indexOf(e),1),i!==!1););},Object.defineProperty(this,"combo",{enumerable:!0,configurable:!0,get:function(){return!!$e(this.Ff,18)},set:function(e){e?this.Ff=Ye(this.Ff,18):this.Ff=Ke(this.Ff,18)}}),Object.defineProperty(this,"edit",{enumerable:!0,configurable:!0,get:function(){return!!$e(this.Ff,19)},set:function(e){this.combo===!0&&(e?this.Ff=Ye(this.Ff,19):this.Ff=Ke(this.Ff,19))}}),Object.defineProperty(this,"sort",{enumerable:!0,configurable:!0,get:function(){return!!$e(this.Ff,20)},set:function(e){e?(this.Ff=Ye(this.Ff,20),n.sort()):this.Ff=Ke(this.Ff,20)}}),Object.defineProperty(this,"multiSelect",{enumerable:!0,configurable:!0,get:function(){return!!$e(this.Ff,22)},set:function(e){e?this.Ff=Ye(this.Ff,22):this.Ff=Ke(this.Ff,22)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return!!$e(this.Ff,23)},set:function(e){e?this.Ff=Ye(this.Ff,23):this.Ff=Ke(this.Ff,23)}}),Object.defineProperty(this,"commitOnSelChange",{enumerable:!0,configurable:!0,get:function(){return!!$e(this.Ff,27)},set:function(e){e?this.Ff=Ye(this.Ff,27):this.Ff=Ke(this.Ff,27)}}),this.hasAppearanceStream=!1};On(wa,si);var _a=function(){wa.call(this),this.fontName="helvetica",this.combo=!1};On(_a,wa);var ya=function(){_a.call(this),this.combo=!0};On(ya,_a);var hs=function(){ya.call(this),this.edit=!0};On(hs,ya);var sn=function(){si.call(this),this.FT="/Btn",Object.defineProperty(this,"noToggleToOff",{enumerable:!0,configurable:!0,get:function(){return!!$e(this.Ff,15)},set:function(e){e?this.Ff=Ye(this.Ff,15):this.Ff=Ke(this.Ff,15)}}),Object.defineProperty(this,"radio",{enumerable:!0,configurable:!0,get:function(){return!!$e(this.Ff,16)},set:function(e){e?this.Ff=Ye(this.Ff,16):this.Ff=Ke(this.Ff,16)}}),Object.defineProperty(this,"pushButton",{enumerable:!0,configurable:!0,get:function(){return!!$e(this.Ff,17)},set:function(e){e?this.Ff=Ye(this.Ff,17):this.Ff=Ke(this.Ff,17)}}),Object.defineProperty(this,"radioIsUnison",{enumerable:!0,configurable:!0,get:function(){return!!$e(this.Ff,26)},set:function(e){e?this.Ff=Ye(this.Ff,26):this.Ff=Ke(this.Ff,26)}});var t,n={};Object.defineProperty(this,"MK",{enumerable:!1,configurable:!1,get:function(){var e=function(o){return o};if(this.scope&&(e=this.scope.internal.getEncryptor(this.objId)),Object.keys(n).length!==0){var i,a=[];for(i in a.push("<<"),n)a.push("/"+i+" ("+zr(e(n[i]))+")");return a.push(">>"),a.join(`
|
||
`)}},set:function(e){Pe(e)==="object"&&(n=e)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return n.CA||""},set:function(e){typeof e=="string"&&(n.CA=e)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return t},set:function(e){var i=e==null?"":e.toString();i.substr(0,1)==="/"&&(i=i.substr(1)),t="/"+Ur(i)}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return t.substr(1,t.length-1)},set:function(e){t="/"+Ur(e)}})};On(sn,si);var cs=function(){sn.call(this),this.pushButton=!0};On(cs,sn);var xa=function(){sn.call(this),this.radio=!0,this.pushButton=!1;var t=[];Object.defineProperty(this,"Kids",{enumerable:!0,configurable:!1,get:function(){return t},set:function(n){t=n!==void 0?n:[]}})};On(xa,sn);var bs=function(){var t,n;si.call(this),Object.defineProperty(this,"Parent",{enumerable:!1,configurable:!1,get:function(){return t},set:function(a){t=a}}),Object.defineProperty(this,"optionName",{enumerable:!1,configurable:!0,get:function(){return n},set:function(a){n=a}});var e,i={};Object.defineProperty(this,"MK",{enumerable:!1,configurable:!1,get:function(){var a=function(l){return l};this.scope&&(a=this.scope.internal.getEncryptor(this.objId));var o,c=[];for(o in c.push("<<"),i)c.push("/"+o+" ("+zr(a(i[o]))+")");return c.push(">>"),c.join(`
|
||
`)},set:function(a){Pe(a)==="object"&&(i=a)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return i.CA||""},set:function(a){typeof a=="string"&&(i.CA=a)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return e},set:function(a){var o=a==null?"":a.toString();o.substr(0,1)==="/"&&(o=o.substr(1)),e="/"+Ur(o)}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return e.substr(1,e.length-1)},set:function(a){var o=a==null?"":a.toString();o.substr(0,1)==="/"&&(o=o.substr(1)),e="/"+Ur(o)}}),this.caption="l",this.appearanceState="Off",this._AppearanceType=It.RadioButton.Circle,this.appearanceStreamContent=this._AppearanceType.createAppearanceStream(this.optionName)};On(bs,si),xa.prototype.setAppearance=function(t){if(!("createAppearanceStream"in t)||!("getCA"in t))throw new Error("Couldn't assign Appearance to RadioButton. Appearance was Invalid!");for(var n in this.Kids)if(this.Kids.hasOwnProperty(n)){var e=this.Kids[n];e.appearanceStreamContent=t.createAppearanceStream(e.optionName),e.caption=t.getCA()}},xa.prototype.createOption=function(t){var n=new bs;return n.Parent=this,n.optionName=t,this.Kids.push(n),g5.call(this.scope,n),n};var fs=function(){sn.call(this),this.fontName="zapfdingbats",this.caption="3",this.appearanceState="On",this.value="On",this.textAlign="center",this.appearanceStreamContent=It.CheckBox.createAppearanceStream()};On(fs,sn);var jr=function(){si.call(this),this.FT="/Tx",Object.defineProperty(this,"multiline",{enumerable:!0,configurable:!0,get:function(){return!!$e(this.Ff,13)},set:function(n){n?this.Ff=Ye(this.Ff,13):this.Ff=Ke(this.Ff,13)}}),Object.defineProperty(this,"fileSelect",{enumerable:!0,configurable:!0,get:function(){return!!$e(this.Ff,21)},set:function(n){n?this.Ff=Ye(this.Ff,21):this.Ff=Ke(this.Ff,21)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return!!$e(this.Ff,23)},set:function(n){n?this.Ff=Ye(this.Ff,23):this.Ff=Ke(this.Ff,23)}}),Object.defineProperty(this,"doNotScroll",{enumerable:!0,configurable:!0,get:function(){return!!$e(this.Ff,24)},set:function(n){n?this.Ff=Ye(this.Ff,24):this.Ff=Ke(this.Ff,24)}}),Object.defineProperty(this,"comb",{enumerable:!0,configurable:!0,get:function(){return!!$e(this.Ff,25)},set:function(n){n?this.Ff=Ye(this.Ff,25):this.Ff=Ke(this.Ff,25)}}),Object.defineProperty(this,"richText",{enumerable:!0,configurable:!0,get:function(){return!!$e(this.Ff,26)},set:function(n){n?this.Ff=Ye(this.Ff,26):this.Ff=Ke(this.Ff,26)}});var t=null;Object.defineProperty(this,"MaxLen",{enumerable:!0,configurable:!1,get:function(){return t},set:function(n){t=n}}),Object.defineProperty(this,"maxLength",{enumerable:!0,configurable:!0,get:function(){return t},set:function(n){Number.isInteger(n)&&(t=n)}}),Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return this.V||this.DV}})};On(jr,si);var us=function(){jr.call(this),Object.defineProperty(this,"password",{enumerable:!0,configurable:!0,get:function(){return!!$e(this.Ff,14)},set:function(t){t?this.Ff=Ye(this.Ff,14):this.Ff=Ke(this.Ff,14)}}),this.password=!0};On(us,jr);var It={CheckBox:{createAppearanceStream:function(){return{N:{On:It.CheckBox.YesNormal},D:{On:It.CheckBox.YesPushDown,Off:It.CheckBox.OffPushDown}}},YesPushDown:function(t){var n=_i(t);n.scope=t.scope;var e=[],i=t.scope.internal.getFont(t.fontName,t.fontStyle).id,a=t.scope.__private__.encodeColorString(t.color),o=zl(t,t.caption);return e.push("0.749023 g"),e.push("0 0 "+Xt(It.internal.getWidth(t))+" "+Xt(It.internal.getHeight(t))+" re"),e.push("f"),e.push("BMC"),e.push("q"),e.push("0 0 1 rg"),e.push("/"+i+" "+Xt(o.fontSize)+" Tf "+a),e.push("BT"),e.push(o.text),e.push("ET"),e.push("Q"),e.push("EMC"),n.stream=e.join(`
|
||
`),n},YesNormal:function(t){var n=_i(t);n.scope=t.scope;var e=t.scope.internal.getFont(t.fontName,t.fontStyle).id,i=t.scope.__private__.encodeColorString(t.color),a=[],o=It.internal.getHeight(t),c=It.internal.getWidth(t),l=zl(t,t.caption);return a.push("1 g"),a.push("0 0 "+Xt(c)+" "+Xt(o)+" re"),a.push("f"),a.push("q"),a.push("0 0 1 rg"),a.push("0 0 "+Xt(c-1)+" "+Xt(o-1)+" re"),a.push("W"),a.push("n"),a.push("0 g"),a.push("BT"),a.push("/"+e+" "+Xt(l.fontSize)+" Tf "+i),a.push(l.text),a.push("ET"),a.push("Q"),n.stream=a.join(`
|
||
`),n},OffPushDown:function(t){var n=_i(t);n.scope=t.scope;var e=[];return e.push("0.749023 g"),e.push("0 0 "+Xt(It.internal.getWidth(t))+" "+Xt(It.internal.getHeight(t))+" re"),e.push("f"),n.stream=e.join(`
|
||
`),n}},RadioButton:{Circle:{createAppearanceStream:function(t){var n={D:{Off:It.RadioButton.Circle.OffPushDown},N:{}};return n.N[t]=It.RadioButton.Circle.YesNormal,n.D[t]=It.RadioButton.Circle.YesPushDown,n},getCA:function(){return"l"},YesNormal:function(t){var n=_i(t);n.scope=t.scope;var e=[],i=It.internal.getWidth(t)<=It.internal.getHeight(t)?It.internal.getWidth(t)/4:It.internal.getHeight(t)/4;i=Number((.9*i).toFixed(5));var a=It.internal.Bezier_C,o=Number((i*a).toFixed(5));return e.push("q"),e.push("1 0 0 1 "+rr(It.internal.getWidth(t)/2)+" "+rr(It.internal.getHeight(t)/2)+" cm"),e.push(i+" 0 m"),e.push(i+" "+o+" "+o+" "+i+" 0 "+i+" c"),e.push("-"+o+" "+i+" -"+i+" "+o+" -"+i+" 0 c"),e.push("-"+i+" -"+o+" -"+o+" -"+i+" 0 -"+i+" c"),e.push(o+" -"+i+" "+i+" -"+o+" "+i+" 0 c"),e.push("f"),e.push("Q"),n.stream=e.join(`
|
||
`),n},YesPushDown:function(t){var n=_i(t);n.scope=t.scope;var e=[],i=It.internal.getWidth(t)<=It.internal.getHeight(t)?It.internal.getWidth(t)/4:It.internal.getHeight(t)/4;i=Number((.9*i).toFixed(5));var a=Number((2*i).toFixed(5)),o=Number((a*It.internal.Bezier_C).toFixed(5)),c=Number((i*It.internal.Bezier_C).toFixed(5));return e.push("0.749023 g"),e.push("q"),e.push("1 0 0 1 "+rr(It.internal.getWidth(t)/2)+" "+rr(It.internal.getHeight(t)/2)+" cm"),e.push(a+" 0 m"),e.push(a+" "+o+" "+o+" "+a+" 0 "+a+" c"),e.push("-"+o+" "+a+" -"+a+" "+o+" -"+a+" 0 c"),e.push("-"+a+" -"+o+" -"+o+" -"+a+" 0 -"+a+" c"),e.push(o+" -"+a+" "+a+" -"+o+" "+a+" 0 c"),e.push("f"),e.push("Q"),e.push("0 g"),e.push("q"),e.push("1 0 0 1 "+rr(It.internal.getWidth(t)/2)+" "+rr(It.internal.getHeight(t)/2)+" cm"),e.push(i+" 0 m"),e.push(i+" "+c+" "+c+" "+i+" 0 "+i+" c"),e.push("-"+c+" "+i+" -"+i+" "+c+" -"+i+" 0 c"),e.push("-"+i+" -"+c+" -"+c+" -"+i+" 0 -"+i+" c"),e.push(c+" -"+i+" "+i+" -"+c+" "+i+" 0 c"),e.push("f"),e.push("Q"),n.stream=e.join(`
|
||
`),n},OffPushDown:function(t){var n=_i(t);n.scope=t.scope;var e=[],i=It.internal.getWidth(t)<=It.internal.getHeight(t)?It.internal.getWidth(t)/4:It.internal.getHeight(t)/4;i=Number((.9*i).toFixed(5));var a=Number((2*i).toFixed(5)),o=Number((a*It.internal.Bezier_C).toFixed(5));return e.push("0.749023 g"),e.push("q"),e.push("1 0 0 1 "+rr(It.internal.getWidth(t)/2)+" "+rr(It.internal.getHeight(t)/2)+" cm"),e.push(a+" 0 m"),e.push(a+" "+o+" "+o+" "+a+" 0 "+a+" c"),e.push("-"+o+" "+a+" -"+a+" "+o+" -"+a+" 0 c"),e.push("-"+a+" -"+o+" -"+o+" -"+a+" 0 -"+a+" c"),e.push(o+" -"+a+" "+a+" -"+o+" "+a+" 0 c"),e.push("f"),e.push("Q"),n.stream=e.join(`
|
||
`),n}},Cross:{createAppearanceStream:function(t){var n={D:{Off:It.RadioButton.Cross.OffPushDown},N:{}};return n.N[t]=It.RadioButton.Cross.YesNormal,n.D[t]=It.RadioButton.Cross.YesPushDown,n},getCA:function(){return"8"},YesNormal:function(t){var n=_i(t);n.scope=t.scope;var e=[],i=It.internal.calculateCross(t);return e.push("q"),e.push("1 1 "+Xt(It.internal.getWidth(t)-2)+" "+Xt(It.internal.getHeight(t)-2)+" re"),e.push("W"),e.push("n"),e.push(Xt(i.x1.x)+" "+Xt(i.x1.y)+" m"),e.push(Xt(i.x2.x)+" "+Xt(i.x2.y)+" l"),e.push(Xt(i.x4.x)+" "+Xt(i.x4.y)+" m"),e.push(Xt(i.x3.x)+" "+Xt(i.x3.y)+" l"),e.push("s"),e.push("Q"),n.stream=e.join(`
|
||
`),n},YesPushDown:function(t){var n=_i(t);n.scope=t.scope;var e=It.internal.calculateCross(t),i=[];return i.push("0.749023 g"),i.push("0 0 "+Xt(It.internal.getWidth(t))+" "+Xt(It.internal.getHeight(t))+" re"),i.push("f"),i.push("q"),i.push("1 1 "+Xt(It.internal.getWidth(t)-2)+" "+Xt(It.internal.getHeight(t)-2)+" re"),i.push("W"),i.push("n"),i.push(Xt(e.x1.x)+" "+Xt(e.x1.y)+" m"),i.push(Xt(e.x2.x)+" "+Xt(e.x2.y)+" l"),i.push(Xt(e.x4.x)+" "+Xt(e.x4.y)+" m"),i.push(Xt(e.x3.x)+" "+Xt(e.x3.y)+" l"),i.push("s"),i.push("Q"),n.stream=i.join(`
|
||
`),n},OffPushDown:function(t){var n=_i(t);n.scope=t.scope;var e=[];return e.push("0.749023 g"),e.push("0 0 "+Xt(It.internal.getWidth(t))+" "+Xt(It.internal.getHeight(t))+" re"),e.push("f"),n.stream=e.join(`
|
||
`),n}}},createDefaultAppearanceStream:function(t){var n=t.scope.internal.getFont(t.fontName,t.fontStyle).id,e=t.scope.__private__.encodeColorString(t.color);return"/"+n+" "+t.fontSize+" Tf "+e}};It.internal={Bezier_C:.551915024494,calculateCross:function(t){var n=It.internal.getWidth(t),e=It.internal.getHeight(t),i=Math.min(n,e);return{x1:{x:(n-i)/2,y:(e-i)/2+i},x2:{x:(n-i)/2+i,y:(e-i)/2},x3:{x:(n-i)/2,y:(e-i)/2},x4:{x:(n-i)/2+i,y:(e-i)/2+i}}}},It.internal.getWidth=function(t){var n=0;return Pe(t)==="object"&&(n=jc(t.Rect[2])),n},It.internal.getHeight=function(t){var n=0;return Pe(t)==="object"&&(n=jc(t.Rect[3])),n};var g5=He.addField=function(t){if(p5(this,t),!(t instanceof si))throw new Error("Invalid argument passed to jsPDF.addField.");var n;return(n=t).scope.internal.acroformPlugin.printedOut&&(n.scope.internal.acroformPlugin.printedOut=!1,n.scope.internal.acroformPlugin.acroFormDictionaryRoot=null),n.scope.internal.acroformPlugin.acroFormDictionaryRoot.Fields.push(n),t.page=t.scope.internal.getCurrentPageInfo().pageNumber,this};He.AcroFormChoiceField=wa,He.AcroFormListBox=_a,He.AcroFormComboBox=ya,He.AcroFormEditBox=hs,He.AcroFormButton=sn,He.AcroFormPushButton=cs,He.AcroFormRadioButton=xa,He.AcroFormCheckBox=fs,He.AcroFormTextField=jr,He.AcroFormPasswordField=us,He.AcroFormAppearance=It,He.AcroForm={ChoiceField:wa,ListBox:_a,ComboBox:ya,EditBox:hs,Button:sn,PushButton:cs,RadioButton:xa,CheckBox:fs,TextField:jr,PasswordField:us,Appearance:It},Dt.AcroForm={ChoiceField:wa,ListBox:_a,ComboBox:ya,EditBox:hs,Button:sn,PushButton:cs,RadioButton:xa,CheckBox:fs,TextField:jr,PasswordField:us,Appearance:It};var td=Dt.AcroForm;function Yf(t){return t.reduce(function(n,e,i){return n[e]=i,n},{})}(function(t){var n="addImage_";t.__addimage__={};var e="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]]},a=t.__addimage__.getImageFileTypeByImageData=function(N,F){var U,q,it,ft,pt,nt=e;if((F=F||e)==="RGBA"||N.data!==void 0&&N.data instanceof Uint8ClampedArray&&"height"in N&&"width"in N)return"RGBA";if(_t(N))for(pt in i)for(it=i[pt],U=0;U<it.length;U+=1){for(ft=!0,q=0;q<it[U].length;q+=1)if(it[U][q]!==void 0&&it[U][q]!==N[q]){ft=!1;break}if(ft===!0){nt=pt;break}}else for(pt in i)for(it=i[pt],U=0;U<it.length;U+=1){for(ft=!0,q=0;q<it[U].length;q+=1)if(it[U][q]!==void 0&&it[U][q]!==N.charCodeAt(q)){ft=!1;break}if(ft===!0){nt=pt;break}}return nt===e&&F!==e&&(nt=F),nt},o=function N(F){for(var U=this.internal.write,q=this.internal.putStream,it=(0,this.internal.getFilters)();it.indexOf("FlateEncode")!==-1;)it.splice(it.indexOf("FlateEncode"),1);F.objectId=this.internal.newObject();var ft=[];if(ft.push({key:"Type",value:"/XObject"}),ft.push({key:"Subtype",value:"/Image"}),ft.push({key:"Width",value:F.width}),ft.push({key:"Height",value:F.height}),F.colorSpace===k.INDEXED?ft.push({key:"ColorSpace",value:"[/Indexed /DeviceRGB "+(F.palette.length/3-1)+" "+("sMask"in F&&F.sMask!==void 0?F.objectId+2:F.objectId+1)+" 0 R]"}):(ft.push({key:"ColorSpace",value:"/"+F.colorSpace}),F.colorSpace===k.DEVICE_CMYK&&ft.push({key:"Decode",value:"[1 0 1 0 1 0 1 0]"})),ft.push({key:"BitsPerComponent",value:F.bitsPerComponent}),"decodeParameters"in F&&F.decodeParameters!==void 0&&ft.push({key:"DecodeParms",value:"<<"+F.decodeParameters+">>"}),"transparency"in F&&Array.isArray(F.transparency)&&F.transparency.length>0){for(var pt="",nt=0,ut=F.transparency.length;nt<ut;nt++)pt+=F.transparency[nt]+" "+F.transparency[nt]+" ";ft.push({key:"Mask",value:"["+pt+"]"})}F.sMask!==void 0&&ft.push({key:"SMask",value:F.objectId+1+" 0 R"});var At=F.filter!==void 0?["/"+F.filter]:void 0;if(q({data:F.data,additionalKeyValues:ft,alreadyAppliedFilters:At,objectId:F.objectId}),U("endobj"),"sMask"in F&&F.sMask!==void 0){var yt,y=(yt=F.sMaskBitsPerComponent)!==null&&yt!==void 0?yt:F.bitsPerComponent,R={width:F.width,height:F.height,colorSpace:"DeviceGray",bitsPerComponent:y,data:F.sMask};"filter"in F&&(R.decodeParameters="/Predictor ".concat(F.predictor," /Colors 1 /BitsPerComponent ").concat(y," /Columns ").concat(F.width),R.filter=F.filter),N.call(this,R)}if(F.colorSpace===k.INDEXED){var B=this.internal.newObject();q({data:tt(new Uint8Array(F.palette)),objectId:B}),U("endobj")}},c=function(){var N=this.internal.collections[n+"images"];for(var F in N)o.call(this,N[F])},l=function(){var N,F=this.internal.collections[n+"images"],U=this.internal.write;for(var q in F)U("/I"+(N=F[q]).index,N.objectId,"0","R")},f=function(){this.internal.collections[n+"images"]||(this.internal.collections[n+"images"]={},this.internal.events.subscribe("putResources",c),this.internal.events.subscribe("putXobjectDict",l))},d=function(){var N=this.internal.collections[n+"images"];return f.call(this),N},m=function(){return Object.keys(this.internal.collections[n+"images"]).length},A=function(N){return typeof t["process"+N.toUpperCase()]=="function"},L=function(N){return Pe(N)==="object"&&N.nodeType===1},p=function(N,F){if(N.nodeName==="IMG"&&N.hasAttribute("src")){var U=""+N.getAttribute("src");if(U.indexOf("data:image/")===0)return ls(unescape(U).split("base64,").pop());var q=t.loadFile(U,!0);if(q!==void 0)return q}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(F){case"PNG":it="image/png";break;case"WEBP":it="image/webp";break;default:it="image/jpeg"}return ls(N.toDataURL(it,1).split("base64,").pop())}},T=function(N){var F=this.internal.collections[n+"images"];if(F){for(var U in F)if(N===F[U].alias)return F[U]}},O=function(N,F,U){return N||F||(N=-96,F=-96),N<0&&(N=-1*U.width*72/N/this.internal.scaleFactor),F<0&&(F=-1*U.height*72/F/this.internal.scaleFactor),N===0&&(N=F*U.width/U.height),F===0&&(F=N*U.height/U.width),[N,F]},j=function(N,F,U,q,it,ft){var pt=O.call(this,U,q,it),nt=this.internal.getCoordinateString,ut=this.internal.getVerticalCoordinateString,At=d.call(this);if(U=pt[0],q=pt[1],At[it.index]=it,ft){ft*=Math.PI/180;var yt=Math.cos(ft),y=Math.sin(ft),R=function(G){return G.toFixed(4)},B=[R(yt),R(y),R(-1*y),R(yt),0,0,"cm"]}this.internal.write("q"),ft?(this.internal.write([1,"0","0",1,nt(N),ut(F+q),"cm"].join(" ")),this.internal.write(B.join(" ")),this.internal.write([nt(U),"0","0",nt(q),"0","0","cm"].join(" "))):this.internal.write([nt(U),"0","0",nt(q),nt(N),ut(F+q),"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")},k=t.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"};t.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 Z=t.image_compression={NONE:"NONE",FAST:"FAST",MEDIUM:"MEDIUM",SLOW:"SLOW"},$=t.__addimage__.sHashCode=function(N){var F,U,q=0;if(typeof N=="string")for(U=N.length,F=0;F<U;F++)q=(q<<5)-q+N.charCodeAt(F),q|=0;else if(_t(N))for(U=N.byteLength/2,F=0;F<U;F++)q=(q<<5)-q+N[F],q|=0;return q},M=t.__addimage__.validateStringAsBase64=function(N){(N=N||"").toString().trim();var F=!0;return N.length===0&&(F=!1),N.length%4!=0&&(F=!1),/^[A-Za-z0-9+/]+$/.test(N.substr(0,N.length-2))===!1&&(F=!1),/^[A-Za-z0-9/][A-Za-z0-9+/]|[A-Za-z0-9+/]=|==$/.test(N.substr(-2))===!1&&(F=!1),F},lt=t.__addimage__.extractImageFromDataUrl=function(N){if(N==null||!(N=N.trim()).startsWith("data:"))return null;var F=N.indexOf(",");return F<0?null:N.substring(0,F).trim().endsWith("base64")?N.substring(F+1):null};t.__addimage__.isArrayBuffer=function(N){return N instanceof ArrayBuffer};var _t=t.__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},mt=t.__addimage__.binaryStringToUint8Array=function(N){for(var F=N.length,U=new Uint8Array(F),q=0;q<F;q++)U[q]=N.charCodeAt(q);return U},tt=t.__addimage__.arrayBufferToBinaryString=function(N){for(var F="",U=_t(N)?N:new Uint8Array(N),q=0;q<U.length;q+=8192)F+=String.fromCharCode.apply(null,U.subarray(q,q+8192));return F};t.addImage=function(){var N,F,U,q,it,ft,pt,nt,ut;if(typeof arguments[1]=="number"?(F=e,U=arguments[1],q=arguments[2],it=arguments[3],ft=arguments[4],pt=arguments[5],nt=arguments[6],ut=arguments[7]):(F=arguments[1],U=arguments[2],q=arguments[3],it=arguments[4],ft=arguments[5],pt=arguments[6],nt=arguments[7],ut=arguments[8]),Pe(N=arguments[0])==="object"&&!L(N)&&"imageData"in N){var At=N;N=At.imageData,F=At.format||F||e,U=At.x||U||0,q=At.y||q||0,it=At.w||At.width||it,ft=At.h||At.height||ft,pt=At.alias||pt,nt=At.compression||nt,ut=At.rotation||At.angle||ut}var yt=this.internal.getFilters();if(nt===void 0&&yt.indexOf("FlateEncode")!==-1&&(nt="SLOW"),isNaN(U)||isNaN(q))throw new Error("Invalid coordinates passed to jsPDF.addImage");f.call(this);var y=z.call(this,N,F,pt,nt);return j.call(this,U,q,it,ft,y,ut),this};var z=function(N,F,U,q){var it,ft,pt;if(typeof N=="string"&&a(N)===e){N=unescape(N);var nt=et(N,!1);(nt!==""||(nt=t.loadFile(N,!0))!==void 0)&&(N=nt)}if(L(N)&&(N=p(N,F)),F=a(N,F),!A(F))throw new Error("addImage does not support files of type '"+F+"', please ensure that a plugin for '"+F+"' support is added.");if(((pt=U)==null||pt.length===0)&&(U=(function(ut){return typeof ut=="string"||_t(ut)?$(ut):_t(ut.data)?$(ut.data):null})(N)),(it=T.call(this,U))||(N instanceof Uint8Array||F==="RGBA"||(ft=N,N=mt(N)),it=this["process"+F.toUpperCase()](N,m.call(this),U,(function(ut){return ut&&typeof ut=="string"&&(ut=ut.toUpperCase()),ut in t.image_compression?ut:Z.NONE})(q),ft)),!it)throw new Error("An unknown error occurred whilst processing the image.");return it},et=t.__addimage__.convertBase64ToBinaryString=function(N,F){F=typeof F!="boolean"||F;var U,q="";if(typeof N=="string"){var it;U=(it=lt(N))!==null&&it!==void 0?it:N;try{q=ls(U)}catch(ft){if(F)throw M(U)?new Error("atob-Error in jsPDF.convertBase64ToBinaryString "+ft.message):new Error("Supplied Data is not a valid base64-String jsPDF.convertBase64ToBinaryString ")}}return q};t.getImageProperties=function(N){var F,U,q="";if(L(N)&&(N=p(N)),typeof N=="string"&&a(N)===e&&((q=et(N,!1))===""&&(q=t.loadFile(N)||""),N=q),U=a(N),!A(U))throw new Error("addImage does not support files of type '"+U+"', please ensure that a plugin for '"+U+"' support is added.");if(N instanceof Uint8Array||(N=mt(N)),!(F=this["process"+U.toUpperCase()](N)))throw new Error("An unknown error occurred whilst processing the image");return F.fileType=U,F}})(Dt.API),(function(t){var n=function(e){if(e!==void 0&&e!="")return!0};Dt.API.events.push(["addPage",function(e){this.internal.getPageInfo(e.pageNumber).pageContext.annotations=[]}]),t.events.push(["putPage",function(e){for(var i,a,o,c=this.internal.getCoordinateString,l=this.internal.getVerticalCoordinateString,f=this.internal.getPageInfoByObjId(e.objId),d=e.pageContext.annotations,m=!1,A=0;A<d.length&&!m;A++)switch((i=d[A]).type){case"link":(n(i.options.url)||n(i.options.pageNumber))&&(m=!0);break;case"reference":case"text":case"freetext":m=!0}if(m!=0){this.internal.write("/Annots [");for(var L=0;L<d.length;L++){i=d[L];var p=this.internal.pdfEscape,T=this.internal.getEncryptor(e.objId);switch(i.type){case"reference":this.internal.write(" "+i.object.objId+" 0 R ");break;case"text":var O=this.internal.newAdditionalObject(),j=this.internal.newAdditionalObject(),k=this.internal.getEncryptor(O.objId),Z=i.title||"Note";o="<</Type /Annot /Subtype /Text "+(a="/Rect ["+c(i.bounds.x)+" "+l(i.bounds.y+i.bounds.h)+" "+c(i.bounds.x+i.bounds.w)+" "+l(i.bounds.y)+"] ")+"/Contents ("+p(k(i.contents))+")",o+=" /Popup "+j.objId+" 0 R",o+=" /P "+f.objId+" 0 R",o+=" /T ("+p(k(Z))+") >>",O.content=o;var $=O.objId+" 0 R";o="<</Type /Annot /Subtype /Popup "+(a="/Rect ["+c(i.bounds.x+30)+" "+l(i.bounds.y+i.bounds.h)+" "+c(i.bounds.x+i.bounds.w+30)+" "+l(i.bounds.y)+"] ")+" /Parent "+$,i.open&&(o+=" /Open true"),o+=" >>",j.content=o,this.internal.write(O.objId,"0 R",j.objId,"0 R");break;case"freetext":a="/Rect ["+c(i.bounds.x)+" "+l(i.bounds.y)+" "+c(i.bounds.x+i.bounds.w)+" "+l(i.bounds.y+i.bounds.h)+"] ";var M="font: Helvetica,sans-serif 12.0pt; text-align:left; color:#"+(i.color||"#000000");o="<</Type /Annot /Subtype /FreeText "+a+"/Contents ("+p(T(i.contents))+")",o+=" /DS("+p(T(M))+")",o+=" /Border [0 0 0]",o+=" >>",this.internal.write(o);break;case"link":if(i.options.name){var lt=this.annotations._nameMap[i.options.name];i.options.pageNumber=lt.page,i.options.top=lt.y}else i.options.top||(i.options.top=0);if(a="/Rect ["+i.finalBounds.x+" "+i.finalBounds.y+" "+i.finalBounds.w+" "+i.finalBounds.h+"] ",o="",i.options.url)o="<</Type /Annot /Subtype /Link "+a+"/Border [0 0 0] /A <</S /URI /URI ("+p(T(i.options.url))+") >>";else if(i.options.pageNumber)switch(o="<</Type /Annot /Subtype /Link "+a+"/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":o+=" /Fit]";break;case"FitH":o+=" /FitH "+i.options.top+"]";break;case"FitV":i.options.left=i.options.left||0,o+=" /FitV "+i.options.left+"]";break;default:var _t=l(i.options.top);i.options.left=i.options.left||0,i.options.zoom===void 0&&(i.options.zoom=0),o+=" /XYZ "+i.options.left+" "+_t+" "+i.options.zoom+"]"}o!=""&&(o+=" >>",this.internal.write(o))}}this.internal.write("]")}}]),t.createAnnotation=function(e){var i=this.internal.getCurrentPageInfo();switch(e.type){case"link":this.link(e.bounds.x,e.bounds.y,e.bounds.w,e.bounds.h,e);break;case"text":case"freetext":i.pageContext.annotations.push(e)}},t.link=function(e,i,a,o,c){var l=this.internal.getCurrentPageInfo(),f=this.internal.getCoordinateString,d=this.internal.getVerticalCoordinateString;l.pageContext.annotations.push({finalBounds:{x:f(e),y:d(i),w:f(e+a),h:d(i+o)},options:c,type:"link"})},t.textWithLink=function(e,i,a,o){var c,l,f=this.getTextWidth(e),d=this.internal.getLineHeight()/this.internal.scaleFactor;if(o.maxWidth!==void 0){l=o.maxWidth;var m=this.splitTextToSize(e,l).length;c=Math.ceil(d*m)}else l=f,c=d;return this.text(e,i,a,o),a+=.2*d,o.align==="center"&&(i-=f/2),o.align==="right"&&(i-=f),this.link(i,a-d,l,c,o),f},t.getTextWidth=function(e){var i=this.internal.getFontSize();return this.getStringUnitWidth(e)*i/this.internal.scaleFactor}})(Dt.API),(function(t){var n={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]},e={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},a=[1570,1571,1573,1575];t.__arabicParser__={};var o=t.__arabicParser__.isInArabicSubstitutionA=function(O){return n[O.charCodeAt(0)]!==void 0},c=t.__arabicParser__.isArabicLetter=function(O){return typeof O=="string"&&/^[\u0600-\u06FF\u0750-\u077F\u08A0-\u08FF\uFB50-\uFDFF\uFE70-\uFEFF]+$/.test(O)},l=t.__arabicParser__.isArabicEndLetter=function(O){return c(O)&&o(O)&&n[O.charCodeAt(0)].length<=2},f=t.__arabicParser__.isArabicAlfLetter=function(O){return c(O)&&a.indexOf(O.charCodeAt(0))>=0};t.__arabicParser__.arabicLetterHasIsolatedForm=function(O){return c(O)&&o(O)&&n[O.charCodeAt(0)].length>=1};var d=t.__arabicParser__.arabicLetterHasFinalForm=function(O){return c(O)&&o(O)&&n[O.charCodeAt(0)].length>=2};t.__arabicParser__.arabicLetterHasInitialForm=function(O){return c(O)&&o(O)&&n[O.charCodeAt(0)].length>=3};var m=t.__arabicParser__.arabicLetterHasMedialForm=function(O){return c(O)&&o(O)&&n[O.charCodeAt(0)].length==4},A=t.__arabicParser__.resolveLigatures=function(O){var j=0,k=e,Z="",$=0;for(j=0;j<O.length;j+=1)k[O.charCodeAt(j)]!==void 0?($++,typeof(k=k[O.charCodeAt(j)])=="number"&&(Z+=String.fromCharCode(k),k=e,$=0),j===O.length-1&&(k=e,Z+=O.charAt(j-($-1)),j-=$-1,$=0)):(k=e,Z+=O.charAt(j-$),j-=$,$=0);return Z};t.__arabicParser__.isArabicDiacritic=function(O){return O!==void 0&&i[O.charCodeAt(0)]!==void 0};var L=t.__arabicParser__.getCorrectForm=function(O,j,k){return c(O)?o(O)===!1?-1:!d(O)||!c(j)&&!c(k)||!c(k)&&l(j)||l(O)&&!c(j)||l(O)&&f(j)||l(O)&&l(j)?0:m(O)&&c(j)&&!l(j)&&c(k)&&d(k)?3:l(O)||!c(k)?1:2:-1},p=function(O){var j=0,k=0,Z=0,$="",M="",lt="",_t=(O=O||"").split("\\s+"),mt=[];for(j=0;j<_t.length;j+=1){for(mt.push(""),k=0;k<_t[j].length;k+=1)$=_t[j][k],M=_t[j][k-1],lt=_t[j][k+1],c($)?(Z=L($,M,lt),mt[j]+=Z!==-1?String.fromCharCode(n[$.charCodeAt(0)][Z]):$):mt[j]+=$;mt[j]=A(mt[j])}return mt.join(" ")},T=t.__arabicParser__.processArabic=t.processArabic=function(){var O,j=typeof arguments[0]=="string"?arguments[0]:arguments[0].text,k=[];if(Array.isArray(j)){var Z=0;for(k=[],Z=0;Z<j.length;Z+=1)Array.isArray(j[Z])?k.push([p(j[Z][0]),j[Z][1],j[Z][2]]):k.push([p(j[Z])]);O=k}else O=p(j);return typeof arguments[0]=="string"?O:(arguments[0].text=O,arguments[0])};t.events.push(["preProcessText",T])})(Dt.API),Dt.API.autoPrint=function(t){var n;return(t=t||{}).variant=t.variant||"non-conform",t.variant==="javascript"?this.addJS("print({});"):(this.internal.events.subscribe("postPutResources",function(){n=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 "+n+" 0 R")})),this},(function(t){var n=function(){var e=void 0;Object.defineProperty(this,"pdf",{get:function(){return e},set:function(l){e=l}});var i=150;Object.defineProperty(this,"width",{get:function(){return i},set:function(l){i=isNaN(l)||Number.isInteger(l)===!1||l<0?150:l,this.getContext("2d").pageWrapXEnabled&&(this.getContext("2d").pageWrapX=i+1)}});var a=300;Object.defineProperty(this,"height",{get:function(){return a},set:function(l){a=isNaN(l)||Number.isInteger(l)===!1||l<0?300:l,this.getContext("2d").pageWrapYEnabled&&(this.getContext("2d").pageWrapY=a+1)}});var o=[];Object.defineProperty(this,"childNodes",{get:function(){return o},set:function(l){o=l}});var c={};Object.defineProperty(this,"style",{get:function(){return c},set:function(l){c=l}}),Object.defineProperty(this,"parentNode",{})};n.prototype.getContext=function(e,i){var a;if((e=e||"2d")!=="2d")return null;for(a in i)this.pdf.context2d.hasOwnProperty(a)&&(this.pdf.context2d[a]=i[a]);return this.pdf.context2d._canvas=this,this.pdf.context2d},n.prototype.toDataURL=function(){throw new Error("toDataURL is not implemented.")},t.events.push(["initialized",function(){this.canvas=new n,this.canvas.pdf=this}])})(Dt.API),(function(t){var n={left:0,top:0,bottom:0,right:0},e=!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({},n),this.internal.__cell__.margins.width=this.getPageWidth(),a.call(this))},a=function(){this.internal.__cell__.lastCell=new o,this.internal.__cell__.pages=1},o=function(){var f=arguments[0];Object.defineProperty(this,"x",{enumerable:!0,get:function(){return f},set:function(O){f=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 L=arguments[4];Object.defineProperty(this,"text",{enumerable:!0,get:function(){return L},set:function(O){L=O}});var p=arguments[5];Object.defineProperty(this,"lineNumber",{enumerable:!0,get:function(){return p},set:function(O){p=O}});var T=arguments[6];return Object.defineProperty(this,"align",{enumerable:!0,get:function(){return T},set:function(O){T=O}}),this};o.prototype.clone=function(){return new o(this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align)},o.prototype.toArray=function(){return[this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align]},t.setHeaderFunction=function(f){return i.call(this),this.internal.__cell__.headerFunction=typeof f=="function"?f:void 0,this},t.getTextDimensions=function(f,d){i.call(this);var m=(d=d||{}).fontSize||this.getFontSize(),A=d.font||this.getFont(),L=d.scaleFactor||this.internal.scaleFactor,p=0,T=0,O=0,j=this;if(!Array.isArray(f)&&typeof f!="string"){if(typeof f!="number")throw new Error("getTextDimensions expects text-parameter to be of type String or type Number or an Array of Strings.");f=String(f)}var k=d.maxWidth;k>0?typeof f=="string"?f=this.splitTextToSize(f,k):Object.prototype.toString.call(f)==="[object Array]"&&(f=f.reduce(function($,M){return $.concat(j.splitTextToSize(M,k))},[])):f=Array.isArray(f)?f:[f];for(var Z=0;Z<f.length;Z++)p<(O=this.getStringUnitWidth(f[Z],{font:A})*m)&&(p=O);return p!==0&&(T=f.length),{w:p/=L,h:Math.max((T*m*this.getLineHeightFactor()-m*(this.getLineHeightFactor()-1))/L,0)}},t.cellAddPage=function(){i.call(this),this.addPage();var f=this.internal.__cell__.margins||n;return this.internal.__cell__.lastCell=new o(f.left,f.top,void 0,void 0),this.internal.__cell__.pages+=1,this};var c=t.cell=function(){var f;f=arguments[0]instanceof o?arguments[0]:new o(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||n,L=this.internal.__cell__.tableHeaderRow,p=this.internal.__cell__.printHeaders;return d.lineNumber!==void 0&&(d.lineNumber===f.lineNumber?(f.x=(d.x||0)+(d.width||0),f.y=d.y||0):d.y+d.height+f.height+A.bottom>this.getPageHeight()?(this.cellAddPage(),f.y=A.top,p&&L&&(this.printHeaderRow(f.lineNumber,!0),f.y+=L[0].height)):f.y=d.y+d.height||f.y),f.text[0]!==void 0&&(this.rect(f.x,f.y,f.width,f.height,e===!0?"FD":void 0),f.align==="right"?this.text(f.text,f.x+f.width-m,f.y+m,{align:"right",baseline:"top"}):f.align==="center"?this.text(f.text,f.x+f.width/2,f.y+m,{align:"center",baseline:"top",maxWidth:f.width-m-m}):this.text(f.text,f.x+m,f.y+m,{align:"left",baseline:"top",maxWidth:f.width-m-m})),this.internal.__cell__.lastCell=f,this};t.table=function(f,d,m,A,L){if(i.call(this),!m)throw new Error("No data for PDF table.");var p,T,O,j,k=[],Z=[],$=[],M={},lt={},_t=[],mt=[],tt=(L=L||{}).autoSize||!1,z=L.printHeaders!==!1,et=L.css&&L.css["font-size"]!==void 0?16*L.css["font-size"]:L.fontSize||12,N=L.margins||Object.assign({width:this.getPageWidth()},n),F=typeof L.padding=="number"?L.padding:3,U=L.headerBackgroundColor||"#c8c8c8",q=L.headerTextColor||"#000";if(a.call(this),this.internal.__cell__.printHeaders=z,this.internal.__cell__.margins=N,this.internal.__cell__.table_font_size=et,this.internal.__cell__.padding=F,this.internal.__cell__.headerBackgroundColor=U,this.internal.__cell__.headerTextColor=q,this.setFontSize(et),A==null)Z=k=Object.keys(m[0]),$=k.map(function(){return"left"});else if(Array.isArray(A)&&Pe(A[0])==="object")for(k=A.map(function(At){return At.name}),Z=A.map(function(At){return At.prompt||At.name||""}),$=A.map(function(At){return At.align||"left"}),p=0;p<A.length;p+=1)lt[A[p].name]=.7499990551181103*A[p].width;else Array.isArray(A)&&typeof A[0]=="string"&&(Z=k=A,$=k.map(function(){return"left"}));if(tt||Array.isArray(A)&&typeof A[0]=="string")for(p=0;p<k.length;p+=1){for(M[j=k[p]]=m.map(function(At){return At[j]}),this.setFont(void 0,"bold"),_t.push(this.getTextDimensions(Z[p],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w),T=M[j],this.setFont(void 0,"normal"),O=0;O<T.length;O+=1)_t.push(this.getTextDimensions(T[O],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w);lt[j]=Math.max.apply(null,_t)+F+F,_t=[]}if(z){var it={};for(p=0;p<k.length;p+=1)it[k[p]]={},it[k[p]].text=Z[p],it[k[p]].align=$[p];var ft=l.call(this,it,lt);mt=k.map(function(At){return new o(f,d,lt[At],ft,it[At].text,void 0,it[At].align)}),this.setTableHeaderRow(mt),this.printHeaderRow(1,!1)}var pt=A.reduce(function(At,yt){return At[yt.name]=yt.align,At},{});for(p=0;p<m.length;p+=1){"rowStart"in L&&L.rowStart instanceof Function&&L.rowStart({row:p,data:m[p]},this);var nt=l.call(this,m[p],lt);for(O=0;O<k.length;O+=1){var ut=m[p][k[O]];"cellStart"in L&&L.cellStart instanceof Function&&L.cellStart({row:p,col:O,data:ut},this),c.call(this,new o(f,d,lt[k[O]],nt,ut,p+2,pt[k[O]]))}}return this.internal.__cell__.table_x=f,this.internal.__cell__.table_y=d,this};var l=function(f,d){var m=this.internal.__cell__.padding,A=this.internal.__cell__.table_font_size,L=this.internal.scaleFactor;return Object.keys(f).map(function(p){var T=f[p];return this.splitTextToSize(T.hasOwnProperty("text")?T.text:T,d[p]-m-m)},this).map(function(p){return this.getLineHeightFactor()*p.length*A/L+m+m},this).reduce(function(p,T){return Math.max(p,T)},0)};t.setTableHeaderRow=function(f){i.call(this),this.internal.__cell__.tableHeaderRow=f},t.printHeaderRow=function(f,d){if(i.call(this),!this.internal.__cell__.tableHeaderRow)throw new Error("Property tableHeaderRow does not exist.");var m;if(e=!0,typeof this.internal.__cell__.headerFunction=="function"){var A=this.internal.__cell__.headerFunction(this,this.internal.__cell__.pages);this.internal.__cell__.lastCell=new o(A[0],A[1],A[2],A[3],void 0,-1)}this.setFont(void 0,"bold");for(var L=[],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,L.push(m)),m.lineNumber=f;var T=this.getTextColor();this.setTextColor(this.internal.__cell__.headerTextColor),this.setFillColor(this.internal.__cell__.headerBackgroundColor),c.call(this,m),this.setTextColor(T)}L.length>0&&this.setTableHeaderRow(L),this.setFont(void 0,"normal"),e=!1}})(Dt.API);var Kf={italic:["italic","oblique","normal"],oblique:["oblique","italic","normal"],normal:["normal","oblique","italic"]},Xf=["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded"],Hl=Yf(Xf),Jf=[100,200,300,400,500,600,700,800,900],m5=Yf(Jf);function Sl(t){var n=t.family.replace(/"|'/g,"").toLowerCase(),e=(function(o){return Kf[o=o||"normal"]?o:"normal"})(t.style),i=(function(o){return o?typeof o=="number"?o>=100&&o<=900&&o%100==0?o:400:/^\d00$/.test(o)?parseInt(o):o==="bold"?700:400:400})(t.weight),a=(function(o){return typeof Hl[o=o||"normal"]=="number"?o:"normal"})(t.stretch);return{family:n,style:e,weight:i,stretch:a,src:t.src||[],ref:t.ref||{name:n,style:[a,e,i].join(" ")}}}function Bc(t,n,e,i){var a;for(a=e;a>=0&&a<n.length;a+=i)if(t[n[a]])return t[n[a]];for(a=e;a>=0&&a<n.length;a-=i)if(t[n[a]])return t[n[a]]}var b5={"sans-serif":"helvetica",fixed:"courier",monospace:"courier",terminal:"courier",cursive:"times",fantasy:"times",serif:"times"},Dc={caption:"times",icon:"times",menu:"times","message-box":"times","small-caption":"times","status-bar":"times"};function Mc(t){return[t.stretch,t.style,t.weight,t.family].join(" ")}function Uc(t){return t.trimLeft()}function v5(t,n){for(var e=0;e<t.length;){if(t.charAt(e)===n)return[t.substring(0,e),t.substring(e+1)];e+=1}return null}function w5(t){var n=t.match(/^(-[a-z_]|[a-z_])[a-z0-9_-]*/i);return n===null?null:[n[0],t.substring(n[0].length)]}var pa,as,qc,zc,Hc,kl=["times"];function Wc(t,n,e,i,a){var o=4,c=Vc;switch(a){case Dt.API.image_compression.FAST:o=1,c=Gc;break;case Dt.API.image_compression.MEDIUM:o=6,c=Zc;break;case Dt.API.image_compression.SLOW:o=9,c=$c}t=(function(f,d,m,A){for(var L,p=f.length/d,T=new Uint8Array(f.length+p),O=[_5,Gc,Vc,Zc,$c],j=0;j<p;j+=1){var k=j*d,Z=f.subarray(k,k+d);if(A)T.set(A(Z,m,L),k+j);else{for(var $=O.length,M=[],lt=0;lt<$;lt+=1)M[lt]=O[lt](Z,m,L);var _t=x5(M.concat());T.set(M[_t],k+j)}L=Z}return T})(t,n,Math.ceil(e*i/8),c);var l=Il(t,{level:o});return Dt.API.__addimage__.arrayBufferToBinaryString(l)}function _5(t){var n=Array.apply([],t);return n.unshift(0),n}function Gc(t,n){var e=t.length,i=[];i[0]=1;for(var a=0;a<e;a+=1){var o=t[a-n]||0;i[a+1]=t[a]-o+256&255}return i}function Vc(t,n,e){var i=t.length,a=[];a[0]=2;for(var o=0;o<i;o+=1){var c=e&&e[o]||0;a[o+1]=t[o]-c+256&255}return a}function Zc(t,n,e){var i=t.length,a=[];a[0]=3;for(var o=0;o<i;o+=1){var c=t[o-n]||0,l=e&&e[o]||0;a[o+1]=t[o]+256-(c+l>>>1)&255}return a}function $c(t,n,e){var i=t.length,a=[];a[0]=4;for(var o=0;o<i;o+=1){var c=y5(t[o-n]||0,e&&e[o]||0,e&&e[o-n]||0);a[o+1]=t[o]-c+256&255}return a}function y5(t,n,e){if(t===n&&n===e)return t;var i=Math.abs(n-e),a=Math.abs(t-e),o=Math.abs(t+n-e-e);return i<=a&&i<=o?t:a<=o?n:e}function x5(t){var n=t.map(function(e){return e.reduce(function(i,a){return i+Math.abs(a)},0)});return n.indexOf(Math.min.apply(null,n))}function Pl(t,n,e){var i=n*e,a=Math.floor(i/8),o=16-(i-8*a+e),c=(1<<e)-1;return Qf(t,a)>>o&c}function Yc(t,n,e,i){var a=e*i,o=Math.floor(a/8),c=16-(a-8*o+i),l=(1<<i)-1,f=(n&l)<<c;(function(d,m,A){if(m+1<d.byteLength)d.setUint16(m,A,!1);else{var L=A>>8&255;d.setUint8(m,L)}})(t,o,Qf(t,o)&~(l<<c)&65535|f)}function Qf(t,n){return n+1<t.byteLength?t.getUint16(n,!1):t.getUint8(n)<<8}function A5(t){var n=0;if(t[n++]!==71||t[n++]!==73||t[n++]!==70||t[n++]!==56||(t[n++]+1&253)!=56||t[n++]!==97)throw new Error("Invalid GIF 87a/89a header.");var e=t[n++]|t[n++]<<8,i=t[n++]|t[n++]<<8,a=t[n++],o=a>>7,c=1<<1+(7&a);t[n++],t[n++];var l=null,f=null;o&&(l=n,f=c,n+=3*c);var d=!0,m=[],A=0,L=null,p=0,T=null;for(this.width=e,this.height=i;d&&n<t.length;)switch(t[n++]){case 33:switch(t[n++]){case 255:if(t[n]!==11||t[n+1]==78&&t[n+2]==69&&t[n+3]==84&&t[n+4]==83&&t[n+5]==67&&t[n+6]==65&&t[n+7]==80&&t[n+8]==69&&t[n+9]==50&&t[n+10]==46&&t[n+11]==48&&t[n+12]==3&&t[n+13]==1&&t[n+16]==0)n+=14,T=t[n++]|t[n++]<<8,n++;else for(n+=12;;){if(!((N=t[n++])>=0))throw Error("Invalid block size");if(N===0)break;n+=N}break;case 249:if(t[n++]!==4||t[n+4]!==0)throw new Error("Invalid graphics extension block.");var O=t[n++];A=t[n++]|t[n++]<<8,L=t[n++],1&O||(L=null),p=O>>2&7,n++;break;case 254:for(;;){if(!((N=t[n++])>=0))throw Error("Invalid block size");if(N===0)break;n+=N}break;default:throw new Error("Unknown graphic control label: 0x"+t[n-1].toString(16))}break;case 44:var j=t[n++]|t[n++]<<8,k=t[n++]|t[n++]<<8,Z=t[n++]|t[n++]<<8,$=t[n++]|t[n++]<<8,M=t[n++],lt=M>>6&1,_t=1<<1+(7&M),mt=l,tt=f,z=!1;M>>7&&(z=!0,mt=n,tt=_t,n+=3*_t);var et=n;for(n++;;){var N;if(!((N=t[n++])>=0))throw Error("Invalid block size");if(N===0)break;n+=N}m.push({x:j,y:k,width:Z,height:$,has_local_palette:z,palette_offset:mt,palette_size:tt,data_offset:et,data_length:n-et,transparent_index:L,interlaced:!!lt,delay:A,disposal:p});break;case 59:d=!1;break;default:throw new Error("Unknown gif block: 0x"+t[n-1].toString(16))}this.numFrames=function(){return m.length},this.loopCount=function(){return T},this.frameInfo=function(F){if(F<0||F>=m.length)throw new Error("Frame index out of range.");return m[F]},this.decodeAndBlitFrameBGRA=function(F,U){var q=this.frameInfo(F),it=q.width*q.height;if(it>536870912)throw new Error("Image dimensions exceed 512MB, which is too large.");var ft=new Uint8Array(it);Kc(t,q.data_offset,ft,it);var pt=q.palette_offset,nt=q.transparent_index;nt===null&&(nt=256);var ut=q.width,At=e-ut,yt=ut,y=4*(q.y*e+q.x),R=4*((q.y+q.height)*e+q.x),B=y,G=4*At;q.interlaced===!0&&(G+=4*e*7);for(var Y=8,Q=0,rt=ft.length;Q<rt;++Q){var at=ft[Q];if(yt===0&&(yt=ut,(B+=G)>=R&&(G=4*At+4*e*(Y-1),B=y+(ut+At)*(Y<<1),Y>>=1)),at===nt)B+=4;else{var dt=t[pt+3*at],xt=t[pt+3*at+1],St=t[pt+3*at+2];U[B++]=St,U[B++]=xt,U[B++]=dt,U[B++]=255}--yt}},this.decodeAndBlitFrameRGBA=function(F,U){var q=this.frameInfo(F),it=q.width*q.height;if(it>536870912)throw new Error("Image dimensions exceed 512MB, which is too large.");var ft=new Uint8Array(it);Kc(t,q.data_offset,ft,it);var pt=q.palette_offset,nt=q.transparent_index;nt===null&&(nt=256);var ut=q.width,At=e-ut,yt=ut,y=4*(q.y*e+q.x),R=4*((q.y+q.height)*e+q.x),B=y,G=4*At;q.interlaced===!0&&(G+=4*e*7);for(var Y=8,Q=0,rt=ft.length;Q<rt;++Q){var at=ft[Q];if(yt===0&&(yt=ut,(B+=G)>=R&&(G=4*At+4*e*(Y-1),B=y+(ut+At)*(Y<<1),Y>>=1)),at===nt)B+=4;else{var dt=t[pt+3*at],xt=t[pt+3*at+1],St=t[pt+3*at+2];U[B++]=dt,U[B++]=xt,U[B++]=St,U[B++]=255}--yt}}}function Kc(t,n,e,i){for(var a=t[n++],o=1<<a,c=o+1,l=c+1,f=a+1,d=(1<<f)-1,m=0,A=0,L=0,p=t[n++],T=new Int32Array(4096),O=null;;){for(;m<16&&p!==0;)A|=t[n++]<<m,m+=8,p===1?p=t[n++]:--p;if(m<f)break;var j=A&d;if(A>>=f,m-=f,j!==o){if(j===c)break;for(var k=j<l?j:O,Z=0,$=k;$>o;)$=T[$]>>8,++Z;var M=$;if(L+Z+(k!==j?1:0)>i)return void ke.log("Warning, gif stream longer than expected.");e[L++]=M;var lt=L+=Z;for(k!==j&&(e[L++]=M),$=k;Z--;)$=T[$],e[--lt]=255&$,$>>=8;O!==null&&l<4096&&(T[l++]=O<<8|M,l>=d+1&&f<12&&(++f,d=d<<1|1)),O=j}else l=c+1,d=(1<<(f=a+1))-1,O=null}return L!==i&&ke.log("Warning, gif stream shorter than expected."),e}/**
|
||
* @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 El(t){var n,e,i,a,o,c=Math.floor,l=new Array(64),f=new Array(64),d=new Array(64),m=new Array(64),A=new Array(65535),L=new Array(65535),p=new Array(64),T=new Array(64),O=[],j=0,k=7,Z=new Array(64),$=new Array(64),M=new Array(64),lt=new Array(256),_t=new Array(2048),mt=[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],F=[0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0],U=[0,1,2,3,4,5,6,7,8,9,10,11],q=[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 ft(y,R){for(var B=0,G=0,Y=new Array,Q=1;Q<=16;Q++){for(var rt=1;rt<=y[Q];rt++)Y[R[G]]=[],Y[R[G]][0]=B,Y[R[G]][1]=Q,G++,B++;B*=2}return Y}function pt(y){for(var R=y[0],B=y[1]-1;B>=0;)R&1<<B&&(j|=1<<k),B--,--k<0&&(j==255?(nt(255),nt(0)):nt(j),k=7,j=0)}function nt(y){O.push(y)}function ut(y){nt(y>>8&255),nt(255&y)}function At(y,R,B,G,Y){for(var Q,rt=Y[0],at=Y[240],dt=(function(vt,Wt){var Et,qt,Mt,we,he,Jt,fe,ce,Rt,ne,Bt=0;for(Rt=0;Rt<8;++Rt){Et=vt[Bt],qt=vt[Bt+1],Mt=vt[Bt+2],we=vt[Bt+3],he=vt[Bt+4],Jt=vt[Bt+5],fe=vt[Bt+6];var We=Et+(ce=vt[Bt+7]),me=Et-ce,oe=qt+fe,se=qt-fe,Re=Mt+Jt,Ut=Mt-Jt,Ee=we+he,Zt=we-he,Qt=We+Ee,je=We-Ee,le=oe+Re,Gt=oe-Re;vt[Bt]=Qt+le,vt[Bt+4]=Qt-le;var _e=.707106781*(Gt+je);vt[Bt+2]=je+_e,vt[Bt+6]=je-_e;var ur=.382683433*((Qt=Zt+Ut)-(Gt=se+me)),pn=.5411961*Qt+ur,Si=1.306562965*Gt+ur,hi=.707106781*(le=Ut+se),Vt=me+hi,ki=me-hi;vt[Bt+5]=ki+pn,vt[Bt+3]=ki-pn,vt[Bt+1]=Vt+Si,vt[Bt+7]=Vt-Si,Bt+=8}for(Bt=0,Rt=0;Rt<8;++Rt){Et=vt[Bt],qt=vt[Bt+8],Mt=vt[Bt+16],we=vt[Bt+24],he=vt[Bt+32],Jt=vt[Bt+40],fe=vt[Bt+48];var Pi=Et+(ce=vt[Bt+56]),Wn=Et-ce,Gn=qt+fe,Ue=qt-fe,an=Mt+Jt,ln=Mt-Jt,dr=we+he,Hi=we-he,Qn=Pi+dr,ci=Pi-dr,ti=Gn+an,ei=Gn-an;vt[Bt]=Qn+ti,vt[Bt+32]=Qn-ti;var Vn=.707106781*(ei+ci);vt[Bt+16]=ci+Vn,vt[Bt+48]=ci-Vn;var pr=.382683433*((Qn=Hi+ln)-(ei=Ue+Wn)),fi=.5411961*Qn+pr,gr=1.306562965*ei+pr,Hr=.707106781*(ti=ln+Ue),Wr=Wn+Hr,Gr=Wn-Hr;vt[Bt+40]=Gr+fi,vt[Bt+24]=Gr-fi,vt[Bt+8]=Wr+gr,vt[Bt+56]=Wr-gr,Bt++}for(Rt=0;Rt<64;++Rt)ne=vt[Rt]*Wt[Rt],p[Rt]=ne>0?ne+.5|0:ne-.5|0;return p})(y,R),xt=0;xt<64;++xt)T[mt[xt]]=dt[xt];var St=T[0]-B;B=T[0],St==0?pt(G[0]):(pt(G[L[Q=32767+St]]),pt(A[Q]));for(var kt=63;kt>0&&T[kt]==0;)kt--;if(kt==0)return pt(rt),B;for(var zt,P=1;P<=kt;){for(var Lt=P;T[P]==0&&P<=kt;)++P;var ae=P-Lt;if(ae>=16){zt=ae>>4;for(var Ht=1;Ht<=zt;++Ht)pt(at);ae&=15}Q=32767+T[P],pt(Y[(ae<<4)+L[Q]]),pt(A[Q]),P++}return kt!=63&&pt(rt),B}function yt(y){y=Math.min(Math.max(y,1),100),o!=y&&((function(R){for(var B=[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],G=0;G<64;G++){var Y=c((B[G]*R+50)/100);Y=Math.min(Math.max(Y,1),255),l[mt[G]]=Y}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],rt=0;rt<64;rt++){var at=c((Q[rt]*R+50)/100);at=Math.min(Math.max(at,1),255),f[mt[rt]]=at}for(var dt=[1,1.387039845,1.306562965,1.175875602,1,.785694958,.5411961,.275899379],xt=0,St=0;St<8;St++)for(var kt=0;kt<8;kt++)d[xt]=1/(l[mt[xt]]*dt[St]*dt[kt]*8),m[xt]=1/(f[mt[xt]]*dt[St]*dt[kt]*8),xt++})(y<50?Math.floor(5e3/y):Math.floor(200-2*y)),o=y)}this.encode=function(y,R){R&&yt(R),O=new Array,j=0,k=7,ut(65496),ut(65504),ut(16),nt(74),nt(70),nt(73),nt(70),nt(0),nt(1),nt(1),nt(0),ut(1),ut(1),nt(0),nt(0),(function(){ut(65499),ut(132),nt(0);for(var qt=0;qt<64;qt++)nt(l[qt]);nt(1);for(var Mt=0;Mt<64;Mt++)nt(f[Mt])})(),(function(qt,Mt){ut(65472),ut(17),nt(8),ut(Mt),ut(qt),nt(3),nt(1),nt(17),nt(0),nt(2),nt(17),nt(1),nt(3),nt(17),nt(1)})(y.width,y.height),(function(){ut(65476),ut(418),nt(0);for(var qt=0;qt<16;qt++)nt(tt[qt+1]);for(var Mt=0;Mt<=11;Mt++)nt(z[Mt]);nt(16);for(var we=0;we<16;we++)nt(et[we+1]);for(var he=0;he<=161;he++)nt(N[he]);nt(1);for(var Jt=0;Jt<16;Jt++)nt(F[Jt+1]);for(var fe=0;fe<=11;fe++)nt(U[fe]);nt(17);for(var ce=0;ce<16;ce++)nt(q[ce+1]);for(var Rt=0;Rt<=161;Rt++)nt(it[Rt])})(),ut(65498),ut(12),nt(3),nt(1),nt(0),nt(2),nt(17),nt(3),nt(17),nt(0),nt(63),nt(0);var B=0,G=0,Y=0;j=0,k=7,this.encode.displayName="_encode_";for(var Q,rt,at,dt,xt,St,kt,zt,P,Lt=y.data,ae=y.width,Ht=y.height,vt=4*ae,Wt=0;Wt<Ht;){for(Q=0;Q<vt;){for(xt=vt*Wt+Q,kt=-1,zt=0,P=0;P<64;P++)St=xt+(zt=P>>3)*vt+(kt=4*(7&P)),Wt+zt>=Ht&&(St-=vt*(Wt+1+zt-Ht)),Q+kt>=vt&&(St-=Q+kt-vt+4),rt=Lt[St++],at=Lt[St++],dt=Lt[St++],Z[P]=(_t[rt]+_t[at+256|0]+_t[dt+512|0]>>16)-128,$[P]=(_t[rt+768|0]+_t[at+1024|0]+_t[dt+1280|0]>>16)-128,M[P]=(_t[rt+1280|0]+_t[at+1536|0]+_t[dt+1792|0]>>16)-128;B=At(Z,d,B,n,i),G=At($,m,G,e,a),Y=At(M,m,Y,e,a),Q+=32}Wt+=8}if(k>=0){var Et=[];Et[1]=k+1,Et[0]=(1<<k+1)-1,pt(Et)}return ut(65497),new Uint8Array(O)},t=t||50,(function(){for(var y=String.fromCharCode,R=0;R<256;R++)lt[R]=y(R)})(),n=ft(tt,z),e=ft(F,U),i=ft(et,N),a=ft(q,it),(function(){for(var y=1,R=2,B=1;B<=15;B++){for(var G=y;G<R;G++)L[32767+G]=B,A[32767+G]=[],A[32767+G][1]=B,A[32767+G][0]=G;for(var Y=-(R-1);Y<=-y;Y++)L[32767+Y]=B,A[32767+Y]=[],A[32767+Y][1]=B,A[32767+Y][0]=R-1+Y;y<<=1,R<<=1}})(),(function(){for(var y=0;y<256;y++)_t[y]=19595*y,_t[y+256|0]=38470*y,_t[y+512|0]=7471*y+32768,_t[y+768|0]=-11059*y,_t[y+1024|0]=-21709*y,_t[y+1280|0]=32768*y+8421375,_t[y+1536|0]=-27439*y,_t[y+1792|0]=-5329*y})(),yt(t)}/**
|
||
* @license
|
||
* Copyright (c) 2017 Aras Abbasi
|
||
*
|
||
* Licensed under the MIT License.
|
||
* http://opensource.org/licenses/mit-license
|
||
*/function oi(t,n){if(this.pos=0,this.buffer=t,this.datav=new DataView(t.buffer),this.is_with_alpha=!!n,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 Xc(t){function n(z){if(!z)throw Error("assert :P")}function e(z,et,N){for(var F=0;4>F;F++)if(z[et+F]!=N.charCodeAt(F))return!0;return!1}function i(z,et,N,F,U){for(var q=0;q<U;q++)z[et+q]=N[F+q]}function a(z,et,N,F){for(var U=0;U<F;U++)z[et+U]=N}function o(z){return new Int32Array(z)}function c(z,et){for(var N=[],F=0;F<z;F++)N.push(new et);return N}function l(z,et){var N=[];return(function F(U,q,it){for(var ft=it[q],pt=0;pt<ft&&(U.push(it.length>q+1?[]:new et),!(it.length<q+1));pt++)F(U[pt],q+1,it)})(N,0,z),N}var f=function(){var z=this;function et(r,s){for(var u=1<<s-1>>>0;r&u;)u>>>=1;return u?(r&u-1)+u:r}function N(r,s,u,g,v){n(!(g%u));do r[s+(g-=u)]=v;while(0<g)}function F(r,s,u,g,v){if(n(2328>=v),512>=v)var w=o(512);else if((w=o(v))==null)return 0;return(function(_,x,S,I,H,J){var C,W,K=x,st=1<<S,X=o(16),ht=o(16);for(n(H!=0),n(I!=null),n(_!=null),n(0<S),W=0;W<H;++W){if(15<I[W])return 0;++X[I[W]]}if(X[0]==H)return 0;for(ht[1]=0,C=1;15>C;++C){if(X[C]>1<<C)return 0;ht[C+1]=ht[C]+X[C]}for(W=0;W<H;++W)C=I[W],0<I[W]&&(J[ht[C]++]=W);if(ht[15]==1)return(I=new U).g=0,I.value=J[0],N(_,K,1,st,I),st;var ct,wt=-1,bt=st-1,jt=0,Pt=1,ie=1,Ot=1<<S;for(W=0,C=1,H=2;C<=S;++C,H<<=1){if(Pt+=ie<<=1,0>(ie-=X[C]))return 0;for(;0<X[C];--X[C])(I=new U).g=C,I.value=J[W++],N(_,K+jt,H,Ot,I),jt=et(jt,C)}for(C=S+1,H=2;15>=C;++C,H<<=1){if(Pt+=ie<<=1,0>(ie-=X[C]))return 0;for(;0<X[C];--X[C]){if(I=new U,(jt&bt)!=wt){for(K+=Ot,ct=1<<(wt=C)-S;15>wt&&!(0>=(ct-=X[wt]));)++wt,ct<<=1;st+=Ot=1<<(ct=wt-S),_[x+(wt=jt&bt)].g=ct+S,_[x+wt].value=K-x-wt}I.g=C-S,I.value=J[W++],N(_,K+(jt>>S),H,Ot,I),jt=et(jt,C)}}return Pt!=2*ht[15]-1?0:st})(r,s,u,g,v,w)}function U(){this.value=this.g=0}function q(){this.value=this.g=0}function it(){this.G=c(5,U),this.H=o(5),this.jc=this.Qb=this.qb=this.nd=0,this.pd=c(ra,q)}function ft(r,s,u,g){n(r!=null),n(s!=null),n(2147483648>g),r.Ca=254,r.I=0,r.b=-8,r.Ka=0,r.oa=s,r.pa=u,r.Jd=s,r.Yc=u+g,r.Zc=4<=g?u+g-4+1:u,rt(r)}function pt(r,s){for(var u=0;0<s--;)u|=dt(r,128)<<s;return u}function nt(r,s){var u=pt(r,s);return at(r)?-u:u}function ut(r,s,u,g){var v,w=0;for(n(r!=null),n(s!=null),n(4294967288>g),r.Sb=g,r.Ra=0,r.u=0,r.h=0,4<g&&(g=4),v=0;v<g;++v)w+=s[u+v]<<8*v;r.Ra=w,r.bb=g,r.oa=s,r.pa=u}function At(r){for(;8<=r.u&&r.bb<r.Sb;)r.Ra>>>=8,r.Ra+=r.oa[r.pa+r.bb]<<Nn-8>>>0,++r.bb,r.u-=8;G(r)&&(r.h=1,r.u=0)}function yt(r,s){if(n(0<=s),!r.h&&s<=za){var u=B(r)&Lr[s];return r.u+=s,At(r),u}return r.h=1,r.u=0}function y(){this.b=this.Ca=this.I=0,this.oa=[],this.pa=0,this.Jd=[],this.Yc=0,this.Zc=[],this.Ka=0}function R(){this.Ra=0,this.oa=[],this.h=this.u=this.bb=this.Sb=this.pa=0}function B(r){return r.Ra>>>(r.u&Nn-1)>>>0}function G(r){return n(r.bb<=r.Sb),r.h||r.bb==r.Sb&&r.u>Nn}function Y(r,s){r.u=s,r.h=G(r)}function Q(r){r.u>=En&&(n(r.u>=En),At(r))}function rt(r){n(r!=null&&r.oa!=null),r.pa<r.Zc?(r.I=(r.oa[r.pa++]|r.I<<8)>>>0,r.b+=8):(n(r!=null&&r.oa!=null),r.pa<r.Yc?(r.b+=8,r.I=r.oa[r.pa++]|r.I<<8):r.Ka?r.b=0:(r.I<<=8,r.b+=8,r.Ka=1))}function at(r){return pt(r,1)}function dt(r,s){var u=r.Ca;0>r.b&&rt(r);var g=r.b,v=u*s>>>8,w=(r.I>>>g>v)+0;for(w?(u-=v,r.I-=v+1<<g>>>0):u=v+1,g=u,v=0;256<=g;)v+=8,g>>=8;return g=7^v+aa[g],r.b-=g,r.Ca=(u<<g)-1,w}function xt(r,s,u){r[s+0]=u>>24&255,r[s+1]=u>>16&255,r[s+2]=u>>8&255,r[s+3]=255&u}function St(r,s){return r[s+0]|r[s+1]<<8}function kt(r,s){return St(r,s)|r[s+2]<<16}function zt(r,s){return St(r,s)|St(r,s+2)<<16}function P(r,s){var u=1<<s;return n(r!=null),n(0<s),r.X=o(u),r.X==null?0:(r.Mb=32-s,r.Xa=s,1)}function Lt(r,s){n(r!=null),n(s!=null),n(r.Xa==s.Xa),i(s.X,0,r.X,0,1<<s.Xa)}function ae(){this.X=[],this.Xa=this.Mb=0}function Ht(r,s,u,g){n(u!=null),n(g!=null);var v=u[0],w=g[0];return v==0&&(v=(r*w+s/2)/s),w==0&&(w=(s*v+r/2)/r),0>=v||0>=w?0:(u[0]=v,g[0]=w,1)}function vt(r,s){return r+(1<<s)-1>>>s}function Wt(r,s){return((4278255360&r)+(4278255360&s)>>>0&4278255360)+((16711935&r)+(16711935&s)>>>0&16711935)>>>0}function Et(r,s){z[s]=function(u,g,v,w,_,x,S){var I;for(I=0;I<_;++I){var H=z[r](x[S+I-1],v,w+I);x[S+I]=Wt(u[g+I],H)}}}function qt(){this.ud=this.hd=this.jd=0}function Mt(r,s){return((4278124286&(r^s))>>>1)+(r&s)>>>0}function we(r){return 0<=r&&256>r?r:0>r?0:255<r?255:void 0}function he(r,s){return we(r+(r-s+.5>>1))}function Jt(r,s,u){return Math.abs(s-u)-Math.abs(r-u)}function fe(r,s,u,g,v,w,_){for(g=w[_-1],u=0;u<v;++u)w[_+u]=g=Wt(r[s+u],g)}function ce(r,s,u,g,v){var w;for(w=0;w<u;++w){var _=r[s+w],x=_>>8&255,S=16711935&(S=(S=16711935&_)+((x<<16)+x));g[v+w]=(4278255360&_)+S>>>0}}function Rt(r,s){s.jd=255&r,s.hd=r>>8&255,s.ud=r>>16&255}function ne(r,s,u,g,v,w){var _;for(_=0;_<g;++_){var x=s[u+_],S=x>>>8,I=x,H=255&(H=(H=x>>>16)+((r.jd<<24>>24)*(S<<24>>24)>>>5));I=255&(I=(I+=(r.hd<<24>>24)*(S<<24>>24)>>>5)+((r.ud<<24>>24)*(H<<24>>24)>>>5)),v[w+_]=(4278255360&x)+(H<<16)+I}}function Bt(r,s,u,g,v){z[s]=function(w,_,x,S,I,H,J,C,W){for(S=J;S<C;++S)for(J=0;J<W;++J)I[H++]=v(x[g(w[_++])])},z[r]=function(w,_,x,S,I,H,J){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;_<x;++_){var X,ht=0;for(X=0;X<W;++X)X&w||(ht=g(S[I++])),H[J++]=v(K[ht&st]),ht>>=C}else z["VP8LMapColor"+u](S,I,K,st,H,J,_,x,W)}}function We(r,s,u,g,v){for(u=s+u;s<u;){var w=r[s++];g[v++]=w>>16&255,g[v++]=w>>8&255,g[v++]=255&w}}function me(r,s,u,g,v){for(u=s+u;s<u;){var w=r[s++];g[v++]=w>>16&255,g[v++]=w>>8&255,g[v++]=255&w,g[v++]=w>>24&255}}function oe(r,s,u,g,v){for(u=s+u;s<u;){var w=(_=r[s++])>>16&240|_>>12&15,_=240&_|_>>28&15;g[v++]=w,g[v++]=_}}function se(r,s,u,g,v){for(u=s+u;s<u;){var w=(_=r[s++])>>16&248|_>>13&7,_=_>>5&224|_>>3&31;g[v++]=w,g[v++]=_}}function Re(r,s,u,g,v){for(u=s+u;s<u;){var w=r[s++];g[v++]=255&w,g[v++]=w>>8&255,g[v++]=w>>16&255}}function Ut(r,s,u,g,v,w){if(w==0)for(u=s+u;s<u;)xt(g,((w=r[s++])[0]>>24|w[1]>>8&65280|w[2]<<8&16711680|w[3]<<24)>>>0),v+=32;else i(g,v,r,s,u)}function Ee(r,s){z[s][0]=z[r+"0"],z[s][1]=z[r+"1"],z[s][2]=z[r+"2"],z[s][3]=z[r+"3"],z[s][4]=z[r+"4"],z[s][5]=z[r+"5"],z[s][6]=z[r+"6"],z[s][7]=z[r+"7"],z[s][8]=z[r+"8"],z[s][9]=z[r+"9"],z[s][10]=z[r+"10"],z[s][11]=z[r+"11"],z[s][12]=z[r+"12"],z[s][13]=z[r+"13"],z[s][14]=z[r+"0"],z[s][15]=z[r+"0"]}function Zt(r){return r==Hs||r==Ws||r==Uo||r==Gs}function Qt(){this.eb=[],this.size=this.A=this.fb=0}function je(){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 je,this.sd=null}function Gt(){this.width=[0],this.height=[0],this.Pd=[0],this.Qd=[0],this.format=[0]}function _e(){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 ur(r){return alert("todo:WebPSamplerProcessPlane"),r.T}function pn(r,s){var u=r.T,g=s.ba.f.RGBA,v=g.eb,w=g.fb+r.ka*g.A,_=Kn[s.ba.S],x=r.y,S=r.O,I=r.f,H=r.N,J=r.ea,C=r.W,W=s.cc,K=s.dc,st=s.Mc,X=s.Nc,ht=r.ka,ct=r.ka+r.T,wt=r.U,bt=wt+1>>1;for(ht==0?_(x,S,null,null,I,H,J,C,I,H,J,C,v,w,null,null,wt):(_(s.ec,s.fc,x,S,W,K,st,X,I,H,J,C,v,w-g.A,v,w,wt),++u);ht+2<ct;ht+=2)W=I,K=H,st=J,X=C,H+=r.Rc,C+=r.Rc,w+=2*g.A,_(x,(S+=2*r.fa)-r.fa,x,S,W,K,st,X,I,H,J,C,v,w-g.A,v,w,wt);return S+=r.fa,r.j+ct<r.o?(i(s.ec,s.fc,x,S,wt),i(s.cc,s.dc,I,H,bt),i(s.Mc,s.Nc,J,C,bt),u--):1&ct||_(x,S,null,null,I,H,J,C,I,H,J,C,v,w+g.A,null,null,wt),u}function Si(r,s,u){var g=r.F,v=[r.J];if(g!=null){var w=r.U,_=s.ba.S,x=_==Mo||_==Uo;s=s.ba.f.RGBA;var S=[0],I=r.ka;S[0]=r.T,r.Kb&&(I==0?--S[0]:(--I,v[0]-=r.width),r.j+r.ka+r.T==r.o&&(S[0]=r.o-r.j-I));var H=s.eb;I=s.fb+I*s.A,r=rh(g,v[0],r.width,w,S,H,I+(x?0:3),s.A),n(u==S),r&&Zt(_)&&Va(H,I,x,w,S,s.A)}return 0}function hi(r){var s=r.ma,u=s.ba.S,g=11>u,v=u==Bo||u==Do||u==Mo||u==zs||u==12||Zt(u);if(s.memory=null,s.Ib=null,s.Jb=null,s.Nd=null,!$n(s.Oa,r,v?11:12))return 0;if(v&&Zt(u)&&Ti(),r.da)alert("todo:use_scaling");else{if(g){if(s.Ib=ur,r.Kb){if(u=r.U+1>>1,s.memory=o(r.U+2*u),s.memory==null)return 0;s.ec=s.memory,s.fc=0,s.cc=s.ec,s.dc=s.fc+r.U,s.Mc=s.cc,s.Nc=s.dc+u,s.Ib=pn,Ti()}}else alert("todo:EmitYUV");v&&(s.Jb=Si,g&&Me())}if(g&&!yh){for(r=0;256>r;++r)_u[r]=89858*(r-128)+zo>>qo,Au[r]=-22014*(r-128)+zo,xu[r]=-45773*(r-128),yu[r]=113618*(r-128)+zo>>qo;for(r=$a;r<$s;++r)s=76283*(r-16)+zo>>qo,Nu[r-$a]=ui(s,255),Lu[r-$a]=ui(s+8>>4,15);yh=1}return 1}function Vt(r){var s=r.ma,u=r.U,g=r.T;return n(!(1&r.ka)),0>=u||0>=g?0:(u=s.Ib(r,s),s.Jb!=null&&s.Jb(r,s,u),s.Dc+=u,1)}function ki(r){r.ma.memory=null}function Pi(r,s,u,g){return yt(r,8)!=47?0:(s[0]=yt(r,14)+1,u[0]=yt(r,14)+1,g[0]=yt(r,1),yt(r,3)!=0?0:!r.h)}function Wn(r,s){if(4>r)return r+1;var u=r-2>>1;return(2+(1&r)<<u)+yt(s,u)+1}function Gn(r,s){return 120<s?s-120:1<=(u=((u=ou[s-1])>>4)*r+(8-(15&u)))?u:1;var u}function Ue(r,s,u){var g=B(u),v=r[s+=255&g].g-8;return 0<v&&(Y(u,u.u+8),g=B(u),s+=r[s].value,s+=g&(1<<v)-1),Y(u,u.u+r[s].g),r[s].value}function an(r,s,u){return u.g+=r.g,u.value+=r.value<<s>>>0,n(8>=u.g),r.g}function ln(r,s,u){var g=r.xc;return n((s=g==0?0:r.vc[r.md*(u>>g)+(s>>g)])<r.Wb),r.Ya[s]}function dr(r,s,u,g){var v=r.ab,w=r.c*s,_=r.C;s=_+s;var x=u,S=g;for(g=r.Ta,u=r.Ua;0<v--;){var I=r.gc[v],H=_,J=s,C=x,W=S,K=(S=g,x=u,I.Ea);switch(n(H<J),n(J<=I.nc),I.hc){case 2:oa(C,W,(J-H)*K,S,x);break;case 0:var st=H,X=J,ht=S,ct=x,wt=(Ot=I).Ea;st==0&&($i(C,W,null,null,1,ht,ct),fe(C,W+1,0,0,wt-1,ht,ct+1),W+=wt,ct+=wt,++st);for(var bt=1<<Ot.b,jt=bt-1,Pt=vt(wt,Ot.b),ie=Ot.K,Ot=Ot.w+(st>>Ot.b)*Pt;st<X;){var ue=ie,en=Ot,re=1;for(Yi(C,W,ht,ct-wt,1,ht,ct);re<wt;){var Tt=(re&~jt)+bt;Tt>wt&&(Tt=wt),(0,ni[ue[en++]>>8&15])(C,W+ +re,ht,ct+re-wt,Tt-re,ht,ct+re),re=Tt}W+=wt,ct+=wt,++st&jt||(Ot+=Pt)}J!=I.nc&&i(S,x-K,S,x+(J-H-1)*K,K);break;case 1:for(K=C,X=W,wt=(C=I.Ea)-(ct=C&~(ht=(W=1<<I.b)-1)),st=vt(C,I.b),bt=I.K,I=I.w+(H>>I.b)*st;H<J;){for(jt=bt,Pt=I,ie=new qt,Ot=X+ct,ue=X+C;X<Ot;)Rt(jt[Pt++],ie),kr(ie,K,X,W,S,x),X+=W,x+=W;X<ue&&(Rt(jt[Pt++],ie),kr(ie,K,X,wt,S,x),X+=wt,x+=wt),++H&ht||(I+=st)}break;case 3:if(C==S&&W==x&&0<I.b){for(X=S,C=K=x+(J-H)*K-(ct=(J-H)*vt(I.Ea,I.b)),W=S,ht=x,st=[],ct=(wt=ct)-1;0<=ct;--ct)st[ct]=W[ht+ct];for(ct=wt-1;0<=ct;--ct)X[C+ct]=st[ct];Sr(I,H,J,S,K,S,x)}else Sr(I,H,J,C,W,S,x)}x=g,S=u}S!=u&&i(g,u,x,S,w)}function Hi(r,s){var u=r.V,g=r.Ba+r.c*r.C,v=s-r.C;if(n(s<=r.l.o),n(16>=v),0<v){var w=r.l,_=r.Ta,x=r.Ua,S=w.width;if(dr(r,v,u,g),v=x=[x],n((u=r.C)<(g=s)),n(w.v<w.va),g>w.o&&(g=w.o),u<w.j){var I=w.j-u;u=w.j,v[0]+=I*S}if(u>=g?u=0:(v[0]+=4*w.v,w.ka=u-w.j,w.U=w.va-w.v,w.T=g-u,u=1),u){if(x=x[0],11>(u=r.ca).S){var H=u.f.RGBA,J=(g=u.S,v=w.U,w=w.T,I=H.eb,H.A),C=w;for(H=H.fb+r.Ma*H.A;0<C--;){var W=_,K=x,st=v,X=I,ht=H;switch(g){case jo:Ha(W,K,st,X,ht);break;case Bo:Wa(W,K,st,X,ht);break;case Hs:Wa(W,K,st,X,ht),Va(X,ht,0,st,1,0);break;case fh:Er(W,K,st,X,ht);break;case Do:Ut(W,K,st,X,ht,1);break;case Ws:Ut(W,K,st,X,ht,1),Va(X,ht,0,st,1,0);break;case Mo:Ut(W,K,st,X,ht,0);break;case Uo:Ut(W,K,st,X,ht,0),Va(X,ht,1,st,1,0);break;case zs:sa(W,K,st,X,ht);break;case Gs:sa(W,K,st,X,ht),ih(X,ht,st,1,0);break;case uh:Pr(W,K,st,X,ht);break;default:n(0)}x+=S,H+=J}r.Ma+=w}else alert("todo:EmitRescaledRowsYUVA");n(r.Ma<=u.height)}}r.C=s,n(r.C<=r.i)}function Qn(r){var s;if(0<r.ua)return 0;for(s=0;s<r.Wb;++s){var u=r.Ya[s].G,g=r.Ya[s].H;if(0<u[1][g[1]+0].g||0<u[2][g[2]+0].g||0<u[3][g[3]+0].g)return 0}return 1}function ci(r,s,u,g,v,w){if(r.Z!=0){var _=r.qd,x=r.rd;for(n(Qi[r.Z]!=null);s<u;++s)Qi[r.Z](_,x,g,v,g,v,w),_=g,x=v,v+=w;r.qd=_,r.rd=x}}function ti(r,s){var u=r.l.ma,g=u.Z==0||u.Z==1?r.l.j:r.C;if(g=r.C<g?g:r.C,n(s<=r.l.o),s>g){var v=r.l.width,w=u.ca,_=u.tb+v*g,x=r.V,S=r.Ba+r.c*g,I=r.gc;n(r.ab==1),n(I[0].hc==3),Us(I[0],g,s,x,S,w,_),ci(u,g,s,w,_,v)}r.C=r.Ma=s}function ei(r,s,u,g,v,w,_){var x=r.$/g,S=r.$%g,I=r.m,H=r.s,J=u+r.$,C=J;v=u+g*v;var W=u+g*w,K=280+H.ua,st=r.Pb?x:16777216,X=0<H.ua?H.Wa:null,ht=H.wc,ct=J<W?ln(H,S,x):null;n(r.C<w),n(W<=v);var wt=!1;t:for(;;){for(;wt||J<W;){var bt=0;if(x>=st){var jt=J-u;n((st=r).Pb),st.wd=st.m,st.xd=jt,0<st.s.ua&&Lt(st.s.Wa,st.s.vb),st=x+lu}if(S&ht||(ct=ln(H,S,x)),n(ct!=null),ct.Qb&&(s[J]=ct.qb,wt=!0),!wt)if(Q(I),ct.jc){bt=I,jt=s;var Pt=J,ie=ct.pd[B(bt)&ra-1];n(ct.jc),256>ie.g?(Y(bt,bt.u+ie.g),jt[Pt]=ie.value,bt=0):(Y(bt,bt.u+ie.g-256),n(256<=ie.value),bt=ie.value),bt==0&&(wt=!0)}else bt=Ue(ct.G[0],ct.H[0],I);if(I.h)break;if(wt||256>bt){if(!wt)if(ct.nd)s[J]=(ct.qb|bt<<8)>>>0;else{if(Q(I),wt=Ue(ct.G[1],ct.H[1],I),Q(I),jt=Ue(ct.G[2],ct.H[2],I),Pt=Ue(ct.G[3],ct.H[3],I),I.h)break;s[J]=(Pt<<24|wt<<16|bt<<8|jt)>>>0}if(wt=!1,++J,++S>=g&&(S=0,++x,_!=null&&x<=w&&!(x%16)&&_(r,x),X!=null))for(;C<J;)bt=s[C++],X.X[(506832829*bt&4294967295)>>>X.Mb]=bt}else if(280>bt){if(bt=Wn(bt-256,I),jt=Ue(ct.G[4],ct.H[4],I),Q(I),jt=Gn(g,jt=Wn(jt,I)),I.h)break;if(J-u<jt||v-J<bt)break t;for(Pt=0;Pt<bt;++Pt)s[J+Pt]=s[J+Pt-jt];for(J+=bt,S+=bt;S>=g;)S-=g,++x,_!=null&&x<=w&&!(x%16)&&_(r,x);if(n(J<=v),S&ht&&(ct=ln(H,S,x)),X!=null)for(;C<J;)bt=s[C++],X.X[(506832829*bt&4294967295)>>>X.Mb]=bt}else{if(!(bt<K))break t;for(wt=bt-280,n(X!=null);C<J;)bt=s[C++],X.X[(506832829*bt&4294967295)>>>X.Mb]=bt;bt=J,n(!(wt>>>(jt=X).Xa)),s[bt]=jt.X[wt],wt=!0}wt||n(I.h==G(I))}if(r.Pb&&I.h&&J<v)n(r.m.h),r.a=5,r.m=r.wd,r.$=r.xd,0<r.s.ua&&Lt(r.s.vb,r.s.Wa);else{if(I.h)break t;_!=null&&_(r,x>w?w:x),r.a=0,r.$=J-u}return 1}return r.a=3,0}function Vn(r){n(r!=null),r.vc=null,r.yc=null,r.Ya=null;var s=r.Wa;s!=null&&(s.X=null),r.vb=null,n(r!=null)}function pr(){var r=new Ft;return r==null?null:(r.a=0,r.xb=gh,Ee("Predictor","VP8LPredictors"),Ee("Predictor","VP8LPredictors_C"),Ee("PredictorAdd","VP8LPredictorsAdd"),Ee("PredictorAdd","VP8LPredictorsAdd_C"),oa=ce,kr=ne,Ha=We,Wa=me,sa=oe,Pr=se,Er=Re,z.VP8LMapColor32b=Qe,z.VP8LMapColor8b=bi,r)}function fi(r,s,u,g,v){var w=1,_=[r],x=[s],S=g.m,I=g.s,H=null,J=0;t:for(;;){if(u)for(;w&&yt(S,1);){var C=_,W=x,K=g,st=1,X=K.m,ht=K.gc[K.ab],ct=yt(X,2);if(K.Oc&1<<ct)w=0;else{switch(K.Oc|=1<<ct,ht.hc=ct,ht.Ea=C[0],ht.nc=W[0],ht.K=[null],++K.ab,n(4>=K.ab),ct){case 0:case 1:ht.b=yt(X,3)+2,st=fi(vt(ht.Ea,ht.b),vt(ht.nc,ht.b),0,K,ht.K),ht.K=ht.K[0];break;case 3:var wt,bt=yt(X,8)+1,jt=16<bt?0:4<bt?1:2<bt?2:3;if(C[0]=vt(ht.Ea,jt),ht.b=jt,wt=st=fi(bt,1,0,K,ht.K)){var Pt,ie=bt,Ot=ht,ue=1<<(8>>Ot.b),en=o(ue);if(en==null)wt=0;else{var re=Ot.K[0],Tt=Ot.w;for(en[0]=Ot.K[0][0],Pt=1;Pt<1*ie;++Pt)en[Pt]=Wt(re[Tt+Pt],en[Pt-1]);for(;Pt<4*ue;++Pt)en[Pt]=0;Ot.K[0]=null,Ot.K[0]=en,wt=1}}st=wt;break;case 2:break;default:n(0)}w=st}}if(_=_[0],x=x[0],w&&yt(S,1)&&!(w=1<=(J=yt(S,4))&&11>=J)){g.a=3;break t}var Nt;if(Nt=w)e:{var Ve,ee,ge,Te=g,cn=_,Ln=x,qe=J,vn=u,Sn=Te.m,nn=Te.s,be=[null],ye=1,ze=0,xe=su[qe];n:for(;;){if(vn&&yt(Sn,1)){var fn=yt(Sn,3)+2,ri=vt(cn,fn),Ze=vt(Ln,fn),In=ri*Ze;if(!fi(ri,Ze,0,Te,be))break n;for(be=be[0],nn.xc=fn,Ve=0;Ve<In;++Ve){var Se=be[Ve]>>8&65535;be[Ve]=Se,Se>=ye&&(ye=Se+1)}}if(Sn.h)break n;for(ee=0;5>ee;++ee){var rn=dh[ee];!ee&&0<qe&&(rn+=1<<qe),ze<rn&&(ze=rn)}var jn=c(ye*xe,U),kn=ye,Bn=c(kn,it);if(Bn==null)var Dn=null;else n(65536>=kn),Dn=Bn;var Cn=o(ze);if(Dn==null||Cn==null||jn==null){Te.a=1;break n}var Mn=jn;for(Ve=ge=0;Ve<ye;++Ve){var Fe=Dn[Ve],Un=Fe.G,ai=Fe.H,Ir=0,Di=1,un=0;for(ee=0;5>ee;++ee){rn=dh[ee],Un[ee]=Mn,ai[ee]=ge,!ee&&0<qe&&(rn+=1<<qe);r:{var Wo,Ys=rn,Go=Te,Ya=Cn,Pu=Mn,Eu=ge,Ks=0,tr=Go.m,Iu=yt(tr,1);if(a(Ya,0,0,Ys),Iu){var Cu=yt(tr,1)+1,Fu=yt(tr,1),Nh=yt(tr,Fu==0?1:8);Ya[Nh]=1,Cu==2&&(Ya[Nh=yt(tr,8)]=1);var Vo=1}else{var Lh=o(19),Sh=yt(tr,4)+4;if(19<Sh){Go.a=3;var Zo=0;break r}for(Wo=0;Wo<Sh;++Wo)Lh[au[Wo]]=yt(tr,3);var Xs=void 0,Ka=void 0,kh=Go,Ou=Lh,$o=Ys,Ph=Ya,Js=0,er=kh.m,Eh=8,Ih=c(128,U);i:for(;F(Ih,0,7,Ou,19);){if(yt(er,1)){var Tu=2+2*yt(er,3);if((Xs=2+yt(er,Tu))>$o)break i}else Xs=$o;for(Ka=0;Ka<$o&&Xs--;){Q(er);var Ch=Ih[0+(127&B(er))];Y(er,er.u+Ch.g);var ca=Ch.value;if(16>ca)Ph[Ka++]=ca,ca!=0&&(Eh=ca);else{var Ru=ca==16,Fh=ca-16,ju=iu[Fh],Oh=yt(er,nu[Fh])+ju;if(Ka+Oh>$o)break i;for(var Bu=Ru?Eh:0;0<Oh--;)Ph[Ka++]=Bu}}Js=1;break i}Js||(kh.a=3),Vo=Js}(Vo=Vo&&!tr.h)&&(Ks=F(Pu,Eu,8,Ya,Ys)),Vo&&Ks!=0?Zo=Ks:(Go.a=3,Zo=0)}if(Zo==0)break n;if(Di&&ru[ee]==1&&(Di=Mn[ge].g==0),Ir+=Mn[ge].g,ge+=Zo,3>=ee){var Xa,Qs=Cn[0];for(Xa=1;Xa<rn;++Xa)Cn[Xa]>Qs&&(Qs=Cn[Xa]);un+=Qs}}if(Fe.nd=Di,Fe.Qb=0,Di&&(Fe.qb=(Un[3][ai[3]+0].value<<24|Un[1][ai[1]+0].value<<16|Un[2][ai[2]+0].value)>>>0,Ir==0&&256>Un[0][ai[0]+0].value&&(Fe.Qb=1,Fe.qb+=Un[0][ai[0]+0].value<<8)),Fe.jc=!Fe.Qb&&6>un,Fe.jc){var Yo,Mi=Fe;for(Yo=0;Yo<ra;++Yo){var nr=Yo,ir=Mi.pd[nr],Ko=Mi.G[0][Mi.H[0]+nr];256<=Ko.value?(ir.g=Ko.g+256,ir.value=Ko.value):(ir.g=0,ir.value=0,nr>>=an(Ko,8,ir),nr>>=an(Mi.G[1][Mi.H[1]+nr],16,ir),nr>>=an(Mi.G[2][Mi.H[2]+nr],0,ir),an(Mi.G[3][Mi.H[3]+nr],24,ir))}}}nn.vc=be,nn.Wb=ye,nn.Ya=Dn,nn.yc=jn,Nt=1;break e}Nt=0}if(!(w=Nt)){g.a=3;break t}if(0<J){if(I.ua=1<<J,!P(I.Wa,J)){g.a=1,w=0;break t}}else I.ua=0;var tl=g,Th=_,Du=x,el=tl.s,nl=el.xc;if(tl.c=Th,tl.i=Du,el.md=vt(Th,nl),el.wc=nl==0?-1:(1<<nl)-1,u){g.xb=gu;break t}if((H=o(_*x))==null){g.a=1,w=0;break t}w=(w=ei(g,H,0,_,x,x,null))&&!S.h;break t}return w?(v!=null?v[0]=H:(n(H==null),n(u)),g.$=0,u||Vn(I)):Vn(I),w}function gr(r,s){var u=r.c*r.i,g=u+s+16*s;return n(r.c<=s),r.V=o(g),r.V==null?(r.Ta=null,r.Ua=0,r.a=1,0):(r.Ta=r.V,r.Ua=r.Ba+u+s,1)}function Hr(r,s){var u=r.C,g=s-u,v=r.V,w=r.Ba+r.c*u;for(n(s<=r.l.o);0<g;){var _=16<g?16:g,x=r.l.ma,S=r.l.width,I=S*_,H=x.ca,J=x.tb+S*u,C=r.Ta,W=r.Ua;dr(r,_,v,w),ah(C,W,H,J,I),ci(x,u,u+_,H,J,S),g-=_,v+=_*r.c,u+=_}n(u==s),r.C=r.Ma=s}function Wr(){this.ub=this.yd=this.td=this.Rb=0}function Gr(){this.Kd=this.Ld=this.Ud=this.Td=this.i=this.c=0}function xs(){this.Fb=this.Bb=this.Cb=0,this.Zb=o(4),this.Lb=o(4)}function Ea(){this.Yb=(function(){var r=[];return(function s(u,g,v){for(var w=v[g],_=0;_<w&&(u.push(v.length>g+1?[]:0),!(v.length<g+1));_++)s(u[_],g+1,v)})(r,0,[3,11]),r})()}function bo(){this.jb=o(3),this.Wc=l([4,8],Ea),this.Xc=l([4,17],Ea)}function vo(){this.Pc=this.wb=this.Tb=this.zd=0,this.vd=new o(4),this.od=new o(4)}function Zn(){this.ld=this.La=this.dd=this.tc=0}function Ia(){this.Na=this.la=0}function wo(){this.Sc=[0,0],this.Eb=[0,0],this.Qc=[0,0],this.ia=this.lc=0}function Ca(){this.ad=o(384),this.Za=0,this.Ob=o(16),this.$b=this.Ad=this.ia=this.Gc=this.Hc=this.Dd=0}function _o(){this.uc=this.M=this.Nb=0,this.wa=Array(new Zn),this.Y=0,this.ya=Array(new Ca),this.aa=0,this.l=new Vr}function yo(){this.y=o(16),this.f=o(8),this.ea=o(8)}function xo(){this.cb=this.a=0,this.sc="",this.m=new y,this.Od=new Wr,this.Kc=new Gr,this.ed=new vo,this.Qa=new xs,this.Ic=this.$c=this.Aa=0,this.D=new _o,this.Xb=this.Va=this.Hb=this.zb=this.yb=this.Ub=this.za=0,this.Jc=c(8,y),this.ia=0,this.pb=c(4,wo),this.Pa=new bo,this.Bd=this.kc=0,this.Ac=[],this.Bc=0,this.zc=[0,0,0,0],this.Gd=Array(new yo),this.Hd=0,this.rb=Array(new Ia),this.sb=0,this.wa=Array(new Zn),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 Ca),this.L=this.aa=0,this.gd=l([4,2],Zn),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 ui(r,s){return 0>r?0:r>s?s:r}function Vr(){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 As(){var r=new xo;return r!=null&&(r.a=0,r.sc="OK",r.cb=0,r.Xb=0,Za||(Za=Zr)),r}function Xe(r,s,u){return r.a==0&&(r.a=s,r.sc=u,r.cb=0),0}function Ao(r,s,u){return 3<=u&&r[s+0]==157&&r[s+1]==1&&r[s+2]==42}function di(r,s){if(r==null)return 0;if(r.a=0,r.sc="OK",s==null)return Xe(r,2,"null VP8Io passed to VP8GetHeaders()");var u=s.data,g=s.w,v=s.ha;if(4>v)return Xe(r,7,"Truncated header.");var w=u[g+0]|u[g+1]<<8|u[g+2]<<16,_=r.Od;if(_.Rb=!(1&w),_.td=w>>1&7,_.yd=w>>4&1,_.ub=w>>5,3<_.td)return Xe(r,3,"Incorrect keyframe parameters.");if(!_.yd)return Xe(r,4,"Frame not displayable.");g+=3,v-=3;var x=r.Kc;if(_.Rb){if(7>v)return Xe(r,7,"cannot parse picture header");if(!Ao(u,g,v))return Xe(r,3,"Bad code word");x.c=16383&(u[g+4]<<8|u[g+3]),x.Td=u[g+4]>>6,x.i=16383&(u[g+6]<<8|u[g+5]),x.Ud=u[g+6]>>6,g+=7,v-=7,r.za=x.c+15>>4,r.Ub=x.i+15>>4,s.width=x.c,s.height=x.i,s.Da=0,s.j=0,s.v=0,s.va=s.width,s.o=s.height,s.da=0,s.ib=s.width,s.hb=s.height,s.U=s.width,s.T=s.height,a((w=r.Pa).jb,0,255,w.jb.length),n((w=r.Qa)!=null),w.Cb=0,w.Bb=0,w.Fb=1,a(w.Zb,0,0,w.Zb.length),a(w.Lb,0,0,w.Lb)}if(_.ub>v)return Xe(r,7,"bad partition length");ft(w=r.m,u,g,_.ub),g+=_.ub,v-=_.ub,_.Rb&&(x.Ld=at(w),x.Kd=at(w)),x=r.Qa;var S,I=r.Pa;if(n(w!=null),n(x!=null),x.Cb=at(w),x.Cb){if(x.Bb=at(w),at(w)){for(x.Fb=at(w),S=0;4>S;++S)x.Zb[S]=at(w)?nt(w,7):0;for(S=0;4>S;++S)x.Lb[S]=at(w)?nt(w,6):0}if(x.Bb)for(S=0;3>S;++S)I.jb[S]=at(w)?pt(w,8):255}else x.Bb=0;if(w.Ka)return Xe(r,3,"cannot parse segment header");if((x=r.ed).zd=at(w),x.Tb=pt(w,6),x.wb=pt(w,3),x.Pc=at(w),x.Pc&&at(w)){for(I=0;4>I;++I)at(w)&&(x.vd[I]=nt(w,6));for(I=0;4>I;++I)at(w)&&(x.od[I]=nt(w,6))}if(r.L=x.Tb==0?0:x.zd?1:2,w.Ka)return Xe(r,3,"cannot parse filter header");var H=v;if(v=S=g,g=S+H,x=H,r.Xb=(1<<pt(r.m,2))-1,H<3*(I=r.Xb))u=7;else{for(S+=3*I,x-=3*I,H=0;H<I;++H){var J=u[v+0]|u[v+1]<<8|u[v+2]<<16;J>x&&(J=x),ft(r.Jc[+H],u,S,J),S+=J,x-=J,v+=3}ft(r.Jc[+I],u,S,x),u=S<g?0:5}if(u!=0)return Xe(r,u,"cannot parse partitions");for(u=pt(S=r.m,7),v=at(S)?nt(S,4):0,g=at(S)?nt(S,4):0,x=at(S)?nt(S,4):0,I=at(S)?nt(S,4):0,S=at(S)?nt(S,4):0,H=r.Qa,J=0;4>J;++J){if(H.Cb){var C=H.Zb[J];H.Fb||(C+=u)}else{if(0<J){r.pb[J]=r.pb[0];continue}C=u}var W=r.pb[J];W.Sc[0]=Vs[ui(C+v,127)],W.Sc[1]=Zs[ui(C+0,127)],W.Eb[0]=2*Vs[ui(C+g,127)],W.Eb[1]=101581*Zs[ui(C+x,127)]>>16,8>W.Eb[1]&&(W.Eb[1]=8),W.Qc[0]=Vs[ui(C+I,117)],W.Qc[1]=Zs[ui(C+S,127)],W.lc=C+S}if(!_.Rb)return Xe(r,4,"Not a key frame.");for(at(w),_=r.Pa,u=0;4>u;++u){for(v=0;8>v;++v)for(g=0;3>g;++g)for(x=0;11>x;++x)I=dt(w,du[u][v][g][x])?pt(w,8):fu[u][v][g][x],_.Wc[u][v].Yb[g][x]=I;for(v=0;17>v;++v)_.Xc[u][v]=_.Wc[u][pu[v]]}return r.kc=at(w),r.kc&&(r.Bd=pt(w,8)),r.cb=1}function Zr(r,s,u,g,v,w,_){var x=s[v].Yb[u];for(u=0;16>v;++v){if(!dt(r,x[u+0]))return v;for(;!dt(r,x[u+1]);)if(x=s[++v].Yb[0],u=0,v==16)return 16;var S=s[v+1].Yb;if(dt(r,x[u+2])){var I=r,H=0;if(dt(I,(C=x)[(J=u)+3]))if(dt(I,C[J+6])){for(x=0,J=2*(H=dt(I,C[J+8]))+(C=dt(I,C[J+9+H])),H=0,C=hu[J];C[x];++x)H+=H+dt(I,C[x]);H+=3+(8<<J)}else dt(I,C[J+7])?(H=7+2*dt(I,165),H+=dt(I,145)):H=5+dt(I,159);else H=dt(I,C[J+4])?3+dt(I,C[J+5]):2;x=S[2]}else H=1,x=S[1];S=_+cu[v],0>(I=r).b&&rt(I);var J,C=I.b,W=(J=I.Ca>>1)-(I.I>>C)>>31;--I.b,I.Ca+=W,I.Ca|=1,I.I-=(J+1&W)<<C,w[S]=((H^W)-W)*g[(0<v)+0]}return 16}function Fa(r){var s=r.rb[r.sb-1];s.la=0,s.Na=0,a(r.zc,0,0,r.zc.length),r.ja=0}function Tn(r,s,u,g,v){v=r[s+u+32*g]+(v>>3),r[s+u+32*g]=-256&v?0>v?0:255:v}function $r(r,s,u,g,v,w){Tn(r,s,0,u,g+v),Tn(r,s,1,u,g+w),Tn(r,s,2,u,g-w),Tn(r,s,3,u,g-v)}function Ei(r){return(20091*r>>16)+r}function hn(r,s,u,g){var v,w=0,_=o(16);for(v=0;4>v;++v){var x=r[s+0]+r[s+8],S=r[s+0]-r[s+8],I=(35468*r[s+4]>>16)-Ei(r[s+12]),H=Ei(r[s+4])+(35468*r[s+12]>>16);_[w+0]=x+H,_[w+1]=S+I,_[w+2]=S-I,_[w+3]=x-H,w+=4,s++}for(v=w=0;4>v;++v)x=(r=_[w+0]+4)+_[w+8],S=r-_[w+8],I=(35468*_[w+4]>>16)-Ei(_[w+12]),Tn(u,g,0,0,x+(H=Ei(_[w+4])+(35468*_[w+12]>>16))),Tn(u,g,1,0,S+I),Tn(u,g,2,0,S-I),Tn(u,g,3,0,x-H),w++,g+=32}function No(r,s,u,g){var v=r[s+0]+4,w=35468*r[s+4]>>16,_=Ei(r[s+4]),x=35468*r[s+1]>>16;$r(u,g,0,v+_,r=Ei(r[s+1]),x),$r(u,g,1,v+w,r,x),$r(u,g,2,v-w,r,x),$r(u,g,3,v-_,r,x)}function Ns(r,s,u,g,v){hn(r,s,u,g),v&&hn(r,s+16,u,g+4)}function Ls(r,s,u,g){Ri(r,s+0,u,g,1),Ri(r,s+32,u,g+128,1)}function Ss(r,s,u,g){var v;for(r=r[s+0]+4,v=0;4>v;++v)for(s=0;4>s;++s)Tn(u,g,s,v,r)}function pi(r,s,u,g){r[s+0]&&bn(r,s+0,u,g),r[s+16]&&bn(r,s+16,u,g+4),r[s+32]&&bn(r,s+32,u,g+128),r[s+48]&&bn(r,s+48,u,g+128+4)}function Lo(r,s,u,g){var v,w=o(16);for(v=0;4>v;++v){var _=r[s+0+v]+r[s+12+v],x=r[s+4+v]+r[s+8+v],S=r[s+4+v]-r[s+8+v],I=r[s+0+v]-r[s+12+v];w[0+v]=_+x,w[8+v]=_-x,w[4+v]=I+S,w[12+v]=I-S}for(v=0;4>v;++v)_=(r=w[0+4*v]+3)+w[3+4*v],x=w[1+4*v]+w[2+4*v],S=w[1+4*v]-w[2+4*v],I=r-w[3+4*v],u[g+0]=_+x>>3,u[g+16]=I+S>>3,u[g+32]=_-x>>3,u[g+48]=I-S>>3,g+=64}function Yr(r,s,u){var g,v=s-32,w=Rn,_=255-r[v-1];for(g=0;g<u;++g){var x,S=w,I=_+r[s-1];for(x=0;x<u;++x)r[s+x]=S[I+r[v+x]];s+=32}}function Kr(r,s){Yr(r,s,4)}function Oa(r,s){Yr(r,s,8)}function ks(r,s){Yr(r,s,16)}function Ps(r,s){var u;for(u=0;16>u;++u)i(r,s+32*u,r,s-32,16)}function Es(r,s){var u;for(u=16;0<u;--u)a(r,s,r[s-1],16),s+=32}function Wi(r,s,u){var g;for(g=0;16>g;++g)a(s,u+32*g,r,16)}function So(r,s){var u,g=16;for(u=0;16>u;++u)g+=r[s-1+32*u]+r[s+u-32];Wi(g>>5,r,s)}function Gi(r,s){var u,g=8;for(u=0;16>u;++u)g+=r[s-1+32*u];Wi(g>>4,r,s)}function Is(r,s){var u,g=8;for(u=0;16>u;++u)g+=r[s+u-32];Wi(g>>4,r,s)}function mr(r,s){Wi(128,r,s)}function $t(r,s,u){return r+2*s+u+2>>2}function Cs(r,s){var u,g=s-32;for(g=new Uint8Array([$t(r[g-1],r[g+0],r[g+1]),$t(r[g+0],r[g+1],r[g+2]),$t(r[g+1],r[g+2],r[g+3]),$t(r[g+2],r[g+3],r[g+4])]),u=0;4>u;++u)i(r,s+32*u,g,0,g.length)}function Fs(r,s){var u=r[s-1],g=r[s-1+32],v=r[s-1+64],w=r[s-1+96];xt(r,s+0,16843009*$t(r[s-1-32],u,g)),xt(r,s+32,16843009*$t(u,g,v)),xt(r,s+64,16843009*$t(g,v,w)),xt(r,s+96,16843009*$t(v,w,w))}function Os(r,s){var u,g=4;for(u=0;4>u;++u)g+=r[s+u-32]+r[s-1+32*u];for(g>>=3,u=0;4>u;++u)a(r,s+32*u,g,4)}function Ts(r,s){var u=r[s-1+0],g=r[s-1+32],v=r[s-1+64],w=r[s-1-32],_=r[s+0-32],x=r[s+1-32],S=r[s+2-32],I=r[s+3-32];r[s+0+96]=$t(g,v,r[s-1+96]),r[s+1+96]=r[s+0+64]=$t(u,g,v),r[s+2+96]=r[s+1+64]=r[s+0+32]=$t(w,u,g),r[s+3+96]=r[s+2+64]=r[s+1+32]=r[s+0+0]=$t(_,w,u),r[s+3+64]=r[s+2+32]=r[s+1+0]=$t(x,_,w),r[s+3+32]=r[s+2+0]=$t(S,x,_),r[s+3+0]=$t(I,S,x)}function Rs(r,s){var u=r[s+1-32],g=r[s+2-32],v=r[s+3-32],w=r[s+4-32],_=r[s+5-32],x=r[s+6-32],S=r[s+7-32];r[s+0+0]=$t(r[s+0-32],u,g),r[s+1+0]=r[s+0+32]=$t(u,g,v),r[s+2+0]=r[s+1+32]=r[s+0+64]=$t(g,v,w),r[s+3+0]=r[s+2+32]=r[s+1+64]=r[s+0+96]=$t(v,w,_),r[s+3+32]=r[s+2+64]=r[s+1+96]=$t(w,_,x),r[s+3+64]=r[s+2+96]=$t(_,x,S),r[s+3+96]=$t(x,S,S)}function Ii(r,s){var u=r[s-1+0],g=r[s-1+32],v=r[s-1+64],w=r[s-1-32],_=r[s+0-32],x=r[s+1-32],S=r[s+2-32],I=r[s+3-32];r[s+0+0]=r[s+1+64]=w+_+1>>1,r[s+1+0]=r[s+2+64]=_+x+1>>1,r[s+2+0]=r[s+3+64]=x+S+1>>1,r[s+3+0]=S+I+1>>1,r[s+0+96]=$t(v,g,u),r[s+0+64]=$t(g,u,w),r[s+0+32]=r[s+1+96]=$t(u,w,_),r[s+1+32]=r[s+2+96]=$t(w,_,x),r[s+2+32]=r[s+3+96]=$t(_,x,S),r[s+3+32]=$t(x,S,I)}function Ci(r,s){var u=r[s+0-32],g=r[s+1-32],v=r[s+2-32],w=r[s+3-32],_=r[s+4-32],x=r[s+5-32],S=r[s+6-32],I=r[s+7-32];r[s+0+0]=u+g+1>>1,r[s+1+0]=r[s+0+64]=g+v+1>>1,r[s+2+0]=r[s+1+64]=v+w+1>>1,r[s+3+0]=r[s+2+64]=w+_+1>>1,r[s+0+32]=$t(u,g,v),r[s+1+32]=r[s+0+96]=$t(g,v,w),r[s+2+32]=r[s+1+96]=$t(v,w,_),r[s+3+32]=r[s+2+96]=$t(w,_,x),r[s+3+64]=$t(_,x,S),r[s+3+96]=$t(x,S,I)}function js(r,s){var u=r[s-1+0],g=r[s-1+32],v=r[s-1+64],w=r[s-1+96];r[s+0+0]=u+g+1>>1,r[s+2+0]=r[s+0+32]=g+v+1>>1,r[s+2+32]=r[s+0+64]=v+w+1>>1,r[s+1+0]=$t(u,g,v),r[s+3+0]=r[s+1+32]=$t(g,v,w),r[s+3+32]=r[s+1+64]=$t(v,w,w),r[s+3+64]=r[s+2+64]=r[s+0+96]=r[s+1+96]=r[s+2+96]=r[s+3+96]=w}function Bs(r,s){var u=r[s-1+0],g=r[s-1+32],v=r[s-1+64],w=r[s-1+96],_=r[s-1-32],x=r[s+0-32],S=r[s+1-32],I=r[s+2-32];r[s+0+0]=r[s+2+32]=u+_+1>>1,r[s+0+32]=r[s+2+64]=g+u+1>>1,r[s+0+64]=r[s+2+96]=v+g+1>>1,r[s+0+96]=w+v+1>>1,r[s+3+0]=$t(x,S,I),r[s+2+0]=$t(_,x,S),r[s+1+0]=r[s+3+32]=$t(u,_,x),r[s+1+32]=r[s+3+64]=$t(g,u,_),r[s+1+64]=r[s+3+96]=$t(v,g,u),r[s+1+96]=$t(w,v,g)}function Xr(r,s){var u;for(u=0;8>u;++u)i(r,s+32*u,r,s-32,8)}function Ta(r,s){var u;for(u=0;8>u;++u)a(r,s,r[s-1],8),s+=32}function gi(r,s,u){var g;for(g=0;8>g;++g)a(s,u+32*g,r,8)}function Ds(r,s){var u,g=8;for(u=0;8>u;++u)g+=r[s+u-32]+r[s-1+32*u];gi(g>>4,r,s)}function Jr(r,s){var u,g=4;for(u=0;8>u;++u)g+=r[s+u-32];gi(g>>3,r,s)}function Ms(r,s){var u,g=4;for(u=0;8>u;++u)g+=r[s-1+32*u];gi(g>>3,r,s)}function Ra(r,s){gi(128,r,s)}function Vi(r,s,u){var g=r[s-u],v=r[s+0],w=3*(v-g)+qs[1020+r[s-2*u]-r[s+u]],_=Ro[112+(w+4>>3)];r[s-u]=Rn[255+g+Ro[112+(w+3>>3)]],r[s+0]=Rn[255+v-_]}function ja(r,s,u,g){var v=r[s+0],w=r[s+u];return Yn[255+r[s-2*u]-r[s-u]]>g||Yn[255+w-v]>g}function br(r,s,u,g){return 4*Yn[255+r[s-u]-r[s+0]]+Yn[255+r[s-2*u]-r[s+u]]<=g}function Ba(r,s,u,g,v){var w=r[s-3*u],_=r[s-2*u],x=r[s-u],S=r[s+0],I=r[s+u],H=r[s+2*u],J=r[s+3*u];return 4*Yn[255+x-S]+Yn[255+_-I]>g?0:Yn[255+r[s-4*u]-w]<=v&&Yn[255+w-_]<=v&&Yn[255+_-x]<=v&&Yn[255+J-H]<=v&&Yn[255+H-I]<=v&&Yn[255+I-S]<=v}function Qr(r,s,u,g){var v=2*g+1;for(g=0;16>g;++g)br(r,s+g,u,v)&&Vi(r,s+g,u)}function Da(r,s,u,g){var v=2*g+1;for(g=0;16>g;++g)br(r,s+g*u,1,v)&&Vi(r,s+g*u,1)}function ta(r,s,u,g){var v;for(v=3;0<v;--v)Qr(r,s+=4*u,u,g)}function ko(r,s,u,g){var v;for(v=3;0<v;--v)Da(r,s+=4,u,g)}function Fi(r,s,u,g,v,w,_,x){for(w=2*w+1;0<v--;){if(Ba(r,s,u,w,_))if(ja(r,s,u,x))Vi(r,s,u);else{var S=r,I=s,H=u,J=S[I-2*H],C=S[I-H],W=S[I+0],K=S[I+H],st=S[I+2*H],X=27*(ct=qs[1020+3*(W-C)+qs[1020+J-K]])+63>>7,ht=18*ct+63>>7,ct=9*ct+63>>7;S[I-3*H]=Rn[255+S[I-3*H]+ct],S[I-2*H]=Rn[255+J+ht],S[I-H]=Rn[255+C+X],S[I+0]=Rn[255+W-X],S[I+H]=Rn[255+K-ht],S[I+2*H]=Rn[255+st-ct]}s+=g}}function Oi(r,s,u,g,v,w,_,x){for(w=2*w+1;0<v--;){if(Ba(r,s,u,w,_))if(ja(r,s,u,x))Vi(r,s,u);else{var S=r,I=s,H=u,J=S[I-H],C=S[I+0],W=S[I+H],K=Ro[112+(4+(st=3*(C-J))>>3)],st=Ro[112+(st+3>>3)],X=K+1>>1;S[I-2*H]=Rn[255+S[I-2*H]+X],S[I-H]=Rn[255+J+st],S[I+0]=Rn[255+C-K],S[I+H]=Rn[255+W-X]}s+=g}}function Po(r,s,u,g,v,w){Fi(r,s,u,1,16,g,v,w)}function Eo(r,s,u,g,v,w){Fi(r,s,1,u,16,g,v,w)}function Io(r,s,u,g,v,w){var _;for(_=3;0<_;--_)Oi(r,s+=4*u,u,1,16,g,v,w)}function vr(r,s,u,g,v,w){var _;for(_=3;0<_;--_)Oi(r,s+=4,1,u,16,g,v,w)}function Co(r,s,u,g,v,w,_,x){Fi(r,s,v,1,8,w,_,x),Fi(u,g,v,1,8,w,_,x)}function h(r,s,u,g,v,w,_,x){Fi(r,s,1,v,8,w,_,x),Fi(u,g,1,v,8,w,_,x)}function b(r,s,u,g,v,w,_,x){Oi(r,s+4*v,v,1,8,w,_,x),Oi(u,g+4*v,v,1,8,w,_,x)}function E(r,s,u,g,v,w,_,x){Oi(r,s+4,1,v,8,w,_,x),Oi(u,g+4,1,v,8,w,_,x)}function D(){this.ba=new le,this.ec=[],this.cc=[],this.Mc=[],this.Dc=this.Nc=this.dc=this.fc=0,this.Oa=new _e,this.memory=0,this.Ib="OutputFunc",this.Jb="OutputAlphaFunc",this.Nd="OutputRowFunc"}function V(){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 ot(){this.nc=this.Ea=this.b=this.hc=0,this.K=[],this.w=0}function gt(){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 U}function Ft(){this.xb=this.a=0,this.l=new Vr,this.ca=new le,this.V=[],this.Ba=0,this.Ta=[],this.Ua=0,this.m=new R,this.Pb=0,this.wd=new R,this.Ma=this.$=this.C=this.i=this.c=this.xd=0,this.s=new gt,this.ab=0,this.gc=c(4,ot),this.Oc=0}function Ct(){this.Lc=this.Z=this.$a=this.i=this.c=0,this.l=new Vr,this.ic=0,this.ca=[],this.tb=0,this.qd=null,this.rd=0}function Kt(r,s,u,g,v,w,_){for(r=r==null?0:r[s+0],s=0;s<_;++s)v[w+s]=r+u[g+s]&255,r=v[w+s]}function te(r,s,u,g,v,w,_){var x;if(r==null)Kt(null,null,u,g,v,w,_);else for(x=0;x<_;++x)v[w+x]=r[s+x]+u[g+x]&255}function pe(r,s,u,g,v,w,_){if(r==null)Kt(null,null,u,g,v,w,_);else{var x,S=r[s+0],I=S,H=S;for(x=0;x<_;++x)I=H+(S=r[s+x])-I,H=u[g+x]+(-256&I?0>I?0:255:I)&255,I=S,v[w+x]=H}}function Je(r,s,u,g){var v=s.width,w=s.o;if(n(r!=null&&s!=null),0>u||0>=g||u+g>w)return null;if(!r.Cc){if(r.ga==null){var _;if(r.ga=new Ct,(_=r.ga==null)||(_=s.width*s.o,n(r.Gb.length==0),r.Gb=o(_),r.Uc=0,r.Gb==null?_=0:(r.mb=r.Gb,r.nb=r.Uc,r.rc=null,_=1),_=!_),!_){_=r.ga;var x=r.Fa,S=r.P,I=r.qc,H=r.mb,J=r.nb,C=S+1,W=I-1,K=_.l;if(n(x!=null&&H!=null&&s!=null),Qi[0]=null,Qi[1]=Kt,Qi[2]=te,Qi[3]=pe,_.ca=H,_.tb=J,_.c=s.width,_.i=s.height,n(0<_.c&&0<_.i),1>=I)s=0;else if(_.$a=3&x[S+0],_.Z=x[S+0]>>2&3,_.Lc=x[S+0]>>4&3,S=x[S+0]>>6&3,0>_.$a||1<_.$a||4<=_.Z||1<_.Lc||S)s=0;else if(K.put=Vt,K.ac=hi,K.bc=ki,K.ma=_,K.width=s.width,K.height=s.height,K.Da=s.Da,K.v=s.v,K.va=s.va,K.j=s.j,K.o=s.o,_.$a)t:{n(_.$a==1),s=pr();e:for(;;){if(s==null){s=0;break t}if(n(_!=null),_.mc=s,s.c=_.c,s.i=_.i,s.l=_.l,s.l.ma=_,s.l.width=_.c,s.l.height=_.i,s.a=0,ut(s.m,x,C,W),!fi(_.c,_.i,1,s,null)||(s.ab==1&&s.gc[0].hc==3&&Qn(s.s)?(_.ic=1,x=s.c*s.i,s.Ta=null,s.Ua=0,s.V=o(x),s.Ba=0,s.V==null?(s.a=1,s=0):s=1):(_.ic=0,s=gr(s,_.c)),!s))break e;s=1;break t}_.mc=null,s=0}else s=W>=_.c*_.i;_=!s}if(_)return null;r.ga.Lc!=1?r.Ga=0:g=w-u}n(r.ga!=null),n(u+g<=w);t:{if(s=(x=r.ga).c,w=x.l.o,x.$a==0){if(C=r.rc,W=r.Vc,K=r.Fa,S=r.P+1+u*s,I=r.mb,H=r.nb+u*s,n(S<=r.P+r.qc),x.Z!=0)for(n(Qi[x.Z]!=null),_=0;_<g;++_)Qi[x.Z](C,W,K,S,I,H,s),C=I,W=H,H+=s,S+=s;else for(_=0;_<g;++_)i(I,H,K,S,s),C=I,W=H,H+=s,S+=s;r.rc=C,r.Vc=W}else{if(n(x.mc!=null),s=u+g,n((_=x.mc)!=null),n(s<=_.i),_.C>=s)s=1;else if(x.ic||Me(),x.ic){x=_.V,C=_.Ba,W=_.c;var st=_.i,X=(K=1,S=_.$/W,I=_.$%W,H=_.m,J=_.s,_.$),ht=W*st,ct=W*s,wt=J.wc,bt=X<ct?ln(J,I,S):null;n(X<=ht),n(s<=st),n(Qn(J));e:for(;;){for(;!H.h&&X<ct;){if(I&wt||(bt=ln(J,I,S)),n(bt!=null),Q(H),256>(st=Ue(bt.G[0],bt.H[0],H)))x[C+X]=st,++X,++I>=W&&(I=0,++S<=s&&!(S%16)&&ti(_,S));else{if(!(280>st)){K=0;break e}st=Wn(st-256,H);var jt,Pt=Ue(bt.G[4],bt.H[4],H);if(Q(H),!(X>=(Pt=Gn(W,Pt=Wn(Pt,H)))&&ht-X>=st)){K=0;break e}for(jt=0;jt<st;++jt)x[C+X+jt]=x[C+X+jt-Pt];for(X+=st,I+=st;I>=W;)I-=W,++S<=s&&!(S%16)&&ti(_,S);X<ct&&I&wt&&(bt=ln(J,I,S))}n(H.h==G(H))}ti(_,S>s?s:S);break e}!K||H.h&&X<ht?(K=0,_.a=H.h?5:3):_.$=X,s=K}else s=ei(_,_.V,_.Ba,_.c,_.i,s,Hr);if(!s){g=0;break t}}u+g>=w&&(r.Cc=1),g=1}if(!g)return null;if(r.Cc&&((g=r.ga)!=null&&(g.mc=null),r.ga=null,0<r.Ga))return alert("todo:WebPDequantizeLevels"),null}return r.nb+u*v}function Le(r,s,u,g,v,w){for(;0<v--;){var _,x=r,S=s+(u?1:0),I=r,H=s+(u?0:3);for(_=0;_<g;++_){var J=I[H+4*_];J!=255&&(J*=32897,x[S+4*_+0]=x[S+4*_+0]*J>>23,x[S+4*_+1]=x[S+4*_+1]*J>>23,x[S+4*_+2]=x[S+4*_+2]*J>>23)}s+=w}}function Ne(r,s,u,g,v){for(;0<g--;){var w;for(w=0;w<u;++w){var _=r[s+2*w+0],x=15&(I=r[s+2*w+1]),S=4369*x,I=(240&I|I>>4)*S>>16;r[s+2*w+0]=(240&_|_>>4)*S>>16&240|(15&_|_<<4)*S>>16>>4&15,r[s+2*w+1]=240&I|x}s+=v}}function Oe(r,s,u,g,v,w,_,x){var S,I,H=255;for(I=0;I<v;++I){for(S=0;S<g;++S){var J=r[s+S];w[_+4*S]=J,H&=J}s+=u,_+=x}return H!=255}function De(r,s,u,g,v){var w;for(w=0;w<v;++w)u[g+w]=r[s+w]>>8}function Me(){Va=Le,ih=Ne,rh=Oe,ah=De}function gn(r,s,u){z[r]=function(g,v,w,_,x,S,I,H,J,C,W,K,st,X,ht,ct,wt){var bt,jt=wt-1>>1,Pt=x[S+0]|I[H+0]<<16,ie=J[C+0]|W[K+0]<<16;n(g!=null);var Ot=3*Pt+ie+131074>>2;for(s(g[v+0],255&Ot,Ot>>16,st,X),w!=null&&(Ot=3*ie+Pt+131074>>2,s(w[_+0],255&Ot,Ot>>16,ht,ct)),bt=1;bt<=jt;++bt){var ue=x[S+bt]|I[H+bt]<<16,en=J[C+bt]|W[K+bt]<<16,re=Pt+ue+ie+en+524296,Tt=re+2*(ue+ie)>>3;Ot=Tt+Pt>>1,Pt=(re=re+2*(Pt+en)>>3)+ue>>1,s(g[v+2*bt-1],255&Ot,Ot>>16,st,X+(2*bt-1)*u),s(g[v+2*bt-0],255&Pt,Pt>>16,st,X+(2*bt-0)*u),w!=null&&(Ot=re+ie>>1,Pt=Tt+en>>1,s(w[_+2*bt-1],255&Ot,Ot>>16,ht,ct+(2*bt-1)*u),s(w[_+2*bt+0],255&Pt,Pt>>16,ht,ct+(2*bt+0)*u)),Pt=ue,ie=en}1&wt||(Ot=3*Pt+ie+131074>>2,s(g[v+wt-1],255&Ot,Ot>>16,st,X+(wt-1)*u),w!=null&&(Ot=3*ie+Pt+131074>>2,s(w[_+wt-1],255&Ot,Ot>>16,ht,ct+(wt-1)*u)))}}function Ti(){Kn[jo]=mu,Kn[Bo]=mh,Kn[fh]=bu,Kn[Do]=bh,Kn[Mo]=vh,Kn[zs]=wh,Kn[uh]=vu,Kn[Hs]=mh,Kn[Ws]=bh,Kn[Uo]=vh,Kn[Gs]=wh}function Ma(r){return r&~wu?0>r?0:255:r>>_h}function wr(r,s){return Ma((19077*r>>8)+(26149*s>>8)-14234)}function _r(r,s,u){return Ma((19077*r>>8)-(6419*s>>8)-(13320*u>>8)+8708)}function Zi(r,s){return Ma((19077*r>>8)+(33050*s>>8)-17685)}function yr(r,s,u,g,v){g[v+0]=wr(r,u),g[v+1]=_r(r,s,u),g[v+2]=Zi(r,s)}function ea(r,s,u,g,v){g[v+0]=Zi(r,s),g[v+1]=_r(r,s,u),g[v+2]=wr(r,u)}function na(r,s,u,g,v){var w=_r(r,s,u);s=w<<3&224|Zi(r,s)>>3,g[v+0]=248&wr(r,u)|w>>5,g[v+1]=s}function mn(r,s,u,g,v){var w=240&Zi(r,s)|15;g[v+0]=240&wr(r,u)|_r(r,s,u)>>4,g[v+1]=w}function xr(r,s,u,g,v){g[v+0]=255,yr(r,s,u,g,v+1)}function Ar(r,s,u,g,v){ea(r,s,u,g,v),g[v+3]=255}function Ua(r,s,u,g,v){yr(r,s,u,g,v),g[v+3]=255}function mi(r,s,u){z[r]=function(g,v,w,_,x,S,I,H,J){for(var C=H+(-2&J)*u;H!=C;)s(g[v+0],w[_+0],x[S+0],I,H),s(g[v+1],w[_+0],x[S+0],I,H+u),v+=2,++_,++S,H+=2*u;1&J&&s(g[v+0],w[_+0],x[S+0],I,H)}}function An(r,s,u){return u==0?r==0?s==0?6:5:s==0?4:0:u}function Fo(r,s,u,g,v){switch(r>>>30){case 3:Ri(s,u,g,v,0);break;case 2:Xi(s,u,g,v);break;case 1:bn(s,u,g,v)}}function ia(r,s){var u,g,v=s.M,w=s.Nb,_=r.oc,x=r.pc+40,S=r.oc,I=r.pc+584,H=r.oc,J=r.pc+600;for(u=0;16>u;++u)_[x+32*u-1]=129;for(u=0;8>u;++u)S[I+32*u-1]=129,H[J+32*u-1]=129;for(0<v?_[x-1-32]=S[I-1-32]=H[J-1-32]=129:(a(_,x-32-1,127,21),a(S,I-32-1,127,9),a(H,J-32-1,127,9)),g=0;g<r.za;++g){var C=s.ya[s.aa+g];if(0<g){for(u=-1;16>u;++u)i(_,x+32*u-4,_,x+32*u+12,4);for(u=-1;8>u;++u)i(S,I+32*u-4,S,I+32*u+4,4),i(H,J+32*u-4,H,J+32*u+4,4)}var W=r.Gd,K=r.Hd+g,st=C.ad,X=C.Hc;if(0<v&&(i(_,x-32,W[K].y,0,16),i(S,I-32,W[K].f,0,8),i(H,J-32,W[K].ea,0,8)),C.Za){var ht=_,ct=x-32+16;for(0<v&&(g>=r.za-1?a(ht,ct,W[K].y[15],4):i(ht,ct,W[K+1].y,0,4)),u=0;4>u;u++)ht[ct+128+u]=ht[ct+256+u]=ht[ct+384+u]=ht[ct+0+u];for(u=0;16>u;++u,X<<=2)ht=_,ct=x+xh[u],ii[C.Ob[u]](ht,ct),Fo(X,st,16*+u,ht,ct)}else if(ht=An(g,v,C.Ob[0]),Ji[ht](_,x),X!=0)for(u=0;16>u;++u,X<<=2)Fo(X,st,16*+u,_,x+xh[u]);for(u=C.Gc,ht=An(g,v,C.Dd),Bi[ht](S,I),Bi[ht](H,J),X=st,ht=S,ct=I,255&(C=0|u)&&(170&C?la(X,256,ht,ct):vi(X,256,ht,ct)),C=H,X=J,255&(u>>=8)&&(170&u?la(st,320,C,X):vi(st,320,C,X)),v<r.Ub-1&&(i(W[K].y,0,_,x+480,16),i(W[K].f,0,S,I+224,8),i(W[K].ea,0,H,J+224,8)),u=8*w*r.B,W=r.sa,K=r.ta+16*g+16*w*r.R,st=r.qa,C=r.ra+8*g+u,X=r.Ha,ht=r.Ia+8*g+u,u=0;16>u;++u)i(W,K+u*r.R,_,x+32*u,16);for(u=0;8>u;++u)i(st,C+u*r.B,S,I+32*u,8),i(X,ht+u*r.B,H,J+32*u,8)}}function Oo(r,s,u,g,v,w,_,x,S){var I=[0],H=[0],J=0,C=S!=null?S.kd:0,W=S!=null?S:new V;if(r==null||12>u)return 7;W.data=r,W.w=s,W.ha=u,s=[s],u=[u],W.gb=[W.gb];t:{var K=s,st=u,X=W.gb;if(n(r!=null),n(st!=null),n(X!=null),X[0]=0,12<=st[0]&&!e(r,K[0],"RIFF")){if(e(r,K[0]+8,"WEBP")){X=3;break t}var ht=zt(r,K[0]+4);if(12>ht||4294967286<ht){X=3;break t}if(C&&ht>st[0]-8){X=7;break t}X[0]=ht,K[0]+=12,st[0]-=12}X=0}if(X!=0)return X;for(ht=0<W.gb[0],u=u[0];;){t:{var ct=r;st=s,X=u;var wt=I,bt=H,jt=K=[0];if((Ot=J=[J])[0]=0,8>X[0])X=7;else{if(!e(ct,st[0],"VP8X")){if(zt(ct,st[0]+4)!=10){X=3;break t}if(18>X[0]){X=7;break t}var Pt=zt(ct,st[0]+8),ie=1+kt(ct,st[0]+12);if(2147483648<=ie*(ct=1+kt(ct,st[0]+15))){X=3;break t}jt!=null&&(jt[0]=Pt),wt!=null&&(wt[0]=ie),bt!=null&&(bt[0]=ct),st[0]+=18,X[0]-=18,Ot[0]=1}X=0}}if(J=J[0],K=K[0],X!=0)return X;if(st=!!(2&K),!ht&&J)return 3;if(w!=null&&(w[0]=!!(16&K)),_!=null&&(_[0]=st),x!=null&&(x[0]=0),_=I[0],K=H[0],J&&st&&S==null){X=0;break}if(4>u){X=7;break}if(ht&&J||!ht&&!J&&!e(r,s[0],"ALPH")){u=[u],W.na=[W.na],W.P=[W.P],W.Sa=[W.Sa];t:{Pt=r,X=s,ht=u;var Ot=W.gb;wt=W.na,bt=W.P,jt=W.Sa,ie=22,n(Pt!=null),n(ht!=null),ct=X[0];var ue=ht[0];for(n(wt!=null),n(jt!=null),wt[0]=null,bt[0]=null,jt[0]=0;;){if(X[0]=ct,ht[0]=ue,8>ue){X=7;break t}var en=zt(Pt,ct+4);if(4294967286<en){X=3;break t}var re=8+en+1&-2;if(ie+=re,0<Ot&&ie>Ot){X=3;break t}if(!e(Pt,ct,"VP8 ")||!e(Pt,ct,"VP8L")){X=0;break t}if(ue[0]<re){X=7;break t}e(Pt,ct,"ALPH")||(wt[0]=Pt,bt[0]=ct+8,jt[0]=en),ct+=re,ue-=re}}if(u=u[0],W.na=W.na[0],W.P=W.P[0],W.Sa=W.Sa[0],X!=0)break}u=[u],W.Ja=[W.Ja],W.xa=[W.xa];t:if(Ot=r,X=s,ht=u,wt=W.gb[0],bt=W.Ja,jt=W.xa,Pt=X[0],ct=!e(Ot,Pt,"VP8 "),ie=!e(Ot,Pt,"VP8L"),n(Ot!=null),n(ht!=null),n(bt!=null),n(jt!=null),8>ht[0])X=7;else{if(ct||ie){if(Ot=zt(Ot,Pt+4),12<=wt&&Ot>wt-12){X=3;break t}if(C&&Ot>ht[0]-8){X=7;break t}bt[0]=Ot,X[0]+=8,ht[0]-=8,jt[0]=ie}else jt[0]=5<=ht[0]&&Ot[Pt+0]==47&&!(Ot[Pt+4]>>5),bt[0]=ht[0];X=0}if(u=u[0],W.Ja=W.Ja[0],W.xa=W.xa[0],s=s[0],X!=0)break;if(4294967286<W.Ja)return 3;if(x==null||st||(x[0]=W.xa?2:1),_=[_],K=[K],W.xa){if(5>u){X=7;break}x=_,C=K,st=w,r==null||5>u?r=0:5<=u&&r[s+0]==47&&!(r[s+4]>>5)?(ht=[0],Ot=[0],wt=[0],ut(bt=new R,r,s,u),Pi(bt,ht,Ot,wt)?(x!=null&&(x[0]=ht[0]),C!=null&&(C[0]=Ot[0]),st!=null&&(st[0]=wt[0]),r=1):r=0):r=0}else{if(10>u){X=7;break}x=K,r==null||10>u||!Ao(r,s+3,u-3)?r=0:(C=r[s+0]|r[s+1]<<8|r[s+2]<<16,st=16383&(r[s+7]<<8|r[s+6]),r=16383&(r[s+9]<<8|r[s+8]),1&C||3<(C>>1&7)||!(C>>4&1)||C>>5>=W.Ja||!st||!r?r=0:(_&&(_[0]=st),x&&(x[0]=r),r=1))}if(!r||(_=_[0],K=K[0],J&&(I[0]!=_||H[0]!=K)))return 3;S!=null&&(S[0]=W,S.offset=s-S.w,n(4294967286>s-S.w),n(S.offset==S.ha-u));break}return X==0||X==7&&J&&S==null?(w!=null&&(w[0]|=W.na!=null&&0<W.na.length),g!=null&&(g[0]=_),v!=null&&(v[0]=K),0):X}function $n(r,s,u){var g=s.width,v=s.height,w=0,_=0,x=g,S=v;if(s.Da=r!=null&&0<r.Da,s.Da&&(x=r.cd,S=r.bd,w=r.v,_=r.j,11>u||(w&=-2,_&=-2),0>w||0>_||0>=x||0>=S||w+x>g||_+S>v))return 0;if(s.v=w,s.j=_,s.va=w+x,s.o=_+S,s.U=x,s.T=S,s.da=r!=null&&0<r.da,s.da){if(!Ht(x,S,u=[r.ib],w=[r.hb]))return 0;s.ib=u[0],s.hb=w[0]}return s.ob=r!=null&&r.ob,s.Kb=r==null||!r.Sd,s.da&&(s.ob=s.ib<3*g/4&&s.hb<3*v/4,s.Kb=0),1}function Nr(r){if(r==null)return 2;if(11>r.S){var s=r.f.RGBA;s.fb+=(r.height-1)*s.A,s.A=-s.A}else s=r.f.kb,r=r.height,s.O+=(r-1)*s.fa,s.fa=-s.fa,s.N+=(r-1>>1)*s.Ab,s.Ab=-s.Ab,s.W+=(r-1>>1)*s.Db,s.Db=-s.Db,s.F!=null&&(s.J+=(r-1)*s.lb,s.lb=-s.lb);return 0}function qa(r,s,u,g){if(g==null||0>=r||0>=s)return 2;if(u!=null){if(u.Da){var v=u.cd,w=u.bd,_=-2&u.v,x=-2&u.j;if(0>_||0>x||0>=v||0>=w||_+v>r||x+w>s)return 2;r=v,s=w}if(u.da){if(!Ht(r,s,v=[u.ib],w=[u.hb]))return 2;r=v[0],s=w[0]}}g.width=r,g.height=s;t:{var S=g.width,I=g.height;if(r=g.S,0>=S||0>=I||!(r>=jo&&13>r))r=2;else{if(0>=g.Rd&&g.sd==null){_=w=v=s=0;var H=(x=S*Ah[r])*I;if(11>r||(w=(I+1)/2*(s=(S+1)/2),r==12&&(_=(v=S)*I)),(I=o(H+2*w+_))==null){r=1;break t}g.sd=I,11>r?((S=g.f.RGBA).eb=I,S.fb=0,S.A=x,S.size=H):((S=g.f.kb).y=I,S.O=0,S.fa=x,S.Fd=H,S.f=I,S.N=0+H,S.Ab=s,S.Cd=w,S.ea=I,S.W=0+H+w,S.Db=s,S.Ed=w,r==12&&(S.F=I,S.J=0+H+2*w),S.Tc=_,S.lb=v)}if(s=1,v=g.S,w=g.width,_=g.height,v>=jo&&13>v)if(11>v)r=g.f.RGBA,s&=(x=Math.abs(r.A))*(_-1)+w<=r.size,s&=x>=w*Ah[v],s&=r.eb!=null;else{r=g.f.kb,x=(w+1)/2,H=(_+1)/2,S=Math.abs(r.fa),I=Math.abs(r.Ab);var J=Math.abs(r.Db),C=Math.abs(r.lb),W=C*(_-1)+w;s&=S*(_-1)+w<=r.Fd,s&=I*(H-1)+x<=r.Cd,s=(s&=J*(H-1)+x<=r.Ed)&S>=w&I>=x&J>=x,s&=r.y!=null,s&=r.f!=null,s&=r.ea!=null,v==12&&(s&=C>=w,s&=W<=r.Tc,s&=r.F!=null)}else s=0;r=s?0:2}}return r!=0||u!=null&&u.fd&&(r=Nr(g)),r}var ra=64,Lr=[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],za=24,Nn=32,En=8,aa=[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];Et("Predictor0","PredictorAdd0"),z.Predictor0=function(){return 4278190080},z.Predictor1=function(r){return r},z.Predictor2=function(r,s,u){return s[u+0]},z.Predictor3=function(r,s,u){return s[u+1]},z.Predictor4=function(r,s,u){return s[u-1]},z.Predictor5=function(r,s,u){return Mt(Mt(r,s[u+1]),s[u+0])},z.Predictor6=function(r,s,u){return Mt(r,s[u-1])},z.Predictor7=function(r,s,u){return Mt(r,s[u+0])},z.Predictor8=function(r,s,u){return Mt(s[u-1],s[u+0])},z.Predictor9=function(r,s,u){return Mt(s[u+0],s[u+1])},z.Predictor10=function(r,s,u){return Mt(Mt(r,s[u-1]),Mt(s[u+0],s[u+1]))},z.Predictor11=function(r,s,u){var g=s[u+0];return 0>=Jt(g>>24&255,r>>24&255,(s=s[u-1])>>24&255)+Jt(g>>16&255,r>>16&255,s>>16&255)+Jt(g>>8&255,r>>8&255,s>>8&255)+Jt(255&g,255&r,255&s)?g:r},z.Predictor12=function(r,s,u){var g=s[u+0];return(we((r>>24&255)+(g>>24&255)-((s=s[u-1])>>24&255))<<24|we((r>>16&255)+(g>>16&255)-(s>>16&255))<<16|we((r>>8&255)+(g>>8&255)-(s>>8&255))<<8|we((255&r)+(255&g)-(255&s)))>>>0},z.Predictor13=function(r,s,u){var g=s[u-1];return(he((r=Mt(r,s[u+0]))>>24&255,g>>24&255)<<24|he(r>>16&255,g>>16&255)<<16|he(r>>8&255,g>>8&255)<<8|he(255&r,255&g))>>>0};var $i=z.PredictorAdd0;z.PredictorAdd1=fe,Et("Predictor2","PredictorAdd2"),Et("Predictor3","PredictorAdd3"),Et("Predictor4","PredictorAdd4"),Et("Predictor5","PredictorAdd5"),Et("Predictor6","PredictorAdd6"),Et("Predictor7","PredictorAdd7"),Et("Predictor8","PredictorAdd8"),Et("Predictor9","PredictorAdd9"),Et("Predictor10","PredictorAdd10"),Et("Predictor11","PredictorAdd11"),Et("Predictor12","PredictorAdd12"),Et("Predictor13","PredictorAdd13");var Yi=z.PredictorAdd2;Bt("ColorIndexInverseTransform","MapARGB","32b",function(r){return r>>8&255},function(r){return r}),Bt("VP8LColorIndexInverseTransformAlpha","MapAlpha","8b",function(r){return r},function(r){return r>>8&255});var oa,Sr=z.ColorIndexInverseTransform,Qe=z.MapARGB,Us=z.VP8LColorIndexInverseTransformAlpha,bi=z.MapAlpha,ni=z.VP8LPredictorsAdd=[];ni.length=16,(z.VP8LPredictors=[]).length=16,(z.VP8LPredictorsAdd_C=[]).length=16,(z.VP8LPredictors_C=[]).length=16;var kr,Ha,Wa,sa,Pr,Er,Ki,Ri,Xi,la,bn,vi,Ie,Ce,Ge,tn,ji,Ga,ha,To,Ql,th,eh,nh,Va,ih,rh,ah,oh=o(511),sh=o(2041),lh=o(225),hh=o(767),ch=0,qs=sh,Ro=lh,Rn=hh,Yn=oh,jo=0,Bo=1,fh=2,Do=3,Mo=4,zs=5,uh=6,Hs=7,Ws=8,Uo=9,Gs=10,nu=[2,3,7],iu=[3,3,11],dh=[280,256,256,256,40],ru=[0,1,1,1,0],au=[17,18,0,1,2,3,4,5,16,6,7,8,9,10,11,12,13,14,15],ou=[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],su=[2954,2956,2958,2962,2970,2986,3018,3082,3212,3468,3980,5004],lu=8,Vs=[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],Zs=[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],Za=null,hu=[[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]],cu=[0,1,4,8,5,2,3,6,9,12,13,10,7,11,14,15],ph=[-0,1,-1,2,-2,3,4,6,-3,5,-4,-5,-6,7,-7,8,-8,-9],fu=[[[[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]]]],uu=[[[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]]],du=[[[[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]]]],pu=[0,1,2,3,6,4,5,6,6,6,6,6,6,6,6,7,0],Ji=[],ii=[],Bi=[],gu=1,gh=2,Qi=[],Kn=[];gn("UpsampleRgbLinePair",yr,3),gn("UpsampleBgrLinePair",ea,3),gn("UpsampleRgbaLinePair",Ua,4),gn("UpsampleBgraLinePair",Ar,4),gn("UpsampleArgbLinePair",xr,4),gn("UpsampleRgba4444LinePair",mn,2),gn("UpsampleRgb565LinePair",na,2);var mu=z.UpsampleRgbLinePair,bu=z.UpsampleBgrLinePair,mh=z.UpsampleRgbaLinePair,bh=z.UpsampleBgraLinePair,vh=z.UpsampleArgbLinePair,wh=z.UpsampleRgba4444LinePair,vu=z.UpsampleRgb565LinePair,qo=16,zo=1<<qo-1,$a=-227,$s=482,_h=6,wu=(256<<_h)-1,yh=0,_u=o(256),yu=o(256),xu=o(256),Au=o(256),Nu=o($s-$a),Lu=o($s-$a);mi("YuvToRgbRow",yr,3),mi("YuvToBgrRow",ea,3),mi("YuvToRgbaRow",Ua,4),mi("YuvToBgraRow",Ar,4),mi("YuvToArgbRow",xr,4),mi("YuvToRgba4444Row",mn,2),mi("YuvToRgb565Row",na,2);var xh=[0,4,8,12,128,132,136,140,256,260,264,268,384,388,392,396],Ho=[0,2,8],Su=[8,7,6,4,4,2,2,2,1,1,1,1],ku=1;this.WebPDecodeRGBA=function(r,s,u,g,v){var w=Bo,_=new D,x=new le;_.ba=x,x.S=w,x.width=[x.width],x.height=[x.height];var S=x.width,I=x.height,H=new Gt;if(H==null||r==null)var J=2;else n(H!=null),J=Oo(r,s,u,H.width,H.height,H.Pd,H.Qd,H.format,null);if(J!=0?S=0:(S!=null&&(S[0]=H.width[0]),I!=null&&(I[0]=H.height[0]),S=1),S){x.width=x.width[0],x.height=x.height[0],g!=null&&(g[0]=x.width),v!=null&&(v[0]=x.height);t:{if(g=new Vr,(v=new V).data=r,v.w=s,v.ha=u,v.kd=1,s=[0],n(v!=null),((r=Oo(v.data,v.w,v.ha,null,null,null,s,null,v))==0||r==7)&&s[0]&&(r=4),(s=r)==0){if(n(_!=null),g.data=v.data,g.w=v.w+v.offset,g.ha=v.ha-v.offset,g.put=Vt,g.ac=hi,g.bc=ki,g.ma=_,v.xa){if((r=pr())==null){_=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,ut(C.m,W.data,W.w,W.ha),!Pi(C.m,K,st,X)){C.a=3;break e}if(C.xb=gh,W.width=K[0],W.height=st[0],!fi(K[0],st[0],1,C,null))break e;return 1}return n(C.a!=0),0})(r,g)){if(g=(s=qa(g.width,g.height,_.Oa,_.ba))==0){e:{g=r;n:for(;;){if(g==null){g=0;break e}if(n(g.s.yc!=null),n(g.s.Ya!=null),n(0<g.s.Wb),n((u=g.l)!=null),n((v=u.ma)!=null),g.xb!=0){if(g.ca=v.ba,g.tb=v.tb,n(g.ca!=null),!$n(v.Oa,u,Do)){g.a=2;break n}if(!gr(g,u.width)||u.da)break n;if((u.da||Zt(g.ca.S))&&Me(),11>g.ca.S||(alert("todo:WebPInitConvertARGBToYUV"),g.ca.f.kb.F!=null&&Me()),g.Pb&&0<g.s.ua&&g.s.vb.X==null&&!P(g.s.vb,g.s.Wa.Xa)){g.a=1;break n}g.xb=0}if(!ei(g,g.V,g.Ba,g.c,g.i,u.o,Hi))break n;v.Dc=g.Ma,g=1;break e}n(g.a!=0),g=0}g=!g}g&&(s=r.a)}else s=r.a}else{if((r=new As)==null){_=1;break t}if(r.Fa=v.na,r.P=v.P,r.qc=v.Sa,di(r,g)){if((s=qa(g.width,g.height,_.Oa,_.ba))==0){if(r.Aa=0,u=_.Oa,n((v=r)!=null),u!=null){if(0<(S=0>(S=u.Md)?0:100<S?255:255*S/100)){for(I=H=0;4>I;++I)12>(J=v.pb[I]).lc&&(J.ia=S*Su[0>J.lc?0:J.lc]>>3),H|=J.ia;H&&(alert("todo:VP8InitRandom"),v.ia=1)}v.Ga=u.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 Xe(C,2,"NULL VP8Io parameter in VP8Decode().");if(!C.cb&&!di(C,W))return 0;if(n(C.cb),W.ac==null||W.ac(W)){W.ob&&(C.L=0);var K=Ho[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 ht=C.Qa.Lb[K];C.Qa.Fb||(ht+=st.Tb)}else ht=st.Tb;for(X=0;1>=X;++X){var ct=C.gd[K][X],wt=ht;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),ct.dd=bt,ct.tc=2*wt+bt,ct.ld=40<=wt?2:15<=wt?1:0}else ct.tc=0;ct.La=X}}}K=0}else Xe(C,6,"Frame setup failed"),K=C.a;if(K=K==0){if(K){C.$c=0,0<C.Aa||(C.Ic=ku);e:{K=C.Ic,st=4*(bt=C.za);var jt=32*bt,Pt=bt+1,ie=0<C.L?bt*(0<C.Aa?2:1):0,Ot=(C.Aa==2?2:1)*bt;if((ct=st+832+(X=3*(16*K+Ho[C.L])/2*jt)+(ht=C.Fa!=null&&0<C.Fa.length?C.Kc.c*C.Kc.i:0))!=ct)K=0;else{if(ct>C.Vb){if(C.Vb=0,C.Ec=o(ct),C.Fc=0,C.Ec==null){K=Xe(C,1,"no memory during frame initialization.");break e}C.Vb=ct}ct=C.Ec,wt=C.Fc,C.Ac=ct,C.Bc=wt,wt+=st,C.Gd=c(jt,yo),C.Hd=0,C.rb=c(Pt+1,Ia),C.sb=1,C.wa=ie?c(ie,Zn):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),n(!0),C.oc=ct,C.pc=wt,wt+=832,C.ya=c(Ot,Ca),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=(jt=Ho[C.L])*C.R,jt=jt/2*C.B,C.sa=ct,C.ta=wt+bt,C.qa=C.sa,C.ra=C.ta+16*K*C.R+jt,C.Ha=C.qa,C.Ia=C.ra+8*K*C.B+jt,C.$c=0,wt+=X,C.mb=ht?ct:null,C.nb=ht?wt:null,n(wt+ht<=C.Fc+C.Vb),Fa(C),a(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,!ch){for(K=-255;255>=K;++K)oh[255+K]=0>K?-K:K;for(K=-1020;1020>=K;++K)sh[1020+K]=-128>K?-128:127<K?127:K;for(K=-112;112>=K;++K)lh[112+K]=-16>K?-16:15<K?15:K;for(K=-255;510>=K;++K)hh[255+K]=0>K?0:255<K?255:K;ch=1}Ki=Lo,Ri=Ns,la=Ls,bn=Ss,vi=pi,Xi=No,Ie=Po,Ce=Eo,Ge=Co,tn=h,ji=Io,Ga=vr,ha=b,To=E,Ql=Qr,th=Da,eh=ta,nh=ko,ii[0]=Os,ii[1]=Kr,ii[2]=Cs,ii[3]=Fs,ii[4]=Ts,ii[5]=Ii,ii[6]=Rs,ii[7]=Ci,ii[8]=Bs,ii[9]=js,Ji[0]=So,Ji[1]=ks,Ji[2]=Ps,Ji[3]=Es,Ji[4]=Gi,Ji[5]=Is,Ji[6]=mr,Bi[0]=Ds,Bi[1]=Oa,Bi[2]=Xr,Bi[3]=Ta,Bi[4]=Ms,Bi[5]=Jr,Bi[6]=Ra,K=1}else K=0}K&&(K=(function(ue,en){for(ue.M=0;ue.M<ue.Va;++ue.M){var re,Tt=ue.Jc[ue.M&ue.Xb],Nt=ue.m,Ve=ue;for(re=0;re<Ve.za;++re){var ee=Nt,ge=Ve,Te=ge.Ac,cn=ge.Bc+4*re,Ln=ge.zc,qe=ge.ya[ge.aa+re];if(ge.Qa.Bb?qe.$b=dt(ee,ge.Pa.jb[0])?2+dt(ee,ge.Pa.jb[2]):dt(ee,ge.Pa.jb[1]):qe.$b=0,ge.kc&&(qe.Ad=dt(ee,ge.Bd)),qe.Za=!dt(ee,145)+0,qe.Za){var vn=qe.Ob,Sn=0;for(ge=0;4>ge;++ge){var nn,be=Ln[0+ge];for(nn=0;4>nn;++nn){be=uu[Te[cn+nn]][be];for(var ye=ph[dt(ee,be[0])];0<ye;)ye=ph[2*ye+dt(ee,be[ye])];be=-ye,Te[cn+nn]=be}i(vn,Sn,Te,cn,4),Sn+=4,Ln[0+ge]=be}}else be=dt(ee,156)?dt(ee,128)?1:3:dt(ee,163)?2:0,qe.Ob[0]=be,a(Te,cn,be,4),a(Ln,0,be,4);qe.Dd=dt(ee,142)?dt(ee,114)?dt(ee,183)?1:3:2:0}if(Ve.m.Ka)return Xe(ue,7,"Premature end-of-partition0 encountered.");for(;ue.ja<ue.za;++ue.ja){if(Ve=Tt,ee=(Nt=ue).rb[Nt.sb-1],Te=Nt.rb[Nt.sb+Nt.ja],re=Nt.ya[Nt.aa+Nt.ja],cn=Nt.kc?re.Ad:0)ee.la=Te.la=0,re.Za||(ee.Na=Te.Na=0),re.Hc=0,re.Gc=0,re.ia=0;else{var ze,xe;if(ee=Te,Te=Ve,cn=Nt.Pa.Xc,Ln=Nt.ya[Nt.aa+Nt.ja],qe=Nt.pb[Ln.$b],ge=Ln.ad,vn=0,Sn=Nt.rb[Nt.sb-1],be=nn=0,a(ge,vn,0,384),Ln.Za)var fn=0,ri=cn[3];else{ye=o(16);var Ze=ee.Na+Sn.Na;if(Ze=Za(Te,cn[1],Ze,qe.Eb,0,ye,0),ee.Na=Sn.Na=(0<Ze)+0,1<Ze)Ki(ye,0,ge,vn);else{var In=ye[0]+3>>3;for(ye=0;256>ye;ye+=16)ge[vn+ye]=In}fn=1,ri=cn[0]}var Se=15&ee.la,rn=15&Sn.la;for(ye=0;4>ye;++ye){var jn=1&rn;for(In=xe=0;4>In;++In)Se=Se>>1|(jn=(Ze=Za(Te,ri,Ze=jn+(1&Se),qe.Sc,fn,ge,vn))>fn)<<7,xe=xe<<2|(3<Ze?3:1<Ze?2:ge[vn+0]!=0),vn+=16;Se>>=4,rn=rn>>1|jn<<7,nn=(nn<<8|xe)>>>0}for(ri=Se,fn=rn>>4,ze=0;4>ze;ze+=2){for(xe=0,Se=ee.la>>4+ze,rn=Sn.la>>4+ze,ye=0;2>ye;++ye){for(jn=1&rn,In=0;2>In;++In)Ze=jn+(1&Se),Se=Se>>1|(jn=0<(Ze=Za(Te,cn[2],Ze,qe.Qc,0,ge,vn)))<<3,xe=xe<<2|(3<Ze?3:1<Ze?2:ge[vn+0]!=0),vn+=16;Se>>=2,rn=rn>>1|jn<<5}be|=xe<<4*ze,ri|=Se<<4<<ze,fn|=(240&rn)<<ze}ee.la=ri,Sn.la=fn,Ln.Hc=nn,Ln.Gc=be,Ln.ia=43690&be?0:qe.ia,cn=!(nn|be)}if(0<Nt.L&&(Nt.wa[Nt.Y+Nt.ja]=Nt.gd[re.$b][re.Za],Nt.wa[Nt.Y+Nt.ja].La|=!cn),Ve.Ka)return Xe(ue,7,"Premature end-of-file encountered.")}if(Fa(ue),Nt=en,Ve=1,re=(Tt=ue).D,ee=0<Tt.L&&Tt.M>=Tt.zb&&Tt.M<=Tt.Va,Tt.Aa==0)e:{if(re.M=Tt.M,re.uc=ee,ia(Tt,re),Ve=1,re=(xe=Tt.D).Nb,ee=(be=Ho[Tt.L])*Tt.R,Te=be/2*Tt.B,ye=16*re*Tt.R,In=8*re*Tt.B,cn=Tt.sa,Ln=Tt.ta-ee+ye,qe=Tt.qa,ge=Tt.ra-Te+In,vn=Tt.Ha,Sn=Tt.Ia-Te+In,rn=(Se=xe.M)==0,nn=Se>=Tt.Va-1,Tt.Aa==2&&ia(Tt,xe),xe.uc)for(jn=(Ze=Tt).D.M,n(Ze.D.uc),xe=Ze.yb;xe<Ze.Hb;++xe){fn=xe,ri=jn;var kn=(Bn=(un=Ze).D).Nb;ze=un.R;var Bn=Bn.wa[Bn.Y+fn],Dn=un.sa,Cn=un.ta+16*kn*ze+16*fn,Mn=Bn.dd,Fe=Bn.tc;if(Fe!=0)if(n(3<=Fe),un.L==1)0<fn&&th(Dn,Cn,ze,Fe+4),Bn.La&&nh(Dn,Cn,ze,Fe),0<ri&&Ql(Dn,Cn,ze,Fe+4),Bn.La&&eh(Dn,Cn,ze,Fe);else{var Un=un.B,ai=un.qa,Ir=un.ra+8*kn*Un+8*fn,Di=un.Ha,un=un.Ia+8*kn*Un+8*fn;kn=Bn.ld,0<fn&&(Ce(Dn,Cn,ze,Fe+4,Mn,kn),tn(ai,Ir,Di,un,Un,Fe+4,Mn,kn)),Bn.La&&(Ga(Dn,Cn,ze,Fe,Mn,kn),To(ai,Ir,Di,un,Un,Fe,Mn,kn)),0<ri&&(Ie(Dn,Cn,ze,Fe+4,Mn,kn),Ge(ai,Ir,Di,un,Un,Fe+4,Mn,kn)),Bn.La&&(ji(Dn,Cn,ze,Fe,Mn,kn),ha(ai,Ir,Di,un,Un,Fe,Mn,kn))}}if(Tt.ia&&alert("todo:DitherRow"),Nt.put!=null){if(xe=16*Se,Se=16*(Se+1),rn?(Nt.y=Tt.sa,Nt.O=Tt.ta+ye,Nt.f=Tt.qa,Nt.N=Tt.ra+In,Nt.ea=Tt.Ha,Nt.W=Tt.Ia+In):(xe-=be,Nt.y=cn,Nt.O=Ln,Nt.f=qe,Nt.N=ge,Nt.ea=vn,Nt.W=Sn),nn||(Se-=be),Se>Nt.o&&(Se=Nt.o),Nt.F=null,Nt.J=null,Tt.Fa!=null&&0<Tt.Fa.length&&xe<Se&&(Nt.J=Je(Tt,Nt,xe,Se-xe),Nt.F=Tt.mb,Nt.F==null&&Nt.F.length==0)){Ve=Xe(Tt,3,"Could not decode alpha data.");break e}xe<Nt.j&&(be=Nt.j-xe,xe=Nt.j,n(!(1&be)),Nt.O+=Tt.R*be,Nt.N+=Tt.B*(be>>1),Nt.W+=Tt.B*(be>>1),Nt.F!=null&&(Nt.J+=Nt.width*be)),xe<Se&&(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=Se-xe,Ve=Nt.put(Nt))}re+1!=Tt.Ic||nn||(i(Tt.sa,Tt.ta-ee,cn,Ln+16*Tt.R,ee),i(Tt.qa,Tt.ra-Te,qe,ge+8*Tt.B,Te),i(Tt.Ha,Tt.Ia-Te,vn,Sn+8*Tt.B,Te))}if(!Ve)return Xe(ue,6,"Output aborted.")}return 1})(C,W)),W.bc!=null&&W.bc(W),K&=1}return K?(C.cb=0,K):0})(r,g)||(s=r.a)}}else s=r.a}s==0&&_.Oa!=null&&_.Oa.fd&&(s=Nr(_.ba))}_=s}w=_!=0?null:11>w?x.f.RGBA.eb:x.f.kb.y}else w=null;return w};var Ah=[3,4,3,4,4,2,2,4,4,4,2,1,1]};function d(z,et){for(var N="",F=0;F<4;F++)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 L(z,et){return(z[et+0]|z[et+1]<<8|z[et+2]<<16|z[et+3]<<24)>>>0}new f;var p=[0],T=[0],O=[],j=new f,k=t,Z=(function(z,et){var N={},F=0,U=!1,q=0,it=0;if(N.frames=[],!(function(y,R){for(var B=0;B<4;B++)if(y[R+B]!="RIFF".charCodeAt(B))return!0;return!1})(z,et)){for(L(z,et+=4),et+=8;et<z.length;){var ft=d(z,et),pt=L(z,et+=4);et+=4;var nt=pt+(1&pt);switch(ft){case"VP8 ":case"VP8L":N.frames[F]===void 0&&(N.frames[F]={}),(yt=N.frames[F]).src_off=U?it:et-8,yt.src_size=q+pt+8,F++,U&&(U=!1,q=0,it=0);break;case"VP8X":(yt=N.header={}).feature_flags=z[et];var ut=et+4;yt.canvas_width=1+A(z,ut),ut+=3,yt.canvas_height=1+A(z,ut),ut+=3;break;case"ALPH":U=!0,q=nt+8,it=et-8;break;case"ANIM":(yt=N.header).bgcolor=L(z,et),ut=et+4,yt.loop_count=m(z,ut),ut+=2;break;case"ANMF":var At,yt;(yt=N.frames[F]={}).offset_x=2*A(z,et),et+=3,yt.offset_y=2*A(z,et),et+=3,yt.width=1+A(z,et),et+=3,yt.height=1+A(z,et),et+=3,yt.duration=A(z,et),et+=3,At=z[et++],yt.dispose=1&At,yt.blend=At>>1&1}ft!="ANMF"&&(et+=nt)}return N}})(k,0);Z.response=k,Z.rgbaoutput=!0,Z.dataurl=!1;var $=Z.header?Z.header:null,M=Z.frames?Z.frames:null;if($){$.loop_counter=$.loop_count,p=[$.canvas_height],T=[$.canvas_width];for(var lt=0;lt<M.length&&M[lt].blend!=0;lt++);}var _t=M[0],mt=j.WebPDecodeRGBA(k,_t.src_off,_t.src_size,T,p);_t.rgba=mt,_t.imgwidth=T[0],_t.imgheight=p[0];for(var tt=0;tt<T[0]*p[0]*4;tt++)O[tt]=mt[tt];return this.width=T,this.height=p,this.data=O,this}/** ====================================================================
|
||
* @license
|
||
* jsPDF XMP metadata plugin
|
||
* Copyright (c) 2016 Jussi Utunen, u-jussi@suomi24.fi
|
||
*
|
||
* Permission is hereby granted, free of charge, to any person obtaining
|
||
* a copy of this software and associated documentation files (the
|
||
* "Software"), to deal in the Software without restriction, including
|
||
* without limitation the rights to use, copy, modify, merge, publish,
|
||
* distribute, sublicense, and/or sell copies of the Software, and to
|
||
* permit persons to whom the Software is furnished to do so, subject to
|
||
* the following conditions:
|
||
*
|
||
* The above copyright notice and this permission notice shall be
|
||
* included in all copies or substantial portions of the Software.
|
||
*
|
||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||
* ====================================================================
|
||
*/function N5(){var t,n=this.internal.__metadata__.metadata,e=unescape(encodeURIComponent(n));t=this.internal.__metadata__.rawXml?e:'<x:xmpmeta xmlns:x="adobe:ns:meta/"><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>'+e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")+"</jspdf:metadata></rdf:Description></rdf:RDF></x:xmpmeta>",this.internal.__metadata__.metadataObjectNumber=this.internal.newObject(),this.internal.write("<< /Type /Metadata /Subtype /XML /Length "+t.length+" >>"),this.internal.write("stream"),this.internal.write(t),this.internal.write("endstream"),this.internal.write("endobj")}function L5(){this.internal.__metadata__.metadataObjectNumber&&this.internal.write("/Metadata "+this.internal.__metadata__.metadataObjectNumber+" 0 R")}(function(t){var n,e,i,a,o,c,l,f,d,m=function(y){return y=y||{},this.isStrokeTransparent=y.isStrokeTransparent||!1,this.strokeOpacity=y.strokeOpacity||1,this.strokeStyle=y.strokeStyle||"#000000",this.fillStyle=y.fillStyle||"#000000",this.isFillTransparent=y.isFillTransparent||!1,this.fillOpacity=y.fillOpacity||1,this.font=y.font||"10px sans-serif",this.textBaseline=y.textBaseline||"alphabetic",this.textAlign=y.textAlign||"left",this.lineWidth=y.lineWidth||1,this.lineJoin=y.lineJoin||"miter",this.lineCap=y.lineCap||"butt",this.path=y.path||[],this.transform=y.transform!==void 0?y.transform.clone():new f,this.globalCompositeOperation=y.globalCompositeOperation||"normal",this.globalAlpha=y.globalAlpha||1,this.clip_path=y.clip_path||[],this.currentPoint=y.currentPoint||new c,this.miterLimit=y.miterLimit||10,this.lastPoint=y.lastPoint||new c,this.lineDashOffset=y.lineDashOffset||0,this.lineDash=y.lineDash||[],this.margin=y.margin||[0,0,0,0],this.prevPageLastElemOffset=y.prevPageLastElemOffset||0,this.ignoreClearRect=typeof y.ignoreClearRect!="boolean"||y.ignoreClearRect,this};t.events.push(["initialized",function(){this.context2d=new A(this),n=this.internal.f2,e=this.internal.getCoordinateString,i=this.internal.getVerticalCoordinateString,a=this.internal.getHorizontalCoordinate,o=this.internal.getVerticalCoordinate,c=this.internal.Point,l=this.internal.Rectangle,f=this.internal.Matrix,d=new m}]);var A=function(y){Object.defineProperty(this,"canvas",{get:function(){return{parentNode:!1,style:!1}}});var R=y;Object.defineProperty(this,"pdf",{get:function(){return R}});var B=!1;Object.defineProperty(this,"pageWrapXEnabled",{get:function(){return B},set:function(P){B=!!P}});var G=!1;Object.defineProperty(this,"pageWrapYEnabled",{get:function(){return G},set:function(P){G=!!P}});var Y=0;Object.defineProperty(this,"posX",{get:function(){return Y},set:function(P){isNaN(P)||(Y=P)}});var Q=0;Object.defineProperty(this,"posY",{get:function(){return Q},set:function(P){isNaN(P)||(Q=P)}}),Object.defineProperty(this,"margin",{get:function(){return d.margin},set:function(P){var Lt;typeof P=="number"?Lt=[P,P,P,P]:((Lt=new Array(4))[0]=P[0],Lt[1]=P.length>=2?P[1]:Lt[0],Lt[2]=P.length>=3?P[2]:Lt[0],Lt[3]=P.length>=4?P[3]:Lt[1]),d.margin=Lt}});var rt=!1;Object.defineProperty(this,"autoPaging",{get:function(){return rt},set:function(P){rt=P}});var at=0;Object.defineProperty(this,"lastBreak",{get:function(){return at},set:function(P){at=P}});var dt=[];Object.defineProperty(this,"pageBreaks",{get:function(){return dt},set:function(P){dt=P}}),Object.defineProperty(this,"ctx",{get:function(){return d},set:function(P){P instanceof m&&(d=P)}}),Object.defineProperty(this,"path",{get:function(){return d.path},set:function(P){d.path=P}});var xt=[];Object.defineProperty(this,"ctxStack",{get:function(){return xt},set:function(P){xt=P}}),Object.defineProperty(this,"fillStyle",{get:function(){return this.ctx.fillStyle},set:function(P){var Lt;Lt=L(P),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(P){var Lt=L(P);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(P){["butt","round","square"].indexOf(P)!==-1&&(this.ctx.lineCap=P,this.pdf.setLineCap(P))}}),Object.defineProperty(this,"lineWidth",{get:function(){return this.ctx.lineWidth},set:function(P){isNaN(P)||(this.ctx.lineWidth=P,this.pdf.setLineWidth(P))}}),Object.defineProperty(this,"lineJoin",{get:function(){return this.ctx.lineJoin},set:function(P){["bevel","round","miter"].indexOf(P)!==-1&&(this.ctx.lineJoin=P,this.pdf.setLineJoin(P))}}),Object.defineProperty(this,"miterLimit",{get:function(){return this.ctx.miterLimit},set:function(P){isNaN(P)||(this.ctx.miterLimit=P,this.pdf.setMiterLimit(P))}}),Object.defineProperty(this,"textBaseline",{get:function(){return this.ctx.textBaseline},set:function(P){this.ctx.textBaseline=P}}),Object.defineProperty(this,"textAlign",{get:function(){return this.ctx.textAlign},set:function(P){["right","end","center","left","start"].indexOf(P)!==-1&&(this.ctx.textAlign=P)}});var St=null,kt=null,zt=null;Object.defineProperty(this,"fontFaces",{get:function(){return zt},set:function(P){St=null,kt=null,zt=P}}),Object.defineProperty(this,"font",{get:function(){return this.ctx.font},set:function(P){var Lt;if(this.ctx.font=P,(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(P))!==null){var ae=Lt[1];Lt[2];var Ht=Lt[3],vt=Lt[4];Lt[5];var Wt=Lt[6],Et=/^([.\d]+)((?:%|in|[cem]m|ex|p[ctx]))$/i.exec(vt)[2];vt=Math.floor(Et==="px"?parseFloat(vt)*this.pdf.internal.scaleFactor:Et==="em"?parseFloat(vt)*this.pdf.getFontSize():parseFloat(vt)*this.pdf.internal.scaleFactor),this.pdf.setFontSize(vt);var qt=(function(Bt){var We,me,oe=[],se=Bt.trim();if(se==="")return kl;if(se in Dc)return[Dc[se]];for(;se!=="";){switch(me=null,We=(se=Uc(se)).charAt(0)){case'"':case"'":me=v5(se.substring(1),We);break;default:me=w5(se)}if(me===null||(oe.push(me[0]),(se=Uc(me[1]))!==""&&se.charAt(0)!==","))return kl;se=se.replace(/^,/,"")}return oe})(Wt);if(this.fontFaces){var Mt=(function(Bt,We){var me=Bt.getFontList(),oe=JSON.stringify(me);if(St===null||kt!==oe){var se=(function(Re){var Ut=[];return Object.keys(Re).forEach(function(Ee){Re[Ee].forEach(function(Zt){var Qt=null;switch(Zt){case"bold":Qt={family:Ee,weight:"bold"};break;case"italic":Qt={family:Ee,style:"italic"};break;case"bolditalic":Qt={family:Ee,weight:"bold",style:"italic"};break;case"":case"normal":Qt={family:Ee}}Qt!==null&&(Qt.ref={name:Ee,style:Zt},Ut.push(Qt))})}),Ut})(me);St=(function(Re){for(var Ut={},Ee=0;Ee<Re.length;++Ee){var Zt=Sl(Re[Ee]),Qt=Zt.family,je=Zt.stretch,le=Zt.style,Gt=Zt.weight;Ut[Qt]=Ut[Qt]||{},Ut[Qt][je]=Ut[Qt][je]||{},Ut[Qt][je][le]=Ut[Qt][je][le]||{},Ut[Qt][je][le][Gt]=Zt}return Ut})(se.concat(We)),kt=oe}return St})(this.pdf,this.fontFaces),we=qt.map(function(Bt){return{family:Bt,stretch:"normal",weight:Ht,style:ae}}),he=(function(Bt,We,me){for(var oe=(me=me||{}).defaultFontFamily||"times",se=Object.assign({},b5,me.genericFontFamilies||{}),Re=null,Ut=null,Ee=0;Ee<We.length;++Ee)if(se[(Re=Sl(We[Ee])).family]&&(Re.family=se[Re.family]),Bt.hasOwnProperty(Re.family)){Ut=Bt[Re.family];break}if(!(Ut=Ut||Bt[oe]))throw new Error("Could not find a font-family for the rule '"+Mc(Re)+"' and default family '"+oe+"'.");if(Ut=(function(Zt,Qt){if(Qt[Zt])return Qt[Zt];var je=Hl[Zt],le=je<=Hl.normal?-1:1,Gt=Bc(Qt,Xf,je,le);if(!Gt)throw new Error("Could not find a matching font-stretch value for "+Zt);return Gt})(Re.stretch,Ut),Ut=(function(Zt,Qt){if(Qt[Zt])return Qt[Zt];for(var je=Kf[Zt],le=0;le<je.length;++le)if(Qt[je[le]])return Qt[je[le]];throw new Error("Could not find a matching font-style for "+Zt)})(Re.style,Ut),!(Ut=(function(Zt,Qt){if(Qt[Zt])return Qt[Zt];if(Zt===400&&Qt[500])return Qt[500];if(Zt===500&&Qt[400])return Qt[400];var je=m5[Zt],le=Bc(Qt,Jf,je,Zt<400?-1:1);if(!le)throw new Error("Could not find a matching font-weight for value "+Zt);return le})(Re.weight,Ut)))throw new Error("Failed to resolve a font for the rule '"+Mc(Re)+"'.");return Ut})(Mt,we);this.pdf.setFont(he.ref.name,he.ref.style)}else{var Jt="";(Ht==="bold"||parseInt(Ht,10)>=700||ae==="bold")&&(Jt="bold"),ae==="italic"&&(Jt+="italic"),Jt.length===0&&(Jt="normal");for(var fe="",ce={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"},Rt=0;Rt<qt.length;Rt++){if(this.pdf.internal.getFont(qt[Rt],Jt,{noFallback:!0,disableWarning:!0})!==void 0){fe=qt[Rt];break}if(Jt==="bolditalic"&&this.pdf.internal.getFont(qt[Rt],"bold",{noFallback:!0,disableWarning:!0})!==void 0)fe=qt[Rt],Jt="bold";else if(this.pdf.internal.getFont(qt[Rt],"normal",{noFallback:!0,disableWarning:!0})!==void 0){fe=qt[Rt],Jt="normal";break}}if(fe===""){for(var ne=0;ne<qt.length;ne++)if(ce[qt[ne]]){fe=ce[qt[ne]];break}}fe=fe===""?"Times":fe,this.pdf.setFont(fe,Jt)}}}}),Object.defineProperty(this,"globalCompositeOperation",{get:function(){return this.ctx.globalCompositeOperation},set:function(P){this.ctx.globalCompositeOperation=P}}),Object.defineProperty(this,"globalAlpha",{get:function(){return this.ctx.globalAlpha},set:function(P){this.ctx.globalAlpha=P}}),Object.defineProperty(this,"lineDashOffset",{get:function(){return this.ctx.lineDashOffset},set:function(P){this.ctx.lineDashOffset=P,yt.call(this)}}),Object.defineProperty(this,"lineDash",{get:function(){return this.ctx.lineDash},set:function(P){this.ctx.lineDash=P,yt.call(this)}}),Object.defineProperty(this,"ignoreClearRect",{get:function(){return this.ctx.ignoreClearRect},set:function(P){this.ctx.ignoreClearRect=!!P}})};A.prototype.setLineDash=function(y){this.lineDash=y},A.prototype.getLineDash=function(){return this.lineDash.length%2?this.lineDash.concat(this.lineDash):this.lineDash.slice()},A.prototype.fill=function(){M.call(this,"fill",!1)},A.prototype.stroke=function(){M.call(this,"stroke",!1)},A.prototype.beginPath=function(){this.path=[{type:"begin"}]},A.prototype.moveTo=function(y,R){if(isNaN(y)||isNaN(R))throw ke.error("jsPDF.context2d.moveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.moveTo");var B=this.ctx.transform.applyToPoint(new c(y,R));this.path.push({type:"mt",x:B.x,y:B.y}),this.ctx.lastPoint=new c(y,R)},A.prototype.closePath=function(){var y=new c(0,0),R=0;for(R=this.path.length-1;R!==-1;R--)if(this.path[R].type==="begin"&&Pe(this.path[R+1])==="object"&&typeof this.path[R+1].x=="number"){y=new c(this.path[R+1].x,this.path[R+1].y);break}this.path.push({type:"close"}),this.ctx.lastPoint=new c(y.x,y.y)},A.prototype.lineTo=function(y,R){if(isNaN(y)||isNaN(R))throw ke.error("jsPDF.context2d.lineTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.lineTo");var B=this.ctx.transform.applyToPoint(new c(y,R));this.path.push({type:"lt",x:B.x,y:B.y}),this.ctx.lastPoint=new c(B.x,B.y)},A.prototype.clip=function(){this.ctx.clip_path=JSON.parse(JSON.stringify(this.path)),M.call(this,null,!0)},A.prototype.quadraticCurveTo=function(y,R,B,G){if(isNaN(B)||isNaN(G)||isNaN(y)||isNaN(R))throw ke.error("jsPDF.context2d.quadraticCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.quadraticCurveTo");var Y=this.ctx.transform.applyToPoint(new c(B,G)),Q=this.ctx.transform.applyToPoint(new c(y,R));this.path.push({type:"qct",x1:Q.x,y1:Q.y,x:Y.x,y:Y.y}),this.ctx.lastPoint=new c(Y.x,Y.y)},A.prototype.bezierCurveTo=function(y,R,B,G,Y,Q){if(isNaN(Y)||isNaN(Q)||isNaN(y)||isNaN(R)||isNaN(B)||isNaN(G))throw ke.error("jsPDF.context2d.bezierCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.bezierCurveTo");var rt=this.ctx.transform.applyToPoint(new c(Y,Q)),at=this.ctx.transform.applyToPoint(new c(y,R)),dt=this.ctx.transform.applyToPoint(new c(B,G));this.path.push({type:"bct",x1:at.x,y1:at.y,x2:dt.x,y2:dt.y,x:rt.x,y:rt.y}),this.ctx.lastPoint=new c(rt.x,rt.y)},A.prototype.arc=function(y,R,B,G,Y,Q){if(isNaN(y)||isNaN(R)||isNaN(B)||isNaN(G)||isNaN(Y))throw ke.error("jsPDF.context2d.arc: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.arc");if(Q=!!Q,!this.ctx.transform.isIdentity){var rt=this.ctx.transform.applyToPoint(new c(y,R));y=rt.x,R=rt.y;var at=this.ctx.transform.applyToPoint(new c(0,B)),dt=this.ctx.transform.applyToPoint(new c(0,0));B=Math.sqrt(Math.pow(at.x-dt.x,2)+Math.pow(at.y-dt.y,2))}Math.abs(Y-G)>=2*Math.PI&&(G=0,Y=2*Math.PI),this.path.push({type:"arc",x:y,y:R,radius:B,startAngle:G,endAngle:Y,counterclockwise:Q})},A.prototype.arcTo=function(y,R,B,G,Y){throw new Error("arcTo not implemented.")},A.prototype.rect=function(y,R,B,G){if(isNaN(y)||isNaN(R)||isNaN(B)||isNaN(G))throw ke.error("jsPDF.context2d.rect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rect");this.moveTo(y,R),this.lineTo(y+B,R),this.lineTo(y+B,R+G),this.lineTo(y,R+G),this.lineTo(y,R),this.lineTo(y+B,R),this.lineTo(y,R)},A.prototype.fillRect=function(y,R,B,G){if(isNaN(y)||isNaN(R)||isNaN(B)||isNaN(G))throw ke.error("jsPDF.context2d.fillRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillRect");if(!p.call(this)){var Y={};this.lineCap!=="butt"&&(Y.lineCap=this.lineCap,this.lineCap="butt"),this.lineJoin!=="miter"&&(Y.lineJoin=this.lineJoin,this.lineJoin="miter"),this.beginPath(),this.rect(y,R,B,G),this.fill(),Y.hasOwnProperty("lineCap")&&(this.lineCap=Y.lineCap),Y.hasOwnProperty("lineJoin")&&(this.lineJoin=Y.lineJoin)}},A.prototype.strokeRect=function(y,R,B,G){if(isNaN(y)||isNaN(R)||isNaN(B)||isNaN(G))throw ke.error("jsPDF.context2d.strokeRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeRect");T.call(this)||(this.beginPath(),this.rect(y,R,B,G),this.stroke())},A.prototype.clearRect=function(y,R,B,G){if(isNaN(y)||isNaN(R)||isNaN(B)||isNaN(G))throw ke.error("jsPDF.context2d.clearRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.clearRect");this.ignoreClearRect||(this.fillStyle="#ffffff",this.fillRect(y,R,B,G))},A.prototype.save=function(y){y=typeof y!="boolean"||y;for(var R=this.pdf.internal.getCurrentPageInfo().pageNumber,B=0;B<this.pdf.internal.getNumberOfPages();B++)this.pdf.setPage(B+1),this.pdf.internal.out("q");if(this.pdf.setPage(R),y){this.ctx.fontSize=this.pdf.internal.getFontSize();var G=new m(this.ctx);this.ctxStack.push(this.ctx),this.ctx=G}},A.prototype.restore=function(y){y=typeof y!="boolean"||y;for(var R=this.pdf.internal.getCurrentPageInfo().pageNumber,B=0;B<this.pdf.internal.getNumberOfPages();B++)this.pdf.setPage(B+1),this.pdf.internal.out("Q");this.pdf.setPage(R),y&&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 L=function(y){var R,B,G,Y;if(y.isCanvasGradient===!0&&(y=y.getColor()),!y)return{r:0,g:0,b:0,a:0,style:y};if(/transparent|rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*0+\s*\)/.test(y))R=0,B=0,G=0,Y=0;else{var Q=/rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/.exec(y);if(Q!==null)R=parseInt(Q[1]),B=parseInt(Q[2]),G=parseInt(Q[3]),Y=1;else if((Q=/rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)/.exec(y))!==null)R=parseInt(Q[1]),B=parseInt(Q[2]),G=parseInt(Q[3]),Y=parseFloat(Q[4]);else{if(Y=1,typeof y=="string"&&y.charAt(0)!=="#"){var rt=new Hf(y);y=rt.ok?rt.toHex():"#000000"}y.length===4?(R=y.substring(1,2),R+=R,B=y.substring(2,3),B+=B,G=y.substring(3,4),G+=G):(R=y.substring(1,3),B=y.substring(3,5),G=y.substring(5,7)),R=parseInt(R,16),B=parseInt(B,16),G=parseInt(G,16)}}return{r:R,g:B,b:G,a:Y,style:y}},p=function(){return this.ctx.isFillTransparent||this.globalAlpha==0},T=function(){return!!(this.ctx.isStrokeTransparent||this.globalAlpha==0)};A.prototype.fillText=function(y,R,B,G){if(isNaN(R)||isNaN(B)||typeof y!="string")throw ke.error("jsPDF.context2d.fillText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillText");if(G=isNaN(G)?void 0:G,!p.call(this)){var Y=nt(this.ctx.transform.rotation),Q=this.ctx.transform.scaleX;F.call(this,{text:y,x:R,y:B,scale:Q,angle:Y,align:this.textAlign,maxWidth:G})}},A.prototype.strokeText=function(y,R,B,G){if(isNaN(R)||isNaN(B)||typeof y!="string")throw ke.error("jsPDF.context2d.strokeText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeText");if(!T.call(this)){G=isNaN(G)?void 0:G;var Y=nt(this.ctx.transform.rotation),Q=this.ctx.transform.scaleX;F.call(this,{text:y,x:R,y:B,scale:Q,renderingMode:"stroke",angle:Y,align:this.textAlign,maxWidth:G})}},A.prototype.measureText=function(y){if(typeof y!="string")throw ke.error("jsPDF.context2d.measureText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.measureText");var R=this.pdf,B=this.pdf.internal.scaleFactor,G=R.internal.getFontSize(),Y=R.getStringUnitWidth(y)*G/R.internal.scaleFactor;return new function(Q){var rt=(Q=Q||{}).width||0;return Object.defineProperty(this,"width",{get:function(){return rt}}),this}({width:Y*=Math.round(96*B/72*1e4)/1e4})},A.prototype.scale=function(y,R){if(isNaN(y)||isNaN(R))throw ke.error("jsPDF.context2d.scale: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.scale");var B=new f(y,0,0,R,0,0);this.ctx.transform=this.ctx.transform.multiply(B)},A.prototype.rotate=function(y){if(isNaN(y))throw ke.error("jsPDF.context2d.rotate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rotate");var R=new f(Math.cos(y),Math.sin(y),-Math.sin(y),Math.cos(y),0,0);this.ctx.transform=this.ctx.transform.multiply(R)},A.prototype.translate=function(y,R){if(isNaN(y)||isNaN(R))throw ke.error("jsPDF.context2d.translate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.translate");var B=new f(1,0,0,1,y,R);this.ctx.transform=this.ctx.transform.multiply(B)},A.prototype.transform=function(y,R,B,G,Y,Q){if(isNaN(y)||isNaN(R)||isNaN(B)||isNaN(G)||isNaN(Y)||isNaN(Q))throw ke.error("jsPDF.context2d.transform: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.transform");var rt=new f(y,R,B,G,Y,Q);this.ctx.transform=this.ctx.transform.multiply(rt)},A.prototype.setTransform=function(y,R,B,G,Y,Q){y=isNaN(y)?1:y,R=isNaN(R)?0:R,B=isNaN(B)?0:B,G=isNaN(G)?1:G,Y=isNaN(Y)?0:Y,Q=isNaN(Q)?0:Q,this.ctx.transform=new f(y,R,B,G,Y,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(y,R,B,G,Y,Q,rt,at,dt){var xt=this.pdf.getImageProperties(y),St=1,kt=1,zt=1,P=1;G!==void 0&&at!==void 0&&(zt=at/G,P=dt/Y,St=xt.width/G*at/G,kt=xt.height/Y*dt/Y),Q===void 0&&(Q=R,rt=B,R=0,B=0),G!==void 0&&at===void 0&&(at=G,dt=Y),G===void 0&&at===void 0&&(at=xt.width,dt=xt.height);var Lt=this.ctx.transform.decompose(),ae=nt(Lt.rotate.shx),Ht=new f,vt=(Ht=(Ht=(Ht=Ht.multiply(Lt.translate)).multiply(Lt.skew)).multiply(Lt.scale)).applyToRectangle(new l(Q-R*zt,rt-B*P,G*St,Y*kt));if(this.autoPaging){for(var Wt,Et=j.call(this,vt),qt=[],Mt=0;Mt<Et.length;Mt+=1)qt.indexOf(Et[Mt])===-1&&qt.push(Et[Mt]);$(qt);for(var we=qt[0],he=qt[qt.length-1],Jt=we;Jt<he+1;Jt++){this.pdf.setPage(Jt);var fe=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],ce=Jt===1?this.posY+this.margin[0]:this.margin[0],Rt=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],ne=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],Bt=Jt===1?0:Rt+(Jt-2)*ne;if(this.ctx.clip_path.length!==0){var We=this.path;Wt=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=Z(Wt,this.posX+this.margin[3],-Bt+ce+this.ctx.prevPageLastElemOffset),lt.call(this,"fill",!0),this.path=We}var me=JSON.parse(JSON.stringify(vt));me=Z([me],this.posX+this.margin[3],-Bt+ce+this.ctx.prevPageLastElemOffset)[0];var oe=(Jt>we||Jt<he)&&O.call(this);oe&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],fe,ne,null).clip().discardPath()),this.pdf.addImage(y,"JPEG",me.x,me.y,me.w,me.h,null,null,ae),oe&&this.pdf.restoreGraphicsState()}}else this.pdf.addImage(y,"JPEG",vt.x,vt.y,vt.w,vt.h,null,null,ae)};var j=function(y,R,B){var G=[];R=R||this.pdf.internal.pageSize.width,B=B||this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2];var Y=this.posY+this.ctx.prevPageLastElemOffset;switch(y.type){default:case"mt":case"lt":G.push(Math.floor((y.y+Y)/B)+1);break;case"arc":G.push(Math.floor((y.y+Y-y.radius)/B)+1),G.push(Math.floor((y.y+Y+y.radius)/B)+1);break;case"qct":var Q=ut(this.ctx.lastPoint.x,this.ctx.lastPoint.y,y.x1,y.y1,y.x,y.y);G.push(Math.floor((Q.y+Y)/B)+1),G.push(Math.floor((Q.y+Q.h+Y)/B)+1);break;case"bct":var rt=At(this.ctx.lastPoint.x,this.ctx.lastPoint.y,y.x1,y.y1,y.x2,y.y2,y.x,y.y);G.push(Math.floor((rt.y+Y)/B)+1),G.push(Math.floor((rt.y+rt.h+Y)/B)+1);break;case"rect":G.push(Math.floor((y.y+Y)/B)+1),G.push(Math.floor((y.y+y.h+Y)/B)+1)}for(var at=0;at<G.length;at+=1)for(;this.pdf.internal.getNumberOfPages()<G[at];)k.call(this);return G},k=function(){var y=this.fillStyle,R=this.strokeStyle,B=this.font,G=this.lineCap,Y=this.lineWidth,Q=this.lineJoin;this.pdf.addPage(),this.fillStyle=y,this.strokeStyle=R,this.font=B,this.lineCap=G,this.lineWidth=Y,this.lineJoin=Q},Z=function(y,R,B){for(var G=0;G<y.length;G++)switch(y[G].type){case"bct":y[G].x2+=R,y[G].y2+=B;case"qct":y[G].x1+=R,y[G].y1+=B;default:y[G].x+=R,y[G].y+=B}return y},$=function(y){return y.sort(function(R,B){return R-B})},M=function(y,R){var B=this.fillStyle,G=this.strokeStyle,Y=this.lineCap,Q=this.lineWidth,rt=Math.abs(Q*this.ctx.transform.scaleX),at=this.lineJoin;if(this.autoPaging){for(var dt,xt,St=JSON.parse(JSON.stringify(this.path)),kt=JSON.parse(JSON.stringify(this.path)),zt=[],P=0;P<kt.length;P++)if(kt[P].x!==void 0)for(var Lt=j.call(this,kt[P]),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];)k.call(this);$(zt);for(var vt=zt[0],Wt=zt[zt.length-1],Et=vt;Et<Wt+1;Et++){this.pdf.setPage(Et),this.fillStyle=B,this.strokeStyle=G,this.lineCap=Y,this.lineWidth=rt,this.lineJoin=at;var qt=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],Mt=Et===1?this.posY+this.margin[0]:this.margin[0],we=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],he=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],Jt=Et===1?0:we+(Et-2)*he;if(this.ctx.clip_path.length!==0){var fe=this.path;dt=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=Z(dt,this.posX+this.margin[3],-Jt+Mt+this.ctx.prevPageLastElemOffset),lt.call(this,y,!0),this.path=fe}if(xt=JSON.parse(JSON.stringify(St)),this.path=Z(xt,this.posX+this.margin[3],-Jt+Mt+this.ctx.prevPageLastElemOffset),R===!1||Et===0){var ce=(Et>vt||Et<Wt)&&O.call(this);ce&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],qt,he,null).clip().discardPath()),lt.call(this,y,R),ce&&this.pdf.restoreGraphicsState()}this.lineWidth=Q}this.path=St}else this.lineWidth=rt,lt.call(this,y,R),this.lineWidth=Q},lt=function(y,R){if((y!=="stroke"||R||!T.call(this))&&(y==="stroke"||R||!p.call(this))){for(var B,G,Y=[],Q=this.path,rt=0;rt<Q.length;rt++){var at=Q[rt];switch(at.type){case"begin":Y.push({begin:!0});break;case"close":Y.push({close:!0});break;case"mt":Y.push({start:at,deltas:[],abs:[]});break;case"lt":var dt=Y.length;if(Q[rt-1]&&!isNaN(Q[rt-1].x)&&(B=[at.x-Q[rt-1].x,at.y-Q[rt-1].y],dt>0)){for(;dt>=0;dt--)if(Y[dt-1].close!==!0&&Y[dt-1].begin!==!0){Y[dt-1].deltas.push(B),Y[dt-1].abs.push(at);break}}break;case"bct":B=[at.x1-Q[rt-1].x,at.y1-Q[rt-1].y,at.x2-Q[rt-1].x,at.y2-Q[rt-1].y,at.x-Q[rt-1].x,at.y-Q[rt-1].y],Y[Y.length-1].deltas.push(B);break;case"qct":var xt=Q[rt-1].x+2/3*(at.x1-Q[rt-1].x),St=Q[rt-1].y+2/3*(at.y1-Q[rt-1].y),kt=at.x+2/3*(at.x1-at.x),zt=at.y+2/3*(at.y1-at.y),P=at.x,Lt=at.y;B=[xt-Q[rt-1].x,St-Q[rt-1].y,kt-Q[rt-1].x,zt-Q[rt-1].y,P-Q[rt-1].x,Lt-Q[rt-1].y],Y[Y.length-1].deltas.push(B);break;case"arc":Y.push({deltas:[],abs:[],arc:!0}),Array.isArray(Y[Y.length-1].abs)&&Y[Y.length-1].abs.push(at)}}G=R?null:y==="stroke"?"stroke":"fill";for(var ae=!1,Ht=0;Ht<Y.length;Ht++)if(Y[Ht].arc)for(var vt=Y[Ht].abs,Wt=0;Wt<vt.length;Wt++){var Et=vt[Wt];Et.type==="arc"?tt.call(this,Et.x,Et.y,Et.radius,Et.startAngle,Et.endAngle,Et.counterclockwise,void 0,R,!ae):U.call(this,Et.x,Et.y),ae=!0}else if(Y[Ht].close===!0)this.pdf.internal.out("h"),ae=!1;else if(Y[Ht].begin!==!0){var qt=Y[Ht].start.x,Mt=Y[Ht].start.y;q.call(this,Y[Ht].deltas,qt,Mt),ae=!0}G&&z.call(this,G),R&&et.call(this)}},_t=function(y){var R=this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor,B=R*(this.pdf.internal.getLineHeightFactor()-1);switch(this.ctx.textBaseline){case"bottom":return y-B;case"top":return y+R-B;case"hanging":return y+R-2*B;case"middle":return y+R/2-B;default:return y}},mt=function(y){return y+this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor*(this.pdf.internal.getLineHeightFactor()-1)};A.prototype.createLinearGradient=function(){var y=function(){};return y.colorStops=[],y.addColorStop=function(R,B){this.colorStops.push([R,B])},y.getColor=function(){return this.colorStops.length===0?"#000000":this.colorStops[0][1]},y.isCanvasGradient=!0,y},A.prototype.createPattern=function(){return this.createLinearGradient()},A.prototype.createRadialGradient=function(){return this.createLinearGradient()};var tt=function(y,R,B,G,Y,Q,rt,at,dt){for(var xt=ft.call(this,B,G,Y,Q),St=0;St<xt.length;St++){var kt=xt[St];St===0&&(dt?N.call(this,kt.x1+y,kt.y1+R):U.call(this,kt.x1+y,kt.y1+R)),it.call(this,y,R,kt.x2,kt.y2,kt.x3,kt.y3,kt.x4,kt.y4)}at?et.call(this):z.call(this,rt)},z=function(y){switch(y){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(y,R){this.pdf.internal.out(e(y)+" "+i(R)+" m")},F=function(y){var R;switch(y.align){case"right":case"end":R="right";break;case"center":R="center";break;default:R="left"}var B,G,Y,Q=this.pdf.getTextDimensions(y.text),rt=_t.call(this,y.y),at=mt.call(this,rt)-Q.h,dt=this.ctx.transform.applyToPoint(new c(y.x,rt));if(this.autoPaging){var xt=this.ctx.transform.decompose(),St=new f;St=(St=(St=St.multiply(xt.translate)).multiply(xt.skew)).multiply(xt.scale);for(var kt=this.ctx.transform.applyToRectangle(new l(y.x,rt,Q.w,Q.h)),zt=St.applyToRectangle(new l(y.x,at,Q.w,Q.h)),P=j.call(this,zt),Lt=[],ae=0;ae<P.length;ae+=1)Lt.indexOf(P[ae])===-1&&Lt.push(P[ae]);$(Lt);for(var Ht=Lt[0],vt=Lt[Lt.length-1],Wt=Ht;Wt<vt+1;Wt++){this.pdf.setPage(Wt);var Et=Wt===1?this.posY+this.margin[0]:this.margin[0],qt=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],Mt=this.pdf.internal.pageSize.height-this.margin[2],we=Mt-this.margin[0],he=this.pdf.internal.pageSize.width-this.margin[1],Jt=he-this.margin[3],fe=Wt===1?0:qt+(Wt-2)*we;if(this.ctx.clip_path.length!==0){var ce=this.path;B=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=Z(B,this.posX+this.margin[3],-1*fe+Et),lt.call(this,"fill",!0),this.path=ce}var Rt=Z([JSON.parse(JSON.stringify(zt))],this.posX+this.margin[3],-fe+Et+this.ctx.prevPageLastElemOffset)[0];y.scale>=.01&&(G=this.pdf.internal.getFontSize(),this.pdf.setFontSize(G*y.scale),Y=this.lineWidth,this.lineWidth=Y*y.scale);var ne=this.autoPaging!=="text";if(ne||Rt.y+Rt.h<=Mt){if(ne||Rt.y>=Et&&Rt.x<=he){var Bt=ne?y.text:this.pdf.splitTextToSize(y.text,y.maxWidth||he-Rt.x)[0],We=Z([JSON.parse(JSON.stringify(kt))],this.posX+this.margin[3],-fe+Et+this.ctx.prevPageLastElemOffset)[0],me=ne&&(Wt>Ht||Wt<vt)&&O.call(this);me&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],Jt,we,null).clip().discardPath()),this.pdf.text(Bt,We.x,We.y,{angle:y.angle,align:R,renderingMode:y.renderingMode}),me&&this.pdf.restoreGraphicsState()}}else Rt.y<Mt&&(this.ctx.prevPageLastElemOffset+=Mt-Rt.y);y.scale>=.01&&(this.pdf.setFontSize(G),this.lineWidth=Y)}}else y.scale>=.01&&(G=this.pdf.internal.getFontSize(),this.pdf.setFontSize(G*y.scale),Y=this.lineWidth,this.lineWidth=Y*y.scale),this.pdf.text(y.text,dt.x+this.posX,dt.y+this.posY,{angle:y.angle,align:R,renderingMode:y.renderingMode,maxWidth:y.maxWidth}),y.scale>=.01&&(this.pdf.setFontSize(G),this.lineWidth=Y)},U=function(y,R,B,G){B=B||0,G=G||0,this.pdf.internal.out(e(y+B)+" "+i(R+G)+" l")},q=function(y,R,B){return this.pdf.lines(y,R,B,null,null)},it=function(y,R,B,G,Y,Q,rt,at){this.pdf.internal.out([n(a(B+y)),n(o(G+R)),n(a(Y+y)),n(o(Q+R)),n(a(rt+y)),n(o(at+R)),"c"].join(" "))},ft=function(y,R,B,G){for(var Y=2*Math.PI,Q=Math.PI/2;R>B;)R-=Y;var rt=Math.abs(B-R);rt<Y&&G&&(rt=Y-rt);for(var at=[],dt=G?-1:1,xt=R;rt>1e-5;){var St=xt+dt*Math.min(rt,Q);at.push(pt.call(this,y,xt,St)),rt-=Math.abs(St-xt),xt=St}return at},pt=function(y,R,B){var G=(B-R)/2,Y=y*Math.cos(G),Q=y*Math.sin(G),rt=Y,at=-Q,dt=rt*rt+at*at,xt=dt+rt*Y+at*Q,St=4/3*(Math.sqrt(2*dt*xt)-xt)/(rt*Q-at*Y),kt=rt-St*at,zt=at+St*rt,P=kt,Lt=-zt,ae=G+R,Ht=Math.cos(ae),vt=Math.sin(ae);return{x1:y*Math.cos(R),y1:y*Math.sin(R),x2:kt*Ht-zt*vt,y2:kt*vt+zt*Ht,x3:P*Ht-Lt*vt,y3:P*vt+Lt*Ht,x4:y*Math.cos(B),y4:y*Math.sin(B)}},nt=function(y){return 180*y/Math.PI},ut=function(y,R,B,G,Y,Q){var rt=y+.5*(B-y),at=R+.5*(G-R),dt=Y+.5*(B-Y),xt=Q+.5*(G-Q),St=Math.min(y,Y,rt,dt),kt=Math.max(y,Y,rt,dt),zt=Math.min(R,Q,at,xt),P=Math.max(R,Q,at,xt);return new l(St,zt,kt-St,P-zt)},At=function(y,R,B,G,Y,Q,rt,at){var dt,xt,St,kt,zt,P,Lt,ae,Ht,vt,Wt,Et,qt,Mt,we=B-y,he=G-R,Jt=Y-B,fe=Q-G,ce=rt-Y,Rt=at-Q;for(xt=0;xt<41;xt++)Ht=(Lt=(St=y+(dt=xt/40)*we)+dt*((zt=B+dt*Jt)-St))+dt*(zt+dt*(Y+dt*ce-zt)-Lt),vt=(ae=(kt=R+dt*he)+dt*((P=G+dt*fe)-kt))+dt*(P+dt*(Q+dt*Rt-P)-ae),xt==0?(Wt=Ht,Et=vt,qt=Ht,Mt=vt):(Wt=Math.min(Wt,Ht),Et=Math.min(Et,vt),qt=Math.max(qt,Ht),Mt=Math.max(Mt,vt));return new l(Math.round(Wt),Math.round(Et),Math.round(qt-Wt),Math.round(Mt-Et))},yt=function(){if(this.prevLineDash||this.ctx.lineDash.length||this.ctx.lineDashOffset){var y,R,B=(y=this.ctx.lineDash,R=this.ctx.lineDashOffset,JSON.stringify({lineDash:y,lineDashOffset:R}));this.prevLineDash!==B&&(this.pdf.setLineDash(this.ctx.lineDash,this.ctx.lineDashOffset),this.prevLineDash=B)}}})(Dt.API),(function(t){var n=function(c){var l,f,d,m,A,L,p,T,O,j;for(/[^\x00-\xFF]/.test(c),f=[],d=0,m=(c+=l="\0\0\0\0".slice(c.length%4||4)).length;m>d;d+=4)(A=(c.charCodeAt(d)<<24)+(c.charCodeAt(d+1)<<16)+(c.charCodeAt(d+2)<<8)+c.charCodeAt(d+3))!==0?(L=(A=((A=((A=((A=(A-(j=A%85))/85)-(O=A%85))/85)-(T=A%85))/85)-(p=A%85))/85)%85,f.push(L+33,p+33,T+33,O+33,j+33)):f.push(122);return(function(k,Z){for(var $=Z;$>0;$--)k.pop()})(f,l.length),String.fromCharCode.apply(String,f)+"~>"},e=function(c){var l,f,d,m,A,L=String,p="length",T=255,O="charCodeAt",j="slice",k="replace";for(c[j](-2),c=c[j](0,-2)[k](/\s/g,"")[k]("z","!!!!!"),d=[],m=0,A=(c+=l="uuuuu"[j](c[p]%5||5))[p];A>m;m+=5)f=52200625*(c[O](m)-33)+614125*(c[O](m+1)-33)+7225*(c[O](m+2)-33)+85*(c[O](m+3)-33)+(c[O](m+4)-33),d.push(T&f>>24,T&f>>16,T&f>>8,T&f);return(function(Z,$){for(var M=$;M>0;M--)Z.pop()})(d,l[p]),L.fromCharCode.apply(L,d)},i=function(c){return c.split("").map(function(l){return("0"+l.charCodeAt().toString(16)).slice(-2)}).join("")+">"},a=function(c){var l=new RegExp(/^([0-9A-Fa-f]{2})+$/);if((c=c.replace(/\s/g,"")).indexOf(">")!==-1&&(c=c.substr(0,c.indexOf(">"))),c.length%2&&(c+="0"),l.test(c)===!1)return"";for(var f="",d=0;d<c.length;d+=2)f+=String.fromCharCode("0x"+(c[d]+c[d+1]));return f},o=function(c){for(var l=new Uint8Array(c.length),f=c.length;f--;)l[f]=c.charCodeAt(f);return(l=Il(l)).reduce(function(d,m){return d+String.fromCharCode(m)},"")};t.processDataByFilters=function(c,l){var f=0,d=c||"",m=[];for(typeof(l=l||[])=="string"&&(l=[l]),f=0;f<l.length;f+=1)switch(l[f]){case"ASCII85Decode":case"/ASCII85Decode":d=e(d),m.push("/ASCII85Encode");break;case"ASCII85Encode":case"/ASCII85Encode":d=n(d),m.push("/ASCII85Decode");break;case"ASCIIHexDecode":case"/ASCIIHexDecode":d=a(d),m.push("/ASCIIHexEncode");break;case"ASCIIHexEncode":case"/ASCIIHexEncode":d=i(d),m.push("/ASCIIHexDecode");break;case"FlateEncode":case"/FlateEncode":d=o(d),m.push("/FlateDecode");break;default:throw new Error('The filter: "'+l[f]+'" is not implemented')}return{data:d,reverseChain:m.reverse().join(" ")}}})(Dt.API),(function(t){t.loadFile=function(n,e,i){return(function(a,o,c){o=o!==!1,c=typeof c=="function"?c:function(){};var l=void 0;try{l=(function(f,d,m){var A=new XMLHttpRequest,L=0,p=function(T){var O=T.length,j=[],k=String.fromCharCode;for(L=0;L<O;L+=1)j.push(k(255&T.charCodeAt(L)));return j.join("")};if(A.open("GET",f,!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)})(a,o,c)}catch(f){}return l})(n,e,i)},t.allowFsRead=void 0,t.loadImageFile=t.loadFile})(Dt.API),(function(t){function n(){return(Yt.html2canvas?Promise.resolve(Yt.html2canvas):il(()=>import("./html2canvas.esm-CviiA4BU.js"),[])).catch(function(l){return Promise.reject(new Error("Could not load html2canvas: "+l))}).then(function(l){return l.default?l.default:l})}function e(){return(Yt.DOMPurify?Promise.resolve(Yt.DOMPurify):il(()=>import("./purify.es-B6_nni-g.js"),[])).catch(function(l){return Promise.reject(new Error("Could not load dompurify: "+l))}).then(function(l){return l.default?l.default:l})}var i=function(l){var f=Pe(l);return f==="undefined"?"undefined":f==="string"||l instanceof String?"string":f==="number"||l instanceof Number?"number":f==="function"||l instanceof Function?"function":l&&l.constructor===Array?"array":l&&l.nodeType===1?"element":f==="object"?"object":"unknown"},a=function(l,f){var d=document.createElement(l);for(var m in f.className&&(d.className=f.className),f.innerHTML&&f.dompurify&&(d.innerHTML=f.dompurify.sanitize(f.innerHTML)),f.style)d.style[m]=f.style[m];return d},o=function l(f,d){for(var m=f.nodeType===3?document.createTextNode(f.nodeValue):f.cloneNode(!1),A=f.firstChild;A;A=A.nextSibling)d!==!0&&A.nodeType===1&&A.nodeName==="SCRIPT"||m.appendChild(l(A,d));return f.nodeType===1&&(f.nodeName==="CANVAS"?(m.width=f.width,m.height=f.height,m.getContext("2d").drawImage(f,0,0)):f.nodeName!=="TEXTAREA"&&f.nodeName!=="SELECT"||(m.value=f.value),m.addEventListener("load",function(){m.scrollTop=f.scrollTop,m.scrollLeft=f.scrollLeft},!0)),m},c=function l(f){var d=Object.assign(l.convert(Promise.resolve()),JSON.parse(JSON.stringify(l.template))),m=l.convert(Promise.resolve(),d);return(m=m.setProgress(1,l,1,[l])).set(f)};(c.prototype=Object.create(Promise.prototype)).constructor=c,c.convert=function(l,f){return l.__proto__=f||c.prototype,l},c.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"}},c.prototype.from=function(l,f){return this.then(function(){switch(f=f||(function(d){switch(i(d)){case"string":return"string";case"element":return d.nodeName.toLowerCase()==="canvas"?"canvas":"element";default:return"unknown"}})(l),f){case"string":return this.then(e).then(function(d){return this.set({src:a("div",{innerHTML:l,dompurify:d})})});case"element":return this.set({src:l});case"canvas":return this.set({canvas:l});case"img":return this.set({img:l});default:return this.error("Unknown source type.")}})},c.prototype.to=function(l){switch(l){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.")}},c.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 l={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},f=o(this.prop.src,this.opt.html2canvas.javascriptEnabled);f.tagName==="BODY"&&(l.height=Math.max(document.body.scrollHeight,document.body.offsetHeight,document.documentElement.clientHeight,document.documentElement.scrollHeight,document.documentElement.offsetHeight)+"px"),this.prop.overlay=a("div",{className:"html2pdf__overlay",style:{position:"fixed",overflow:"hidden",zIndex:1e3,left:"-100000px",right:0,bottom:0,top:0}}),this.prop.container=a("div",{className:"html2pdf__container",style:l}),this.prop.container.appendChild(f),this.prop.container.firstChild.appendChild(a("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"})},c.prototype.toCanvas=function(){var l=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(l).then(n).then(function(f){var d=Object.assign({},this.opt.html2canvas);return delete d.onrendered,f(this.prop.container,d)}).then(function(f){(this.opt.html2canvas.onrendered||function(){})(f),this.prop.canvas=f,document.body.removeChild(this.prop.overlay)})},c.prototype.toContext2d=function(){var l=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(l).then(n).then(function(f){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,L=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 L.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 T=m[p],O=T.src.find(function(j){return j.format==="truetype"});O&&d.addFont(O.url,T.ref.name,T.ref.style)}return L.windowHeight=L.windowHeight||0,L.windowHeight=L.windowHeight==0?Math.max(this.prop.container.clientHeight,this.prop.container.scrollHeight,this.prop.container.offsetHeight):L.windowHeight,d.context2d.save(!0),f(this.prop.container,L)}).then(function(f){this.opt.jsPDF.context2d.restore(!0),(this.opt.html2canvas.onrendered||function(){})(f),this.prop.canvas=f,document.body.removeChild(this.prop.overlay)})},c.prototype.toImg=function(){return this.thenList([function(){return this.prop.canvas||this.toCanvas()}]).then(function(){var l=this.prop.canvas.toDataURL("image/"+this.opt.image.type,this.opt.image.quality);this.prop.img=document.createElement("img"),this.prop.img.src=l})},c.prototype.toPdf=function(){return this.thenList([function(){return this.toContext2d()}]).then(function(){this.prop.pdf=this.prop.pdf||this.opt.jsPDF})},c.prototype.output=function(l,f,d){return(d=d||"pdf").toLowerCase()==="img"||d.toLowerCase()==="image"?this.outputImg(l,f):this.outputPdf(l,f)},c.prototype.outputPdf=function(l,f){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then(function(){return this.prop.pdf.output(l,f)})},c.prototype.outputImg=function(l){return this.thenList([function(){return this.prop.img||this.toImg()}]).then(function(){switch(l){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 "'+l+'" is not supported.'}})},c.prototype.save=function(l){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).set(l?{filename:l}:null).then(function(){this.prop.pdf.save(this.opt.filename)})},c.prototype.doCallback=function(){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then(function(){this.prop.callback(this.prop.pdf)})},c.prototype.set=function(l){if(i(l)!=="object")return this;var f=Object.keys(l||{}).map(function(d){if(d in c.template.prop)return function(){this.prop[d]=l[d]};switch(d){case"margin":return this.setMargin.bind(this,l.margin);case"jsPDF":return function(){return this.opt.jsPDF=l.jsPDF,this.setPageSize()};case"pageSize":return this.setPageSize.bind(this,l.pageSize);default:return function(){this.opt[d]=l[d]}}},this);return this.then(function(){return this.thenList(f)})},c.prototype.get=function(l,f){return this.then(function(){var d=l in c.template.prop?this.prop[l]:this.opt[l];return f?f(d):d})},c.prototype.setMargin=function(l){return this.then(function(){switch(i(l)){case"number":l=[l,l,l,l];case"array":if(l.length===2&&(l=[l[0],l[1],l[0],l[1]]),l.length===4)break;default:return this.error("Invalid margin array.")}this.opt.margin=l}).then(this.setPageSize)},c.prototype.setPageSize=function(l){function f(d,m){return Math.floor(d*m/72*96)}return this.then(function(){(l=l||Dt.getPageSize(this.opt.jsPDF)).hasOwnProperty("inner")||(l.inner={width:l.width-this.opt.margin[1]-this.opt.margin[3],height:l.height-this.opt.margin[0]-this.opt.margin[2]},l.inner.px={width:f(l.inner.width,l.k),height:f(l.inner.height,l.k)},l.inner.ratio=l.inner.height/l.inner.width),this.prop.pageSize=l})},c.prototype.setProgress=function(l,f,d,m){return l!=null&&(this.progress.val=l),f!=null&&(this.progress.state=f),d!=null&&(this.progress.n=d),m!=null&&(this.progress.stack=m),this.progress.ratio=this.progress.val/this.progress.state,this},c.prototype.updateProgress=function(l,f,d,m){return this.setProgress(l?this.progress.val+l:null,f||null,d?this.progress.n+d:null,m?this.progress.stack.concat(m):null)},c.prototype.then=function(l,f){var d=this;return this.thenCore(l,f,function(m,A){return d.updateProgress(null,null,1,[m]),Promise.prototype.then.call(this,function(L){return d.updateProgress(null,m),L}).then(m,A).then(function(L){return d.updateProgress(1),L})})},c.prototype.thenCore=function(l,f,d){d=d||Promise.prototype.then;var m=this;l&&(l=l.bind(m)),f&&(f=f.bind(m));var A=Promise.toString().indexOf("[native code]")!==-1&&Promise.name==="Promise"?m:c.convert(Object.assign({},m),Promise.prototype),L=d.call(A,l,f);return c.convert(L,m.__proto__)},c.prototype.thenExternal=function(l,f){return Promise.prototype.then.call(this,l,f)},c.prototype.thenList=function(l){var f=this;return l.forEach(function(d){f=f.thenCore(d)}),f},c.prototype.catch=function(l){l&&(l=l.bind(this));var f=Promise.prototype.catch.call(this,l);return c.convert(f,this)},c.prototype.catchExternal=function(l){return Promise.prototype.catch.call(this,l)},c.prototype.error=function(l){return this.then(function(){throw new Error(l)})},c.prototype.using=c.prototype.set,c.prototype.saveAs=c.prototype.save,c.prototype.export=c.prototype.output,c.prototype.run=c.prototype.then,Dt.getPageSize=function(l,f,d){if(Pe(l)==="object"){var m=l;l=m.orientation,f=m.unit||f,d=m.format||d}f=f||"mm",d=d||"a4",l=(""+(l||"P")).toLowerCase();var A,L=(""+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(f){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: "+f}var T,O=0,j=0;if(p.hasOwnProperty(L))O=p[L][1]/A,j=p[L][0]/A;else try{O=d[1],j=d[0]}catch(k){throw new Error("Invalid format: "+d)}if(l==="p"||l==="portrait")l="p",j>O&&(T=j,j=O,O=T);else{if(l!=="l"&&l!=="landscape")throw"Invalid orientation: "+l;l="l",O>j&&(T=j,j=O,O=T)}return{width:j,height:O,unit:f,k:A,orientation:l}},t.html=function(l,f){(f=f||{}).callback=f.callback||function(){},f.html2canvas=f.html2canvas||{},f.html2canvas.canvas=f.html2canvas.canvas||this.canvas,f.jsPDF=f.jsPDF||this,f.fontFaces=f.fontFaces?f.fontFaces.map(Sl):null;var d=new c(f);return f.worker?d:d.from(l).doCallback()}})(Dt.API),Dt.API.addJS=function(t){var n,e,i=(function(a){for(var o="",c=0;c<a.length;c++){var l=a[c];if(l==="("||l===")"){for(var f=0,d=c-1;d>=0&&a[d]==="\\";d--)f++;o+=f%2==0?"\\"+l:l}else o+=l}return o})(t);return this.internal.events.subscribe("postPutResources",function(){n=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/Names [(EmbeddedJS) "+(n+1)+" 0 R]"),this.internal.out(">>"),this.internal.out("endobj"),e=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/S /JavaScript"),this.internal.out("/JS ("+i+")"),this.internal.out(">>"),this.internal.out("endobj")}),this.internal.events.subscribe("putCatalog",function(){n!==void 0&&e!==void 0&&this.internal.out("/Names <</JavaScript "+n+" 0 R>>")}),this},(function(t){var n;t.events.push(["postPutResources",function(){var e=this,i=/^(\d+) 0 obj$/;if(this.outline.root.children.length>0)for(var a=e.outline.render().split(/\r\n/),o=0;o<a.length;o++){var c=a[o],l=i.exec(c);if(l!=null){var f=l[1];e.internal.newObjectDeferredBegin(f,!1)}e.internal.write(c)}if(this.outline.createNamedDestinations){var d=this.internal.pages.length,m=[];for(o=0;o<d;o++){var A=e.internal.newObject();m.push(A);var L=e.internal.getPageInfo(o+1);e.internal.write("<< /D["+L.objId+" 0 R /XYZ null null null]>> endobj")}var p=e.internal.newObject();for(e.internal.write("<< /Names [ "),o=0;o<m.length;o++)e.internal.write("(page_"+(o+1)+")"+m[o]+" 0 R");e.internal.write(" ] >>","endobj"),n=e.internal.newObject(),e.internal.write("<< /Dests "+p+" 0 R"),e.internal.write(">>","endobj")}}]),t.events.push(["putCatalog",function(){var e=this;e.outline.root.children.length>0&&(e.internal.write("/Outlines",this.outline.makeRef(this.outline.root)),this.outline.createNamedDestinations&&e.internal.write("/Names "+n+" 0 R"))}]),t.events.push(["initialized",function(){var e=this;e.outline={createNamedDestinations:!1,root:{children:[]}},e.outline.add=function(i,a,o){var c={title:a,options:o,children:[]};return i==null&&(i=this.root),i.children.push(c),c},e.outline.render=function(){return this.ctx={},this.ctx.val="",this.ctx.pdf=e,this.genIds_r(this.root),this.renderRoot(this.root),this.renderItems(this.root),this.ctx.val},e.outline.genIds_r=function(i){i.id=e.internal.newObjectDeferred();for(var a=0;a<i.children.length;a++)this.genIds_r(i.children[a])},e.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()},e.outline.renderItems=function(i){for(var a=this.ctx.pdf.internal.getVerticalCoordinateString,o=0;o<i.children.length;o++){var c=i.children[o];this.objStart(c),this.line("/Title "+this.makeString(c.title)),this.line("/Parent "+this.makeRef(i)),o>0&&this.line("/Prev "+this.makeRef(i.children[o-1])),o<i.children.length-1&&this.line("/Next "+this.makeRef(i.children[o+1])),c.children.length>0&&(this.line("/First "+this.makeRef(c.children[0])),this.line("/Last "+this.makeRef(c.children[c.children.length-1])));var l=this.count=this.count_r({count:0},c);if(l>0&&this.line("/Count "+l),c.options&&c.options.pageNumber){var f=e.internal.getPageInfo(c.options.pageNumber);this.line("/Dest ["+f.objId+" 0 R /XYZ 0 "+a(0)+" 0]")}this.objEnd()}for(var d=0;d<i.children.length;d++)this.renderItems(i.children[d])},e.outline.line=function(i){this.ctx.val+=i+`\r
|
||
`},e.outline.makeRef=function(i){return i.id+" 0 R"},e.outline.makeString=function(i){return"("+e.internal.pdfEscape(i)+")"},e.outline.objStart=function(i){this.ctx.val+=`\r
|
||
`+i.id+` 0 obj\r
|
||
<<\r
|
||
`},e.outline.objEnd=function(){this.ctx.val+=`>> \r
|
||
endobj\r
|
||
`},e.outline.count_r=function(i,a){for(var o=0;o<a.children.length;o++)i.count++,this.count_r(i,a.children[o]);return i.count}}])})(Dt.API),(function(t){var n=[192,193,194,195,196,197,198,199];t.processJPEG=function(e,i,a,o,c,l){var f,d=this.decode.DCT_DECODE,m=null;if(typeof e=="string"||this.__addimage__.isArrayBuffer(e)||this.__addimage__.isArrayBufferView(e)){switch(e=c||e,e=this.__addimage__.isArrayBuffer(e)?new Uint8Array(e):e,f=(function(A){for(var L,p=256*A.charCodeAt(4)+A.charCodeAt(5),T=A.length,O={width:0,height:0,numcomponents:1},j=4;j<T;j+=2){if(j+=p,n.indexOf(A.charCodeAt(j+1))!==-1){L=256*A.charCodeAt(j+5)+A.charCodeAt(j+6),O={width:256*A.charCodeAt(j+7)+A.charCodeAt(j+8),height:L,numcomponents:A.charCodeAt(j+9)};break}p=256*A.charCodeAt(j+2)+A.charCodeAt(j+3)}return O})(e=this.__addimage__.isArrayBufferView(e)?this.__addimage__.arrayBufferToBinaryString(e):e),f.numcomponents){case 1:l=this.color_spaces.DEVICE_GRAY;break;case 4:l=this.color_spaces.DEVICE_CMYK;break;case 3:l=this.color_spaces.DEVICE_RGB}m={data:e,width:f.width,height:f.height,colorSpace:l,bitsPerComponent:8,filter:d,index:i,alias:a}}return m}})(Dt.API),Dt.API.processPNG=function(t,n,e,i){if(this.__addimage__.isArrayBuffer(t)&&(t=new Uint8Array(t)),this.__addimage__.isArrayBufferView(t)){var a,o=n5(t,{checkCrc:!0}),c=o.width,l=o.height,f=o.channels,d=o.palette,m=o.depth;a=d&&f===1?(function(tt){for(var z=tt.width,et=tt.height,N=tt.data,F=tt.palette,U=tt.depth,q=!1,it=[],ft=[],pt=void 0,nt=!1,ut=0,At=0;At<F.length;At++){var yt=jh(F[At],4),y=yt[0],R=yt[1],B=yt[2],G=yt[3];it.push(y,R,B),G!=null&&(G===0?(ut++,ft.length<1&&ft.push(At)):G<255&&(nt=!0))}if(nt||ut>1){q=!0,ft=void 0;var Y=z*et;pt=new Uint8Array(Y);for(var Q=new DataView(N.buffer),rt=0;rt<Y;rt++){var at=Pl(Q,rt,U),dt=jh(F[at],4)[3];pt[rt]=dt}}else ut===0&&(ft=void 0);return{colorSpace:"Indexed",colorsPerPixel:1,sMaskBitsPerComponent:q?8:void 0,colorBytes:N,alphaBytes:pt,needSMask:q,palette:it,mask:ft}})(o):f===2||f===4?(function(tt){for(var z=tt.data,et=tt.width,N=tt.height,F=tt.channels,U=tt.depth,q=F===2?"DeviceGray":"DeviceRGB",it=F-1,ft=et*N,pt=it,nt=ft*pt,ut=1*ft,At=Math.ceil(nt*U/8),yt=Math.ceil(ut*U/8),y=new Uint8Array(At),R=new Uint8Array(yt),B=new DataView(z.buffer),G=new DataView(y.buffer),Y=new DataView(R.buffer),Q=!1,rt=0;rt<ft;rt++){for(var at=rt*F,dt=0;dt<pt;dt++)Yc(G,Pl(B,at+dt,U),rt*pt+dt,U);var xt=Pl(B,at+pt,U);xt<(1<<U)-1&&(Q=!0),Yc(Y,xt,1*rt,U)}return{colorSpace:q,colorsPerPixel:it,sMaskBitsPerComponent:Q?U:void 0,colorBytes:y,alphaBytes:R,needSMask:Q}})(o):(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 F=N.length,U=new Uint8Array(2*F),q=new DataView(U.buffer,U.byteOffset,U.byteLength),it=0;it<F;it++)q.setUint16(2*it,N[it],!1);return U})(z):z,needSMask:!1}})(o);var A,L,p,T=a,O=T.colorSpace,j=T.colorsPerPixel,k=T.sMaskBitsPerComponent,Z=T.colorBytes,$=T.alphaBytes,M=T.needSMask,lt=T.palette,_t=T.mask,mt=null;return i!==Dt.API.image_compression.NONE&&typeof Il=="function"?(mt=(function(tt){var z;switch(tt){case Dt.API.image_compression.FAST:z=11;break;case Dt.API.image_compression.MEDIUM:z=13;break;case Dt.API.image_compression.SLOW:z=14;break;default:z=12}return z})(i),A=this.decode.FLATE_DECODE,L="/Predictor ".concat(mt," /Colors ").concat(j," /BitsPerComponent ").concat(m," /Columns ").concat(c),t=Wc(Z,Math.ceil(c*j*m/8),j,m,i),M&&(p=Wc($,Math.ceil(c*k/8),1,k,i))):(A=void 0,L=void 0,t=Z,M&&(p=$)),(this.__addimage__.isArrayBuffer(t)||this.__addimage__.isArrayBufferView(t))&&(t=this.__addimage__.arrayBufferToBinaryString(t)),(p&&this.__addimage__.isArrayBuffer(p)||this.__addimage__.isArrayBufferView(p))&&(p=this.__addimage__.arrayBufferToBinaryString(p)),{alias:e,data:t,index:n,filter:A,decodeParameters:L,transparency:_t,palette:lt,sMask:p,predictor:mt,width:c,height:l,bitsPerComponent:m,sMaskBitsPerComponent:k,colorSpace:O}}},(function(t){t.processGIF89A=function(n,e,i,a){var o=new A5(n),c=o.width,l=o.height,f=[];o.decodeAndBlitFrameRGBA(0,f);var d={data:f,width:c,height:l},m=new El(100).encode(d,100);return t.processJPEG.call(this,m,e,i,a)},t.processGIF87A=t.processGIF89A})(Dt.API),oi.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 t=this.colors===0?1<<this.bitPP:this.colors;this.palette=new Array(t);for(var n=0;n<t;n++){var e=this.datav.getUint8(this.pos++,!0),i=this.datav.getUint8(this.pos++,!0),a=this.datav.getUint8(this.pos++,!0),o=this.datav.getUint8(this.pos++,!0);this.palette[n]={red:a,green:i,blue:e,quad:o}}}this.height<0&&(this.height*=-1,this.bottom_up=!1)},oi.prototype.parseBGR=function(){this.pos=this.offset;var t="bit"+this.bitPP,n=this.width*this.height*4;if(n>536870912)throw new Error("Image dimensions exceed 512MB, which is too large.");this.data=new Uint8Array(n);try{this[t]()}catch(e){ke.log("bit decode error:"+e)}},oi.prototype.bit1=function(){var t,n=Math.ceil(this.width/8),e=n%4;for(t=this.height-1;t>=0;t--){for(var i=this.bottom_up?t:this.height-1-t,a=0;a<n;a++)for(var o=this.datav.getUint8(this.pos++,!0),c=i*this.width*4+8*a*4,l=0;l<8&&8*a+l<this.width;l++){var f=this.palette[o>>7-l&1];this.data[c+4*l]=f.blue,this.data[c+4*l+1]=f.green,this.data[c+4*l+2]=f.red,this.data[c+4*l+3]=255}e!==0&&(this.pos+=4-e)}},oi.prototype.bit4=function(){for(var t=Math.ceil(this.width/2),n=t%4,e=this.height-1;e>=0;e--){for(var i=this.bottom_up?e:this.height-1-e,a=0;a<t;a++){var o=this.datav.getUint8(this.pos++,!0),c=i*this.width*4+2*a*4,l=o>>4,f=15&o,d=this.palette[l];if(this.data[c]=d.blue,this.data[c+1]=d.green,this.data[c+2]=d.red,this.data[c+3]=255,2*a+1>=this.width)break;d=this.palette[f],this.data[c+4]=d.blue,this.data[c+4+1]=d.green,this.data[c+4+2]=d.red,this.data[c+4+3]=255}n!==0&&(this.pos+=4-n)}},oi.prototype.bit8=function(){for(var t=this.width%4,n=this.height-1;n>=0;n--){for(var e=this.bottom_up?n:this.height-1-n,i=0;i<this.width;i++){var a=this.datav.getUint8(this.pos++,!0),o=e*this.width*4+4*i;if(a<this.palette.length){var c=this.palette[a];this.data[o]=c.red,this.data[o+1]=c.green,this.data[o+2]=c.blue,this.data[o+3]=255}else this.data[o]=255,this.data[o+1]=255,this.data[o+2]=255,this.data[o+3]=255}t!==0&&(this.pos+=4-t)}},oi.prototype.bit15=function(){for(var t=this.width%3,n=parseInt("11111",2),e=this.height-1;e>=0;e--){for(var i=this.bottom_up?e:this.height-1-e,a=0;a<this.width;a++){var o=this.datav.getUint16(this.pos,!0);this.pos+=2;var c=(o&n)/n*255|0,l=(o>>5&n)/n*255|0,f=(o>>10&n)/n*255|0,d=o>>15?255:0,m=i*this.width*4+4*a;this.data[m]=f,this.data[m+1]=l,this.data[m+2]=c,this.data[m+3]=d}this.pos+=t}},oi.prototype.bit16=function(){for(var t=this.width%3,n=parseInt("11111",2),e=parseInt("111111",2),i=this.height-1;i>=0;i--){for(var a=this.bottom_up?i:this.height-1-i,o=0;o<this.width;o++){var c=this.datav.getUint16(this.pos,!0);this.pos+=2;var l=(c&n)/n*255|0,f=(c>>5&e)/e*255|0,d=(c>>11)/n*255|0,m=a*this.width*4+4*o;this.data[m]=d,this.data[m+1]=f,this.data[m+2]=l,this.data[m+3]=255}this.pos+=t}},oi.prototype.bit24=function(){for(var t=this.height-1;t>=0;t--){for(var n=this.bottom_up?t:this.height-1-t,e=0;e<this.width;e++){var i=this.datav.getUint8(this.pos++,!0),a=this.datav.getUint8(this.pos++,!0),o=this.datav.getUint8(this.pos++,!0),c=n*this.width*4+4*e;this.data[c]=o,this.data[c+1]=a,this.data[c+2]=i,this.data[c+3]=255}this.pos+=this.width%4}},oi.prototype.bit32=function(){for(var t=this.height-1;t>=0;t--)for(var n=this.bottom_up?t:this.height-1-t,e=0;e<this.width;e++){var i=this.datav.getUint8(this.pos++,!0),a=this.datav.getUint8(this.pos++,!0),o=this.datav.getUint8(this.pos++,!0),c=this.datav.getUint8(this.pos++,!0),l=n*this.width*4+4*e;this.data[l]=o,this.data[l+1]=a,this.data[l+2]=i,this.data[l+3]=c}},oi.prototype.getData=function(){return this.data},(function(t){t.processBMP=function(n,e,i,a){var o=new oi(n,!1),c=o.width,l=o.height,f={data:o.getData(),width:c,height:l},d=new El(100).encode(f,100);return t.processJPEG.call(this,d,e,i,a)}})(Dt.API),Xc.prototype.getData=function(){return this.data},(function(t){t.processWEBP=function(n,e,i,a){var o=new Xc(n),c=o.width,l=o.height,f={data:o.getData(),width:c,height:l},d=new El(100).encode(f,100);return t.processJPEG.call(this,d,e,i,a)}})(Dt.API),Dt.API.processRGBA=function(t,n,e){for(var i=t.data,a=i.length,o=new Uint8Array(a/4*3),c=new Uint8Array(a/4),l=0,f=0,d=0;d<a;d+=4){var m=i[d],A=i[d+1],L=i[d+2],p=i[d+3];o[l++]=m,o[l++]=A,o[l++]=L,c[f++]=p}var T=this.__addimage__.arrayBufferToBinaryString(o);return{alpha:this.__addimage__.arrayBufferToBinaryString(c),data:T,index:n,alias:e,colorSpace:"DeviceRGB",bitsPerComponent:8,width:t.width,height:t.height}},Dt.API.setLanguage=function(t){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"}[t]!==void 0&&(this.internal.languageSettings.languageCode=t,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},pa=Dt.API,as=pa.getCharWidthsArray=function(t,n){var e,i,a=(n=n||{}).font||this.internal.getFont(),o=n.fontSize||this.internal.getFontSize(),c=n.charSpace||this.internal.getCharSpace(),l=n.widths?n.widths:a.metadata.Unicode.widths,f=l.fof?l.fof:1,d=n.kerning?n.kerning:a.metadata.Unicode.kerning,m=d.fof?d.fof:1,A=n.doKerning!==!1,L=0,p=t.length,T=0,O=l[0]||f,j=[];for(e=0;e<p;e++)i=t.charCodeAt(e),typeof a.metadata.widthOfString=="function"?j.push((a.metadata.widthOfGlyph(a.metadata.characterToGlyph(i))+c*(1e3/o)||0)/1e3):(L=A&&Pe(d[i])==="object"&&!isNaN(parseInt(d[i][T],10))?d[i][T]/m:0,j.push((l[i]||O)/f+L)),T=i;return j},qc=pa.getStringUnitWidth=function(t,n){var e=(n=n||{}).fontSize||this.internal.getFontSize(),i=n.font||this.internal.getFont(),a=n.charSpace||this.internal.getCharSpace();return pa.processArabic&&(t=pa.processArabic(t)),typeof i.metadata.widthOfString=="function"?i.metadata.widthOfString(t,e,a)/e:as.apply(this,arguments).reduce(function(o,c){return o+c},0)},zc=function(t,n,e,i){for(var a=[],o=0,c=t.length,l=0;o!==c&&l+n[o]<e;)l+=n[o],o++;a.push(t.slice(0,o));var f=o;for(l=0;o!==c;)l+n[o]>i&&(a.push(t.slice(f,o)),l=0,f=o),l+=n[o],o++;return f!==o&&a.push(t.slice(f,o)),a},Hc=function(t,n,e){e||(e={});var i,a,o,c,l,f,d,m=[],A=[m],L=e.textIndent||0,p=0,T=0,O=t.split(" "),j=as.apply(this,[" ",e])[0];if(f=e.lineIndent===-1?O[0].length+2:e.lineIndent||0){var k=Array(f).join(" "),Z=[];O.map(function(M){(M=M.split(/\s*\n/)).length>1?Z=Z.concat(M.map(function(lt,_t){return(_t&<.length?`
|
||
`:"")+lt})):Z.push(M[0])}),O=Z,f=qc.apply(this,[k,e])}for(o=0,c=O.length;o<c;o++){var $=0;if(i=O[o],f&&i[0]==`
|
||
`&&(i=i.substr(1),$=1),L+p+(T=(a=as.apply(this,[i,e])).reduce(function(M,lt){return M+lt},0))>n||$){if(T>n){for(l=zc.apply(this,[i,a,n-(L+p),n]),m.push(l.shift()),m=[l.pop()];l.length;)A.push([l.shift()]);T=a.slice(i.length-(m[0]?m[0].length:0)).reduce(function(M,lt){return M+lt},0)}else m=[i];A.push(m),L=T+f,p=j}else m.push(i),L+=p+T,p=j}return d=f?function(M,lt){return(lt?k:"")+M.join(" ")}:function(M){return M.join(" ")},A.map(d)},pa.splitTextToSize=function(t,n,e){var i,a=(e=e||{}).fontSize||this.internal.getFontSize(),o=function(m){if(m.widths&&m.kerning)return{widths:m.widths,kerning:m.kerning};var A=this.internal.getFont(m.fontName,m.fontStyle),L="Unicode";return A.metadata[L]?{widths:A.metadata[L].widths||{0:1},kerning:A.metadata[L].kerning||{}}:{font:A.metadata,fontSize:this.internal.getFontSize(),charSpace:this.internal.getCharSpace()}}.call(this,e);i=Array.isArray(t)?t:String(t).split(/\r?\n/);var c=1*this.internal.scaleFactor*n/a;o.textIndent=e.textIndent?1*e.textIndent*this.internal.scaleFactor/a:0,o.lineIndent=e.lineIndent;var l,f,d=[];for(l=0,f=i.length;l<f;l++)d=d.concat(Hc.apply(this,[i[l],c,o]));return d},(function(t){t.__fontmetrics__=t.__fontmetrics__||{};for(var n="0123456789abcdef",e="klmnopqrstuvwxyz",i={},a={},o=0;o<16;o++)i[e[o]]=n[o],a[n[o]]=e[o];var c=function(L){return"0x"+parseInt(L,10).toString(16)},l=t.__fontmetrics__.compress=function(L){var p,T,O,j,k=["{"];for(var Z in L){if(p=L[Z],isNaN(parseInt(Z,10))?T="'"+Z+"'":(Z=parseInt(Z,10),T=(T=c(Z).slice(2)).slice(0,-1)+a[T.slice(-1)]),typeof p=="number")p<0?(O=c(p).slice(3),j="-"):(O=c(p).slice(2),j=""),O=j+O.slice(0,-1)+a[O.slice(-1)];else{if(Pe(p)!=="object")throw new Error("Don't know what to do with value type "+Pe(p)+".");O=l(p)}k.push(T+O)}return k.push("}"),k.join("")},f=t.__fontmetrics__.uncompress=function(L){if(typeof L!="string")throw new Error("Invalid argument passed to uncompress.");for(var p,T,O,j,k={},Z=1,$=k,M=[],lt="",_t="",mt=L.length-1,tt=1;tt<mt;tt+=1)(j=L[tt])=="'"?p?(O=p.join(""),p=void 0):p=[]:p?p.push(j):j=="{"?(M.push([$,O]),$={},O=void 0):j=="}"?((T=M.pop())[0][T[1]]=$,O=void 0,$=T[0]):j=="-"?Z=-1:O===void 0?i.hasOwnProperty(j)?(lt+=i[j],O=parseInt(lt,16)*Z,Z=1,lt=""):lt+=j:i.hasOwnProperty(j)?(_t+=i[j],$[O]=parseInt(_t,16)*Z,Z=1,O=void 0,_t=""):_t+=j;return k},d={codePages:["WinAnsiEncoding"],WinAnsiEncoding:f("{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":f("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-BoldItalic":f("{'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":f("{'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:f("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-BoldOblique":f("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Bold":f("{'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:f("{'widths'{k3uaw4r19m3m2k1t2l2l202m2y2n3m2p5n202q6o3k3m2s2l2t2l2v3r2w1t3m3m2y1t2z1wbk2sbl3r'fof'6o3n3m3o3m3p3m3q3m3r3m3s3m3t3m3u1w3v1w3w3r3x3r3y3r3z2wbp3t3l3m5v2l5x2l5z3m2q4yfr3r7v3k7w1o7x3k}'kerning'{'fof'-6o}}"),Helvetica:f("{'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":f("{'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:f("{'widths'{k4u2k1w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-Bold":f("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Italic":f("{'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":f("{'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":f("{'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}}}")}};t.events.push(["addFont",function(L){var p=L.font,T=A.Unicode[p.postScriptName];T&&(p.metadata.Unicode={},p.metadata.Unicode.widths=T.widths,p.metadata.Unicode.kerning=T.kerning);var O=m.Unicode[p.postScriptName];O&&(p.metadata.Unicode.encoding=O,p.encoding=O.codePages[0])}])})(Dt.API),(function(t){var n=function(e){for(var i=e.length,a=new Uint8Array(i),o=0;o<i;o++)a[o]=e.charCodeAt(o);return a};t.API.events.push(["addFont",function(e){var i=void 0,a=e.font,o=e.instance;if(!a.isStandardFont){if(o===void 0)throw new Error("Font does not exist in vFS, import fonts or remove declaration doc.addFont('"+a.postScriptName+"').");if(typeof(i=o.existsFileInVFS(a.postScriptName)===!1?o.loadFile(a.postScriptName):o.getFileFromVFS(a.postScriptName))!="string")throw new Error("Font is not stored as string-data in vFS, import fonts or remove declaration doc.addFont('"+a.postScriptName+"').");(function(c,l){l=/^\x00\x01\x00\x00/.test(l)?n(l):n(ls(l)),c.metadata=t.API.TTFFont.open(l),c.metadata.Unicode=c.metadata.Unicode||{encoding:{},kerning:{},widths:[]},c.metadata.glyIdsUsed=[0]})(a,i)}}])})(Dt),Dt.API.addSvgAsImage=function(t,n,e,i,a,o,c,l){if(isNaN(n)||isNaN(e))throw ke.error("jsPDF.addSvgAsImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addSvgAsImage");if(isNaN(i)||isNaN(a))throw ke.error("jsPDF.addSvgAsImage: Invalid measurements",arguments),new Error("Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage");var f=document.createElement("canvas");f.width=i,f.height=a;var d=f.getContext("2d");d.fillStyle="#fff",d.fillRect(0,0,f.width,f.height);var m={ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0},A=this;return(Yt.canvg?Promise.resolve(Yt.canvg):il(()=>import("./index.es-Dv2Hmdq3.js"),__vite__mapDeps([0,1,2,3]))).catch(function(L){return Promise.reject(new Error("Could not load canvg: "+L))}).then(function(L){return L.default?L.default:L}).then(function(L){return L.fromString(d,t,m)},function(){return Promise.reject(new Error("Could not load canvg."))}).then(function(L){return L.render(m)}).then(function(){A.addImage(f.toDataURL("image/jpeg",1),n,e,i,a,c,l)})},Dt.API.putTotalPages=function(t){var n,e=0;parseInt(this.internal.getFont().id.substr(1),10)<15?(n=new RegExp(t,"g"),e=this.internal.getNumberOfPages()):(n=new RegExp(this.pdfEscape16(t,this.internal.getFont()),"g"),e=this.pdfEscape16(this.internal.getNumberOfPages()+"",this.internal.getFont()));for(var i=1;i<=this.internal.getNumberOfPages();i++)for(var a=0;a<this.internal.pages[i].length;a++)this.internal.pages[i][a]=this.internal.pages[i][a].replace(n,e);return this},Dt.API.viewerPreferences=function(t,n){var e;t=t||{},n=n||!1;var i,a,o,c={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}},l=Object.keys(c),f=[],d=0,m=0,A=0;function L(T,O){var j,k=!1;for(j=0;j<T.length;j+=1)T[j]===O&&(k=!0);return k}if(this.internal.viewerpreferences===void 0&&(this.internal.viewerpreferences={},this.internal.viewerpreferences.configuration=JSON.parse(JSON.stringify(c)),this.internal.viewerpreferences.isSubscribed=!1),e=this.internal.viewerpreferences.configuration,t==="reset"||n===!0){var p=l.length;for(A=0;A<p;A+=1)e[l[A]].value=e[l[A]].defaultValue,e[l[A]].explicitSet=!1}if(Pe(t)==="object"){for(a in t)if(o=t[a],L(l,a)&&o!==void 0){if(e[a].type==="boolean"&&typeof o=="boolean")e[a].value=o;else if(e[a].type==="name"&&L(e[a].valueSet,o))e[a].value=o;else if(e[a].type==="integer"&&Number.isInteger(o))e[a].value=o;else if(e[a].type==="array"){for(d=0;d<o.length;d+=1)if(i=!0,o[d].length===1&&typeof o[d][0]=="number")f.push(String(o[d]-1));else if(o[d].length>1){for(m=0;m<o[d].length;m+=1)typeof o[d][m]!="number"&&(i=!1);i===!0&&f.push([o[d][0]-1,o[d][1]-1].join(" "))}e[a].value="["+f.join(" ")+"]"}else e[a].value=e[a].defaultValue;e[a].explicitSet=!0}}return this.internal.viewerpreferences.isSubscribed===!1&&(this.internal.events.subscribe("putCatalog",function(){var T,O=[];for(T in e)e[T].explicitSet===!0&&(e[T].type==="name"?O.push("/"+T+" /"+e[T].value):O.push("/"+T+" "+e[T].value));O.length!==0&&this.internal.write(`/ViewerPreferences
|
||
<<
|
||
`+O.join(`
|
||
`)+`
|
||
>>`)}),this.internal.viewerpreferences.isSubscribed=!0),this.internal.viewerpreferences.configuration=e,this},Dt.API.addMetadata=function(t,n){return this.internal.__metadata__===void 0&&(this.internal.__metadata__={metadata:t,namespaceUri:n!=null?n:"http://jspdf.default.namespaceuri/",rawXml:typeof n=="boolean"&&n},this.internal.events.subscribe("putCatalog",L5),this.internal.events.subscribe("postPutResources",N5)),this},(function(t){var n=t.API,e=n.pdfEscape16=function(o,c){for(var l,f=c.metadata.Unicode.widths,d=["","0","00","000","0000"],m=[""],A=0,L=o.length;A<L;++A){if(l=c.metadata.characterToGlyph(o.charCodeAt(A)),c.metadata.glyIdsUsed.push(l),c.metadata.toUnicode[l]=o.charCodeAt(A),f.indexOf(l)==-1&&(f.push(l),f.push([parseInt(c.metadata.widthOfGlyph(l),10)])),l=="0")return m.join("");l=l.toString(16),m.push(d[4-l.length],l)}return m.join("")},i=function(o){var c,l,f,d,m,A,L;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`,f=[],A=0,L=(l=Object.keys(o).sort(function(p,T){return p-T})).length;A<L;A++)c=l[A],f.length>=100&&(m+=`
|
||
`+f.length+` beginbfchar
|
||
`+f.join(`
|
||
`)+`
|
||
endbfchar`,f=[]),o[c]!==void 0&&o[c]!==null&&typeof o[c].toString=="function"&&(d=("0000"+o[c].toString(16)).slice(-4),c=("0000"+(+c).toString(16)).slice(-4),f.push("<"+c+"><"+d+">"));return f.length&&(m+=`
|
||
`+f.length+` beginbfchar
|
||
`+f.join(`
|
||
`)+`
|
||
endbfchar
|
||
`),m+`endcmap
|
||
CMapName currentdict /CMap defineresource pop
|
||
end
|
||
end`};n.events.push(["putFont",function(o){(function(c){var l=c.font,f=c.out,d=c.newObject,m=c.putStream;if(l.metadata instanceof t.API.TTFFont&&l.encoding==="Identity-H"){for(var A=l.metadata.Unicode.widths,L=l.metadata.subset.encode(l.metadata.glyIdsUsed,1),p="",T=0;T<L.length;T++)p+=String.fromCharCode(L[T]);var O=d();m({data:p,addLength1:!0,objectId:O}),f("endobj");var j=d();m({data:i(l.metadata.toUnicode),addLength1:!0,objectId:j}),f("endobj");var k=d();f("<<"),f("/Type /FontDescriptor"),f("/FontName /"+ma(l.fontName)),f("/FontFile2 "+O+" 0 R"),f("/FontBBox "+t.API.PDFObject.convert(l.metadata.bbox)),f("/Flags "+l.metadata.flags),f("/StemV "+l.metadata.stemV),f("/ItalicAngle "+l.metadata.italicAngle),f("/Ascent "+l.metadata.ascender),f("/Descent "+l.metadata.decender),f("/CapHeight "+l.metadata.capHeight),f(">>"),f("endobj");var Z=d();f("<<"),f("/Type /Font"),f("/BaseFont /"+ma(l.fontName)),f("/FontDescriptor "+k+" 0 R"),f("/W "+t.API.PDFObject.convert(A)),f("/CIDToGIDMap /Identity"),f("/DW 1000"),f("/Subtype /CIDFontType2"),f("/CIDSystemInfo"),f("<<"),f("/Supplement 0"),f("/Registry (Adobe)"),f("/Ordering ("+l.encoding+")"),f(">>"),f(">>"),f("endobj"),l.objectNumber=d(),f("<<"),f("/Type /Font"),f("/Subtype /Type0"),f("/ToUnicode "+j+" 0 R"),f("/BaseFont /"+ma(l.fontName)),f("/Encoding /"+l.encoding),f("/DescendantFonts ["+Z+" 0 R]"),f(">>"),f("endobj"),l.isAlreadyPutted=!0}})(o)}]),n.events.push(["putFont",function(o){(function(c){var l=c.font,f=c.out,d=c.newObject,m=c.putStream;if(l.metadata instanceof t.API.TTFFont&&l.encoding==="WinAnsiEncoding"){for(var A=l.metadata.rawData,L="",p=0;p<A.length;p++)L+=String.fromCharCode(A[p]);var T=d();m({data:L,addLength1:!0,objectId:T}),f("endobj");var O=d();m({data:i(l.metadata.toUnicode),addLength1:!0,objectId:O}),f("endobj");var j=d();f("<<"),f("/Descent "+l.metadata.decender),f("/CapHeight "+l.metadata.capHeight),f("/StemV "+l.metadata.stemV),f("/Type /FontDescriptor"),f("/FontFile2 "+T+" 0 R"),f("/Flags 96"),f("/FontBBox "+t.API.PDFObject.convert(l.metadata.bbox)),f("/FontName /"+ma(l.fontName)),f("/ItalicAngle "+l.metadata.italicAngle),f("/Ascent "+l.metadata.ascender),f(">>"),f("endobj"),l.objectNumber=d();for(var k=0;k<l.metadata.hmtx.widths.length;k++)l.metadata.hmtx.widths[k]=parseInt(l.metadata.hmtx.widths[k]*(1e3/l.metadata.head.unitsPerEm));f("<</Subtype/TrueType/Type/Font/ToUnicode "+O+" 0 R/BaseFont/"+ma(l.fontName)+"/FontDescriptor "+j+" 0 R/Encoding/"+l.encoding+" /FirstChar 29 /LastChar 255 /Widths "+t.API.PDFObject.convert(l.metadata.hmtx.widths)+">>"),f("endobj"),l.isAlreadyPutted=!0}})(o)}]);var a=function(o){var c,l=o.text||"",f=o.x,d=o.y,m=o.options||{},A=o.mutex||{},L=A.pdfEscape,p=A.activeFontKey,T=A.fonts,O=p,j="",k=0,Z="",$=T[O].encoding;if(T[O].encoding!=="Identity-H")return{text:l,x:f,y:d,options:m,mutex:A};for(Z=l,O=p,Array.isArray(l)&&(Z=l[0]),k=0;k<Z.length;k+=1)T[O].metadata.hasOwnProperty("cmap")&&(c=T[O].metadata.cmap.unicode.codeMap[Z[k].charCodeAt(0)]),c||Z[k].charCodeAt(0)<256&&T[O].metadata.hasOwnProperty("Unicode")?j+=Z[k]:j+="";var M="";return parseInt(O.slice(1))<14||$==="WinAnsiEncoding"?M=L(j,O).split("").map(function(lt){return lt.charCodeAt(0).toString(16)}).join(""):$==="Identity-H"&&(M=e(j,T[O])),A.isHex=!0,{text:M,x:f,y:d,options:m,mutex:A}};n.events.push(["postProcessText",function(o){var c=o.text||"",l=[],f={text:c,x:o.x,y:o.y,options:o.options,mutex:o.mutex};if(Array.isArray(c)){var d=0;for(d=0;d<c.length;d+=1)Array.isArray(c[d])&&c[d].length===3?l.push([a(Object.assign({},f,{text:c[d][0]})).text,c[d][1],c[d][2]]):l.push(a(Object.assign({},f,{text:c[d]})).text);o.text=l}else o.text=a(Object.assign({},f,{text:c})).text}])})(Dt),(function(t){var n=function(){return this.internal.vFS===void 0&&(this.internal.vFS={}),!0};t.existsFileInVFS=function(e){return n.call(this),this.internal.vFS[e]!==void 0},t.addFileToVFS=function(e,i){return n.call(this),this.internal.vFS[e]=i,this},t.getFileFromVFS=function(e){return n.call(this),this.internal.vFS[e]!==void 0?this.internal.vFS[e]:null}})(Dt.API),(function(t){t.__bidiEngine__=t.prototype.__bidiEngine__=function(i){var a,o,c,l,f,d,m,A=n,L=[[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]],T={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},j=["(",")","(","<",">","<","[","]","[","{","}","{","«","»","«","‹","›","‹","⁅","⁆","⁅","⁽","⁾","⁽","₍","₎","₍","≤","≥","≤","〈","〉","〈","﹙","﹚","﹙","﹛","﹜","﹛","﹝","﹞","﹝","﹤","﹥","﹤"],k=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)$/),Z=!1,$=0;this.__bidiEngine__={};var M=function(N){var F=N.charCodeAt(),U=F>>8,q=O[U];return q!==void 0?A[256*q+(255&F)]:U===252||U===253?"AL":k.test(U)?"L":U===8?"R":"N"},lt=function(N){for(var F,U=0;U<N.length;U++){if((F=M(N.charAt(U)))==="L")return!1;if(F==="R")return!0}return!1},_t=function(N,F,U,q){var it,ft,pt,nt,ut=F[q];switch(ut){case"L":case"R":case"LRE":case"RLE":case"LRO":case"RLO":case"PDF":Z=!1;break;case"N":case"AN":break;case"EN":Z&&(ut="AN");break;case"AL":Z=!0,ut="R";break;case"WS":case"BN":ut="N";break;case"CS":q<1||q+1>=F.length||(it=U[q-1])!=="EN"&&it!=="AN"||(ft=F[q+1])!=="EN"&&ft!=="AN"?ut="N":Z&&(ft="AN"),ut=ft===it?ft:"N";break;case"ES":ut=(it=q>0?U[q-1]:"B")==="EN"&&q+1<F.length&&F[q+1]==="EN"?"EN":"N";break;case"ET":if(q>0&&U[q-1]==="EN"){ut="EN";break}if(Z){ut="N";break}for(pt=q+1,nt=F.length;pt<nt&&F[pt]==="ET";)pt++;ut=pt<nt&&F[pt]==="EN"?"EN":"N";break;case"NSM":if(c&&!l){for(nt=F.length,pt=q+1;pt<nt&&F[pt]==="NSM";)pt++;if(pt<nt){var At=N[q],yt=At>=1425&&At<=2303||At===64286;if(it=F[pt],yt&&(it==="R"||it==="AL")){ut="R";break}}}ut=q<1||(it=F[q-1])==="B"?"N":U[q-1];break;case"B":Z=!1,a=!0,ut=$;break;case"S":o=!0,ut="N"}return ut},mt=function(N,F,U){var q=N.split("");return U&&tt(q,U,{hiLevel:$}),q.reverse(),F&&F.reverse(),q.join("")},tt=function(N,F,U){var q,it,ft,pt,nt,ut=-1,At=N.length,yt=0,y=[],R=$?p:L,B=[];for(Z=!1,a=!1,o=!1,it=0;it<At;it++)B[it]=M(N[it]);for(ft=0;ft<At;ft++){if(nt=yt,y[ft]=_t(N,B,y,ft),q=240&(yt=R[nt][T[y[ft]]]),yt&=15,F[ft]=pt=R[yt][5],q>0)if(q===16){for(it=ut;it<ft;it++)F[it]=1;ut=-1}else ut=-1;if(R[yt][6])ut===-1&&(ut=ft);else if(ut>-1){for(it=ut;it<ft;it++)F[it]=pt;ut=-1}B[ft]==="B"&&(F[ft]=0),U.hiLevel|=pt}o&&(function(G,Y,Q){for(var rt=0;rt<Q;rt++)if(G[rt]==="S"){Y[rt]=$;for(var at=rt-1;at>=0&&G[at]==="WS";at--)Y[at]=$}})(B,F,At)},z=function(N,F,U,q,it){if(!(it.hiLevel<N)){if(N===1&&$===1&&!a)return F.reverse(),void(U&&U.reverse());for(var ft,pt,nt,ut,At=F.length,yt=0;yt<At;){if(q[yt]>=N){for(nt=yt+1;nt<At&&q[nt]>=N;)nt++;for(ut=yt,pt=nt-1;ut<pt;ut++,pt--)ft=F[ut],F[ut]=F[pt],F[pt]=ft,U&&(ft=U[ut],U[ut]=U[pt],U[pt]=ft);yt=nt}yt++}}},et=function(N,F,U){var q=N.split(""),it={hiLevel:$};return U||(U=[]),tt(q,U,it),(function(ft,pt,nt){if(nt.hiLevel!==0&&m)for(var ut,At=0;At<ft.length;At++)pt[At]===1&&(ut=j.indexOf(ft[At]))>=0&&(ft[At]=j[ut+1])})(q,U,it),z(2,q,F,U,it),z(1,q,F,U,it),q.join("")};return this.__bidiEngine__.doBidiReorder=function(N,F,U){if((function(it,ft){if(ft)for(var pt=0;pt<it.length;pt++)ft[pt]=pt;l===void 0&&(l=lt(it)),d===void 0&&(d=lt(it))})(N,F),c||!f||d)if(c&&f&&l^d)$=l?1:0,N=mt(N,F,U);else if(!c&&f&&d)$=l?1:0,N=et(N,F,U),N=mt(N,F);else if(!c||l||f||d){if(c&&!f&&l^d)N=mt(N,F),l?($=0,N=et(N,F,U)):($=1,N=et(N,F,U),N=mt(N,F));else if(c&&l&&!f&&d)$=1,N=et(N,F,U),N=mt(N,F);else if(!c&&!f&&l^d){var q=m;l?($=1,N=et(N,F,U),$=0,m=!1,N=et(N,F,U),m=q):($=0,N=et(N,F,U),N=mt(N,F),$=1,m=!1,N=et(N,F,U),m=q,N=mt(N,F))}}else $=0,N=et(N,F,U);else $=l?1:0,N=et(N,F,U);return N},this.__bidiEngine__.setOptions=function(N){N&&(c=N.isInputVisual,f=N.isOutputVisual,l=N.isInputRtl,d=N.isOutputRtl,m=N.isSymmetricSwapping)},this.__bidiEngine__.setOptions(i),this.__bidiEngine__};var n=["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"],e=new t.__bidiEngine__({isInputVisual:!0});t.API.events.push(["postProcessText",function(i){var a=i.text;i.x,i.y;var o=i.options||{};i.mutex,o.lang;var c=[];if(o.isInputVisual=typeof o.isInputVisual!="boolean"||o.isInputVisual,e.setOptions(o),Object.prototype.toString.call(a)==="[object Array]"){var l=0;for(c=[],l=0;l<a.length;l+=1)Object.prototype.toString.call(a[l])==="[object Array]"?c.push([e.doBidiReorder(a[l][0]),a[l][1],a[l][2]]):c.push([e.doBidiReorder(a[l])]);i.text=c}else i.text=e.doBidiReorder(a);e.setOptions({isInputVisual:!0})}])})(Dt),Dt.API.TTFFont=(function(){function t(n){var e;if(this.rawData=n,e=this.contents=new fr(n),this.contents.pos=4,e.readString(4)==="ttcf")throw new Error("TTCF not supported.");e.pos=0,this.parse(),this.subset=new U5(this),this.registerTTF()}return t.open=function(n){return new t(n)},t.prototype.parse=function(){return this.directory=new S5(this.contents),this.head=new P5(this),this.name=new O5(this),this.cmap=new tu(this),this.toUnicode={},this.hhea=new E5(this),this.maxp=new T5(this),this.hmtx=new R5(this),this.post=new C5(this),this.os2=new I5(this),this.loca=new M5(this),this.glyf=new j5(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]},t.prototype.registerTTF=function(){var n,e,i,a,o;if(this.scaleFactor=1e3/this.head.unitsPerEm,this.bbox=function(){var c,l,f,d;for(d=[],c=0,l=(f=this.bbox).length;c<l;c++)n=f[c],d.push(Math.round(n*this.scaleFactor));return d}.call(this),this.stemV=0,this.post.exists?(i=255&(a=this.post.italic_angle),32768&(e=a>>16)&&(e=-(1+(65535^e))),this.italicAngle=+(e+"."+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=(o=this.familyClass)===1||o===2||o===3||o===4||o===5||o===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")},t.prototype.characterToGlyph=function(n){var e;return((e=this.cmap.unicode)!=null?e.codeMap[n]:void 0)||0},t.prototype.widthOfGlyph=function(n){var e;return e=1e3/this.head.unitsPerEm,this.hmtx.forGlyph(n).advance*e},t.prototype.widthOfString=function(n,e,i){var a,o,c,l;for(c=0,o=0,l=(n=""+n).length;0<=l?o<l:o>l;o=0<=l?++o:--o)a=n.charCodeAt(o),c+=this.widthOfGlyph(this.characterToGlyph(a))+i*(1e3/e)||0;return c*(e/1e3)},t.prototype.lineHeight=function(n,e){var i;return e==null&&(e=!1),i=e?this.lineGap:0,(this.ascender+i-this.decender)/1e3*n},t})();var li,fr=(function(){function t(n){this.data=n!=null?n:[],this.pos=0,this.length=this.data.length}return t.prototype.readByte=function(){return this.data[this.pos++]},t.prototype.writeByte=function(n){return this.data[this.pos++]=n},t.prototype.readUInt32=function(){return 16777216*this.readByte()+(this.readByte()<<16)+(this.readByte()<<8)+this.readByte()},t.prototype.writeUInt32=function(n){return this.writeByte(n>>>24&255),this.writeByte(n>>16&255),this.writeByte(n>>8&255),this.writeByte(255&n)},t.prototype.readInt32=function(){var n;return(n=this.readUInt32())>=2147483648?n-4294967296:n},t.prototype.writeInt32=function(n){return n<0&&(n+=4294967296),this.writeUInt32(n)},t.prototype.readUInt16=function(){return this.readByte()<<8|this.readByte()},t.prototype.writeUInt16=function(n){return this.writeByte(n>>8&255),this.writeByte(255&n)},t.prototype.readInt16=function(){var n;return(n=this.readUInt16())>=32768?n-65536:n},t.prototype.writeInt16=function(n){return n<0&&(n+=65536),this.writeUInt16(n)},t.prototype.readString=function(n){var e,i;for(i=[],e=0;0<=n?e<n:e>n;e=0<=n?++e:--e)i[e]=String.fromCharCode(this.readByte());return i.join("")},t.prototype.writeString=function(n){var e,i,a;for(a=[],e=0,i=n.length;0<=i?e<i:e>i;e=0<=i?++e:--e)a.push(this.writeByte(n.charCodeAt(e)));return a},t.prototype.readShort=function(){return this.readInt16()},t.prototype.writeShort=function(n){return this.writeInt16(n)},t.prototype.readLongLong=function(){var n,e,i,a,o,c,l,f;return n=this.readByte(),e=this.readByte(),i=this.readByte(),a=this.readByte(),o=this.readByte(),c=this.readByte(),l=this.readByte(),f=this.readByte(),128&n?-1*(72057594037927940*(255^n)+281474976710656*(255^e)+1099511627776*(255^i)+4294967296*(255^a)+16777216*(255^o)+65536*(255^c)+256*(255^l)+(255^f)+1):72057594037927940*n+281474976710656*e+1099511627776*i+4294967296*a+16777216*o+65536*c+256*l+f},t.prototype.writeLongLong=function(n){var e,i;return e=Math.floor(n/4294967296),i=4294967295&n,this.writeByte(e>>24&255),this.writeByte(e>>16&255),this.writeByte(e>>8&255),this.writeByte(255&e),this.writeByte(i>>24&255),this.writeByte(i>>16&255),this.writeByte(i>>8&255),this.writeByte(255&i)},t.prototype.readInt=function(){return this.readInt32()},t.prototype.writeInt=function(n){return this.writeInt32(n)},t.prototype.read=function(n){var e,i;for(e=[],i=0;0<=n?i<n:i>n;i=0<=n?++i:--i)e.push(this.readByte());return e},t.prototype.write=function(n){var e,i,a,o;for(o=[],i=0,a=n.length;i<a;i++)e=n[i],o.push(this.writeByte(e));return o},t})(),S5=(function(){var t;function n(e){var i,a,o;for(this.scalarType=e.readInt(),this.tableCount=e.readShort(),this.searchRange=e.readShort(),this.entrySelector=e.readShort(),this.rangeShift=e.readShort(),this.tables={},a=0,o=this.tableCount;0<=o?a<o:a>o;a=0<=o?++a:--a)i={tag:e.readString(4),checksum:e.readInt(),offset:e.readInt(),length:e.readInt()},this.tables[i.tag]=i}return n.prototype.encode=function(e){var i,a,o,c,l,f,d,m,A,L,p,T,O;for(O in p=Object.keys(e).length,f=Math.log(2),A=16*Math.floor(Math.log(p)/f),c=Math.floor(A/f),m=16*p-A,(a=new fr).writeInt(this.scalarType),a.writeShort(p),a.writeShort(A),a.writeShort(c),a.writeShort(m),o=16*p,d=a.pos+o,l=null,T=[],e)for(L=e[O],a.writeString(O),a.writeInt(t(L)),a.writeInt(d),a.writeInt(L.length),T=T.concat(L),O==="head"&&(l=d),d+=L.length;d%4;)T.push(0),d++;return a.write(T),i=2981146554-t(a.data),a.pos=l+8,a.writeUInt32(i),a.data},t=function(e){var i,a,o,c;for(e=eu.call(e);e.length%4;)e.push(0);for(o=new fr(e),a=0,i=0,c=e.length;i<c;i=i+=4)a+=o.readUInt32();return 4294967295&a},n})(),k5={}.hasOwnProperty,Li=function(t,n){for(var e in n)k5.call(n,e)&&(t[e]=n[e]);function i(){this.constructor=t}return i.prototype=n.prototype,t.prototype=new i,t.__super__=n.prototype,t};li=(function(){function t(n){var e;this.file=n,e=this.file.directory.tables[this.tag],this.exists=!!e,e&&(this.offset=e.offset,this.length=e.length,this.parse(this.file.contents))}return t.prototype.parse=function(){},t.prototype.encode=function(){},t.prototype.raw=function(){return this.exists?(this.file.contents.pos=this.offset,this.file.contents.read(this.length)):null},t})();var P5=(function(){function t(){return t.__super__.constructor.apply(this,arguments)}return Li(t,li),t.prototype.tag="head",t.prototype.parse=function(n){return n.pos=this.offset,this.version=n.readInt(),this.revision=n.readInt(),this.checkSumAdjustment=n.readInt(),this.magicNumber=n.readInt(),this.flags=n.readShort(),this.unitsPerEm=n.readShort(),this.created=n.readLongLong(),this.modified=n.readLongLong(),this.xMin=n.readShort(),this.yMin=n.readShort(),this.xMax=n.readShort(),this.yMax=n.readShort(),this.macStyle=n.readShort(),this.lowestRecPPEM=n.readShort(),this.fontDirectionHint=n.readShort(),this.indexToLocFormat=n.readShort(),this.glyphDataFormat=n.readShort()},t.prototype.encode=function(n){var e;return(e=new fr).writeInt(this.version),e.writeInt(this.revision),e.writeInt(this.checkSumAdjustment),e.writeInt(this.magicNumber),e.writeShort(this.flags),e.writeShort(this.unitsPerEm),e.writeLongLong(this.created),e.writeLongLong(this.modified),e.writeShort(this.xMin),e.writeShort(this.yMin),e.writeShort(this.xMax),e.writeShort(this.yMax),e.writeShort(this.macStyle),e.writeShort(this.lowestRecPPEM),e.writeShort(this.fontDirectionHint),e.writeShort(n),e.writeShort(this.glyphDataFormat),e.data},t})(),Jc=(function(){function t(n,e){var i,a,o,c,l,f,d,m,A,L,p,T,O,j,k,Z,$;switch(this.platformID=n.readUInt16(),this.encodingID=n.readShort(),this.offset=e+n.readInt(),A=n.pos,n.pos=this.offset,this.format=n.readUInt16(),this.length=n.readUInt16(),this.language=n.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(f=0;f<256;++f)this.codeMap[f]=n.readByte();break;case 4:for(p=n.readUInt16(),L=p/2,n.pos+=6,o=(function(){var M,lt;for(lt=[],f=M=0;0<=L?M<L:M>L;f=0<=L?++M:--M)lt.push(n.readUInt16());return lt})(),n.pos+=2,O=(function(){var M,lt;for(lt=[],f=M=0;0<=L?M<L:M>L;f=0<=L?++M:--M)lt.push(n.readUInt16());return lt})(),d=(function(){var M,lt;for(lt=[],f=M=0;0<=L?M<L:M>L;f=0<=L?++M:--M)lt.push(n.readUInt16());return lt})(),m=(function(){var M,lt;for(lt=[],f=M=0;0<=L?M<L:M>L;f=0<=L?++M:--M)lt.push(n.readUInt16());return lt})(),a=(this.length-n.pos+this.offset)/2,l=(function(){var M,lt;for(lt=[],f=M=0;0<=a?M<a:M>a;f=0<=a?++M:--M)lt.push(n.readUInt16());return lt})(),f=k=0,$=o.length;k<$;f=++k)for(j=o[f],i=Z=T=O[f];T<=j?Z<=j:Z>=j;i=T<=j?++Z:--Z)m[f]===0?c=i+d[f]:(c=l[m[f]/2+(i-T)-(L-f)]||0)!==0&&(c+=d[f]),this.codeMap[i]=65535&c}n.pos=A}return t.encode=function(n,e){var i,a,o,c,l,f,d,m,A,L,p,T,O,j,k,Z,$,M,lt,_t,mt,tt,z,et,N,F,U,q,it,ft,pt,nt,ut,At,yt,y,R,B,G,Y,Q,rt,at,dt,xt,St;switch(q=new fr,c=Object.keys(n).sort(function(kt,zt){return kt-zt}),e){case"macroman":for(O=0,j=(function(){var kt=[];for(T=0;T<256;++T)kt.push(0);return kt})(),Z={0:0},o={},it=0,ut=c.length;it<ut;it++)Z[at=n[a=c[it]]]==null&&(Z[at]=++O),o[a]={old:n[a],new:Z[n[a]]},j[a]=Z[n[a]];return q.writeUInt16(1),q.writeUInt16(0),q.writeUInt32(12),q.writeUInt16(0),q.writeUInt16(262),q.writeUInt16(0),q.write(j),{charMap:o,subtable:q.data,maxGlyphID:O+1};case"unicode":for(F=[],A=[],$=0,Z={},i={},k=d=null,ft=0,At=c.length;ft<At;ft++)Z[lt=n[a=c[ft]]]==null&&(Z[lt]=++$),i[a]={old:lt,new:Z[lt]},l=Z[lt]-a,k!=null&&l===d||(k&&A.push(k),F.push(a),d=l),k=a;for(k&&A.push(k),A.push(65535),F.push(65535),et=2*(z=F.length),tt=2*Math.pow(Math.log(z)/Math.LN2,2),L=Math.log(tt/2)/Math.LN2,mt=2*z-tt,f=[],_t=[],p=[],T=pt=0,yt=F.length;pt<yt;T=++pt){if(N=F[T],m=A[T],N===65535){f.push(0),_t.push(0);break}if(N-(U=i[N].new)>=32768)for(f.push(0),_t.push(2*(p.length+z-T)),a=nt=N;N<=m?nt<=m:nt>=m;a=N<=m?++nt:--nt)p.push(i[a].new);else f.push(U-N),_t.push(0)}for(q.writeUInt16(3),q.writeUInt16(1),q.writeUInt32(12),q.writeUInt16(4),q.writeUInt16(16+8*z+2*p.length),q.writeUInt16(0),q.writeUInt16(et),q.writeUInt16(tt),q.writeUInt16(L),q.writeUInt16(mt),Q=0,y=A.length;Q<y;Q++)a=A[Q],q.writeUInt16(a);for(q.writeUInt16(0),rt=0,R=F.length;rt<R;rt++)a=F[rt],q.writeUInt16(a);for(dt=0,B=f.length;dt<B;dt++)l=f[dt],q.writeUInt16(l);for(xt=0,G=_t.length;xt<G;xt++)M=_t[xt],q.writeUInt16(M);for(St=0,Y=p.length;St<Y;St++)O=p[St],q.writeUInt16(O);return{charMap:i,subtable:q.data,maxGlyphID:$+1}}},t})(),tu=(function(){function t(){return t.__super__.constructor.apply(this,arguments)}return Li(t,li),t.prototype.tag="cmap",t.prototype.parse=function(n){var e,i,a;for(n.pos=this.offset,this.version=n.readUInt16(),a=n.readUInt16(),this.tables=[],this.unicode=null,i=0;0<=a?i<a:i>a;i=0<=a?++i:--i)e=new Jc(n,this.offset),this.tables.push(e),e.isUnicode&&this.unicode==null&&(this.unicode=e);return!0},t.encode=function(n,e){var i,a;return e==null&&(e="macroman"),i=Jc.encode(n,e),(a=new fr).writeUInt16(0),a.writeUInt16(1),i.table=a.data.concat(i.subtable),i},t})(),E5=(function(){function t(){return t.__super__.constructor.apply(this,arguments)}return Li(t,li),t.prototype.tag="hhea",t.prototype.parse=function(n){return n.pos=this.offset,this.version=n.readInt(),this.ascender=n.readShort(),this.decender=n.readShort(),this.lineGap=n.readShort(),this.advanceWidthMax=n.readShort(),this.minLeftSideBearing=n.readShort(),this.minRightSideBearing=n.readShort(),this.xMaxExtent=n.readShort(),this.caretSlopeRise=n.readShort(),this.caretSlopeRun=n.readShort(),this.caretOffset=n.readShort(),n.pos+=8,this.metricDataFormat=n.readShort(),this.numberOfMetrics=n.readUInt16()},t})(),I5=(function(){function t(){return t.__super__.constructor.apply(this,arguments)}return Li(t,li),t.prototype.tag="OS/2",t.prototype.parse=function(n){if(n.pos=this.offset,this.version=n.readUInt16(),this.averageCharWidth=n.readShort(),this.weightClass=n.readUInt16(),this.widthClass=n.readUInt16(),this.type=n.readShort(),this.ySubscriptXSize=n.readShort(),this.ySubscriptYSize=n.readShort(),this.ySubscriptXOffset=n.readShort(),this.ySubscriptYOffset=n.readShort(),this.ySuperscriptXSize=n.readShort(),this.ySuperscriptYSize=n.readShort(),this.ySuperscriptXOffset=n.readShort(),this.ySuperscriptYOffset=n.readShort(),this.yStrikeoutSize=n.readShort(),this.yStrikeoutPosition=n.readShort(),this.familyClass=n.readShort(),this.panose=(function(){var e,i;for(i=[],e=0;e<10;++e)i.push(n.readByte());return i})(),this.charRange=(function(){var e,i;for(i=[],e=0;e<4;++e)i.push(n.readInt());return i})(),this.vendorID=n.readString(4),this.selection=n.readShort(),this.firstCharIndex=n.readShort(),this.lastCharIndex=n.readShort(),this.version>0&&(this.ascent=n.readShort(),this.descent=n.readShort(),this.lineGap=n.readShort(),this.winAscent=n.readShort(),this.winDescent=n.readShort(),this.codePageRange=(function(){var e,i;for(i=[],e=0;e<2;e=++e)i.push(n.readInt());return i})(),this.version>1))return this.xHeight=n.readShort(),this.capHeight=n.readShort(),this.defaultChar=n.readShort(),this.breakChar=n.readShort(),this.maxContext=n.readShort()},t})(),C5=(function(){function t(){return t.__super__.constructor.apply(this,arguments)}return Li(t,li),t.prototype.tag="post",t.prototype.parse=function(n){var e,i,a;switch(n.pos=this.offset,this.format=n.readInt(),this.italicAngle=n.readInt(),this.underlinePosition=n.readShort(),this.underlineThickness=n.readShort(),this.isFixedPitch=n.readInt(),this.minMemType42=n.readInt(),this.maxMemType42=n.readInt(),this.minMemType1=n.readInt(),this.maxMemType1=n.readInt(),this.format){case 65536:case 196608:break;case 131072:var o;for(i=n.readUInt16(),this.glyphNameIndex=[],o=0;0<=i?o<i:o>i;o=0<=i?++o:--o)this.glyphNameIndex.push(n.readUInt16());for(this.names=[],a=[];n.pos<this.offset+this.length;)e=n.readByte(),a.push(this.names.push(n.readString(e)));return a;case 151552:return i=n.readUInt16(),this.offsets=n.read(i);case 262144:return this.map=function(){var c,l,f;for(f=[],o=c=0,l=this.file.maxp.numGlyphs;0<=l?c<l:c>l;o=0<=l?++c:--c)f.push(n.readUInt32());return f}.call(this)}},t})(),F5=function(t,n){this.raw=t,this.length=t.length,this.platformID=n.platformID,this.encodingID=n.encodingID,this.languageID=n.languageID},O5=(function(){function t(){return t.__super__.constructor.apply(this,arguments)}return Li(t,li),t.prototype.tag="name",t.prototype.parse=function(n){var e,i,a,o,c,l,f,d,m,A,L;for(n.pos=this.offset,n.readShort(),e=n.readShort(),l=n.readShort(),i=[],o=0;0<=e?o<e:o>e;o=0<=e?++o:--o)i.push({platformID:n.readShort(),encodingID:n.readShort(),languageID:n.readShort(),nameID:n.readShort(),length:n.readShort(),offset:this.offset+l+n.readShort()});for(f={},o=m=0,A=i.length;m<A;o=++m)a=i[o],n.pos=a.offset,d=n.readString(a.length),c=new F5(d,a),f[L=a.nameID]==null&&(f[L]=[]),f[a.nameID].push(c);this.strings=f,this.copyright=f[0],this.fontFamily=f[1],this.fontSubfamily=f[2],this.uniqueSubfamily=f[3],this.fontName=f[4],this.version=f[5];try{this.postscriptName=f[6][0].raw.replace(/[\x00-\x19\x80-\xff]/g,"")}catch(p){this.postscriptName=f[4][0].raw.replace(/[\x00-\x19\x80-\xff]/g,"")}return this.trademark=f[7],this.manufacturer=f[8],this.designer=f[9],this.description=f[10],this.vendorUrl=f[11],this.designerUrl=f[12],this.license=f[13],this.licenseUrl=f[14],this.preferredFamily=f[15],this.preferredSubfamily=f[17],this.compatibleFull=f[18],this.sampleText=f[19]},t})(),T5=(function(){function t(){return t.__super__.constructor.apply(this,arguments)}return Li(t,li),t.prototype.tag="maxp",t.prototype.parse=function(n){return n.pos=this.offset,this.version=n.readInt(),this.numGlyphs=n.readUInt16(),this.maxPoints=n.readUInt16(),this.maxContours=n.readUInt16(),this.maxCompositePoints=n.readUInt16(),this.maxComponentContours=n.readUInt16(),this.maxZones=n.readUInt16(),this.maxTwilightPoints=n.readUInt16(),this.maxStorage=n.readUInt16(),this.maxFunctionDefs=n.readUInt16(),this.maxInstructionDefs=n.readUInt16(),this.maxStackElements=n.readUInt16(),this.maxSizeOfInstructions=n.readUInt16(),this.maxComponentElements=n.readUInt16(),this.maxComponentDepth=n.readUInt16()},t})(),R5=(function(){function t(){return t.__super__.constructor.apply(this,arguments)}return Li(t,li),t.prototype.tag="hmtx",t.prototype.parse=function(n){var e,i,a,o,c,l,f;for(n.pos=this.offset,this.metrics=[],e=0,l=this.file.hhea.numberOfMetrics;0<=l?e<l:e>l;e=0<=l?++e:--e)this.metrics.push({advance:n.readUInt16(),lsb:n.readInt16()});for(a=this.file.maxp.numGlyphs-this.file.hhea.numberOfMetrics,this.leftSideBearings=(function(){var d,m;for(m=[],e=d=0;0<=a?d<a:d>a;e=0<=a?++d:--d)m.push(n.readInt16());return m})(),this.widths=function(){var d,m,A,L;for(L=[],d=0,m=(A=this.metrics).length;d<m;d++)o=A[d],L.push(o.advance);return L}.call(this),i=this.widths[this.widths.length-1],f=[],e=c=0;0<=a?c<a:c>a;e=0<=a?++c:--c)f.push(this.widths.push(i));return f},t.prototype.forGlyph=function(n){return n in this.metrics?this.metrics[n]:{advance:this.metrics[this.metrics.length-1].advance,lsb:this.leftSideBearings[n-this.metrics.length]}},t})(),eu=[].slice,j5=(function(){function t(){return t.__super__.constructor.apply(this,arguments)}return Li(t,li),t.prototype.tag="glyf",t.prototype.parse=function(){return this.cache={}},t.prototype.glyphFor=function(n){var e,i,a,o,c,l,f,d,m,A;return n in this.cache?this.cache[n]:(o=this.file.loca,e=this.file.contents,i=o.indexOf(n),(a=o.lengthOf(n))===0?this.cache[n]=null:(e.pos=this.offset+i,c=(l=new fr(e.read(a))).readShort(),d=l.readShort(),A=l.readShort(),f=l.readShort(),m=l.readShort(),this.cache[n]=c===-1?new D5(l,d,A,f,m):new B5(l,c,d,A,f,m),this.cache[n]))},t.prototype.encode=function(n,e,i){var a,o,c,l,f;for(c=[],o=[],l=0,f=e.length;l<f;l++)a=n[e[l]],o.push(c.length),a&&(c=c.concat(a.encode(i)));return o.push(c.length),{table:c,offsets:o}},t})(),B5=(function(){function t(n,e,i,a,o,c){this.raw=n,this.numberOfContours=e,this.xMin=i,this.yMin=a,this.xMax=o,this.yMax=c,this.compound=!1}return t.prototype.encode=function(){return this.raw.data},t})(),D5=(function(){function t(n,e,i,a,o){var c,l;for(this.raw=n,this.xMin=e,this.yMin=i,this.xMax=a,this.yMax=o,this.compound=!0,this.glyphIDs=[],this.glyphOffsets=[],c=this.raw;l=c.readShort(),this.glyphOffsets.push(c.pos),this.glyphIDs.push(c.readUInt16()),32&l;)c.pos+=1&l?4:2,128&l?c.pos+=8:64&l?c.pos+=4:8&l&&(c.pos+=2)}return t.prototype.encode=function(){var n,e,i;for(e=new fr(eu.call(this.raw.data)),n=0,i=this.glyphIDs.length;n<i;++n)e.pos=this.glyphOffsets[n];return e.data},t})(),M5=(function(){function t(){return t.__super__.constructor.apply(this,arguments)}return Li(t,li),t.prototype.tag="loca",t.prototype.parse=function(n){var e,i;return n.pos=this.offset,e=this.file.head.indexToLocFormat,this.offsets=e===0?function(){var a,o;for(o=[],i=0,a=this.length;i<a;i+=2)o.push(2*n.readUInt16());return o}.call(this):function(){var a,o;for(o=[],i=0,a=this.length;i<a;i+=4)o.push(n.readUInt32());return o}.call(this)},t.prototype.indexOf=function(n){return this.offsets[n]},t.prototype.lengthOf=function(n){return this.offsets[n+1]-this.offsets[n]},t.prototype.encode=function(n,e){for(var i=new Uint32Array(this.offsets.length),a=0,o=0,c=0;c<i.length;++c)if(i[c]=a,o<e.length&&e[o]==c){++o,i[c]=a;var l=this.offsets[c],f=this.offsets[c+1]-l;f>0&&(a+=f)}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},t})(),U5=(function(){function t(n){this.font=n,this.subset={},this.unicodes={},this.next=33}return t.prototype.generateCmap=function(){var n,e,i,a,o;for(e in a=this.font.cmap.tables[0].codeMap,n={},o=this.subset)i=o[e],n[e]=a[i];return n},t.prototype.glyphsFor=function(n){var e,i,a,o,c,l,f;for(a={},c=0,l=n.length;c<l;c++)a[o=n[c]]=this.font.glyf.glyphFor(o);for(o in e=[],a)(i=a[o])!=null&&i.compound&&e.push.apply(e,i.glyphIDs);if(e.length>0)for(o in f=this.glyphsFor(e))i=f[o],a[o]=i;return a},t.prototype.encode=function(n,e){var i,a,o,c,l,f,d,m,A,L,p,T,O,j,k;for(a in i=tu.encode(this.generateCmap(),"unicode"),c=this.glyphsFor(n),p={0:0},k=i.charMap)p[(f=k[a]).old]=f.new;for(T in L=i.maxGlyphID,c)T in p||(p[T]=L++);return m=(function(Z){var $,M;for($ in M={},Z)M[Z[$]]=$;return M})(p),A=Object.keys(m).sort(function(Z,$){return Z-$}),O=(function(){var Z,$,M;for(M=[],Z=0,$=A.length;Z<$;Z++)l=A[Z],M.push(m[l]);return M})(),o=this.font.glyf.encode(c,O,p),d=this.font.loca.encode(o.offsets,O),j={cmap:this.font.cmap.raw(),glyf:o.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(e)},this.font.os2.exists&&(j["OS/2"]=this.font.os2.raw()),this.font.directory.encode(j)},t})();Dt.API.PDFObject=(function(){var t;function n(){}return t=function(e,i){return(Array(i+1).join("0")+e).slice(-i)},n.convert=function(e){var i,a,o,c;if(Array.isArray(e))return"["+(function(){var l,f,d;for(d=[],l=0,f=e.length;l<f;l++)i=e[l],d.push(n.convert(i));return d})().join(" ")+"]";if(typeof e=="string")return"/"+e;if(e!=null&&e.isString)return"("+e+")";if(e instanceof Date)return"(D:"+t(e.getUTCFullYear(),4)+t(e.getUTCMonth(),2)+t(e.getUTCDate(),2)+t(e.getUTCHours(),2)+t(e.getUTCMinutes(),2)+t(e.getUTCSeconds(),2)+"Z)";if({}.toString.call(e)==="[object Object]"){for(a in o=["<<"],e)c=e[a],o.push("/"+a+" "+n.convert(c));return o.push(">>"),o.join(`
|
||
`)}return""+e},n})();export{td as AcroForm,It as AcroFormAppearance,sn as AcroFormButton,fs as AcroFormCheckBox,wa as AcroFormChoiceField,ya as AcroFormComboBox,hs as AcroFormEditBox,_a as AcroFormListBox,us as AcroFormPasswordField,cs as AcroFormPushButton,xa as AcroFormRadioButton,jr as AcroFormTextField,ms as GState,Fr as ShadingPattern,ba as TilingPattern,Dt as default,Dt as jsPDF};
|