const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["js/index.es-BzL5PZg7.js","js/stackblur-es-DK4L4ctA.js","js/emoji-mart-vue-fast-R0uJEDq-.js","js/index-X7Y8jykP.js","js/vue-vendor-DNhG1Cve.js","assets/index-GuhSw_Yp.css"])))=>i.map(i=>d[i]); var Jh=Object.defineProperty;var $h=(n,e,t)=>e in n?Jh(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var xe=(n,e,t)=>$h(n,typeof e!="symbol"?e+"":e,t);import{it as Se,_ as so}from"./index-X7Y8jykP.js";import{z as Po}from"./browser-CC9DCAWJ.js";import"./emoji-mart-vue-fast-R0uJEDq-.js";import"./vue-vendor-DNhG1Cve.js";function Kh(n){if(Array.isArray(n))return n}function Xh(n,e){var t=n==null?null:typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(t!=null){var i,o,s,f,u=[],c=!0,d=!1;try{if(s=(t=t.call(n)).next,e!==0)for(;!(c=(i=s.call(t)).done)&&(u.push(i.value),u.length!==e);c=!0);}catch(m){d=!0,o=m}finally{try{if(!c&&t.return!=null&&(f=t.return(),Object(f)!==f))return}finally{if(d)throw o}}return u}}function wl(n,e){(e==null||e>n.length)&&(e=n.length);for(var t=0,i=Array(e);t{const n=new Uint8Array(4),e=new Uint32Array(n.buffer);return!((e[0]=1)&n[0])})(),oo={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 Mo{constructor(e=nc,t={}){xe(this,"buffer");xe(this,"byteLength");xe(this,"byteOffset");xe(this,"length");xe(this,"offset");xe(this,"lastWrittenByte");xe(this,"littleEndian");xe(this,"_data");xe(this,"_mark");xe(this,"_marks");let i=!1;typeof e=="number"?e=new ArrayBuffer(e):(i=!0,this.lastWrittenByte=e.byteLength);const o=t.offset?t.offset>>>0:0,s=e.byteLength-o;let f=o;(ArrayBuffer.isView(e)||e instanceof Mo)&&(e.byteLength!==e.buffer.byteLength&&(f=e.byteOffset+o),e=e.buffer),i?this.lastWrittenByte=s:this.lastWrittenByte=0,this.buffer=e,this.length=s,this.byteLength=s,this.byteOffset=f,this.offset=0,this.littleEndian=!0,this._data=new DataView(this.buffer,f,s),this._mark=0,this._marks=[]}available(e=1){return this.offset+e<=this.length}isLittleEndian(){return this.littleEndian}setLittleEndian(){return this.littleEndian=!0,this}isBigEndian(){return!this.littleEndian}setBigEndian(){return this.littleEndian=!1,this}skip(e=1){return this.offset+=e,this}back(e=1){return this.offset-=e,this}seek(e){return this.offset=e,this}mark(){return this._mark=this.offset,this}reset(){return this.offset=this._mark,this}pushMark(){return this._marks.push(this.offset),this}popMark(){const e=this._marks.pop();if(e===void 0)throw new Error("Mark stack empty");return this.seek(e),this}rewind(){return this.offset=0,this}ensureAvailable(e=1){if(!this.available(e)){const i=(this.offset+e)*2,o=new Uint8Array(i);o.set(new Uint8Array(this.buffer)),this.buffer=o.buffer,this.length=i,this.byteLength=i,this._data=new DataView(this.buffer)}return this}readBoolean(){return this.readUint8()!==0}readInt8(){return this._data.getInt8(this.offset++)}readUint8(){return this._data.getUint8(this.offset++)}readByte(){return this.readUint8()}readBytes(e=1){return this.readArray(e,"uint8")}readArray(e,t){const i=oo[t].BYTES_PER_ELEMENT*e,o=this.byteOffset+this.offset,s=this.buffer.slice(o,o+i);if(this.littleEndian===rc&&t!=="uint8"&&t!=="int8"){const u=new Uint8Array(this.buffer.slice(o,o+i));u.reverse();const c=new oo[t](u.buffer);return this.offset+=i,c.reverse(),c}const f=new oo[t](s);return this.offset+=i,f}readInt16(){const e=this._data.getInt16(this.offset,this.littleEndian);return this.offset+=2,e}readUint16(){const e=this._data.getUint16(this.offset,this.littleEndian);return this.offset+=2,e}readInt32(){const e=this._data.getInt32(this.offset,this.littleEndian);return this.offset+=4,e}readUint32(){const e=this._data.getUint32(this.offset,this.littleEndian);return this.offset+=4,e}readFloat32(){const e=this._data.getFloat32(this.offset,this.littleEndian);return this.offset+=4,e}readFloat64(){const e=this._data.getFloat64(this.offset,this.littleEndian);return this.offset+=8,e}readBigInt64(){const e=this._data.getBigInt64(this.offset,this.littleEndian);return this.offset+=8,e}readBigUint64(){const e=this._data.getBigUint64(this.offset,this.littleEndian);return this.offset+=8,e}readChar(){return String.fromCharCode(this.readInt8())}readChars(e=1){let t="";for(let i=0;ithis.lastWrittenByte&&(this.lastWrittenByte=this.offset)}}function Zi(n){let e=n.length;for(;--e>=0;)n[e]=0}const ic=3,ac=258,ku=29,sc=256,oc=sc+1+ku,Pu=30,lc=512,uc=new Array((oc+2)*2);Zi(uc);const hc=new Array(Pu*2);Zi(hc);const cc=new Array(lc);Zi(cc);const fc=new Array(ac-ic+1);Zi(fc);const dc=new Array(ku);Zi(dc);const pc=new Array(Pu);Zi(pc);const gc=(n,e,t,i)=>{let o=n&65535|0,s=n>>>16&65535|0,f=0;for(;t!==0;){f=t>2e3?2e3:t,t-=f;do o=o+e[i++]|0,s=s+o|0;while(--f);o%=65521,s%=65521}return o|s<<16|0};var Io=gc;const mc=()=>{let n,e=[];for(var t=0;t<256;t++){n=t;for(var i=0;i<8;i++)n=n&1?3988292384^n>>>1:n>>>1;e[t]=n}return e},vc=new Uint32Array(mc()),bc=(n,e,t,i)=>{const o=vc,s=i+t;n^=-1;for(let f=i;f>>8^o[(n^e[f])&255];return n^-1};var hr=bc,Co={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"},Iu={Z_NO_FLUSH:0,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_DEFLATED:8};const wc=(n,e)=>Object.prototype.hasOwnProperty.call(n,e);var yc=function(n){const e=Array.prototype.slice.call(arguments,1);for(;e.length;){const t=e.shift();if(t){if(typeof t!="object")throw new TypeError(t+"must be non-object");for(const i in t)wc(t,i)&&(n[i]=t[i])}}return n},xc=n=>{let e=0;for(let i=0,o=n.length;i=252?6:n>=248?5:n>=240?4:n>=224?3:n>=192?2:1;Aa[254]=Aa[254]=1;var _c=n=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(n);let e,t,i,o,s,f=n.length,u=0;for(o=0;o>>6,e[s++]=128|t&63):t<65536?(e[s++]=224|t>>>12,e[s++]=128|t>>>6&63,e[s++]=128|t&63):(e[s++]=240|t>>>18,e[s++]=128|t>>>12&63,e[s++]=128|t>>>6&63,e[s++]=128|t&63);return e};const Ac=(n,e)=>{if(e<65534&&n.subarray&&Fu)return String.fromCharCode.apply(null,n.length===e?n:n.subarray(0,e));let t="";for(let i=0;i{const t=e||n.length;if(typeof TextDecoder=="function"&&TextDecoder.prototype.decode)return new TextDecoder().decode(n.subarray(0,e));let i,o;const s=new Array(t*2);for(o=0,i=0;i4){s[o++]=65533,i+=u-1;continue}for(f&=u===2?31:u===3?15:7;u>1&&i1){s[o++]=65533;continue}f<65536?s[o++]=f:(f-=65536,s[o++]=55296|f>>10&1023,s[o++]=56320|f&1023)}return Ac(s,o)},Lc=(n,e)=>{e=e||n.length,e>n.length&&(e=n.length);let t=e-1;for(;t>=0&&(n[t]&192)===128;)t--;return t<0||t===0?e:t+Aa[n[t]]>e?t:e},Fo={string2buf:_c,buf2string:Nc,utf8border:Lc};function Sc(){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 kc=Sc;const ss=16209,Pc=16191;var Ic=function(e,t){let i,o,s,f,u,c,d,m,A,P,p,B,O,M,S,Y,J,D,lt,yt,mt,tt,z,et;const N=e.state;i=e.next_in,z=e.input,o=i+(e.avail_in-5),s=e.next_out,et=e.output,f=s-(t-e.avail_out),u=s+(e.avail_out-257),c=N.dmax,d=N.wsize,m=N.whave,A=N.wnext,P=N.window,p=N.hold,B=N.bits,O=N.lencode,M=N.distcode,S=(1<>>24,p>>>=D,B-=D,D=J>>>16&255,D===0)et[s++]=J&65535;else if(D&16){lt=J&65535,D&=15,D&&(B>>=D,B-=D),B<15&&(p+=z[i++]<>>24,p>>>=D,B-=D,D=J>>>16&255,D&16){if(yt=J&65535,D&=15,Bc){e.msg="invalid distance too far back",N.mode=ss;break t}if(p>>>=D,B-=D,D=s-f,yt>D){if(D=yt-D,D>m&&N.sane){e.msg="invalid distance too far back",N.mode=ss;break t}if(mt=0,tt=P,A===0){if(mt+=d-D,D2;)et[s++]=tt[mt++],et[s++]=tt[mt++],et[s++]=tt[mt++],lt-=3;lt&&(et[s++]=tt[mt++],lt>1&&(et[s++]=tt[mt++]))}else{mt=s-yt;do et[s++]=et[mt++],et[s++]=et[mt++],et[s++]=et[mt++],lt-=3;while(lt>2);lt&&(et[s++]=et[mt++],lt>1&&(et[s++]=et[mt++]))}}else if((D&64)===0){J=M[(J&65535)+(p&(1<>3,i-=lt,B-=lt<<3,p&=(1<{const c=u.bits;let d=0,m=0,A=0,P=0,p=0,B=0,O=0,M=0,S=0,Y=0,J,D,lt,yt,mt,tt=null,z;const et=new Uint16Array(zi+1),N=new Uint16Array(zi+1);let E=null,q,U,rt;for(d=0;d<=zi;d++)et[d]=0;for(m=0;m=1&&et[P]===0;P--);if(p>P&&(p=P),P===0)return o[s++]=1<<24|64<<16|0,o[s++]=1<<24|64<<16|0,u.bits=1,0;for(A=1;A0&&(n===Nl||P!==1))return-1;for(N[1]=0,d=1;d_l||n===Ll&&S>Al)return 1;for(;;){q=d-O,f[m]+1=z?(U=E[f[m]-z],rt=tt[f[m]-z]):(U=96,rt=0),J=1<>O)+D]=q<<24|U<<16|rt|0;while(D!==0);for(J=1<>=1;if(J!==0?(Y&=J-1,Y+=J):Y=0,m++,--et[d]===0){if(d===P)break;d=e[t+f[m]]}if(d>p&&(Y&yt)!==lt){for(O===0&&(O=p),mt+=A,B=d-O,M=1<_l||n===Ll&&S>Al)return 1;lt=Y&yt,o[lt]=p<<24|B<<16|mt-s|0}}return Y!==0&&(o[mt+Y]=d-O<<24|64<<16|0),u.bits=p,0};var _a=jc;const Bc=0,Eu=1,Ou=2,{Z_FINISH:Sl,Z_BLOCK:Mc,Z_TREES:os,Z_OK:mi,Z_STREAM_END:Rc,Z_NEED_DICT:Tc,Z_STREAM_ERROR:Hn,Z_DATA_ERROR:ju,Z_MEM_ERROR:Bu,Z_BUF_ERROR:Dc,Z_DEFLATED:kl}=Iu,As=16180,Pl=16181,Il=16182,Cl=16183,Fl=16184,El=16185,Ol=16186,jl=16187,Bl=16188,Ml=16189,ys=16190,Pr=16191,uo=16192,Rl=16193,ho=16194,Tl=16195,Dl=16196,ql=16197,Ul=16198,ls=16199,us=16200,zl=16201,Hl=16202,Wl=16203,Vl=16204,Gl=16205,co=16206,Yl=16207,Jl=16208,Be=16209,Mu=16210,Ru=16211,qc=852,Uc=592,zc=15,Hc=zc,$l=n=>(n>>>24&255)+(n>>>8&65280)+((n&65280)<<8)+((n&255)<<24);function Wc(){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 bi=n=>{if(!n)return 1;const e=n.state;return!e||e.strm!==n||e.modeRu?1:0},Tu=n=>{if(bi(n))return Hn;const e=n.state;return n.total_in=n.total_out=e.total=0,n.msg="",e.wrap&&(n.adler=e.wrap&1),e.mode=As,e.last=0,e.havedict=0,e.flags=-1,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new Int32Array(qc),e.distcode=e.distdyn=new Int32Array(Uc),e.sane=1,e.back=-1,mi},Du=n=>{if(bi(n))return Hn;const e=n.state;return e.wsize=0,e.whave=0,e.wnext=0,Tu(n)},qu=(n,e)=>{let t;if(bi(n))return Hn;const i=n.state;return e<0?(t=0,e=-e):(t=(e>>4)+5,e<48&&(e&=15)),e&&(e<8||e>15)?Hn:(i.window!==null&&i.wbits!==e&&(i.window=null),i.wrap=t,i.wbits=e,Du(n))},Uu=(n,e)=>{if(!n)return Hn;const t=new Wc;n.state=t,t.strm=n,t.window=null,t.mode=As;const i=qu(n,e);return i!==mi&&(n.state=null),i},Vc=n=>Uu(n,Hc);let Kl=!0,fo,po;const Gc=n=>{if(Kl){fo=new Int32Array(512),po=new Int32Array(32);let e=0;for(;e<144;)n.lens[e++]=8;for(;e<256;)n.lens[e++]=9;for(;e<280;)n.lens[e++]=7;for(;e<288;)n.lens[e++]=8;for(_a(Eu,n.lens,0,288,fo,0,n.work,{bits:9}),e=0;e<32;)n.lens[e++]=5;_a(Ou,n.lens,0,32,po,0,n.work,{bits:5}),Kl=!1}n.lencode=fo,n.lenbits=9,n.distcode=po,n.distbits=5},zu=(n,e,t,i)=>{let o;const s=n.state;return s.window===null&&(s.wsize=1<=s.wsize?(s.window.set(e.subarray(t-s.wsize,t),0),s.wnext=0,s.whave=s.wsize):(o=s.wsize-s.wnext,o>i&&(o=i),s.window.set(e.subarray(t-i,t-i+o),s.wnext),i-=o,i?(s.window.set(e.subarray(t-i,t),0),s.wnext=i,s.whave=s.wsize):(s.wnext+=o,s.wnext===s.wsize&&(s.wnext=0),s.whave{let t,i,o,s,f,u,c,d,m,A,P,p,B,O,M=0,S,Y,J,D,lt,yt,mt,tt;const z=new Uint8Array(4);let et,N;const E=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(bi(n)||!n.output||!n.input&&n.avail_in!==0)return Hn;t=n.state,t.mode===Pr&&(t.mode=uo),f=n.next_out,o=n.output,c=n.avail_out,s=n.next_in,i=n.input,u=n.avail_in,d=t.hold,m=t.bits,A=u,P=c,tt=mi;t:for(;;)switch(t.mode){case As:if(t.wrap===0){t.mode=uo;break}for(;m<16;){if(u===0)break t;u--,d+=i[s++]<>>8&255,t.check=hr(t.check,z,2,0),d=0,m=0,t.mode=Pl;break}if(t.head&&(t.head.done=!1),!(t.wrap&1)||(((d&255)<<8)+(d>>8))%31){n.msg="incorrect header check",t.mode=Be;break}if((d&15)!==kl){n.msg="unknown compression method",t.mode=Be;break}if(d>>>=4,m-=4,mt=(d&15)+8,t.wbits===0&&(t.wbits=mt),mt>15||mt>t.wbits){n.msg="invalid window size",t.mode=Be;break}t.dmax=1<>8&1),t.flags&512&&t.wrap&4&&(z[0]=d&255,z[1]=d>>>8&255,t.check=hr(t.check,z,2,0)),d=0,m=0,t.mode=Il;case Il:for(;m<32;){if(u===0)break t;u--,d+=i[s++]<>>8&255,z[2]=d>>>16&255,z[3]=d>>>24&255,t.check=hr(t.check,z,4,0)),d=0,m=0,t.mode=Cl;case Cl:for(;m<16;){if(u===0)break t;u--,d+=i[s++]<>8),t.flags&512&&t.wrap&4&&(z[0]=d&255,z[1]=d>>>8&255,t.check=hr(t.check,z,2,0)),d=0,m=0,t.mode=Fl;case Fl:if(t.flags&1024){for(;m<16;){if(u===0)break t;u--,d+=i[s++]<>>8&255,t.check=hr(t.check,z,2,0)),d=0,m=0}else t.head&&(t.head.extra=null);t.mode=El;case El:if(t.flags&1024&&(p=t.length,p>u&&(p=u),p&&(t.head&&(mt=t.head.extra_len-t.length,t.head.extra||(t.head.extra=new Uint8Array(t.head.extra_len)),t.head.extra.set(i.subarray(s,s+p),mt)),t.flags&512&&t.wrap&4&&(t.check=hr(t.check,i,p,s)),u-=p,s+=p,t.length-=p),t.length))break t;t.length=0,t.mode=Ol;case Ol:if(t.flags&2048){if(u===0)break t;p=0;do mt=i[s+p++],t.head&&mt&&t.length<65536&&(t.head.name+=String.fromCharCode(mt));while(mt&&p>9&1,t.head.done=!0),n.adler=t.check=0,t.mode=Pr;break;case Ml:for(;m<32;){if(u===0)break t;u--,d+=i[s++]<>>=m&7,m-=m&7,t.mode=co;break}for(;m<3;){if(u===0)break t;u--,d+=i[s++]<>>=1,m-=1,d&3){case 0:t.mode=Rl;break;case 1:if(Gc(t),t.mode=ls,e===os){d>>>=2,m-=2;break t}break;case 2:t.mode=Dl;break;case 3:n.msg="invalid block type",t.mode=Be}d>>>=2,m-=2;break;case Rl:for(d>>>=m&7,m-=m&7;m<32;){if(u===0)break t;u--,d+=i[s++]<>>16^65535)){n.msg="invalid stored block lengths",t.mode=Be;break}if(t.length=d&65535,d=0,m=0,t.mode=ho,e===os)break t;case ho:t.mode=Tl;case Tl:if(p=t.length,p){if(p>u&&(p=u),p>c&&(p=c),p===0)break t;o.set(i.subarray(s,s+p),f),u-=p,s+=p,c-=p,f+=p,t.length-=p;break}t.mode=Pr;break;case Dl:for(;m<14;){if(u===0)break t;u--,d+=i[s++]<>>=5,m-=5,t.ndist=(d&31)+1,d>>>=5,m-=5,t.ncode=(d&15)+4,d>>>=4,m-=4,t.nlen>286||t.ndist>30){n.msg="too many length or distance symbols",t.mode=Be;break}t.have=0,t.mode=ql;case ql:for(;t.have>>=3,m-=3}for(;t.have<19;)t.lens[E[t.have++]]=0;if(t.lencode=t.lendyn,t.lenbits=7,et={bits:t.lenbits},tt=_a(Bc,t.lens,0,19,t.lencode,0,t.work,et),t.lenbits=et.bits,tt){n.msg="invalid code lengths set",t.mode=Be;break}t.have=0,t.mode=Ul;case Ul:for(;t.have>>24,Y=M>>>16&255,J=M&65535,!(S<=m);){if(u===0)break t;u--,d+=i[s++]<>>=S,m-=S,t.lens[t.have++]=J;else{if(J===16){for(N=S+2;m>>=S,m-=S,t.have===0){n.msg="invalid bit length repeat",t.mode=Be;break}mt=t.lens[t.have-1],p=3+(d&3),d>>>=2,m-=2}else if(J===17){for(N=S+3;m>>=S,m-=S,mt=0,p=3+(d&7),d>>>=3,m-=3}else{for(N=S+7;m>>=S,m-=S,mt=0,p=11+(d&127),d>>>=7,m-=7}if(t.have+p>t.nlen+t.ndist){n.msg="invalid bit length repeat",t.mode=Be;break}for(;p--;)t.lens[t.have++]=mt}}if(t.mode===Be)break;if(t.lens[256]===0){n.msg="invalid code -- missing end-of-block",t.mode=Be;break}if(t.lenbits=9,et={bits:t.lenbits},tt=_a(Eu,t.lens,0,t.nlen,t.lencode,0,t.work,et),t.lenbits=et.bits,tt){n.msg="invalid literal/lengths set",t.mode=Be;break}if(t.distbits=6,t.distcode=t.distdyn,et={bits:t.distbits},tt=_a(Ou,t.lens,t.nlen,t.ndist,t.distcode,0,t.work,et),t.distbits=et.bits,tt){n.msg="invalid distances set",t.mode=Be;break}if(t.mode=ls,e===os)break t;case ls:t.mode=us;case us:if(u>=6&&c>=258){n.next_out=f,n.avail_out=c,n.next_in=s,n.avail_in=u,t.hold=d,t.bits=m,Ic(n,P),f=n.next_out,o=n.output,c=n.avail_out,s=n.next_in,i=n.input,u=n.avail_in,d=t.hold,m=t.bits,t.mode===Pr&&(t.back=-1);break}for(t.back=0;M=t.lencode[d&(1<>>24,Y=M>>>16&255,J=M&65535,!(S<=m);){if(u===0)break t;u--,d+=i[s++]<>D)],S=M>>>24,Y=M>>>16&255,J=M&65535,!(D+S<=m);){if(u===0)break t;u--,d+=i[s++]<>>=D,m-=D,t.back+=D}if(d>>>=S,m-=S,t.back+=S,t.length=J,Y===0){t.mode=Gl;break}if(Y&32){t.back=-1,t.mode=Pr;break}if(Y&64){n.msg="invalid literal/length code",t.mode=Be;break}t.extra=Y&15,t.mode=zl;case zl:if(t.extra){for(N=t.extra;m>>=t.extra,m-=t.extra,t.back+=t.extra}t.was=t.length,t.mode=Hl;case Hl:for(;M=t.distcode[d&(1<>>24,Y=M>>>16&255,J=M&65535,!(S<=m);){if(u===0)break t;u--,d+=i[s++]<>D)],S=M>>>24,Y=M>>>16&255,J=M&65535,!(D+S<=m);){if(u===0)break t;u--,d+=i[s++]<>>=D,m-=D,t.back+=D}if(d>>>=S,m-=S,t.back+=S,Y&64){n.msg="invalid distance code",t.mode=Be;break}t.offset=J,t.extra=Y&15,t.mode=Wl;case Wl:if(t.extra){for(N=t.extra;m>>=t.extra,m-=t.extra,t.back+=t.extra}if(t.offset>t.dmax){n.msg="invalid distance too far back",t.mode=Be;break}t.mode=Vl;case Vl:if(c===0)break t;if(p=P-c,t.offset>p){if(p=t.offset-p,p>t.whave&&t.sane){n.msg="invalid distance too far back",t.mode=Be;break}p>t.wnext?(p-=t.wnext,B=t.wsize-p):B=t.wnext-p,p>t.length&&(p=t.length),O=t.window}else O=o,B=f-t.offset,p=t.length;p>c&&(p=c),c-=p,t.length-=p;do o[f++]=O[B++];while(--p);t.length===0&&(t.mode=us);break;case Gl:if(c===0)break t;o[f++]=t.length,c--,t.mode=us;break;case co:if(t.wrap){for(;m<32;){if(u===0)break t;u--,d|=i[s++]<{if(bi(n))return Hn;let e=n.state;return e.window&&(e.window=null),n.state=null,mi},$c=(n,e)=>{if(bi(n))return Hn;const t=n.state;return(t.wrap&2)===0?Hn:(t.head=e,e.done=!1,mi)},Kc=(n,e)=>{const t=e.length;let i,o,s;return bi(n)||(i=n.state,i.wrap!==0&&i.mode!==ys)?Hn:i.mode===ys&&(o=1,o=Io(o,e,t,0),o!==i.check)?ju:(s=zu(n,e,t,t),s?(i.mode=Mu,Bu):(i.havedict=1,mi))};var Xc=Du,Zc=qu,Qc=Tu,tf=Vc,ef=Uu,nf=Yc,rf=Jc,af=$c,sf=Kc,of="pako inflate (from Nodeca project)",Ir={inflateReset:Xc,inflateReset2:Zc,inflateResetKeep:Qc,inflateInit:tf,inflateInit2:ef,inflate:nf,inflateEnd:rf,inflateGetHeader:af,inflateSetDictionary:sf,inflateInfo:of};function lf(){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 uf=lf;const Hu=Object.prototype.toString,{Z_NO_FLUSH:hf,Z_FINISH:cf,Z_OK:Na,Z_STREAM_END:go,Z_NEED_DICT:mo,Z_STREAM_ERROR:ff,Z_DATA_ERROR:Xl,Z_MEM_ERROR:df}=Iu;function La(n){this.options=Cu.assign({chunkSize:1024*64,windowBits:15,to:""},n||{});const e=this.options;e.raw&&e.windowBits>=0&&e.windowBits<16&&(e.windowBits=-e.windowBits,e.windowBits===0&&(e.windowBits=-15)),e.windowBits>=0&&e.windowBits<16&&!(n&&n.windowBits)&&(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&(e.windowBits&15)===0&&(e.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new kc,this.strm.avail_out=0;let t=Ir.inflateInit2(this.strm,e.windowBits);if(t!==Na)throw new Error(Co[t]);if(this.header=new uf,Ir.inflateGetHeader(this.strm,this.header),e.dictionary&&(typeof e.dictionary=="string"?e.dictionary=Fo.string2buf(e.dictionary):Hu.call(e.dictionary)==="[object ArrayBuffer]"&&(e.dictionary=new Uint8Array(e.dictionary)),e.raw&&(t=Ir.inflateSetDictionary(this.strm,e.dictionary),t!==Na)))throw new Error(Co[t])}La.prototype.push=function(n,e){const t=this.strm,i=this.options.chunkSize,o=this.options.dictionary;let s,f,u;if(this.ended)return!1;for(e===~~e?f=e:f=e===!0?cf:hf,Hu.call(n)==="[object ArrayBuffer]"?t.input=new Uint8Array(n):t.input=n,t.next_in=0,t.avail_in=t.input.length;;){for(t.avail_out===0&&(t.output=new Uint8Array(i),t.next_out=0,t.avail_out=i),s=Ir.inflate(t,f),s===mo&&o&&(s=Ir.inflateSetDictionary(t,o),s===Na?s=Ir.inflate(t,f):s===Xl&&(s=mo));t.avail_in>0&&s===go&&t.state.wrap>0&&n[t.next_in]!==0;)Ir.inflateReset(t),s=Ir.inflate(t,f);switch(s){case ff:case Xl:case mo:case df:return this.onEnd(s),this.ended=!0,!1}if(u=t.avail_out,t.next_out&&(t.avail_out===0||s===go))if(this.options.to==="string"){let c=Fo.utf8border(t.output,t.next_out),d=t.next_out-c,m=Fo.buf2string(t.output,c);t.next_out=d,t.avail_out=i-d,d&&t.output.set(t.output.subarray(c,c+d),0),this.onData(m)}else this.onData(t.output.length===t.next_out?t.output:t.output.subarray(0,t.next_out));if(!(s===Na&&u===0)){if(s===go)return s=Ir.inflateEnd(this.strm),this.onEnd(s),this.ended=!0,!0;if(t.avail_in===0)break}}return!0};La.prototype.onData=function(n){this.chunks.push(n)};La.prototype.onEnd=function(n){n===Na&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=Cu.flattenChunks(this.chunks)),this.chunks=[],this.err=n,this.msg=this.strm.msg};function pf(n,e){const t=new La(e);if(t.push(n),t.err)throw t.msg||Co[t.err];return t.result}var gf=La,mf=pf,vf={Inflate:gf,inflate:mf};const{Inflate:bf,inflate:wf}=vf;var Zl=bf,yf=wf;const Wu=[];for(let n=0;n<256;n++){let e=n;for(let t=0;t<8;t++)e&1?e=3988292384^e>>>1:e=e>>>1;Wu[n]=e}const Ql=4294967295;function xf(n,e,t){let i=n;for(let o=0;o>>8;return i}function _f(n,e){return(xf(Ql,n,e)^Ql)>>>0}function tu(n,e,t){const i=n.readUint32(),o=_f(new Uint8Array(n.buffer,n.byteOffset+n.offset-e-4,e),e);if(o!==i)throw new Error(`CRC mismatch for chunk ${t}. Expected ${i}, found ${o}`)}function Vu(n,e,t){for(let i=0;i>1)&255}else{for(;s>1)&255;for(;s>1)&255}}function $u(n,e,t,i,o){let s=0;if(t.length===0){for(;s=t||yt>=i))for(let mt=0;mt>8&255}const Cf=new Uint16Array([255]),Ff=new Uint8Array(Cf.buffer),Ef=Ff[0]===255,Of=new Uint8Array(0);function eu(n){const{data:e,width:t,height:i,channels:o,depth:s}=n,f=Math.ceil(s/8)*o,u=Math.ceil(s/8*o*t),c=new Uint8Array(i*u);let d=Of,m=0,A,P;for(let p=0;p>8&255}const ps=Uint8Array.of(137,80,78,71,13,10,26,10);function nu(n){if(!Bf(n.readBytes(ps.length)))throw new Error("wrong PNG signature")}function Bf(n){if(n.length79)throw new Error("keyword length must be between 1 and 79")}const Df=/^[\u0000-\u00FF]*$/;function qf(n){if(!Df.test(n))throw new Error("invalid latin1 text")}function Uf(n,e,t){const i=Xu(e);n[i]=zf(e,t-i.length-1)}function Xu(n){for(n.mark();n.readByte()!==Rf;);const e=n.offset;n.reset();const t=Ku.decode(n.readBytes(e-n.offset-1));return n.skip(1),Tf(t),t}function zf(n,e){return Ku.decode(n.readBytes(e))}const Bn={UNKNOWN:-1,GREYSCALE:0,TRUECOLOUR:2,INDEXED_COLOUR:3,GREYSCALE_ALPHA:4,TRUECOLOUR_ALPHA:6},vo={UNKNOWN:-1,DEFLATE:0},ru={UNKNOWN:-1,ADAPTIVE:0},bo={UNKNOWN:-1,NO_INTERLACE:0,ADAM7:1},hs={NONE:0,BACKGROUND:1,PREVIOUS:2},wo={SOURCE:0,OVER:1};class Hf extends Mo{constructor(t,i={}){super(t);xe(this,"_checkCrc");xe(this,"_inflator");xe(this,"_png");xe(this,"_apng");xe(this,"_end");xe(this,"_hasPalette");xe(this,"_palette");xe(this,"_hasTransparency");xe(this,"_transparency");xe(this,"_compressionMethod");xe(this,"_filterMethod");xe(this,"_interlaceMethod");xe(this,"_colorType");xe(this,"_isAnimated");xe(this,"_numberOfFrames");xe(this,"_numberOfPlays");xe(this,"_frames");xe(this,"_writingDataChunks");const{checkCrc:o=!1}=i;this._checkCrc=o,this._inflator=new Zl,this._png={width:-1,height:-1,channels:-1,data:new Uint8Array(0),depth:1,text:{}},this._apng={width:-1,height:-1,channels:-1,depth:1,numberOfFrames:1,numberOfPlays:0,text:{},frames:[]},this._end=!1,this._hasPalette=!1,this._palette=[],this._hasTransparency=!1,this._transparency=new Uint16Array(0),this._compressionMethod=vo.UNKNOWN,this._filterMethod=ru.UNKNOWN,this._interlaceMethod=bo.UNKNOWN,this._colorType=Bn.UNKNOWN,this._isAnimated=!1,this._numberOfFrames=1,this._numberOfPlays=0,this._frames=[],this._writingDataChunks=!1,this.setBigEndian()}decode(){for(nu(this);!this._end;){const t=this.readUint32(),i=this.readChars(4);this.decodeChunk(t,i)}return this.decodeImage(),this._png}decodeApng(){for(nu(this);!this._end;){const t=this.readUint32(),i=this.readChars(4);this.decodeApngChunk(t,i)}return this.decodeApngImage(),this._apng}decodeChunk(t,i){const o=this.offset;switch(i){case"IHDR":this.decodeIHDR();break;case"PLTE":this.decodePLTE(t);break;case"IDAT":this.decodeIDAT(t);break;case"IEND":this._end=!0;break;case"tRNS":this.decodetRNS(t);break;case"iCCP":this.decodeiCCP(t);break;case Mf:Uf(this._png.text,this,t);break;case"pHYs":this.decodepHYs();break;default:this.skip(t);break}if(this.offset-o!==t)throw new Error(`Length mismatch while decoding chunk ${i}`);this._checkCrc?tu(this,t+4,i):this.skip(4)}decodeApngChunk(t,i){const o=this.offset;switch(i!=="fdAT"&&i!=="IDAT"&&this._writingDataChunks&&this.pushDataToFrame(),i){case"acTL":this.decodeACTL();break;case"fcTL":this.decodeFCTL();break;case"fdAT":this.decodeFDAT(t);break;default:this.decodeChunk(t,i),this.offset=o+t;break}if(this.offset-o!==t)throw new Error(`Length mismatch while decoding chunk ${i}`);this._checkCrc?tu(this,t+4,i):this.skip(4)}decodeIHDR(){const t=this._png;t.width=this.readUint32(),t.height=this.readUint32(),t.depth=Wf(this.readUint8());const i=this.readUint8();this._colorType=i;let o;switch(i){case Bn.GREYSCALE:o=1;break;case Bn.TRUECOLOUR:o=3;break;case Bn.INDEXED_COLOUR:o=1;break;case Bn.GREYSCALE_ALPHA:o=2;break;case Bn.TRUECOLOUR_ALPHA:o=4;break;case Bn.UNKNOWN:default:throw new Error(`Unknown color type: ${i}`)}if(this._png.channels=o,this._compressionMethod=this.readUint8(),this._compressionMethod!==vo.DEFLATE)throw new Error(`Unsupported compression method: ${this._compressionMethod}`);this._filterMethod=this.readUint8(),this._interlaceMethod=this.readUint8()}decodeACTL(){this._numberOfFrames=this.readUint32(),this._numberOfPlays=this.readUint32(),this._isAnimated=!0}decodeFCTL(){const t={sequenceNumber:this.readUint32(),width:this.readUint32(),height:this.readUint32(),xOffset:this.readUint32(),yOffset:this.readUint32(),delayNumber:this.readUint16(),delayDenominator:this.readUint16(),disposeOp:this.readUint8(),blendOp:this.readUint8(),data:new Uint8Array(0)};this._frames.push(t)}decodePLTE(t){if(t%3!==0)throw new RangeError(`PLTE field length must be a multiple of 3. Got ${t}`);const i=t/3;this._hasPalette=!0;const o=[];this._palette=o;for(let s=0;sthis._png.width*this._png.height)throw new Error(`tRNS chunk contains more alpha values than there are pixels (${t/2} vs ${this._png.width*this._png.height})`);this._hasTransparency=!0,this._transparency=new Uint16Array(t/2);for(let i=0;ithis._palette.length)throw new Error(`tRNS chunk contains more alpha values than there are palette colors (${t} vs ${this._palette.length})`);let i=0;for(;i{const c=((f+i.yOffset)*this._png.width+i.xOffset+u)*this._png.channels,d=(f*i.width+u)*this._png.channels;return{index:c,frameIndex:d}};switch(i.blendOp){case wo.SOURCE:for(let f=0;f=200&&e.status<=299}function cs(n){try{n.dispatchEvent(new MouseEvent("click"))}catch(t){var e=document.createEvent("MouseEvents");e.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),n.dispatchEvent(e)}}var di=$t.saveAs||((typeof window=="undefined"?"undefined":Se(window))!=="object"||window!==$t?function(){}:typeof HTMLAnchorElement!="undefined"&&"download"in HTMLAnchorElement.prototype?function(n,e,t){var i=$t.URL||$t.webkitURL,o=document.createElement("a");e=e||n.name||"download",o.download=e,o.rel="noopener",typeof n=="string"?(o.href=n,o.origin!==location.origin?au(o.href)?xo(n,e,t):cs(o,o.target="_blank"):cs(o)):(o.href=i.createObjectURL(n),setTimeout(function(){i.revokeObjectURL(o.href)},4e4),setTimeout(function(){cs(o)},0))}:"msSaveOrOpenBlob"in navigator?function(n,e,t){if(e=e||n.name||"download",typeof n=="string")if(au(n))xo(n,e,t);else{var i=document.createElement("a");i.href=n,i.target="_blank",setTimeout(function(){cs(i)})}else navigator.msSaveOrOpenBlob((function(o,s){return s===void 0?s={autoBom:!1}:Se(s)!=="object"&&(Le.warn("Deprecated: Expected third argument to be a object"),s={autoBom:!s}),s.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(o.type)?new Blob(["\uFEFF",o],{type:o.type}):o})(n,t),e)}:function(n,e,t,i){if((i=i||open("","_blank"))&&(i.document.title=i.document.body.innerText="downloading..."),typeof n=="string")return xo(n,e,t);var o=n.type==="application/octet-stream",s=/constructor/i.test($t.HTMLElement)||$t.safari,f=/CriOS\/[\d]+/.test(navigator.userAgent);if((f||o&&s)&&(typeof FileReader=="undefined"?"undefined":Se(FileReader))==="object"){var u=new FileReader;u.onloadend=function(){var m=u.result;m=f?m:m.replace(/^data:[^;]*;/,"data:attachment/file;"),i?i.location.href=m:location=m,i=null},u.readAsDataURL(n)}else{var c=$t.URL||$t.webkitURL,d=c.createObjectURL(n);i?i.location=d:location.href=d,i=null,setTimeout(function(){c.revokeObjectURL(d)},4e4)}});/** * A class to parse color values * @author Stoyan Stefanov * {@link http://www.phpied.com/rgb-color-parser-in-javascript/} * @license Use it if you like it */function Zu(n){var e;n=n||"",this.ok=!1,n.charAt(0)=="#"&&(n=n.substr(1,6)),n={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"}[n=(n=n.replace(/ /g,"")).toLowerCase()]||n;for(var t=[{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(u){return[parseInt(u[1]),parseInt(u[2]),parseInt(u[3])]}},{re:/^(\w{2})(\w{2})(\w{2})$/,example:["#00ff00","336699"],process:function(u){return[parseInt(u[1],16),parseInt(u[2],16),parseInt(u[3],16)]}},{re:/^(\w{1})(\w{1})(\w{1})$/,example:["#fb0","f0f"],process:function(u){return[parseInt(u[1]+u[1],16),parseInt(u[2]+u[2],16),parseInt(u[3]+u[3],16)]}}],i=0;i255?255:this.r,this.g=this.g<0||isNaN(this.g)?0:this.g>255?255:this.g,this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b,this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},this.toHex=function(){var u=this.r.toString(16),c=this.g.toString(16),d=this.b.toString(16);return u.length==1&&(u="0"+u),c.length==1&&(c="0"+c),d.length==1&&(d="0"+d),"#"+u+c+d}}var gs=$t.atob.bind($t),su=$t.btoa.bind($t);/** * @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 _o(n,e){var t=n[0],i=n[1],o=n[2],s=n[3];t=gn(t,i,o,s,e[0],7,-680876936),s=gn(s,t,i,o,e[1],12,-389564586),o=gn(o,s,t,i,e[2],17,606105819),i=gn(i,o,s,t,e[3],22,-1044525330),t=gn(t,i,o,s,e[4],7,-176418897),s=gn(s,t,i,o,e[5],12,1200080426),o=gn(o,s,t,i,e[6],17,-1473231341),i=gn(i,o,s,t,e[7],22,-45705983),t=gn(t,i,o,s,e[8],7,1770035416),s=gn(s,t,i,o,e[9],12,-1958414417),o=gn(o,s,t,i,e[10],17,-42063),i=gn(i,o,s,t,e[11],22,-1990404162),t=gn(t,i,o,s,e[12],7,1804603682),s=gn(s,t,i,o,e[13],12,-40341101),o=gn(o,s,t,i,e[14],17,-1502002290),t=mn(t,i=gn(i,o,s,t,e[15],22,1236535329),o,s,e[1],5,-165796510),s=mn(s,t,i,o,e[6],9,-1069501632),o=mn(o,s,t,i,e[11],14,643717713),i=mn(i,o,s,t,e[0],20,-373897302),t=mn(t,i,o,s,e[5],5,-701558691),s=mn(s,t,i,o,e[10],9,38016083),o=mn(o,s,t,i,e[15],14,-660478335),i=mn(i,o,s,t,e[4],20,-405537848),t=mn(t,i,o,s,e[9],5,568446438),s=mn(s,t,i,o,e[14],9,-1019803690),o=mn(o,s,t,i,e[3],14,-187363961),i=mn(i,o,s,t,e[8],20,1163531501),t=mn(t,i,o,s,e[13],5,-1444681467),s=mn(s,t,i,o,e[2],9,-51403784),o=mn(o,s,t,i,e[7],14,1735328473),t=vn(t,i=mn(i,o,s,t,e[12],20,-1926607734),o,s,e[5],4,-378558),s=vn(s,t,i,o,e[8],11,-2022574463),o=vn(o,s,t,i,e[11],16,1839030562),i=vn(i,o,s,t,e[14],23,-35309556),t=vn(t,i,o,s,e[1],4,-1530992060),s=vn(s,t,i,o,e[4],11,1272893353),o=vn(o,s,t,i,e[7],16,-155497632),i=vn(i,o,s,t,e[10],23,-1094730640),t=vn(t,i,o,s,e[13],4,681279174),s=vn(s,t,i,o,e[0],11,-358537222),o=vn(o,s,t,i,e[3],16,-722521979),i=vn(i,o,s,t,e[6],23,76029189),t=vn(t,i,o,s,e[9],4,-640364487),s=vn(s,t,i,o,e[12],11,-421815835),o=vn(o,s,t,i,e[15],16,530742520),t=bn(t,i=vn(i,o,s,t,e[2],23,-995338651),o,s,e[0],6,-198630844),s=bn(s,t,i,o,e[7],10,1126891415),o=bn(o,s,t,i,e[14],15,-1416354905),i=bn(i,o,s,t,e[5],21,-57434055),t=bn(t,i,o,s,e[12],6,1700485571),s=bn(s,t,i,o,e[3],10,-1894986606),o=bn(o,s,t,i,e[10],15,-1051523),i=bn(i,o,s,t,e[1],21,-2054922799),t=bn(t,i,o,s,e[8],6,1873313359),s=bn(s,t,i,o,e[15],10,-30611744),o=bn(o,s,t,i,e[6],15,-1560198380),i=bn(i,o,s,t,e[13],21,1309151649),t=bn(t,i,o,s,e[4],6,-145523070),s=bn(s,t,i,o,e[11],10,-1120210379),o=bn(o,s,t,i,e[2],15,718787259),i=bn(i,o,s,t,e[9],21,-343485551),n[0]=Gr(t,n[0]),n[1]=Gr(i,n[1]),n[2]=Gr(o,n[2]),n[3]=Gr(s,n[3])}function Ns(n,e,t,i,o,s){return e=Gr(Gr(e,n),Gr(i,s)),Gr(e<>>32-o,t)}function gn(n,e,t,i,o,s,f){return Ns(e&t|~e&i,n,e,o,s,f)}function mn(n,e,t,i,o,s,f){return Ns(e&i|t&~i,n,e,o,s,f)}function vn(n,e,t,i,o,s,f){return Ns(e^t^i,n,e,o,s,f)}function bn(n,e,t,i,o,s,f){return Ns(t^(e|~i),n,e,o,s,f)}function Qu(n){var e,t=n.length,i=[1732584193,-271733879,-1732584194,271733878];for(e=64;e<=n.length;e+=64)_o(i,Gf(n.substring(e-64,e)));n=n.substring(e-64);var o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(e=0;e>2]|=n.charCodeAt(e)<<(e%4<<3);if(o[e>>2]|=128<<(e%4<<3),e>55)for(_o(i,o),e=0;e<16;e++)o[e]=0;return o[14]=8*t,_o(i,o),i}function Gf(n){var e,t=[];for(e=0;e<64;e+=4)t[e>>2]=n.charCodeAt(e)+(n.charCodeAt(e+1)<<8)+(n.charCodeAt(e+2)<<16)+(n.charCodeAt(e+3)<<24);return t}var ou="0123456789abcdef".split("");function Yf(n){for(var e="",t=0;t<4;t++)e+=ou[n>>8*t+4&15]+ou[n>>8*t&15];return e}function Jf(n){return String.fromCharCode(255&n,(65280&n)>>8,(16711680&n)>>16,(4278190080&n)>>24)}function Eo(n){return Qu(n).map(Jf).join("")}var $f=(function(n){for(var e=0;e>16)+(e>>16)+(t>>16)<<16|65535&t}return n+e&4294967295}/** * @license * FPDF is released under a permissive license: there is no usage restriction. * You may embed it freely in your application (commercial or not), with or * without modifications. * * Reference: http://www.fpdf.org/en/script/script37.php */function Oo(n,e){var t,i,o,s;if(n!==t){for(var f=(o=n,s=1+(256/n.length|0),new Array(s+1).join(o)),u=[],c=0;c<256;c++)u[c]=c;var d=0;for(c=0;c<256;c++){var m=u[c];d=(d+m+f.charCodeAt(c))%256,u[c]=u[d],u[d]=m}t=n,i=u}else u=i;var A=e.length,P=0,p=0,B="";for(c=0;c€/\f©þdSiz";var s=(e+this.padding).substr(0,32),f=(t+this.padding).substr(0,32);this.O=this.processOwnerPassword(s,f),this.P=-(1+(255^o)),this.encryptionKey=Eo(s+this.O+this.lsbFirstWord(this.P)+this.hexToBytes(i)).substr(0,5),this.U=Oo(this.encryptionKey,this.padding)}function Gi(n){if(/[^\u0000-\u00ff]/.test(n))throw new Error("Invalid PDF Name Object: "+n+", Only accept ASCII characters.");for(var e="",t=n.length,i=0;i126?"#"+("0"+o.toString(16)).slice(-2):n[i]}return e}function uu(n){if(Se(n)!=="object")throw new Error("Invalid Context passed to initialize PubSub (jsPDF-module)");var e={};this.subscribe=function(t,i,o){if(o=o||!1,typeof t!="string"||typeof i!="function"||typeof o!="boolean")throw new Error("Invalid arguments passed to PubSub.subscribe (jsPDF-module)");e.hasOwnProperty(t)||(e[t]={});var s=Math.random().toString(35);return e[t][s]=[i,!!o],s},this.unsubscribe=function(t){for(var i in e)if(e[i][t])return delete e[i][t],Object.keys(e[i]).length===0&&delete e[i],!0;return!1},this.publish=function(t){if(e.hasOwnProperty(t)){var i=Array.prototype.slice.call(arguments,1),o=[];for(var s in e[t]){var f=e[t][s];try{f[0].apply(n,i)}catch(u){$t.console&&Le.error("jsPDF PubSub Error",u.message,u)}f[1]&&o.push(s)}o.length&&o.forEach(this.unsubscribe)}},this.getTopics=function(){return e}}function xs(n){if(!(this instanceof xs))return new xs(n);var e="opacity,stroke-opacity".split(",");for(var t in n)n.hasOwnProperty(t)&&e.indexOf(t)>=0&&(this[t]=n[t]);this.id="",this.objectNumber=-1}function th(n,e){this.gState=n,this.matrix=e,this.id="",this.objectNumber=-1}function pi(n,e,t,i,o){if(!(this instanceof pi))return new pi(n,e,t,i,o);this.type=n==="axial"?2:3,this.coords=e,this.colors=t,th.call(this,i,o)}function Yi(n,e,t,i,o){if(!(this instanceof Yi))return new Yi(n,e,t,i,o);this.boundingBox=n,this.xStep=e,this.yStep=t,this.stream="",this.cloneIndex=0,th.call(this,i,o)}function Tt(n){var e,t=typeof arguments[0]=="string"?arguments[0]:"p",i=arguments[1],o=arguments[2],s=arguments[3],f=[],u=1,c=16,d="S",m=null;Se(n=n||{})==="object"&&(t=n.orientation,i=n.unit||i,o=n.format||o,s=n.compress||n.compressPdf||s,(m=n.encryption||null)!==null&&(m.userPassword=m.userPassword||"",m.ownerPassword=m.ownerPassword||"",m.userPermissions=m.userPermissions||[]),u=typeof n.userUnit=="number"?Math.abs(n.userUnit):1,n.precision!==void 0&&(e=n.precision),n.floatPrecision!==void 0&&(c=n.floatPrecision),d=n.defaultPathOperation||"S"),f=n.filters||(s===!0?["FlateEncode"]:f),i=i||"mm",t=(""+(t||"P")).toLowerCase();var A=n.putOnlyUsedFonts||!1,P={},p={internal:{},__private__:{}};p.__private__.PubSub=uu;var B="1.3",O=p.__private__.getPdfVersion=function(){return B};p.__private__.setPdfVersion=function(l){B=l};var M={a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89],a5:[419.53,595.28],a6:[297.64,419.53],a7:[209.76,297.64],a8:[147.4,209.76],a9:[104.88,147.4],a10:[73.7,104.88],b0:[2834.65,4008.19],b1:[2004.09,2834.65],b2:[1417.32,2004.09],b3:[1000.63,1417.32],b4:[708.66,1000.63],b5:[498.9,708.66],b6:[354.33,498.9],b7:[249.45,354.33],b8:[175.75,249.45],b9:[124.72,175.75],b10:[87.87,124.72],c0:[2599.37,3676.54],c1:[1836.85,2599.37],c2:[1298.27,1836.85],c3:[918.43,1298.27],c4:[649.13,918.43],c5:[459.21,649.13],c6:[323.15,459.21],c7:[229.61,323.15],c8:[161.57,229.61],c9:[113.39,161.57],c10:[79.37,113.39],dl:[311.81,623.62],letter:[612,792],"government-letter":[576,756],legal:[612,1008],"junior-legal":[576,360],ledger:[1224,792],tabloid:[792,1224],"credit-card":[153,243]};p.__private__.getPageFormats=function(){return M};var S=p.__private__.getPageFormat=function(l){return M[l]};o=o||"a4";var Y="compat",J="advanced",D=Y;function lt(){this.saveGraphicsState(),k(new Gt(ne,0,0,-ne,0,ti()*ne).toString()+" cm"),this.setFontSize(this.getFontSize()/ne),d="n",D=J}function yt(){this.restoreGraphicsState(),d="S",D=Y}var mt=p.__private__.combineFontStyleAndFontWeight=function(l,v){if(l=="bold"&&v=="normal"||l=="bold"&&v==400||l=="normal"&&v=="italic"||l=="bold"&&v=="italic")throw new Error("Invalid Combination of fontweight and fontstyle");return v&&(l=v==400||v==="normal"?l==="italic"?"italic":"normal":v!=700&&v!=="bold"||l!=="normal"?(v==700?"bold":v)+""+l:"bold"),l};p.advancedAPI=function(l){var v=D===Y;return v&<.call(this),typeof l!="function"||(l(this),v&&yt.call(this)),this},p.compatAPI=function(l){var v=D===J;return v&&yt.call(this),typeof l!="function"||(l(this),v&<.call(this)),this},p.isAdvancedAPI=function(){return D===J};var tt,z=function(l){if(D!==J)throw new Error(l+" is only available in 'advanced' API mode. You need to call advancedAPI() first.")},et=p.roundToPrecision=p.__private__.roundToPrecision=function(l,v){var I=e||v;if(isNaN(l)||isNaN(I))throw new Error("Invalid argument passed to jsPDF.roundToPrecision");return l.toFixed(I).replace(/0+$/,"")};tt=p.hpf=p.__private__.hpf=typeof c=="number"?function(l){if(isNaN(l))throw new Error("Invalid argument passed to jsPDF.hpf");return et(l,c)}:c==="smart"?function(l){if(isNaN(l))throw new Error("Invalid argument passed to jsPDF.hpf");return et(l,l>-1&&l<1?16:5)}:function(l){if(isNaN(l))throw new Error("Invalid argument passed to jsPDF.hpf");return et(l,16)};var N=p.f2=p.__private__.f2=function(l){if(isNaN(l))throw new Error("Invalid argument passed to jsPDF.f2");return et(l,2)},E=p.__private__.f3=function(l){if(isNaN(l))throw new Error("Invalid argument passed to jsPDF.f3");return et(l,3)},q=p.scale=p.__private__.scale=function(l){if(isNaN(l))throw new Error("Invalid argument passed to jsPDF.scale");return D===Y?l*ne:D===J?l:void 0},U=function(l){return q((function(v){return D===Y?ti()-v:D===J?v:void 0})(l))};p.__private__.setPrecision=p.setPrecision=function(l){typeof parseInt(l,10)=="number"&&(e=parseInt(l,10))};var rt,ct="00000000000000000000000000000000",pt=p.__private__.getFileId=function(){return ct},nt=p.__private__.setFileId=function(l){return ct=l!==void 0&&/^[a-fA-F0-9]{32}$/.test(l)?l.toUpperCase():ct.split("").map(function(){return"ABCDEF0123456789".charAt(Math.floor(16*Math.random()))}).join(""),m!==null&&(sn=new Vi(m.userPermissions,m.userPassword,m.ownerPassword,ct)),ct};p.setFileId=function(l){return nt(l),this},p.getFileId=function(){return pt()};var ft=p.__private__.convertDateToPDFDate=function(l){var v=l.getTimezoneOffset(),I=v<0?"+":"-",T=Math.floor(Math.abs(v/60)),G=Math.abs(v%60),st=[I,R(T),"'",R(G),"'"].join("");return["D:",l.getFullYear(),R(l.getMonth()+1),R(l.getDate()),R(l.getHours()),R(l.getMinutes()),R(l.getSeconds()),st].join("")},At=p.__private__.convertPDFDateToDate=function(l){var v=parseInt(l.substr(2,4),10),I=parseInt(l.substr(6,2),10)-1,T=parseInt(l.substr(8,2),10),G=parseInt(l.substr(10,2),10),st=parseInt(l.substr(12,2),10),gt=parseInt(l.substr(14,2),10);return new Date(v,I,T,G,st,gt,0)},xt=p.__private__.setCreationDate=function(l){var v;if(l===void 0&&(l=new Date),l instanceof Date)v=ft(l);else{if(!/^D:(20[0-2][0-9]|203[0-7]|19[7-9][0-9])(0[0-9]|1[0-2])([0-2][0-9]|3[0-1])(0[0-9]|1[0-9]|2[0-3])(0[0-9]|[1-5][0-9])(0[0-9]|[1-5][0-9])(\+0[0-9]|\+1[0-4]|-0[0-9]|-1[0-1])'(0[0-9]|[1-5][0-9])'?$/.test(l))throw new Error("Invalid argument passed to jsPDF.setCreationDate");v=l}return rt=v},x=p.__private__.getCreationDate=function(l){var v=rt;return l==="jsDate"&&(v=At(rt)),v};p.setCreationDate=function(l){return xt(l),this},p.getCreationDate=function(l){return x(l)};var j,R=p.__private__.padd2=function(l){return("0"+parseInt(l)).slice(-2)},V=p.__private__.padd2Hex=function(l){return("00"+(l=l.toString())).substr(l.length)},$=0,Q=[],it=[],at=0,dt=[],_t=[],St=!1,kt=it;p.__private__.setCustomOutputDestination=function(l){St=!0,kt=l};var zt=function(l){St||(kt=l)};p.__private__.resetCustomOutputDestination=function(){St=!1,kt=it};var k=p.__private__.out=function(l){return l=l.toString(),at+=l.length+1,kt.push(l),kt},Lt=p.__private__.write=function(l){return k(arguments.length===1?l.toString():Array.prototype.join.call(arguments," "))},ae=p.__private__.getArrayBuffer=function(l){for(var v=l.length,I=new ArrayBuffer(v),T=new Uint8Array(I);v--;)T[v]=l.charCodeAt(v);return I},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 bt=n.fontSize||16;p.__private__.setFontSize=p.setFontSize=function(l){return bt=D===J?l/ne:l,this};var Wt,It=p.__private__.getFontSize=p.getFontSize=function(){return D===Y?bt:bt*ne},Ut=n.R2L||!1;p.__private__.setR2L=p.setR2L=function(l){return Ut=l,this},p.__private__.getR2L=p.getR2L=function(){return Ut};var Dt,ve=p.__private__.setZoomMode=function(l){if(/^(?:\d+\.\d*|\d*\.\d+|\d+)%$/.test(l))Wt=l;else if(isNaN(l)){if([void 0,null,"fullwidth","fullheight","fullpage","original"].indexOf(l)===-1)throw new Error('zoom must be Integer (e.g. 2), a percentage Value (e.g. 300%) or fullwidth, fullheight, fullpage, original. "'+l+'" is not recognized.');Wt=l}else Wt=parseInt(l,10)};p.__private__.getZoomMode=function(){return Wt};var ue,Zt=p.__private__.setPageMode=function(l){if([void 0,null,"UseNone","UseOutlines","UseThumbs","FullScreen"].indexOf(l)==-1)throw new Error('Page mode must be one of UseNone, UseOutlines, UseThumbs, or FullScreen. "'+l+'" is not recognized.');Dt=l};p.__private__.getPageMode=function(){return Dt};var ce=p.__private__.setLayoutMode=function(l){if([void 0,null,"continuous","single","twoleft","tworight","two"].indexOf(l)==-1)throw new Error('Layout mode must be one of continuous, single, twoleft, tworight. "'+l+'" is not recognized.');ue=l};p.__private__.getLayoutMode=function(){return ue},p.__private__.setDisplayMode=p.setDisplayMode=function(l,v,I){return ve(l),ce(v),Zt(I),this};var he={title:"",subject:"",author:"",keywords:"",creator:""};p.__private__.getDocumentProperty=function(l){if(Object.keys(he).indexOf(l)===-1)throw new Error("Invalid argument passed to jsPDF.getDocumentProperty");return he[l]},p.__private__.getDocumentProperties=function(){return he},p.__private__.setDocumentProperties=p.setProperties=p.setDocumentProperties=function(l){for(var v in he)he.hasOwnProperty(v)&&l[v]&&(he[v]=l[v]);return this},p.__private__.setDocumentProperty=function(l,v){if(Object.keys(he).indexOf(l)===-1)throw new Error("Invalid arguments passed to jsPDF.setDocumentProperty");return he[l]=v};var Bt,ne,Rt,ze,ge,se={},oe={},Oe=[],qt={},ke={},Yt={},Qt={},je=null,le=0,Vt=[],be=new uu(p),Jr=n.hotfixes||[],hn={},pr={},tr=[],Gt=function l(v,I,T,G,st,gt){if(!(this instanceof l))return new l(v,I,T,G,st,gt);isNaN(v)&&(v=1),isNaN(I)&&(I=0),isNaN(T)&&(T=0),isNaN(G)&&(G=1),isNaN(st)&&(st=0),isNaN(gt)&&(gt=0),this._matrix=[v,I,T,G,st,gt]};Object.defineProperty(Gt.prototype,"sx",{get:function(){return this._matrix[0]},set:function(l){this._matrix[0]=l}}),Object.defineProperty(Gt.prototype,"shy",{get:function(){return this._matrix[1]},set:function(l){this._matrix[1]=l}}),Object.defineProperty(Gt.prototype,"shx",{get:function(){return this._matrix[2]},set:function(l){this._matrix[2]=l}}),Object.defineProperty(Gt.prototype,"sy",{get:function(){return this._matrix[3]},set:function(l){this._matrix[3]=l}}),Object.defineProperty(Gt.prototype,"tx",{get:function(){return this._matrix[4]},set:function(l){this._matrix[4]=l}}),Object.defineProperty(Gt.prototype,"ty",{get:function(){return this._matrix[5]},set:function(l){this._matrix[5]=l}}),Object.defineProperty(Gt.prototype,"a",{get:function(){return this._matrix[0]},set:function(l){this._matrix[0]=l}}),Object.defineProperty(Gt.prototype,"b",{get:function(){return this._matrix[1]},set:function(l){this._matrix[1]=l}}),Object.defineProperty(Gt.prototype,"c",{get:function(){return this._matrix[2]},set:function(l){this._matrix[2]=l}}),Object.defineProperty(Gt.prototype,"d",{get:function(){return this._matrix[3]},set:function(l){this._matrix[3]=l}}),Object.defineProperty(Gt.prototype,"e",{get:function(){return this._matrix[4]},set:function(l){this._matrix[4]=l}}),Object.defineProperty(Gt.prototype,"f",{get:function(){return this._matrix[5]},set:function(l){this._matrix[5]=l}}),Object.defineProperty(Gt.prototype,"rotation",{get:function(){return Math.atan2(this.shx,this.sx)}}),Object.defineProperty(Gt.prototype,"scaleX",{get:function(){return this.decompose().scale.sx}}),Object.defineProperty(Gt.prototype,"scaleY",{get:function(){return this.decompose().scale.sy}}),Object.defineProperty(Gt.prototype,"isIdentity",{get:function(){return this.sx===1&&this.shy===0&&this.shx===0&&this.sy===1&&this.tx===0&&this.ty===0}}),Gt.prototype.join=function(l){return[this.sx,this.shy,this.shx,this.sy,this.tx,this.ty].map(tt).join(l)},Gt.prototype.multiply=function(l){var v=l.sx*this.sx+l.shy*this.shx,I=l.sx*this.shy+l.shy*this.sy,T=l.shx*this.sx+l.sy*this.shx,G=l.shx*this.shy+l.sy*this.sy,st=l.tx*this.sx+l.ty*this.shx+this.tx,gt=l.tx*this.shy+l.ty*this.sy+this.ty;return new Gt(v,I,T,G,st,gt)},Gt.prototype.decompose=function(){var l=this.sx,v=this.shy,I=this.shx,T=this.sy,G=this.tx,st=this.ty,gt=Math.sqrt(l*l+v*v),Et=(l/=gt)*I+(v/=gt)*T;I-=l*Et,T-=v*Et;var Ft=Math.sqrt(I*I+T*T);return Et/=Ft,l*(T/=Ft)>16&255,T=Ft>>8&255,G=255&Ft}if(T===void 0||st===void 0&&I===T&&T===G)v=typeof I=="string"?I+" "+gt[0]:l.precision===2?N(I/255)+" "+gt[0]:E(I/255)+" "+gt[0];else if(st===void 0||Se(st)==="object"){if(st&&!isNaN(st.a)&&st.a===0)return["1.","1.","1.",gt[1]].join(" ");v=typeof I=="string"?[I,T,G,gt[1]].join(" "):l.precision===2?[N(I/255),N(T/255),N(G/255),gt[1]].join(" "):[E(I/255),E(T/255),E(G/255),gt[1]].join(" ")}else v=typeof I=="string"?[I,T,G,st,gt[2]].join(" "):l.precision===2?[N(I),N(T),N(G),N(st),gt[2]].join(" "):[E(I),E(T),E(G),E(st),gt[2]].join(" ");return v},Gn=p.__private__.getFilters=function(){return f},Tn=p.__private__.putStream=function(l){var v=(l=l||{}).data||"",I=l.filters||Gn(),T=l.alreadyAppliedFilters||[],G=l.addLength1||!1,st=v.length,gt=l.objectId,Et=function(Fe){return Fe};if(m!==null&>===void 0)throw new Error("ObjectId must be passed to putStream for file encryption");m!==null&&(Et=sn.encryptor(gt,0));var Ft={};I===!0&&(I=["FlateEncode"]);var Kt=l.additionalKeyValues||[],te=(Ft=Tt.API.processDataByFilters!==void 0?Tt.API.processDataByFilters(v,I):{data:v,reverseChain:[]}).reverseChain+(Array.isArray(T)?T.join(" "):T.toString());if(Ft.data.length!==0&&(Kt.push({key:"Length",value:Ft.data.length}),G===!0&&Kt.push({key:"Length1",value:st})),te.length!=0)if(te.split("/").length-1==1)Kt.push({key:"Filter",value:te});else{Kt.push({key:"Filter",value:"["+te+"]"});for(var de=0;de>"),Ft.data.length!==0&&(k("stream"),k(Et(Ft.data)),k("endstream"))},Kr=p.__private__.putPage=function(l){var v=l.number,I=l.data,T=l.objId,G=l.contentsObjId;an(T,!0),k("<>"),k("endobj");var st=I.join(` `);return D===J&&(st+=` Q`),an(G,!0),Tn({data:st,filters:Gn(),objectId:G}),k("endobj"),T},nr=p.__private__.putPages=function(){var l,v,I=[];for(l=1;l<=le;l++)Vt[l].objId=nn(),Vt[l].contentsObjId=nn();for(l=1;l<=le;l++)I.push(Kr({number:l,data:_t[l],objId:Vt[l].objId,contentsObjId:Vt[l].contentsObjId,mediaBox:Vt[l].mediaBox,cropBox:Vt[l].cropBox,bleedBox:Vt[l].bleedBox,trimBox:Vt[l].trimBox,artBox:Vt[l].artBox,userUnit:Vt[l].userUnit,rootDictionaryObjId:Cr,resourceDictionaryObjId:Wn}));an(Cr,!0),k("<>"),k("endobj"),be.publish("postPutPages")},Xr=function(l){be.publish("putFont",{font:l,out:k,newObject:Te,putStream:Tn}),l.isAlreadyPutted!==!0&&(l.objectNumber=Te(),k("<<"),k("/Type /Font"),k("/BaseFont /"+Gi(l.postScriptName)),k("/Subtype /Type1"),typeof l.encoding=="string"&&k("/Encoding /"+l.encoding),k("/FirstChar 32"),k("/LastChar 255"),k(">>"),k("endobj"))},yi=function(l){l.objectNumber=Te();var v=[];v.push({key:"Type",value:"/XObject"}),v.push({key:"Subtype",value:"/Form"}),v.push({key:"BBox",value:"["+[tt(l.x),tt(l.y),tt(l.x+l.width),tt(l.y+l.height)].join(" ")+"]"}),v.push({key:"Matrix",value:"["+l.matrix.toString()+"]"});var I=l.pages[1].join(` `);Tn({data:I,additionalKeyValues:v,objectId:l.objectNumber}),k("endobj")},xi=function(l,v){v||(v=21);var I=Te(),T=(function(gt,Et){var Ft,Kt=[],te=1/(Et-1);for(Ft=0;Ft<1;Ft+=te)Kt.push(Ft);if(Kt.push(1),gt[0].offset!=0){var de={offset:0,color:gt[0].color};gt.unshift(de)}if(gt[gt.length-1].offset!=1){var Ke={offset:1,color:gt[gt.length-1].color};gt.push(Ke)}for(var Ae="",_e=0,Fe=0;Fegt[_e+1].offset;)_e++;var Me=gt[_e].offset,Re=(Ft-Me)/(gt[_e+1].offset-Me),cn=gt[_e].color,_r=gt[_e+1].color;Ae+=V(Math.round((1-Re)*cn[0]+Re*_r[0]).toString(16))+V(Math.round((1-Re)*cn[1]+Re*_r[1]).toString(16))+V(Math.round((1-Re)*cn[2]+Re*_r[2]).toString(16))}return Ae.trim()})(l.colors,v),G=[];G.push({key:"FunctionType",value:"0"}),G.push({key:"Domain",value:"[0.0 1.0]"}),G.push({key:"Size",value:"["+v+"]"}),G.push({key:"BitsPerSample",value:"8"}),G.push({key:"Range",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),G.push({key:"Decode",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),Tn({data:T,additionalKeyValues:G,alreadyAppliedFilters:["/ASCIIHexDecode"],objectId:I}),k("endobj"),l.objectNumber=Te(),k("<< /ShadingType "+l.type),k("/ColorSpace /DeviceRGB");var st="/Coords ["+tt(parseFloat(l.coords[0]))+" "+tt(parseFloat(l.coords[1]))+" ";l.type===2?st+=tt(parseFloat(l.coords[2]))+" "+tt(parseFloat(l.coords[3])):st+=tt(parseFloat(l.coords[2]))+" "+tt(parseFloat(l.coords[3]))+" "+tt(parseFloat(l.coords[4]))+" "+tt(parseFloat(l.coords[5])),k(st+="]"),l.matrix&&k("/Matrix ["+l.matrix.toString()+"]"),k("/Function "+I+" 0 R"),k("/Extend [true true]"),k(">>"),k("endobj")},_i=function(l,v){var I=nn(),T=Te();v.push({resourcesOid:I,objectOid:T}),l.objectNumber=T;var G=[];G.push({key:"Type",value:"/Pattern"}),G.push({key:"PatternType",value:"1"}),G.push({key:"PaintType",value:"1"}),G.push({key:"TilingType",value:"1"}),G.push({key:"BBox",value:"["+l.boundingBox.map(tt).join(" ")+"]"}),G.push({key:"XStep",value:tt(l.xStep)}),G.push({key:"YStep",value:tt(l.yStep)}),G.push({key:"Resources",value:I+" 0 R"}),l.matrix&&G.push({key:"Matrix",value:"["+l.matrix.toString()+"]"}),Tn({data:l.stream,additionalKeyValues:G,objectId:l.objectNumber}),k("endobj")},Ls=function(l){for(var v in l.objectNumber=Te(),k("<<"),l)switch(v){case"opacity":k("/ca "+N(l[v]));break;case"stroke-opacity":k("/CA "+N(l[v]))}k(">>"),k("endobj")},Qi=function(l){an(l.resourcesOid,!0),k("<<"),k("/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]"),(function(){for(var v in k("/Font <<"),se)se.hasOwnProperty(v)&&(A===!1||A===!0&&P.hasOwnProperty(v))&&k("/"+v+" "+se[v].objectNumber+" 0 R");k(">>")})(),(function(){if(Object.keys(qt).length>0){for(var v in k("/Shading <<"),qt)qt.hasOwnProperty(v)&&qt[v]instanceof pi&&qt[v].objectNumber>=0&&k("/"+v+" "+qt[v].objectNumber+" 0 R");be.publish("putShadingPatternDict"),k(">>")}})(),(function(v){if(Object.keys(qt).length>0){for(var I in k("/Pattern <<"),qt)qt.hasOwnProperty(I)&&qt[I]instanceof p.TilingPattern&&qt[I].objectNumber>=0&&qt[I].objectNumber>")}})(l.objectOid),(function(){if(Object.keys(Yt).length>0){var v;for(v in k("/ExtGState <<"),Yt)Yt.hasOwnProperty(v)&&Yt[v].objectNumber>=0&&k("/"+v+" "+Yt[v].objectNumber+" 0 R");be.publish("putGStateDict"),k(">>")}})(),(function(){for(var v in k("/XObject <<"),hn)hn.hasOwnProperty(v)&&hn[v].objectNumber>=0&&k("/"+v+" "+hn[v].objectNumber+" 0 R");be.publish("putXobjectDict"),k(">>")})(),k(">>"),k("endobj")},Sa=function(l){oe[l.fontName]=oe[l.fontName]||{},oe[l.fontName][l.fontStyle]=l.id},ka=function(l,v,I,T,G){var st={id:"F"+(Object.keys(se).length+1).toString(10),postScriptName:l,fontName:v,fontStyle:I,encoding:T,isStandardFont:G||!1,metadata:{}};return be.publish("addFont",{font:st,instance:this}),se[st.id]=st,Sa(st),st.id},Dn=p.__private__.pdfEscape=p.pdfEscape=function(l,v){return(function(I,T){var G,st,gt,Et,Ft,Kt,te,de,Ke;if(gt=(T=T||{}).sourceEncoding||"Unicode",Ft=T.outputEncoding,(T.autoencode||Ft)&&se[Bt].metadata&&se[Bt].metadata[gt]&&se[Bt].metadata[gt].encoding&&(Et=se[Bt].metadata[gt].encoding,!Ft&&se[Bt].encoding&&(Ft=se[Bt].encoding),!Ft&&Et.codePages&&(Ft=Et.codePages[0]),typeof Ft=="string"&&(Ft=Et[Ft]),Ft)){for(te=!1,Kt=[],G=0,st=I.length;G>8&&(te=!0);I=Kt.join("")}for(G=I.length;te===void 0&&G!==0;)I.charCodeAt(G-1)>>8&&(te=!0),G--;if(!te)return I;for(Kt=T.noBOM?[]:[254,255],G=0,st=I.length;G>8)>>8)throw new Error("Character at position "+G+" of string '"+I+"' exceeds 16bits. Cannot be encoded into UCS-2 BE");Kt.push(Ke),Kt.push(de-(Ke<<8))}return String.fromCharCode.apply(void 0,Kt)})(l,v).replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},ta=p.__private__.beginPage=function(l){_t[++le]=[],Vt[le]={objId:0,contentsObjId:0,userUnit:Number(u),artBox:null,bleedBox:null,cropBox:null,trimBox:null,mediaBox:{bottomLeftX:0,bottomLeftY:0,topRightX:Number(l[0]),topRightY:Number(l[1])}},Ia(le),zt(_t[j])},Pa=function(l,v){var I,T,G;switch(t=v||t,typeof l=="string"&&(I=S(l.toLowerCase()),Array.isArray(I)&&(T=I[0],G=I[1])),Array.isArray(l)&&(T=l[0]*ne,G=l[1]*ne),isNaN(T)&&(T=o[0],G=o[1]),(T>14400||G>14400)&&(Le.warn("A page in a PDF can not be wider or taller than 14400 userUnit. jsPDF limits the width/height to 14400"),T=Math.min(14400,T),G=Math.min(14400,G)),o=[T,G],t.substr(0,1)){case"l":G>T&&(o=[G,T]);break;case"p":T>G&&(o=[G,T])}ta(o),Bs(Jt),k(Pi),aa!==0&&k(aa+" J"),Or!==0&&k(Or+" j"),be.publish("addPage",{pageNumber:le})},ea=function(l){l>0&&l<=le&&(_t.splice(l,1),Vt.splice(l,1),le--,j>le&&(j=le),this.setPage(j))},Ia=function(l){l>0&&l<=le&&(j=l)},Ca=p.__private__.getNumberOfPages=p.getNumberOfPages=function(){return _t.length-1},Fa=function(l,v,I){var T,G=void 0;return I=I||{},l=l!==void 0?l:se[Bt].fontName,v=v!==void 0?v:se[Bt].fontStyle,T=l.toLowerCase(),oe[T]!==void 0&&oe[T][v]!==void 0?G=oe[T][v]:oe[l]!==void 0&&oe[l][v]!==void 0?G=oe[l][v]:I.disableWarning===!1&&Le.warn("Unable to look up font label for font '"+l+"', '"+v+"'. Refer to getFontList() for available fonts."),G||I.noFallback||(G=oe.times[v])==null&&(G=oe.times.normal),G},rr=p.__private__.putInfo=function(){var l=Te(),v=function(T){return T};for(var I in m!==null&&(v=sn.encryptor(l,0)),k("<<"),k("/Producer ("+Dn(v("jsPDF "+Tt.version))+")"),he)he.hasOwnProperty(I)&&he[I]&&k("/"+I.substr(0,1).toUpperCase()+I.substr(1)+" ("+Dn(v(he[I]))+")");k("/CreationDate ("+Dn(v(rt))+")"),k(">>"),k("endobj")},Ai=p.__private__.putCatalog=function(l){var v=(l=l||{}).rootDictionaryObjId||Cr;switch(Te(),k("<<"),k("/Type /Catalog"),k("/Pages "+v+" 0 R"),Wt||(Wt="fullwidth"),Wt){case"fullwidth":k("/OpenAction [3 0 R /FitH null]");break;case"fullheight":k("/OpenAction [3 0 R /FitV null]");break;case"fullpage":k("/OpenAction [3 0 R /Fit]");break;case"original":k("/OpenAction [3 0 R /XYZ null null 1]");break;default:var I=""+Wt;I.substr(I.length-1)==="%"&&(Wt=parseInt(Wt)/100),typeof Wt=="number"&&k("/OpenAction [3 0 R /XYZ null null "+N(Wt)+"]")}switch(ue||(ue="continuous"),ue){case"continuous":k("/PageLayout /OneColumn");break;case"single":k("/PageLayout /SinglePage");break;case"two":case"twoleft":k("/PageLayout /TwoColumnLeft");break;case"tworight":k("/PageLayout /TwoColumnRight")}Dt&&k("/PageMode /"+Dt),be.publish("putCatalog"),k(">>"),k("endobj")},Ss=p.__private__.putTrailer=function(){k("trailer"),k("<<"),k("/Size "+($+1)),k("/Root "+$+" 0 R"),k("/Info "+($-1)+" 0 R"),m!==null&&k("/Encrypt "+sn.oid+" 0 R"),k("/ID [ <"+ct+"> <"+ct+"> ]"),k(">>")},$e=p.__private__.putHeader=function(){k("%PDF-"+B),k("%ºß¬à")},Ea=p.__private__.putXRef=function(){var l="0000000000";k("xref"),k("0 "+($+1)),k("0000000000 65535 f ");for(var v=1;v<=$;v++)typeof Q[v]=="function"?k((l+Q[v]()).slice(-10)+" 00000 n "):Q[v]!==void 0?k((l+Q[v]).slice(-10)+" 00000 n "):k("0000000000 00000 n ")},ir=p.__private__.buildDocument=function(){var l;$=0,at=0,it=[],Q=[],dt=[],Cr=nn(),Wn=nn(),zt(it),be.publish("buildDocument"),$e(),nr(),(function(){be.publish("putAdditionalObjects");for(var I=0;I"),k("/O <"+sn.toHexString(sn.O)+">"),k("/P "+sn.P),k(">>"),k("endobj")),rr(),Ai();var v=at;return Ea(),Ss(),k("startxref"),k(""+v),k("%%EOF"),zt(_t[j]),it.join(` `)},Ni=p.__private__.getBlob=function(l){return new Blob([ae(l)],{type:"application/pdf"})},na=function(l){for(;l.firstChild;)l.removeChild(l.firstChild)},Pn=function(l){var v,I=l.document,T=I.documentElement,G=I.head,st=I.body;return G||(G=I.createElement("head"),T.appendChild(G)),st||(st=I.createElement("body"),T.appendChild(st)),na(G),na(st),(v=I.createElement("style")).appendChild(I.createTextNode("html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;}")),G.appendChild(v),{document:I,body:st}},Li=p.output=p.__private__.output=(Rn=function(l,v){switch(typeof(v=v||{})=="string"?v={filename:v}:v.filename=v.filename||"generated.pdf",l){case void 0:return ir();case"save":p.save(v.filename);break;case"arraybuffer":return ae(ir());case"blob":return Ni(ir());case"bloburi":case"bloburl":if($t.URL!==void 0&&typeof $t.URL.createObjectURL=="function")return $t.URL&&$t.URL.createObjectURL(Ni(ir()))||void 0;Le.warn("bloburl is not supported by your system, because URL.createObjectURL is not supported by your browser.");break;case"datauristring":case"dataurlstring":var I="",T=ir();try{I=su(T)}catch(cn){I=su(unescape(encodeURIComponent(T)))}return"data:application/pdf;filename="+encodeURIComponent(v.filename)+";base64,"+I;case"pdfobjectnewwindow":if(Object.prototype.toString.call($t)==="[object Window]"){var G="https://cdnjs.cloudflare.com/ajax/libs/pdfobject/2.1.1/pdfobject.min.js",st=!v.pdfObjectUrl;st||(G=v.pdfObjectUrl);var gt=$t.open();if(gt!==null){var Et=Pn(gt),Ft=Et.document.createElement("script"),Kt=this;Ft.src=G,st&&(Ft.integrity="sha512-4ze/a9/4jqu+tX9dfOqJYSvyYd5M6qum/3HpCLr+/Jqf0whc37VUbkpNGHR7/8pSnCFw47T1fmIpwBV7UySh3g==",Ft.crossOrigin="anonymous"),Ft.onload=function(){gt.PDFObject.embed(Kt.output("dataurlstring"),v)},Et.body.appendChild(Ft)}return gt}throw new Error("The option pdfobjectnewwindow just works in a browser-environment.");case"pdfjsnewwindow":if(Object.prototype.toString.call($t)==="[object Window]"){var te=v.pdfJsUrl||"examples/PDF.js/web/viewer.html",de=$t.open();if(de!==null){var Ke=Pn(de),Ae=Ke.document.createElement("iframe"),_e=te.indexOf("?")===-1?"?":"&";Kt=this,Ae.id="pdfViewer",Ae.width="500px",Ae.height="400px",Ae.src=te+_e+"file=&downloadName="+encodeURIComponent(v.filename),Ae.onload=function(){de.document.title=v.filename,Ae.contentWindow.PDFViewerApplication.open(Kt.output("bloburl"))},Ke.body.appendChild(Ae)}return de}throw new Error("The option pdfjsnewwindow just works in a browser-environment.");case"dataurlnewwindow":if(Object.prototype.toString.call($t)!=="[object Window]")throw new Error("The option dataurlnewwindow just works in a browser-environment.");var Fe=$t.open();if(Fe!==null){var Me=Pn(Fe),Re=Me.document.createElement("iframe");Re.src=this.output("datauristring",v),Me.body.appendChild(Re),Fe.document.title=v.filename}if(Fe||typeof safari=="undefined")return Fe;break;case"datauri":case"dataurl":return $t.document.location.href=this.output("datauristring",v);default:return null}},Rn.foo=function(){try{return Rn.apply(this,arguments)}catch(I){var l=I.stack||"";~l.indexOf(" at ")&&(l=l.split(" at ")[1]);var v="Error in function "+l.split(` `)[0].split("<")[0]+": "+I.message;if(!$t.console)throw new Error(v);$t.console.error(v,I),$t.alert&&alert(v)}},Rn.foo.bar=Rn,Rn.foo),vr=function(l){return Array.isArray(Jr)===!0&&Jr.indexOf(l)>-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=vr("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 sn=null;xt(),nt();var Oa=p.__private__.getPageInfo=p.getPageInfo=function(l){if(isNaN(l)||l%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfo");return{objId:Vt[l].objId,pageNumber:l,pageContext:Vt[l]}},ks=p.__private__.getPageInfoByObjId=function(l){if(isNaN(l)||l%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfoByObjId");for(var v in Vt)if(Vt[v].objId===l)break;return Oa(v)},Ps=p.__private__.getCurrentPageInfo=p.getCurrentPageInfo=function(){return{objId:Vt[j].objId,pageNumber:j,pageContext:Vt[j]}};p.addPage=function(){return Pa.apply(this,arguments),this},p.setPage=function(){return Ia.apply(this,arguments),zt.call(this,_t[j]),this},p.insertPage=function(l){return this.addPage(),this.movePage(j,l),this},p.movePage=function(l,v){var I,T;if(l>v){I=_t[l],T=Vt[l];for(var G=l;G>v;G--)_t[G]=_t[G-1],Vt[G]=Vt[G-1];_t[v]=I,Vt[v]=T,this.setPage(v)}else if(l0&&(typeof l=="string"?l=_e.splitTextToSize(l,te):Object.prototype.toString.call(l)==="[object Array]"&&(l=l.reduce(function(Pe,Ie){return Pe.concat(_e.splitTextToSize(Ie,te))},[]))),st={text:l,x:v,y:I,options:T,mutex:{pdfEscape:Dn,activeFontKey:Bt,fonts:se,activeFontSize:bt}},be.publish("preProcessText",st),l=st.text,Et=(T=st.options).angle,Ae instanceof Gt==0&&Et&&typeof Et=="number"){Et*=Math.PI/180,T.rotationDirection===0&&(Et=-Et),D===J&&(Et=-Et);var ha=Math.cos(Et),or=Math.sin(Et);Ae=new Gt(ha,or,-or,ha,0,0)}else Et&&Et instanceof Gt&&(Ae=Et);D!==J||Ae||(Ae=mr),(Kt=T.charSpace||Ii)!==void 0&&(Re+=tt(q(Kt))+` Tc `,this.setCharSpace(this.getCharSpace()||0)),(Ke=T.horizontalScale)!==void 0&&(Re+=tt(100*Ke)+` Tz `),T.lang;var wn=-1,Ua=T.renderingMode!==void 0?T.renderingMode:T.stroke,ji=_e.internal.getCurrentPageInfo().pageContext;switch(Ua){case 0:case!1:case"fill":wn=0;break;case 1:case!0:case"stroke":wn=1;break;case 2:case"fillThenStroke":wn=2;break;case 3:case"invisible":wn=3;break;case 4:case"fillAndAddForClipping":wn=4;break;case 5:case"strokeAndAddPathForClipping":wn=5;break;case 6:case"fillThenStrokeAndAddToPathForClipping":wn=6;break;case 7:case"addToPathForClipping":wn=7}var za=ji.usedRenderingMode!==void 0?ji.usedRenderingMode:-1;wn!==-1?Re+=wn+` Tr `:za!==-1&&(Re+=`0 Tr `),wn!==-1&&(ji.usedRenderingMode=wn),Ft=T.align||"left";var qn,si=bt*cn,ca=_e.internal.pageSize.getWidth(),Bi=se[Bt];Kt=T.charSpace||Ii,te=T.maxWidth||0,de=Object.assign({autoencode:!0,noBOM:!0},T.flags);var oi=[],fa=function(Pe){return _e.getStringUnitWidth(Pe,{font:Bi,charSpace:Kt,fontSize:bt,doKerning:!1})*bt/_r};if(Object.prototype.toString.call(l)==="[object Array]"){var yn;gt=ei(l),Ft!=="left"&&(qn=gt.map(fa));var Nn,Mi=0;if(Ft==="right"){v-=qn[0],l=[],fn=gt.length;for(var Br=0;Br0?(te-qn[Xe])/da:0;Xe":")"),hi=parseFloat(gt[dn][1]),ci=parseFloat(gt[dn][2]);break;case 0:Rr=(Me?"<":"(")+gt[dn]+(Me?">":")"),hi=br(v),ci=wr(I)}oi!==void 0&&oi[dn]!==void 0&&(Tr=oi[dn]+` Tw `),dn===0?l.push(Tr+Di(hi,ci,Ae)+Rr):Ar===0?l.push(Tr+Rr):Ar===1&&l.push(Tr+Di(hi,ci,Ae)+Rr)}l=Ar===0?l.join(` Tj T* `):l.join(` Tj `),l+=` Tj `;var ur=`BT /`;return ur+=Bt+" "+bt+` Tf `,ur+=tt(bt*cn)+` TL `,ur+=sr+` `,ur+=Re,ur+=l,k(ur+="ET"),P[Bt]=!0,_e};var Is=p.__private__.clip=p.clip=function(l){return k(l==="evenodd"?"W*":"W"),this};p.clipEvenOdd=function(){return Is("evenodd")},p.__private__.discardPath=p.discardPath=function(){return k("n"),this};var ar=p.__private__.isValidStyle=function(l){var v=!1;return[void 0,null,"S","D","F","DF","FD","f","f*","B","B*","n"].indexOf(l)!==-1&&(v=!0),v};p.__private__.setDefaultPathOperation=p.setDefaultPathOperation=function(l){return ar(l)&&(d=l),this};var ja=p.__private__.getStyle=p.getStyle=function(l){var v=d;switch(l){case"D":case"S":v="S";break;case"F":v="f";break;case"FD":case"DF":v="B";break;case"f":case"f*":case"B":case"B*":v=l}return v},Si=p.close=function(){return k("h"),this};p.stroke=function(){return k("S"),this},p.fill=function(l){return ki("f",l),this},p.fillEvenOdd=function(l){return ki("f*",l),this},p.fillStroke=function(l){return ki("B",l),this},p.fillStrokeEvenOdd=function(l){return ki("B*",l),this};var ki=function(l,v){Se(v)==="object"?Fs(v,l):k(l)},ra=function(l){l===null||D===J&&l===void 0||(l=ja(l),k(l))};function Cs(l,v,I,T,G){var st=new Yi(v||this.boundingBox,I||this.xStep,T||this.yStep,this.gState,G||this.matrix);st.stream=this.stream;var gt=l+"$$"+this.cloneIndex+++"$$";return Mn(gt,st),st}var Fs=function(l,v){var I=ke[l.key],T=qt[I];if(T instanceof pi)k("q"),k(Es(v)),T.gState&&p.setGState(T.gState),k(l.matrix.toString()+" cm"),k("/"+I+" sh"),k("Q");else if(T instanceof Yi){var G=new Gt(1,0,0,-1,0,ti());l.matrix&&(G=G.multiply(l.matrix||mr),I=Cs.call(T,l.key,l.boundingBox,l.xStep,l.yStep,G).id),k("q"),k("/Pattern cs"),k("/"+I+" scn"),T.gState&&p.setGState(T.gState),k(v),k("Q")}},Es=function(l){switch(l){case"f":case"F":case"n":return"W n";case"f*":return"W* n";case"B":case"S":return"W S";case"B*":return"W* S"}},Fr=p.moveTo=function(l,v){return k(tt(q(l))+" "+tt(U(v))+" m"),this},Ba=p.lineTo=function(l,v){return k(tt(q(l))+" "+tt(U(v))+" l"),this},Er=p.curveTo=function(l,v,I,T,G,st){return k([tt(q(l)),tt(U(v)),tt(q(I)),tt(U(T)),tt(q(G)),tt(U(st)),"c"].join(" ")),this};p.__private__.line=p.line=function(l,v,I,T,G){if(isNaN(l)||isNaN(v)||isNaN(I)||isNaN(T)||!ar(G))throw new Error("Invalid arguments passed to jsPDF.line");return D===Y?this.lines([[I-l,T-v]],l,v,[1,1],G||"S"):this.lines([[I-l,T-v]],l,v,[1,1]).stroke()},p.__private__.lines=p.lines=function(l,v,I,T,G,st){var gt,Et,Ft,Kt,te,de,Ke,Ae,_e,Fe,Me,Re;if(typeof l=="number"&&(Re=I,I=v,v=l,l=Re),T=T||[1,1],st=st||!1,isNaN(v)||isNaN(I)||!Array.isArray(l)||!Array.isArray(T)||!ar(G)||typeof st!="boolean")throw new Error("Invalid arguments passed to jsPDF.lines");for(Fr(v,I),gt=T[0],Et=T[1],Kt=l.length,Fe=v,Me=I,Ft=0;Ft>8&255,n>>16&255,n>>24&255)},Vi.prototype.toHexString=function(n){return n.split("").map(function(e){return("0"+(255&e.charCodeAt(0)).toString(16)).slice(-2)}).join("")},Vi.prototype.hexToBytes=function(n){for(var e=[],t=0;t>8&255,n>>16&255,255&e,e>>8&255)).substr(0,10);return function(i){return Oo(t,i)}},xs.prototype.equals=function(n){var e,t="id,objectNumber,equals";if(!n||Se(n)!==Se(this))return!1;var i=0;for(e in this)if(!(t.indexOf(e)>=0)){if(this.hasOwnProperty(e)&&!n.hasOwnProperty(e)||this[e]!==n[e])return!1;i++}for(e in n)n.hasOwnProperty(e)&&t.indexOf(e)<0&&i--;return i===0},Tt.API={events:[]},Tt.version="4.2.1";var Ue=Tt.API,Ro=1,wi=function(n){return n.replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},Hi=function(n){return n.replace(/\\\\/g,"\\").replace(/\\\(/g,"(").replace(/\\\)/g,")")},vi=function(n){return n.toString().replace(/#/g,"#23").replace(/[\s\n\r()<>[\]{}\/%]/g,function(e){var t=e.charCodeAt(0).toString(16).toUpperCase();return"#"+(t.length===1?"0"+t:t)})},Xt=function(n){return n.toFixed(2)},Vr=function(n){return n.toFixed(5)};Ue.__acroform__={};var kn=function(n,e){n.prototype=Object.create(e.prototype),n.prototype.constructor=n},hu=function(n){return n*Ro},cr=function(n){var e=new nh,t=Ct.internal.getHeight(n)||0,i=Ct.internal.getWidth(n)||0;return e.BBox=[0,0,Number(Xt(i)),Number(Xt(t))],e},Kf=Ue.__acroform__.setBit=function(n,e){if(n=n||0,e=e||0,isNaN(n)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBit");return n|1<0;){e="",s--;var d,m,A=fs("3",n,s).height,P=n.multiline?f-s:(f-A)/2,p=P+=2,B=0,O=0,M=0;if(s<=0){e=`(...) Tj `,e+="% Width of Text: "+fs(e,n,s=12).width+", FieldWidth:"+u+` `;break}for(var S="",Y=0,J=0;Jf)continue t;S+=o[J][M],D=!0,O=J,J--}else{S=(S+=o[J][M]+" ").substr(S.length-1)==" "?S.substr(0,S.length-1):S;var lt=parseInt(J),yt=c(lt,S,s),mt=J>=o.length-1;if(yt&&!mt){S+=" ",M=0;continue}if(yt||mt){if(mt)O=lt;else if(n.multiline&&(A+2)*(Y+2)+2>f)continue t}else{if(!n.multiline||(A+2)*(Y+2)+2>f)continue t;O=lt}}for(var tt="",z=B;z<=O;z++){var et=o[z];if(n.multiline){if(z===O){tt+=et[M]+" ",M=(M+1)%et.length;continue}if(z===B){tt+=et[et.length-1]+" ";continue}}tt+=et[0]+" "}switch(tt=tt.substr(tt.length-1)==" "?tt.substr(0,tt.length-1):tt,m=fs(tt,n,s).width,n.textAlign){case"right":d=u-m-2;break;case"center":d=(u-m)/2;break;default:d=2}e+=Xt(d)+" "+Xt(p)+` Td `,e+="("+wi(tt)+`) Tj `,e+=-Xt(d)+` 0 Td `,p=-(s+2),m=0,B=D?O:O+1,Y++,S=""}break}return i.text=e,i.fontSize=s,i},fs=function(n,e,t){var i=e.scope.internal.getFont(e.fontName,e.fontStyle),o=e.scope.getStringUnitWidth(n,{font:i,fontSize:parseFloat(t),charSpace:0})*parseFloat(t);return{height:e.scope.getStringUnitWidth("3",{font:i,fontSize:parseFloat(t),charSpace:0})*parseFloat(t)*1.5,width:o}},e1={fields:[],xForms:[],acroFormDictionaryRoot:null,printedOut:!1,internal:null,isInitialized:!1},n1=function(n,e){var t={type:"reference",object:n};e.internal.getPageInfo(n.page).pageContext.annotations.find(function(i){return i.type===t.type&&i.object===t.object})===void 0&&e.internal.getPageInfo(n.page).pageContext.annotations.push(t)},r1=function(n,e){if(e.scope=n,n.internal!==void 0&&(n.internal.acroformPlugin===void 0||n.internal.acroformPlugin.isInitialized===!1)){if(Zn.FieldNum=0,n.internal.acroformPlugin=JSON.parse(JSON.stringify(e1)),n.internal.acroformPlugin.acroFormDictionaryRoot)throw new Error("Exception while creating AcroformDictionary");Ro=n.internal.scaleFactor,n.internal.acroformPlugin.acroFormDictionaryRoot=new rh,n.internal.acroformPlugin.acroFormDictionaryRoot.scope=n,n.internal.acroformPlugin.acroFormDictionaryRoot._eventID=n.internal.events.subscribe("postPutResources",function(){(function(t){t.internal.events.unsubscribe(t.internal.acroformPlugin.acroFormDictionaryRoot._eventID),delete t.internal.acroformPlugin.acroFormDictionaryRoot._eventID,t.internal.acroformPlugin.printedOut=!0})(n)}),n.internal.events.subscribe("buildDocument",function(){(function(t){t.internal.acroformPlugin.acroFormDictionaryRoot.objId=void 0;var i=t.internal.acroformPlugin.acroFormDictionaryRoot.Fields;for(var o in i)if(i.hasOwnProperty(o)){var s=i[o];s.objId=void 0,s.hasAnnotation&&n1(s,t)}})(n)}),n.internal.events.subscribe("putCatalog",function(){(function(t){if(t.internal.acroformPlugin.acroFormDictionaryRoot===void 0)throw new Error("putCatalogCallback: Root missing.");t.internal.write("/AcroForm "+t.internal.acroformPlugin.acroFormDictionaryRoot.objId+" 0 R")})(n)}),n.internal.events.subscribe("postPutPages",function(t){(function(i,o){var s=!i;for(var f in i||(o.internal.newObjectDeferredBegin(o.internal.acroformPlugin.acroFormDictionaryRoot.objId,!0),o.internal.acroformPlugin.acroFormDictionaryRoot.putStream()),i=i||o.internal.acroformPlugin.acroFormDictionaryRoot.Kids)if(i.hasOwnProperty(f)){var u=i[f],c=[],d=u.Rect;if(u.Rect&&(u.Rect=Qf(u.Rect,o)),o.internal.newObjectDeferredBegin(u.objId,!0),u.DA=Ct.createDefaultAppearanceStream(u),Se(u)==="object"&&typeof u.getKeyValueListForStream=="function"&&(c=u.getKeyValueListForStream()),u.Rect=d,u.hasAppearanceStream&&!u.appearanceStreamContent){var m=t1(u);c.push({key:"AP",value:"<>"}),o.internal.acroformPlugin.xForms.push(m)}if(u.appearanceStreamContent){var A="";for(var P in u.appearanceStreamContent)if(u.appearanceStreamContent.hasOwnProperty(P)){var p=u.appearanceStreamContent[P];if(A+="/"+P+" ",A+="<<",Object.keys(p).length>=1||Array.isArray(p)){for(var f in p)if(p.hasOwnProperty(f)){var B=p[f];typeof B=="function"&&(B=B.call(o,u)),A+="/"+f+" "+B+" ",o.internal.acroformPlugin.xForms.indexOf(B)>=0||o.internal.acroformPlugin.xForms.push(B)}}else typeof(B=p)=="function"&&(B=B.call(o,u)),A+="/"+f+" "+B,o.internal.acroformPlugin.xForms.indexOf(B)>=0||o.internal.acroformPlugin.xForms.push(B);A+=">>"}c.push({key:"AP",value:`<< `+A+">>"})}o.internal.putStream({additionalKeyValues:c,objectId:u.objId}),o.internal.out("endobj")}s&&(function(O,M){for(var S in O)if(O.hasOwnProperty(S)){var Y=S,J=O[S];M.internal.newObjectDeferredBegin(J.objId,!0),Se(J)==="object"&&typeof J.putStream=="function"&&J.putStream(),delete O[Y]}})(o.internal.acroformPlugin.xForms,o)})(t,n)}),n.internal.acroformPlugin.isInitialized=!0}},eh=Ue.__acroform__.arrayToPdfArray=function(n,e,t){var i=function(f){return f};if(Array.isArray(n)){for(var o="[",s=0;s0?e:void 0}}),Object.defineProperty(this,"Fields",{enumerable:!1,configurable:!1,get:function(){return e}}),Object.defineProperty(this,"DA",{enumerable:!1,configurable:!1,get:function(){if(n){var t=function(i){return i};return this.scope&&(t=this.scope.internal.getEncryptor(this.objId)),"("+wi(t(n))+")"}},set:function(t){n=t}})};kn(rh,fr);var Zn=function n(){fr.call(this);var e=4;Object.defineProperty(this,"F",{enumerable:!1,configurable:!1,get:function(){return e},set:function(S){if(isNaN(S))throw new Error('Invalid value "'+S+'" for attribute F supplied.');e=S}}),Object.defineProperty(this,"showWhenPrinted",{enumerable:!0,configurable:!0,get:function(){return!!Ge(e,3)},set:function(S){S?this.F=Ye(e,3):this.F=Je(e,3)}});var t=0;Object.defineProperty(this,"Ff",{enumerable:!1,configurable:!1,get:function(){return t},set:function(S){if(isNaN(S))throw new Error('Invalid value "'+S+'" for attribute Ff supplied.');t=S}});var i=[];Object.defineProperty(this,"Rect",{enumerable:!1,configurable:!1,get:function(){if(i.length!==0)return i},set:function(S){i=S!==void 0?S:[]}}),Object.defineProperty(this,"x",{enumerable:!0,configurable:!0,get:function(){return!i||isNaN(i[0])?0:i[0]},set:function(S){i[0]=S}}),Object.defineProperty(this,"y",{enumerable:!0,configurable:!0,get:function(){return!i||isNaN(i[1])?0:i[1]},set:function(S){i[1]=S}}),Object.defineProperty(this,"width",{enumerable:!0,configurable:!0,get:function(){return!i||isNaN(i[2])?0:i[2]},set:function(S){i[2]=S}}),Object.defineProperty(this,"height",{enumerable:!0,configurable:!0,get:function(){return!i||isNaN(i[3])?0:i[3]},set:function(S){i[3]=S}});var o="";Object.defineProperty(this,"FT",{enumerable:!0,configurable:!1,get:function(){return o},set:function(S){switch(S){case"/Btn":case"/Tx":case"/Ch":case"/Sig":o=S;break;default:throw new Error('Invalid value "'+S+'" for attribute FT supplied.')}}});var s=null;Object.defineProperty(this,"T",{enumerable:!0,configurable:!1,get:function(){if(!s||s.length<1){if(this instanceof _s)return;s="FieldObject"+n.FieldNum++}var S=function(Y){return Y};return this.scope&&(S=this.scope.internal.getEncryptor(this.objId)),"("+wi(S(s))+")"},set:function(S){s=S.toString()}}),Object.defineProperty(this,"fieldName",{configurable:!0,enumerable:!0,get:function(){return s},set:function(S){s=S}});var f="helvetica";Object.defineProperty(this,"fontName",{enumerable:!0,configurable:!0,get:function(){return f},set:function(S){f=S}});var u="normal";Object.defineProperty(this,"fontStyle",{enumerable:!0,configurable:!0,get:function(){return u},set:function(S){u=S}});var c=0;Object.defineProperty(this,"fontSize",{enumerable:!0,configurable:!0,get:function(){return c},set:function(S){c=S}});var d=void 0;Object.defineProperty(this,"maxFontSize",{enumerable:!0,configurable:!0,get:function(){return d===void 0?50/Ro:d},set:function(S){d=S}});var m="black";Object.defineProperty(this,"color",{enumerable:!0,configurable:!0,get:function(){return m},set:function(S){m=S}});var A="/F1 0 Tf 0 g";Object.defineProperty(this,"DA",{enumerable:!0,configurable:!1,get:function(){if(!(!A||this instanceof _s||this instanceof gi))return Ao(A,this.objId,this.scope)},set:function(S){S=S.toString(),A=S}});var P=null;Object.defineProperty(this,"DV",{enumerable:!1,configurable:!1,get:function(){if(P)return this instanceof rn==0?Ao(P,this.objId,this.scope):P},set:function(S){S=S.toString(),P=this instanceof rn==0?S.substr(0,1)==="("?Hi(S.substr(1,S.length-2)):Hi(S):S}}),Object.defineProperty(this,"defaultValue",{enumerable:!0,configurable:!0,get:function(){return this instanceof rn==1?Hi(P.substr(1,P.length-1)):P},set:function(S){S=S.toString(),P=this instanceof rn==1?"/"+vi(S):S}});var p=null;Object.defineProperty(this,"_V",{enumerable:!1,configurable:!1,get:function(){if(p)return p},set:function(S){this.V=S}}),Object.defineProperty(this,"V",{enumerable:!1,configurable:!1,get:function(){if(p)return this instanceof rn==0?Ao(p,this.objId,this.scope):p},set:function(S){S=S.toString(),p=this instanceof rn==0?S.substr(0,1)==="("?Hi(S.substr(1,S.length-2)):Hi(S):S}}),Object.defineProperty(this,"value",{enumerable:!0,configurable:!0,get:function(){return this instanceof rn==1?Hi(p.substr(1,p.length-1)):p},set:function(S){S=S.toString(),p=this instanceof rn==1?"/"+vi(S):S}}),Object.defineProperty(this,"hasAnnotation",{enumerable:!0,configurable:!0,get:function(){return this.Rect}}),Object.defineProperty(this,"Type",{enumerable:!0,configurable:!1,get:function(){return this.hasAnnotation?"/Annot":null}}),Object.defineProperty(this,"Subtype",{enumerable:!0,configurable:!1,get:function(){return this.hasAnnotation?"/Widget":null}});var B,O=!1;Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return O},set:function(S){S=!!S,O=S}}),Object.defineProperty(this,"page",{enumerable:!0,configurable:!0,get:function(){if(B)return B},set:function(S){B=S}}),Object.defineProperty(this,"readOnly",{enumerable:!0,configurable:!0,get:function(){return!!Ge(this.Ff,1)},set:function(S){S?this.Ff=Ye(this.Ff,1):this.Ff=Je(this.Ff,1)}}),Object.defineProperty(this,"required",{enumerable:!0,configurable:!0,get:function(){return!!Ge(this.Ff,2)},set:function(S){S?this.Ff=Ye(this.Ff,2):this.Ff=Je(this.Ff,2)}}),Object.defineProperty(this,"noExport",{enumerable:!0,configurable:!0,get:function(){return!!Ge(this.Ff,3)},set:function(S){S?this.Ff=Ye(this.Ff,3):this.Ff=Je(this.Ff,3)}});var M=null;Object.defineProperty(this,"Q",{enumerable:!0,configurable:!1,get:function(){if(M!==null)return M},set:function(S){if([0,1,2].indexOf(S)===-1)throw new Error('Invalid value "'+S+'" for attribute Q supplied.');M=S}}),Object.defineProperty(this,"textAlign",{get:function(){var S;switch(M){case 0:default:S="left";break;case 1:S="center";break;case 2:S="right"}return S},configurable:!0,enumerable:!0,set:function(S){switch(S){case"right":case 2:M=2;break;case"center":case 1:M=1;break;default:M=0}}})};kn(Zn,fr);var Ji=function(){Zn.call(this),this.FT="/Ch",this.V="()",this.fontName="zapfdingbats";var n=0;Object.defineProperty(this,"TI",{enumerable:!0,configurable:!1,get:function(){return n},set:function(t){n=t}}),Object.defineProperty(this,"topIndex",{enumerable:!0,configurable:!0,get:function(){return n},set:function(t){n=t}});var e=[];Object.defineProperty(this,"Opt",{enumerable:!0,configurable:!1,get:function(){return eh(e,this.objId,this.scope)},set:function(t){var i,o;o=[],typeof(i=t)=="string"&&(o=(function(s,f,u){u||(u=1);for(var c,d=[];c=f.exec(s);)d.push(c[u]);return d})(i,/\((.*?)\)/g)),e=o}}),this.getOptions=function(){return e},this.setOptions=function(t){e=t,this.sort&&e.sort()},this.addOption=function(t){t=(t=t||"").toString(),e.push(t),this.sort&&e.sort()},this.removeOption=function(t,i){for(i=i||!1,t=(t=t||"").toString();e.indexOf(t)!==-1&&(e.splice(e.indexOf(t),1),i!==!1););},Object.defineProperty(this,"combo",{enumerable:!0,configurable:!0,get:function(){return!!Ge(this.Ff,18)},set:function(t){t?this.Ff=Ye(this.Ff,18):this.Ff=Je(this.Ff,18)}}),Object.defineProperty(this,"edit",{enumerable:!0,configurable:!0,get:function(){return!!Ge(this.Ff,19)},set:function(t){this.combo===!0&&(t?this.Ff=Ye(this.Ff,19):this.Ff=Je(this.Ff,19))}}),Object.defineProperty(this,"sort",{enumerable:!0,configurable:!0,get:function(){return!!Ge(this.Ff,20)},set:function(t){t?(this.Ff=Ye(this.Ff,20),e.sort()):this.Ff=Je(this.Ff,20)}}),Object.defineProperty(this,"multiSelect",{enumerable:!0,configurable:!0,get:function(){return!!Ge(this.Ff,22)},set:function(t){t?this.Ff=Ye(this.Ff,22):this.Ff=Je(this.Ff,22)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return!!Ge(this.Ff,23)},set:function(t){t?this.Ff=Ye(this.Ff,23):this.Ff=Je(this.Ff,23)}}),Object.defineProperty(this,"commitOnSelChange",{enumerable:!0,configurable:!0,get:function(){return!!Ge(this.Ff,27)},set:function(t){t?this.Ff=Ye(this.Ff,27):this.Ff=Je(this.Ff,27)}}),this.hasAppearanceStream=!1};kn(Ji,Zn);var $i=function(){Ji.call(this),this.fontName="helvetica",this.combo=!1};kn($i,Ji);var Ki=function(){$i.call(this),this.combo=!0};kn(Ki,$i);var ms=function(){Ki.call(this),this.edit=!0};kn(ms,Ki);var rn=function(){Zn.call(this),this.FT="/Btn",Object.defineProperty(this,"noToggleToOff",{enumerable:!0,configurable:!0,get:function(){return!!Ge(this.Ff,15)},set:function(t){t?this.Ff=Ye(this.Ff,15):this.Ff=Je(this.Ff,15)}}),Object.defineProperty(this,"radio",{enumerable:!0,configurable:!0,get:function(){return!!Ge(this.Ff,16)},set:function(t){t?this.Ff=Ye(this.Ff,16):this.Ff=Je(this.Ff,16)}}),Object.defineProperty(this,"pushButton",{enumerable:!0,configurable:!0,get:function(){return!!Ge(this.Ff,17)},set:function(t){t?this.Ff=Ye(this.Ff,17):this.Ff=Je(this.Ff,17)}}),Object.defineProperty(this,"radioIsUnison",{enumerable:!0,configurable:!0,get:function(){return!!Ge(this.Ff,26)},set:function(t){t?this.Ff=Ye(this.Ff,26):this.Ff=Je(this.Ff,26)}});var n,e={};Object.defineProperty(this,"MK",{enumerable:!1,configurable:!1,get:function(){var t=function(s){return s};if(this.scope&&(t=this.scope.internal.getEncryptor(this.objId)),Object.keys(e).length!==0){var i,o=[];for(i in o.push("<<"),e)o.push("/"+i+" ("+wi(t(e[i]))+")");return o.push(">>"),o.join(` `)}},set:function(t){Se(t)==="object"&&(e=t)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return e.CA||""},set:function(t){typeof t=="string"&&(e.CA=t)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return n},set:function(t){var i=t==null?"":t.toString();i.substr(0,1)==="/"&&(i=i.substr(1)),n="/"+vi(i)}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return n.substr(1,n.length-1)},set:function(t){n="/"+vi(t)}})};kn(rn,Zn);var vs=function(){rn.call(this),this.pushButton=!0};kn(vs,rn);var Xi=function(){rn.call(this),this.radio=!0,this.pushButton=!1;var n=[];Object.defineProperty(this,"Kids",{enumerable:!0,configurable:!1,get:function(){return n},set:function(e){n=e!==void 0?e:[]}})};kn(Xi,rn);var _s=function(){var n,e;Zn.call(this),Object.defineProperty(this,"Parent",{enumerable:!1,configurable:!1,get:function(){return n},set:function(o){n=o}}),Object.defineProperty(this,"optionName",{enumerable:!1,configurable:!0,get:function(){return e},set:function(o){e=o}});var t,i={};Object.defineProperty(this,"MK",{enumerable:!1,configurable:!1,get:function(){var o=function(u){return u};this.scope&&(o=this.scope.internal.getEncryptor(this.objId));var s,f=[];for(s in f.push("<<"),i)f.push("/"+s+" ("+wi(o(i[s]))+")");return f.push(">>"),f.join(` `)},set:function(o){Se(o)==="object"&&(i=o)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return i.CA||""},set:function(o){typeof o=="string"&&(i.CA=o)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return t},set:function(o){var s=o==null?"":o.toString();s.substr(0,1)==="/"&&(s=s.substr(1)),t="/"+vi(s)}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return t.substr(1,t.length-1)},set:function(o){var s=o==null?"":o.toString();s.substr(0,1)==="/"&&(s=s.substr(1)),t="/"+vi(s)}}),this.caption="l",this.appearanceState="Off",this._AppearanceType=Ct.RadioButton.Circle,this.appearanceStreamContent=this._AppearanceType.createAppearanceStream(this.optionName)};kn(_s,Zn),Xi.prototype.setAppearance=function(n){if(!("createAppearanceStream"in n)||!("getCA"in n))throw new Error("Couldn't assign Appearance to RadioButton. Appearance was Invalid!");for(var e in this.Kids)if(this.Kids.hasOwnProperty(e)){var t=this.Kids[e];t.appearanceStreamContent=n.createAppearanceStream(t.optionName),t.caption=n.getCA()}},Xi.prototype.createOption=function(n){var e=new _s;return e.Parent=this,e.optionName=n,this.Kids.push(e),i1.call(this.scope,e),e};var bs=function(){rn.call(this),this.fontName="zapfdingbats",this.caption="3",this.appearanceState="On",this.value="On",this.textAlign="center",this.appearanceStreamContent=Ct.CheckBox.createAppearanceStream()};kn(bs,rn);var gi=function(){Zn.call(this),this.FT="/Tx",Object.defineProperty(this,"multiline",{enumerable:!0,configurable:!0,get:function(){return!!Ge(this.Ff,13)},set:function(e){e?this.Ff=Ye(this.Ff,13):this.Ff=Je(this.Ff,13)}}),Object.defineProperty(this,"fileSelect",{enumerable:!0,configurable:!0,get:function(){return!!Ge(this.Ff,21)},set:function(e){e?this.Ff=Ye(this.Ff,21):this.Ff=Je(this.Ff,21)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return!!Ge(this.Ff,23)},set:function(e){e?this.Ff=Ye(this.Ff,23):this.Ff=Je(this.Ff,23)}}),Object.defineProperty(this,"doNotScroll",{enumerable:!0,configurable:!0,get:function(){return!!Ge(this.Ff,24)},set:function(e){e?this.Ff=Ye(this.Ff,24):this.Ff=Je(this.Ff,24)}}),Object.defineProperty(this,"comb",{enumerable:!0,configurable:!0,get:function(){return!!Ge(this.Ff,25)},set:function(e){e?this.Ff=Ye(this.Ff,25):this.Ff=Je(this.Ff,25)}}),Object.defineProperty(this,"richText",{enumerable:!0,configurable:!0,get:function(){return!!Ge(this.Ff,26)},set:function(e){e?this.Ff=Ye(this.Ff,26):this.Ff=Je(this.Ff,26)}});var n=null;Object.defineProperty(this,"MaxLen",{enumerable:!0,configurable:!1,get:function(){return n},set:function(e){n=e}}),Object.defineProperty(this,"maxLength",{enumerable:!0,configurable:!0,get:function(){return n},set:function(e){Number.isInteger(e)&&(n=e)}}),Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return this.V||this.DV}})};kn(gi,Zn);var ws=function(){gi.call(this),Object.defineProperty(this,"password",{enumerable:!0,configurable:!0,get:function(){return!!Ge(this.Ff,14)},set:function(n){n?this.Ff=Ye(this.Ff,14):this.Ff=Je(this.Ff,14)}}),this.password=!0};kn(ws,gi);var Ct={CheckBox:{createAppearanceStream:function(){return{N:{On:Ct.CheckBox.YesNormal},D:{On:Ct.CheckBox.YesPushDown,Off:Ct.CheckBox.OffPushDown}}},YesPushDown:function(n){var e=cr(n);e.scope=n.scope;var t=[],i=n.scope.internal.getFont(n.fontName,n.fontStyle).id,o=n.scope.__private__.encodeColorString(n.color),s=jo(n,n.caption);return t.push("0.749023 g"),t.push("0 0 "+Xt(Ct.internal.getWidth(n))+" "+Xt(Ct.internal.getHeight(n))+" re"),t.push("f"),t.push("BMC"),t.push("q"),t.push("0 0 1 rg"),t.push("/"+i+" "+Xt(s.fontSize)+" Tf "+o),t.push("BT"),t.push(s.text),t.push("ET"),t.push("Q"),t.push("EMC"),e.stream=t.join(` `),e},YesNormal:function(n){var e=cr(n);e.scope=n.scope;var t=n.scope.internal.getFont(n.fontName,n.fontStyle).id,i=n.scope.__private__.encodeColorString(n.color),o=[],s=Ct.internal.getHeight(n),f=Ct.internal.getWidth(n),u=jo(n,n.caption);return o.push("1 g"),o.push("0 0 "+Xt(f)+" "+Xt(s)+" re"),o.push("f"),o.push("q"),o.push("0 0 1 rg"),o.push("0 0 "+Xt(f-1)+" "+Xt(s-1)+" re"),o.push("W"),o.push("n"),o.push("0 g"),o.push("BT"),o.push("/"+t+" "+Xt(u.fontSize)+" Tf "+i),o.push(u.text),o.push("ET"),o.push("Q"),e.stream=o.join(` `),e},OffPushDown:function(n){var e=cr(n);e.scope=n.scope;var t=[];return t.push("0.749023 g"),t.push("0 0 "+Xt(Ct.internal.getWidth(n))+" "+Xt(Ct.internal.getHeight(n))+" re"),t.push("f"),e.stream=t.join(` `),e}},RadioButton:{Circle:{createAppearanceStream:function(n){var e={D:{Off:Ct.RadioButton.Circle.OffPushDown},N:{}};return e.N[n]=Ct.RadioButton.Circle.YesNormal,e.D[n]=Ct.RadioButton.Circle.YesPushDown,e},getCA:function(){return"l"},YesNormal:function(n){var e=cr(n);e.scope=n.scope;var t=[],i=Ct.internal.getWidth(n)<=Ct.internal.getHeight(n)?Ct.internal.getWidth(n)/4:Ct.internal.getHeight(n)/4;i=Number((.9*i).toFixed(5));var o=Ct.internal.Bezier_C,s=Number((i*o).toFixed(5));return t.push("q"),t.push("1 0 0 1 "+Vr(Ct.internal.getWidth(n)/2)+" "+Vr(Ct.internal.getHeight(n)/2)+" cm"),t.push(i+" 0 m"),t.push(i+" "+s+" "+s+" "+i+" 0 "+i+" c"),t.push("-"+s+" "+i+" -"+i+" "+s+" -"+i+" 0 c"),t.push("-"+i+" -"+s+" -"+s+" -"+i+" 0 -"+i+" c"),t.push(s+" -"+i+" "+i+" -"+s+" "+i+" 0 c"),t.push("f"),t.push("Q"),e.stream=t.join(` `),e},YesPushDown:function(n){var e=cr(n);e.scope=n.scope;var t=[],i=Ct.internal.getWidth(n)<=Ct.internal.getHeight(n)?Ct.internal.getWidth(n)/4:Ct.internal.getHeight(n)/4;i=Number((.9*i).toFixed(5));var o=Number((2*i).toFixed(5)),s=Number((o*Ct.internal.Bezier_C).toFixed(5)),f=Number((i*Ct.internal.Bezier_C).toFixed(5));return t.push("0.749023 g"),t.push("q"),t.push("1 0 0 1 "+Vr(Ct.internal.getWidth(n)/2)+" "+Vr(Ct.internal.getHeight(n)/2)+" cm"),t.push(o+" 0 m"),t.push(o+" "+s+" "+s+" "+o+" 0 "+o+" c"),t.push("-"+s+" "+o+" -"+o+" "+s+" -"+o+" 0 c"),t.push("-"+o+" -"+s+" -"+s+" -"+o+" 0 -"+o+" c"),t.push(s+" -"+o+" "+o+" -"+s+" "+o+" 0 c"),t.push("f"),t.push("Q"),t.push("0 g"),t.push("q"),t.push("1 0 0 1 "+Vr(Ct.internal.getWidth(n)/2)+" "+Vr(Ct.internal.getHeight(n)/2)+" cm"),t.push(i+" 0 m"),t.push(i+" "+f+" "+f+" "+i+" 0 "+i+" c"),t.push("-"+f+" "+i+" -"+i+" "+f+" -"+i+" 0 c"),t.push("-"+i+" -"+f+" -"+f+" -"+i+" 0 -"+i+" c"),t.push(f+" -"+i+" "+i+" -"+f+" "+i+" 0 c"),t.push("f"),t.push("Q"),e.stream=t.join(` `),e},OffPushDown:function(n){var e=cr(n);e.scope=n.scope;var t=[],i=Ct.internal.getWidth(n)<=Ct.internal.getHeight(n)?Ct.internal.getWidth(n)/4:Ct.internal.getHeight(n)/4;i=Number((.9*i).toFixed(5));var o=Number((2*i).toFixed(5)),s=Number((o*Ct.internal.Bezier_C).toFixed(5));return t.push("0.749023 g"),t.push("q"),t.push("1 0 0 1 "+Vr(Ct.internal.getWidth(n)/2)+" "+Vr(Ct.internal.getHeight(n)/2)+" cm"),t.push(o+" 0 m"),t.push(o+" "+s+" "+s+" "+o+" 0 "+o+" c"),t.push("-"+s+" "+o+" -"+o+" "+s+" -"+o+" 0 c"),t.push("-"+o+" -"+s+" -"+s+" -"+o+" 0 -"+o+" c"),t.push(s+" -"+o+" "+o+" -"+s+" "+o+" 0 c"),t.push("f"),t.push("Q"),e.stream=t.join(` `),e}},Cross:{createAppearanceStream:function(n){var e={D:{Off:Ct.RadioButton.Cross.OffPushDown},N:{}};return e.N[n]=Ct.RadioButton.Cross.YesNormal,e.D[n]=Ct.RadioButton.Cross.YesPushDown,e},getCA:function(){return"8"},YesNormal:function(n){var e=cr(n);e.scope=n.scope;var t=[],i=Ct.internal.calculateCross(n);return t.push("q"),t.push("1 1 "+Xt(Ct.internal.getWidth(n)-2)+" "+Xt(Ct.internal.getHeight(n)-2)+" re"),t.push("W"),t.push("n"),t.push(Xt(i.x1.x)+" "+Xt(i.x1.y)+" m"),t.push(Xt(i.x2.x)+" "+Xt(i.x2.y)+" l"),t.push(Xt(i.x4.x)+" "+Xt(i.x4.y)+" m"),t.push(Xt(i.x3.x)+" "+Xt(i.x3.y)+" l"),t.push("s"),t.push("Q"),e.stream=t.join(` `),e},YesPushDown:function(n){var e=cr(n);e.scope=n.scope;var t=Ct.internal.calculateCross(n),i=[];return i.push("0.749023 g"),i.push("0 0 "+Xt(Ct.internal.getWidth(n))+" "+Xt(Ct.internal.getHeight(n))+" re"),i.push("f"),i.push("q"),i.push("1 1 "+Xt(Ct.internal.getWidth(n)-2)+" "+Xt(Ct.internal.getHeight(n)-2)+" re"),i.push("W"),i.push("n"),i.push(Xt(t.x1.x)+" "+Xt(t.x1.y)+" m"),i.push(Xt(t.x2.x)+" "+Xt(t.x2.y)+" l"),i.push(Xt(t.x4.x)+" "+Xt(t.x4.y)+" m"),i.push(Xt(t.x3.x)+" "+Xt(t.x3.y)+" l"),i.push("s"),i.push("Q"),e.stream=i.join(` `),e},OffPushDown:function(n){var e=cr(n);e.scope=n.scope;var t=[];return t.push("0.749023 g"),t.push("0 0 "+Xt(Ct.internal.getWidth(n))+" "+Xt(Ct.internal.getHeight(n))+" re"),t.push("f"),e.stream=t.join(` `),e}}},createDefaultAppearanceStream:function(n){var e=n.scope.internal.getFont(n.fontName,n.fontStyle).id,t=n.scope.__private__.encodeColorString(n.color);return"/"+e+" "+n.fontSize+" Tf "+t}};Ct.internal={Bezier_C:.551915024494,calculateCross:function(n){var e=Ct.internal.getWidth(n),t=Ct.internal.getHeight(n),i=Math.min(e,t);return{x1:{x:(e-i)/2,y:(t-i)/2+i},x2:{x:(e-i)/2+i,y:(t-i)/2},x3:{x:(e-i)/2,y:(t-i)/2},x4:{x:(e-i)/2+i,y:(t-i)/2+i}}}},Ct.internal.getWidth=function(n){var e=0;return Se(n)==="object"&&(e=hu(n.Rect[2])),e},Ct.internal.getHeight=function(n){var e=0;return Se(n)==="object"&&(e=hu(n.Rect[3])),e};var i1=Ue.addField=function(n){if(r1(this,n),!(n instanceof Zn))throw new Error("Invalid argument passed to jsPDF.addField.");var e;return(e=n).scope.internal.acroformPlugin.printedOut&&(e.scope.internal.acroformPlugin.printedOut=!1,e.scope.internal.acroformPlugin.acroFormDictionaryRoot=null),e.scope.internal.acroformPlugin.acroFormDictionaryRoot.Fields.push(e),n.page=n.scope.internal.getCurrentPageInfo().pageNumber,this};Ue.AcroFormChoiceField=Ji,Ue.AcroFormListBox=$i,Ue.AcroFormComboBox=Ki,Ue.AcroFormEditBox=ms,Ue.AcroFormButton=rn,Ue.AcroFormPushButton=vs,Ue.AcroFormRadioButton=Xi,Ue.AcroFormCheckBox=bs,Ue.AcroFormTextField=gi,Ue.AcroFormPasswordField=ws,Ue.AcroFormAppearance=Ct,Ue.AcroForm={ChoiceField:Ji,ListBox:$i,ComboBox:Ki,EditBox:ms,Button:rn,PushButton:vs,RadioButton:Xi,CheckBox:bs,TextField:gi,PasswordField:ws,Appearance:Ct},Tt.AcroForm={ChoiceField:Ji,ListBox:$i,ComboBox:Ki,EditBox:ms,Button:rn,PushButton:vs,RadioButton:Xi,CheckBox:bs,TextField:gi,PasswordField:ws,Appearance:Ct};var B1=Tt.AcroForm;function ih(n){return n.reduce(function(e,t,i){return e[t]=i,e},{})}(function(n){var e="addImage_";n.__addimage__={};var t="UNKNOWN",i={PNG:[[137,80,78,71]],TIFF:[[77,77,0,42],[73,73,42,0]],JPEG:[[255,216,255,224,void 0,void 0,74,70,73,70,0],[255,216,255,225,void 0,void 0,69,120,105,102,0,0],[255,216,255,219],[255,216,255,238]],JPEG2000:[[0,0,0,12,106,80,32,32]],GIF87a:[[71,73,70,56,55,97]],GIF89a:[[71,73,70,56,57,97]],WEBP:[[82,73,70,70,void 0,void 0,void 0,void 0,87,69,66,80]],BMP:[[66,77],[66,65],[67,73],[67,80],[73,67],[80,84]]},o=n.__addimage__.getImageFileTypeByImageData=function(N,E){var q,U,rt,ct,pt,nt=t;if((E=E||t)==="RGBA"||N.data!==void 0&&N.data instanceof Uint8ClampedArray&&"height"in N&&"width"in N)return"RGBA";if(yt(N))for(pt in i)for(rt=i[pt],q=0;q>"}),"transparency"in E&&Array.isArray(E.transparency)&&E.transparency.length>0){for(var pt="",nt=0,ft=E.transparency.length;nt>",O.content=s;var J=O.objId+" 0 R";s="<>";else if(i.options.pageNumber)switch(s="<=0};n.__arabicParser__.arabicLetterHasIsolatedForm=function(O){return f(O)&&s(O)&&e[O.charCodeAt(0)].length>=1};var d=n.__arabicParser__.arabicLetterHasFinalForm=function(O){return f(O)&&s(O)&&e[O.charCodeAt(0)].length>=2};n.__arabicParser__.arabicLetterHasInitialForm=function(O){return f(O)&&s(O)&&e[O.charCodeAt(0)].length>=3};var m=n.__arabicParser__.arabicLetterHasMedialForm=function(O){return f(O)&&s(O)&&e[O.charCodeAt(0)].length==4},A=n.__arabicParser__.resolveLigatures=function(O){var M=0,S=t,Y="",J=0;for(M=0;M>"),this.internal.out("endobj")}),this.internal.events.subscribe("putCatalog",function(){this.internal.out("/OpenAction "+e+" 0 R")})),this},(function(n){var e=function(){var t=void 0;Object.defineProperty(this,"pdf",{get:function(){return t},set:function(u){t=u}});var i=150;Object.defineProperty(this,"width",{get:function(){return i},set:function(u){i=isNaN(u)||Number.isInteger(u)===!1||u<0?150:u,this.getContext("2d").pageWrapXEnabled&&(this.getContext("2d").pageWrapX=i+1)}});var o=300;Object.defineProperty(this,"height",{get:function(){return o},set:function(u){o=isNaN(u)||Number.isInteger(u)===!1||u<0?300:u,this.getContext("2d").pageWrapYEnabled&&(this.getContext("2d").pageWrapY=o+1)}});var s=[];Object.defineProperty(this,"childNodes",{get:function(){return s},set:function(u){s=u}});var f={};Object.defineProperty(this,"style",{get:function(){return f},set:function(u){f=u}}),Object.defineProperty(this,"parentNode",{})};e.prototype.getContext=function(t,i){var o;if((t=t||"2d")!=="2d")return null;for(o in i)this.pdf.context2d.hasOwnProperty(o)&&(this.pdf.context2d[o]=i[o]);return this.pdf.context2d._canvas=this,this.pdf.context2d},e.prototype.toDataURL=function(){throw new Error("toDataURL is not implemented.")},n.events.push(["initialized",function(){this.canvas=new e,this.canvas.pdf=this}])})(Tt.API),(function(n){var e={left:0,top:0,bottom:0,right:0},t=!1,i=function(){this.internal.__cell__===void 0&&(this.internal.__cell__={},this.internal.__cell__.padding=3,this.internal.__cell__.headerFunction=void 0,this.internal.__cell__.margins=Object.assign({},e),this.internal.__cell__.margins.width=this.getPageWidth(),o.call(this))},o=function(){this.internal.__cell__.lastCell=new s,this.internal.__cell__.pages=1},s=function(){var c=arguments[0];Object.defineProperty(this,"x",{enumerable:!0,get:function(){return c},set:function(O){c=O}});var d=arguments[1];Object.defineProperty(this,"y",{enumerable:!0,get:function(){return d},set:function(O){d=O}});var m=arguments[2];Object.defineProperty(this,"width",{enumerable:!0,get:function(){return m},set:function(O){m=O}});var A=arguments[3];Object.defineProperty(this,"height",{enumerable:!0,get:function(){return A},set:function(O){A=O}});var P=arguments[4];Object.defineProperty(this,"text",{enumerable:!0,get:function(){return P},set:function(O){P=O}});var p=arguments[5];Object.defineProperty(this,"lineNumber",{enumerable:!0,get:function(){return p},set:function(O){p=O}});var B=arguments[6];return Object.defineProperty(this,"align",{enumerable:!0,get:function(){return B},set:function(O){B=O}}),this};s.prototype.clone=function(){return new s(this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align)},s.prototype.toArray=function(){return[this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align]},n.setHeaderFunction=function(c){return i.call(this),this.internal.__cell__.headerFunction=typeof c=="function"?c:void 0,this},n.getTextDimensions=function(c,d){i.call(this);var m=(d=d||{}).fontSize||this.getFontSize(),A=d.font||this.getFont(),P=d.scaleFactor||this.internal.scaleFactor,p=0,B=0,O=0,M=this;if(!Array.isArray(c)&&typeof c!="string"){if(typeof c!="number")throw new Error("getTextDimensions expects text-parameter to be of type String or type Number or an Array of Strings.");c=String(c)}var S=d.maxWidth;S>0?typeof c=="string"?c=this.splitTextToSize(c,S):Object.prototype.toString.call(c)==="[object Array]"&&(c=c.reduce(function(J,D){return J.concat(M.splitTextToSize(D,S))},[])):c=Array.isArray(c)?c:[c];for(var Y=0;Ythis.getPageHeight()?(this.cellAddPage(),c.y=A.top,p&&P&&(this.printHeaderRow(c.lineNumber,!0),c.y+=P[0].height)):c.y=d.y+d.height||c.y),c.text[0]!==void 0&&(this.rect(c.x,c.y,c.width,c.height,t===!0?"FD":void 0),c.align==="right"?this.text(c.text,c.x+c.width-m,c.y+m,{align:"right",baseline:"top"}):c.align==="center"?this.text(c.text,c.x+c.width/2,c.y+m,{align:"center",baseline:"top",maxWidth:c.width-m-m}):this.text(c.text,c.x+m,c.y+m,{align:"left",baseline:"top",maxWidth:c.width-m-m})),this.internal.__cell__.lastCell=c,this};n.table=function(c,d,m,A,P){if(i.call(this),!m)throw new Error("No data for PDF table.");var p,B,O,M,S=[],Y=[],J=[],D={},lt={},yt=[],mt=[],tt=(P=P||{}).autoSize||!1,z=P.printHeaders!==!1,et=P.css&&P.css["font-size"]!==void 0?16*P.css["font-size"]:P.fontSize||12,N=P.margins||Object.assign({width:this.getPageWidth()},e),E=typeof P.padding=="number"?P.padding:3,q=P.headerBackgroundColor||"#c8c8c8",U=P.headerTextColor||"#000";if(o.call(this),this.internal.__cell__.printHeaders=z,this.internal.__cell__.margins=N,this.internal.__cell__.table_font_size=et,this.internal.__cell__.padding=E,this.internal.__cell__.headerBackgroundColor=q,this.internal.__cell__.headerTextColor=U,this.setFontSize(et),A==null)Y=S=Object.keys(m[0]),J=S.map(function(){return"left"});else if(Array.isArray(A)&&Se(A[0])==="object")for(S=A.map(function(At){return At.name}),Y=A.map(function(At){return At.prompt||At.name||""}),J=A.map(function(At){return At.align||"left"}),p=0;p0&&this.setTableHeaderRow(P),this.setFont(void 0,"normal"),t=!1}})(Tt.API);var ah={italic:["italic","oblique","normal"],oblique:["oblique","italic","normal"],normal:["normal","oblique","italic"]},sh=["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded"],Bo=ih(sh),oh=[100,200,300,400,500,600,700,800,900],a1=ih(oh);function No(n){var e=n.family.replace(/"|'/g,"").toLowerCase(),t=(function(s){return ah[s=s||"normal"]?s:"normal"})(n.style),i=(function(s){return s?typeof s=="number"?s>=100&&s<=900&&s%100==0?s:400:/^\d00$/.test(s)?parseInt(s):s==="bold"?700:400:400})(n.weight),o=(function(s){return typeof Bo[s=s||"normal"]=="number"?s:"normal"})(n.stretch);return{family:e,style:t,weight:i,stretch:o,src:n.src||[],ref:n.ref||{name:e,style:[o,t,i].join(" ")}}}function cu(n,e,t,i){var o;for(o=t;o>=0&&o=0&&o>>1)&255}return o}function _u(n,e,t){var i=n.length,o=[];o[0]=4;for(var s=0;s>s&f}function Au(n,e,t,i){var o=t*i,s=Math.floor(o/8),f=16-(o-8*s+i),u=(1<>8&255;d.setUint8(m,P)}})(n,s,lh(n,s)&~(u<>7,f=1<<1+(7&o);n[e++],n[e++];var u=null,c=null;s&&(u=e,c=f,e+=3*f);var d=!0,m=[],A=0,P=null,p=0,B=null;for(this.width=t,this.height=i;d&&e=0))throw Error("Invalid block size");if(N===0)break;e+=N}break;case 249:if(n[e++]!==4||n[e+4]!==0)throw new Error("Invalid graphics extension block.");var O=n[e++];A=n[e++]|n[e++]<<8,P=n[e++],1&O||(P=null),p=O>>2&7,e++;break;case 254:for(;;){if(!((N=n[e++])>=0))throw Error("Invalid block size");if(N===0)break;e+=N}break;default:throw new Error("Unknown graphic control label: 0x"+n[e-1].toString(16))}break;case 44:var M=n[e++]|n[e++]<<8,S=n[e++]|n[e++]<<8,Y=n[e++]|n[e++]<<8,J=n[e++]|n[e++]<<8,D=n[e++],lt=D>>6&1,yt=1<<1+(7&D),mt=u,tt=c,z=!1;D>>7&&(z=!0,mt=e,tt=yt,e+=3*yt);var et=e;for(e++;;){var N;if(!((N=n[e++])>=0))throw Error("Invalid block size");if(N===0)break;e+=N}m.push({x:M,y:S,width:Y,height:J,has_local_palette:z,palette_offset:mt,palette_size:tt,data_offset:et,data_length:e-et,transparent_index:P,interlaced:!!lt,delay:A,disposal:p});break;case 59:d=!1;break;default:throw new Error("Unknown gif block: 0x"+n[e-1].toString(16))}this.numFrames=function(){return m.length},this.loopCount=function(){return B},this.frameInfo=function(E){if(E<0||E>=m.length)throw new Error("Frame index out of range.");return m[E]},this.decodeAndBlitFrameBGRA=function(E,q){var U=this.frameInfo(E),rt=U.width*U.height;if(rt>536870912)throw new Error("Image dimensions exceed 512MB, which is too large.");var ct=new Uint8Array(rt);Nu(n,U.data_offset,ct,rt);var pt=U.palette_offset,nt=U.transparent_index;nt===null&&(nt=256);var ft=U.width,At=t-ft,xt=ft,x=4*(U.y*t+U.x),j=4*((U.y+U.height)*t+U.x),R=x,V=4*At;U.interlaced===!0&&(V+=4*t*7);for(var $=8,Q=0,it=ct.length;Q=j&&(V=4*At+4*t*($-1),R=x+(ft+At)*($<<1),$>>=1)),at===nt)R+=4;else{var dt=n[pt+3*at],_t=n[pt+3*at+1],St=n[pt+3*at+2];q[R++]=St,q[R++]=_t,q[R++]=dt,q[R++]=255}--xt}},this.decodeAndBlitFrameRGBA=function(E,q){var U=this.frameInfo(E),rt=U.width*U.height;if(rt>536870912)throw new Error("Image dimensions exceed 512MB, which is too large.");var ct=new Uint8Array(rt);Nu(n,U.data_offset,ct,rt);var pt=U.palette_offset,nt=U.transparent_index;nt===null&&(nt=256);var ft=U.width,At=t-ft,xt=ft,x=4*(U.y*t+U.x),j=4*((U.y+U.height)*t+U.x),R=x,V=4*At;U.interlaced===!0&&(V+=4*t*7);for(var $=8,Q=0,it=ct.length;Q=j&&(V=4*At+4*t*($-1),R=x+(ft+At)*($<<1),$>>=1)),at===nt)R+=4;else{var dt=n[pt+3*at],_t=n[pt+3*at+1],St=n[pt+3*at+2];q[R++]=dt,q[R++]=_t,q[R++]=St,q[R++]=255}--xt}}}function Nu(n,e,t,i){for(var o=n[e++],s=1<>=c,m-=c,M!==s){if(M===f)break;for(var S=Ms;)J=B[J]>>8,++Y;var D=J;if(P+Y+(S!==M?1:0)>i)return void Le.log("Warning, gif stream longer than expected.");t[P++]=D;var lt=P+=Y;for(S!==M&&(t[P++]=D),J=S;Y--;)J=B[J],t[--lt]=255&J,J>>=8;O!==null&&u<4096&&(B[u++]=O<<8|D,u>=d+1&&c<12&&(++c,d=d<<1|1)),O=M}else u=f+1,d=(1<<(c=o+1))-1,O=null}return P!==i&&Le.log("Warning, gif stream shorter than expected."),t}/** * @license Copyright (c) 2008, Adobe Systems Incorporated All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Adobe Systems Incorporated nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */function ko(n){var e,t,i,o,s,f=Math.floor,u=new Array(64),c=new Array(64),d=new Array(64),m=new Array(64),A=new Array(65535),P=new Array(65535),p=new Array(64),B=new Array(64),O=[],M=0,S=7,Y=new Array(64),J=new Array(64),D=new Array(64),lt=new Array(256),yt=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],E=[0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0],q=[0,1,2,3,4,5,6,7,8,9,10,11],U=[0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,119],rt=[0,1,2,3,17,4,5,33,49,6,18,65,81,7,97,113,19,34,50,129,8,20,66,145,161,177,193,9,35,51,82,240,21,98,114,209,10,22,36,52,225,37,241,23,24,25,26,38,39,40,41,42,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,130,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,226,227,228,229,230,231,232,233,234,242,243,244,245,246,247,248,249,250];function ct(x,j){for(var R=0,V=0,$=new Array,Q=1;Q<=16;Q++){for(var it=1;it<=x[Q];it++)$[j[V]]=[],$[j[V]][0]=R,$[j[V]][1]=Q,V++,R++;R*=2}return $}function pt(x){for(var j=x[0],R=x[1]-1;R>=0;)j&1<>8&255),nt(255&x)}function At(x,j,R,V,$){for(var Q,it=$[0],at=$[240],dt=(function(bt,Wt){var It,Ut,Dt,ve,ue,Zt,ce,he,Bt,ne,Rt=0;for(Bt=0;Bt<8;++Bt){It=bt[Rt],Ut=bt[Rt+1],Dt=bt[Rt+2],ve=bt[Rt+3],ue=bt[Rt+4],Zt=bt[Rt+5],ce=bt[Rt+6];var ze=It+(he=bt[Rt+7]),ge=It-he,se=Ut+ce,oe=Ut-ce,Oe=Dt+Zt,qt=Dt-Zt,ke=ve+ue,Yt=ve-ue,Qt=ze+ke,je=ze-ke,le=se+Oe,Vt=se-Oe;bt[Rt]=Qt+le,bt[Rt+4]=Qt-le;var be=.707106781*(Vt+je);bt[Rt+2]=je+be,bt[Rt+6]=je-be;var Jr=.382683433*((Qt=Yt+qt)-(Vt=oe+ge)),hn=.5411961*Qt+Jr,pr=1.306562965*Vt+Jr,tr=.707106781*(le=qt+oe),Gt=ge+tr,gr=ge-tr;bt[Rt+5]=gr+hn,bt[Rt+3]=gr-hn,bt[Rt+1]=Gt+pr,bt[Rt+7]=Gt-pr,Rt+=8}for(Rt=0,Bt=0;Bt<8;++Bt){It=bt[Rt],Ut=bt[Rt+8],Dt=bt[Rt+16],ve=bt[Rt+24],ue=bt[Rt+32],Zt=bt[Rt+40],ce=bt[Rt+48];var mr=It+(he=bt[Rt+56]),Mn=It-he,Rn=Ut+ce,Te=Ut-ce,nn=Dt+Zt,an=Dt-Zt,$r=ve+ue,Cr=ve-ue,Wn=mr+$r,er=mr-$r,Vn=Rn+nn,Gn=Rn-nn;bt[Rt]=Wn+Vn,bt[Rt+32]=Wn-Vn;var Tn=.707106781*(Gn+er);bt[Rt+16]=er+Tn,bt[Rt+48]=er-Tn;var Kr=.382683433*((Wn=Cr+an)-(Gn=Te+Mn)),nr=.5411961*Wn+Kr,Xr=1.306562965*Gn+Kr,yi=.707106781*(Vn=an+Te),xi=Mn+yi,_i=Mn-yi;bt[Rt+40]=_i+nr,bt[Rt+24]=_i-nr,bt[Rt+8]=xi+Xr,bt[Rt+56]=xi-Xr,Rt++}for(Bt=0;Bt<64;++Bt)ne=bt[Bt]*Wt[Bt],p[Bt]=ne>0?ne+.5|0:ne-.5|0;return p})(x,j),_t=0;_t<64;++_t)B[mt[_t]]=dt[_t];var St=B[0]-R;R=B[0],St==0?pt(V[0]):(pt(V[P[Q=32767+St]]),pt(A[Q]));for(var kt=63;kt>0&&B[kt]==0;)kt--;if(kt==0)return pt(it),R;for(var zt,k=1;k<=kt;){for(var Lt=k;B[k]==0&&k<=kt;)++k;var ae=k-Lt;if(ae>=16){zt=ae>>4;for(var Ht=1;Ht<=zt;++Ht)pt(at);ae&=15}Q=32767+B[k],pt($[(ae<<4)+P[Q]]),pt(A[Q]),k++}return kt!=63&&pt(it),R}function xt(x){x=Math.min(Math.max(x,1),100),s!=x&&((function(j){for(var R=[16,11,10,16,24,40,51,61,12,12,14,19,26,58,60,55,14,13,16,24,40,57,69,56,14,17,22,29,51,87,80,62,18,22,37,56,68,109,103,77,24,35,55,64,81,104,113,92,49,64,78,87,103,121,120,101,72,92,95,98,112,100,103,99],V=0;V<64;V++){var $=f((R[V]*j+50)/100);$=Math.min(Math.max($,1),255),u[mt[V]]=$}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],it=0;it<64;it++){var at=f((Q[it]*j+50)/100);at=Math.min(Math.max(at,1),255),c[mt[it]]=at}for(var dt=[1,1.387039845,1.306562965,1.175875602,1,.785694958,.5411961,.275899379],_t=0,St=0;St<8;St++)for(var kt=0;kt<8;kt++)d[_t]=1/(u[mt[_t]]*dt[St]*dt[kt]*8),m[_t]=1/(c[mt[_t]]*dt[St]*dt[kt]*8),_t++})(x<50?Math.floor(5e3/x):Math.floor(200-2*x)),s=x)}this.encode=function(x,j){j&&xt(j),O=new Array,M=0,S=7,ft(65496),ft(65504),ft(16),nt(74),nt(70),nt(73),nt(70),nt(0),nt(1),nt(1),nt(0),ft(1),ft(1),nt(0),nt(0),(function(){ft(65499),ft(132),nt(0);for(var Ut=0;Ut<64;Ut++)nt(u[Ut]);nt(1);for(var Dt=0;Dt<64;Dt++)nt(c[Dt])})(),(function(Ut,Dt){ft(65472),ft(17),nt(8),ft(Dt),ft(Ut),nt(3),nt(1),nt(17),nt(0),nt(2),nt(17),nt(1),nt(3),nt(17),nt(1)})(x.width,x.height),(function(){ft(65476),ft(418),nt(0);for(var Ut=0;Ut<16;Ut++)nt(tt[Ut+1]);for(var Dt=0;Dt<=11;Dt++)nt(z[Dt]);nt(16);for(var ve=0;ve<16;ve++)nt(et[ve+1]);for(var ue=0;ue<=161;ue++)nt(N[ue]);nt(1);for(var Zt=0;Zt<16;Zt++)nt(E[Zt+1]);for(var ce=0;ce<=11;ce++)nt(q[ce]);nt(17);for(var he=0;he<16;he++)nt(U[he+1]);for(var Bt=0;Bt<=161;Bt++)nt(rt[Bt])})(),ft(65498),ft(12),nt(3),nt(1),nt(0),nt(2),nt(17),nt(3),nt(17),nt(0),nt(63),nt(0);var R=0,V=0,$=0;M=0,S=7,this.encode.displayName="_encode_";for(var Q,it,at,dt,_t,St,kt,zt,k,Lt=x.data,ae=x.width,Ht=x.height,bt=4*ae,Wt=0;Wt>3)*bt+(kt=4*(7&k)),Wt+zt>=Ht&&(St-=bt*(Wt+1+zt-Ht)),Q+kt>=bt&&(St-=Q+kt-bt+4),it=Lt[St++],at=Lt[St++],dt=Lt[St++],Y[k]=(yt[it]+yt[at+256|0]+yt[dt+512|0]>>16)-128,J[k]=(yt[it+768|0]+yt[at+1024|0]+yt[dt+1280|0]>>16)-128,D[k]=(yt[it+1280|0]+yt[at+1536|0]+yt[dt+1792|0]>>16)-128;R=At(Y,d,R,e,i),V=At(J,m,V,t,o),$=At(D,m,$,t,o),Q+=32}Wt+=8}if(S>=0){var It=[];It[1]=S+1,It[0]=(1<E;E++)if(z[et+E]!=N.charCodeAt(E))return!0;return!1}function i(z,et,N,E,q){for(var U=0;UU+1?[]:new et),!(rt.length>>0;r&h;)h>>>=1;return h?(r&h-1)+h:r}function N(r,a,h,g,b){e(!(g%h));do r[a+(g-=h)]=b;while(0=b),512>=b)var w=s(512);else if((w=s(b))==null)return 0;return(function(y,_,L,C,H,Z){var F,W,K=_,ot=1<F;++F){if(X[F]>1<(re-=X[F]))return 0;for(;0=F;++F,H<<=1){if(Pt+=re<<=1,0>(re-=X[F]))return 0;for(;0wt&&!(0>=(ht-=X[wt]));)++wt,ht<<=1;ot+=Ot=1<<(ht=wt-L),y[_+(wt=Mt&vt)].g=ht+L,y[_+wt].value=K-_-wt}C.g=F-L,C.value=Z[W++],N(y,K+(Mt>>L),H,Ot,C),Mt=et(Mt,F)}}return Pt!=2*ut[15]-1?0:ot})(r,a,h,g,b,w)}function q(){this.value=this.g=0}function U(){this.value=this.g=0}function rt(){this.G=f(5,q),this.H=s(5),this.jc=this.Qb=this.qb=this.nd=0,this.pd=f(Bi,U)}function ct(r,a,h,g){e(r!=null),e(a!=null),e(2147483648>g),r.Ca=254,r.I=0,r.b=-8,r.Ka=0,r.oa=a,r.pa=h,r.Jd=a,r.Yc=h+g,r.Zc=4<=g?h+g-4+1:h,it(r)}function pt(r,a){for(var h=0;0g),r.Sb=g,r.Ra=0,r.u=0,r.h=0,4>>=8,r.Ra+=r.oa[r.pa+r.bb]<>>0,++r.bb,r.u-=8;V(r)&&(r.h=1,r.u=0)}function xt(r,a){if(e(0<=a),!r.h&&a<=fa){var h=R(r)&oi[a];return r.u+=a,At(r),h}return r.h=1,r.u=0}function x(){this.b=this.Ca=this.I=0,this.oa=[],this.pa=0,this.Jd=[],this.Yc=0,this.Zc=[],this.Ka=0}function j(){this.Ra=0,this.oa=[],this.h=this.u=this.bb=this.Sb=this.pa=0}function R(r){return r.Ra>>>(r.u&yn-1)>>>0}function V(r){return e(r.bb<=r.Sb),r.h||r.bb==r.Sb&&r.u>yn}function $(r,a){r.u=a,r.h=V(r)}function Q(r){r.u>=Nn&&(e(r.u>=Nn),At(r))}function it(r){e(r!=null&&r.oa!=null),r.pa>>0,r.b+=8):(e(r!=null&&r.oa!=null),r.par.b&&it(r);var g=r.b,b=h*a>>>8,w=(r.I>>>g>b)+0;for(w?(h-=b,r.I-=b+1<>>0):h=b+1,g=h,b=0;256<=g;)b+=8,g>>=8;return g=7^b+Mi[g],r.b-=g,r.Ca=(h<>24&255,r[a+1]=h>>16&255,r[a+2]=h>>8&255,r[a+3]=255&h}function St(r,a){return r[a+0]|r[a+1]<<8}function kt(r,a){return St(r,a)|r[a+2]<<16}function zt(r,a){return St(r,a)|St(r,a+2)<<16}function k(r,a){var h=1<=b||0>=w?0:(h[0]=b,g[0]=w,1)}function bt(r,a){return r+(1<>>a}function Wt(r,a){return((4278255360&r)+(4278255360&a)>>>0&4278255360)+((16711935&r)+(16711935&a)>>>0&16711935)>>>0}function It(r,a){z[a]=function(h,g,b,w,y,_,L){var C;for(C=0;C>>1)+(r&a)>>>0}function ve(r){return 0<=r&&256>r?r:0>r?0:255>1))}function Zt(r,a,h){return Math.abs(a-h)-Math.abs(r-h)}function ce(r,a,h,g,b,w,y){for(g=w[y-1],h=0;h>8&255,L=16711935&(L=(L=16711935&y)+((_<<16)+_));g[b+w]=(4278255360&y)+L>>>0}}function Bt(r,a){a.jd=255&r,a.hd=r>>8&255,a.ud=r>>16&255}function ne(r,a,h,g,b,w){var y;for(y=0;y>>8,C=_,H=255&(H=(H=_>>>16)+((r.jd<<24>>24)*(L<<24>>24)>>>5));C=255&(C=(C+=(r.hd<<24>>24)*(L<<24>>24)>>>5)+((r.ud<<24>>24)*(H<<24>>24)>>>5)),b[w+y]=(4278255360&_)+(H<<16)+C}}function Rt(r,a,h,g,b){z[a]=function(w,y,_,L,C,H,Z,F,W){for(L=Z;L>w.b,W=w.Ea,K=w.K[0],ot=w.w;if(8>F)for(w=(1<>=F}else z["VP8LMapColor"+h](L,C,K,ot,H,Z,y,_,W)}}function ze(r,a,h,g,b){for(h=a+h;a>16&255,g[b++]=w>>8&255,g[b++]=255&w}}function ge(r,a,h,g,b){for(h=a+h;a>16&255,g[b++]=w>>8&255,g[b++]=255&w,g[b++]=w>>24&255}}function se(r,a,h,g,b){for(h=a+h;a>16&240|y>>12&15,y=240&y|y>>28&15;g[b++]=w,g[b++]=y}}function oe(r,a,h,g,b){for(h=a+h;a>16&248|y>>13&7,y=y>>5&224|y>>3&31;g[b++]=w,g[b++]=y}}function Oe(r,a,h,g,b){for(h=a+h;a>8&255,g[b++]=w>>16&255}}function qt(r,a,h,g,b,w){if(w==0)for(h=a+h;a>24|w[1]>>8&65280|w[2]<<8&16711680|w[3]<<24)>>>0),b+=32;else i(g,b,r,a,h)}function ke(r,a){z[a][0]=z[r+"0"],z[a][1]=z[r+"1"],z[a][2]=z[r+"2"],z[a][3]=z[r+"3"],z[a][4]=z[r+"4"],z[a][5]=z[r+"5"],z[a][6]=z[r+"6"],z[a][7]=z[r+"7"],z[a][8]=z[r+"8"],z[a][9]=z[r+"9"],z[a][10]=z[r+"10"],z[a][11]=z[r+"11"],z[a][12]=z[r+"12"],z[a][13]=z[r+"13"],z[a][14]=z[r+"0"],z[a][15]=z[r+"0"]}function Yt(r){return r==Gs||r==Ys||r==$a||r==Js}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 Vt(){this.width=[0],this.height=[0],this.Pd=[0],this.Qd=[0],this.format=[0]}function be(){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 Jr(r){return alert("todo:WebPSamplerProcessPlane"),r.T}function hn(r,a){var h=r.T,g=a.ba.f.RGBA,b=g.eb,w=g.fb+r.ka*g.A,y=zn[a.ba.S],_=r.y,L=r.O,C=r.f,H=r.N,Z=r.ea,F=r.W,W=a.cc,K=a.dc,ot=a.Mc,X=a.Nc,ut=r.ka,ht=r.ka+r.T,wt=r.U,vt=wt+1>>1;for(ut==0?y(_,L,null,null,C,H,Z,F,C,H,Z,F,b,w,null,null,wt):(y(a.ec,a.fc,_,L,W,K,ot,X,C,H,Z,F,b,w-g.A,b,w,wt),++h);ut+2h,b=h==Ga||h==Ya||h==Ja||h==Vs||h==12||Yt(h);if(a.memory=null,a.Ib=null,a.Jb=null,a.Nd=null,!qn(a.Oa,r,b?11:12))return 0;if(b&&Yt(h)&&_r(),r.da)alert("todo:use_scaling");else{if(g){if(a.Ib=Jr,r.Kb){if(h=r.U+1>>1,a.memory=s(r.U+2*h),a.memory==null)return 0;a.ec=a.memory,a.fc=0,a.cc=a.ec,a.dc=a.fc+r.U,a.Mc=a.cc,a.Nc=a.dc+h,a.Ib=hn,_r()}}else alert("todo:EmitYUV");b&&(a.Jb=pr,g&&Re())}if(g&&!al){for(r=0;256>r;++r)Ih[r]=89858*(r-128)+Xa>>Ka,Eh[r]=-22014*(r-128)+Xa,Fh[r]=-45773*(r-128),Ch[r]=113618*(r-128)+Xa>>Ka;for(r=ba;r>Ka,Oh[r-ba]=rr(a,255),jh[r-ba]=rr(a+8>>4,15);al=1}return 1}function Gt(r){var a=r.ma,h=r.U,g=r.T;return e(!(1&r.ka)),0>=h||0>=g?0:(h=a.Ib(r,a),a.Jb!=null&&a.Jb(r,a,h),a.Dc+=h,1)}function gr(r){r.ma.memory=null}function mr(r,a,h,g){return xt(r,8)!=47?0:(a[0]=xt(r,14)+1,h[0]=xt(r,14)+1,g[0]=xt(r,1),xt(r,3)!=0?0:!r.h)}function Mn(r,a){if(4>r)return r+1;var h=r-2>>1;return(2+(1&r)<>4)*r+(8-(15&h)))?h:1;var h}function Te(r,a,h){var g=R(h),b=r[a+=255&g].g-8;return 0>>0,e(8>=h.g),r.g}function an(r,a,h){var g=r.xc;return e((a=g==0?0:r.vc[r.md*(h>>g)+(a>>g)])>Ot.b)*Pt;otwt&&(jt=wt),(0,Yn[fe[Qe++]>>8&15])(F,W+ +ie,ut,ht+ie-wt,jt-ie,ut,ht+ie),ie=jt}W+=wt,ht+=wt,++ot&Mt||(Ot+=Pt)}Z!=C.nc&&i(L,_-K,L,_+(Z-H-1)*K,K);break;case 1:for(K=F,X=W,wt=(F=C.Ea)-(ht=F&~(ut=(W=1<>C.b)*ot;H=b),0w.o&&(g=w.o),h=g?h=0:(b[0]+=4*w.v,w.ka=h-w.j,w.U=w.va-w.v,w.T=g-h,h=1),h){if(_=_[0],11>(h=r.ca).S){var H=h.f.RGBA,Z=(g=h.S,b=w.U,w=w.T,C=H.eb,H.A),F=w;for(H=H.fb+r.Ma*H.A;0g){var b=r.l.width,w=h.ca,y=h.tb+b*g,_=r.V,L=r.Ba+r.c*g,C=r.gc;e(r.ab==1),e(C[0].hc==3),Hs(C[0],g,a,_,L,w,y),er(h,g,a,w,y,b)}r.C=r.Ma=a}function Gn(r,a,h,g,b,w,y){var _=r.$/g,L=r.$%g,C=r.m,H=r.s,Z=h+r.$,F=Z;b=h+g*b;var W=h+g*w,K=280+H.ua,ot=r.Pb?_:16777216,X=0=ot){var Mt=Z-h;e((ot=r).Pb),ot.wd=ot.m,ot.xd=Mt,0re.g?($(vt,vt.u+re.g),Mt[Pt]=re.value,vt=0):($(vt,vt.u+re.g-256),e(256<=re.value),vt=re.value),vt==0&&(wt=!0)}else vt=Te(ht.G[0],ht.H[0],C);if(C.h)break;if(wt||256>vt){if(!wt)if(ht.nd)a[Z]=(ht.qb|vt<<8)>>>0;else{if(Q(C),wt=Te(ht.G[1],ht.H[1],C),Q(C),Mt=Te(ht.G[2],ht.H[2],C),Pt=Te(ht.G[3],ht.H[3],C),C.h)break;a[Z]=(Pt<<24|wt<<16|vt<<8|Mt)>>>0}if(wt=!1,++Z,++L>=g&&(L=0,++_,y!=null&&_<=w&&!(_%16)&&y(r,_),X!=null))for(;F>>X.Mb]=vt}else if(280>vt){if(vt=Mn(vt-256,C),Mt=Te(ht.G[4],ht.H[4],C),Q(C),Mt=Rn(g,Mt=Mn(Mt,C)),C.h)break;if(Z-h=g;)L-=g,++_,y!=null&&_<=w&&!(_%16)&&y(r,_);if(e(Z<=b),L&ut&&(ht=an(H,L,_)),X!=null)for(;F>>X.Mb]=vt}else{if(!(vt>>X.Mb]=vt;vt=Z,e(!(wt>>>(Mt=X).Xa)),a[vt]=Mt.X[wt],wt=!0}wt||e(C.h==V(C))}if(r.Pb&&C.h&&Zw?w:_),r.a=0,r.$=Z-h}return 1}return r.a=3,0}function Tn(r){e(r!=null),r.vc=null,r.yc=null,r.Ya=null;var a=r.Wa;a!=null&&(a.X=null),r.vb=null,e(r!=null)}function Kr(){var r=new Et;return r==null?null:(r.a=0,r.xb=tl,ke("Predictor","VP8LPredictors"),ke("Predictor","VP8LPredictors_C"),ke("PredictorAdd","VP8LPredictorsAdd"),ke("PredictorAdd","VP8LPredictorsAdd_C"),Ri=he,ui=ne,da=ze,pa=ge,Ti=se,hi=oe,ci=Oe,z.VP8LMapColor32b=Xe,z.VP8LMapColor8b=lr,r)}function nr(r,a,h,g,b){var w=1,y=[r],_=[a],L=g.m,C=g.s,H=null,Z=0;t:for(;;){if(h)for(;w&&xt(L,1);){var F=y,W=_,K=g,ot=1,X=K.m,ut=K.gc[K.ab],ht=xt(X,2);if(K.Oc&1<=K.ab),ht){case 0:case 1:ut.b=xt(X,3)+2,ot=nr(bt(ut.Ea,ut.b),bt(ut.nc,ut.b),0,K,ut.K),ut.K=ut.K[0];break;case 3:var wt,vt=xt(X,8)+1,Mt=16>Ot.b),Qe=s(fe);if(Qe==null)wt=0;else{var ie=Ot.K[0],jt=Ot.w;for(Qe[0]=Ot.K[0][0],Pt=1;Pt<1*re;++Pt)Qe[Pt]=Wt(ie[jt+Pt],Qe[Pt-1]);for(;Pt<4*fe;++Pt)Qe[Pt]=0;Ot.K[0]=null,Ot.K[0]=Qe,wt=1}}ot=wt;break;case 2:break;default:e(0)}w=ot}}if(y=y[0],_=_[0],w&&xt(L,1)&&!(w=1<=(Z=xt(L,4))&&11>=Z)){g.a=3;break t}var Nt;if(Nt=w)e:{var We,ee,pe,Ee=g,on=y,xn=_,De=Z,pn=h,_n=Ee.m,tn=Ee.s,me=[null],we=1,qe=0,ye=mh[De];n:for(;;){if(pn&&xt(_n,1)){var ln=xt(_n,3)+2,$n=bt(on,ln),Ve=bt(xn,ln),Ln=$n*Ve;if(!nr($n,Ve,0,Ee,me))break n;for(me=me[0],tn.xc=ln,We=0;We>8&65535;me[We]=Ne,Ne>=we&&(we=Ne+1)}}if(_n.h)break n;for(ee=0;5>ee;++ee){var en=Zo[ee];!ee&&0=An),En=Fn;var Sn=s(qe);if(En==null||Sn==null||Cn==null){Ee.a=1;break n}var On=Cn;for(We=pe=0;Weee;++ee){en=Zo[ee],jn[ee]=On,Kn[ee]=pe,!ee&&0rs)break r}else to=rs;for(ya=0;yaUi)fl[ya++]=Ui,Ui!=0&&(dl=Ui);else{var Wh=Ui==16,ml=Ui-16,Vh=fh[ml],vl=xt(zr,ch[ml])+Vh;if(ya+vl>rs)break r;for(var Gh=Wh?dl:0;0=ee){var xa,no=Sn[0];for(xa=1;xano&&(no=Sn[xa]);un+=no}}if(Ce.nd=Sr,Ce.Qb=0,Sr&&(Ce.qb=(jn[3][Kn[3]+0].value<<24|jn[1][Kn[1]+0].value<<16|jn[2][Kn[2]+0].value)>>>0,fi==0&&256>jn[0][Kn[0]+0].value&&(Ce.Qb=1,Ce.qb+=jn[0][Kn[0]+0].value<<8)),Ce.jc=!Ce.Qb&&6>un,Ce.jc){var is,kr=Ce;for(is=0;is>=nn(as,8,Wr),Hr>>=nn(kr.G[1][kr.H[1]+Hr],16,Wr),Hr>>=nn(kr.G[2][kr.H[2]+Hr],0,Wr),nn(kr.G[3][kr.H[3]+Hr],24,Wr))}}}tn.vc=me,tn.Wb=we,tn.Ya=En,tn.yc=Cn,Nt=1;break e}Nt=0}if(!(w=Nt)){g.a=3;break t}if(0g+1?[]:0),!(b.lengthr?0:r>a?a:r}function Ai(){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 Ss(){var r=new Fa;return r!=null&&(r.a=0,r.sc="OK",r.cb=0,r.Xb=0,va||(va=Ni)),r}function $e(r,a,h){return r.a==0&&(r.a=a,r.sc=h,r.cb=0),0}function Ea(r,a,h){return 3<=h&&r[a+0]==157&&r[a+1]==1&&r[a+2]==42}function ir(r,a){if(r==null)return 0;if(r.a=0,r.sc="OK",a==null)return $e(r,2,"null VP8Io passed to VP8GetHeaders()");var h=a.data,g=a.w,b=a.ha;if(4>b)return $e(r,7,"Truncated header.");var w=h[g+0]|h[g+1]<<8|h[g+2]<<16,y=r.Od;if(y.Rb=!(1&w),y.td=w>>1&7,y.yd=w>>4&1,y.ub=w>>5,3b)return $e(r,7,"cannot parse picture header");if(!Ea(h,g,b))return $e(r,3,"Bad code word");_.c=16383&(h[g+4]<<8|h[g+3]),_.Td=h[g+4]>>6,_.i=16383&(h[g+6]<<8|h[g+5]),_.Ud=h[g+6]>>6,g+=7,b-=7,r.za=_.c+15>>4,r.Ub=_.i+15>>4,a.width=_.c,a.height=_.i,a.Da=0,a.j=0,a.v=0,a.va=a.width,a.o=a.height,a.da=0,a.ib=a.width,a.hb=a.height,a.U=a.width,a.T=a.height,o((w=r.Pa).jb,0,255,w.jb.length),e((w=r.Qa)!=null),w.Cb=0,w.Bb=0,w.Fb=1,o(w.Zb,0,0,w.Zb.length),o(w.Lb,0,0,w.Lb)}if(y.ub>b)return $e(r,7,"bad partition length");ct(w=r.m,h,g,y.ub),g+=y.ub,b-=y.ub,y.Rb&&(_.Ld=at(w),_.Kd=at(w)),_=r.Qa;var L,C=r.Pa;if(e(w!=null),e(_!=null),_.Cb=at(w),_.Cb){if(_.Bb=at(w),at(w)){for(_.Fb=at(w),L=0;4>L;++L)_.Zb[L]=at(w)?nt(w,7):0;for(L=0;4>L;++L)_.Lb[L]=at(w)?nt(w,6):0}if(_.Bb)for(L=0;3>L;++L)C.jb[L]=at(w)?pt(w,8):255}else _.Bb=0;if(w.Ka)return $e(r,3,"cannot parse segment header");if((_=r.ed).zd=at(w),_.Tb=pt(w,6),_.wb=pt(w,3),_.Pc=at(w),_.Pc&&at(w)){for(C=0;4>C;++C)at(w)&&(_.vd[C]=nt(w,6));for(C=0;4>C;++C)at(w)&&(_.od[C]=nt(w,6))}if(r.L=_.Tb==0?0:_.zd?1:2,w.Ka)return $e(r,3,"cannot parse filter header");var H=b;if(b=L=g,g=L+H,_=H,r.Xb=(1<_&&(Z=_),ct(r.Jc[+H],h,L,Z),L+=Z,_-=Z,b+=3}ct(r.Jc[+C],h,L,_),h=LZ;++Z){if(H.Cb){var F=H.Zb[Z];H.Fb||(F+=h)}else{if(0>16,8>W.Eb[1]&&(W.Eb[1]=8),W.Qc[0]=$s[rr(F+C,117)],W.Qc[1]=Ks[rr(F+L,127)],W.lc=F+L}if(!y.Rb)return $e(r,4,"Not a key frame.");for(at(w),y=r.Pa,h=0;4>h;++h){for(b=0;8>b;++b)for(g=0;3>g;++g)for(_=0;11>_;++_)C=dt(w,_h[h][b][g][_])?pt(w,8):yh[h][b][g][_],y.Wc[h][b].Yb[g][_]=C;for(b=0;17>b;++b)y.Xc[h][b]=y.Wc[h][Ah[b]]}return r.kc=at(w),r.kc&&(r.Bd=pt(w,8)),r.cb=1}function Ni(r,a,h,g,b,w,y){var _=a[b].Yb[h];for(h=0;16>b;++b){if(!dt(r,_[h+0]))return b;for(;!dt(r,_[h+1]);)if(_=a[++b].Yb[0],h=0,b==16)return 16;var L=a[b+1].Yb;if(dt(r,_[h+2])){var C=r,H=0;if(dt(C,(F=_)[(Z=h)+3]))if(dt(C,F[Z+6])){for(_=0,Z=2*(H=dt(C,F[Z+8]))+(F=dt(C,F[Z+9+H])),H=0,F=bh[Z];F[_];++_)H+=H+dt(C,F[_]);H+=3+(8<(C=r).b&&it(C);var Z,F=C.b,W=(Z=C.Ca>>1)-(C.I>>F)>>31;--C.b,C.Ca+=W,C.Ca|=1,C.I-=(Z+1&W)<>3),r[a+h+32*g]=-256&b?0>b?0:255:b}function Li(r,a,h,g,b,w){Pn(r,a,0,h,g+b),Pn(r,a,1,h,g+w),Pn(r,a,2,h,g-w),Pn(r,a,3,h,g-b)}function vr(r){return(20091*r>>16)+r}function sn(r,a,h,g){var b,w=0,y=s(16);for(b=0;4>b;++b){var _=r[a+0]+r[a+8],L=r[a+0]-r[a+8],C=(35468*r[a+4]>>16)-vr(r[a+12]),H=vr(r[a+4])+(35468*r[a+12]>>16);y[w+0]=_+H,y[w+1]=L+C,y[w+2]=L-C,y[w+3]=_-H,w+=4,a++}for(b=w=0;4>b;++b)_=(r=y[w+0]+4)+y[w+8],L=r-y[w+8],C=(35468*y[w+4]>>16)-vr(y[w+12]),Pn(h,g,0,0,_+(H=vr(y[w+4])+(35468*y[w+12]>>16))),Pn(h,g,1,0,L+C),Pn(h,g,2,0,L-C),Pn(h,g,3,0,_-H),w++,g+=32}function Oa(r,a,h,g){var b=r[a+0]+4,w=35468*r[a+4]>>16,y=vr(r[a+4]),_=35468*r[a+1]>>16;Li(h,g,0,b+y,r=vr(r[a+1]),_),Li(h,g,1,b+w,r,_),Li(h,g,2,b-w,r,_),Li(h,g,3,b-y,r,_)}function ks(r,a,h,g,b){sn(r,a,h,g),b&&sn(r,a+16,h,g+4)}function Ps(r,a,h,g){Ar(r,a+0,h,g,1),Ar(r,a+32,h,g+128,1)}function Is(r,a,h,g){var b;for(r=r[a+0]+4,b=0;4>b;++b)for(a=0;4>a;++a)Pn(h,g,a,b,r)}function ar(r,a,h,g){r[a+0]&&dn(r,a+0,h,g),r[a+16]&&dn(r,a+16,h,g+4),r[a+32]&&dn(r,a+32,h,g+128),r[a+48]&&dn(r,a+48,h,g+128+4)}function ja(r,a,h,g){var b,w=s(16);for(b=0;4>b;++b){var y=r[a+0+b]+r[a+12+b],_=r[a+4+b]+r[a+8+b],L=r[a+4+b]-r[a+8+b],C=r[a+0+b]-r[a+12+b];w[0+b]=y+_,w[8+b]=y-_,w[4+b]=C+L,w[12+b]=C-L}for(b=0;4>b;++b)y=(r=w[0+4*b]+3)+w[3+4*b],_=w[1+4*b]+w[2+4*b],L=w[1+4*b]-w[2+4*b],C=r-w[3+4*b],h[g+0]=y+_>>3,h[g+16]=C+L>>3,h[g+32]=y-_>>3,h[g+48]=C-L>>3,g+=64}function Si(r,a,h){var g,b=a-32,w=In,y=255-r[b-1];for(g=0;gh;++h)i(r,a+32*h,r,a-32,16)}function Es(r,a){var h;for(h=16;0g;++g)o(a,h+32*g,r,16)}function Ba(r,a){var h,g=16;for(h=0;16>h;++h)g+=r[a-1+32*h]+r[a+h-32];Fr(g>>5,r,a)}function Er(r,a){var h,g=8;for(h=0;16>h;++h)g+=r[a-1+32*h];Fr(g>>4,r,a)}function Os(r,a){var h,g=8;for(h=0;16>h;++h)g+=r[a+h-32];Fr(g>>4,r,a)}function Zr(r,a){Fr(128,r,a)}function Jt(r,a,h){return r+2*a+h+2>>2}function js(r,a){var h,g=a-32;for(g=new Uint8Array([Jt(r[g-1],r[g+0],r[g+1]),Jt(r[g+0],r[g+1],r[g+2]),Jt(r[g+1],r[g+2],r[g+3]),Jt(r[g+2],r[g+3],r[g+4])]),h=0;4>h;++h)i(r,a+32*h,g,0,g.length)}function Bs(r,a){var h=r[a-1],g=r[a-1+32],b=r[a-1+64],w=r[a-1+96];_t(r,a+0,16843009*Jt(r[a-1-32],h,g)),_t(r,a+32,16843009*Jt(h,g,b)),_t(r,a+64,16843009*Jt(g,b,w)),_t(r,a+96,16843009*Jt(b,w,w))}function Ms(r,a){var h,g=4;for(h=0;4>h;++h)g+=r[a+h-32]+r[a-1+32*h];for(g>>=3,h=0;4>h;++h)o(r,a+32*h,g,4)}function Rs(r,a){var h=r[a-1+0],g=r[a-1+32],b=r[a-1+64],w=r[a-1-32],y=r[a+0-32],_=r[a+1-32],L=r[a+2-32],C=r[a+3-32];r[a+0+96]=Jt(g,b,r[a-1+96]),r[a+1+96]=r[a+0+64]=Jt(h,g,b),r[a+2+96]=r[a+1+64]=r[a+0+32]=Jt(w,h,g),r[a+3+96]=r[a+2+64]=r[a+1+32]=r[a+0+0]=Jt(y,w,h),r[a+3+64]=r[a+2+32]=r[a+1+0]=Jt(_,y,w),r[a+3+32]=r[a+2+0]=Jt(L,_,y),r[a+3+0]=Jt(C,L,_)}function Ts(r,a){var h=r[a+1-32],g=r[a+2-32],b=r[a+3-32],w=r[a+4-32],y=r[a+5-32],_=r[a+6-32],L=r[a+7-32];r[a+0+0]=Jt(r[a+0-32],h,g),r[a+1+0]=r[a+0+32]=Jt(h,g,b),r[a+2+0]=r[a+1+32]=r[a+0+64]=Jt(g,b,w),r[a+3+0]=r[a+2+32]=r[a+1+64]=r[a+0+96]=Jt(b,w,y),r[a+3+32]=r[a+2+64]=r[a+1+96]=Jt(w,y,_),r[a+3+64]=r[a+2+96]=Jt(y,_,L),r[a+3+96]=Jt(_,L,L)}function br(r,a){var h=r[a-1+0],g=r[a-1+32],b=r[a-1+64],w=r[a-1-32],y=r[a+0-32],_=r[a+1-32],L=r[a+2-32],C=r[a+3-32];r[a+0+0]=r[a+1+64]=w+y+1>>1,r[a+1+0]=r[a+2+64]=y+_+1>>1,r[a+2+0]=r[a+3+64]=_+L+1>>1,r[a+3+0]=L+C+1>>1,r[a+0+96]=Jt(b,g,h),r[a+0+64]=Jt(g,h,w),r[a+0+32]=r[a+1+96]=Jt(h,w,y),r[a+1+32]=r[a+2+96]=Jt(w,y,_),r[a+2+32]=r[a+3+96]=Jt(y,_,L),r[a+3+32]=Jt(_,L,C)}function wr(r,a){var h=r[a+0-32],g=r[a+1-32],b=r[a+2-32],w=r[a+3-32],y=r[a+4-32],_=r[a+5-32],L=r[a+6-32],C=r[a+7-32];r[a+0+0]=h+g+1>>1,r[a+1+0]=r[a+0+64]=g+b+1>>1,r[a+2+0]=r[a+1+64]=b+w+1>>1,r[a+3+0]=r[a+2+64]=w+y+1>>1,r[a+0+32]=Jt(h,g,b),r[a+1+32]=r[a+0+96]=Jt(g,b,w),r[a+2+32]=r[a+1+96]=Jt(b,w,y),r[a+3+32]=r[a+2+96]=Jt(w,y,_),r[a+3+64]=Jt(y,_,L),r[a+3+96]=Jt(_,L,C)}function Ds(r,a){var h=r[a-1+0],g=r[a-1+32],b=r[a-1+64],w=r[a-1+96];r[a+0+0]=h+g+1>>1,r[a+2+0]=r[a+0+32]=g+b+1>>1,r[a+2+32]=r[a+0+64]=b+w+1>>1,r[a+1+0]=Jt(h,g,b),r[a+3+0]=r[a+1+32]=Jt(g,b,w),r[a+3+32]=r[a+1+64]=Jt(b,w,w),r[a+3+64]=r[a+2+64]=r[a+0+96]=r[a+1+96]=r[a+2+96]=r[a+3+96]=w}function qs(r,a){var h=r[a-1+0],g=r[a-1+32],b=r[a-1+64],w=r[a-1+96],y=r[a-1-32],_=r[a+0-32],L=r[a+1-32],C=r[a+2-32];r[a+0+0]=r[a+2+32]=h+y+1>>1,r[a+0+32]=r[a+2+64]=g+h+1>>1,r[a+0+64]=r[a+2+96]=b+g+1>>1,r[a+0+96]=w+b+1>>1,r[a+3+0]=Jt(_,L,C),r[a+2+0]=Jt(y,_,L),r[a+1+0]=r[a+3+32]=Jt(h,y,_),r[a+1+32]=r[a+3+64]=Jt(g,h,y),r[a+1+64]=r[a+3+96]=Jt(b,g,h),r[a+1+96]=Jt(w,b,g)}function Pi(r,a){var h;for(h=0;8>h;++h)i(r,a+32*h,r,a-32,8)}function ia(r,a){var h;for(h=0;8>h;++h)o(r,a,r[a-1],8),a+=32}function sr(r,a,h){var g;for(g=0;8>g;++g)o(a,h+32*g,r,8)}function Us(r,a){var h,g=8;for(h=0;8>h;++h)g+=r[a+h-32]+r[a-1+32*h];sr(g>>4,r,a)}function Ii(r,a){var h,g=4;for(h=0;8>h;++h)g+=r[a+h-32];sr(g>>3,r,a)}function zs(r,a){var h,g=4;for(h=0;8>h;++h)g+=r[a-1+32*h];sr(g>>3,r,a)}function aa(r,a){sr(128,r,a)}function Or(r,a,h){var g=r[a-h],b=r[a+0],w=3*(b-g)+Ws[1020+r[a-2*h]-r[a+h]],y=Wa[112+(w+4>>3)];r[a-h]=In[255+g+Wa[112+(w+3>>3)]],r[a+0]=In[255+b-y]}function sa(r,a,h,g){var b=r[a+0],w=r[a+h];return Un[255+r[a-2*h]-r[a-h]]>g||Un[255+w-b]>g}function Qr(r,a,h,g){return 4*Un[255+r[a-h]-r[a+0]]+Un[255+r[a-2*h]-r[a+h]]<=g}function oa(r,a,h,g,b){var w=r[a-3*h],y=r[a-2*h],_=r[a-h],L=r[a+0],C=r[a+h],H=r[a+2*h],Z=r[a+3*h];return 4*Un[255+_-L]+Un[255+y-C]>g?0:Un[255+r[a-4*h]-w]<=b&&Un[255+w-y]<=b&&Un[255+y-_]<=b&&Un[255+Z-H]<=b&&Un[255+H-C]<=b&&Un[255+C-L]<=b}function Ci(r,a,h,g){var b=2*g+1;for(g=0;16>g;++g)Qr(r,a+g,h,b)&&Or(r,a+g,h)}function la(r,a,h,g){var b=2*g+1;for(g=0;16>g;++g)Qr(r,a+g*h,1,b)&&Or(r,a+g*h,1)}function Fi(r,a,h,g){var b;for(b=3;0>7,ut=18*ht+63>>7,ht=9*ht+63>>7;L[C-3*H]=In[255+L[C-3*H]+ht],L[C-2*H]=In[255+Z+ut],L[C-H]=In[255+F+X],L[C+0]=In[255+W-X],L[C+H]=In[255+K-ut],L[C+2*H]=In[255+ot-ht]}a+=g}}function xr(r,a,h,g,b,w,y,_){for(w=2*w+1;0>3)],ot=Wa[112+(ot+3>>3)],X=K+1>>1;L[C-2*H]=In[255+L[C-2*H]+X],L[C-H]=In[255+Z+ot],L[C+0]=In[255+F-K],L[C+H]=In[255+W-X]}a+=g}}function Ra(r,a,h,g,b,w){yr(r,a,h,1,16,g,b,w)}function Ta(r,a,h,g,b,w){yr(r,a,1,h,16,g,b,w)}function Da(r,a,h,g,b,w){var y;for(y=3;0C?0:255:C)&255,C=L,b[w+_]=H}}function Ke(r,a,h,g){var b=a.width,w=a.o;if(e(r!=null&&a!=null),0>h||0>=g||h+g>w)return null;if(!r.Cc){if(r.ga==null){var y;if(r.ga=new Ft,(y=r.ga==null)||(y=a.width*a.o,e(r.Gb.length==0),r.Gb=s(y),r.Uc=0,r.Gb==null?y=0:(r.mb=r.Gb,r.nb=r.Uc,r.rc=null,y=1),y=!y),!y){y=r.ga;var _=r.Fa,L=r.P,C=r.qc,H=r.mb,Z=r.nb,F=L+1,W=C-1,K=y.l;if(e(_!=null&&H!=null&&a!=null),qr[0]=null,qr[1]=Kt,qr[2]=te,qr[3]=de,y.ca=H,y.tb=Z,y.c=a.width,y.i=a.height,e(0=C)a=0;else if(y.$a=3&_[L+0],y.Z=_[L+0]>>2&3,y.Lc=_[L+0]>>4&3,L=_[L+0]>>6&3,0>y.$a||1=y.c*y.i;y=!a}if(y)return null;r.ga.Lc!=1?r.Ga=0:g=w-h}e(r.ga!=null),e(h+g<=w);t:{if(a=(_=r.ga).c,w=_.l.o,_.$a==0){if(F=r.rc,W=r.Vc,K=r.Fa,L=r.P+1+h*a,C=r.mb,H=r.nb+h*a,e(L<=r.P+r.qc),_.Z!=0)for(e(qr[_.Z]!=null),y=0;y=a)a=1;else if(_.ic||Re(),_.ic){_=y.V,F=y.Ba,W=y.c;var ot=y.i,X=(K=1,L=y.$/W,C=y.$%W,H=y.m,Z=y.s,y.$),ut=W*ot,ht=W*a,wt=Z.wc,vt=X(ot=Te(vt.G[0],vt.H[0],H)))_[F+X]=ot,++X,++C>=W&&(C=0,++L<=a&&!(L%16)&&Vn(y,L));else{if(!(280>ot)){K=0;break e}ot=Mn(ot-256,H);var Mt,Pt=Te(vt.G[4],vt.H[4],H);if(Q(H),!(X>=(Pt=Rn(W,Pt=Mn(Pt,H)))&&ut-X>=ot)){K=0;break e}for(Mt=0;Mt=W;)C-=W,++L<=a&&!(L%16)&&Vn(y,L);Xa?a:L);break e}!K||H.h&&X=w&&(r.Cc=1),g=1}if(!g)return null;if(r.Cc&&((g=r.ga)!=null&&(g.mc=null),r.ga=null,0>23,_[L+4*y+1]=_[L+4*y+1]*Z>>23,_[L+4*y+2]=_[L+4*y+2]*Z>>23)}a+=w}}function _e(r,a,h,g,b){for(;0>4)*L>>16;r[a+2*w+0]=(240&y|y>>4)*L>>16&240|(15&y|y<<4)*L>>16>>4&15,r[a+2*w+1]=240&C|_}a+=b}}function Fe(r,a,h,g,b,w,y,_){var L,C,H=255;for(C=0;C>8}function Re(){ma=Ae,zo=_e,Ho=Fe,Wo=Me}function cn(r,a,h){z[r]=function(g,b,w,y,_,L,C,H,Z,F,W,K,ot,X,ut,ht,wt){var vt,Mt=wt-1>>1,Pt=_[L+0]|C[H+0]<<16,re=Z[F+0]|W[K+0]<<16;e(g!=null);var Ot=3*Pt+re+131074>>2;for(a(g[b+0],255&Ot,Ot>>16,ot,X),w!=null&&(Ot=3*re+Pt+131074>>2,a(w[y+0],255&Ot,Ot>>16,ut,ht)),vt=1;vt<=Mt;++vt){var fe=_[L+vt]|C[H+vt]<<16,Qe=Z[F+vt]|W[K+vt]<<16,ie=Pt+fe+re+Qe+524296,jt=ie+2*(fe+re)>>3;Ot=jt+Pt>>1,Pt=(ie=ie+2*(Pt+Qe)>>3)+fe>>1,a(g[b+2*vt-1],255&Ot,Ot>>16,ot,X+(2*vt-1)*h),a(g[b+2*vt-0],255&Pt,Pt>>16,ot,X+(2*vt-0)*h),w!=null&&(Ot=ie+re>>1,Pt=jt+Qe>>1,a(w[y+2*vt-1],255&Ot,Ot>>16,ut,ht+(2*vt-1)*h),a(w[y+2*vt+0],255&Pt,Pt>>16,ut,ht+(2*vt+0)*h)),Pt=fe,re=Qe}1&wt||(Ot=3*Pt+re+131074>>2,a(g[b+wt-1],255&Ot,Ot>>16,ot,X+(wt-1)*h),w!=null&&(Ot=3*re+Pt+131074>>2,a(w[y+wt-1],255&Ot,Ot>>16,ut,ht+(wt-1)*h)))}}function _r(){zn[Va]=Lh,zn[Ga]=el,zn[Ko]=Sh,zn[Ya]=nl,zn[Ja]=rl,zn[Vs]=il,zn[Xo]=kh,zn[Gs]=el,zn[Ys]=nl,zn[$a]=rl,zn[Js]=il}function ua(r){return r&-16384?0>r?0:255:r>>Ph}function ei(r,a){return ua((19077*r>>8)+(26149*a>>8)-14234)}function ni(r,a,h){return ua((19077*r>>8)-(6419*a>>8)-(13320*h>>8)+8708)}function jr(r,a){return ua((19077*r>>8)+(33050*a>>8)-17685)}function ri(r,a,h,g,b){g[b+0]=ei(r,h),g[b+1]=ni(r,a,h),g[b+2]=jr(r,a)}function Ei(r,a,h,g,b){g[b+0]=jr(r,a),g[b+1]=ni(r,a,h),g[b+2]=ei(r,h)}function Oi(r,a,h,g,b){var w=ni(r,a,h);a=w<<3&224|jr(r,a)>>3,g[b+0]=248&ei(r,h)|w>>5,g[b+1]=a}function fn(r,a,h,g,b){var w=240&jr(r,a)|15;g[b+0]=240&ei(r,h)|ni(r,a,h)>>4,g[b+1]=w}function ii(r,a,h,g,b){g[b+0]=255,ri(r,a,h,g,b+1)}function ai(r,a,h,g,b){Ei(r,a,h,g,b),g[b+3]=255}function ha(r,a,h,g,b){ri(r,a,h,g,b),g[b+3]=255}function or(r,a,h){z[r]=function(g,b,w,y,_,L,C,H,Z){for(var F=H+(-2&Z)*h;H!=F;)a(g[b+0],w[y+0],_[L+0],C,H),a(g[b+1],w[y+0],_[L+0],C,H+h),b+=2,++y,++L,H+=2*h;1&Z&&a(g[b+0],w[y+0],_[L+0],C,H)}}function wn(r,a,h){return h==0?r==0?a==0?6:5:a==0?4:0:h}function Ua(r,a,h,g,b){switch(r>>>30){case 3:Ar(a,h,g,b,0);break;case 2:Tr(a,h,g,b);break;case 1:dn(a,h,g,b)}}function ji(r,a){var h,g,b=a.M,w=a.Nb,y=r.oc,_=r.pc+40,L=r.oc,C=r.pc+584,H=r.oc,Z=r.pc+600;for(h=0;16>h;++h)y[_+32*h-1]=129;for(h=0;8>h;++h)L[C+32*h-1]=129,H[Z+32*h-1]=129;for(0h;++h)i(y,_+32*h-4,y,_+32*h+12,4);for(h=-1;8>h;++h)i(L,C+32*h-4,L,C+32*h+4,4),i(H,Z+32*h-4,H,Z+32*h+4,4)}var W=r.Gd,K=r.Hd+g,ot=F.ad,X=F.Hc;if(0=r.za-1?o(ut,ht,W[K].y[15],4):i(ut,ht,W[K+1].y,0,4)),h=0;4>h;h++)ut[ht+128+h]=ut[ht+256+h]=ut[ht+384+h]=ut[ht+0+h];for(h=0;16>h;++h,X<<=2)ut=y,ht=_+sl[h],Jn[F.Ob[h]](ut,ht),Ua(X,ot,16*+h,ut,ht)}else if(ut=wn(g,b,F.Ob[0]),Dr[ut](y,_),X!=0)for(h=0;16>h;++h,X<<=2)Ua(X,ot,16*+h,y,_+sl[h]);for(h=F.Gc,ut=wn(g,b,F.Dd),Lr[ut](L,C),Lr[ut](H,Z),X=ot,ut=L,ht=C,255&(F=0|h)&&(170&F?Di(X,256,ut,ht):ur(X,256,ut,ht)),F=H,X=Z,255&(h>>=8)&&(170&h?Di(ot,320,F,X):ur(ot,320,F,X)),bh;++h)i(W,K+h*r.R,y,_+32*h,16);for(h=0;8>h;++h)i(ot,F+h*r.B,L,C+32*h,8),i(X,ut+h*r.B,H,Z+32*h,8)}}function za(r,a,h,g,b,w,y,_,L){var C=[0],H=[0],Z=0,F=L!=null?L.kd:0,W=L!=null?L:new G;if(r==null||12>h)return 7;W.data=r,W.w=a,W.ha=h,a=[a],h=[h],W.gb=[W.gb];t:{var K=a,ot=h,X=W.gb;if(e(r!=null),e(ot!=null),e(X!=null),X[0]=0,12<=ot[0]&&!t(r,K[0],"RIFF")){if(t(r,K[0]+8,"WEBP")){X=3;break t}var ut=zt(r,K[0]+4);if(12>ut||4294967286ot[0]-8){X=7;break t}X[0]=ut,K[0]+=12,ot[0]-=12}X=0}if(X!=0)return X;for(ut=0X[0])X=7;else{if(!t(ht,ot[0],"VP8X")){if(zt(ht,ot[0]+4)!=10){X=3;break t}if(18>X[0]){X=7;break t}var Pt=zt(ht,ot[0]+8),re=1+kt(ht,ot[0]+12);if(2147483648<=re*(ht=1+kt(ht,ot[0]+15))){X=3;break t}Mt!=null&&(Mt[0]=Pt),wt!=null&&(wt[0]=re),vt!=null&&(vt[0]=ht),ot[0]+=18,X[0]-=18,Ot[0]=1}X=0}}if(Z=Z[0],K=K[0],X!=0)return X;if(ot=!!(2&K),!ut&&Z)return 3;if(w!=null&&(w[0]=!!(16&K)),y!=null&&(y[0]=ot),_!=null&&(_[0]=0),y=C[0],K=H[0],Z&&ot&&L==null){X=0;break}if(4>h){X=7;break}if(ut&&Z||!ut&&!Z&&!t(r,a[0],"ALPH")){h=[h],W.na=[W.na],W.P=[W.P],W.Sa=[W.Sa];t:{Pt=r,X=a,ut=h;var Ot=W.gb;wt=W.na,vt=W.P,Mt=W.Sa,re=22,e(Pt!=null),e(ut!=null),ht=X[0];var fe=ut[0];for(e(wt!=null),e(Mt!=null),wt[0]=null,vt[0]=null,Mt[0]=0;;){if(X[0]=ht,ut[0]=fe,8>fe){X=7;break t}var Qe=zt(Pt,ht+4);if(4294967286Ot){X=3;break t}if(!t(Pt,ht,"VP8 ")||!t(Pt,ht,"VP8L")){X=0;break t}if(fe[0]ut[0])X=7;else{if(ht||re){if(Ot=zt(Ot,Pt+4),12<=wt&&Ot>wt-12){X=3;break t}if(F&&Ot>ut[0]-8){X=7;break t}vt[0]=Ot,X[0]+=8,ut[0]-=8,Mt[0]=re}else Mt[0]=5<=ut[0]&&Ot[Pt+0]==47&&!(Ot[Pt+4]>>5),vt[0]=ut[0];X=0}if(h=h[0],W.Ja=W.Ja[0],W.xa=W.xa[0],a=a[0],X!=0)break;if(4294967286h){X=7;break}_=y,F=K,ot=w,r==null||5>h?r=0:5<=h&&r[a+0]==47&&!(r[a+4]>>5)?(ut=[0],Ot=[0],wt=[0],ft(vt=new j,r,a,h),mr(vt,ut,Ot,wt)?(_!=null&&(_[0]=ut[0]),F!=null&&(F[0]=Ot[0]),ot!=null&&(ot[0]=wt[0]),r=1):r=0):r=0}else{if(10>h){X=7;break}_=K,r==null||10>h||!Ea(r,a+3,h-3)?r=0:(F=r[a+0]|r[a+1]<<8|r[a+2]<<16,ot=16383&(r[a+7]<<8|r[a+6]),r=16383&(r[a+9]<<8|r[a+8]),1&F||3<(F>>1&7)||!(F>>4&1)||F>>5>=W.Ja||!ot||!r?r=0:(y&&(y[0]=ot),_&&(_[0]=r),r=1))}if(!r||(y=y[0],K=K[0],Z&&(C[0]!=y||H[0]!=K)))return 3;L!=null&&(L[0]=W,L.offset=a-L.w,e(4294967286>a-L.w),e(L.offset==L.ha-h));break}return X==0||X==7&&Z&&L==null?(w!=null&&(w[0]|=W.na!=null&&0h||(w&=-2,y&=-2),0>w||0>y||0>=_||0>=L||w+_>g||y+L>b))return 0;if(a.v=w,a.j=y,a.va=w+_,a.o=y+L,a.U=_,a.T=L,a.da=r!=null&&0r.S){var a=r.f.RGBA;a.fb+=(r.height-1)*a.A,a.A=-a.A}else a=r.f.kb,r=r.height,a.O+=(r-1)*a.fa,a.fa=-a.fa,a.N+=(r-1>>1)*a.Ab,a.Ab=-a.Ab,a.W+=(r-1>>1)*a.Db,a.Db=-a.Db,a.F!=null&&(a.J+=(r-1)*a.lb,a.lb=-a.lb);return 0}function ca(r,a,h,g){if(g==null||0>=r||0>=a)return 2;if(h!=null){if(h.Da){var b=h.cd,w=h.bd,y=-2&h.v,_=-2&h.j;if(0>y||0>_||0>=b||0>=w||y+b>r||_+w>a)return 2;r=b,a=w}if(h.da){if(!Ht(r,a,b=[h.ib],w=[h.hb]))return 2;r=b[0],a=w[0]}}g.width=r,g.height=a;t:{var L=g.width,C=g.height;if(r=g.S,0>=L||0>=C||!(r>=Va&&13>r))r=2;else{if(0>=g.Rd&&g.sd==null){y=w=b=a=0;var H=(_=L*ol[r])*C;if(11>r||(w=(C+1)/2*(a=(L+1)/2),r==12&&(y=(b=L)*C)),(C=s(H+2*w+y))==null){r=1;break t}g.sd=C,11>r?((L=g.f.RGBA).eb=C,L.fb=0,L.A=_,L.size=H):((L=g.f.kb).y=C,L.O=0,L.fa=_,L.Fd=H,L.f=C,L.N=0+H,L.Ab=a,L.Cd=w,L.ea=C,L.W=0+H+w,L.Db=a,L.Ed=w,r==12&&(L.F=C,L.J=0+H+2*w),L.Tc=y,L.lb=b)}if(a=1,b=g.S,w=g.width,y=g.height,b>=Va&&13>b)if(11>b)r=g.f.RGBA,a&=(_=Math.abs(r.A))*(y-1)+w<=r.size,a&=_>=w*ol[b],a&=r.eb!=null;else{r=g.f.kb,_=(w+1)/2,H=(y+1)/2,L=Math.abs(r.fa),C=Math.abs(r.Ab);var Z=Math.abs(r.Db),F=Math.abs(r.lb),W=F*(y-1)+w;a&=L*(y-1)+w<=r.Fd,a&=C*(H-1)+_<=r.Cd,a=(a&=Z*(H-1)+_<=r.Ed)&L>=w&C>=_&Z>=_,a&=r.y!=null,a&=r.f!=null,a&=r.ea!=null,b==12&&(a&=F>=w,a&=W<=r.Tc,a&=r.F!=null)}else a=0;r=a?0:2}}return r!=0||h!=null&&h.fd&&(r=si(g)),r}var Bi=64,oi=[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],fa=24,yn=32,Nn=8,Mi=[0,0,1,1,2,2,2,2,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7];It("Predictor0","PredictorAdd0"),z.Predictor0=function(){return 4278190080},z.Predictor1=function(r){return r},z.Predictor2=function(r,a,h){return a[h+0]},z.Predictor3=function(r,a,h){return a[h+1]},z.Predictor4=function(r,a,h){return a[h-1]},z.Predictor5=function(r,a,h){return Dt(Dt(r,a[h+1]),a[h+0])},z.Predictor6=function(r,a,h){return Dt(r,a[h-1])},z.Predictor7=function(r,a,h){return Dt(r,a[h+0])},z.Predictor8=function(r,a,h){return Dt(a[h-1],a[h+0])},z.Predictor9=function(r,a,h){return Dt(a[h+0],a[h+1])},z.Predictor10=function(r,a,h){return Dt(Dt(r,a[h-1]),Dt(a[h+0],a[h+1]))},z.Predictor11=function(r,a,h){var g=a[h+0];return 0>=Zt(g>>24&255,r>>24&255,(a=a[h-1])>>24&255)+Zt(g>>16&255,r>>16&255,a>>16&255)+Zt(g>>8&255,r>>8&255,a>>8&255)+Zt(255&g,255&r,255&a)?g:r},z.Predictor12=function(r,a,h){var g=a[h+0];return(ve((r>>24&255)+(g>>24&255)-((a=a[h-1])>>24&255))<<24|ve((r>>16&255)+(g>>16&255)-(a>>16&255))<<16|ve((r>>8&255)+(g>>8&255)-(a>>8&255))<<8|ve((255&r)+(255&g)-(255&a)))>>>0},z.Predictor13=function(r,a,h){var g=a[h-1];return(ue((r=Dt(r,a[h+0]))>>24&255,g>>24&255)<<24|ue(r>>16&255,g>>16&255)<<16|ue(r>>8&255,g>>8&255)<<8|ue(255&r,255&g))>>>0};var Br=z.PredictorAdd0;z.PredictorAdd1=ce,It("Predictor2","PredictorAdd2"),It("Predictor3","PredictorAdd3"),It("Predictor4","PredictorAdd4"),It("Predictor5","PredictorAdd5"),It("Predictor6","PredictorAdd6"),It("Predictor7","PredictorAdd7"),It("Predictor8","PredictorAdd8"),It("Predictor9","PredictorAdd9"),It("Predictor10","PredictorAdd10"),It("Predictor11","PredictorAdd11"),It("Predictor12","PredictorAdd12"),It("Predictor13","PredictorAdd13");var Mr=z.PredictorAdd2;Rt("ColorIndexInverseTransform","MapARGB","32b",function(r){return r>>8&255},function(r){return r}),Rt("VP8LColorIndexInverseTransformAlpha","MapAlpha","8b",function(r){return r},function(r){return r>>8&255});var Ri,li=z.ColorIndexInverseTransform,Xe=z.MapARGB,Hs=z.VP8LColorIndexInverseTransformAlpha,lr=z.MapAlpha,Yn=z.VP8LPredictorsAdd=[];Yn.length=16,(z.VP8LPredictors=[]).length=16,(z.VP8LPredictorsAdd_C=[]).length=16,(z.VP8LPredictors_C=[]).length=16;var ui,da,pa,Ti,hi,ci,Rr,Ar,Tr,Di,dn,ur,Pe,Ie,He,Ze,Nr,ga,qi,Ha,To,Do,qo,Uo,ma,zo,Ho,Wo,Vo=s(511),Go=s(2041),Yo=s(225),Jo=s(767),$o=0,Ws=Go,Wa=Yo,In=Jo,Un=Vo,Va=0,Ga=1,Ko=2,Ya=3,Ja=4,Vs=5,Xo=6,Gs=7,Ys=8,$a=9,Js=10,ch=[2,3,7],fh=[3,3,11],Zo=[280,256,256,256,40],dh=[0,1,1,1,0],ph=[17,18,0,1,2,3,4,5,16,6,7,8,9,10,11,12,13,14,15],gh=[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],mh=[2954,2956,2958,2962,2970,2986,3018,3082,3212,3468,3980,5004],vh=8,$s=[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],Ks=[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],va=null,bh=[[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]],wh=[0,1,4,8,5,2,3,6,9,12,13,10,7,11,14,15],Qo=[-0,1,-1,2,-2,3,4,6,-3,5,-4,-5,-6,7,-7,8,-8,-9],yh=[[[[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]]]],xh=[[[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]]],_h=[[[[255,255,255,255,255,255,255,255,255,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]]]],Ah=[0,1,2,3,6,4,5,6,6,6,6,6,6,6,6,7,0],Dr=[],Jn=[],Lr=[],Nh=1,tl=2,qr=[],zn=[];cn("UpsampleRgbLinePair",ri,3),cn("UpsampleBgrLinePair",Ei,3),cn("UpsampleRgbaLinePair",ha,4),cn("UpsampleBgraLinePair",ai,4),cn("UpsampleArgbLinePair",ii,4),cn("UpsampleRgba4444LinePair",fn,2),cn("UpsampleRgb565LinePair",Oi,2);var Lh=z.UpsampleRgbLinePair,Sh=z.UpsampleBgrLinePair,el=z.UpsampleRgbaLinePair,nl=z.UpsampleBgraLinePair,rl=z.UpsampleArgbLinePair,il=z.UpsampleRgba4444LinePair,kh=z.UpsampleRgb565LinePair,Ka=16,Xa=1<g.ca.S||(alert("todo:WebPInitConvertARGBToYUV"),g.ca.f.kb.F!=null&&Re()),g.Pb&&0(L=h.Md)?0:100C;++C)12>(Z=b.pb[C]).lc&&(Z.ia=L*Bh[0>Z.lc?0:Z.lc]>>3),H|=Z.ia;H&&(alert("todo:VP8InitRandom"),b.ia=1)}b.Ga=h.Id,100b.Ga&&(b.Ga=0)}(function(F,W){if(F==null)return 0;if(W==null)return $e(F,2,"NULL VP8Io parameter in VP8Decode().");if(!F.cb&&!ir(F,W))return 0;if(e(F.cb),W.ac==null||W.ac(W)){W.ob&&(F.L=0);var K=Za[F.L];if(F.L==2?(F.yb=0,F.zb=0):(F.yb=W.v-K>>4,F.zb=W.j-K>>4,0>F.yb&&(F.yb=0),0>F.zb&&(F.zb=0)),F.Va=W.o+15+K>>4,F.Hb=W.va+15+K>>4,F.Hb>F.za&&(F.Hb=F.za),F.Va>F.Ub&&(F.Va=F.Ub),0K;++K){var X;if(F.Qa.Cb){var ut=F.Qa.Lb[K];F.Qa.Fb||(ut+=ot.Tb)}else ut=ot.Tb;for(X=0;1>=X;++X){var ht=F.gd[K][X],wt=ut;if(ot.Pc&&(wt+=ot.vd[0],X&&(wt+=ot.od[0])),0<(wt=0>wt?0:63>2:vt>>1)>9-ot.wb&&(vt=9-ot.wb),1>vt&&(vt=1),ht.dd=vt,ht.tc=2*wt+vt,ht.ld=40<=wt?2:15<=wt?1:0}else ht.tc=0;ht.La=X}}}K=0}else $e(F,6,"Frame setup failed"),K=F.a;if(K=K==0){if(K){F.$c=0,0F.Vb){if(F.Vb=0,F.Ec=s(ht),F.Fc=0,F.Ec==null){K=$e(F,1,"no memory during frame initialization.");break e}F.Vb=ht}ht=F.Ec,wt=F.Fc,F.Ac=ht,F.Bc=wt,wt+=ot,F.Gd=f(Mt,Ca),F.Hd=0,F.rb=f(Pt+1,ta),F.sb=1,F.wa=re?f(re,Dn):null,F.Y=0,F.D.Nb=0,F.D.wa=F.wa,F.D.Y=F.Y,0=K;++K)Vo[255+K]=0>K?-K:K;for(K=-1020;1020>=K;++K)Go[1020+K]=-128>K?-128:127=K;++K)Yo[112+K]=-16>K?-16:15=K;++K)Jo[255+K]=0>K?0:255pe;++pe){var tn,me=xn[0+pe];for(tn=0;4>tn;++tn){me=xh[Ee[on+tn]][me];for(var we=Qo[dt(ee,me[0])];0>3;for(we=0;256>we;we+=16)pe[pn+we]=Ln}ln=1,$n=on[0]}var Ne=15&ee.la,en=15&_n.la;for(we=0;4>we;++we){var Cn=1&en;for(Ln=ye=0;4>Ln;++Ln)Ne=Ne>>1|(Cn=(Ve=va(Ee,$n,Ve=Cn+(1&Ne),De.Sc,ln,pe,pn))>ln)<<7,ye=ye<<2|(3>=4,en=en>>1|Cn<<7,tn=(tn<<8|ye)>>>0}for($n=Ne,ln=en>>4,qe=0;4>qe;qe+=2){for(ye=0,Ne=ee.la>>4+qe,en=_n.la>>4+qe,we=0;2>we;++we){for(Cn=1&en,Ln=0;2>Ln;++Ln)Ve=Cn+(1&Ne),Ne=Ne>>1|(Cn=0<(Ve=va(Ee,on[2],Ve,De.Qc,0,pe,pn)))<<3,ye=ye<<2|(3>=2,en=en>>1|Cn<<5}me|=ye<<4*qe,$n|=Ne<<4<=jt.zb&&jt.M<=jt.Va,jt.Aa==0)e:{if(ie.M=jt.M,ie.uc=ee,ji(jt,ie),We=1,ie=(ye=jt.D).Nb,ee=(me=Za[jt.L])*jt.R,Ee=me/2*jt.B,we=16*ie*jt.R,Ln=8*ie*jt.B,on=jt.sa,xn=jt.ta-ee+we,De=jt.qa,pe=jt.ra-Ee+Ln,pn=jt.Ha,_n=jt.Ia-Ee+Ln,en=(Ne=ye.M)==0,tn=Ne>=jt.Va-1,jt.Aa==2&&ji(jt,ye),ye.uc)for(Cn=(Ve=jt).D.M,e(Ve.D.uc),ye=Ve.yb;yeNt.o&&(Ne=Nt.o),Nt.F=null,Nt.J=null,jt.Fa!=null&&0>1),Nt.W+=jt.B*(me>>1),Nt.F!=null&&(Nt.J+=Nt.width*me)),ye>1,Nt.W+=Nt.v>>1,Nt.F!=null&&(Nt.J+=Nt.v),Nt.ka=ye-Nt.j,Nt.U=Nt.va-Nt.v,Nt.T=Ne-ye,We=Nt.put(Nt))}ie+1!=jt.Ic||tn||(i(jt.sa,jt.ta-ee,on,xn+16*jt.R,ee),i(jt.qa,jt.ra-Ee,De,pe+8*jt.B,Ee),i(jt.Ha,jt.Ia-Ee,pn,_n+8*jt.B,Ee))}if(!We)return $e(fe,6,"Output aborted.")}return 1})(F,W)),W.bc!=null&&W.bc(W),K&=1}return K?(F.cb=0,K):0})(r,g)||(a=r.a)}}else a=r.a}a==0&&y.Oa!=null&&y.Oa.fd&&(a=si(y.ba))}y=a}w=y!=0?null:11>w?_.f.RGBA.eb:_.f.kb.y}else w=null;return w};var ol=[3,4,3,4,4,2,2,4,4,4,2,1,1]};function d(z,et){for(var N="",E=0;E<4;E++)N+=String.fromCharCode(z[et++]);return N}function m(z,et){return z[et+0]|z[et+1]<<8}function A(z,et){return(z[et+0]|z[et+1]<<8|z[et+2]<<16)>>>0}function P(z,et){return(z[et+0]|z[et+1]<<8|z[et+2]<<16|z[et+3]<<24)>>>0}new c;var p=[0],B=[0],O=[],M=new c,S=n,Y=(function(z,et){var N={},E=0,q=!1,U=0,rt=0;if(N.frames=[],!(function(x,j){for(var R=0;R<4;R++)if(x[j+R]!="RIFF".charCodeAt(R))return!0;return!1})(z,et)){for(P(z,et+=4),et+=8;et>1&1}ct!="ANMF"&&(et+=nt)}return N}})(S,0);Y.response=S,Y.rgbaoutput=!0,Y.dataurl=!1;var J=Y.header?Y.header:null,D=Y.frames?Y.frames:null;if(J){J.loop_counter=J.loop_count,p=[J.canvas_height],B=[J.canvas_width];for(var lt=0;lt'+t.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")+"",this.internal.__metadata__.metadataObjectNumber=this.internal.newObject(),this.internal.write("<< /Type /Metadata /Subtype /XML /Length "+n.length+" >>"),this.internal.write("stream"),this.internal.write(n),this.internal.write("endstream"),this.internal.write("endobj")}function p1(){this.internal.__metadata__.metadataObjectNumber&&this.internal.write("/Metadata "+this.internal.__metadata__.metadataObjectNumber+" 0 R")}(function(n){var e,t,i,o,s,f,u,c,d,m=function(x){return x=x||{},this.isStrokeTransparent=x.isStrokeTransparent||!1,this.strokeOpacity=x.strokeOpacity||1,this.strokeStyle=x.strokeStyle||"#000000",this.fillStyle=x.fillStyle||"#000000",this.isFillTransparent=x.isFillTransparent||!1,this.fillOpacity=x.fillOpacity||1,this.font=x.font||"10px sans-serif",this.textBaseline=x.textBaseline||"alphabetic",this.textAlign=x.textAlign||"left",this.lineWidth=x.lineWidth||1,this.lineJoin=x.lineJoin||"miter",this.lineCap=x.lineCap||"butt",this.path=x.path||[],this.transform=x.transform!==void 0?x.transform.clone():new c,this.globalCompositeOperation=x.globalCompositeOperation||"normal",this.globalAlpha=x.globalAlpha||1,this.clip_path=x.clip_path||[],this.currentPoint=x.currentPoint||new f,this.miterLimit=x.miterLimit||10,this.lastPoint=x.lastPoint||new f,this.lineDashOffset=x.lineDashOffset||0,this.lineDash=x.lineDash||[],this.margin=x.margin||[0,0,0,0],this.prevPageLastElemOffset=x.prevPageLastElemOffset||0,this.ignoreClearRect=typeof x.ignoreClearRect!="boolean"||x.ignoreClearRect,this};n.events.push(["initialized",function(){this.context2d=new A(this),e=this.internal.f2,t=this.internal.getCoordinateString,i=this.internal.getVerticalCoordinateString,o=this.internal.getHorizontalCoordinate,s=this.internal.getVerticalCoordinate,f=this.internal.Point,u=this.internal.Rectangle,c=this.internal.Matrix,d=new m}]);var A=function(x){Object.defineProperty(this,"canvas",{get:function(){return{parentNode:!1,style:!1}}});var j=x;Object.defineProperty(this,"pdf",{get:function(){return j}});var R=!1;Object.defineProperty(this,"pageWrapXEnabled",{get:function(){return R},set:function(k){R=!!k}});var V=!1;Object.defineProperty(this,"pageWrapYEnabled",{get:function(){return V},set:function(k){V=!!k}});var $=0;Object.defineProperty(this,"posX",{get:function(){return $},set:function(k){isNaN(k)||($=k)}});var Q=0;Object.defineProperty(this,"posY",{get:function(){return Q},set:function(k){isNaN(k)||(Q=k)}}),Object.defineProperty(this,"margin",{get:function(){return d.margin},set:function(k){var Lt;typeof k=="number"?Lt=[k,k,k,k]:((Lt=new Array(4))[0]=k[0],Lt[1]=k.length>=2?k[1]:Lt[0],Lt[2]=k.length>=3?k[2]:Lt[0],Lt[3]=k.length>=4?k[3]:Lt[1]),d.margin=Lt}});var it=!1;Object.defineProperty(this,"autoPaging",{get:function(){return it},set:function(k){it=k}});var at=0;Object.defineProperty(this,"lastBreak",{get:function(){return at},set:function(k){at=k}});var dt=[];Object.defineProperty(this,"pageBreaks",{get:function(){return dt},set:function(k){dt=k}}),Object.defineProperty(this,"ctx",{get:function(){return d},set:function(k){k instanceof m&&(d=k)}}),Object.defineProperty(this,"path",{get:function(){return d.path},set:function(k){d.path=k}});var _t=[];Object.defineProperty(this,"ctxStack",{get:function(){return _t},set:function(k){_t=k}}),Object.defineProperty(this,"fillStyle",{get:function(){return this.ctx.fillStyle},set:function(k){var Lt;Lt=P(k),this.ctx.fillStyle=Lt.style,this.ctx.isFillTransparent=Lt.a===0,this.ctx.fillOpacity=Lt.a,this.pdf.setFillColor(Lt.r,Lt.g,Lt.b,{a:Lt.a}),this.pdf.setTextColor(Lt.r,Lt.g,Lt.b,{a:Lt.a})}}),Object.defineProperty(this,"strokeStyle",{get:function(){return this.ctx.strokeStyle},set:function(k){var Lt=P(k);this.ctx.strokeStyle=Lt.style,this.ctx.isStrokeTransparent=Lt.a===0,this.ctx.strokeOpacity=Lt.a,Lt.a===0?this.pdf.setDrawColor(255,255,255):(Lt.a,this.pdf.setDrawColor(Lt.r,Lt.g,Lt.b))}}),Object.defineProperty(this,"lineCap",{get:function(){return this.ctx.lineCap},set:function(k){["butt","round","square"].indexOf(k)!==-1&&(this.ctx.lineCap=k,this.pdf.setLineCap(k))}}),Object.defineProperty(this,"lineWidth",{get:function(){return this.ctx.lineWidth},set:function(k){isNaN(k)||(this.ctx.lineWidth=k,this.pdf.setLineWidth(k))}}),Object.defineProperty(this,"lineJoin",{get:function(){return this.ctx.lineJoin},set:function(k){["bevel","round","miter"].indexOf(k)!==-1&&(this.ctx.lineJoin=k,this.pdf.setLineJoin(k))}}),Object.defineProperty(this,"miterLimit",{get:function(){return this.ctx.miterLimit},set:function(k){isNaN(k)||(this.ctx.miterLimit=k,this.pdf.setMiterLimit(k))}}),Object.defineProperty(this,"textBaseline",{get:function(){return this.ctx.textBaseline},set:function(k){this.ctx.textBaseline=k}}),Object.defineProperty(this,"textAlign",{get:function(){return this.ctx.textAlign},set:function(k){["right","end","center","left","start"].indexOf(k)!==-1&&(this.ctx.textAlign=k)}});var St=null,kt=null,zt=null;Object.defineProperty(this,"fontFaces",{get:function(){return zt},set:function(k){St=null,kt=null,zt=k}}),Object.defineProperty(this,"font",{get:function(){return this.ctx.font},set:function(k){var Lt;if(this.ctx.font=k,(Lt=/^\s*(?=(?:(?:[-a-z]+\s*){0,2}(italic|oblique))?)(?=(?:(?:[-a-z]+\s*){0,2}(small-caps))?)(?=(?:(?:[-a-z]+\s*){0,2}(bold(?:er)?|lighter|[1-9]00))?)(?:(?:normal|\1|\2|\3)\s*){0,3}((?:xx?-)?(?:small|large)|medium|smaller|larger|[.\d]+(?:\%|in|[cem]m|ex|p[ctx]))(?:\s*\/\s*(normal|[.\d]+(?:\%|in|[cem]m|ex|p[ctx])))?\s*([-_,\"\'\sa-z0-9]+?)\s*$/i.exec(k))!==null){var ae=Lt[1];Lt[2];var Ht=Lt[3],bt=Lt[4];Lt[5];var Wt=Lt[6],It=/^([.\d]+)((?:%|in|[cem]m|ex|p[ctx]))$/i.exec(bt)[2];bt=Math.floor(It==="px"?parseFloat(bt)*this.pdf.internal.scaleFactor:It==="em"?parseFloat(bt)*this.pdf.getFontSize():parseFloat(bt)*this.pdf.internal.scaleFactor),this.pdf.setFontSize(bt);var Ut=(function(Rt){var ze,ge,se=[],oe=Rt.trim();if(oe==="")return Lo;if(oe in fu)return[fu[oe]];for(;oe!=="";){switch(ge=null,ze=(oe=pu(oe)).charAt(0)){case'"':case"'":ge=o1(oe.substring(1),ze);break;default:ge=l1(oe)}if(ge===null||(se.push(ge[0]),(oe=pu(ge[1]))!==""&&oe.charAt(0)!==","))return Lo;oe=oe.replace(/^,/,"")}return se})(Wt);if(this.fontFaces){var Dt=(function(Rt,ze){var ge=Rt.getFontList(),se=JSON.stringify(ge);if(St===null||kt!==se){var oe=(function(Oe){var qt=[];return Object.keys(Oe).forEach(function(ke){Oe[ke].forEach(function(Yt){var Qt=null;switch(Yt){case"bold":Qt={family:ke,weight:"bold"};break;case"italic":Qt={family:ke,style:"italic"};break;case"bolditalic":Qt={family:ke,weight:"bold",style:"italic"};break;case"":case"normal":Qt={family:ke}}Qt!==null&&(Qt.ref={name:ke,style:Yt},qt.push(Qt))})}),qt})(ge);St=(function(Oe){for(var qt={},ke=0;ke=700||ae==="bold")&&(Zt="bold"),ae==="italic"&&(Zt+="italic"),Zt.length===0&&(Zt="normal");for(var ce="",he={arial:"Helvetica",Arial:"Helvetica",verdana:"Helvetica",Verdana:"Helvetica",helvetica:"Helvetica",Helvetica:"Helvetica","sans-serif":"Helvetica",fixed:"Courier",monospace:"Courier",terminal:"Courier",cursive:"Times",fantasy:"Times",serif:"Times"},Bt=0;Bt=2*Math.PI&&(V=0,$=2*Math.PI),this.path.push({type:"arc",x,y:j,radius:R,startAngle:V,endAngle:$,counterclockwise:Q})},A.prototype.arcTo=function(x,j,R,V,$){throw new Error("arcTo not implemented.")},A.prototype.rect=function(x,j,R,V){if(isNaN(x)||isNaN(j)||isNaN(R)||isNaN(V))throw Le.error("jsPDF.context2d.rect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rect");this.moveTo(x,j),this.lineTo(x+R,j),this.lineTo(x+R,j+V),this.lineTo(x,j+V),this.lineTo(x,j),this.lineTo(x+R,j),this.lineTo(x,j)},A.prototype.fillRect=function(x,j,R,V){if(isNaN(x)||isNaN(j)||isNaN(R)||isNaN(V))throw Le.error("jsPDF.context2d.fillRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillRect");if(!p.call(this)){var $={};this.lineCap!=="butt"&&($.lineCap=this.lineCap,this.lineCap="butt"),this.lineJoin!=="miter"&&($.lineJoin=this.lineJoin,this.lineJoin="miter"),this.beginPath(),this.rect(x,j,R,V),this.fill(),$.hasOwnProperty("lineCap")&&(this.lineCap=$.lineCap),$.hasOwnProperty("lineJoin")&&(this.lineJoin=$.lineJoin)}},A.prototype.strokeRect=function(x,j,R,V){if(isNaN(x)||isNaN(j)||isNaN(R)||isNaN(V))throw Le.error("jsPDF.context2d.strokeRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeRect");B.call(this)||(this.beginPath(),this.rect(x,j,R,V),this.stroke())},A.prototype.clearRect=function(x,j,R,V){if(isNaN(x)||isNaN(j)||isNaN(R)||isNaN(V))throw Le.error("jsPDF.context2d.clearRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.clearRect");this.ignoreClearRect||(this.fillStyle="#ffffff",this.fillRect(x,j,R,V))},A.prototype.save=function(x){x=typeof x!="boolean"||x;for(var j=this.pdf.internal.getCurrentPageInfo().pageNumber,R=0;R0||this.margin[1]>0||this.margin[2]>0||this.margin[3]>0};A.prototype.drawImage=function(x,j,R,V,$,Q,it,at,dt){var _t=this.pdf.getImageProperties(x),St=1,kt=1,zt=1,k=1;V!==void 0&&at!==void 0&&(zt=at/V,k=dt/$,St=_t.width/V*at/V,kt=_t.height/$*dt/$),Q===void 0&&(Q=j,it=R,j=0,R=0),V!==void 0&&at===void 0&&(at=V,dt=$),V===void 0&&at===void 0&&(at=_t.width,dt=_t.height);var Lt=this.ctx.transform.decompose(),ae=nt(Lt.rotate.shx),Ht=new c,bt=(Ht=(Ht=(Ht=Ht.multiply(Lt.translate)).multiply(Lt.skew)).multiply(Lt.scale)).applyToRectangle(new u(Q-j*zt,it-R*k,V*St,$*kt));if(this.autoPaging){for(var Wt,It=M.call(this,bt),Ut=[],Dt=0;Dtve||Ztbt||It0)){for(;dt>=0;dt--)if($[dt-1].close!==!0&&$[dt-1].begin!==!0){$[dt-1].deltas.push(R),$[dt-1].abs.push(at);break}}break;case"bct":R=[at.x1-Q[it-1].x,at.y1-Q[it-1].y,at.x2-Q[it-1].x,at.y2-Q[it-1].y,at.x-Q[it-1].x,at.y-Q[it-1].y],$[$.length-1].deltas.push(R);break;case"qct":var _t=Q[it-1].x+2/3*(at.x1-Q[it-1].x),St=Q[it-1].y+2/3*(at.y1-Q[it-1].y),kt=at.x+2/3*(at.x1-at.x),zt=at.y+2/3*(at.y1-at.y),k=at.x,Lt=at.y;R=[_t-Q[it-1].x,St-Q[it-1].y,kt-Q[it-1].x,zt-Q[it-1].y,k-Q[it-1].x,Lt-Q[it-1].y],$[$.length-1].deltas.push(R);break;case"arc":$.push({deltas:[],abs:[],arc:!0}),Array.isArray($[$.length-1].abs)&&$[$.length-1].abs.push(at)}}V=j?null:x==="stroke"?"stroke":"fill";for(var ae=!1,Ht=0;Ht<$.length;Ht++)if($[Ht].arc)for(var bt=$[Ht].abs,Wt=0;Wt=.01&&(V=this.pdf.internal.getFontSize(),this.pdf.setFontSize(V*x.scale),$=this.lineWidth,this.lineWidth=$*x.scale);var ne=this.autoPaging!=="text";if(ne||Bt.y+Bt.h<=Dt){if(ne||Bt.y>=It&&Bt.x<=ue){var Rt=ne?x.text:this.pdf.splitTextToSize(x.text,x.maxWidth||ue-Bt.x)[0],ze=Y([JSON.parse(JSON.stringify(kt))],this.posX+this.margin[3],-ce+It+this.ctx.prevPageLastElemOffset)[0],ge=ne&&(Wt>Ht||Wt=.01&&(this.pdf.setFontSize(V),this.lineWidth=$)}}else x.scale>=.01&&(V=this.pdf.internal.getFontSize(),this.pdf.setFontSize(V*x.scale),$=this.lineWidth,this.lineWidth=$*x.scale),this.pdf.text(x.text,dt.x+this.posX,dt.y+this.posY,{angle:x.angle,align:j,renderingMode:x.renderingMode,maxWidth:x.maxWidth}),x.scale>=.01&&(this.pdf.setFontSize(V),this.lineWidth=$)},q=function(x,j,R,V){R=R||0,V=V||0,this.pdf.internal.out(t(x+R)+" "+i(j+V)+" l")},U=function(x,j,R){return this.pdf.lines(x,j,R,null,null)},rt=function(x,j,R,V,$,Q,it,at){this.pdf.internal.out([e(o(R+x)),e(s(V+j)),e(o($+x)),e(s(Q+j)),e(o(it+x)),e(s(at+j)),"c"].join(" "))},ct=function(x,j,R,V){for(var $=2*Math.PI,Q=Math.PI/2;j>R;)j-=$;var it=Math.abs(R-j);it<$&&V&&(it=$-it);for(var at=[],dt=V?-1:1,_t=j;it>1e-5;){var St=_t+dt*Math.min(it,Q);at.push(pt.call(this,x,_t,St)),it-=Math.abs(St-_t),_t=St}return at},pt=function(x,j,R){var V=(R-j)/2,$=x*Math.cos(V),Q=x*Math.sin(V),it=$,at=-Q,dt=it*it+at*at,_t=dt+it*$+at*Q,St=4/3*(Math.sqrt(2*dt*_t)-_t)/(it*Q-at*$),kt=it-St*at,zt=at+St*it,k=kt,Lt=-zt,ae=V+j,Ht=Math.cos(ae),bt=Math.sin(ae);return{x1:x*Math.cos(j),y1:x*Math.sin(j),x2:kt*Ht-zt*bt,y2:kt*bt+zt*Ht,x3:k*Ht-Lt*bt,y3:k*bt+Lt*Ht,x4:x*Math.cos(R),y4:x*Math.sin(R)}},nt=function(x){return 180*x/Math.PI},ft=function(x,j,R,V,$,Q){var it=x+.5*(R-x),at=j+.5*(V-j),dt=$+.5*(R-$),_t=Q+.5*(V-Q),St=Math.min(x,$,it,dt),kt=Math.max(x,$,it,dt),zt=Math.min(j,Q,at,_t),k=Math.max(j,Q,at,_t);return new u(St,zt,kt-St,k-zt)},At=function(x,j,R,V,$,Q,it,at){var dt,_t,St,kt,zt,k,Lt,ae,Ht,bt,Wt,It,Ut,Dt,ve=R-x,ue=V-j,Zt=$-R,ce=Q-V,he=it-$,Bt=at-Q;for(_t=0;_t<41;_t++)Ht=(Lt=(St=x+(dt=_t/40)*ve)+dt*((zt=R+dt*Zt)-St))+dt*(zt+dt*($+dt*he-zt)-Lt),bt=(ae=(kt=j+dt*ue)+dt*((k=V+dt*ce)-kt))+dt*(k+dt*(Q+dt*Bt-k)-ae),_t==0?(Wt=Ht,It=bt,Ut=Ht,Dt=bt):(Wt=Math.min(Wt,Ht),It=Math.min(It,bt),Ut=Math.max(Ut,Ht),Dt=Math.max(Dt,bt));return new u(Math.round(Wt),Math.round(It),Math.round(Ut-Wt),Math.round(Dt-It))},xt=function(){if(this.prevLineDash||this.ctx.lineDash.length||this.ctx.lineDashOffset){var x,j,R=(x=this.ctx.lineDash,j=this.ctx.lineDashOffset,JSON.stringify({lineDash:x,lineDashOffset:j}));this.prevLineDash!==R&&(this.pdf.setLineDash(this.ctx.lineDash,this.ctx.lineDashOffset),this.prevLineDash=R)}}})(Tt.API),(function(n){var e=function(f){var u,c,d,m,A,P,p,B,O,M;for(c=[],d=0,m=(f+=u="\0\0\0\0".slice(f.length%4||4)).length;m>d;d+=4)(A=(f.charCodeAt(d)<<24)+(f.charCodeAt(d+1)<<16)+(f.charCodeAt(d+2)<<8)+f.charCodeAt(d+3))!==0?(P=(A=((A=((A=((A=(A-(M=A%85))/85)-(O=A%85))/85)-(B=A%85))/85)-(p=A%85))/85)%85,c.push(P+33,p+33,B+33,O+33,M+33)):c.push(122);return(function(S,Y){for(var J=Y;J>0;J--)S.pop()})(c,u.length),String.fromCharCode.apply(String,c)+"~>"},t=function(f){var u,c,d,m,A,P=String,p="length",B=255,O="charCodeAt",M="slice",S="replace";for(f[M](-2),f=f[M](0,-2)[S](/\s/g,"")[S]("z","!!!!!"),d=[],m=0,A=(f+=u="uuuuu"[M](f[p]%5||5))[p];A>m;m+=5)c=52200625*(f[O](m)-33)+614125*(f[O](m+1)-33)+7225*(f[O](m+2)-33)+85*(f[O](m+3)-33)+(f[O](m+4)-33),d.push(B&c>>24,B&c>>16,B&c>>8,B&c);return(function(Y,J){for(var D=J;D>0;D--)Y.pop()})(d,u[p]),P.fromCharCode.apply(P,d)},i=function(f){return f.split("").map(function(u){return("0"+u.charCodeAt().toString(16)).slice(-2)}).join("")+">"},o=function(f){var u=new RegExp(/^([0-9A-Fa-f]{2})+$/);if((f=f.replace(/\s/g,"")).indexOf(">")!==-1&&(f=f.substr(0,f.indexOf(">"))),f.length%2&&(f+="0"),u.test(f)===!1)return"";for(var c="",d=0;dimport("./html2canvas.esm-DIwbOgLI.js"),[])).catch(function(u){return Promise.reject(new Error("Could not load html2canvas: "+u))}).then(function(u){return u.default?u.default:u})}function t(){return($t.DOMPurify?Promise.resolve($t.DOMPurify):so(()=>import("./purify.es-DqmGbvab.js"),[])).catch(function(u){return Promise.reject(new Error("Could not load dompurify: "+u))}).then(function(u){return u.default?u.default:u})}var i=function(u){var c=Se(u);return c==="undefined"?"undefined":c==="string"||u instanceof String?"string":c==="number"||u instanceof Number?"number":c==="function"||u instanceof Function?"function":u&&u.constructor===Array?"array":u&&u.nodeType===1?"element":c==="object"?"object":"unknown"},o=function(u,c){var d=document.createElement(u);for(var m in c.className&&(d.className=c.className),c.innerHTML&&c.dompurify&&(d.innerHTML=c.dompurify.sanitize(c.innerHTML)),c.style)d.style[m]=c.style[m];return d},s=function u(c,d){for(var m=c.nodeType===3?document.createTextNode(c.nodeValue):c.cloneNode(!1),A=c.firstChild;A;A=A.nextSibling)d!==!0&&A.nodeType===1&&A.nodeName==="SCRIPT"||m.appendChild(u(A,d));return c.nodeType===1&&(c.nodeName==="CANVAS"?(m.width=c.width,m.height=c.height,m.getContext("2d").drawImage(c,0,0)):c.nodeName!=="TEXTAREA"&&c.nodeName!=="SELECT"||(m.value=c.value),m.addEventListener("load",function(){m.scrollTop=c.scrollTop,m.scrollLeft=c.scrollLeft},!0)),m},f=function u(c){var d=Object.assign(u.convert(Promise.resolve()),JSON.parse(JSON.stringify(u.template))),m=u.convert(Promise.resolve(),d);return(m=m.setProgress(1,u,1,[u])).set(c)};(f.prototype=Object.create(Promise.prototype)).constructor=f,f.convert=function(u,c){return u.__proto__=c||f.prototype,u},f.template={prop:{src:null,container:null,overlay:null,canvas:null,img:null,pdf:null,pageSize:null,callback:function(){}},progress:{val:0,state:null,n:0,stack:[]},opt:{filename:"file.pdf",margin:[0,0,0,0],enableLinks:!0,x:0,y:0,html2canvas:{},jsPDF:{},backgroundColor:"transparent"}},f.prototype.from=function(u,c){return this.then(function(){switch(c=c||(function(d){switch(i(d)){case"string":return"string";case"element":return d.nodeName.toLowerCase()==="canvas"?"canvas":"element";default:return"unknown"}})(u),c){case"string":return this.then(t).then(function(d){return this.set({src:o("div",{innerHTML:u,dompurify:d})})});case"element":return this.set({src:u});case"canvas":return this.set({canvas:u});case"img":return this.set({img:u});default:return this.error("Unknown source type.")}})},f.prototype.to=function(u){switch(u){case"container":return this.toContainer();case"canvas":return this.toCanvas();case"img":return this.toImg();case"pdf":return this.toPdf();default:return this.error("Invalid target.")}},f.prototype.toContainer=function(){return this.thenList([function(){return this.prop.src||this.error("Cannot duplicate - no source HTML.")},function(){return this.prop.pageSize||this.setPageSize()}]).then(function(){var u={position:"relative",display:"inline-block",width:(typeof this.opt.width!="number"||isNaN(this.opt.width)||typeof this.opt.windowWidth!="number"||isNaN(this.opt.windowWidth)?Math.max(this.prop.src.clientWidth,this.prop.src.scrollWidth,this.prop.src.offsetWidth):this.opt.windowWidth)+"px",left:0,right:0,top:0,margin:"auto",backgroundColor:this.opt.backgroundColor},c=s(this.prop.src,this.opt.html2canvas.javascriptEnabled);c.tagName==="BODY"&&(u.height=Math.max(document.body.scrollHeight,document.body.offsetHeight,document.documentElement.clientHeight,document.documentElement.scrollHeight,document.documentElement.offsetHeight)+"px"),this.prop.overlay=o("div",{className:"html2pdf__overlay",style:{position:"fixed",overflow:"hidden",zIndex:1e3,left:"-100000px",right:0,bottom:0,top:0}}),this.prop.container=o("div",{className:"html2pdf__container",style:u}),this.prop.container.appendChild(c),this.prop.container.firstChild.appendChild(o("div",{style:{clear:"both",border:"0 none transparent",margin:0,padding:0,height:0}})),this.prop.container.style.float="none",this.prop.overlay.appendChild(this.prop.container),document.body.appendChild(this.prop.overlay),this.prop.container.firstChild.style.position="relative",this.prop.container.height=Math.max(this.prop.container.firstChild.clientHeight,this.prop.container.firstChild.scrollHeight,this.prop.container.firstChild.offsetHeight)+"px"})},f.prototype.toCanvas=function(){var u=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(u).then(e).then(function(c){var d=Object.assign({},this.opt.html2canvas);return delete d.onrendered,c(this.prop.container,d)}).then(function(c){(this.opt.html2canvas.onrendered||function(){})(c),this.prop.canvas=c,document.body.removeChild(this.prop.overlay)})},f.prototype.toContext2d=function(){var u=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(u).then(e).then(function(c){var d=this.opt.jsPDF,m=this.opt.fontFaces,A=typeof this.opt.width!="number"||isNaN(this.opt.width)||typeof this.opt.windowWidth!="number"||isNaN(this.opt.windowWidth)?1:this.opt.width/this.opt.windowWidth,P=Object.assign({async:!0,allowTaint:!0,scale:A,scrollX:this.opt.scrollX||0,scrollY:this.opt.scrollY||0,backgroundColor:"#ffffff",imageTimeout:15e3,logging:!0,proxy:null,removeContainer:!0,foreignObjectRendering:!1,useCORS:!1},this.opt.html2canvas);if(delete P.onrendered,d.context2d.autoPaging=this.opt.autoPaging===void 0||this.opt.autoPaging,d.context2d.posX=this.opt.x,d.context2d.posY=this.opt.y,d.context2d.margin=this.opt.margin,d.context2d.fontFaces=m,m)for(var p=0;pO&&(B=M,M=O,O=B);else{if(u!=="l"&&u!=="landscape")throw"Invalid orientation: "+u;u="l",O>M&&(B=M,M=O,O=B)}return{width:M,height:O,unit:c,k:A,orientation:u}},n.html=function(u,c){(c=c||{}).callback=c.callback||function(){},c.html2canvas=c.html2canvas||{},c.html2canvas.canvas=c.html2canvas.canvas||this.canvas,c.jsPDF=c.jsPDF||this,c.fontFaces=c.fontFaces?c.fontFaces.map(No):null;var d=new f(c);return c.worker?d:d.from(u).doCallback()}})(Tt.API),Tt.API.addJS=function(n){var e,t,i=(function(o){for(var s="",f=0;f=0&&o[d]==="\\";d--)c++;s+=c%2==0?"\\"+u:u}else s+=u}return s})(n);return this.internal.events.subscribe("postPutResources",function(){e=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/Names [(EmbeddedJS) "+(e+1)+" 0 R]"),this.internal.out(">>"),this.internal.out("endobj"),t=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(){e!==void 0&&t!==void 0&&this.internal.out("/Names <>")}),this},(function(n){var e;n.events.push(["postPutResources",function(){var t=this,i=/^(\d+) 0 obj$/;if(this.outline.root.children.length>0)for(var o=t.outline.render().split(/\r\n/),s=0;s> endobj")}var p=t.internal.newObject();for(t.internal.write("<< /Names [ "),s=0;s>","endobj"),e=t.internal.newObject(),t.internal.write("<< /Dests "+p+" 0 R"),t.internal.write(">>","endobj")}}]),n.events.push(["putCatalog",function(){var t=this;t.outline.root.children.length>0&&(t.internal.write("/Outlines",this.outline.makeRef(this.outline.root)),this.outline.createNamedDestinations&&t.internal.write("/Names "+e+" 0 R"))}]),n.events.push(["initialized",function(){var t=this;t.outline={createNamedDestinations:!1,root:{children:[]}},t.outline.add=function(i,o,s){var f={title:o,options:s,children:[]};return i==null&&(i=this.root),i.children.push(f),f},t.outline.render=function(){return this.ctx={},this.ctx.val="",this.ctx.pdf=t,this.genIds_r(this.root),this.renderRoot(this.root),this.renderItems(this.root),this.ctx.val},t.outline.genIds_r=function(i){i.id=t.internal.newObjectDeferred();for(var o=0;o0&&(this.line("/First "+this.makeRef(i.children[0])),this.line("/Last "+this.makeRef(i.children[i.children.length-1]))),this.line("/Count "+this.count_r({count:0},i)),this.objEnd()},t.outline.renderItems=function(i){for(var o=this.ctx.pdf.internal.getVerticalCoordinateString,s=0;s0&&this.line("/Prev "+this.makeRef(i.children[s-1])),s0&&(this.line("/First "+this.makeRef(f.children[0])),this.line("/Last "+this.makeRef(f.children[f.children.length-1])));var u=this.count=this.count_r({count:0},f);if(u>0&&this.line("/Count "+u),f.options&&f.options.pageNumber){var c=t.internal.getPageInfo(f.options.pageNumber);this.line("/Dest ["+c.objId+" 0 R /XYZ 0 "+o(0)+" 0]")}this.objEnd()}for(var d=0;d> \r endobj\r `},t.outline.count_r=function(i,o){for(var s=0;s1){U=!0,ct=void 0;var $=z*et;pt=new Uint8Array($);for(var Q=new DataView(N.buffer),it=0;it<$;it++){var at=So(Q,it,q),dt=yl(E[at],4)[3];pt[it]=dt}}else ft===0&&(ct=void 0);return{colorSpace:"Indexed",colorsPerPixel:1,sMaskBitsPerComponent:U?8:void 0,colorBytes:N,alphaBytes:pt,needSMask:U,palette:rt,mask:ct}})(s):c===2||c===4?(function(tt){for(var z=tt.data,et=tt.width,N=tt.height,E=tt.channels,q=tt.depth,U=E===2?"DeviceGray":"DeviceRGB",rt=E-1,ct=et*N,pt=rt,nt=ct*pt,ft=1*ct,At=Math.ceil(nt*q/8),xt=Math.ceil(ft*q/8),x=new Uint8Array(At),j=new Uint8Array(xt),R=new DataView(z.buffer),V=new DataView(x.buffer),$=new DataView(j.buffer),Q=!1,it=0;it536870912)throw new Error("Image dimensions exceed 512MB, which is too large.");this.data=new Uint8Array(e);try{this[n]()}catch(t){Le.log("bit decode error:"+t)}},Xn.prototype.bit1=function(){var n,e=Math.ceil(this.width/8),t=e%4;for(n=this.height-1;n>=0;n--){for(var i=this.bottom_up?n:this.height-1-n,o=0;o>7-u&1];this.data[f+4*u]=c.blue,this.data[f+4*u+1]=c.green,this.data[f+4*u+2]=c.red,this.data[f+4*u+3]=255}t!==0&&(this.pos+=4-t)}},Xn.prototype.bit4=function(){for(var n=Math.ceil(this.width/2),e=n%4,t=this.height-1;t>=0;t--){for(var i=this.bottom_up?t:this.height-1-t,o=0;o>4,c=15&s,d=this.palette[u];if(this.data[f]=d.blue,this.data[f+1]=d.green,this.data[f+2]=d.red,this.data[f+3]=255,2*o+1>=this.width)break;d=this.palette[c],this.data[f+4]=d.blue,this.data[f+4+1]=d.green,this.data[f+4+2]=d.red,this.data[f+4+3]=255}e!==0&&(this.pos+=4-e)}},Xn.prototype.bit8=function(){for(var n=this.width%4,e=this.height-1;e>=0;e--){for(var t=this.bottom_up?e:this.height-1-e,i=0;i=0;t--){for(var i=this.bottom_up?t:this.height-1-t,o=0;o>5&e)/e*255|0,c=(s>>10&e)/e*255|0,d=s>>15?255:0,m=i*this.width*4+4*o;this.data[m]=c,this.data[m+1]=u,this.data[m+2]=f,this.data[m+3]=d}this.pos+=n}},Xn.prototype.bit16=function(){for(var n=this.width%3,e=parseInt("11111",2),t=parseInt("111111",2),i=this.height-1;i>=0;i--){for(var o=this.bottom_up?i:this.height-1-i,s=0;s>5&t)/t*255|0,d=(f>>11)/e*255|0,m=o*this.width*4+4*s;this.data[m]=d,this.data[m+1]=c,this.data[m+2]=u,this.data[m+3]=255}this.pos+=n}},Xn.prototype.bit24=function(){for(var n=this.height-1;n>=0;n--){for(var e=this.bottom_up?n:this.height-1-n,t=0;t=0;n--)for(var e=this.bottom_up?n:this.height-1-n,t=0;ti&&(o.push(n.slice(c,s)),u=0,c=s),u+=e[s],s++;return c!==s&&o.push(n.slice(c,s)),o},vu=function(n,e,t){t||(t={});var i,o,s,f,u,c,d,m=[],A=[m],P=t.textIndent||0,p=0,B=0,O=n.split(" "),M=ds.apply(this,[" ",t])[0];if(c=t.lineIndent===-1?O[0].length+2:t.lineIndent||0){var S=Array(c).join(" "),Y=[];O.map(function(D){(D=D.split(/\s*\n/)).length>1?Y=Y.concat(D.map(function(lt,yt){return(yt&<.length?` `:"")+lt})):Y.push(D[0])}),O=Y,c=gu.apply(this,[S,t])}for(s=0,f=O.length;se||J){if(B>e){for(u=mu.apply(this,[i,o,e-(P+p),e]),m.push(u.shift()),m=[u.pop()];u.length;)A.push([u.shift()]);B=o.slice(i.length-(m[0]?m[0].length:0)).reduce(function(D,lt){return D+lt},0)}else m=[i];A.push(m),P=B+c,p=M}else m.push(i),P+=p+B,p=M}return d=c?function(D,lt){return(lt?S:"")+D.join(" ")}:function(D){return D.join(" ")},A.map(d)},Wi.splitTextToSize=function(n,e,t){var i,o=(t=t||{}).fontSize||this.internal.getFontSize(),s=function(m){if(m.widths&&m.kerning)return{widths:m.widths,kerning:m.kerning};var A=this.internal.getFont(m.fontName,m.fontStyle),P="Unicode";return A.metadata[P]?{widths:A.metadata[P].widths||{0:1},kerning:A.metadata[P].kerning||{}}:{font:A.metadata,fontSize:this.internal.getFontSize(),charSpace:this.internal.getCharSpace()}}.call(this,t);i=Array.isArray(n)?n:String(n).split(/\r?\n/);var f=1*this.internal.scaleFactor*e/o;s.textIndent=t.textIndent?1*t.textIndent*this.internal.scaleFactor/o:0,s.lineIndent=t.lineIndent;var u,c,d=[];for(u=0,c=i.length;uimport("./index.es-BzL5PZg7.js"),__vite__mapDeps([0,1,2,3,4,5]))).catch(function(P){return Promise.reject(new Error("Could not load canvg: "+P))}).then(function(P){return P.default?P.default:P}).then(function(P){return P.fromString(d,n,m)},function(){return Promise.reject(new Error("Could not load canvg."))}).then(function(P){return P.render(m)}).then(function(){A.addImage(c.toDataURL("image/jpeg",1),e,t,i,o,f,u)})},Tt.API.putTotalPages=function(n){var e,t=0;parseInt(this.internal.getFont().id.substr(1),10)<15?(e=new RegExp(n,"g"),t=this.internal.getNumberOfPages()):(e=new RegExp(this.pdfEscape16(n,this.internal.getFont()),"g"),t=this.pdfEscape16(this.internal.getNumberOfPages()+"",this.internal.getFont()));for(var i=1;i<=this.internal.getNumberOfPages();i++)for(var o=0;o1){for(m=0;m>`)}),this.internal.viewerpreferences.isSubscribed=!0),this.internal.viewerpreferences.configuration=t,this},Tt.API.addMetadata=function(n,e){return this.internal.__metadata__===void 0&&(this.internal.__metadata__={metadata:n,namespaceUri:e!=null?e:"http://jspdf.default.namespaceuri/",rawXml:typeof e=="boolean"&&e},this.internal.events.subscribe("putCatalog",p1),this.internal.events.subscribe("postPutResources",d1)),this},(function(n){var e=n.API,t=e.pdfEscape16=function(s,f){for(var u,c=f.metadata.Unicode.widths,d=["","0","00","000","0000"],m=[""],A=0,P=s.length;A> def /CMapName /Adobe-Identity-UCS def /CMapType 2 def 1 begincodespacerange <0000> endcodespacerange`,c=[],A=0,P=(u=Object.keys(s).sort(function(p,B){return p-B})).length;A=100&&(m+=` `+c.length+` beginbfchar `+c.join(` `)+` endbfchar`,c=[]),s[f]!==void 0&&s[f]!==null&&typeof s[f].toString=="function"&&(d=("0000"+s[f].toString(16)).slice(-4),f=("0000"+(+f).toString(16)).slice(-4),c.push("<"+f+"><"+d+">"));return c.length&&(m+=` `+c.length+` beginbfchar `+c.join(` `)+` endbfchar `),m+`endcmap CMapName currentdict /CMap defineresource pop end end`};e.events.push(["putFont",function(s){(function(f){var u=f.font,c=f.out,d=f.newObject,m=f.putStream;if(u.metadata instanceof n.API.TTFFont&&u.encoding==="Identity-H"){for(var A=u.metadata.Unicode.widths,P=u.metadata.subset.encode(u.metadata.glyIdsUsed,1),p="",B=0;B>"),c("endobj");var Y=d();c("<<"),c("/Type /Font"),c("/BaseFont /"+Gi(u.fontName)),c("/FontDescriptor "+S+" 0 R"),c("/W "+n.API.PDFObject.convert(A)),c("/CIDToGIDMap /Identity"),c("/DW 1000"),c("/Subtype /CIDFontType2"),c("/CIDSystemInfo"),c("<<"),c("/Supplement 0"),c("/Registry (Adobe)"),c("/Ordering ("+u.encoding+")"),c(">>"),c(">>"),c("endobj"),u.objectNumber=d(),c("<<"),c("/Type /Font"),c("/Subtype /Type0"),c("/ToUnicode "+M+" 0 R"),c("/BaseFont /"+Gi(u.fontName)),c("/Encoding /"+u.encoding),c("/DescendantFonts ["+Y+" 0 R]"),c(">>"),c("endobj"),u.isAlreadyPutted=!0}})(s)}]),e.events.push(["putFont",function(s){(function(f){var u=f.font,c=f.out,d=f.newObject,m=f.putStream;if(u.metadata instanceof n.API.TTFFont&&u.encoding==="WinAnsiEncoding"){for(var A=u.metadata.rawData,P="",p=0;p>"),c("endobj"),u.objectNumber=d();for(var S=0;S>"),c("endobj"),u.isAlreadyPutted=!0}})(s)}]);var o=function(s){var f,u=s.text||"",c=s.x,d=s.y,m=s.options||{},A=s.mutex||{},P=A.pdfEscape,p=A.activeFontKey,B=A.fonts,O=p,M="",S=0,Y="",J=B[O].encoding;if(B[O].encoding!=="Identity-H")return{text:u,x:c,y:d,options:m,mutex:A};for(Y=u,O=p,Array.isArray(u)&&(Y=u[0]),S=0;S","<","[","]","[","{","}","{","«","»","«","‹","›","‹","⁅","⁆","⁅","⁽","⁾","⁽","₍","₎","₍","≤","≥","≤","〈","〉","〈","﹙","﹚","﹙","﹛","﹜","﹛","﹝","﹞","﹝","﹤","﹥","﹤"],S=new RegExp(/^([1-4|9]|1[0-9]|2[0-9]|3[0168]|4[04589]|5[012]|7[78]|159|16[0-9]|17[0-2]|21[569]|22[03489]|250)$/),Y=!1,J=0;this.__bidiEngine__={};var D=function(N){var E=N.charCodeAt(),q=E>>8,U=O[q];return U!==void 0?A[256*U+(255&E)]:q===252||q===253?"AL":S.test(q)?"L":q===8?"R":"N"},lt=function(N){for(var E,q=0;q=E.length||(rt=q[U-1])!=="EN"&&rt!=="AN"||(ct=E[U+1])!=="EN"&&ct!=="AN"?ft="N":Y&&(ct="AN"),ft=ct===rt?ct:"N";break;case"ES":ft=(rt=U>0?q[U-1]:"B")==="EN"&&U+10&&q[U-1]==="EN"){ft="EN";break}if(Y){ft="N";break}for(pt=U+1,nt=E.length;pt=1425&&At<=2303||At===64286;if(rt=E[pt],xt&&(rt==="R"||rt==="AL")){ft="R";break}}}ft=U<1||(rt=E[U-1])==="B"?"N":q[U-1];break;case"B":Y=!1,o=!0,ft=J;break;case"S":s=!0,ft="N"}return ft},mt=function(N,E,q){var U=N.split("");return q&&tt(U,q,{hiLevel:J}),U.reverse(),E&&E.reverse(),U.join("")},tt=function(N,E,q){var U,rt,ct,pt,nt,ft=-1,At=N.length,xt=0,x=[],j=J?p:P,R=[];for(Y=!1,o=!1,s=!1,rt=0;rt0)if(U===16){for(rt=ft;rt-1){for(rt=ft;rt=0&&V[at]==="WS";at--)$[at]=J}})(R,E,At)},z=function(N,E,q,U,rt){if(!(rt.hiLevel=N){for(nt=xt+1;nt=N;)nt++;for(ft=xt,pt=nt-1;ft=0&&(ct[At]=M[ft+1])})(U,q,rt),z(2,U,E,q,rt),z(1,U,E,q,rt),U.join("")};return this.__bidiEngine__.doBidiReorder=function(N,E,q){if((function(rt,ct){if(ct)for(var pt=0;pt>16)&&(t=-(1+(65535^t))),this.italicAngle=+(t+"."+i)):this.italicAngle=0,this.ascender=Math.round(this.ascender*this.scaleFactor),this.decender=Math.round(this.decender*this.scaleFactor),this.lineGap=Math.round(this.lineGap*this.scaleFactor),this.capHeight=this.os2.exists&&this.os2.capHeight||this.ascender,this.xHeight=this.os2.exists&&this.os2.xHeight||0,this.familyClass=(this.os2.exists&&this.os2.familyClass||0)>>8,this.isSerif=(s=this.familyClass)===1||s===2||s===3||s===4||s===5||s===7,this.isScript=this.familyClass===10,this.flags=0,this.post.isFixedPitch&&(this.flags|=1),this.isSerif&&(this.flags|=2),this.isScript&&(this.flags|=8),this.italicAngle!==0&&(this.flags|=64),this.flags|=32,!this.cmap.unicode)throw new Error("No unicode cmap for font")},n.prototype.characterToGlyph=function(e){var t;return((t=this.cmap.unicode)!=null?t.codeMap[e]:void 0)||0},n.prototype.widthOfGlyph=function(e){var t;return t=1e3/this.head.unitsPerEm,this.hmtx.forGlyph(e).advance*t},n.prototype.widthOfString=function(e,t,i){var o,s,f,u;for(f=0,s=0,u=(e=""+e).length;0<=u?su;s=0<=u?++s:--s)o=e.charCodeAt(s),f+=this.widthOfGlyph(this.characterToGlyph(o))+i*(1e3/t)||0;return f*(t/1e3)},n.prototype.lineHeight=function(e,t){var i;return t==null&&(t=!1),i=t?this.lineGap:0,(this.ascender+i-this.decender)/1e3*e},n})();var Qn,Yr=(function(){function n(e){this.data=e!=null?e:[],this.pos=0,this.length=this.data.length}return n.prototype.readByte=function(){return this.data[this.pos++]},n.prototype.writeByte=function(e){return this.data[this.pos++]=e},n.prototype.readUInt32=function(){return 16777216*this.readByte()+(this.readByte()<<16)+(this.readByte()<<8)+this.readByte()},n.prototype.writeUInt32=function(e){return this.writeByte(e>>>24&255),this.writeByte(e>>16&255),this.writeByte(e>>8&255),this.writeByte(255&e)},n.prototype.readInt32=function(){var e;return(e=this.readUInt32())>=2147483648?e-4294967296:e},n.prototype.writeInt32=function(e){return e<0&&(e+=4294967296),this.writeUInt32(e)},n.prototype.readUInt16=function(){return this.readByte()<<8|this.readByte()},n.prototype.writeUInt16=function(e){return this.writeByte(e>>8&255),this.writeByte(255&e)},n.prototype.readInt16=function(){var e;return(e=this.readUInt16())>=32768?e-65536:e},n.prototype.writeInt16=function(e){return e<0&&(e+=65536),this.writeUInt16(e)},n.prototype.readString=function(e){var t,i;for(i=[],t=0;0<=e?te;t=0<=e?++t:--t)i[t]=String.fromCharCode(this.readByte());return i.join("")},n.prototype.writeString=function(e){var t,i,o;for(o=[],t=0,i=e.length;0<=i?ti;t=0<=i?++t:--t)o.push(this.writeByte(e.charCodeAt(t)));return o},n.prototype.readShort=function(){return this.readInt16()},n.prototype.writeShort=function(e){return this.writeInt16(e)},n.prototype.readLongLong=function(){var e,t,i,o,s,f,u,c;return e=this.readByte(),t=this.readByte(),i=this.readByte(),o=this.readByte(),s=this.readByte(),f=this.readByte(),u=this.readByte(),c=this.readByte(),128&e?-1*(72057594037927940*(255^e)+281474976710656*(255^t)+1099511627776*(255^i)+4294967296*(255^o)+16777216*(255^s)+65536*(255^f)+256*(255^u)+(255^c)+1):72057594037927940*e+281474976710656*t+1099511627776*i+4294967296*o+16777216*s+65536*f+256*u+c},n.prototype.writeLongLong=function(e){var t,i;return t=Math.floor(e/4294967296),i=4294967295&e,this.writeByte(t>>24&255),this.writeByte(t>>16&255),this.writeByte(t>>8&255),this.writeByte(255&t),this.writeByte(i>>24&255),this.writeByte(i>>16&255),this.writeByte(i>>8&255),this.writeByte(255&i)},n.prototype.readInt=function(){return this.readInt32()},n.prototype.writeInt=function(e){return this.writeInt32(e)},n.prototype.read=function(e){var t,i;for(t=[],i=0;0<=e?ie;i=0<=e?++i:--i)t.push(this.readByte());return t},n.prototype.write=function(e){var t,i,o,s;for(s=[],i=0,o=e.length;is;o=0<=s?++o:--o)i={tag:t.readString(4),checksum:t.readInt(),offset:t.readInt(),length:t.readInt()},this.tables[i.tag]=i}return e.prototype.encode=function(t){var i,o,s,f,u,c,d,m,A,P,p,B,O;for(O in p=Object.keys(t).length,c=Math.log(2),A=16*Math.floor(Math.log(p)/c),f=Math.floor(A/c),m=16*p-A,(o=new Yr).writeInt(this.scalarType),o.writeShort(p),o.writeShort(A),o.writeShort(f),o.writeShort(m),s=16*p,d=o.pos+s,u=null,B=[],t)for(P=t[O],o.writeString(O),o.writeInt(n(P)),o.writeInt(d),o.writeInt(P.length),B=B.concat(P),O==="head"&&(u=d),d+=P.length;d%4;)B.push(0),d++;return o.write(B),i=2981146554-n(o.data),o.pos=u+8,o.writeUInt32(i),o.data},n=function(t){var i,o,s,f;for(t=hh.call(t);t.length%4;)t.push(0);for(s=new Yr(t),o=0,i=0,f=t.length;iP;c=0<=P?++D:--D)lt.push(e.readUInt16());return lt})(),e.pos+=2,O=(function(){var D,lt;for(lt=[],c=D=0;0<=P?DP;c=0<=P?++D:--D)lt.push(e.readUInt16());return lt})(),d=(function(){var D,lt;for(lt=[],c=D=0;0<=P?DP;c=0<=P?++D:--D)lt.push(e.readUInt16());return lt})(),m=(function(){var D,lt;for(lt=[],c=D=0;0<=P?DP;c=0<=P?++D:--D)lt.push(e.readUInt16());return lt})(),o=(this.length-e.pos+this.offset)/2,u=(function(){var D,lt;for(lt=[],c=D=0;0<=o?Do;c=0<=o?++D:--D)lt.push(e.readUInt16());return lt})(),c=S=0,J=s.length;S=M;i=B<=M?++Y:--Y)m[c]===0?f=i+d[c]:(f=u[m[c]/2+(i-B)-(P-c)]||0)!==0&&(f+=d[c]),this.codeMap[i]=65535&f}e.pos=A}return n.encode=function(e,t){var i,o,s,f,u,c,d,m,A,P,p,B,O,M,S,Y,J,D,lt,yt,mt,tt,z,et,N,E,q,U,rt,ct,pt,nt,ft,At,xt,x,j,R,V,$,Q,it,at,dt,_t,St;switch(U=new Yr,f=Object.keys(e).sort(function(kt,zt){return kt-zt}),t){case"macroman":for(O=0,M=(function(){var kt=[];for(B=0;B<256;++B)kt.push(0);return kt})(),Y={0:0},s={},rt=0,ft=f.length;rt=32768)for(c.push(0),yt.push(2*(p.length+z-B)),o=nt=N;N<=m?nt<=m:nt>=m;o=N<=m?++nt:--nt)p.push(i[o].new);else c.push(q-N),yt.push(0)}for(U.writeUInt16(3),U.writeUInt16(1),U.writeUInt32(12),U.writeUInt16(4),U.writeUInt16(16+8*z+2*p.length),U.writeUInt16(0),U.writeUInt16(et),U.writeUInt16(tt),U.writeUInt16(P),U.writeUInt16(mt),Q=0,x=A.length;Qo;i=0<=o?++i:--i)t=new Su(e,this.offset),this.tables.push(t),t.isUnicode&&this.unicode==null&&(this.unicode=t);return!0},n.encode=function(e,t){var i,o;return t==null&&(t="macroman"),i=Su.encode(e,t),(o=new Yr).writeUInt16(0),o.writeUInt16(1),i.table=o.data.concat(i.subtable),i},n})(),b1=(function(){function n(){return n.__super__.constructor.apply(this,arguments)}return dr(n,Qn),n.prototype.tag="hhea",n.prototype.parse=function(e){return e.pos=this.offset,this.version=e.readInt(),this.ascender=e.readShort(),this.decender=e.readShort(),this.lineGap=e.readShort(),this.advanceWidthMax=e.readShort(),this.minLeftSideBearing=e.readShort(),this.minRightSideBearing=e.readShort(),this.xMaxExtent=e.readShort(),this.caretSlopeRise=e.readShort(),this.caretSlopeRun=e.readShort(),this.caretOffset=e.readShort(),e.pos+=8,this.metricDataFormat=e.readShort(),this.numberOfMetrics=e.readUInt16()},n})(),w1=(function(){function n(){return n.__super__.constructor.apply(this,arguments)}return dr(n,Qn),n.prototype.tag="OS/2",n.prototype.parse=function(e){if(e.pos=this.offset,this.version=e.readUInt16(),this.averageCharWidth=e.readShort(),this.weightClass=e.readUInt16(),this.widthClass=e.readUInt16(),this.type=e.readShort(),this.ySubscriptXSize=e.readShort(),this.ySubscriptYSize=e.readShort(),this.ySubscriptXOffset=e.readShort(),this.ySubscriptYOffset=e.readShort(),this.ySuperscriptXSize=e.readShort(),this.ySuperscriptYSize=e.readShort(),this.ySuperscriptXOffset=e.readShort(),this.ySuperscriptYOffset=e.readShort(),this.yStrikeoutSize=e.readShort(),this.yStrikeoutPosition=e.readShort(),this.familyClass=e.readShort(),this.panose=(function(){var t,i;for(i=[],t=0;t<10;++t)i.push(e.readByte());return i})(),this.charRange=(function(){var t,i;for(i=[],t=0;t<4;++t)i.push(e.readInt());return i})(),this.vendorID=e.readString(4),this.selection=e.readShort(),this.firstCharIndex=e.readShort(),this.lastCharIndex=e.readShort(),this.version>0&&(this.ascent=e.readShort(),this.descent=e.readShort(),this.lineGap=e.readShort(),this.winAscent=e.readShort(),this.winDescent=e.readShort(),this.codePageRange=(function(){var t,i;for(i=[],t=0;t<2;t=++t)i.push(e.readInt());return i})(),this.version>1))return this.xHeight=e.readShort(),this.capHeight=e.readShort(),this.defaultChar=e.readShort(),this.breakChar=e.readShort(),this.maxContext=e.readShort()},n})(),y1=(function(){function n(){return n.__super__.constructor.apply(this,arguments)}return dr(n,Qn),n.prototype.tag="post",n.prototype.parse=function(e){var t,i,o;switch(e.pos=this.offset,this.format=e.readInt(),this.italicAngle=e.readInt(),this.underlinePosition=e.readShort(),this.underlineThickness=e.readShort(),this.isFixedPitch=e.readInt(),this.minMemType42=e.readInt(),this.maxMemType42=e.readInt(),this.minMemType1=e.readInt(),this.maxMemType1=e.readInt(),this.format){case 65536:case 196608:break;case 131072:var s;for(i=e.readUInt16(),this.glyphNameIndex=[],s=0;0<=i?si;s=0<=i?++s:--s)this.glyphNameIndex.push(e.readUInt16());for(this.names=[],o=[];e.posu;s=0<=u?++f:--f)c.push(e.readUInt32());return c}.call(this)}},n})(),x1=function(n,e){this.raw=n,this.length=n.length,this.platformID=e.platformID,this.encodingID=e.encodingID,this.languageID=e.languageID},_1=(function(){function n(){return n.__super__.constructor.apply(this,arguments)}return dr(n,Qn),n.prototype.tag="name",n.prototype.parse=function(e){var t,i,o,s,f,u,c,d,m,A,P;for(e.pos=this.offset,e.readShort(),t=e.readShort(),u=e.readShort(),i=[],s=0;0<=t?st;s=0<=t?++s:--s)i.push({platformID:e.readShort(),encodingID:e.readShort(),languageID:e.readShort(),nameID:e.readShort(),length:e.readShort(),offset:this.offset+u+e.readShort()});for(c={},s=m=0,A=i.length;mu;t=0<=u?++t:--t)this.metrics.push({advance:e.readUInt16(),lsb:e.readInt16()});for(o=this.file.maxp.numGlyphs-this.file.hhea.numberOfMetrics,this.leftSideBearings=(function(){var d,m;for(m=[],t=d=0;0<=o?do;t=0<=o?++d:--d)m.push(e.readInt16());return m})(),this.widths=function(){var d,m,A,P;for(P=[],d=0,m=(A=this.metrics).length;do;t=0<=o?++f:--f)c.push(this.widths.push(i));return c},n.prototype.forGlyph=function(e){return e in this.metrics?this.metrics[e]:{advance:this.metrics[this.metrics.length-1].advance,lsb:this.leftSideBearings[e-this.metrics.length]}},n})(),hh=[].slice,L1=(function(){function n(){return n.__super__.constructor.apply(this,arguments)}return dr(n,Qn),n.prototype.tag="glyf",n.prototype.parse=function(){return this.cache={}},n.prototype.glyphFor=function(e){var t,i,o,s,f,u,c,d,m,A;return e in this.cache?this.cache[e]:(s=this.file.loca,t=this.file.contents,i=s.indexOf(e),(o=s.lengthOf(e))===0?this.cache[e]=null:(t.pos=this.offset+i,f=(u=new Yr(t.read(o))).readShort(),d=u.readShort(),A=u.readShort(),c=u.readShort(),m=u.readShort(),this.cache[e]=f===-1?new k1(u,d,A,c,m):new S1(u,f,d,A,c,m),this.cache[e]))},n.prototype.encode=function(e,t,i){var o,s,f,u,c;for(f=[],s=[],u=0,c=t.length;u0&&(o+=c)}for(var d=new Array(4*i.length),m=0;m>8,d[4*m+1]=(16711680&i[m])>>16,d[4*m]=(4278190080&i[m])>>24;return d},n})(),I1=(function(){function n(e){this.font=e,this.subset={},this.unicodes={},this.next=33}return n.prototype.generateCmap=function(){var e,t,i,o,s;for(t in o=this.font.cmap.tables[0].codeMap,e={},s=this.subset)i=s[t],e[t]=o[i];return e},n.prototype.glyphsFor=function(e){var t,i,o,s,f,u,c;for(o={},f=0,u=e.length;f0)for(s in c=this.glyphsFor(t))i=c[s],o[s]=i;return o},n.prototype.encode=function(e,t){var i,o,s,f,u,c,d,m,A,P,p,B,O,M,S;for(o in i=uh.encode(this.generateCmap(),"unicode"),f=this.glyphsFor(e),p={0:0},S=i.charMap)p[(c=S[o]).old]=c.new;for(B in P=i.maxGlyphID,f)B in p||(p[B]=P++);return m=(function(Y){var J,D;for(J in D={},Y)D[Y[J]]=J;return D})(p),A=Object.keys(m).sort(function(Y,J){return Y-J}),O=(function(){var Y,J,D;for(D=[],Y=0,J=A.length;Y>"),s.join(` `)}return""+t},e})();export{B1 as AcroForm,Ct as AcroFormAppearance,rn as AcroFormButton,bs as AcroFormCheckBox,Ji as AcroFormChoiceField,Ki as AcroFormComboBox,ms as AcroFormEditBox,$i as AcroFormListBox,ws as AcroFormPasswordField,vs as AcroFormPushButton,Xi as AcroFormRadioButton,gi as AcroFormTextField,xs as GState,pi as ShadingPattern,Yi as TilingPattern,Tt as default,Tt as jsPDF};