@ianicdev/datatables2 0.8.3 → 0.8.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/dist/dataTables-B4eEvOoG.cjs +4 -0
  2. package/dist/dataTables-BOwvt8w7.js +5735 -0
  3. package/dist/datatables.cjs +1 -1
  4. package/dist/datatables.css +1 -1
  5. package/dist/datatables.js +5 -3
  6. package/dist/filesaver-Deatpm3H.cjs +1 -0
  7. package/dist/{filesaver-hxbVqAA5.js → filesaver-K4_fCr7v.js} +3 -3
  8. package/dist/html2canvas.esm-CUkZERmf.cjs +22 -0
  9. package/dist/{html2canvas.esm-DgdJBc_o.js → html2canvas.esm-Dmi1NfiH.js} +79 -79
  10. package/dist/{index-B0beGsbl.js → index-BDjxEH7H.js} +6677 -6880
  11. package/dist/index-DTvYd6IO.cjs +27 -0
  12. package/dist/{index.es-DgoGxMTg.js → index.es-Bzj9GCv8.js} +50 -50
  13. package/dist/index.es-DUsc-TdR.cjs +18 -0
  14. package/dist/jspdf-BF1VF7Ex.cjs +194 -0
  15. package/dist/jspdf-VsfW7tvh.js +10979 -0
  16. package/dist/printjs-BbgDICDe.cjs +1 -0
  17. package/dist/{printjs-DloSJk7-.js → printjs-kC3Qmb-l.js} +30 -30
  18. package/dist/sortablejs-BhPwT7wS.cjs +6 -0
  19. package/dist/{sortablejs-oSzf6C5Q.js → sortablejs-DSHM8iDp.js} +2 -2
  20. package/dist/xlsx-BBXALOAs.cjs +128 -0
  21. package/dist/{xlsx-F0a4dQhU.js → xlsx-vtl6oPEm.js} +42 -42
  22. package/package.json +20 -20
  23. package/dist/dataTables-YjZRIl4q.cjs +0 -4
  24. package/dist/dataTables-yiySrT5Y.js +0 -5866
  25. package/dist/filesaver-DK4OWeXC.cjs +0 -1
  26. package/dist/html2canvas.esm-BA_v9SIU.cjs +0 -22
  27. package/dist/index-C77NxUS9.cjs +0 -27
  28. package/dist/index.es-CWhDHun6.cjs +0 -18
  29. package/dist/jspdf-BxFtYFSp.js +0 -9159
  30. package/dist/jspdf-m38fbNCd.cjs +0 -244
  31. package/dist/printjs-D_W5E6Tg.cjs +0 -1
  32. package/dist/sortablejs-DFlpjwso.cjs +0 -6
  33. package/dist/xlsx-70x3xVy4.cjs +0 -128
@@ -1,244 +0,0 @@
1
- "use strict";function he(r){"@babel/helpers - typeof";return he=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},he(r)}var tr=Uint8Array,vr=Uint16Array,qs=Int32Array,xo=new tr([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Lo=new tr([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),_s=new tr([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Hu=function(r,t){for(var e=new vr(31),i=0;i<31;++i)e[i]=t+=1<<r[i-1];for(var o=new qs(e[30]),i=1;i<30;++i)for(var a=e[i];a<e[i+1];++a)o[a]=a-e[i]<<5|i;return{b:e,r:o}},Wu=Hu(xo,2),Vu=Wu.b,Ps=Wu.r;Vu[28]=258,Ps[258]=28;var Gu=Hu(Lo,0),uh=Gu.b,vu=Gu.r,ks=new vr(32768);for(var we=0;we<32768;++we){var Cn=(we&43690)>>1|(we&21845)<<1;Cn=(Cn&52428)>>2|(Cn&13107)<<2,Cn=(Cn&61680)>>4|(Cn&3855)<<4,ks[we]=((Cn&65280)>>8|(Cn&255)<<8)>>1}var Qr=function(r,t,e){for(var i=r.length,o=0,a=new vr(t);o<i;++o)r[o]&&++a[r[o]-1];var u=new vr(t);for(o=1;o<t;++o)u[o]=u[o-1]+a[o-1]<<1;var h;if(e){h=new vr(1<<t);var f=15-t;for(o=0;o<i;++o)if(r[o])for(var d=o<<4|r[o],v=t-r[o],m=u[r[o]-1]++<<v,w=m|(1<<v)-1;m<=w;++m)h[ks[m]>>f]=d}else for(h=new vr(i),o=0;o<i;++o)r[o]&&(h[o]=ks[u[r[o]-1]++]>>15-r[o]);return h},On=new tr(288);for(var we=0;we<144;++we)On[we]=8;for(var we=144;we<256;++we)On[we]=9;for(var we=256;we<280;++we)On[we]=7;for(var we=280;we<288;++we)On[we]=8;var ma=new tr(32);for(var we=0;we<32;++we)ma[we]=5;var lh=Qr(On,9,0),hh=Qr(On,9,1),fh=Qr(ma,5,0),ch=Qr(ma,5,1),ds=function(r){for(var t=r[0],e=1;e<r.length;++e)r[e]>t&&(t=r[e]);return t},Mr=function(r,t,e){var i=t/8|0;return(r[i]|r[i+1]<<8)>>(t&7)&e},ps=function(r,t){var e=t/8|0;return(r[e]|r[e+1]<<8|r[e+2]<<16)>>(t&7)},zs=function(r){return(r+7)/8|0},Yu=function(r,t,e){return(e==null||e>r.length)&&(e=r.length),new tr(r.subarray(t,e))},dh=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],Rr=function(r,t,e){var i=new Error(t||dh[r]);if(i.code=r,Error.captureStackTrace&&Error.captureStackTrace(i,Rr),!e)throw i;return i},ph=function(r,t,e,i){var o=r.length,a=0;if(!o||t.f&&!t.l)return e||new tr(0);var u=!e,h=u||t.i!=2,f=t.i;u&&(e=new tr(o*3));var d=function(Lt){var Ft=e.length;if(Lt>Ft){var _t=new tr(Math.max(Ft*2,Lt));_t.set(e),e=_t}},v=t.f||0,m=t.p||0,w=t.b||0,p=t.l,F=t.d,P=t.m,D=t.n,_=o*8;do{if(!p){v=Mr(r,m,1);var B=Mr(r,m+1,3);if(m+=3,B)if(B==1)p=hh,F=ch,P=9,D=5;else if(B==2){var wt=Mr(r,m,31)+257,tt=Mr(r,m+10,15)+4,z=wt+Mr(r,m+5,31)+1;m+=14;for(var nt=new tr(z),pt=new tr(19),k=0;k<tt;++k)pt[_s[k]]=Mr(r,m+k*3,7);m+=tt*3;for(var C=ds(pt),W=(1<<C)-1,R=Qr(pt,C,1),k=0;k<z;){var st=R[Mr(r,m,W)];m+=st&15;var G=st>>4;if(G<16)nt[k++]=G;else{var at=0,ft=0;for(G==16?(ft=3+Mr(r,m,3),m+=2,at=nt[k-1]):G==17?(ft=3+Mr(r,m,7),m+=3):G==18&&(ft=11+Mr(r,m,127),m+=7);ft--;)nt[k++]=at}}var $=nt.subarray(0,wt),ht=nt.subarray(wt);P=ds($),D=ds(ht),p=Qr($,P,1),F=Qr(ht,D,1)}else Rr(1);else{var G=zs(m)+4,it=r[G-4]|r[G-3]<<8,ut=G+it;if(ut>o){f&&Rr(0);break}h&&d(w+it),e.set(r.subarray(G,ut),w),t.b=w+=it,t.p=m=ut*8,t.f=v;continue}if(m>_){f&&Rr(0);break}}h&&d(w+131072);for(var dt=(1<<P)-1,jt=(1<<D)-1,A=m;;A=m){var at=p[ps(r,m)&dt],j=at>>4;if(m+=at&15,m>_){f&&Rr(0);break}if(at||Rr(2),j<256)e[w++]=j;else if(j==256){A=m,p=null;break}else{var M=j-254;if(j>264){var k=j-257,q=xo[k];M=Mr(r,m,(1<<q)-1)+Vu[k],m+=q}var J=F[ps(r,m)&jt],Q=J>>4;J||Rr(3),m+=J&15;var ht=uh[Q];if(Q>3){var q=Lo[Q];ht+=ps(r,m)&(1<<q)-1,m+=q}if(m>_){f&&Rr(0);break}h&&d(w+131072);var et=w+M;if(w<ht){var rt=a-ht,At=Math.min(ht,et);for(rt+w<0&&Rr(3);w<At;++w)e[w]=i[rt+w]}for(;w<et;++w)e[w]=e[w-ht]}}t.l=p,t.p=A,t.b=w,t.f=v,p&&(v=1,t.m=P,t.d=F,t.n=D)}while(!v);return w!=e.length&&u?Yu(e,0,w):e.subarray(0,w)},dn=function(r,t,e){e<<=t&7;var i=t/8|0;r[i]|=e,r[i+1]|=e>>8},da=function(r,t,e){e<<=t&7;var i=t/8|0;r[i]|=e,r[i+1]|=e>>8,r[i+2]|=e>>16},gs=function(r,t){for(var e=[],i=0;i<r.length;++i)r[i]&&e.push({s:i,f:r[i]});var o=e.length,a=e.slice();if(!o)return{t:Xu,l:0};if(o==1){var u=new tr(e[0].s+1);return u[e[0].s]=1,{t:u,l:1}}e.sort(function(ut,wt){return ut.f-wt.f}),e.push({s:-1,f:25001});var h=e[0],f=e[1],d=0,v=1,m=2;for(e[0]={s:-1,f:h.f+f.f,l:h,r:f};v!=o-1;)h=e[e[d].f<e[m].f?d++:m++],f=e[d!=v&&e[d].f<e[m].f?d++:m++],e[v++]={s:-1,f:h.f+f.f,l:h,r:f};for(var w=a[0].s,i=1;i<o;++i)a[i].s>w&&(w=a[i].s);var p=new vr(w+1),F=Fs(e[v-1],p,0);if(F>t){var i=0,P=0,D=F-t,_=1<<D;for(a.sort(function(wt,tt){return p[tt.s]-p[wt.s]||wt.f-tt.f});i<o;++i){var B=a[i].s;if(p[B]>t)P+=_-(1<<F-p[B]),p[B]=t;else break}for(P>>=D;P>0;){var G=a[i].s;p[G]<t?P-=1<<t-p[G]++-1:++i}for(;i>=0&&P;--i){var it=a[i].s;p[it]==t&&(--p[it],++P)}F=t}return{t:new tr(p),l:F}},Fs=function(r,t,e){return r.s==-1?Math.max(Fs(r.l,t,e+1),Fs(r.r,t,e+1)):t[r.s]=e},mu=function(r){for(var t=r.length;t&&!r[--t];);for(var e=new vr(++t),i=0,o=r[0],a=1,u=function(f){e[i++]=f},h=1;h<=t;++h)if(r[h]==o&&h!=t)++a;else{if(!o&&a>2){for(;a>138;a-=138)u(32754);a>2&&(u(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(u(o),--a;a>6;a-=6)u(8304);a>2&&(u(a-3<<5|8208),a=0)}for(;a--;)u(o);a=1,o=r[h]}return{c:e.subarray(0,i),n:t}},pa=function(r,t){for(var e=0,i=0;i<t.length;++i)e+=r[i]*t[i];return e},Ju=function(r,t,e){var i=e.length,o=zs(t+2);r[o]=i&255,r[o+1]=i>>8,r[o+2]=r[o]^255,r[o+3]=r[o+1]^255;for(var a=0;a<i;++a)r[o+a+4]=e[a];return(o+4+i)*8},bu=function(r,t,e,i,o,a,u,h,f,d,v){dn(t,v++,e),++o[256];for(var m=gs(o,15),w=m.t,p=m.l,F=gs(a,15),P=F.t,D=F.l,_=mu(w),B=_.c,G=_.n,it=mu(P),ut=it.c,wt=it.n,tt=new vr(19),z=0;z<B.length;++z)++tt[B[z]&31];for(var z=0;z<ut.length;++z)++tt[ut[z]&31];for(var nt=gs(tt,7),pt=nt.t,k=nt.l,C=19;C>4&&!pt[_s[C-1]];--C);var W=d+5<<3,R=pa(o,On)+pa(a,ma)+u,st=pa(o,w)+pa(a,P)+u+14+3*C+pa(tt,pt)+2*tt[16]+3*tt[17]+7*tt[18];if(f>=0&&W<=R&&W<=st)return Ju(t,v,r.subarray(f,f+d));var at,ft,$,ht;if(dn(t,v,1+(st<R)),v+=2,st<R){at=Qr(w,p,0),ft=w,$=Qr(P,D,0),ht=P;var dt=Qr(pt,k,0);dn(t,v,G-257),dn(t,v+5,wt-1),dn(t,v+10,C-4),v+=14;for(var z=0;z<C;++z)dn(t,v+3*z,pt[_s[z]]);v+=3*C;for(var jt=[B,ut],A=0;A<2;++A)for(var j=jt[A],z=0;z<j.length;++z){var M=j[z]&31;dn(t,v,dt[M]),v+=pt[M],M>15&&(dn(t,v,j[z]>>5&127),v+=j[z]>>12)}}else at=lh,ft=On,$=fh,ht=ma;for(var z=0;z<h;++z){var q=i[z];if(q>255){var M=q>>18&31;da(t,v,at[M+257]),v+=ft[M+257],M>7&&(dn(t,v,q>>23&31),v+=xo[M]);var J=q&31;da(t,v,$[J]),v+=ht[J],J>3&&(da(t,v,q>>5&8191),v+=Lo[J])}else da(t,v,at[q]),v+=ft[q]}return da(t,v,at[256]),v+ft[256]},gh=new qs([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),Xu=new tr(0),vh=function(r,t,e,i,o,a){var u=a.z||r.length,h=new tr(i+u+5*(1+Math.ceil(u/7e3))+o),f=h.subarray(i,h.length-o),d=a.l,v=(a.r||0)&7;if(t){v&&(f[0]=a.r>>3);for(var m=gh[t-1],w=m>>13,p=m&8191,F=(1<<e)-1,P=a.p||new vr(32768),D=a.h||new vr(F+1),_=Math.ceil(e/3),B=2*_,G=function(Ut){return(r[Ut]^r[Ut+1]<<_^r[Ut+2]<<B)&F},it=new qs(25e3),ut=new vr(288),wt=new vr(32),tt=0,z=0,nt=a.i||0,pt=0,k=a.w||0,C=0;nt+2<u;++nt){var W=G(nt),R=nt&32767,st=D[W];if(P[R]=st,D[W]=R,k<=nt){var at=u-nt;if((tt>7e3||pt>24576)&&(at>423||!d)){v=bu(r,f,0,it,ut,wt,z,pt,C,nt-C,v),pt=tt=z=0,C=nt;for(var ft=0;ft<286;++ft)ut[ft]=0;for(var ft=0;ft<30;++ft)wt[ft]=0}var $=2,ht=0,dt=p,jt=R-st&32767;if(at>2&&W==G(nt-jt))for(var A=Math.min(w,at)-1,j=Math.min(32767,nt),M=Math.min(258,at);jt<=j&&--dt&&R!=st;){if(r[nt+$]==r[nt+$-jt]){for(var q=0;q<M&&r[nt+q]==r[nt+q-jt];++q);if(q>$){if($=q,ht=jt,q>A)break;for(var J=Math.min(jt,q-2),Q=0,ft=0;ft<J;++ft){var et=nt-jt+ft&32767,rt=P[et],At=et-rt&32767;At>Q&&(Q=At,st=et)}}}R=st,st=P[R],jt+=R-st&32767}if(ht){it[pt++]=268435456|Ps[$]<<18|vu[ht];var Lt=Ps[$]&31,Ft=vu[ht]&31;z+=xo[Lt]+Lo[Ft],++ut[257+Lt],++wt[Ft],k=nt+$,++tt}else it[pt++]=r[nt],++ut[r[nt]]}}for(nt=Math.max(nt,k);nt<u;++nt)it[pt++]=r[nt],++ut[r[nt]];v=bu(r,f,d,it,ut,wt,z,pt,C,nt-C,v),d||(a.r=v&7|f[v/8|0]<<3,v-=7,a.h=D,a.p=P,a.i=nt,a.w=k)}else{for(var nt=a.w||0;nt<u+d;nt+=65535){var _t=nt+65535;_t>=u&&(f[v/8|0]=d,_t=u),v=Ju(f,v+1,r.subarray(nt,_t))}a.i=u}return Yu(h,0,i+zs(v)+o)},Ku=function(){var r=1,t=0;return{p:function(e){for(var i=r,o=t,a=e.length|0,u=0;u!=a;){for(var h=Math.min(u+2655,a);u<h;++u)o+=i+=e[u];i=(i&65535)+15*(i>>16),o=(o&65535)+15*(o>>16)}r=i,t=o},d:function(){return r%=65521,t%=65521,(r&255)<<24|(r&65280)<<8|(t&255)<<8|t>>8}}},mh=function(r,t,e,i,o){if(!o&&(o={l:1},t.dictionary)){var a=t.dictionary.subarray(-32768),u=new tr(a.length+r.length);u.set(a),u.set(r,a.length),r=u,o.w=a.length}return vh(r,t.level==null?6:t.level,t.mem==null?o.l?Math.ceil(Math.max(8,Math.min(13,Math.log(r.length)))*1.5):20:12+t.mem,e,i,o)},Zu=function(r,t,e){for(;e;++t)r[t]=e,e>>>=8},bh=function(r,t){var e=t.level,i=e==0?0:e<6?1:e==9?3:2;if(r[0]=120,r[1]=i<<6|(t.dictionary&&32),r[1]|=31-(r[0]<<8|r[1])%31,t.dictionary){var o=Ku();o.p(t.dictionary),Zu(r,2,o.d())}},yh=function(r,t){return((r[0]&15)!=8||r[0]>>4>7||(r[0]<<8|r[1])%31)&&Rr(6,"invalid zlib data"),(r[1]>>5&1)==1&&Rr(6,"invalid zlib data: "+(r[1]&32?"need":"unexpected")+" dictionary"),(r[1]>>3&4)+2};function Cs(r,t){t||(t={});var e=Ku();e.p(r);var i=mh(r,t,t.dictionary?6:2,4);return bh(i,t),Zu(i,i.length-4,e.d()),i}function wh(r,t){return ph(r.subarray(yh(r),-4),{i:2},t,t)}var xh=typeof TextDecoder<"u"&&new TextDecoder,Lh=0;try{xh.decode(Xu,{stream:!0}),Lh=1}catch{}/** @license
2
- *
3
- * jsPDF - PDF Document creation from JavaScript
4
- * Version 3.0.1 Built on 2025-03-17T14:19:36.873Z
5
- * CommitID 00000000
6
- *
7
- * Copyright (c) 2010-2021 James Hall <james@parall.ax>, https://github.com/MrRio/jsPDF
8
- * 2015-2021 yWorks GmbH, http://www.yworks.com
9
- * 2015-2021 Lukas Holländer <lukas.hollaender@yworks.com>, https://github.com/HackbrettXXX
10
- * 2016-2018 Aras Abbasi <aras.abbasi@gmail.com>
11
- * 2010 Aaron Spike, https://github.com/acspike
12
- * 2012 Willow Systems Corporation, https://github.com/willowsystems
13
- * 2012 Pablo Hess, https://github.com/pablohess
14
- * 2012 Florian Jenett, https://github.com/fjenett
15
- * 2013 Warren Weckesser, https://github.com/warrenweckesser
16
- * 2013 Youssef Beddad, https://github.com/lifof
17
- * 2013 Lee Driscoll, https://github.com/lsdriscoll
18
- * 2013 Stefan Slonevskiy, https://github.com/stefslon
19
- * 2013 Jeremy Morel, https://github.com/jmorel
20
- * 2013 Christoph Hartmann, https://github.com/chris-rock
21
- * 2014 Juan Pablo Gaviria, https://github.com/juanpgaviria
22
- * 2014 James Makes, https://github.com/dollaruw
23
- * 2014 Diego Casorran, https://github.com/diegocr
24
- * 2014 Steven Spungin, https://github.com/Flamenco
25
- * 2014 Kenneth Glassey, https://github.com/Gavvers
26
- *
27
- * Permission is hereby granted, free of charge, to any person obtaining
28
- * a copy of this software and associated documentation files (the
29
- * "Software"), to deal in the Software without restriction, including
30
- * without limitation the rights to use, copy, modify, merge, publish,
31
- * distribute, sublicense, and/or sell copies of the Software, and to
32
- * permit persons to whom the Software is furnished to do so, subject to
33
- * the following conditions:
34
- *
35
- * The above copyright notice and this permission notice shall be
36
- * included in all copies or substantial portions of the Software.
37
- *
38
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
39
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
40
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
41
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
42
- * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
43
- * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
44
- * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
45
- *
46
- * Contributor(s):
47
- * siefkenj, ahwolf, rickygu, Midnith, saintclair, eaparango,
48
- * kim3er, mfo, alnorth, Flamenco
49
- */var Ht=function(){return typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:this}();function vs(){Ht.console&&typeof Ht.console.log=="function"&&Ht.console.log.apply(Ht.console,arguments)}var me={log:vs,warn:function(r){Ht.console&&(typeof Ht.console.warn=="function"?Ht.console.warn.apply(Ht.console,arguments):vs.call(null,arguments))},error:function(r){Ht.console&&(typeof Ht.console.error=="function"?Ht.console.error.apply(Ht.console,arguments):vs(r))}};function ms(r,t,e){var i=new XMLHttpRequest;i.open("GET",r),i.responseType="blob",i.onload=function(){Jn(i.response,t,e)},i.onerror=function(){me.error("could not download file")},i.send()}function yu(r){var t=new XMLHttpRequest;t.open("HEAD",r,!1);try{t.send()}catch{}return t.status>=200&&t.status<=299}function uo(r){try{r.dispatchEvent(new MouseEvent("click"))}catch{var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),r.dispatchEvent(t)}}var ga,Is,Jn=Ht.saveAs||((typeof window>"u"?"undefined":he(window))!=="object"||window!==Ht?function(){}:typeof HTMLAnchorElement<"u"&&"download"in HTMLAnchorElement.prototype?function(r,t,e){var i=Ht.URL||Ht.webkitURL,o=document.createElement("a");t=t||r.name||"download",o.download=t,o.rel="noopener",typeof r=="string"?(o.href=r,o.origin!==location.origin?yu(o.href)?ms(r,t,e):uo(o,o.target="_blank"):uo(o)):(o.href=i.createObjectURL(r),setTimeout(function(){i.revokeObjectURL(o.href)},4e4),setTimeout(function(){uo(o)},0))}:"msSaveOrOpenBlob"in navigator?function(r,t,e){if(t=t||r.name||"download",typeof r=="string")if(yu(r))ms(r,t,e);else{var i=document.createElement("a");i.href=r,i.target="_blank",setTimeout(function(){uo(i)})}else navigator.msSaveOrOpenBlob(function(o,a){return a===void 0?a={autoBom:!1}:he(a)!=="object"&&(me.warn("Deprecated: Expected third argument to be a object"),a={autoBom:!a}),a.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(o.type)?new Blob(["\uFEFF",o],{type:o.type}):o}(r,e),t)}:function(r,t,e,i){if((i=i||open("","_blank"))&&(i.document.title=i.document.body.innerText="downloading..."),typeof r=="string")return ms(r,t,e);var o=r.type==="application/octet-stream",a=/constructor/i.test(Ht.HTMLElement)||Ht.safari,u=/CriOS\/[\d]+/.test(navigator.userAgent);if((u||o&&a)&&(typeof FileReader>"u"?"undefined":he(FileReader))==="object"){var h=new FileReader;h.onloadend=function(){var v=h.result;v=u?v:v.replace(/^data:[^;]*;/,"data:attachment/file;"),i?i.location.href=v:location=v,i=null},h.readAsDataURL(r)}else{var f=Ht.URL||Ht.webkitURL,d=f.createObjectURL(r);i?i.location=d:location.href=d,i=null,setTimeout(function(){f.revokeObjectURL(d)},4e4)}});/**
50
- * A class to parse color values
51
- * @author Stoyan Stefanov <sstoo@gmail.com>
52
- * {@link http://www.phpied.com/rgb-color-parser-in-javascript/}
53
- * @license Use it if you like it
54
- */function $u(r){var t;r=r||"",this.ok=!1,r.charAt(0)=="#"&&(r=r.substr(1,6)),r={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"}[r=(r=r.replace(/ /g,"")).toLowerCase()]||r;for(var e=[{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(h){return[parseInt(h[1]),parseInt(h[2]),parseInt(h[3])]}},{re:/^(\w{2})(\w{2})(\w{2})$/,example:["#00ff00","336699"],process:function(h){return[parseInt(h[1],16),parseInt(h[2],16),parseInt(h[3],16)]}},{re:/^(\w{1})(\w{1})(\w{1})$/,example:["#fb0","f0f"],process:function(h){return[parseInt(h[1]+h[1],16),parseInt(h[2]+h[2],16),parseInt(h[3]+h[3],16)]}}],i=0;i<e.length;i++){var o=e[i].re,a=e[i].process,u=o.exec(r);u&&(t=a(u),this.r=t[0],this.g=t[1],this.b=t[2],this.ok=!0)}this.r=this.r<0||isNaN(this.r)?0:this.r>255?255:this.r,this.g=this.g<0||isNaN(this.g)?0:this.g>255?255:this.g,this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b,this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},this.toHex=function(){var h=this.r.toString(16),f=this.g.toString(16),d=this.b.toString(16);return h.length==1&&(h="0"+h),f.length==1&&(f="0"+f),d.length==1&&(d="0"+d),"#"+h+f+d}}/**
55
- * @license
56
- * Joseph Myers does not specify a particular license for his work.
57
- *
58
- * Author: Joseph Myers
59
- * Accessed from: http://www.myersdaily.org/joseph/javascript/md5.js
60
- *
61
- * Modified by: Owen Leong
62
- */function bs(r,t){var e=r[0],i=r[1],o=r[2],a=r[3];e=Ke(e,i,o,a,t[0],7,-680876936),a=Ke(a,e,i,o,t[1],12,-389564586),o=Ke(o,a,e,i,t[2],17,606105819),i=Ke(i,o,a,e,t[3],22,-1044525330),e=Ke(e,i,o,a,t[4],7,-176418897),a=Ke(a,e,i,o,t[5],12,1200080426),o=Ke(o,a,e,i,t[6],17,-1473231341),i=Ke(i,o,a,e,t[7],22,-45705983),e=Ke(e,i,o,a,t[8],7,1770035416),a=Ke(a,e,i,o,t[9],12,-1958414417),o=Ke(o,a,e,i,t[10],17,-42063),i=Ke(i,o,a,e,t[11],22,-1990404162),e=Ke(e,i,o,a,t[12],7,1804603682),a=Ke(a,e,i,o,t[13],12,-40341101),o=Ke(o,a,e,i,t[14],17,-1502002290),e=Ze(e,i=Ke(i,o,a,e,t[15],22,1236535329),o,a,t[1],5,-165796510),a=Ze(a,e,i,o,t[6],9,-1069501632),o=Ze(o,a,e,i,t[11],14,643717713),i=Ze(i,o,a,e,t[0],20,-373897302),e=Ze(e,i,o,a,t[5],5,-701558691),a=Ze(a,e,i,o,t[10],9,38016083),o=Ze(o,a,e,i,t[15],14,-660478335),i=Ze(i,o,a,e,t[4],20,-405537848),e=Ze(e,i,o,a,t[9],5,568446438),a=Ze(a,e,i,o,t[14],9,-1019803690),o=Ze(o,a,e,i,t[3],14,-187363961),i=Ze(i,o,a,e,t[8],20,1163531501),e=Ze(e,i,o,a,t[13],5,-1444681467),a=Ze(a,e,i,o,t[2],9,-51403784),o=Ze(o,a,e,i,t[7],14,1735328473),e=$e(e,i=Ze(i,o,a,e,t[12],20,-1926607734),o,a,t[5],4,-378558),a=$e(a,e,i,o,t[8],11,-2022574463),o=$e(o,a,e,i,t[11],16,1839030562),i=$e(i,o,a,e,t[14],23,-35309556),e=$e(e,i,o,a,t[1],4,-1530992060),a=$e(a,e,i,o,t[4],11,1272893353),o=$e(o,a,e,i,t[7],16,-155497632),i=$e(i,o,a,e,t[10],23,-1094730640),e=$e(e,i,o,a,t[13],4,681279174),a=$e(a,e,i,o,t[0],11,-358537222),o=$e(o,a,e,i,t[3],16,-722521979),i=$e(i,o,a,e,t[6],23,76029189),e=$e(e,i,o,a,t[9],4,-640364487),a=$e(a,e,i,o,t[12],11,-421815835),o=$e(o,a,e,i,t[15],16,530742520),e=Qe(e,i=$e(i,o,a,e,t[2],23,-995338651),o,a,t[0],6,-198630844),a=Qe(a,e,i,o,t[7],10,1126891415),o=Qe(o,a,e,i,t[14],15,-1416354905),i=Qe(i,o,a,e,t[5],21,-57434055),e=Qe(e,i,o,a,t[12],6,1700485571),a=Qe(a,e,i,o,t[3],10,-1894986606),o=Qe(o,a,e,i,t[10],15,-1051523),i=Qe(i,o,a,e,t[1],21,-2054922799),e=Qe(e,i,o,a,t[8],6,1873313359),a=Qe(a,e,i,o,t[15],10,-30611744),o=Qe(o,a,e,i,t[6],15,-1560198380),i=Qe(i,o,a,e,t[13],21,1309151649),e=Qe(e,i,o,a,t[4],6,-145523070),a=Qe(a,e,i,o,t[11],10,-1120210379),o=Qe(o,a,e,i,t[2],15,718787259),i=Qe(i,o,a,e,t[9],21,-343485551),r[0]=jn(e,r[0]),r[1]=jn(i,r[1]),r[2]=jn(o,r[2]),r[3]=jn(a,r[3])}function Ao(r,t,e,i,o,a){return t=jn(jn(t,r),jn(i,a)),jn(t<<o|t>>>32-o,e)}function Ke(r,t,e,i,o,a,u){return Ao(t&e|~t&i,r,t,o,a,u)}function Ze(r,t,e,i,o,a,u){return Ao(t&i|e&~i,r,t,o,a,u)}function $e(r,t,e,i,o,a,u){return Ao(t^e^i,r,t,o,a,u)}function Qe(r,t,e,i,o,a,u){return Ao(e^(t|~i),r,t,o,a,u)}function Qu(r){var t,e=r.length,i=[1732584193,-271733879,-1732584194,271733878];for(t=64;t<=r.length;t+=64)bs(i,Ah(r.substring(t-64,t)));r=r.substring(t-64);var o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(t=0;t<r.length;t++)o[t>>2]|=r.charCodeAt(t)<<(t%4<<3);if(o[t>>2]|=128<<(t%4<<3),t>55)for(bs(i,o),t=0;t<16;t++)o[t]=0;return o[14]=8*e,bs(i,o),i}function Ah(r){var t,e=[];for(t=0;t<64;t+=4)e[t>>2]=r.charCodeAt(t)+(r.charCodeAt(t+1)<<8)+(r.charCodeAt(t+2)<<16)+(r.charCodeAt(t+3)<<24);return e}ga=Ht.atob.bind(Ht),Is=Ht.btoa.bind(Ht);var wu="0123456789abcdef".split("");function Nh(r){for(var t="",e=0;e<4;e++)t+=wu[r>>8*e+4&15]+wu[r>>8*e&15];return t}function Sh(r){return String.fromCharCode((255&r)>>0,(65280&r)>>8,(16711680&r)>>16,(4278190080&r)>>24)}function js(r){return Qu(r).map(Sh).join("")}var _h=function(r){for(var t=0;t<r.length;t++)r[t]=Nh(r[t]);return r.join("")}(Qu("hello"))!="5d41402abc4b2a76b9719d911017c592";function jn(r,t){if(_h){var e=(65535&r)+(65535&t);return(r>>16)+(t>>16)+(e>>16)<<16|65535&e}return r+t&4294967295}/**
63
- * @license
64
- * FPDF is released under a permissive license: there is no usage restriction.
65
- * You may embed it freely in your application (commercial or not), with or
66
- * without modifications.
67
- *
68
- * Reference: http://www.fpdf.org/en/script/script37.php
69
- */function Os(r,t){var e,i,o,a;if(r!==e){for(var u=(o=r,a=1+(256/r.length>>0),new Array(a+1).join(o)),h=[],f=0;f<256;f++)h[f]=f;var d=0;for(f=0;f<256;f++){var v=h[f];d=(d+v+u.charCodeAt(f))%256,h[f]=h[d],h[d]=v}e=r,i=h}else h=i;var m=t.length,w=0,p=0,F="";for(f=0;f<m;f++)p=(p+(v=h[w=(w+1)%256]))%256,h[w]=h[p],h[p]=v,u=h[(h[w]+h[p])%256],F+=String.fromCharCode(t.charCodeAt(f)^u);return F}/**
70
- * @license
71
- * Licensed under the MIT License.
72
- * http://opensource.org/licenses/mit-license
73
- * Author: Owen Leong (@owenl131)
74
- * Date: 15 Oct 2020
75
- * References:
76
- * https://www.cs.cmu.edu/~dst/Adobe/Gallery/anon21jul01-pdf-encryption.txt
77
- * https://github.com/foliojs/pdfkit/blob/master/lib/security.js
78
- * http://www.fpdf.org/en/script/script37.php
79
- */var xu={print:4,modify:8,copy:16,"annot-forms":32};function Fi(r,t,e,i){this.v=1,this.r=2;var o=192;r.forEach(function(h){if(xu.perm!==void 0)throw new Error("Invalid permission: "+h);o+=xu[h]}),this.padding="(¿N^NuŠAd\0NVÿú\b..\0¶Ðh>€/\f©þdSiz";var a=(t+this.padding).substr(0,32),u=(e+this.padding).substr(0,32);this.O=this.processOwnerPassword(a,u),this.P=-(1+(255^o)),this.encryptionKey=js(a+this.O+this.lsbFirstWord(this.P)+this.hexToBytes(i)).substr(0,5),this.U=Os(this.encryptionKey,this.padding)}function Ci(r){if(/[^\u0000-\u00ff]/.test(r))throw new Error("Invalid PDF Name Object: "+r+", Only accept ASCII characters.");for(var t="",e=r.length,i=0;i<e;i++){var o=r.charCodeAt(i);o<33||o===35||o===37||o===40||o===41||o===47||o===60||o===62||o===91||o===93||o===123||o===125||o>126?t+="#"+("0"+o.toString(16)).slice(-2):t+=r[i]}return t}function Lu(r){if(he(r)!=="object")throw new Error("Invalid Context passed to initialize PubSub (jsPDF-module)");var t={};this.subscribe=function(e,i,o){if(o=o||!1,typeof e!="string"||typeof i!="function"||typeof o!="boolean")throw new Error("Invalid arguments passed to PubSub.subscribe (jsPDF-module)");t.hasOwnProperty(e)||(t[e]={});var a=Math.random().toString(35);return t[e][a]=[i,!!o],a},this.unsubscribe=function(e){for(var i in t)if(t[i][e])return delete t[i][e],Object.keys(t[i]).length===0&&delete t[i],!0;return!1},this.publish=function(e){if(t.hasOwnProperty(e)){var i=Array.prototype.slice.call(arguments,1),o=[];for(var a in t[e]){var u=t[e][a];try{u[0].apply(r,i)}catch(h){Ht.console&&me.error("jsPDF PubSub Error",h.message,h)}u[1]&&o.push(a)}o.length&&o.forEach(this.unsubscribe)}},this.getTopics=function(){return t}}function mo(r){if(!(this instanceof mo))return new mo(r);var t="opacity,stroke-opacity".split(",");for(var e in r)r.hasOwnProperty(e)&&t.indexOf(e)>=0&&(this[e]=r[e]);this.id="",this.objectNumber=-1}function tl(r,t){this.gState=r,this.matrix=t,this.id="",this.objectNumber=-1}function Xn(r,t,e,i,o){if(!(this instanceof Xn))return new Xn(r,t,e,i,o);this.type=r==="axial"?2:3,this.coords=t,this.colors=e,tl.call(this,i,o)}function Ii(r,t,e,i,o){if(!(this instanceof Ii))return new Ii(r,t,e,i,o);this.boundingBox=r,this.xStep=t,this.yStep=e,this.stream="",this.cloneIndex=0,tl.call(this,i,o)}function zt(r){var t,e=typeof arguments[0]=="string"?arguments[0]:"p",i=arguments[1],o=arguments[2],a=arguments[3],u=[],h=1,f=16,d="S",v=null;he(r=r||{})==="object"&&(e=r.orientation,i=r.unit||i,o=r.format||o,a=r.compress||r.compressPdf||a,(v=r.encryption||null)!==null&&(v.userPassword=v.userPassword||"",v.ownerPassword=v.ownerPassword||"",v.userPermissions=v.userPermissions||[]),h=typeof r.userUnit=="number"?Math.abs(r.userUnit):1,r.precision!==void 0&&(t=r.precision),r.floatPrecision!==void 0&&(f=r.floatPrecision),d=r.defaultPathOperation||"S"),u=r.filters||(a===!0?["FlateEncode"]:u),i=i||"mm",e=(""+(e||"P")).toLowerCase();var m=r.putOnlyUsedFonts||!1,w={},p={internal:{},__private__:{}};p.__private__.PubSub=Lu;var F="1.3",P=p.__private__.getPdfVersion=function(){return F};p.__private__.setPdfVersion=function(l){F=l};var D={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 D};var _=p.__private__.getPageFormat=function(l){return D[l]};o=o||"a4";var B={COMPAT:"compat",ADVANCED:"advanced"},G=B.COMPAT;function it(){this.saveGraphicsState(),E(new qt(It,0,0,-It,0,bn()*It).toString()+" cm"),this.setFontSize(this.getFontSize()/It),d="n",G=B.ADVANCED}function ut(){this.restoreGraphicsState(),d="S",G=B.COMPAT}var wt=p.__private__.combineFontStyleAndFontWeight=function(l,y){if(l=="bold"&&y=="normal"||l=="bold"&&y==400||l=="normal"&&y=="italic"||l=="bold"&&y=="italic")throw new Error("Invalid Combination of fontweight and fontstyle");return y&&(l=y==400||y==="normal"?l==="italic"?"italic":"normal":y!=700&&y!=="bold"||l!=="normal"?(y==700?"bold":y)+""+l:"bold"),l};p.advancedAPI=function(l){var y=G===B.COMPAT;return y&&it.call(this),typeof l!="function"||(l(this),y&&ut.call(this)),this},p.compatAPI=function(l){var y=G===B.ADVANCED;return y&&ut.call(this),typeof l!="function"||(l(this),y&&it.call(this)),this},p.isAdvancedAPI=function(){return G===B.ADVANCED};var tt,z=function(l){if(G!==B.ADVANCED)throw new Error(l+" is only available in 'advanced' API mode. You need to call advancedAPI() first.")},nt=p.roundToPrecision=p.__private__.roundToPrecision=function(l,y){var O=t||y;if(isNaN(l)||isNaN(O))throw new Error("Invalid argument passed to jsPDF.roundToPrecision");return l.toFixed(O).replace(/0+$/,"")};tt=p.hpf=p.__private__.hpf=typeof f=="number"?function(l){if(isNaN(l))throw new Error("Invalid argument passed to jsPDF.hpf");return nt(l,f)}:f==="smart"?function(l){if(isNaN(l))throw new Error("Invalid argument passed to jsPDF.hpf");return nt(l,l>-1&&l<1?16:5)}:function(l){if(isNaN(l))throw new Error("Invalid argument passed to jsPDF.hpf");return nt(l,16)};var pt=p.f2=p.__private__.f2=function(l){if(isNaN(l))throw new Error("Invalid argument passed to jsPDF.f2");return nt(l,2)},k=p.__private__.f3=function(l){if(isNaN(l))throw new Error("Invalid argument passed to jsPDF.f3");return nt(l,3)},C=p.scale=p.__private__.scale=function(l){if(isNaN(l))throw new Error("Invalid argument passed to jsPDF.scale");return G===B.COMPAT?l*It:G===B.ADVANCED?l:void 0},W=function(l){return G===B.COMPAT?bn()-l:G===B.ADVANCED?l:void 0},R=function(l){return C(W(l))};p.__private__.setPrecision=p.setPrecision=function(l){typeof parseInt(l,10)=="number"&&(t=parseInt(l,10))};var st,at="00000000000000000000000000000000",ft=p.__private__.getFileId=function(){return at},$=p.__private__.setFileId=function(l){return at=l!==void 0&&/^[a-fA-F0-9]{32}$/.test(l)?l.toUpperCase():at.split("").map(function(){return"ABCDEF0123456789".charAt(Math.floor(16*Math.random()))}).join(""),v!==null&&(Je=new Fi(v.userPermissions,v.userPassword,v.ownerPassword,at)),at};p.setFileId=function(l){return $(l),this},p.getFileId=function(){return ft()};var ht=p.__private__.convertDateToPDFDate=function(l){var y=l.getTimezoneOffset(),O=y<0?"+":"-",T=Math.floor(Math.abs(y/60)),X=Math.abs(y%60),lt=[O,M(T),"'",M(X),"'"].join("");return["D:",l.getFullYear(),M(l.getMonth()+1),M(l.getDate()),M(l.getHours()),M(l.getMinutes()),M(l.getSeconds()),lt].join("")},dt=p.__private__.convertPDFDateToDate=function(l){var y=parseInt(l.substr(2,4),10),O=parseInt(l.substr(6,2),10)-1,T=parseInt(l.substr(8,2),10),X=parseInt(l.substr(10,2),10),lt=parseInt(l.substr(12,2),10),yt=parseInt(l.substr(14,2),10);return new Date(y,O,T,X,lt,yt,0)},jt=p.__private__.setCreationDate=function(l){var y;if(l===void 0&&(l=new Date),l instanceof Date)y=ht(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");y=l}return st=y},A=p.__private__.getCreationDate=function(l){var y=st;return l==="jsDate"&&(y=dt(st)),y};p.setCreationDate=function(l){return jt(l),this},p.getCreationDate=function(l){return A(l)};var j,M=p.__private__.padd2=function(l){return("0"+parseInt(l)).slice(-2)},q=p.__private__.padd2Hex=function(l){return("00"+(l=l.toString())).substr(l.length)},J=0,Q=[],et=[],rt=0,At=[],Lt=[],Ft=!1,_t=et,Ut=function(){J=0,rt=0,et=[],Q=[],At=[],rn=De(),kr=De()};p.__private__.setCustomOutputDestination=function(l){Ft=!0,_t=l};var ct=function(l){Ft||(_t=l)};p.__private__.resetCustomOutputDestination=function(){Ft=!1,_t=et};var E=p.__private__.out=function(l){return l=l.toString(),rt+=l.length+1,_t.push(l),_t},Kt=p.__private__.write=function(l){return E(arguments.length===1?l.toString():Array.prototype.join.call(arguments," "))},Mt=p.__private__.getArrayBuffer=function(l){for(var y=l.length,O=new ArrayBuffer(y),T=new Uint8Array(O);y--;)T[y]=l.charCodeAt(y);return O},xt=[["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 xt};var Nt=r.fontSize||16;p.__private__.setFontSize=p.setFontSize=function(l){return Nt=G===B.ADVANCED?l/It:l,this};var Ct,kt=p.__private__.getFontSize=p.getFontSize=function(){return G===B.COMPAT?Nt:Nt*It},Et=r.R2L||!1;p.__private__.setR2L=p.setR2L=function(l){return Et=l,this},p.__private__.getR2L=p.getR2L=function(){return Et};var Gt,Qt=p.__private__.setZoomMode=function(l){var y=[void 0,null,"fullwidth","fullheight","fullpage","original"];if(/^(?:\d+\.\d*|\d*\.\d+|\d+)%$/.test(l))Ct=l;else if(isNaN(l)){if(y.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.');Ct=l}else Ct=parseInt(l,10)};p.__private__.getZoomMode=function(){return Ct};var te,ie=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.');Gt=l};p.__private__.getPageMode=function(){return Gt};var de=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.');te=l};p.__private__.getLayoutMode=function(){return te},p.__private__.setDisplayMode=p.setDisplayMode=function(l,y,O){return Qt(l),de(y),ie(O),this};var Wt={title:"",subject:"",author:"",keywords:"",creator:""};p.__private__.getDocumentProperty=function(l){if(Object.keys(Wt).indexOf(l)===-1)throw new Error("Invalid argument passed to jsPDF.getDocumentProperty");return Wt[l]},p.__private__.getDocumentProperties=function(){return Wt},p.__private__.setDocumentProperties=p.setProperties=p.setDocumentProperties=function(l){for(var y in Wt)Wt.hasOwnProperty(y)&&l[y]&&(Wt[y]=l[y]);return this},p.__private__.setDocumentProperty=function(l,y){if(Object.keys(Wt).indexOf(l)===-1)throw new Error("Invalid arguments passed to jsPDF.setDocumentProperty");return Wt[l]=y};var ee,It,Ye,oe,Sr,ge={},xe={},zr=[],ue={},Bn={},Ae={},_r={},en=null,Ne=0,Yt=[],le=new Lu(p),Mn=r.hotfixes||[],We={},Ur={},Hr=[],qt=function l(y,O,T,X,lt,yt){if(!(this instanceof l))return new l(y,O,T,X,lt,yt);isNaN(y)&&(y=1),isNaN(O)&&(O=0),isNaN(T)&&(T=0),isNaN(X)&&(X=1),isNaN(lt)&&(lt=0),isNaN(yt)&&(yt=0),this._matrix=[y,O,T,X,lt,yt]};Object.defineProperty(qt.prototype,"sx",{get:function(){return this._matrix[0]},set:function(l){this._matrix[0]=l}}),Object.defineProperty(qt.prototype,"shy",{get:function(){return this._matrix[1]},set:function(l){this._matrix[1]=l}}),Object.defineProperty(qt.prototype,"shx",{get:function(){return this._matrix[2]},set:function(l){this._matrix[2]=l}}),Object.defineProperty(qt.prototype,"sy",{get:function(){return this._matrix[3]},set:function(l){this._matrix[3]=l}}),Object.defineProperty(qt.prototype,"tx",{get:function(){return this._matrix[4]},set:function(l){this._matrix[4]=l}}),Object.defineProperty(qt.prototype,"ty",{get:function(){return this._matrix[5]},set:function(l){this._matrix[5]=l}}),Object.defineProperty(qt.prototype,"a",{get:function(){return this._matrix[0]},set:function(l){this._matrix[0]=l}}),Object.defineProperty(qt.prototype,"b",{get:function(){return this._matrix[1]},set:function(l){this._matrix[1]=l}}),Object.defineProperty(qt.prototype,"c",{get:function(){return this._matrix[2]},set:function(l){this._matrix[2]=l}}),Object.defineProperty(qt.prototype,"d",{get:function(){return this._matrix[3]},set:function(l){this._matrix[3]=l}}),Object.defineProperty(qt.prototype,"e",{get:function(){return this._matrix[4]},set:function(l){this._matrix[4]=l}}),Object.defineProperty(qt.prototype,"f",{get:function(){return this._matrix[5]},set:function(l){this._matrix[5]=l}}),Object.defineProperty(qt.prototype,"rotation",{get:function(){return Math.atan2(this.shx,this.sx)}}),Object.defineProperty(qt.prototype,"scaleX",{get:function(){return this.decompose().scale.sx}}),Object.defineProperty(qt.prototype,"scaleY",{get:function(){return this.decompose().scale.sy}}),Object.defineProperty(qt.prototype,"isIdentity",{get:function(){return this.sx===1&&this.shy===0&&this.shx===0&&this.sy===1&&this.tx===0&&this.ty===0}}),qt.prototype.join=function(l){return[this.sx,this.shy,this.shx,this.sy,this.tx,this.ty].map(tt).join(l)},qt.prototype.multiply=function(l){var y=l.sx*this.sx+l.shy*this.shx,O=l.sx*this.shy+l.shy*this.sy,T=l.shx*this.sx+l.sy*this.shx,X=l.shx*this.shy+l.sy*this.sy,lt=l.tx*this.sx+l.ty*this.shx+this.tx,yt=l.tx*this.shy+l.ty*this.sy+this.ty;return new qt(y,O,T,X,lt,yt)},qt.prototype.decompose=function(){var l=this.sx,y=this.shy,O=this.shx,T=this.sy,X=this.tx,lt=this.ty,yt=Math.sqrt(l*l+y*y),Ot=(l/=yt)*O+(y/=yt)*T;O-=l*Ot,T-=y*Ot;var Rt=Math.sqrt(O*O+T*T);return Ot/=Rt,l*(T/=Rt)<y*(O/=Rt)&&(l=-l,y=-y,Ot=-Ot,yt=-yt),{scale:new qt(yt,0,0,Rt,0,0),translate:new qt(1,0,0,1,X,lt),rotate:new qt(l,y,-y,l,0,0),skew:new qt(1,0,Ot,1,0,0)}},qt.prototype.toString=function(l){return this.join(" ")},qt.prototype.inversed=function(){var l=this.sx,y=this.shy,O=this.shx,T=this.sy,X=this.tx,lt=this.ty,yt=1/(l*T-y*O),Ot=T*yt,Rt=-y*yt,Zt=-O*yt,Jt=l*yt;return new qt(Ot,Rt,Zt,Jt,-Ot*X-Zt*lt,-Rt*X-Jt*lt)},qt.prototype.applyToPoint=function(l){var y=l.x*this.sx+l.y*this.shx+this.tx,O=l.x*this.shy+l.y*this.sy+this.ty;return new fi(y,O)},qt.prototype.applyToRectangle=function(l){var y=this.applyToPoint(l),O=this.applyToPoint(new fi(l.x+l.w,l.y+l.h));return new Yi(y.x,y.y,O.x-y.x,O.y-y.y)},qt.prototype.clone=function(){var l=this.sx,y=this.shy,O=this.shx,T=this.sy,X=this.tx,lt=this.ty;return new qt(l,y,O,T,X,lt)},p.Matrix=qt;var Pr=p.matrixMult=function(l,y){return y.multiply(l)},Wr=new qt(1,0,0,1,0,0);p.unitMatrix=p.identityMatrix=Wr;var ir=function(l,y){if(!Bn[l]){var O=(y instanceof Xn?"Sh":"P")+(Object.keys(ue).length+1).toString(10);y.id=O,Bn[l]=O,ue[O]=y,le.publish("addPattern",y)}};p.ShadingPattern=Xn,p.TilingPattern=Ii,p.addShadingPattern=function(l,y){return z("addShadingPattern()"),ir(l,y),this},p.beginTilingPattern=function(l){z("beginTilingPattern()"),Ma(l.boundingBox[0],l.boundingBox[1],l.boundingBox[2]-l.boundingBox[0],l.boundingBox[3]-l.boundingBox[1],l.matrix)},p.endTilingPattern=function(l,y){z("endTilingPattern()"),y.stream=Lt[j].join(`
80
- `),ir(l,y),le.publish("endTilingPattern",y),Hr.pop().restore()};var Re=p.__private__.newObject=function(){var l=De();return fr(l,!0),l},De=p.__private__.newObjectDeferred=function(){return J++,Q[J]=function(){return rt},J},fr=function(l,y){return y=typeof y=="boolean"&&y,Q[l]=rt,y&&E(l+" 0 obj"),l},$n=p.__private__.newAdditionalObject=function(){var l={objId:De(),content:""};return At.push(l),l},rn=De(),kr=De(),Fr=p.__private__.decodeColorString=function(l){var y=l.split(" ");if(y.length!==2||y[1]!=="g"&&y[1]!=="G")y.length===5&&(y[4]==="k"||y[4]==="K")&&(y=[(1-y[0])*(1-y[3]),(1-y[1])*(1-y[3]),(1-y[2])*(1-y[3]),"r"]);else{var O=parseFloat(y[0]);y=[O,O,O,"r"]}for(var T="#",X=0;X<3;X++)T+=("0"+Math.floor(255*parseFloat(y[X])).toString(16)).slice(-2);return T},Cr=p.__private__.encodeColorString=function(l){var y;typeof l=="string"&&(l={ch1:l});var O=l.ch1,T=l.ch2,X=l.ch3,lt=l.ch4,yt=l.pdfColorType==="draw"?["G","RG","K"]:["g","rg","k"];if(typeof O=="string"&&O.charAt(0)!=="#"){var Ot=new $u(O);if(Ot.ok)O=Ot.toHex();else if(!/^\d*\.?\d*$/.test(O))throw new Error('Invalid color "'+O+'" passed to jsPDF.encodeColorString.')}if(typeof O=="string"&&/^#[0-9A-Fa-f]{3}$/.test(O)&&(O="#"+O[1]+O[1]+O[2]+O[2]+O[3]+O[3]),typeof O=="string"&&/^#[0-9A-Fa-f]{6}$/.test(O)){var Rt=parseInt(O.substr(1),16);O=Rt>>16&255,T=Rt>>8&255,X=255&Rt}if(T===void 0||lt===void 0&&O===T&&T===X)if(typeof O=="string")y=O+" "+yt[0];else switch(l.precision){case 2:y=pt(O/255)+" "+yt[0];break;case 3:default:y=k(O/255)+" "+yt[0]}else if(lt===void 0||he(lt)==="object"){if(lt&&!isNaN(lt.a)&&lt.a===0)return y=["1.","1.","1.",yt[1]].join(" ");if(typeof O=="string")y=[O,T,X,yt[1]].join(" ");else switch(l.precision){case 2:y=[pt(O/255),pt(T/255),pt(X/255),yt[1]].join(" ");break;default:case 3:y=[k(O/255),k(T/255),k(X/255),yt[1]].join(" ")}}else if(typeof O=="string")y=[O,T,X,lt,yt[2]].join(" ");else switch(l.precision){case 2:y=[pt(O),pt(T),pt(X),pt(lt),yt[2]].join(" ");break;case 3:default:y=[k(O),k(T),k(X),k(lt),yt[2]].join(" ")}return y},Vr=p.__private__.getFilters=function(){return u},mr=p.__private__.putStream=function(l){var y=(l=l||{}).data||"",O=l.filters||Vr(),T=l.alreadyAppliedFilters||[],X=l.addLength1||!1,lt=y.length,yt=l.objectId,Ot=function(Xe){return Xe};if(v!==null&&yt===void 0)throw new Error("ObjectId must be passed to putStream for file encryption");v!==null&&(Ot=Je.encryptor(yt,0));var Rt={};O===!0&&(O=["FlateEncode"]);var Zt=l.additionalKeyValues||[],Jt=(Rt=zt.API.processDataByFilters!==void 0?zt.API.processDataByFilters(y,O):{data:y,reverseChain:[]}).reverseChain+(Array.isArray(T)?T.join(" "):T.toString());if(Rt.data.length!==0&&(Zt.push({key:"Length",value:Rt.data.length}),X===!0&&Zt.push({key:"Length1",value:lt})),Jt.length!=0)if(Jt.split("/").length-1==1)Zt.push({key:"Filter",value:Jt});else{Zt.push({key:"Filter",value:"["+Jt+"]"});for(var ne=0;ne<Zt.length;ne+=1)if(Zt[ne].key==="DecodeParms"){for(var Le=[],Se=0;Se<Rt.reverseChain.split("/").length-1;Se+=1)Le.push("null");Le.push(Zt[ne].value),Zt[ne].value="["+Le.join(" ")+"]"}}E("<<");for(var Be=0;Be<Zt.length;Be++)E("/"+Zt[Be].key+" "+Zt[Be].value);E(">>"),Rt.data.length!==0&&(E("stream"),E(Ot(Rt.data)),E("endstream"))},Gr=p.__private__.putPage=function(l){var y=l.number,O=l.data,T=l.objId,X=l.contentsObjId;fr(T,!0),E("<</Type /Page"),E("/Parent "+l.rootDictionaryObjId+" 0 R"),E("/Resources "+l.resourceDictionaryObjId+" 0 R"),E("/MediaBox ["+parseFloat(tt(l.mediaBox.bottomLeftX))+" "+parseFloat(tt(l.mediaBox.bottomLeftY))+" "+tt(l.mediaBox.topRightX)+" "+tt(l.mediaBox.topRightY)+"]"),l.cropBox!==null&&E("/CropBox ["+tt(l.cropBox.bottomLeftX)+" "+tt(l.cropBox.bottomLeftY)+" "+tt(l.cropBox.topRightX)+" "+tt(l.cropBox.topRightY)+"]"),l.bleedBox!==null&&E("/BleedBox ["+tt(l.bleedBox.bottomLeftX)+" "+tt(l.bleedBox.bottomLeftY)+" "+tt(l.bleedBox.topRightX)+" "+tt(l.bleedBox.topRightY)+"]"),l.trimBox!==null&&E("/TrimBox ["+tt(l.trimBox.bottomLeftX)+" "+tt(l.trimBox.bottomLeftY)+" "+tt(l.trimBox.topRightX)+" "+tt(l.trimBox.topRightY)+"]"),l.artBox!==null&&E("/ArtBox ["+tt(l.artBox.bottomLeftX)+" "+tt(l.artBox.bottomLeftY)+" "+tt(l.artBox.topRightX)+" "+tt(l.artBox.topRightY)+"]"),typeof l.userUnit=="number"&&l.userUnit!==1&&E("/UserUnit "+l.userUnit),le.publish("putPage",{objId:T,pageContext:Yt[y],pageNumber:y,page:O}),E("/Contents "+X+" 0 R"),E(">>"),E("endobj");var lt=O.join(`
81
- `);return G===B.ADVANCED&&(lt+=`
82
- Q`),fr(X,!0),mr({data:lt,filters:Vr(),objectId:X}),E("endobj"),T},En=p.__private__.putPages=function(){var l,y,O=[];for(l=1;l<=Ne;l++)Yt[l].objId=De(),Yt[l].contentsObjId=De();for(l=1;l<=Ne;l++)O.push(Gr({number:l,data:Lt[l],objId:Yt[l].objId,contentsObjId:Yt[l].contentsObjId,mediaBox:Yt[l].mediaBox,cropBox:Yt[l].cropBox,bleedBox:Yt[l].bleedBox,trimBox:Yt[l].trimBox,artBox:Yt[l].artBox,userUnit:Yt[l].userUnit,rootDictionaryObjId:rn,resourceDictionaryObjId:kr}));fr(rn,!0),E("<</Type /Pages");var T="/Kids [";for(y=0;y<Ne;y++)T+=O[y]+" 0 R ";E(T+"]"),E("/Count "+Ne),E(">>"),E("endobj"),le.publish("postPutPages")},Qn=function(l){le.publish("putFont",{font:l,out:E,newObject:Re,putStream:mr}),l.isAlreadyPutted!==!0&&(l.objectNumber=Re(),E("<<"),E("/Type /Font"),E("/BaseFont /"+Ci(l.postScriptName)),E("/Subtype /Type1"),typeof l.encoding=="string"&&E("/Encoding /"+l.encoding),E("/FirstChar 32"),E("/LastChar 255"),E(">>"),E("endobj"))},ti=function(){for(var l in ge)ge.hasOwnProperty(l)&&(m===!1||m===!0&&w.hasOwnProperty(l))&&Qn(ge[l])},ei=function(l){l.objectNumber=Re();var y=[];y.push({key:"Type",value:"/XObject"}),y.push({key:"Subtype",value:"/Form"}),y.push({key:"BBox",value:"["+[tt(l.x),tt(l.y),tt(l.x+l.width),tt(l.y+l.height)].join(" ")+"]"}),y.push({key:"Matrix",value:"["+l.matrix.toString()+"]"});var O=l.pages[1].join(`
83
- `);mr({data:O,additionalKeyValues:y,objectId:l.objectNumber}),E("endobj")},ri=function(){for(var l in We)We.hasOwnProperty(l)&&ei(We[l])},ba=function(l,y){var O,T=[],X=1/(y-1);for(O=0;O<1;O+=X)T.push(O);if(T.push(1),l[0].offset!=0){var lt={offset:0,color:l[0].color};l.unshift(lt)}if(l[l.length-1].offset!=1){var yt={offset:1,color:l[l.length-1].color};l.push(yt)}for(var Ot="",Rt=0,Zt=0;Zt<T.length;Zt++){for(O=T[Zt];O>l[Rt+1].offset;)Rt++;var Jt=l[Rt].offset,ne=(O-Jt)/(l[Rt+1].offset-Jt),Le=l[Rt].color,Se=l[Rt+1].color;Ot+=q(Math.round((1-ne)*Le[0]+ne*Se[0]).toString(16))+q(Math.round((1-ne)*Le[1]+ne*Se[1]).toString(16))+q(Math.round((1-ne)*Le[2]+ne*Se[2]).toString(16))}return Ot.trim()},So=function(l,y){y||(y=21);var O=Re(),T=ba(l.colors,y),X=[];X.push({key:"FunctionType",value:"0"}),X.push({key:"Domain",value:"[0.0 1.0]"}),X.push({key:"Size",value:"["+y+"]"}),X.push({key:"BitsPerSample",value:"8"}),X.push({key:"Range",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),X.push({key:"Decode",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),mr({data:T,additionalKeyValues:X,alreadyAppliedFilters:["/ASCIIHexDecode"],objectId:O}),E("endobj"),l.objectNumber=Re(),E("<< /ShadingType "+l.type),E("/ColorSpace /DeviceRGB");var lt="/Coords ["+tt(parseFloat(l.coords[0]))+" "+tt(parseFloat(l.coords[1]))+" ";l.type===2?lt+=tt(parseFloat(l.coords[2]))+" "+tt(parseFloat(l.coords[3])):lt+=tt(parseFloat(l.coords[2]))+" "+tt(parseFloat(l.coords[3]))+" "+tt(parseFloat(l.coords[4]))+" "+tt(parseFloat(l.coords[5])),E(lt+="]"),l.matrix&&E("/Matrix ["+l.matrix.toString()+"]"),E("/Function "+O+" 0 R"),E("/Extend [true true]"),E(">>"),E("endobj")},_o=function(l,y){var O=De(),T=Re();y.push({resourcesOid:O,objectOid:T}),l.objectNumber=T;var X=[];X.push({key:"Type",value:"/Pattern"}),X.push({key:"PatternType",value:"1"}),X.push({key:"PaintType",value:"1"}),X.push({key:"TilingType",value:"1"}),X.push({key:"BBox",value:"["+l.boundingBox.map(tt).join(" ")+"]"}),X.push({key:"XStep",value:tt(l.xStep)}),X.push({key:"YStep",value:tt(l.yStep)}),X.push({key:"Resources",value:O+" 0 R"}),l.matrix&&X.push({key:"Matrix",value:"["+l.matrix.toString()+"]"}),mr({data:l.stream,additionalKeyValues:X,objectId:l.objectNumber}),E("endobj")},ni=function(l){var y;for(y in ue)ue.hasOwnProperty(y)&&(ue[y]instanceof Xn?So(ue[y]):ue[y]instanceof Ii&&_o(ue[y],l))},ya=function(l){for(var y in l.objectNumber=Re(),E("<<"),l)switch(y){case"opacity":E("/ca "+pt(l[y]));break;case"stroke-opacity":E("/CA "+pt(l[y]))}E(">>"),E("endobj")},Po=function(){var l;for(l in Ae)Ae.hasOwnProperty(l)&&ya(Ae[l])},Ei=function(){for(var l in E("/XObject <<"),We)We.hasOwnProperty(l)&&We[l].objectNumber>=0&&E("/"+l+" "+We[l].objectNumber+" 0 R");le.publish("putXobjectDict"),E(">>")},ko=function(){Je.oid=Re(),E("<<"),E("/Filter /Standard"),E("/V "+Je.v),E("/R "+Je.r),E("/U <"+Je.toHexString(Je.U)+">"),E("/O <"+Je.toHexString(Je.O)+">"),E("/P "+Je.P),E(">>"),E("endobj")},wa=function(){for(var l in E("/Font <<"),ge)ge.hasOwnProperty(l)&&(m===!1||m===!0&&w.hasOwnProperty(l))&&E("/"+l+" "+ge[l].objectNumber+" 0 R");E(">>")},Fo=function(){if(Object.keys(ue).length>0){for(var l in E("/Shading <<"),ue)ue.hasOwnProperty(l)&&ue[l]instanceof Xn&&ue[l].objectNumber>=0&&E("/"+l+" "+ue[l].objectNumber+" 0 R");le.publish("putShadingPatternDict"),E(">>")}},ii=function(l){if(Object.keys(ue).length>0){for(var y in E("/Pattern <<"),ue)ue.hasOwnProperty(y)&&ue[y]instanceof p.TilingPattern&&ue[y].objectNumber>=0&&ue[y].objectNumber<l&&E("/"+y+" "+ue[y].objectNumber+" 0 R");le.publish("putTilingPatternDict"),E(">>")}},Co=function(){if(Object.keys(Ae).length>0){var l;for(l in E("/ExtGState <<"),Ae)Ae.hasOwnProperty(l)&&Ae[l].objectNumber>=0&&E("/"+l+" "+Ae[l].objectNumber+" 0 R");le.publish("putGStateDict"),E(">>")}},ke=function(l){fr(l.resourcesOid,!0),E("<<"),E("/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]"),wa(),Fo(),ii(l.objectOid),Co(),Ei(),E(">>"),E("endobj")},xa=function(){var l=[];ti(),Po(),ri(),ni(l),le.publish("putResources"),l.forEach(ke),ke({resourcesOid:kr,objectOid:Number.MAX_SAFE_INTEGER}),le.publish("postPutResources")},La=function(){le.publish("putAdditionalObjects");for(var l=0;l<At.length;l++){var y=At[l];fr(y.objId,!0),E(y.content),E("endobj")}le.publish("postPutAdditionalObjects")},Aa=function(l){xe[l.fontName]=xe[l.fontName]||{},xe[l.fontName][l.fontStyle]=l.id},Ri=function(l,y,O,T,X){var lt={id:"F"+(Object.keys(ge).length+1).toString(10),postScriptName:l,fontName:y,fontStyle:O,encoding:T,isStandardFont:X||!1,metadata:{}};return le.publish("addFont",{font:lt,instance:this}),ge[lt.id]=lt,Aa(lt),lt.id},Io=function(l){for(var y=0,O=xt.length;y<O;y++){var T=Ri.call(this,l[y][0],l[y][1],l[y][2],xt[y][3],!0);m===!1&&(w[T]=!0);var X=l[y][0].split("-");Aa({id:T,fontName:X[0],fontStyle:X[1]||""})}le.publish("addFonts",{fonts:ge,dictionary:xe})},Ir=function(l){return l.foo=function(){try{return l.apply(this,arguments)}catch(T){var y=T.stack||"";~y.indexOf(" at ")&&(y=y.split(" at ")[1]);var O="Error in function "+y.split(`
84
- `)[0].split("<")[0]+": "+T.message;if(!Ht.console)throw new Error(O);Ht.console.error(O,T),Ht.alert&&alert(O)}},l.foo.bar=l,l.foo},ai=function(l,y){var O,T,X,lt,yt,Ot,Rt,Zt,Jt;if(X=(y=y||{}).sourceEncoding||"Unicode",yt=y.outputEncoding,(y.autoencode||yt)&&ge[ee].metadata&&ge[ee].metadata[X]&&ge[ee].metadata[X].encoding&&(lt=ge[ee].metadata[X].encoding,!yt&&ge[ee].encoding&&(yt=ge[ee].encoding),!yt&&lt.codePages&&(yt=lt.codePages[0]),typeof yt=="string"&&(yt=lt[yt]),yt)){for(Rt=!1,Ot=[],O=0,T=l.length;O<T;O++)(Zt=yt[l.charCodeAt(O)])?Ot.push(String.fromCharCode(Zt)):Ot.push(l[O]),Ot[O].charCodeAt(0)>>8&&(Rt=!0);l=Ot.join("")}for(O=l.length;Rt===void 0&&O!==0;)l.charCodeAt(O-1)>>8&&(Rt=!0),O--;if(!Rt)return l;for(Ot=y.noBOM?[]:[254,255],O=0,T=l.length;O<T;O++){if((Jt=(Zt=l.charCodeAt(O))>>8)>>8)throw new Error("Character at position "+O+" of string '"+l+"' exceeds 16bits. Cannot be encoded into UCS-2 BE");Ot.push(Jt),Ot.push(Zt-(Jt<<8))}return String.fromCharCode.apply(void 0,Ot)},ar=p.__private__.pdfEscape=p.pdfEscape=function(l,y){return ai(l,y).replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},Ti=p.__private__.beginPage=function(l){Lt[++Ne]=[],Yt[Ne]={objId:0,contentsObjId:0,userUnit:Number(h),artBox:null,bleedBox:null,cropBox:null,trimBox:null,mediaBox:{bottomLeftX:0,bottomLeftY:0,topRightX:Number(l[0]),topRightY:Number(l[1])}},Sa(Ne),ct(Lt[j])},Na=function(l,y){var O,T,X;switch(e=y||e,typeof l=="string"&&(O=_(l.toLowerCase()),Array.isArray(O)&&(T=O[0],X=O[1])),Array.isArray(l)&&(T=l[0]*It,X=l[1]*It),isNaN(T)&&(T=o[0],X=o[1]),(T>14400||X>14400)&&(me.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),X=Math.min(14400,X)),o=[T,X],e.substr(0,1)){case"l":X>T&&(o=[X,T]);break;case"p":T>X&&(o=[X,T])}Ti(o),Ia(Hi),E(jr),Vi!==0&&E(Vi+" J"),Gi!==0&&E(Gi+" j"),le.publish("addPage",{pageNumber:Ne})},jo=function(l){l>0&&l<=Ne&&(Lt.splice(l,1),Yt.splice(l,1),Ne--,j>Ne&&(j=Ne),this.setPage(j))},Sa=function(l){l>0&&l<=Ne&&(j=l)},Oo=p.__private__.getNumberOfPages=p.getNumberOfPages=function(){return Lt.length-1},_a=function(l,y,O){var T,X=void 0;return O=O||{},l=l!==void 0?l:ge[ee].fontName,y=y!==void 0?y:ge[ee].fontStyle,T=l.toLowerCase(),xe[T]!==void 0&&xe[T][y]!==void 0?X=xe[T][y]:xe[l]!==void 0&&xe[l][y]!==void 0?X=xe[l][y]:O.disableWarning===!1&&me.warn("Unable to look up font label for font '"+l+"', '"+y+"'. Refer to getFontList() for available fonts."),X||O.noFallback||(X=xe.times[y])==null&&(X=xe.times.normal),X},Do=p.__private__.putInfo=function(){var l=Re(),y=function(T){return T};for(var O in v!==null&&(y=Je.encryptor(l,0)),E("<<"),E("/Producer ("+ar(y("jsPDF "+zt.version))+")"),Wt)Wt.hasOwnProperty(O)&&Wt[O]&&E("/"+O.substr(0,1).toUpperCase()+O.substr(1)+" ("+ar(y(Wt[O]))+")");E("/CreationDate ("+ar(y(st))+")"),E(">>"),E("endobj")},qi=p.__private__.putCatalog=function(l){var y=(l=l||{}).rootDictionaryObjId||rn;switch(Re(),E("<<"),E("/Type /Catalog"),E("/Pages "+y+" 0 R"),Ct||(Ct="fullwidth"),Ct){case"fullwidth":E("/OpenAction [3 0 R /FitH null]");break;case"fullheight":E("/OpenAction [3 0 R /FitV null]");break;case"fullpage":E("/OpenAction [3 0 R /Fit]");break;case"original":E("/OpenAction [3 0 R /XYZ null null 1]");break;default:var O=""+Ct;O.substr(O.length-1)==="%"&&(Ct=parseInt(Ct)/100),typeof Ct=="number"&&E("/OpenAction [3 0 R /XYZ null null "+pt(Ct)+"]")}switch(te||(te="continuous"),te){case"continuous":E("/PageLayout /OneColumn");break;case"single":E("/PageLayout /SinglePage");break;case"two":case"twoleft":E("/PageLayout /TwoColumnLeft");break;case"tworight":E("/PageLayout /TwoColumnRight")}Gt&&E("/PageMode /"+Gt),le.publish("putCatalog"),E(">>"),E("endobj")},Bo=p.__private__.putTrailer=function(){E("trailer"),E("<<"),E("/Size "+(J+1)),E("/Root "+J+" 0 R"),E("/Info "+(J-1)+" 0 R"),v!==null&&E("/Encrypt "+Je.oid+" 0 R"),E("/ID [ <"+at+"> <"+at+"> ]"),E(">>")},Mo=p.__private__.putHeader=function(){E("%PDF-"+F),E("%ºß¬à")},Eo=p.__private__.putXRef=function(){var l="0000000000";E("xref"),E("0 "+(J+1)),E("0000000000 65535 f ");for(var y=1;y<=J;y++)typeof Q[y]=="function"?E((l+Q[y]()).slice(-10)+" 00000 n "):Q[y]!==void 0?E((l+Q[y]).slice(-10)+" 00000 n "):E("0000000000 00000 n ")},nn=p.__private__.buildDocument=function(){Ut(),ct(et),le.publish("buildDocument"),Mo(),En(),La(),xa(),v!==null&&ko(),Do(),qi();var l=rt;return Eo(),Bo(),E("startxref"),E(""+l),E("%%EOF"),ct(Lt[j]),et.join(`
85
- `)},oi=p.__private__.getBlob=function(l){return new Blob([Mt(l)],{type:"application/pdf"})},si=p.output=p.__private__.output=Ir(function(l,y){switch(typeof(y=y||{})=="string"?y={filename:y}:y.filename=y.filename||"generated.pdf",l){case void 0:return nn();case"save":p.save(y.filename);break;case"arraybuffer":return Mt(nn());case"blob":return oi(nn());case"bloburi":case"bloburl":if(Ht.URL!==void 0&&typeof Ht.URL.createObjectURL=="function")return Ht.URL&&Ht.URL.createObjectURL(oi(nn()))||void 0;me.warn("bloburl is not supported by your system, because URL.createObjectURL is not supported by your browser.");break;case"datauristring":case"dataurlstring":var O="",T=nn();try{O=Is(T)}catch{O=Is(unescape(encodeURIComponent(T)))}return"data:application/pdf;filename="+y.filename+";base64,"+O;case"pdfobjectnewwindow":if(Object.prototype.toString.call(Ht)==="[object Window]"){var X="https://cdnjs.cloudflare.com/ajax/libs/pdfobject/2.1.1/pdfobject.min.js",lt=' integrity="sha512-4ze/a9/4jqu+tX9dfOqJYSvyYd5M6qum/3HpCLr+/Jqf0whc37VUbkpNGHR7/8pSnCFw47T1fmIpwBV7UySh3g==" crossorigin="anonymous"';y.pdfObjectUrl&&(X=y.pdfObjectUrl,lt="");var yt='<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;} </style><body><script src="'+X+'"'+lt+'><\/script><script >PDFObject.embed("'+this.output("dataurlstring")+'", '+JSON.stringify(y)+");<\/script></body></html>",Ot=Ht.open();return Ot!==null&&Ot.document.write(yt),Ot}throw new Error("The option pdfobjectnewwindow just works in a browser-environment.");case"pdfjsnewwindow":if(Object.prototype.toString.call(Ht)==="[object Window]"){var Rt='<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;} </style><body><iframe id="pdfViewer" src="'+(y.pdfJsUrl||"examples/PDF.js/web/viewer.html")+"?file=&downloadName="+y.filename+'" width="500px" height="400px" /></body></html>',Zt=Ht.open();if(Zt!==null){Zt.document.write(Rt);var Jt=this;Zt.document.documentElement.querySelector("#pdfViewer").onload=function(){Zt.document.title=y.filename,Zt.document.documentElement.querySelector("#pdfViewer").contentWindow.PDFViewerApplication.open(Jt.output("bloburl"))}}return Zt}throw new Error("The option pdfjsnewwindow just works in a browser-environment.");case"dataurlnewwindow":if(Object.prototype.toString.call(Ht)!=="[object Window]")throw new Error("The option dataurlnewwindow just works in a browser-environment.");var ne='<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;} </style><body><iframe src="'+this.output("datauristring",y)+'"></iframe></body></html>',Le=Ht.open();if(Le!==null&&(Le.document.write(ne),Le.document.title=y.filename),Le||typeof safari>"u")return Le;break;case"datauri":case"dataurl":return Ht.document.location.href=this.output("datauristring",y);default:return null}}),Pa=function(l){return Array.isArray(Mn)===!0&&Mn.indexOf(l)>-1};switch(i){case"pt":It=1;break;case"mm":It=72/25.4;break;case"cm":It=72/2.54;break;case"in":It=72;break;case"px":It=Pa("px_scaling")==1?.75:96/72;break;case"pc":case"em":It=12;break;case"ex":It=6;break;default:if(typeof i!="number")throw new Error("Invalid unit: "+i);It=i}var Je=null;jt(),$();var Ro=function(l){return v!==null?Je.encryptor(l,0):function(y){return y}},ka=p.__private__.getPageInfo=p.getPageInfo=function(l){if(isNaN(l)||l%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfo");return{objId:Yt[l].objId,pageNumber:l,pageContext:Yt[l]}},Vt=p.__private__.getPageInfoByObjId=function(l){if(isNaN(l)||l%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfoByObjId");for(var y in Yt)if(Yt[y].objId===l)break;return ka(y)},To=p.__private__.getCurrentPageInfo=p.getCurrentPageInfo=function(){return{objId:Yt[j].objId,pageNumber:j,pageContext:Yt[j]}};p.addPage=function(){return Na.apply(this,arguments),this},p.setPage=function(){return Sa.apply(this,arguments),ct.call(this,Lt[j]),this},p.insertPage=function(l){return this.addPage(),this.movePage(j,l),this},p.movePage=function(l,y){var O,T;if(l>y){O=Lt[l],T=Yt[l];for(var X=l;X>y;X--)Lt[X]=Lt[X-1],Yt[X]=Yt[X-1];Lt[y]=O,Yt[y]=T,this.setPage(y)}else if(l<y){O=Lt[l],T=Yt[l];for(var lt=l;lt<y;lt++)Lt[lt]=Lt[lt+1],Yt[lt]=Yt[lt+1];Lt[y]=O,Yt[y]=T,this.setPage(y)}return this},p.deletePage=function(){return jo.apply(this,arguments),this},p.__private__.text=p.text=function(l,y,O,T,X){var lt,yt,Ot,Rt,Zt,Jt,ne,Le,Se,Be=(T=T||{}).scope||this;if(typeof l=="number"&&typeof y=="number"&&(typeof O=="string"||Array.isArray(O))){var Xe=O;O=y,y=l,l=Xe}if(arguments[3]instanceof qt?(z("The transform parameter of text() with a Matrix value"),Se=X):(Ot=arguments[4],Rt=arguments[5],he(ne=arguments[3])==="object"&&ne!==null||(typeof Ot=="string"&&(Rt=Ot,Ot=null),typeof ne=="string"&&(Rt=ne,ne=null),typeof ne=="number"&&(Ot=ne,ne=null),T={flags:ne,angle:Ot,align:Rt})),isNaN(y)||isNaN(O)||l==null)throw new Error("Invalid arguments passed to jsPDF.text");if(l.length===0)return Be;var qe="",Or=!1,cr=typeof T.lineHeightFactor=="number"?T.lineHeightFactor:Tn,Xr=Be.internal.scaleFactor;function Ea(be){return be=be.split(" ").join(Array(T.TabLen||9).join(" ")),ar(be,ne)}function Zi(be){for(var ye,Ce=be.concat(),Te=[],ln=Ce.length;ln--;)typeof(ye=Ce.shift())=="string"?Te.push(ye):Array.isArray(be)&&(ye.length===1||ye[1]===void 0&&ye[2]===void 0)?Te.push(ye[0]):Te.push([ye[0],ye[1],ye[2]]);return Te}function $i(be,ye){var Ce;if(typeof be=="string")Ce=ye(be)[0];else if(Array.isArray(be)){for(var Te,ln,oa=be.concat(),Li=[],Ua=oa.length;Ua--;)typeof(Te=oa.shift())=="string"?Li.push(ye(Te)[0]):Array.isArray(Te)&&typeof Te[0]=="string"&&(ln=ye(Te[0],Te[1],Te[2]),Li.push([ln[0],ln[1],ln[2]]));Ce=Li}return Ce}var di=!1,Qi=!0;if(typeof l=="string")di=!0;else if(Array.isArray(l)){var ta=l.concat();yt=[];for(var pi,Ve=ta.length;Ve--;)(typeof(pi=ta.shift())!="string"||Array.isArray(pi)&&typeof pi[0]!="string")&&(Qi=!1);di=Qi}if(di===!1)throw new Error('Type of text must be string or Array. "'+l+'" is not recognized.');typeof l=="string"&&(l=l.match(/[\r?\n]/)?l.split(/\r\n|\r|\n/g):[l]);var gi=Nt/Be.internal.scaleFactor,vi=gi*(cr-1);switch(T.baseline){case"bottom":O-=vi;break;case"top":O+=gi-vi;break;case"hanging":O+=gi-2*vi;break;case"middle":O+=gi/2-vi}if((Jt=T.maxWidth||0)>0&&(typeof l=="string"?l=Be.splitTextToSize(l,Jt):Object.prototype.toString.call(l)==="[object Array]"&&(l=l.reduce(function(be,ye){return be.concat(Be.splitTextToSize(ye,Jt))},[]))),lt={text:l,x:y,y:O,options:T,mutex:{pdfEscape:ar,activeFontKey:ee,fonts:ge,activeFontSize:Nt}},le.publish("preProcessText",lt),l=lt.text,Ot=(T=lt.options).angle,!(Se instanceof qt)&&Ot&&typeof Ot=="number"){Ot*=Math.PI/180,T.rotationDirection===0&&(Ot=-Ot),G===B.ADVANCED&&(Ot=-Ot);var mi=Math.cos(Ot),ea=Math.sin(Ot);Se=new qt(mi,ea,-ea,mi,0,0)}else Ot&&Ot instanceof qt&&(Se=Ot);G!==B.ADVANCED||Se||(Se=Wr),(Zt=T.charSpace||hi)!==void 0&&(qe+=tt(C(Zt))+` Tc
86
- `,this.setCharSpace(this.getCharSpace()||0)),(Le=T.horizontalScale)!==void 0&&(qe+=tt(100*Le)+` Tz
87
- `),T.lang;var or=-1,Xo=T.renderingMode!==void 0?T.renderingMode:T.stroke,ra=Be.internal.getCurrentPageInfo().pageContext;switch(Xo){case 0:case!1:case"fill":or=0;break;case 1:case!0:case"stroke":or=1;break;case 2:case"fillThenStroke":or=2;break;case 3:case"invisible":or=3;break;case 4:case"fillAndAddForClipping":or=4;break;case 5:case"strokeAndAddPathForClipping":or=5;break;case 6:case"fillThenStrokeAndAddToPathForClipping":or=6;break;case 7:case"addToPathForClipping":or=7}var Ra=ra.usedRenderingMode!==void 0?ra.usedRenderingMode:-1;or!==-1?qe+=or+` Tr
88
- `:Ra!==-1&&(qe+=`0 Tr
89
- `),or!==-1&&(ra.usedRenderingMode=or),Rt=T.align||"left";var br,bi=Nt*cr,Ta=Be.internal.pageSize.getWidth(),qa=ge[ee];Zt=T.charSpace||hi,Jt=T.maxWidth||0,ne=Object.assign({autoencode:!0,noBOM:!0},T.flags);var yn=[],Un=function(be){return Be.getStringUnitWidth(be,{font:qa,charSpace:Zt,fontSize:Nt,doKerning:!1})*Nt/Xr};if(Object.prototype.toString.call(l)==="[object Array]"){var sr;yt=Zi(l),Rt!=="left"&&(br=yt.map(Un));var er,wn=0;if(Rt==="right"){y-=br[0],l=[],Ve=yt.length;for(var on=0;on<Ve;on++)on===0?(er=Jr(y),sr=an(O)):(er=C(wn-br[on]),sr=-bi),l.push([yt[on],er,sr]),wn=br[on]}else if(Rt==="center"){y-=br[0]/2,l=[],Ve=yt.length;for(var sn=0;sn<Ve;sn++)sn===0?(er=Jr(y),sr=an(O)):(er=C((wn-br[sn])/2),sr=-bi),l.push([yt[sn],er,sr]),wn=br[sn]}else if(Rt==="left"){l=[],Ve=yt.length;for(var yi=0;yi<Ve;yi++)l.push(yt[yi])}else if(Rt==="justify"&&qa.encoding==="Identity-H"){l=[],Ve=yt.length,Jt=Jt!==0?Jt:Ta;for(var un=0,Fe=0;Fe<Ve;Fe++)if(sr=Fe===0?an(O):-bi,er=Fe===0?Jr(y):un,Fe<Ve-1){var na=C((Jt-br[Fe])/(yt[Fe].split(" ").length-1)),rr=yt[Fe].split(" ");l.push([rr[0]+" ",er,sr]),un=0;for(var yr=1;yr<rr.length;yr++){var wi=(Un(rr[yr-1]+" "+rr[yr])-Un(rr[yr]))*Xr+na;yr==rr.length-1?l.push([rr[yr],wi,0]):l.push([rr[yr]+" ",wi,0]),un-=wi}}else l.push([yt[Fe],er,sr]);l.push(["",un,0])}else{if(Rt!=="justify")throw new Error('Unrecognized alignment option, use "left", "center", "right" or "justify".');for(l=[],Ve=yt.length,Jt=Jt!==0?Jt:Ta,Fe=0;Fe<Ve;Fe++)sr=Fe===0?an(O):-bi,er=Fe===0?Jr(y):0,Fe<Ve-1?yn.push(tt(C((Jt-br[Fe])/(yt[Fe].split(" ").length-1)))):yn.push(0),l.push([yt[Fe],er,sr])}}var za=typeof T.R2L=="boolean"?T.R2L:Et;za===!0&&(l=$i(l,function(be,ye,Ce){return[be.split("").reverse().join(""),ye,Ce]})),lt={text:l,x:y,y:O,options:T,mutex:{pdfEscape:ar,activeFontKey:ee,fonts:ge,activeFontSize:Nt}},le.publish("postProcessText",lt),l=lt.text,Or=lt.mutex.isHex||!1;var ia=ge[ee].encoding;ia!=="WinAnsiEncoding"&&ia!=="StandardEncoding"||(l=$i(l,function(be,ye,Ce){return[Ea(be),ye,Ce]})),yt=Zi(l),l=[];for(var Hn,Wn,xn,Vn=0,xi=1,Gn=Array.isArray(yt[0])?xi:Vn,Ln="",aa=function(be,ye,Ce){var Te="";return Ce instanceof qt?(Ce=typeof T.angle=="number"?Pr(Ce,new qt(1,0,0,1,be,ye)):Pr(new qt(1,0,0,1,be,ye),Ce),G===B.ADVANCED&&(Ce=Pr(new qt(1,0,0,-1,0,0),Ce)),Te=Ce.join(" ")+` Tm
90
- `):Te=tt(be)+" "+tt(ye)+` Td
91
- `,Te},wr=0;wr<yt.length;wr++){switch(Ln="",Gn){case xi:xn=(Or?"<":"(")+yt[wr][0]+(Or?">":")"),Hn=parseFloat(yt[wr][1]),Wn=parseFloat(yt[wr][2]);break;case Vn:xn=(Or?"<":"(")+yt[wr]+(Or?">":")"),Hn=Jr(y),Wn=an(O)}yn!==void 0&&yn[wr]!==void 0&&(Ln=yn[wr]+` Tw
92
- `),wr===0?l.push(Ln+aa(Hn,Wn,Se)+xn):Gn===Vn?l.push(Ln+xn):Gn===xi&&l.push(Ln+aa(Hn,Wn,Se)+xn)}l=Gn===Vn?l.join(` Tj
93
- T* `):l.join(` Tj
94
- `),l+=` Tj
95
- `;var xr=`BT
96
- /`;return xr+=ee+" "+Nt+` Tf
97
- `,xr+=tt(Nt*cr)+` TL
98
- `,xr+=qn+`
99
- `,xr+=qe,xr+=l,E(xr+="ET"),w[ee]=!0,Be};var qo=p.__private__.clip=p.clip=function(l){return E(l==="evenodd"?"W*":"W"),this};p.clipEvenOdd=function(){return qo("evenodd")},p.__private__.discardPath=p.discardPath=function(){return E("n"),this};var Yr=p.__private__.isValidStyle=function(l){var y=!1;return[void 0,null,"S","D","F","DF","FD","f","f*","B","B*","n"].indexOf(l)!==-1&&(y=!0),y};p.__private__.setDefaultPathOperation=p.setDefaultPathOperation=function(l){return Yr(l)&&(d=l),this};var Fa=p.__private__.getStyle=p.getStyle=function(l){var y=d;switch(l){case"D":case"S":y="S";break;case"F":y="f";break;case"FD":case"DF":y="B";break;case"f":case"f*":case"B":case"B*":y=l}return y},Ca=p.close=function(){return E("h"),this};p.stroke=function(){return E("S"),this},p.fill=function(l){return ui("f",l),this},p.fillEvenOdd=function(l){return ui("f*",l),this},p.fillStroke=function(l){return ui("B",l),this},p.fillStrokeEvenOdd=function(l){return ui("B*",l),this};var ui=function(l,y){he(y)==="object"?Uo(y,l):E(l)},zi=function(l){l===null||G===B.ADVANCED&&l===void 0||(l=Fa(l),E(l))};function zo(l,y,O,T,X){var lt=new Ii(y||this.boundingBox,O||this.xStep,T||this.yStep,this.gState,X||this.matrix);lt.stream=this.stream;var yt=l+"$$"+this.cloneIndex+++"$$";return ir(yt,lt),lt}var Uo=function(l,y){var O=Bn[l.key],T=ue[O];if(T instanceof Xn)E("q"),E(Ho(y)),T.gState&&p.setGState(T.gState),E(l.matrix.toString()+" cm"),E("/"+O+" sh"),E("Q");else if(T instanceof Ii){var X=new qt(1,0,0,-1,0,bn());l.matrix&&(X=X.multiply(l.matrix||Wr),O=zo.call(T,l.key,l.boundingBox,l.xStep,l.yStep,X).id),E("q"),E("/Pattern cs"),E("/"+O+" scn"),T.gState&&p.setGState(T.gState),E(y),E("Q")}},Ho=function(l){switch(l){case"f":case"F":return"W n";case"f*":return"W* n";case"B":return"W S";case"B*":return"W* S";case"S":return"W S";case"n":return"W n"}},Ui=p.moveTo=function(l,y){return E(tt(C(l))+" "+tt(R(y))+" m"),this},Rn=p.lineTo=function(l,y){return E(tt(C(l))+" "+tt(R(y))+" l"),this},vn=p.curveTo=function(l,y,O,T,X,lt){return E([tt(C(l)),tt(R(y)),tt(C(O)),tt(R(T)),tt(C(X)),tt(R(lt)),"c"].join(" ")),this};p.__private__.line=p.line=function(l,y,O,T,X){if(isNaN(l)||isNaN(y)||isNaN(O)||isNaN(T)||!Yr(X))throw new Error("Invalid arguments passed to jsPDF.line");return G===B.COMPAT?this.lines([[O-l,T-y]],l,y,[1,1],X||"S"):this.lines([[O-l,T-y]],l,y,[1,1]).stroke()},p.__private__.lines=p.lines=function(l,y,O,T,X,lt){var yt,Ot,Rt,Zt,Jt,ne,Le,Se,Be,Xe,qe,Or;if(typeof l=="number"&&(Or=O,O=y,y=l,l=Or),T=T||[1,1],lt=lt||!1,isNaN(y)||isNaN(O)||!Array.isArray(l)||!Array.isArray(T)||!Yr(X)||typeof lt!="boolean")throw new Error("Invalid arguments passed to jsPDF.lines");for(Ui(y,O),yt=T[0],Ot=T[1],Zt=l.length,Xe=y,qe=O,Rt=0;Rt<Zt;Rt++)(Jt=l[Rt]).length===2?(Xe=Jt[0]*yt+Xe,qe=Jt[1]*Ot+qe,Rn(Xe,qe)):(ne=Jt[0]*yt+Xe,Le=Jt[1]*Ot+qe,Se=Jt[2]*yt+Xe,Be=Jt[3]*Ot+qe,Xe=Jt[4]*yt+Xe,qe=Jt[5]*Ot+qe,vn(ne,Le,Se,Be,Xe,qe));return lt&&Ca(),zi(X),this},p.path=function(l){for(var y=0;y<l.length;y++){var O=l[y],T=O.c;switch(O.op){case"m":Ui(T[0],T[1]);break;case"l":Rn(T[0],T[1]);break;case"c":vn.apply(this,T);break;case"h":Ca()}}return this},p.__private__.rect=p.rect=function(l,y,O,T,X){if(isNaN(l)||isNaN(y)||isNaN(O)||isNaN(T)||!Yr(X))throw new Error("Invalid arguments passed to jsPDF.rect");return G===B.COMPAT&&(T=-T),E([tt(C(l)),tt(R(y)),tt(C(O)),tt(C(T)),"re"].join(" ")),zi(X),this},p.__private__.triangle=p.triangle=function(l,y,O,T,X,lt,yt){if(isNaN(l)||isNaN(y)||isNaN(O)||isNaN(T)||isNaN(X)||isNaN(lt)||!Yr(yt))throw new Error("Invalid arguments passed to jsPDF.triangle");return this.lines([[O-l,T-y],[X-O,lt-T],[l-X,y-lt]],l,y,[1,1],yt,!0),this},p.__private__.roundedRect=p.roundedRect=function(l,y,O,T,X,lt,yt){if(isNaN(l)||isNaN(y)||isNaN(O)||isNaN(T)||isNaN(X)||isNaN(lt)||!Yr(yt))throw new Error("Invalid arguments passed to jsPDF.roundedRect");var Ot=4/3*(Math.SQRT2-1);return X=Math.min(X,.5*O),lt=Math.min(lt,.5*T),this.lines([[O-2*X,0],[X*Ot,0,X,lt-lt*Ot,X,lt],[0,T-2*lt],[0,lt*Ot,-X*Ot,lt,-X,lt],[2*X-O,0],[-X*Ot,0,-X,-lt*Ot,-X,-lt],[0,2*lt-T],[0,-lt*Ot,X*Ot,-lt,X,-lt]],l+X,y,[1,1],yt,!0),this},p.__private__.ellipse=p.ellipse=function(l,y,O,T,X){if(isNaN(l)||isNaN(y)||isNaN(O)||isNaN(T)||!Yr(X))throw new Error("Invalid arguments passed to jsPDF.ellipse");var lt=4/3*(Math.SQRT2-1)*O,yt=4/3*(Math.SQRT2-1)*T;return Ui(l+O,y),vn(l+O,y-yt,l+lt,y-T,l,y-T),vn(l-lt,y-T,l-O,y-yt,l-O,y),vn(l-O,y+yt,l-lt,y+T,l,y+T),vn(l+lt,y+T,l+O,y+yt,l+O,y),zi(X),this},p.__private__.circle=p.circle=function(l,y,O,T){if(isNaN(l)||isNaN(y)||isNaN(O)||!Yr(T))throw new Error("Invalid arguments passed to jsPDF.circle");return this.ellipse(l,y,O,O,T)},p.setFont=function(l,y,O){return O&&(y=wt(y,O)),ee=_a(l,y,{disableWarning:!1}),this};var Wo=p.__private__.getFont=p.getFont=function(){return ge[_a.apply(p,arguments)]};p.__private__.getFontList=p.getFontList=function(){var l,y,O={};for(l in xe)if(xe.hasOwnProperty(l))for(y in O[l]=[],xe[l])xe[l].hasOwnProperty(y)&&O[l].push(y);return O},p.addFont=function(l,y,O,T,X){var lt=["StandardEncoding","MacRomanEncoding","Identity-H","WinAnsiEncoding"];return arguments[3]&&lt.indexOf(arguments[3])!==-1?X=arguments[3]:arguments[3]&&lt.indexOf(arguments[3])==-1&&(O=wt(O,T)),X=X||"Identity-H",Ri.call(this,l,y,O,X)};var Tn,Hi=r.lineWidth||.200025,li=p.__private__.getLineWidth=p.getLineWidth=function(){return Hi},Ia=p.__private__.setLineWidth=p.setLineWidth=function(l){return Hi=l,E(tt(C(l))+" w"),this};p.__private__.setLineDash=zt.API.setLineDash=zt.API.setLineDashPattern=function(l,y){if(l=l||[],y=y||0,isNaN(y)||!Array.isArray(l))throw new Error("Invalid arguments passed to jsPDF.setLineDash");return l=l.map(function(O){return tt(C(O))}).join(" "),y=tt(C(y)),E("["+l+"] "+y+" d"),this};var ja=p.__private__.getLineHeight=p.getLineHeight=function(){return Nt*Tn};p.__private__.getLineHeight=p.getLineHeight=function(){return Nt*Tn};var Oa=p.__private__.setLineHeightFactor=p.setLineHeightFactor=function(l){return typeof(l=l||1.15)=="number"&&(Tn=l),this},Da=p.__private__.getLineHeightFactor=p.getLineHeightFactor=function(){return Tn};Oa(r.lineHeight);var Jr=p.__private__.getHorizontalCoordinate=function(l){return C(l)},an=p.__private__.getVerticalCoordinate=function(l){return G===B.ADVANCED?l:Yt[j].mediaBox.topRightY-Yt[j].mediaBox.bottomLeftY-C(l)},Vo=p.__private__.getHorizontalCoordinateString=p.getHorizontalCoordinateString=function(l){return tt(Jr(l))},mn=p.__private__.getVerticalCoordinateString=p.getVerticalCoordinateString=function(l){return tt(an(l))},jr=r.strokeColor||"0 G";p.__private__.getStrokeColor=p.getDrawColor=function(){return Fr(jr)},p.__private__.setStrokeColor=p.setDrawColor=function(l,y,O,T){return jr=Cr({ch1:l,ch2:y,ch3:O,ch4:T,pdfColorType:"draw",precision:2}),E(jr),this};var Wi=r.fillColor||"0 g";p.__private__.getFillColor=p.getFillColor=function(){return Fr(Wi)},p.__private__.setFillColor=p.setFillColor=function(l,y,O,T){return Wi=Cr({ch1:l,ch2:y,ch3:O,ch4:T,pdfColorType:"fill",precision:2}),E(Wi),this};var qn=r.textColor||"0 g",Go=p.__private__.getTextColor=p.getTextColor=function(){return Fr(qn)};p.__private__.setTextColor=p.setTextColor=function(l,y,O,T){return qn=Cr({ch1:l,ch2:y,ch3:O,ch4:T,pdfColorType:"text",precision:3}),this};var hi=r.charSpace,Yo=p.__private__.getCharSpace=p.getCharSpace=function(){return parseFloat(hi||0)};p.__private__.setCharSpace=p.setCharSpace=function(l){if(isNaN(l))throw new Error("Invalid argument passed to jsPDF.setCharSpace");return hi=l,this};var Vi=0;p.CapJoinStyles={0:0,butt:0,but:0,miter:0,1:1,round:1,rounded:1,circle:1,2:2,projecting:2,project:2,square:2,bevel:2},p.__private__.setLineCap=p.setLineCap=function(l){var y=p.CapJoinStyles[l];if(y===void 0)throw new Error("Line cap style of '"+l+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return Vi=y,E(y+" J"),this};var Gi=0;p.__private__.setLineJoin=p.setLineJoin=function(l){var y=p.CapJoinStyles[l];if(y===void 0)throw new Error("Line join style of '"+l+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return Gi=y,E(y+" j"),this},p.__private__.setLineMiterLimit=p.__private__.setMiterLimit=p.setLineMiterLimit=p.setMiterLimit=function(l){if(l=l||0,isNaN(l))throw new Error("Invalid argument passed to jsPDF.setLineMiterLimit");return E(tt(C(l))+" M"),this},p.GState=mo,p.setGState=function(l){(l=typeof l=="string"?Ae[_r[l]]:Ba(null,l)).equals(en)||(E("/"+l.id+" gs"),en=l)};var Ba=function(l,y){if(!l||!_r[l]){var O=!1;for(var T in Ae)if(Ae.hasOwnProperty(T)&&Ae[T].equals(y)){O=!0;break}if(O)y=Ae[T];else{var X="GS"+(Object.keys(Ae).length+1).toString(10);Ae[X]=y,y.id=X}return l&&(_r[l]=y.id),le.publish("addGState",y),y}};p.addGState=function(l,y){return Ba(l,y),this},p.saveGraphicsState=function(){return E("q"),zr.push({key:ee,size:Nt,color:qn}),this},p.restoreGraphicsState=function(){E("Q");var l=zr.pop();return ee=l.key,Nt=l.size,qn=l.color,en=null,this},p.setCurrentTransformationMatrix=function(l){return E(l.toString()+" cm"),this},p.comment=function(l){return E("#"+l),this};var fi=function(l,y){var O=l||0;Object.defineProperty(this,"x",{enumerable:!0,get:function(){return O},set:function(lt){isNaN(lt)||(O=parseFloat(lt))}});var T=y||0;Object.defineProperty(this,"y",{enumerable:!0,get:function(){return T},set:function(lt){isNaN(lt)||(T=parseFloat(lt))}});var X="pt";return Object.defineProperty(this,"type",{enumerable:!0,get:function(){return X},set:function(lt){X=lt.toString()}}),this},Yi=function(l,y,O,T){fi.call(this,l,y),this.type="rect";var X=O||0;Object.defineProperty(this,"w",{enumerable:!0,get:function(){return X},set:function(yt){isNaN(yt)||(X=parseFloat(yt))}});var lt=T||0;return Object.defineProperty(this,"h",{enumerable:!0,get:function(){return lt},set:function(yt){isNaN(yt)||(lt=parseFloat(yt))}}),this},Ji=function(){this.page=Ne,this.currentPage=j,this.pages=Lt.slice(0),this.pagesContext=Yt.slice(0),this.x=Ye,this.y=oe,this.matrix=Sr,this.width=zn(j),this.height=bn(j),this.outputDestination=_t,this.id="",this.objectNumber=-1};Ji.prototype.restore=function(){Ne=this.page,j=this.currentPage,Yt=this.pagesContext,Lt=this.pages,Ye=this.x,oe=this.y,Sr=this.matrix,Xi(j,this.width),Ki(j,this.height),_t=this.outputDestination};var Ma=function(l,y,O,T,X){Hr.push(new Ji),Ne=j=0,Lt=[],Ye=l,oe=y,Sr=X,Ti([O,T])},Jo=function(l){if(Ur[l])Hr.pop().restore();else{var y=new Ji,O="Xo"+(Object.keys(We).length+1).toString(10);y.id=O,Ur[l]=O,We[O]=y,le.publish("addFormObject",y),Hr.pop().restore()}};for(var ci in p.beginFormObject=function(l,y,O,T,X){return Ma(l,y,O,T,X),this},p.endFormObject=function(l){return Jo(l),this},p.doFormObject=function(l,y){var O=We[Ur[l]];return E("q"),E(y.toString()+" cm"),E("/"+O.id+" Do"),E("Q"),this},p.getFormObject=function(l){var y=We[Ur[l]];return{x:y.x,y:y.y,width:y.width,height:y.height,matrix:y.matrix}},p.save=function(l,y){return l=l||"generated.pdf",(y=y||{}).returnPromise=y.returnPromise||!1,y.returnPromise===!1?(Jn(oi(nn()),l),typeof Jn.unload=="function"&&Ht.setTimeout&&setTimeout(Jn.unload,911),this):new Promise(function(O,T){try{var X=Jn(oi(nn()),l);typeof Jn.unload=="function"&&Ht.setTimeout&&setTimeout(Jn.unload,911),O(X)}catch(lt){T(lt.message)}})},zt.API)zt.API.hasOwnProperty(ci)&&(ci==="events"&&zt.API.events.length?function(l,y){var O,T,X;for(X=y.length-1;X!==-1;X--)O=y[X][0],T=y[X][1],l.subscribe.apply(l,[O].concat(typeof T=="function"?[T]:T))}(le,zt.API.events):p[ci]=zt.API[ci]);var zn=p.getPageWidth=function(l){return(Yt[l=l||j].mediaBox.topRightX-Yt[l].mediaBox.bottomLeftX)/It},Xi=p.setPageWidth=function(l,y){Yt[l].mediaBox.topRightX=y*It+Yt[l].mediaBox.bottomLeftX},bn=p.getPageHeight=function(l){return(Yt[l=l||j].mediaBox.topRightY-Yt[l].mediaBox.bottomLeftY)/It},Ki=p.setPageHeight=function(l,y){Yt[l].mediaBox.topRightY=y*It+Yt[l].mediaBox.bottomLeftY};return p.internal={pdfEscape:ar,getStyle:Fa,getFont:Wo,getFontSize:kt,getCharSpace:Yo,getTextColor:Go,getLineHeight:ja,getLineHeightFactor:Da,getLineWidth:li,write:Kt,getHorizontalCoordinate:Jr,getVerticalCoordinate:an,getCoordinateString:Vo,getVerticalCoordinateString:mn,collections:{},newObject:Re,newAdditionalObject:$n,newObjectDeferred:De,newObjectDeferredBegin:fr,getFilters:Vr,putStream:mr,events:le,scaleFactor:It,pageSize:{getWidth:function(){return zn(j)},setWidth:function(l){Xi(j,l)},getHeight:function(){return bn(j)},setHeight:function(l){Ki(j,l)}},encryptionOptions:v,encryption:Je,getEncryptor:Ro,output:si,getNumberOfPages:Oo,pages:Lt,out:E,f2:pt,f3:k,getPageInfo:ka,getPageInfoByObjId:Vt,getCurrentPageInfo:To,getPDFVersion:P,Point:fi,Rectangle:Yi,Matrix:qt,hasHotfix:Pa},Object.defineProperty(p.internal.pageSize,"width",{get:function(){return zn(j)},set:function(l){Xi(j,l)},enumerable:!0,configurable:!0}),Object.defineProperty(p.internal.pageSize,"height",{get:function(){return bn(j)},set:function(l){Ki(j,l)},enumerable:!0,configurable:!0}),Io.call(p,xt),ee="F1",Na(o,e),le.publish("initialized"),p}Fi.prototype.lsbFirstWord=function(r){return String.fromCharCode(r>>0&255,r>>8&255,r>>16&255,r>>24&255)},Fi.prototype.toHexString=function(r){return r.split("").map(function(t){return("0"+(255&t.charCodeAt(0)).toString(16)).slice(-2)}).join("")},Fi.prototype.hexToBytes=function(r){for(var t=[],e=0;e<r.length;e+=2)t.push(String.fromCharCode(parseInt(r.substr(e,2),16)));return t.join("")},Fi.prototype.processOwnerPassword=function(r,t){return Os(js(t).substr(0,5),r)},Fi.prototype.encryptor=function(r,t){var e=js(this.encryptionKey+String.fromCharCode(255&r,r>>8&255,r>>16&255,255&t,t>>8&255)).substr(0,10);return function(i){return Os(e,i)}},mo.prototype.equals=function(r){var t,e="id,objectNumber,equals";if(!r||he(r)!==he(this))return!1;var i=0;for(t in this)if(!(e.indexOf(t)>=0)){if(this.hasOwnProperty(t)&&!r.hasOwnProperty(t)||this[t]!==r[t])return!1;i++}for(t in r)r.hasOwnProperty(t)&&e.indexOf(t)<0&&i--;return i===0},zt.API={events:[]},zt.version="3.0.1";var Pe=zt.API,Us=1,Zn=function(r){return r.replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},Pi=function(r){return r.replace(/\\\\/g,"\\").replace(/\\\(/g,"(").replace(/\\\)/g,")")},Xt=function(r){return r.toFixed(2)},In=function(r){return r.toFixed(5)};Pe.__acroform__={};var hr=function(r,t){r.prototype=Object.create(t.prototype),r.prototype.constructor=r},Au=function(r){return r*Us},Zr=function(r){var t=new rl,e=Bt.internal.getHeight(r)||0,i=Bt.internal.getWidth(r)||0;return t.BBox=[0,0,Number(Xt(i)),Number(Xt(e))],t},Ph=Pe.__acroform__.setBit=function(r,t){if(r=r||0,t=t||0,isNaN(r)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBit");return r|=1<<t},kh=Pe.__acroform__.clearBit=function(r,t){if(r=r||0,t=t||0,isNaN(r)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBit");return r&=~(1<<t)},Fh=Pe.__acroform__.getBit=function(r,t){if(isNaN(r)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBit");return(r&1<<t)==0?0:1},Ie=Pe.__acroform__.getBitForPdf=function(r,t){if(isNaN(r)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBitForPdf");return Fh(r,t-1)},je=Pe.__acroform__.setBitForPdf=function(r,t){if(isNaN(r)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBitForPdf");return Ph(r,t-1)},Oe=Pe.__acroform__.clearBitForPdf=function(r,t){if(isNaN(r)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBitForPdf");return kh(r,t-1)},Ch=Pe.__acroform__.calculateCoordinates=function(r,t){var e=t.internal.getHorizontalCoordinate,i=t.internal.getVerticalCoordinate,o=r[0],a=r[1],u=r[2],h=r[3],f={};return f.lowerLeft_X=e(o)||0,f.lowerLeft_Y=i(a+h)||0,f.upperRight_X=e(o+u)||0,f.upperRight_Y=i(a)||0,[Number(Xt(f.lowerLeft_X)),Number(Xt(f.lowerLeft_Y)),Number(Xt(f.upperRight_X)),Number(Xt(f.upperRight_Y))]},Ih=function(r){if(r.appearanceStreamContent)return r.appearanceStreamContent;if(r.V||r.DV){var t=[],e=r._V||r.DV,i=Ds(r,e),o=r.scope.internal.getFont(r.fontName,r.fontStyle).id;t.push("/Tx BMC"),t.push("q"),t.push("BT"),t.push(r.scope.__private__.encodeColorString(r.color)),t.push("/"+o+" "+Xt(i.fontSize)+" Tf"),t.push("1 0 0 1 0 0 Tm"),t.push(i.text),t.push("ET"),t.push("Q"),t.push("EMC");var a=Zr(r);return a.scope=r.scope,a.stream=t.join(`
100
- `),a}},Ds=function(r,t){var e=r.fontSize===0?r.maxFontSize:r.fontSize,i={text:"",fontSize:""},o=(t=(t=t.substr(0,1)=="("?t.substr(1):t).substr(t.length-1)==")"?t.substr(0,t.length-1):t).split(" ");o=r.multiline?o.map(function(k){return k.split(`
101
- `)}):o.map(function(k){return[k]});var a=e,u=Bt.internal.getHeight(r)||0;u=u<0?-u:u;var h=Bt.internal.getWidth(r)||0;h=h<0?-h:h;var f=function(k,C,W){if(k+1<o.length){var R=C+" "+o[k+1][0];return lo(R,r,W).width<=h-4}return!1};a++;t:for(;a>0;){t="",a--;var d,v,m=lo("3",r,a).height,w=r.multiline?u-a:(u-m)/2,p=w+=2,F=0,P=0,D=0;if(a<=0){t=`(...) Tj
102
- `,t+="% Width of Text: "+lo(t,r,a=12).width+", FieldWidth:"+h+`
103
- `;break}for(var _="",B=0,G=0;G<o.length;G++)if(o.hasOwnProperty(G)){var it=!1;if(o[G].length!==1&&D!==o[G].length-1){if((m+2)*(B+2)+2>u)continue t;_+=o[G][D],it=!0,P=G,G--}else{_=(_+=o[G][D]+" ").substr(_.length-1)==" "?_.substr(0,_.length-1):_;var ut=parseInt(G),wt=f(ut,_,a),tt=G>=o.length-1;if(wt&&!tt){_+=" ",D=0;continue}if(wt||tt){if(tt)P=ut;else if(r.multiline&&(m+2)*(B+2)+2>u)continue t}else{if(!r.multiline||(m+2)*(B+2)+2>u)continue t;P=ut}}for(var z="",nt=F;nt<=P;nt++){var pt=o[nt];if(r.multiline){if(nt===P){z+=pt[D]+" ",D=(D+1)%pt.length;continue}if(nt===F){z+=pt[pt.length-1]+" ";continue}}z+=pt[0]+" "}switch(z=z.substr(z.length-1)==" "?z.substr(0,z.length-1):z,v=lo(z,r,a).width,r.textAlign){case"right":d=h-v-2;break;case"center":d=(h-v)/2;break;case"left":default:d=2}t+=Xt(d)+" "+Xt(p)+` Td
104
- `,t+="("+Zn(z)+`) Tj
105
- `,t+=-Xt(d)+` 0 Td
106
- `,p=-(a+2),v=0,F=it?P:P+1,B++,_=""}break}return i.text=t,i.fontSize=a,i},lo=function(r,t,e){var i=t.scope.internal.getFont(t.fontName,t.fontStyle),o=t.scope.getStringUnitWidth(r,{font:i,fontSize:parseFloat(e),charSpace:0})*parseFloat(e);return{height:t.scope.getStringUnitWidth("3",{font:i,fontSize:parseFloat(e),charSpace:0})*parseFloat(e)*1.5,width:o}},jh={fields:[],xForms:[],acroFormDictionaryRoot:null,printedOut:!1,internal:null,isInitialized:!1},Oh=function(r,t){var e={type:"reference",object:r};t.internal.getPageInfo(r.page).pageContext.annotations.find(function(i){return i.type===e.type&&i.object===e.object})===void 0&&t.internal.getPageInfo(r.page).pageContext.annotations.push(e)},Dh=function(r,t){for(var e in r)if(r.hasOwnProperty(e)){var i=e,o=r[e];t.internal.newObjectDeferredBegin(o.objId,!0),he(o)==="object"&&typeof o.putStream=="function"&&o.putStream(),delete r[i]}},Bh=function(r,t){if(t.scope=r,r.internal!==void 0&&(r.internal.acroformPlugin===void 0||r.internal.acroformPlugin.isInitialized===!1)){if(Tr.FieldNum=0,r.internal.acroformPlugin=JSON.parse(JSON.stringify(jh)),r.internal.acroformPlugin.acroFormDictionaryRoot)throw new Error("Exception while creating AcroformDictionary");Us=r.internal.scaleFactor,r.internal.acroformPlugin.acroFormDictionaryRoot=new nl,r.internal.acroformPlugin.acroFormDictionaryRoot.scope=r,r.internal.acroformPlugin.acroFormDictionaryRoot._eventID=r.internal.events.subscribe("postPutResources",function(){(function(e){e.internal.events.unsubscribe(e.internal.acroformPlugin.acroFormDictionaryRoot._eventID),delete e.internal.acroformPlugin.acroFormDictionaryRoot._eventID,e.internal.acroformPlugin.printedOut=!0})(r)}),r.internal.events.subscribe("buildDocument",function(){(function(e){e.internal.acroformPlugin.acroFormDictionaryRoot.objId=void 0;var i=e.internal.acroformPlugin.acroFormDictionaryRoot.Fields;for(var o in i)if(i.hasOwnProperty(o)){var a=i[o];a.objId=void 0,a.hasAnnotation&&Oh(a,e)}})(r)}),r.internal.events.subscribe("putCatalog",function(){(function(e){if(e.internal.acroformPlugin.acroFormDictionaryRoot===void 0)throw new Error("putCatalogCallback: Root missing.");e.internal.write("/AcroForm "+e.internal.acroformPlugin.acroFormDictionaryRoot.objId+" 0 R")})(r)}),r.internal.events.subscribe("postPutPages",function(e){(function(i,o){var a=!i;for(var u 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(u)){var h=i[u],f=[],d=h.Rect;if(h.Rect&&(h.Rect=Ch(h.Rect,o)),o.internal.newObjectDeferredBegin(h.objId,!0),h.DA=Bt.createDefaultAppearanceStream(h),he(h)==="object"&&typeof h.getKeyValueListForStream=="function"&&(f=h.getKeyValueListForStream()),h.Rect=d,h.hasAppearanceStream&&!h.appearanceStreamContent){var v=Ih(h);f.push({key:"AP",value:"<</N "+v+">>"}),o.internal.acroformPlugin.xForms.push(v)}if(h.appearanceStreamContent){var m="";for(var w in h.appearanceStreamContent)if(h.appearanceStreamContent.hasOwnProperty(w)){var p=h.appearanceStreamContent[w];if(m+="/"+w+" ",m+="<<",Object.keys(p).length>=1||Array.isArray(p)){for(var u in p)if(p.hasOwnProperty(u)){var F=p[u];typeof F=="function"&&(F=F.call(o,h)),m+="/"+u+" "+F+" ",o.internal.acroformPlugin.xForms.indexOf(F)>=0||o.internal.acroformPlugin.xForms.push(F)}}else typeof(F=p)=="function"&&(F=F.call(o,h)),m+="/"+u+" "+F,o.internal.acroformPlugin.xForms.indexOf(F)>=0||o.internal.acroformPlugin.xForms.push(F);m+=">>"}f.push({key:"AP",value:`<<
107
- `+m+">>"})}o.internal.putStream({additionalKeyValues:f,objectId:h.objId}),o.internal.out("endobj")}a&&Dh(o.internal.acroformPlugin.xForms,o)})(e,r)}),r.internal.acroformPlugin.isInitialized=!0}},el=Pe.__acroform__.arrayToPdfArray=function(r,t,e){var i=function(u){return u};if(Array.isArray(r)){for(var o="[",a=0;a<r.length;a++)switch(a!==0&&(o+=" "),he(r[a])){case"boolean":case"number":case"object":o+=r[a].toString();break;case"string":r[a].substr(0,1)!=="/"?(t!==void 0&&e&&(i=e.internal.getEncryptor(t)),o+="("+Zn(i(r[a].toString()))+")"):o+=r[a].toString()}return o+="]"}throw new Error("Invalid argument passed to jsPDF.__acroform__.arrayToPdfArray")},ys=function(r,t,e){var i=function(o){return o};return t!==void 0&&e&&(i=e.internal.getEncryptor(t)),(r=r||"").toString(),r="("+Zn(i(r))+")"},$r=function(){this._objId=void 0,this._scope=void 0,Object.defineProperty(this,"objId",{get:function(){if(this._objId===void 0){if(this.scope===void 0)return;this._objId=this.scope.internal.newObjectDeferred()}return this._objId},set:function(r){this._objId=r}}),Object.defineProperty(this,"scope",{value:this._scope,writable:!0})};$r.prototype.toString=function(){return this.objId+" 0 R"},$r.prototype.putStream=function(){var r=this.getKeyValueListForStream();this.scope.internal.putStream({data:this.stream,additionalKeyValues:r,objectId:this.objId}),this.scope.internal.out("endobj")},$r.prototype.getKeyValueListForStream=function(){var r=[],t=Object.getOwnPropertyNames(this).filter(function(a){return a!="content"&&a!="appearanceStreamContent"&&a!="scope"&&a!="objId"&&a.substring(0,1)!="_"});for(var e in t)if(Object.getOwnPropertyDescriptor(this,t[e]).configurable===!1){var i=t[e],o=this[i];o&&(Array.isArray(o)?r.push({key:i,value:el(o,this.objId,this.scope)}):o instanceof $r?(o.scope=this.scope,r.push({key:i,value:o.objId+" 0 R"})):typeof o!="function"&&r.push({key:i,value:o}))}return r};var rl=function(){$r.call(this),Object.defineProperty(this,"Type",{value:"/XObject",configurable:!1,writable:!0}),Object.defineProperty(this,"Subtype",{value:"/Form",configurable:!1,writable:!0}),Object.defineProperty(this,"FormType",{value:1,configurable:!1,writable:!0});var r,t=[];Object.defineProperty(this,"BBox",{configurable:!1,get:function(){return t},set:function(e){t=e}}),Object.defineProperty(this,"Resources",{value:"2 0 R",configurable:!1,writable:!0}),Object.defineProperty(this,"stream",{enumerable:!1,configurable:!0,set:function(e){r=e.trim()},get:function(){return r||null}})};hr(rl,$r);var nl=function(){$r.call(this);var r,t=[];Object.defineProperty(this,"Kids",{enumerable:!1,configurable:!0,get:function(){return t.length>0?t:void 0}}),Object.defineProperty(this,"Fields",{enumerable:!1,configurable:!1,get:function(){return t}}),Object.defineProperty(this,"DA",{enumerable:!1,configurable:!1,get:function(){if(r){var e=function(i){return i};return this.scope&&(e=this.scope.internal.getEncryptor(this.objId)),"("+Zn(e(r))+")"}},set:function(e){r=e}})};hr(nl,$r);var Tr=function r(){$r.call(this);var t=4;Object.defineProperty(this,"F",{enumerable:!1,configurable:!1,get:function(){return t},set:function(_){if(isNaN(_))throw new Error('Invalid value "'+_+'" for attribute F supplied.');t=_}}),Object.defineProperty(this,"showWhenPrinted",{enumerable:!0,configurable:!0,get:function(){return!!Ie(t,3)},set:function(_){_?this.F=je(t,3):this.F=Oe(t,3)}});var e=0;Object.defineProperty(this,"Ff",{enumerable:!1,configurable:!1,get:function(){return e},set:function(_){if(isNaN(_))throw new Error('Invalid value "'+_+'" for attribute Ff supplied.');e=_}});var i=[];Object.defineProperty(this,"Rect",{enumerable:!1,configurable:!1,get:function(){if(i.length!==0)return i},set:function(_){i=_!==void 0?_:[]}}),Object.defineProperty(this,"x",{enumerable:!0,configurable:!0,get:function(){return!i||isNaN(i[0])?0:i[0]},set:function(_){i[0]=_}}),Object.defineProperty(this,"y",{enumerable:!0,configurable:!0,get:function(){return!i||isNaN(i[1])?0:i[1]},set:function(_){i[1]=_}}),Object.defineProperty(this,"width",{enumerable:!0,configurable:!0,get:function(){return!i||isNaN(i[2])?0:i[2]},set:function(_){i[2]=_}}),Object.defineProperty(this,"height",{enumerable:!0,configurable:!0,get:function(){return!i||isNaN(i[3])?0:i[3]},set:function(_){i[3]=_}});var o="";Object.defineProperty(this,"FT",{enumerable:!0,configurable:!1,get:function(){return o},set:function(_){switch(_){case"/Btn":case"/Tx":case"/Ch":case"/Sig":o=_;break;default:throw new Error('Invalid value "'+_+'" for attribute FT supplied.')}}});var a=null;Object.defineProperty(this,"T",{enumerable:!0,configurable:!1,get:function(){if(!a||a.length<1){if(this instanceof bo)return;a="FieldObject"+r.FieldNum++}var _=function(B){return B};return this.scope&&(_=this.scope.internal.getEncryptor(this.objId)),"("+Zn(_(a))+")"},set:function(_){a=_.toString()}}),Object.defineProperty(this,"fieldName",{configurable:!0,enumerable:!0,get:function(){return a},set:function(_){a=_}});var u="helvetica";Object.defineProperty(this,"fontName",{enumerable:!0,configurable:!0,get:function(){return u},set:function(_){u=_}});var h="normal";Object.defineProperty(this,"fontStyle",{enumerable:!0,configurable:!0,get:function(){return h},set:function(_){h=_}});var f=0;Object.defineProperty(this,"fontSize",{enumerable:!0,configurable:!0,get:function(){return f},set:function(_){f=_}});var d=void 0;Object.defineProperty(this,"maxFontSize",{enumerable:!0,configurable:!0,get:function(){return d===void 0?50/Us:d},set:function(_){d=_}});var v="black";Object.defineProperty(this,"color",{enumerable:!0,configurable:!0,get:function(){return v},set:function(_){v=_}});var m="/F1 0 Tf 0 g";Object.defineProperty(this,"DA",{enumerable:!0,configurable:!1,get:function(){if(!(!m||this instanceof bo||this instanceof Kn))return ys(m,this.objId,this.scope)},set:function(_){_=_.toString(),m=_}});var w=null;Object.defineProperty(this,"DV",{enumerable:!1,configurable:!1,get:function(){if(w)return this instanceof He?w:ys(w,this.objId,this.scope)},set:function(_){_=_.toString(),w=this instanceof He?_:_.substr(0,1)==="("?Pi(_.substr(1,_.length-2)):Pi(_)}}),Object.defineProperty(this,"defaultValue",{enumerable:!0,configurable:!0,get:function(){return this instanceof He?Pi(w.substr(1,w.length-1)):w},set:function(_){_=_.toString(),w=this instanceof He?"/"+_:_}});var p=null;Object.defineProperty(this,"_V",{enumerable:!1,configurable:!1,get:function(){if(p)return p},set:function(_){this.V=_}}),Object.defineProperty(this,"V",{enumerable:!1,configurable:!1,get:function(){if(p)return this instanceof He?p:ys(p,this.objId,this.scope)},set:function(_){_=_.toString(),p=this instanceof He?_:_.substr(0,1)==="("?Pi(_.substr(1,_.length-2)):Pi(_)}}),Object.defineProperty(this,"value",{enumerable:!0,configurable:!0,get:function(){return this instanceof He?Pi(p.substr(1,p.length-1)):p},set:function(_){_=_.toString(),p=this instanceof He?"/"+_:_}}),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 F,P=!1;Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return P},set:function(_){_=!!_,P=_}}),Object.defineProperty(this,"page",{enumerable:!0,configurable:!0,get:function(){if(F)return F},set:function(_){F=_}}),Object.defineProperty(this,"readOnly",{enumerable:!0,configurable:!0,get:function(){return!!Ie(this.Ff,1)},set:function(_){_?this.Ff=je(this.Ff,1):this.Ff=Oe(this.Ff,1)}}),Object.defineProperty(this,"required",{enumerable:!0,configurable:!0,get:function(){return!!Ie(this.Ff,2)},set:function(_){_?this.Ff=je(this.Ff,2):this.Ff=Oe(this.Ff,2)}}),Object.defineProperty(this,"noExport",{enumerable:!0,configurable:!0,get:function(){return!!Ie(this.Ff,3)},set:function(_){_?this.Ff=je(this.Ff,3):this.Ff=Oe(this.Ff,3)}});var D=null;Object.defineProperty(this,"Q",{enumerable:!0,configurable:!1,get:function(){if(D!==null)return D},set:function(_){if([0,1,2].indexOf(_)===-1)throw new Error('Invalid value "'+_+'" for attribute Q supplied.');D=_}}),Object.defineProperty(this,"textAlign",{get:function(){var _;switch(D){case 0:default:_="left";break;case 1:_="center";break;case 2:_="right"}return _},configurable:!0,enumerable:!0,set:function(_){switch(_){case"right":case 2:D=2;break;case"center":case 1:D=1;break;case"left":case 0:default:D=0}}})};hr(Tr,$r);var ji=function(){Tr.call(this),this.FT="/Ch",this.V="()",this.fontName="zapfdingbats";var r=0;Object.defineProperty(this,"TI",{enumerable:!0,configurable:!1,get:function(){return r},set:function(e){r=e}}),Object.defineProperty(this,"topIndex",{enumerable:!0,configurable:!0,get:function(){return r},set:function(e){r=e}});var t=[];Object.defineProperty(this,"Opt",{enumerable:!0,configurable:!1,get:function(){return el(t,this.objId,this.scope)},set:function(e){var i,o;o=[],typeof(i=e)=="string"&&(o=function(a,u,h){h||(h=1);for(var f,d=[];f=u.exec(a);)d.push(f[h]);return d}(i,/\((.*?)\)/g)),t=o}}),this.getOptions=function(){return t},this.setOptions=function(e){t=e,this.sort&&t.sort()},this.addOption=function(e){e=(e=e||"").toString(),t.push(e),this.sort&&t.sort()},this.removeOption=function(e,i){for(i=i||!1,e=(e=e||"").toString();t.indexOf(e)!==-1&&(t.splice(t.indexOf(e),1),i!==!1););},Object.defineProperty(this,"combo",{enumerable:!0,configurable:!0,get:function(){return!!Ie(this.Ff,18)},set:function(e){e?this.Ff=je(this.Ff,18):this.Ff=Oe(this.Ff,18)}}),Object.defineProperty(this,"edit",{enumerable:!0,configurable:!0,get:function(){return!!Ie(this.Ff,19)},set:function(e){this.combo===!0&&(e?this.Ff=je(this.Ff,19):this.Ff=Oe(this.Ff,19))}}),Object.defineProperty(this,"sort",{enumerable:!0,configurable:!0,get:function(){return!!Ie(this.Ff,20)},set:function(e){e?(this.Ff=je(this.Ff,20),t.sort()):this.Ff=Oe(this.Ff,20)}}),Object.defineProperty(this,"multiSelect",{enumerable:!0,configurable:!0,get:function(){return!!Ie(this.Ff,22)},set:function(e){e?this.Ff=je(this.Ff,22):this.Ff=Oe(this.Ff,22)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return!!Ie(this.Ff,23)},set:function(e){e?this.Ff=je(this.Ff,23):this.Ff=Oe(this.Ff,23)}}),Object.defineProperty(this,"commitOnSelChange",{enumerable:!0,configurable:!0,get:function(){return!!Ie(this.Ff,27)},set:function(e){e?this.Ff=je(this.Ff,27):this.Ff=Oe(this.Ff,27)}}),this.hasAppearanceStream=!1};hr(ji,Tr);var Oi=function(){ji.call(this),this.fontName="helvetica",this.combo=!1};hr(Oi,ji);var Di=function(){Oi.call(this),this.combo=!0};hr(Di,Oi);var co=function(){Di.call(this),this.edit=!0};hr(co,Di);var He=function(){Tr.call(this),this.FT="/Btn",Object.defineProperty(this,"noToggleToOff",{enumerable:!0,configurable:!0,get:function(){return!!Ie(this.Ff,15)},set:function(e){e?this.Ff=je(this.Ff,15):this.Ff=Oe(this.Ff,15)}}),Object.defineProperty(this,"radio",{enumerable:!0,configurable:!0,get:function(){return!!Ie(this.Ff,16)},set:function(e){e?this.Ff=je(this.Ff,16):this.Ff=Oe(this.Ff,16)}}),Object.defineProperty(this,"pushButton",{enumerable:!0,configurable:!0,get:function(){return!!Ie(this.Ff,17)},set:function(e){e?this.Ff=je(this.Ff,17):this.Ff=Oe(this.Ff,17)}}),Object.defineProperty(this,"radioIsUnison",{enumerable:!0,configurable:!0,get:function(){return!!Ie(this.Ff,26)},set:function(e){e?this.Ff=je(this.Ff,26):this.Ff=Oe(this.Ff,26)}});var r,t={};Object.defineProperty(this,"MK",{enumerable:!1,configurable:!1,get:function(){var e=function(a){return a};if(this.scope&&(e=this.scope.internal.getEncryptor(this.objId)),Object.keys(t).length!==0){var i,o=[];for(i in o.push("<<"),t)o.push("/"+i+" ("+Zn(e(t[i]))+")");return o.push(">>"),o.join(`
108
- `)}},set:function(e){he(e)==="object"&&(t=e)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return t.CA||""},set:function(e){typeof e=="string"&&(t.CA=e)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return r},set:function(e){r=e}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return r.substr(1,r.length-1)},set:function(e){r="/"+e}})};hr(He,Tr);var po=function(){He.call(this),this.pushButton=!0};hr(po,He);var Bi=function(){He.call(this),this.radio=!0,this.pushButton=!1;var r=[];Object.defineProperty(this,"Kids",{enumerable:!0,configurable:!1,get:function(){return r},set:function(t){r=t!==void 0?t:[]}})};hr(Bi,He);var bo=function(){var r,t;Tr.call(this),Object.defineProperty(this,"Parent",{enumerable:!1,configurable:!1,get:function(){return r},set:function(o){r=o}}),Object.defineProperty(this,"optionName",{enumerable:!1,configurable:!0,get:function(){return t},set:function(o){t=o}});var e,i={};Object.defineProperty(this,"MK",{enumerable:!1,configurable:!1,get:function(){var o=function(h){return h};this.scope&&(o=this.scope.internal.getEncryptor(this.objId));var a,u=[];for(a in u.push("<<"),i)u.push("/"+a+" ("+Zn(o(i[a]))+")");return u.push(">>"),u.join(`
109
- `)},set:function(o){he(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 e},set:function(o){e=o}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return e.substr(1,e.length-1)},set:function(o){e="/"+o}}),this.caption="l",this.appearanceState="Off",this._AppearanceType=Bt.RadioButton.Circle,this.appearanceStreamContent=this._AppearanceType.createAppearanceStream(this.optionName)};hr(bo,Tr),Bi.prototype.setAppearance=function(r){if(!("createAppearanceStream"in r)||!("getCA"in r))throw new Error("Couldn't assign Appearance to RadioButton. Appearance was Invalid!");for(var t in this.Kids)if(this.Kids.hasOwnProperty(t)){var e=this.Kids[t];e.appearanceStreamContent=r.createAppearanceStream(e.optionName),e.caption=r.getCA()}},Bi.prototype.createOption=function(r){var t=new bo;return t.Parent=this,t.optionName=r,this.Kids.push(t),Mh.call(this.scope,t),t};var go=function(){He.call(this),this.fontName="zapfdingbats",this.caption="3",this.appearanceState="On",this.value="On",this.textAlign="center",this.appearanceStreamContent=Bt.CheckBox.createAppearanceStream()};hr(go,He);var Kn=function(){Tr.call(this),this.FT="/Tx",Object.defineProperty(this,"multiline",{enumerable:!0,configurable:!0,get:function(){return!!Ie(this.Ff,13)},set:function(t){t?this.Ff=je(this.Ff,13):this.Ff=Oe(this.Ff,13)}}),Object.defineProperty(this,"fileSelect",{enumerable:!0,configurable:!0,get:function(){return!!Ie(this.Ff,21)},set:function(t){t?this.Ff=je(this.Ff,21):this.Ff=Oe(this.Ff,21)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return!!Ie(this.Ff,23)},set:function(t){t?this.Ff=je(this.Ff,23):this.Ff=Oe(this.Ff,23)}}),Object.defineProperty(this,"doNotScroll",{enumerable:!0,configurable:!0,get:function(){return!!Ie(this.Ff,24)},set:function(t){t?this.Ff=je(this.Ff,24):this.Ff=Oe(this.Ff,24)}}),Object.defineProperty(this,"comb",{enumerable:!0,configurable:!0,get:function(){return!!Ie(this.Ff,25)},set:function(t){t?this.Ff=je(this.Ff,25):this.Ff=Oe(this.Ff,25)}}),Object.defineProperty(this,"richText",{enumerable:!0,configurable:!0,get:function(){return!!Ie(this.Ff,26)},set:function(t){t?this.Ff=je(this.Ff,26):this.Ff=Oe(this.Ff,26)}});var r=null;Object.defineProperty(this,"MaxLen",{enumerable:!0,configurable:!1,get:function(){return r},set:function(t){r=t}}),Object.defineProperty(this,"maxLength",{enumerable:!0,configurable:!0,get:function(){return r},set:function(t){Number.isInteger(t)&&(r=t)}}),Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return this.V||this.DV}})};hr(Kn,Tr);var vo=function(){Kn.call(this),Object.defineProperty(this,"password",{enumerable:!0,configurable:!0,get:function(){return!!Ie(this.Ff,14)},set:function(r){r?this.Ff=je(this.Ff,14):this.Ff=Oe(this.Ff,14)}}),this.password=!0};hr(vo,Kn);var Bt={CheckBox:{createAppearanceStream:function(){return{N:{On:Bt.CheckBox.YesNormal},D:{On:Bt.CheckBox.YesPushDown,Off:Bt.CheckBox.OffPushDown}}},YesPushDown:function(r){var t=Zr(r);t.scope=r.scope;var e=[],i=r.scope.internal.getFont(r.fontName,r.fontStyle).id,o=r.scope.__private__.encodeColorString(r.color),a=Ds(r,r.caption);return e.push("0.749023 g"),e.push("0 0 "+Xt(Bt.internal.getWidth(r))+" "+Xt(Bt.internal.getHeight(r))+" re"),e.push("f"),e.push("BMC"),e.push("q"),e.push("0 0 1 rg"),e.push("/"+i+" "+Xt(a.fontSize)+" Tf "+o),e.push("BT"),e.push(a.text),e.push("ET"),e.push("Q"),e.push("EMC"),t.stream=e.join(`
110
- `),t},YesNormal:function(r){var t=Zr(r);t.scope=r.scope;var e=r.scope.internal.getFont(r.fontName,r.fontStyle).id,i=r.scope.__private__.encodeColorString(r.color),o=[],a=Bt.internal.getHeight(r),u=Bt.internal.getWidth(r),h=Ds(r,r.caption);return o.push("1 g"),o.push("0 0 "+Xt(u)+" "+Xt(a)+" re"),o.push("f"),o.push("q"),o.push("0 0 1 rg"),o.push("0 0 "+Xt(u-1)+" "+Xt(a-1)+" re"),o.push("W"),o.push("n"),o.push("0 g"),o.push("BT"),o.push("/"+e+" "+Xt(h.fontSize)+" Tf "+i),o.push(h.text),o.push("ET"),o.push("Q"),t.stream=o.join(`
111
- `),t},OffPushDown:function(r){var t=Zr(r);t.scope=r.scope;var e=[];return e.push("0.749023 g"),e.push("0 0 "+Xt(Bt.internal.getWidth(r))+" "+Xt(Bt.internal.getHeight(r))+" re"),e.push("f"),t.stream=e.join(`
112
- `),t}},RadioButton:{Circle:{createAppearanceStream:function(r){var t={D:{Off:Bt.RadioButton.Circle.OffPushDown},N:{}};return t.N[r]=Bt.RadioButton.Circle.YesNormal,t.D[r]=Bt.RadioButton.Circle.YesPushDown,t},getCA:function(){return"l"},YesNormal:function(r){var t=Zr(r);t.scope=r.scope;var e=[],i=Bt.internal.getWidth(r)<=Bt.internal.getHeight(r)?Bt.internal.getWidth(r)/4:Bt.internal.getHeight(r)/4;i=Number((.9*i).toFixed(5));var o=Bt.internal.Bezier_C,a=Number((i*o).toFixed(5));return e.push("q"),e.push("1 0 0 1 "+In(Bt.internal.getWidth(r)/2)+" "+In(Bt.internal.getHeight(r)/2)+" cm"),e.push(i+" 0 m"),e.push(i+" "+a+" "+a+" "+i+" 0 "+i+" c"),e.push("-"+a+" "+i+" -"+i+" "+a+" -"+i+" 0 c"),e.push("-"+i+" -"+a+" -"+a+" -"+i+" 0 -"+i+" c"),e.push(a+" -"+i+" "+i+" -"+a+" "+i+" 0 c"),e.push("f"),e.push("Q"),t.stream=e.join(`
113
- `),t},YesPushDown:function(r){var t=Zr(r);t.scope=r.scope;var e=[],i=Bt.internal.getWidth(r)<=Bt.internal.getHeight(r)?Bt.internal.getWidth(r)/4:Bt.internal.getHeight(r)/4;i=Number((.9*i).toFixed(5));var o=Number((2*i).toFixed(5)),a=Number((o*Bt.internal.Bezier_C).toFixed(5)),u=Number((i*Bt.internal.Bezier_C).toFixed(5));return e.push("0.749023 g"),e.push("q"),e.push("1 0 0 1 "+In(Bt.internal.getWidth(r)/2)+" "+In(Bt.internal.getHeight(r)/2)+" cm"),e.push(o+" 0 m"),e.push(o+" "+a+" "+a+" "+o+" 0 "+o+" c"),e.push("-"+a+" "+o+" -"+o+" "+a+" -"+o+" 0 c"),e.push("-"+o+" -"+a+" -"+a+" -"+o+" 0 -"+o+" c"),e.push(a+" -"+o+" "+o+" -"+a+" "+o+" 0 c"),e.push("f"),e.push("Q"),e.push("0 g"),e.push("q"),e.push("1 0 0 1 "+In(Bt.internal.getWidth(r)/2)+" "+In(Bt.internal.getHeight(r)/2)+" cm"),e.push(i+" 0 m"),e.push(i+" "+u+" "+u+" "+i+" 0 "+i+" c"),e.push("-"+u+" "+i+" -"+i+" "+u+" -"+i+" 0 c"),e.push("-"+i+" -"+u+" -"+u+" -"+i+" 0 -"+i+" c"),e.push(u+" -"+i+" "+i+" -"+u+" "+i+" 0 c"),e.push("f"),e.push("Q"),t.stream=e.join(`
114
- `),t},OffPushDown:function(r){var t=Zr(r);t.scope=r.scope;var e=[],i=Bt.internal.getWidth(r)<=Bt.internal.getHeight(r)?Bt.internal.getWidth(r)/4:Bt.internal.getHeight(r)/4;i=Number((.9*i).toFixed(5));var o=Number((2*i).toFixed(5)),a=Number((o*Bt.internal.Bezier_C).toFixed(5));return e.push("0.749023 g"),e.push("q"),e.push("1 0 0 1 "+In(Bt.internal.getWidth(r)/2)+" "+In(Bt.internal.getHeight(r)/2)+" cm"),e.push(o+" 0 m"),e.push(o+" "+a+" "+a+" "+o+" 0 "+o+" c"),e.push("-"+a+" "+o+" -"+o+" "+a+" -"+o+" 0 c"),e.push("-"+o+" -"+a+" -"+a+" -"+o+" 0 -"+o+" c"),e.push(a+" -"+o+" "+o+" -"+a+" "+o+" 0 c"),e.push("f"),e.push("Q"),t.stream=e.join(`
115
- `),t}},Cross:{createAppearanceStream:function(r){var t={D:{Off:Bt.RadioButton.Cross.OffPushDown},N:{}};return t.N[r]=Bt.RadioButton.Cross.YesNormal,t.D[r]=Bt.RadioButton.Cross.YesPushDown,t},getCA:function(){return"8"},YesNormal:function(r){var t=Zr(r);t.scope=r.scope;var e=[],i=Bt.internal.calculateCross(r);return e.push("q"),e.push("1 1 "+Xt(Bt.internal.getWidth(r)-2)+" "+Xt(Bt.internal.getHeight(r)-2)+" re"),e.push("W"),e.push("n"),e.push(Xt(i.x1.x)+" "+Xt(i.x1.y)+" m"),e.push(Xt(i.x2.x)+" "+Xt(i.x2.y)+" l"),e.push(Xt(i.x4.x)+" "+Xt(i.x4.y)+" m"),e.push(Xt(i.x3.x)+" "+Xt(i.x3.y)+" l"),e.push("s"),e.push("Q"),t.stream=e.join(`
116
- `),t},YesPushDown:function(r){var t=Zr(r);t.scope=r.scope;var e=Bt.internal.calculateCross(r),i=[];return i.push("0.749023 g"),i.push("0 0 "+Xt(Bt.internal.getWidth(r))+" "+Xt(Bt.internal.getHeight(r))+" re"),i.push("f"),i.push("q"),i.push("1 1 "+Xt(Bt.internal.getWidth(r)-2)+" "+Xt(Bt.internal.getHeight(r)-2)+" re"),i.push("W"),i.push("n"),i.push(Xt(e.x1.x)+" "+Xt(e.x1.y)+" m"),i.push(Xt(e.x2.x)+" "+Xt(e.x2.y)+" l"),i.push(Xt(e.x4.x)+" "+Xt(e.x4.y)+" m"),i.push(Xt(e.x3.x)+" "+Xt(e.x3.y)+" l"),i.push("s"),i.push("Q"),t.stream=i.join(`
117
- `),t},OffPushDown:function(r){var t=Zr(r);t.scope=r.scope;var e=[];return e.push("0.749023 g"),e.push("0 0 "+Xt(Bt.internal.getWidth(r))+" "+Xt(Bt.internal.getHeight(r))+" re"),e.push("f"),t.stream=e.join(`
118
- `),t}}},createDefaultAppearanceStream:function(r){var t=r.scope.internal.getFont(r.fontName,r.fontStyle).id,e=r.scope.__private__.encodeColorString(r.color);return"/"+t+" "+r.fontSize+" Tf "+e}};Bt.internal={Bezier_C:.551915024494,calculateCross:function(r){var t=Bt.internal.getWidth(r),e=Bt.internal.getHeight(r),i=Math.min(t,e);return{x1:{x:(t-i)/2,y:(e-i)/2+i},x2:{x:(t-i)/2+i,y:(e-i)/2},x3:{x:(t-i)/2,y:(e-i)/2},x4:{x:(t-i)/2+i,y:(e-i)/2+i}}}},Bt.internal.getWidth=function(r){var t=0;return he(r)==="object"&&(t=Au(r.Rect[2])),t},Bt.internal.getHeight=function(r){var t=0;return he(r)==="object"&&(t=Au(r.Rect[3])),t};var Mh=Pe.addField=function(r){if(Bh(this,r),!(r instanceof Tr))throw new Error("Invalid argument passed to jsPDF.addField.");var t;return(t=r).scope.internal.acroformPlugin.printedOut&&(t.scope.internal.acroformPlugin.printedOut=!1,t.scope.internal.acroformPlugin.acroFormDictionaryRoot=null),t.scope.internal.acroformPlugin.acroFormDictionaryRoot.Fields.push(t),r.page=r.scope.internal.getCurrentPageInfo().pageNumber,this};Pe.AcroFormChoiceField=ji,Pe.AcroFormListBox=Oi,Pe.AcroFormComboBox=Di,Pe.AcroFormEditBox=co,Pe.AcroFormButton=He,Pe.AcroFormPushButton=po,Pe.AcroFormRadioButton=Bi,Pe.AcroFormCheckBox=go,Pe.AcroFormTextField=Kn,Pe.AcroFormPasswordField=vo,Pe.AcroFormAppearance=Bt,Pe.AcroForm={ChoiceField:ji,ListBox:Oi,ComboBox:Di,EditBox:co,Button:He,PushButton:po,RadioButton:Bi,CheckBox:go,TextField:Kn,PasswordField:vo,Appearance:Bt},zt.AcroForm={ChoiceField:ji,ListBox:Oi,ComboBox:Di,EditBox:co,Button:He,PushButton:po,RadioButton:Bi,CheckBox:go,TextField:Kn,PasswordField:vo,Appearance:Bt};zt.AcroForm;function il(r){return r.reduce(function(t,e,i){return t[e]=i,t},{})}(function(r){r.__addimage__={};var t="UNKNOWN",e={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]]},i=r.__addimage__.getImageFileTypeByImageData=function(k,C){var W,R,st,at,ft,$=t;if((C=C||t)==="RGBA"||k.data!==void 0&&k.data instanceof Uint8ClampedArray&&"height"in k&&"width"in k)return"RGBA";if(wt(k))for(ft in e)for(st=e[ft],W=0;W<st.length;W+=1){for(at=!0,R=0;R<st[W].length;R+=1)if(st[W][R]!==void 0&&st[W][R]!==k[R]){at=!1;break}if(at===!0){$=ft;break}}else for(ft in e)for(st=e[ft],W=0;W<st.length;W+=1){for(at=!0,R=0;R<st[W].length;R+=1)if(st[W][R]!==void 0&&st[W][R]!==k.charCodeAt(R)){at=!1;break}if(at===!0){$=ft;break}}return $===t&&C!==t&&($=C),$},o=function k(C){for(var W=this.internal.write,R=this.internal.putStream,st=(0,this.internal.getFilters)();st.indexOf("FlateEncode")!==-1;)st.splice(st.indexOf("FlateEncode"),1);C.objectId=this.internal.newObject();var at=[];if(at.push({key:"Type",value:"/XObject"}),at.push({key:"Subtype",value:"/Image"}),at.push({key:"Width",value:C.width}),at.push({key:"Height",value:C.height}),C.colorSpace===D.INDEXED?at.push({key:"ColorSpace",value:"[/Indexed /DeviceRGB "+(C.palette.length/3-1)+" "+("sMask"in C&&C.sMask!==void 0?C.objectId+2:C.objectId+1)+" 0 R]"}):(at.push({key:"ColorSpace",value:"/"+C.colorSpace}),C.colorSpace===D.DEVICE_CMYK&&at.push({key:"Decode",value:"[1 0 1 0 1 0 1 0]"})),at.push({key:"BitsPerComponent",value:C.bitsPerComponent}),"decodeParameters"in C&&C.decodeParameters!==void 0&&at.push({key:"DecodeParms",value:"<<"+C.decodeParameters+">>"}),"transparency"in C&&Array.isArray(C.transparency)){for(var ft="",$=0,ht=C.transparency.length;$<ht;$++)ft+=C.transparency[$]+" "+C.transparency[$]+" ";at.push({key:"Mask",value:"["+ft+"]"})}C.sMask!==void 0&&at.push({key:"SMask",value:C.objectId+1+" 0 R"});var dt=C.filter!==void 0?["/"+C.filter]:void 0;if(R({data:C.data,additionalKeyValues:at,alreadyAppliedFilters:dt,objectId:C.objectId}),W("endobj"),"sMask"in C&&C.sMask!==void 0){var jt="/Predictor "+C.predictor+" /Colors 1 /BitsPerComponent "+C.bitsPerComponent+" /Columns "+C.width,A={width:C.width,height:C.height,colorSpace:"DeviceGray",bitsPerComponent:C.bitsPerComponent,decodeParameters:jt,data:C.sMask};"filter"in C&&(A.filter=C.filter),k.call(this,A)}if(C.colorSpace===D.INDEXED){var j=this.internal.newObject();R({data:z(new Uint8Array(C.palette)),objectId:j}),W("endobj")}},a=function(){var k=this.internal.collections.addImage_images;for(var C in k)o.call(this,k[C])},u=function(){var k,C=this.internal.collections.addImage_images,W=this.internal.write;for(var R in C)W("/I"+(k=C[R]).index,k.objectId,"0","R")},h=function(){this.internal.collections.addImage_images||(this.internal.collections.addImage_images={},this.internal.events.subscribe("putResources",a),this.internal.events.subscribe("putXobjectDict",u))},f=function(){var k=this.internal.collections.addImage_images;return h.call(this),k},d=function(){return Object.keys(this.internal.collections.addImage_images).length},v=function(k){return typeof r["process"+k.toUpperCase()]=="function"},m=function(k){return he(k)==="object"&&k.nodeType===1},w=function(k,C){if(k.nodeName==="IMG"&&k.hasAttribute("src")){var W=""+k.getAttribute("src");if(W.indexOf("data:image/")===0)return ga(unescape(W).split("base64,").pop());var R=r.loadFile(W,!0);if(R!==void 0)return R}if(k.nodeName==="CANVAS"){if(k.width===0||k.height===0)throw new Error("Given canvas must have data. Canvas width: "+k.width+", height: "+k.height);var st;switch(C){case"PNG":st="image/png";break;case"WEBP":st="image/webp";break;case"JPEG":case"JPG":default:st="image/jpeg"}return ga(k.toDataURL(st,1).split("base64,").pop())}},p=function(k){var C=this.internal.collections.addImage_images;if(C){for(var W in C)if(k===C[W].alias)return C[W]}},F=function(k,C,W){return k||C||(k=-96,C=-96),k<0&&(k=-1*W.width*72/k/this.internal.scaleFactor),C<0&&(C=-1*W.height*72/C/this.internal.scaleFactor),k===0&&(k=C*W.width/W.height),C===0&&(C=k*W.height/W.width),[k,C]},P=function(k,C,W,R,st,at){var ft=F.call(this,W,R,st),$=this.internal.getCoordinateString,ht=this.internal.getVerticalCoordinateString,dt=f.call(this);if(W=ft[0],R=ft[1],dt[st.index]=st,at){at*=Math.PI/180;var jt=Math.cos(at),A=Math.sin(at),j=function(q){return q.toFixed(4)},M=[j(jt),j(A),j(-1*A),j(jt),0,0,"cm"]}this.internal.write("q"),at?(this.internal.write([1,"0","0",1,$(k),ht(C+R),"cm"].join(" ")),this.internal.write(M.join(" ")),this.internal.write([$(W),"0","0",$(R),"0","0","cm"].join(" "))):this.internal.write([$(W),"0","0",$(R),$(k),ht(C+R),"cm"].join(" ")),this.isAdvancedAPI()&&this.internal.write([1,0,0,-1,0,0,"cm"].join(" ")),this.internal.write("/I"+st.index+" Do"),this.internal.write("Q")},D=r.color_spaces={DEVICE_RGB:"DeviceRGB",DEVICE_GRAY:"DeviceGray",DEVICE_CMYK:"DeviceCMYK",CAL_GREY:"CalGray",CAL_RGB:"CalRGB",LAB:"Lab",ICC_BASED:"ICCBased",INDEXED:"Indexed",PATTERN:"Pattern",SEPARATION:"Separation",DEVICE_N:"DeviceN"};r.decode={DCT_DECODE:"DCTDecode",FLATE_DECODE:"FlateDecode",LZW_DECODE:"LZWDecode",JPX_DECODE:"JPXDecode",JBIG2_DECODE:"JBIG2Decode",ASCII85_DECODE:"ASCII85Decode",ASCII_HEX_DECODE:"ASCIIHexDecode",RUN_LENGTH_DECODE:"RunLengthDecode",CCITT_FAX_DECODE:"CCITTFaxDecode"};var _=r.image_compression={NONE:"NONE",FAST:"FAST",MEDIUM:"MEDIUM",SLOW:"SLOW"},B=r.__addimage__.sHashCode=function(k){var C,W,R=0;if(typeof k=="string")for(W=k.length,C=0;C<W;C++)R=(R<<5)-R+k.charCodeAt(C),R|=0;else if(wt(k))for(W=k.byteLength/2,C=0;C<W;C++)R=(R<<5)-R+k[C],R|=0;return R},G=r.__addimage__.validateStringAsBase64=function(k){(k=k||"").toString().trim();var C=!0;return k.length===0&&(C=!1),k.length%4!=0&&(C=!1),/^[A-Za-z0-9+/]+$/.test(k.substr(0,k.length-2))===!1&&(C=!1),/^[A-Za-z0-9/][A-Za-z0-9+/]|[A-Za-z0-9+/]=|==$/.test(k.substr(-2))===!1&&(C=!1),C},it=r.__addimage__.extractImageFromDataUrl=function(k){if(k==null||!(k=k.trim()).startsWith("data:"))return null;var C=k.indexOf(",");return C<0?null:k.substring(0,C).trim().endsWith("base64")?k.substring(C+1):null},ut=r.__addimage__.supportsArrayBuffer=function(){return typeof ArrayBuffer<"u"&&typeof Uint8Array<"u"};r.__addimage__.isArrayBuffer=function(k){return ut()&&k instanceof ArrayBuffer};var wt=r.__addimage__.isArrayBufferView=function(k){return ut()&&typeof Uint32Array<"u"&&(k instanceof Int8Array||k instanceof Uint8Array||typeof Uint8ClampedArray<"u"&&k instanceof Uint8ClampedArray||k instanceof Int16Array||k instanceof Uint16Array||k instanceof Int32Array||k instanceof Uint32Array||k instanceof Float32Array||k instanceof Float64Array)},tt=r.__addimage__.binaryStringToUint8Array=function(k){for(var C=k.length,W=new Uint8Array(C),R=0;R<C;R++)W[R]=k.charCodeAt(R);return W},z=r.__addimage__.arrayBufferToBinaryString=function(k){for(var C="",W=wt(k)?k:new Uint8Array(k),R=0;R<W.length;R+=8192)C+=String.fromCharCode.apply(null,W.subarray(R,R+8192));return C};r.addImage=function(){var k,C,W,R,st,at,ft,$,ht;if(typeof arguments[1]=="number"?(C=t,W=arguments[1],R=arguments[2],st=arguments[3],at=arguments[4],ft=arguments[5],$=arguments[6],ht=arguments[7]):(C=arguments[1],W=arguments[2],R=arguments[3],st=arguments[4],at=arguments[5],ft=arguments[6],$=arguments[7],ht=arguments[8]),he(k=arguments[0])==="object"&&!m(k)&&"imageData"in k){var dt=k;k=dt.imageData,C=dt.format||C||t,W=dt.x||W||0,R=dt.y||R||0,st=dt.w||dt.width||st,at=dt.h||dt.height||at,ft=dt.alias||ft,$=dt.compression||$,ht=dt.rotation||dt.angle||ht}var jt=this.internal.getFilters();if($===void 0&&jt.indexOf("FlateEncode")!==-1&&($="SLOW"),isNaN(W)||isNaN(R))throw new Error("Invalid coordinates passed to jsPDF.addImage");h.call(this);var A=nt.call(this,k,C,ft,$);return P.call(this,W,R,st,at,A,ht),this};var nt=function(k,C,W,R){var st,at,ft;if(typeof k=="string"&&i(k)===t){k=unescape(k);var $=pt(k,!1);($!==""||($=r.loadFile(k,!0))!==void 0)&&(k=$)}if(m(k)&&(k=w(k,C)),C=i(k,C),!v(C))throw new Error("addImage does not support files of type '"+C+"', please ensure that a plugin for '"+C+"' support is added.");if(((ft=W)==null||ft.length===0)&&(W=function(ht){return typeof ht=="string"||wt(ht)?B(ht):wt(ht.data)?B(ht.data):null}(k)),(st=p.call(this,W))||(ut()&&(k instanceof Uint8Array||C==="RGBA"||(at=k,k=tt(k))),st=this["process"+C.toUpperCase()](k,d.call(this),W,function(ht){return ht&&typeof ht=="string"&&(ht=ht.toUpperCase()),ht in r.image_compression?ht:_.NONE}(R),at)),!st)throw new Error("An unknown error occurred whilst processing the image.");return st},pt=r.__addimage__.convertBase64ToBinaryString=function(k,C){C=typeof C!="boolean"||C;var W,R="";if(typeof k=="string"){var st;W=(st=it(k))!==null&&st!==void 0?st:k;try{R=ga(W)}catch(at){if(C)throw G(W)?new Error("atob-Error in jsPDF.convertBase64ToBinaryString "+at.message):new Error("Supplied Data is not a valid base64-String jsPDF.convertBase64ToBinaryString ")}}return R};r.getImageProperties=function(k){var C,W,R="";if(m(k)&&(k=w(k)),typeof k=="string"&&i(k)===t&&((R=pt(k,!1))===""&&(R=r.loadFile(k)||""),k=R),W=i(k),!v(W))throw new Error("addImage does not support files of type '"+W+"', please ensure that a plugin for '"+W+"' support is added.");if(!ut()||k instanceof Uint8Array||(k=tt(k)),!(C=this["process"+W.toUpperCase()](k)))throw new Error("An unknown error occurred whilst processing the image");return C.fileType=W,C}})(zt.API),function(r){var t=function(e){if(e!==void 0&&e!="")return!0};zt.API.events.push(["addPage",function(e){this.internal.getPageInfo(e.pageNumber).pageContext.annotations=[]}]),r.events.push(["putPage",function(e){for(var i,o,a,u=this.internal.getCoordinateString,h=this.internal.getVerticalCoordinateString,f=this.internal.getPageInfoByObjId(e.objId),d=e.pageContext.annotations,v=!1,m=0;m<d.length&&!v;m++)switch((i=d[m]).type){case"link":(t(i.options.url)||t(i.options.pageNumber))&&(v=!0);break;case"reference":case"text":case"freetext":v=!0}if(v!=0){this.internal.write("/Annots [");for(var w=0;w<d.length;w++){i=d[w];var p=this.internal.pdfEscape,F=this.internal.getEncryptor(e.objId);switch(i.type){case"reference":this.internal.write(" "+i.object.objId+" 0 R ");break;case"text":var P=this.internal.newAdditionalObject(),D=this.internal.newAdditionalObject(),_=this.internal.getEncryptor(P.objId),B=i.title||"Note";a="<</Type /Annot /Subtype /Text "+(o="/Rect ["+u(i.bounds.x)+" "+h(i.bounds.y+i.bounds.h)+" "+u(i.bounds.x+i.bounds.w)+" "+h(i.bounds.y)+"] ")+"/Contents ("+p(_(i.contents))+")",a+=" /Popup "+D.objId+" 0 R",a+=" /P "+f.objId+" 0 R",a+=" /T ("+p(_(B))+") >>",P.content=a;var G=P.objId+" 0 R";a="<</Type /Annot /Subtype /Popup "+(o="/Rect ["+u(i.bounds.x+30)+" "+h(i.bounds.y+i.bounds.h)+" "+u(i.bounds.x+i.bounds.w+30)+" "+h(i.bounds.y)+"] ")+" /Parent "+G,i.open&&(a+=" /Open true"),a+=" >>",D.content=a,this.internal.write(P.objId,"0 R",D.objId,"0 R");break;case"freetext":o="/Rect ["+u(i.bounds.x)+" "+h(i.bounds.y)+" "+u(i.bounds.x+i.bounds.w)+" "+h(i.bounds.y+i.bounds.h)+"] ";var it=i.color||"#000000";a="<</Type /Annot /Subtype /FreeText "+o+"/Contents ("+p(F(i.contents))+")",a+=" /DS(font: Helvetica,sans-serif 12.0pt; text-align:left; color:#"+it+")",a+=" /Border [0 0 0]",a+=" >>",this.internal.write(a);break;case"link":if(i.options.name){var ut=this.annotations._nameMap[i.options.name];i.options.pageNumber=ut.page,i.options.top=ut.y}else i.options.top||(i.options.top=0);if(o="/Rect ["+i.finalBounds.x+" "+i.finalBounds.y+" "+i.finalBounds.w+" "+i.finalBounds.h+"] ",a="",i.options.url)a="<</Type /Annot /Subtype /Link "+o+"/Border [0 0 0] /A <</S /URI /URI ("+p(F(i.options.url))+") >>";else if(i.options.pageNumber)switch(a="<</Type /Annot /Subtype /Link "+o+"/Border [0 0 0] /Dest ["+this.internal.getPageInfo(i.options.pageNumber).objId+" 0 R",i.options.magFactor=i.options.magFactor||"XYZ",i.options.magFactor){case"Fit":a+=" /Fit]";break;case"FitH":a+=" /FitH "+i.options.top+"]";break;case"FitV":i.options.left=i.options.left||0,a+=" /FitV "+i.options.left+"]";break;case"XYZ":default:var wt=h(i.options.top);i.options.left=i.options.left||0,i.options.zoom===void 0&&(i.options.zoom=0),a+=" /XYZ "+i.options.left+" "+wt+" "+i.options.zoom+"]"}a!=""&&(a+=" >>",this.internal.write(a))}}this.internal.write("]")}}]),r.createAnnotation=function(e){var i=this.internal.getCurrentPageInfo();switch(e.type){case"link":this.link(e.bounds.x,e.bounds.y,e.bounds.w,e.bounds.h,e);break;case"text":case"freetext":i.pageContext.annotations.push(e)}},r.link=function(e,i,o,a,u){var h=this.internal.getCurrentPageInfo(),f=this.internal.getCoordinateString,d=this.internal.getVerticalCoordinateString;h.pageContext.annotations.push({finalBounds:{x:f(e),y:d(i),w:f(e+o),h:d(i+a)},options:u,type:"link"})},r.textWithLink=function(e,i,o,a){var u,h,f=this.getTextWidth(e),d=this.internal.getLineHeight()/this.internal.scaleFactor;if(a.maxWidth!==void 0){h=a.maxWidth;var v=this.splitTextToSize(e,h).length;u=Math.ceil(d*v)}else h=f,u=d;return this.text(e,i,o,a),o+=.2*d,a.align==="center"&&(i-=f/2),a.align==="right"&&(i-=f),this.link(i,o-d,h,u,a),f},r.getTextWidth=function(e){var i=this.internal.getFontSize();return this.getStringUnitWidth(e)*i/this.internal.scaleFactor}}(zt.API),function(r){var t={1569:[65152],1570:[65153,65154],1571:[65155,65156],1572:[65157,65158],1573:[65159,65160],1574:[65161,65162,65163,65164],1575:[65165,65166],1576:[65167,65168,65169,65170],1577:[65171,65172],1578:[65173,65174,65175,65176],1579:[65177,65178,65179,65180],1580:[65181,65182,65183,65184],1581:[65185,65186,65187,65188],1582:[65189,65190,65191,65192],1583:[65193,65194],1584:[65195,65196],1585:[65197,65198],1586:[65199,65200],1587:[65201,65202,65203,65204],1588:[65205,65206,65207,65208],1589:[65209,65210,65211,65212],1590:[65213,65214,65215,65216],1591:[65217,65218,65219,65220],1592:[65221,65222,65223,65224],1593:[65225,65226,65227,65228],1594:[65229,65230,65231,65232],1601:[65233,65234,65235,65236],1602:[65237,65238,65239,65240],1603:[65241,65242,65243,65244],1604:[65245,65246,65247,65248],1605:[65249,65250,65251,65252],1606:[65253,65254,65255,65256],1607:[65257,65258,65259,65260],1608:[65261,65262],1609:[65263,65264,64488,64489],1610:[65265,65266,65267,65268],1649:[64336,64337],1655:[64477],1657:[64358,64359,64360,64361],1658:[64350,64351,64352,64353],1659:[64338,64339,64340,64341],1662:[64342,64343,64344,64345],1663:[64354,64355,64356,64357],1664:[64346,64347,64348,64349],1667:[64374,64375,64376,64377],1668:[64370,64371,64372,64373],1670:[64378,64379,64380,64381],1671:[64382,64383,64384,64385],1672:[64392,64393],1676:[64388,64389],1677:[64386,64387],1678:[64390,64391],1681:[64396,64397],1688:[64394,64395],1700:[64362,64363,64364,64365],1702:[64366,64367,64368,64369],1705:[64398,64399,64400,64401],1709:[64467,64468,64469,64470],1711:[64402,64403,64404,64405],1713:[64410,64411,64412,64413],1715:[64406,64407,64408,64409],1722:[64414,64415],1723:[64416,64417,64418,64419],1726:[64426,64427,64428,64429],1728:[64420,64421],1729:[64422,64423,64424,64425],1733:[64480,64481],1734:[64473,64474],1735:[64471,64472],1736:[64475,64476],1737:[64482,64483],1739:[64478,64479],1740:[64508,64509,64510,64511],1744:[64484,64485,64486,64487],1746:[64430,64431],1747:[64432,64433]},e={65247:{65154:65269,65156:65271,65160:65273,65166:65275},65248:{65154:65270,65156:65272,65160:65274,65166:65276},65165:{65247:{65248:{65258:65010}}},1617:{1612:64606,1613:64607,1614:64608,1615:64609,1616:64610}},i={1612:64606,1613:64607,1614:64608,1615:64609,1616:64610},o=[1570,1571,1573,1575];r.__arabicParser__={};var a=r.__arabicParser__.isInArabicSubstitutionA=function(P){return t[P.charCodeAt(0)]!==void 0},u=r.__arabicParser__.isArabicLetter=function(P){return typeof P=="string"&&/^[\u0600-\u06FF\u0750-\u077F\u08A0-\u08FF\uFB50-\uFDFF\uFE70-\uFEFF]+$/.test(P)},h=r.__arabicParser__.isArabicEndLetter=function(P){return u(P)&&a(P)&&t[P.charCodeAt(0)].length<=2},f=r.__arabicParser__.isArabicAlfLetter=function(P){return u(P)&&o.indexOf(P.charCodeAt(0))>=0};r.__arabicParser__.arabicLetterHasIsolatedForm=function(P){return u(P)&&a(P)&&t[P.charCodeAt(0)].length>=1};var d=r.__arabicParser__.arabicLetterHasFinalForm=function(P){return u(P)&&a(P)&&t[P.charCodeAt(0)].length>=2};r.__arabicParser__.arabicLetterHasInitialForm=function(P){return u(P)&&a(P)&&t[P.charCodeAt(0)].length>=3};var v=r.__arabicParser__.arabicLetterHasMedialForm=function(P){return u(P)&&a(P)&&t[P.charCodeAt(0)].length==4},m=r.__arabicParser__.resolveLigatures=function(P){var D=0,_=e,B="",G=0;for(D=0;D<P.length;D+=1)_[P.charCodeAt(D)]!==void 0?(G++,typeof(_=_[P.charCodeAt(D)])=="number"&&(B+=String.fromCharCode(_),_=e,G=0),D===P.length-1&&(_=e,B+=P.charAt(D-(G-1)),D-=G-1,G=0)):(_=e,B+=P.charAt(D-G),D-=G,G=0);return B};r.__arabicParser__.isArabicDiacritic=function(P){return P!==void 0&&i[P.charCodeAt(0)]!==void 0};var w=r.__arabicParser__.getCorrectForm=function(P,D,_){return u(P)?a(P)===!1?-1:!d(P)||!u(D)&&!u(_)||!u(_)&&h(D)||h(P)&&!u(D)||h(P)&&f(D)||h(P)&&h(D)?0:v(P)&&u(D)&&!h(D)&&u(_)&&d(_)?3:h(P)||!u(_)?1:2:-1},p=function(P){var D=0,_=0,B=0,G="",it="",ut="",wt=(P=P||"").split("\\s+"),tt=[];for(D=0;D<wt.length;D+=1){for(tt.push(""),_=0;_<wt[D].length;_+=1)G=wt[D][_],it=wt[D][_-1],ut=wt[D][_+1],u(G)?(B=w(G,it,ut),tt[D]+=B!==-1?String.fromCharCode(t[G.charCodeAt(0)][B]):G):tt[D]+=G;tt[D]=m(tt[D])}return tt.join(" ")},F=r.__arabicParser__.processArabic=r.processArabic=function(){var P,D=typeof arguments[0]=="string"?arguments[0]:arguments[0].text,_=[];if(Array.isArray(D)){var B=0;for(_=[],B=0;B<D.length;B+=1)Array.isArray(D[B])?_.push([p(D[B][0]),D[B][1],D[B][2]]):_.push([p(D[B])]);P=_}else P=p(D);return typeof arguments[0]=="string"?P:(arguments[0].text=P,arguments[0])};r.events.push(["preProcessText",F])}(zt.API),zt.API.autoPrint=function(r){var t;switch((r=r||{}).variant=r.variant||"non-conform",r.variant){case"javascript":this.addJS("print({});");break;case"non-conform":default:this.internal.events.subscribe("postPutResources",function(){t=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/S /Named"),this.internal.out("/Type /Action"),this.internal.out("/N /Print"),this.internal.out(">>"),this.internal.out("endobj")}),this.internal.events.subscribe("putCatalog",function(){this.internal.out("/OpenAction "+t+" 0 R")})}return this},function(r){var t=function(){var e=void 0;Object.defineProperty(this,"pdf",{get:function(){return e},set:function(h){e=h}});var i=150;Object.defineProperty(this,"width",{get:function(){return i},set:function(h){i=isNaN(h)||Number.isInteger(h)===!1||h<0?150:h,this.getContext("2d").pageWrapXEnabled&&(this.getContext("2d").pageWrapX=i+1)}});var o=300;Object.defineProperty(this,"height",{get:function(){return o},set:function(h){o=isNaN(h)||Number.isInteger(h)===!1||h<0?300:h,this.getContext("2d").pageWrapYEnabled&&(this.getContext("2d").pageWrapY=o+1)}});var a=[];Object.defineProperty(this,"childNodes",{get:function(){return a},set:function(h){a=h}});var u={};Object.defineProperty(this,"style",{get:function(){return u},set:function(h){u=h}}),Object.defineProperty(this,"parentNode",{})};t.prototype.getContext=function(e,i){var o;if((e=e||"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},t.prototype.toDataURL=function(){throw new Error("toDataURL is not implemented.")},r.events.push(["initialized",function(){this.canvas=new t,this.canvas.pdf=this}])}(zt.API),function(r){var t={left:0,top:0,bottom:0,right:0},e=!1,i=function(){this.internal.__cell__===void 0&&(this.internal.__cell__={},this.internal.__cell__.padding=3,this.internal.__cell__.headerFunction=void 0,this.internal.__cell__.margins=Object.assign({},t),this.internal.__cell__.margins.width=this.getPageWidth(),o.call(this))},o=function(){this.internal.__cell__.lastCell=new a,this.internal.__cell__.pages=1},a=function(){var f=arguments[0];Object.defineProperty(this,"x",{enumerable:!0,get:function(){return f},set:function(P){f=P}});var d=arguments[1];Object.defineProperty(this,"y",{enumerable:!0,get:function(){return d},set:function(P){d=P}});var v=arguments[2];Object.defineProperty(this,"width",{enumerable:!0,get:function(){return v},set:function(P){v=P}});var m=arguments[3];Object.defineProperty(this,"height",{enumerable:!0,get:function(){return m},set:function(P){m=P}});var w=arguments[4];Object.defineProperty(this,"text",{enumerable:!0,get:function(){return w},set:function(P){w=P}});var p=arguments[5];Object.defineProperty(this,"lineNumber",{enumerable:!0,get:function(){return p},set:function(P){p=P}});var F=arguments[6];return Object.defineProperty(this,"align",{enumerable:!0,get:function(){return F},set:function(P){F=P}}),this};a.prototype.clone=function(){return new a(this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align)},a.prototype.toArray=function(){return[this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align]},r.setHeaderFunction=function(f){return i.call(this),this.internal.__cell__.headerFunction=typeof f=="function"?f:void 0,this},r.getTextDimensions=function(f,d){i.call(this);var v=(d=d||{}).fontSize||this.getFontSize(),m=d.font||this.getFont(),w=d.scaleFactor||this.internal.scaleFactor,p=0,F=0,P=0,D=this;if(!Array.isArray(f)&&typeof f!="string"){if(typeof f!="number")throw new Error("getTextDimensions expects text-parameter to be of type String or type Number or an Array of Strings.");f=String(f)}var _=d.maxWidth;_>0?typeof f=="string"?f=this.splitTextToSize(f,_):Object.prototype.toString.call(f)==="[object Array]"&&(f=f.reduce(function(G,it){return G.concat(D.splitTextToSize(it,_))},[])):f=Array.isArray(f)?f:[f];for(var B=0;B<f.length;B++)p<(P=this.getStringUnitWidth(f[B],{font:m})*v)&&(p=P);return p!==0&&(F=f.length),{w:p/=w,h:Math.max((F*v*this.getLineHeightFactor()-v*(this.getLineHeightFactor()-1))/w,0)}},r.cellAddPage=function(){i.call(this),this.addPage();var f=this.internal.__cell__.margins||t;return this.internal.__cell__.lastCell=new a(f.left,f.top,void 0,void 0),this.internal.__cell__.pages+=1,this};var u=r.cell=function(){var f;f=arguments[0]instanceof a?arguments[0]:new a(arguments[0],arguments[1],arguments[2],arguments[3],arguments[4],arguments[5]),i.call(this);var d=this.internal.__cell__.lastCell,v=this.internal.__cell__.padding,m=this.internal.__cell__.margins||t,w=this.internal.__cell__.tableHeaderRow,p=this.internal.__cell__.printHeaders;return d.lineNumber!==void 0&&(d.lineNumber===f.lineNumber?(f.x=(d.x||0)+(d.width||0),f.y=d.y||0):d.y+d.height+f.height+m.bottom>this.getPageHeight()?(this.cellAddPage(),f.y=m.top,p&&w&&(this.printHeaderRow(f.lineNumber,!0),f.y+=w[0].height)):f.y=d.y+d.height||f.y),f.text[0]!==void 0&&(this.rect(f.x,f.y,f.width,f.height,e===!0?"FD":void 0),f.align==="right"?this.text(f.text,f.x+f.width-v,f.y+v,{align:"right",baseline:"top"}):f.align==="center"?this.text(f.text,f.x+f.width/2,f.y+v,{align:"center",baseline:"top",maxWidth:f.width-v-v}):this.text(f.text,f.x+v,f.y+v,{align:"left",baseline:"top",maxWidth:f.width-v-v})),this.internal.__cell__.lastCell=f,this};r.table=function(f,d,v,m,w){if(i.call(this),!v)throw new Error("No data for PDF table.");var p,F,P,D,_=[],B=[],G=[],it={},ut={},wt=[],tt=[],z=(w=w||{}).autoSize||!1,nt=w.printHeaders!==!1,pt=w.css&&w.css["font-size"]!==void 0?16*w.css["font-size"]:w.fontSize||12,k=w.margins||Object.assign({width:this.getPageWidth()},t),C=typeof w.padding=="number"?w.padding:3,W=w.headerBackgroundColor||"#c8c8c8",R=w.headerTextColor||"#000";if(o.call(this),this.internal.__cell__.printHeaders=nt,this.internal.__cell__.margins=k,this.internal.__cell__.table_font_size=pt,this.internal.__cell__.padding=C,this.internal.__cell__.headerBackgroundColor=W,this.internal.__cell__.headerTextColor=R,this.setFontSize(pt),m==null)B=_=Object.keys(v[0]),G=_.map(function(){return"left"});else if(Array.isArray(m)&&he(m[0])==="object")for(_=m.map(function(dt){return dt.name}),B=m.map(function(dt){return dt.prompt||dt.name||""}),G=m.map(function(dt){return dt.align||"left"}),p=0;p<m.length;p+=1)ut[m[p].name]=m[p].width*(19.049976/25.4);else Array.isArray(m)&&typeof m[0]=="string"&&(B=_=m,G=_.map(function(){return"left"}));if(z||Array.isArray(m)&&typeof m[0]=="string")for(p=0;p<_.length;p+=1){for(it[D=_[p]]=v.map(function(dt){return dt[D]}),this.setFont(void 0,"bold"),wt.push(this.getTextDimensions(B[p],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w),F=it[D],this.setFont(void 0,"normal"),P=0;P<F.length;P+=1)wt.push(this.getTextDimensions(F[P],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w);ut[D]=Math.max.apply(null,wt)+C+C,wt=[]}if(nt){var st={};for(p=0;p<_.length;p+=1)st[_[p]]={},st[_[p]].text=B[p],st[_[p]].align=G[p];var at=h.call(this,st,ut);tt=_.map(function(dt){return new a(f,d,ut[dt],at,st[dt].text,void 0,st[dt].align)}),this.setTableHeaderRow(tt),this.printHeaderRow(1,!1)}var ft=m.reduce(function(dt,jt){return dt[jt.name]=jt.align,dt},{});for(p=0;p<v.length;p+=1){"rowStart"in w&&w.rowStart instanceof Function&&w.rowStart({row:p,data:v[p]},this);var $=h.call(this,v[p],ut);for(P=0;P<_.length;P+=1){var ht=v[p][_[P]];"cellStart"in w&&w.cellStart instanceof Function&&w.cellStart({row:p,col:P,data:ht},this),u.call(this,new a(f,d,ut[_[P]],$,ht,p+2,ft[_[P]]))}}return this.internal.__cell__.table_x=f,this.internal.__cell__.table_y=d,this};var h=function(f,d){var v=this.internal.__cell__.padding,m=this.internal.__cell__.table_font_size,w=this.internal.scaleFactor;return Object.keys(f).map(function(p){var F=f[p];return this.splitTextToSize(F.hasOwnProperty("text")?F.text:F,d[p]-v-v)},this).map(function(p){return this.getLineHeightFactor()*p.length*m/w+v+v},this).reduce(function(p,F){return Math.max(p,F)},0)};r.setTableHeaderRow=function(f){i.call(this),this.internal.__cell__.tableHeaderRow=f},r.printHeaderRow=function(f,d){if(i.call(this),!this.internal.__cell__.tableHeaderRow)throw new Error("Property tableHeaderRow does not exist.");var v;if(e=!0,typeof this.internal.__cell__.headerFunction=="function"){var m=this.internal.__cell__.headerFunction(this,this.internal.__cell__.pages);this.internal.__cell__.lastCell=new a(m[0],m[1],m[2],m[3],void 0,-1)}this.setFont(void 0,"bold");for(var w=[],p=0;p<this.internal.__cell__.tableHeaderRow.length;p+=1){v=this.internal.__cell__.tableHeaderRow[p].clone(),d&&(v.y=this.internal.__cell__.margins.top||0,w.push(v)),v.lineNumber=f;var F=this.getTextColor();this.setTextColor(this.internal.__cell__.headerTextColor),this.setFillColor(this.internal.__cell__.headerBackgroundColor),u.call(this,v),this.setTextColor(F)}w.length>0&&this.setTableHeaderRow(w),this.setFont(void 0,"normal"),e=!1}}(zt.API);var al={italic:["italic","oblique","normal"],oblique:["oblique","italic","normal"],normal:["normal","oblique","italic"]},ol=["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded"],Bs=il(ol),sl=[100,200,300,400,500,600,700,800,900],Eh=il(sl);function Ms(r){var t=r.family.replace(/"|'/g,"").toLowerCase(),e=function(a){return al[a=a||"normal"]?a:"normal"}(r.style),i=function(a){if(!a)return 400;if(typeof a=="number")return a>=100&&a<=900&&a%100==0?a:400;if(/^\d00$/.test(a))return parseInt(a);switch(a){case"bold":return 700;case"normal":default:return 400}}(r.weight),o=function(a){return typeof Bs[a=a||"normal"]=="number"?a:"normal"}(r.stretch);return{family:t,style:e,weight:i,stretch:o,src:r.src||[],ref:r.ref||{name:t,style:[o,e,i].join(" ")}}}function Nu(r,t,e,i){var o;for(o=e;o>=0&&o<t.length;o+=i)if(r[t[o]])return r[t[o]];for(o=e;o>=0&&o<t.length;o-=i)if(r[t[o]])return r[t[o]]}var Rh={"sans-serif":"helvetica",fixed:"courier",monospace:"courier",terminal:"courier",cursive:"times",fantasy:"times",serif:"times"},Su={caption:"times",icon:"times",menu:"times","message-box":"times","small-caption":"times","status-bar":"times"};function _u(r){return[r.stretch,r.style,r.weight,r.family].join(" ")}function Th(r,t,e){for(var i=(e=e||{}).defaultFontFamily||"times",o=Object.assign({},Rh,e.genericFontFamilies||{}),a=null,u=null,h=0;h<t.length;++h)if(o[(a=Ms(t[h])).family]&&(a.family=o[a.family]),r.hasOwnProperty(a.family)){u=r[a.family];break}if(!(u=u||r[i]))throw new Error("Could not find a font-family for the rule '"+_u(a)+"' and default family '"+i+"'.");if(u=function(f,d){if(d[f])return d[f];var v=Bs[f],m=v<=Bs.normal?-1:1,w=Nu(d,ol,v,m);if(!w)throw new Error("Could not find a matching font-stretch value for "+f);return w}(a.stretch,u),u=function(f,d){if(d[f])return d[f];for(var v=al[f],m=0;m<v.length;++m)if(d[v[m]])return d[v[m]];throw new Error("Could not find a matching font-style for "+f)}(a.style,u),!(u=function(f,d){if(d[f])return d[f];if(f===400&&d[500])return d[500];if(f===500&&d[400])return d[400];var v=Eh[f],m=Nu(d,sl,v,f<400?-1:1);if(!m)throw new Error("Could not find a matching font-weight for value "+f);return m}(a.weight,u)))throw new Error("Failed to resolve a font for the rule '"+_u(a)+"'.");return u}function Pu(r){return r.trimLeft()}function qh(r,t){for(var e=0;e<r.length;){if(r.charAt(e)===t)return[r.substring(0,e),r.substring(e+1)];e+=1}return null}function zh(r){var t=r.match(/^(-[a-z_]|[a-z_])[a-z0-9_-]*/i);return t===null?null:[t[0],r.substring(t[0].length)]}var ho,ku,Fu,ws=["times"];(function(r){var t,e,i,o,a,u,h,f,d,v=function(A){return A=A||{},this.isStrokeTransparent=A.isStrokeTransparent||!1,this.strokeOpacity=A.strokeOpacity||1,this.strokeStyle=A.strokeStyle||"#000000",this.fillStyle=A.fillStyle||"#000000",this.isFillTransparent=A.isFillTransparent||!1,this.fillOpacity=A.fillOpacity||1,this.font=A.font||"10px sans-serif",this.textBaseline=A.textBaseline||"alphabetic",this.textAlign=A.textAlign||"left",this.lineWidth=A.lineWidth||1,this.lineJoin=A.lineJoin||"miter",this.lineCap=A.lineCap||"butt",this.path=A.path||[],this.transform=A.transform!==void 0?A.transform.clone():new f,this.globalCompositeOperation=A.globalCompositeOperation||"normal",this.globalAlpha=A.globalAlpha||1,this.clip_path=A.clip_path||[],this.currentPoint=A.currentPoint||new u,this.miterLimit=A.miterLimit||10,this.lastPoint=A.lastPoint||new u,this.lineDashOffset=A.lineDashOffset||0,this.lineDash=A.lineDash||[],this.margin=A.margin||[0,0,0,0],this.prevPageLastElemOffset=A.prevPageLastElemOffset||0,this.ignoreClearRect=typeof A.ignoreClearRect!="boolean"||A.ignoreClearRect,this};r.events.push(["initialized",function(){this.context2d=new m(this),t=this.internal.f2,e=this.internal.getCoordinateString,i=this.internal.getVerticalCoordinateString,o=this.internal.getHorizontalCoordinate,a=this.internal.getVerticalCoordinate,u=this.internal.Point,h=this.internal.Rectangle,f=this.internal.Matrix,d=new v}]);var m=function(A){Object.defineProperty(this,"canvas",{get:function(){return{parentNode:!1,style:!1}}});var j=A;Object.defineProperty(this,"pdf",{get:function(){return j}});var M=!1;Object.defineProperty(this,"pageWrapXEnabled",{get:function(){return M},set:function(ct){M=!!ct}});var q=!1;Object.defineProperty(this,"pageWrapYEnabled",{get:function(){return q},set:function(ct){q=!!ct}});var J=0;Object.defineProperty(this,"posX",{get:function(){return J},set:function(ct){isNaN(ct)||(J=ct)}});var Q=0;Object.defineProperty(this,"posY",{get:function(){return Q},set:function(ct){isNaN(ct)||(Q=ct)}}),Object.defineProperty(this,"margin",{get:function(){return d.margin},set:function(ct){var E;typeof ct=="number"?E=[ct,ct,ct,ct]:((E=new Array(4))[0]=ct[0],E[1]=ct.length>=2?ct[1]:E[0],E[2]=ct.length>=3?ct[2]:E[0],E[3]=ct.length>=4?ct[3]:E[1]),d.margin=E}});var et=!1;Object.defineProperty(this,"autoPaging",{get:function(){return et},set:function(ct){et=ct}});var rt=0;Object.defineProperty(this,"lastBreak",{get:function(){return rt},set:function(ct){rt=ct}});var At=[];Object.defineProperty(this,"pageBreaks",{get:function(){return At},set:function(ct){At=ct}}),Object.defineProperty(this,"ctx",{get:function(){return d},set:function(ct){ct instanceof v&&(d=ct)}}),Object.defineProperty(this,"path",{get:function(){return d.path},set:function(ct){d.path=ct}});var Lt=[];Object.defineProperty(this,"ctxStack",{get:function(){return Lt},set:function(ct){Lt=ct}}),Object.defineProperty(this,"fillStyle",{get:function(){return this.ctx.fillStyle},set:function(ct){var E;E=w(ct),this.ctx.fillStyle=E.style,this.ctx.isFillTransparent=E.a===0,this.ctx.fillOpacity=E.a,this.pdf.setFillColor(E.r,E.g,E.b,{a:E.a}),this.pdf.setTextColor(E.r,E.g,E.b,{a:E.a})}}),Object.defineProperty(this,"strokeStyle",{get:function(){return this.ctx.strokeStyle},set:function(ct){var E=w(ct);this.ctx.strokeStyle=E.style,this.ctx.isStrokeTransparent=E.a===0,this.ctx.strokeOpacity=E.a,E.a===0?this.pdf.setDrawColor(255,255,255):(E.a,this.pdf.setDrawColor(E.r,E.g,E.b))}}),Object.defineProperty(this,"lineCap",{get:function(){return this.ctx.lineCap},set:function(ct){["butt","round","square"].indexOf(ct)!==-1&&(this.ctx.lineCap=ct,this.pdf.setLineCap(ct))}}),Object.defineProperty(this,"lineWidth",{get:function(){return this.ctx.lineWidth},set:function(ct){isNaN(ct)||(this.ctx.lineWidth=ct,this.pdf.setLineWidth(ct))}}),Object.defineProperty(this,"lineJoin",{get:function(){return this.ctx.lineJoin},set:function(ct){["bevel","round","miter"].indexOf(ct)!==-1&&(this.ctx.lineJoin=ct,this.pdf.setLineJoin(ct))}}),Object.defineProperty(this,"miterLimit",{get:function(){return this.ctx.miterLimit},set:function(ct){isNaN(ct)||(this.ctx.miterLimit=ct,this.pdf.setMiterLimit(ct))}}),Object.defineProperty(this,"textBaseline",{get:function(){return this.ctx.textBaseline},set:function(ct){this.ctx.textBaseline=ct}}),Object.defineProperty(this,"textAlign",{get:function(){return this.ctx.textAlign},set:function(ct){["right","end","center","left","start"].indexOf(ct)!==-1&&(this.ctx.textAlign=ct)}});var Ft=null;function _t(ct,E){if(Ft===null){var Kt=function(Mt){var xt=[];return Object.keys(Mt).forEach(function(Nt){Mt[Nt].forEach(function(Ct){var kt=null;switch(Ct){case"bold":kt={family:Nt,weight:"bold"};break;case"italic":kt={family:Nt,style:"italic"};break;case"bolditalic":kt={family:Nt,weight:"bold",style:"italic"};break;case"":case"normal":kt={family:Nt}}kt!==null&&(kt.ref={name:Nt,style:Ct},xt.push(kt))})}),xt}(ct.getFontList());Ft=function(Mt){for(var xt={},Nt=0;Nt<Mt.length;++Nt){var Ct=Ms(Mt[Nt]),kt=Ct.family,Et=Ct.stretch,Gt=Ct.style,Qt=Ct.weight;xt[kt]=xt[kt]||{},xt[kt][Et]=xt[kt][Et]||{},xt[kt][Et][Gt]=xt[kt][Et][Gt]||{},xt[kt][Et][Gt][Qt]=Ct}return xt}(Kt.concat(E))}return Ft}var Ut=null;Object.defineProperty(this,"fontFaces",{get:function(){return Ut},set:function(ct){Ft=null,Ut=ct}}),Object.defineProperty(this,"font",{get:function(){return this.ctx.font},set:function(ct){var E;if(this.ctx.font=ct,(E=/^\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-z]+?)\s*$/i.exec(ct))!==null){var Kt=E[1];E[2];var Mt=E[3],xt=E[4];E[5];var Nt=E[6],Ct=/^([.\d]+)((?:%|in|[cem]m|ex|p[ctx]))$/i.exec(xt)[2];xt=Math.floor(Ct==="px"?parseFloat(xt)*this.pdf.internal.scaleFactor:Ct==="em"?parseFloat(xt)*this.pdf.getFontSize():parseFloat(xt)*this.pdf.internal.scaleFactor),this.pdf.setFontSize(xt);var kt=function(Wt){var ee,It,Ye=[],oe=Wt.trim();if(oe==="")return ws;if(oe in Su)return[Su[oe]];for(;oe!=="";){switch(It=null,ee=(oe=Pu(oe)).charAt(0)){case'"':case"'":It=qh(oe.substring(1),ee);break;default:It=zh(oe)}if(It===null||(Ye.push(It[0]),(oe=Pu(It[1]))!==""&&oe.charAt(0)!==","))return ws;oe=oe.replace(/^,/,"")}return Ye}(Nt);if(this.fontFaces){var Et=Th(_t(this.pdf,this.fontFaces),kt.map(function(Wt){return{family:Wt,stretch:"normal",weight:Mt,style:Kt}}));this.pdf.setFont(Et.ref.name,Et.ref.style)}else{var Gt="";(Mt==="bold"||parseInt(Mt,10)>=700||Kt==="bold")&&(Gt="bold"),Kt==="italic"&&(Gt+="italic"),Gt.length===0&&(Gt="normal");for(var Qt="",te={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"},ie=0;ie<kt.length;ie++){if(this.pdf.internal.getFont(kt[ie],Gt,{noFallback:!0,disableWarning:!0})!==void 0){Qt=kt[ie];break}if(Gt==="bolditalic"&&this.pdf.internal.getFont(kt[ie],"bold",{noFallback:!0,disableWarning:!0})!==void 0)Qt=kt[ie],Gt="bold";else if(this.pdf.internal.getFont(kt[ie],"normal",{noFallback:!0,disableWarning:!0})!==void 0){Qt=kt[ie],Gt="normal";break}}if(Qt===""){for(var de=0;de<kt.length;de++)if(te[kt[de]]){Qt=te[kt[de]];break}}Qt=Qt===""?"Times":Qt,this.pdf.setFont(Qt,Gt)}}}}),Object.defineProperty(this,"globalCompositeOperation",{get:function(){return this.ctx.globalCompositeOperation},set:function(ct){this.ctx.globalCompositeOperation=ct}}),Object.defineProperty(this,"globalAlpha",{get:function(){return this.ctx.globalAlpha},set:function(ct){this.ctx.globalAlpha=ct}}),Object.defineProperty(this,"lineDashOffset",{get:function(){return this.ctx.lineDashOffset},set:function(ct){this.ctx.lineDashOffset=ct,jt.call(this)}}),Object.defineProperty(this,"lineDash",{get:function(){return this.ctx.lineDash},set:function(ct){this.ctx.lineDash=ct,jt.call(this)}}),Object.defineProperty(this,"ignoreClearRect",{get:function(){return this.ctx.ignoreClearRect},set:function(ct){this.ctx.ignoreClearRect=!!ct}})};m.prototype.setLineDash=function(A){this.lineDash=A},m.prototype.getLineDash=function(){return this.lineDash.length%2?this.lineDash.concat(this.lineDash):this.lineDash.slice()},m.prototype.fill=function(){it.call(this,"fill",!1)},m.prototype.stroke=function(){it.call(this,"stroke",!1)},m.prototype.beginPath=function(){this.path=[{type:"begin"}]},m.prototype.moveTo=function(A,j){if(isNaN(A)||isNaN(j))throw me.error("jsPDF.context2d.moveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.moveTo");var M=this.ctx.transform.applyToPoint(new u(A,j));this.path.push({type:"mt",x:M.x,y:M.y}),this.ctx.lastPoint=new u(A,j)},m.prototype.closePath=function(){var A=new u(0,0),j=0;for(j=this.path.length-1;j!==-1;j--)if(this.path[j].type==="begin"&&he(this.path[j+1])==="object"&&typeof this.path[j+1].x=="number"){A=new u(this.path[j+1].x,this.path[j+1].y);break}this.path.push({type:"close"}),this.ctx.lastPoint=new u(A.x,A.y)},m.prototype.lineTo=function(A,j){if(isNaN(A)||isNaN(j))throw me.error("jsPDF.context2d.lineTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.lineTo");var M=this.ctx.transform.applyToPoint(new u(A,j));this.path.push({type:"lt",x:M.x,y:M.y}),this.ctx.lastPoint=new u(M.x,M.y)},m.prototype.clip=function(){this.ctx.clip_path=JSON.parse(JSON.stringify(this.path)),it.call(this,null,!0)},m.prototype.quadraticCurveTo=function(A,j,M,q){if(isNaN(M)||isNaN(q)||isNaN(A)||isNaN(j))throw me.error("jsPDF.context2d.quadraticCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.quadraticCurveTo");var J=this.ctx.transform.applyToPoint(new u(M,q)),Q=this.ctx.transform.applyToPoint(new u(A,j));this.path.push({type:"qct",x1:Q.x,y1:Q.y,x:J.x,y:J.y}),this.ctx.lastPoint=new u(J.x,J.y)},m.prototype.bezierCurveTo=function(A,j,M,q,J,Q){if(isNaN(J)||isNaN(Q)||isNaN(A)||isNaN(j)||isNaN(M)||isNaN(q))throw me.error("jsPDF.context2d.bezierCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.bezierCurveTo");var et=this.ctx.transform.applyToPoint(new u(J,Q)),rt=this.ctx.transform.applyToPoint(new u(A,j)),At=this.ctx.transform.applyToPoint(new u(M,q));this.path.push({type:"bct",x1:rt.x,y1:rt.y,x2:At.x,y2:At.y,x:et.x,y:et.y}),this.ctx.lastPoint=new u(et.x,et.y)},m.prototype.arc=function(A,j,M,q,J,Q){if(isNaN(A)||isNaN(j)||isNaN(M)||isNaN(q)||isNaN(J))throw me.error("jsPDF.context2d.arc: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.arc");if(Q=!!Q,!this.ctx.transform.isIdentity){var et=this.ctx.transform.applyToPoint(new u(A,j));A=et.x,j=et.y;var rt=this.ctx.transform.applyToPoint(new u(0,M)),At=this.ctx.transform.applyToPoint(new u(0,0));M=Math.sqrt(Math.pow(rt.x-At.x,2)+Math.pow(rt.y-At.y,2))}Math.abs(J-q)>=2*Math.PI&&(q=0,J=2*Math.PI),this.path.push({type:"arc",x:A,y:j,radius:M,startAngle:q,endAngle:J,counterclockwise:Q})},m.prototype.arcTo=function(A,j,M,q,J){throw new Error("arcTo not implemented.")},m.prototype.rect=function(A,j,M,q){if(isNaN(A)||isNaN(j)||isNaN(M)||isNaN(q))throw me.error("jsPDF.context2d.rect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rect");this.moveTo(A,j),this.lineTo(A+M,j),this.lineTo(A+M,j+q),this.lineTo(A,j+q),this.lineTo(A,j),this.lineTo(A+M,j),this.lineTo(A,j)},m.prototype.fillRect=function(A,j,M,q){if(isNaN(A)||isNaN(j)||isNaN(M)||isNaN(q))throw me.error("jsPDF.context2d.fillRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillRect");if(!p.call(this)){var J={};this.lineCap!=="butt"&&(J.lineCap=this.lineCap,this.lineCap="butt"),this.lineJoin!=="miter"&&(J.lineJoin=this.lineJoin,this.lineJoin="miter"),this.beginPath(),this.rect(A,j,M,q),this.fill(),J.hasOwnProperty("lineCap")&&(this.lineCap=J.lineCap),J.hasOwnProperty("lineJoin")&&(this.lineJoin=J.lineJoin)}},m.prototype.strokeRect=function(A,j,M,q){if(isNaN(A)||isNaN(j)||isNaN(M)||isNaN(q))throw me.error("jsPDF.context2d.strokeRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeRect");F.call(this)||(this.beginPath(),this.rect(A,j,M,q),this.stroke())},m.prototype.clearRect=function(A,j,M,q){if(isNaN(A)||isNaN(j)||isNaN(M)||isNaN(q))throw me.error("jsPDF.context2d.clearRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.clearRect");this.ignoreClearRect||(this.fillStyle="#ffffff",this.fillRect(A,j,M,q))},m.prototype.save=function(A){A=typeof A!="boolean"||A;for(var j=this.pdf.internal.getCurrentPageInfo().pageNumber,M=0;M<this.pdf.internal.getNumberOfPages();M++)this.pdf.setPage(M+1),this.pdf.internal.out("q");if(this.pdf.setPage(j),A){this.ctx.fontSize=this.pdf.internal.getFontSize();var q=new v(this.ctx);this.ctxStack.push(this.ctx),this.ctx=q}},m.prototype.restore=function(A){A=typeof A!="boolean"||A;for(var j=this.pdf.internal.getCurrentPageInfo().pageNumber,M=0;M<this.pdf.internal.getNumberOfPages();M++)this.pdf.setPage(M+1),this.pdf.internal.out("Q");this.pdf.setPage(j),A&&this.ctxStack.length!==0&&(this.ctx=this.ctxStack.pop(),this.fillStyle=this.ctx.fillStyle,this.strokeStyle=this.ctx.strokeStyle,this.font=this.ctx.font,this.lineCap=this.ctx.lineCap,this.lineWidth=this.ctx.lineWidth,this.lineJoin=this.ctx.lineJoin,this.lineDash=this.ctx.lineDash,this.lineDashOffset=this.ctx.lineDashOffset)},m.prototype.toDataURL=function(){throw new Error("toDataUrl not implemented.")};var w=function(A){var j,M,q,J;if(A.isCanvasGradient===!0&&(A=A.getColor()),!A)return{r:0,g:0,b:0,a:0,style:A};if(/transparent|rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*0+\s*\)/.test(A))j=0,M=0,q=0,J=0;else{var Q=/rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/.exec(A);if(Q!==null)j=parseInt(Q[1]),M=parseInt(Q[2]),q=parseInt(Q[3]),J=1;else if((Q=/rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)/.exec(A))!==null)j=parseInt(Q[1]),M=parseInt(Q[2]),q=parseInt(Q[3]),J=parseFloat(Q[4]);else{if(J=1,typeof A=="string"&&A.charAt(0)!=="#"){var et=new $u(A);A=et.ok?et.toHex():"#000000"}A.length===4?(j=A.substring(1,2),j+=j,M=A.substring(2,3),M+=M,q=A.substring(3,4),q+=q):(j=A.substring(1,3),M=A.substring(3,5),q=A.substring(5,7)),j=parseInt(j,16),M=parseInt(M,16),q=parseInt(q,16)}}return{r:j,g:M,b:q,a:J,style:A}},p=function(){return this.ctx.isFillTransparent||this.globalAlpha==0},F=function(){return!!(this.ctx.isStrokeTransparent||this.globalAlpha==0)};m.prototype.fillText=function(A,j,M,q){if(isNaN(j)||isNaN(M)||typeof A!="string")throw me.error("jsPDF.context2d.fillText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillText");if(q=isNaN(q)?void 0:q,!p.call(this)){var J=$(this.ctx.transform.rotation),Q=this.ctx.transform.scaleX;C.call(this,{text:A,x:j,y:M,scale:Q,angle:J,align:this.textAlign,maxWidth:q})}},m.prototype.strokeText=function(A,j,M,q){if(isNaN(j)||isNaN(M)||typeof A!="string")throw me.error("jsPDF.context2d.strokeText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeText");if(!F.call(this)){q=isNaN(q)?void 0:q;var J=$(this.ctx.transform.rotation),Q=this.ctx.transform.scaleX;C.call(this,{text:A,x:j,y:M,scale:Q,renderingMode:"stroke",angle:J,align:this.textAlign,maxWidth:q})}},m.prototype.measureText=function(A){if(typeof A!="string")throw me.error("jsPDF.context2d.measureText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.measureText");var j=this.pdf,M=this.pdf.internal.scaleFactor,q=j.internal.getFontSize(),J=j.getStringUnitWidth(A)*q/j.internal.scaleFactor,Q=function(et){var rt=(et=et||{}).width||0;return Object.defineProperty(this,"width",{get:function(){return rt}}),this};return new Q({width:J*=Math.round(96*M/72*1e4)/1e4})},m.prototype.scale=function(A,j){if(isNaN(A)||isNaN(j))throw me.error("jsPDF.context2d.scale: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.scale");var M=new f(A,0,0,j,0,0);this.ctx.transform=this.ctx.transform.multiply(M)},m.prototype.rotate=function(A){if(isNaN(A))throw me.error("jsPDF.context2d.rotate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rotate");var j=new f(Math.cos(A),Math.sin(A),-Math.sin(A),Math.cos(A),0,0);this.ctx.transform=this.ctx.transform.multiply(j)},m.prototype.translate=function(A,j){if(isNaN(A)||isNaN(j))throw me.error("jsPDF.context2d.translate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.translate");var M=new f(1,0,0,1,A,j);this.ctx.transform=this.ctx.transform.multiply(M)},m.prototype.transform=function(A,j,M,q,J,Q){if(isNaN(A)||isNaN(j)||isNaN(M)||isNaN(q)||isNaN(J)||isNaN(Q))throw me.error("jsPDF.context2d.transform: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.transform");var et=new f(A,j,M,q,J,Q);this.ctx.transform=this.ctx.transform.multiply(et)},m.prototype.setTransform=function(A,j,M,q,J,Q){A=isNaN(A)?1:A,j=isNaN(j)?0:j,M=isNaN(M)?0:M,q=isNaN(q)?1:q,J=isNaN(J)?0:J,Q=isNaN(Q)?0:Q,this.ctx.transform=new f(A,j,M,q,J,Q)};var P=function(){return this.margin[0]>0||this.margin[1]>0||this.margin[2]>0||this.margin[3]>0};m.prototype.drawImage=function(A,j,M,q,J,Q,et,rt,At){var Lt=this.pdf.getImageProperties(A),Ft=1,_t=1,Ut=1,ct=1;q!==void 0&&rt!==void 0&&(Ut=rt/q,ct=At/J,Ft=Lt.width/q*rt/q,_t=Lt.height/J*At/J),Q===void 0&&(Q=j,et=M,j=0,M=0),q!==void 0&&rt===void 0&&(rt=q,At=J),q===void 0&&rt===void 0&&(rt=Lt.width,At=Lt.height);for(var E,Kt=this.ctx.transform.decompose(),Mt=$(Kt.rotate.shx),xt=new f,Nt=(xt=(xt=(xt=xt.multiply(Kt.translate)).multiply(Kt.skew)).multiply(Kt.scale)).applyToRectangle(new h(Q-j*Ut,et-M*ct,q*Ft,J*_t)),Ct=D.call(this,Nt),kt=[],Et=0;Et<Ct.length;Et+=1)kt.indexOf(Ct[Et])===-1&&kt.push(Ct[Et]);if(G(kt),this.autoPaging)for(var Gt=kt[0],Qt=kt[kt.length-1],te=Gt;te<Qt+1;te++){this.pdf.setPage(te);var ie=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],de=te===1?this.posY+this.margin[0]:this.margin[0],Wt=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],ee=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],It=te===1?0:Wt+(te-2)*ee;if(this.ctx.clip_path.length!==0){var Ye=this.path;E=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=B(E,this.posX+this.margin[3],-It+de+this.ctx.prevPageLastElemOffset),ut.call(this,"fill",!0),this.path=Ye}var oe=JSON.parse(JSON.stringify(Nt));oe=B([oe],this.posX+this.margin[3],-It+de+this.ctx.prevPageLastElemOffset)[0];var Sr=(te>Gt||te<Qt)&&P.call(this);Sr&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],ie,ee,null).clip().discardPath()),this.pdf.addImage(A,"JPEG",oe.x,oe.y,oe.w,oe.h,null,null,Mt),Sr&&this.pdf.restoreGraphicsState()}else this.pdf.addImage(A,"JPEG",Nt.x,Nt.y,Nt.w,Nt.h,null,null,Mt)};var D=function(A,j,M){var q=[];j=j||this.pdf.internal.pageSize.width,M=M||this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2];var J=this.posY+this.ctx.prevPageLastElemOffset;switch(A.type){default:case"mt":case"lt":q.push(Math.floor((A.y+J)/M)+1);break;case"arc":q.push(Math.floor((A.y+J-A.radius)/M)+1),q.push(Math.floor((A.y+J+A.radius)/M)+1);break;case"qct":var Q=ht(this.ctx.lastPoint.x,this.ctx.lastPoint.y,A.x1,A.y1,A.x,A.y);q.push(Math.floor((Q.y+J)/M)+1),q.push(Math.floor((Q.y+Q.h+J)/M)+1);break;case"bct":var et=dt(this.ctx.lastPoint.x,this.ctx.lastPoint.y,A.x1,A.y1,A.x2,A.y2,A.x,A.y);q.push(Math.floor((et.y+J)/M)+1),q.push(Math.floor((et.y+et.h+J)/M)+1);break;case"rect":q.push(Math.floor((A.y+J)/M)+1),q.push(Math.floor((A.y+A.h+J)/M)+1)}for(var rt=0;rt<q.length;rt+=1)for(;this.pdf.internal.getNumberOfPages()<q[rt];)_.call(this);return q},_=function(){var A=this.fillStyle,j=this.strokeStyle,M=this.font,q=this.lineCap,J=this.lineWidth,Q=this.lineJoin;this.pdf.addPage(),this.fillStyle=A,this.strokeStyle=j,this.font=M,this.lineCap=q,this.lineWidth=J,this.lineJoin=Q},B=function(A,j,M){for(var q=0;q<A.length;q++)switch(A[q].type){case"bct":A[q].x2+=j,A[q].y2+=M;case"qct":A[q].x1+=j,A[q].y1+=M;case"mt":case"lt":case"arc":default:A[q].x+=j,A[q].y+=M}return A},G=function(A){return A.sort(function(j,M){return j-M})},it=function(A,j){for(var M,q,J=this.fillStyle,Q=this.strokeStyle,et=this.lineCap,rt=this.lineWidth,At=Math.abs(rt*this.ctx.transform.scaleX),Lt=this.lineJoin,Ft=JSON.parse(JSON.stringify(this.path)),_t=JSON.parse(JSON.stringify(this.path)),Ut=[],ct=0;ct<_t.length;ct++)if(_t[ct].x!==void 0)for(var E=D.call(this,_t[ct]),Kt=0;Kt<E.length;Kt+=1)Ut.indexOf(E[Kt])===-1&&Ut.push(E[Kt]);for(var Mt=0;Mt<Ut.length;Mt++)for(;this.pdf.internal.getNumberOfPages()<Ut[Mt];)_.call(this);if(G(Ut),this.autoPaging)for(var xt=Ut[0],Nt=Ut[Ut.length-1],Ct=xt;Ct<Nt+1;Ct++){this.pdf.setPage(Ct),this.fillStyle=J,this.strokeStyle=Q,this.lineCap=et,this.lineWidth=At,this.lineJoin=Lt;var kt=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],Et=Ct===1?this.posY+this.margin[0]:this.margin[0],Gt=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],Qt=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],te=Ct===1?0:Gt+(Ct-2)*Qt;if(this.ctx.clip_path.length!==0){var ie=this.path;M=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=B(M,this.posX+this.margin[3],-te+Et+this.ctx.prevPageLastElemOffset),ut.call(this,A,!0),this.path=ie}if(q=JSON.parse(JSON.stringify(Ft)),this.path=B(q,this.posX+this.margin[3],-te+Et+this.ctx.prevPageLastElemOffset),j===!1||Ct===0){var de=(Ct>xt||Ct<Nt)&&P.call(this);de&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],kt,Qt,null).clip().discardPath()),ut.call(this,A,j),de&&this.pdf.restoreGraphicsState()}this.lineWidth=rt}else this.lineWidth=At,ut.call(this,A,j),this.lineWidth=rt;this.path=Ft},ut=function(A,j){if((A!=="stroke"||j||!F.call(this))&&(A==="stroke"||j||!p.call(this))){for(var M,q,J=[],Q=this.path,et=0;et<Q.length;et++){var rt=Q[et];switch(rt.type){case"begin":J.push({begin:!0});break;case"close":J.push({close:!0});break;case"mt":J.push({start:rt,deltas:[],abs:[]});break;case"lt":var At=J.length;if(Q[et-1]&&!isNaN(Q[et-1].x)&&(M=[rt.x-Q[et-1].x,rt.y-Q[et-1].y],At>0)){for(;At>=0;At--)if(J[At-1].close!==!0&&J[At-1].begin!==!0){J[At-1].deltas.push(M),J[At-1].abs.push(rt);break}}break;case"bct":M=[rt.x1-Q[et-1].x,rt.y1-Q[et-1].y,rt.x2-Q[et-1].x,rt.y2-Q[et-1].y,rt.x-Q[et-1].x,rt.y-Q[et-1].y],J[J.length-1].deltas.push(M);break;case"qct":var Lt=Q[et-1].x+2/3*(rt.x1-Q[et-1].x),Ft=Q[et-1].y+2/3*(rt.y1-Q[et-1].y),_t=rt.x+2/3*(rt.x1-rt.x),Ut=rt.y+2/3*(rt.y1-rt.y),ct=rt.x,E=rt.y;M=[Lt-Q[et-1].x,Ft-Q[et-1].y,_t-Q[et-1].x,Ut-Q[et-1].y,ct-Q[et-1].x,E-Q[et-1].y],J[J.length-1].deltas.push(M);break;case"arc":J.push({deltas:[],abs:[],arc:!0}),Array.isArray(J[J.length-1].abs)&&J[J.length-1].abs.push(rt)}}q=j?null:A==="stroke"?"stroke":"fill";for(var Kt=!1,Mt=0;Mt<J.length;Mt++)if(J[Mt].arc)for(var xt=J[Mt].abs,Nt=0;Nt<xt.length;Nt++){var Ct=xt[Nt];Ct.type==="arc"?z.call(this,Ct.x,Ct.y,Ct.radius,Ct.startAngle,Ct.endAngle,Ct.counterclockwise,void 0,j,!Kt):W.call(this,Ct.x,Ct.y),Kt=!0}else if(J[Mt].close===!0)this.pdf.internal.out("h"),Kt=!1;else if(J[Mt].begin!==!0){var kt=J[Mt].start.x,Et=J[Mt].start.y;R.call(this,J[Mt].deltas,kt,Et),Kt=!0}q&&nt.call(this,q),j&&pt.call(this)}},wt=function(A){var j=this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor,M=j*(this.pdf.internal.getLineHeightFactor()-1);switch(this.ctx.textBaseline){case"bottom":return A-M;case"top":return A+j-M;case"hanging":return A+j-2*M;case"middle":return A+j/2-M;case"ideographic":return A;case"alphabetic":default:return A}},tt=function(A){return A+this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor*(this.pdf.internal.getLineHeightFactor()-1)};m.prototype.createLinearGradient=function(){var A=function(){};return A.colorStops=[],A.addColorStop=function(j,M){this.colorStops.push([j,M])},A.getColor=function(){return this.colorStops.length===0?"#000000":this.colorStops[0][1]},A.isCanvasGradient=!0,A},m.prototype.createPattern=function(){return this.createLinearGradient()},m.prototype.createRadialGradient=function(){return this.createLinearGradient()};var z=function(A,j,M,q,J,Q,et,rt,At){for(var Lt=at.call(this,M,q,J,Q),Ft=0;Ft<Lt.length;Ft++){var _t=Lt[Ft];Ft===0&&(At?k.call(this,_t.x1+A,_t.y1+j):W.call(this,_t.x1+A,_t.y1+j)),st.call(this,A,j,_t.x2,_t.y2,_t.x3,_t.y3,_t.x4,_t.y4)}rt?pt.call(this):nt.call(this,et)},nt=function(A){switch(A){case"stroke":this.pdf.internal.out("S");break;case"fill":this.pdf.internal.out("f")}},pt=function(){this.pdf.clip(),this.pdf.discardPath()},k=function(A,j){this.pdf.internal.out(e(A)+" "+i(j)+" m")},C=function(A){var j;switch(A.align){case"right":case"end":j="right";break;case"center":j="center";break;case"left":case"start":default:j="left"}var M=this.pdf.getTextDimensions(A.text),q=wt.call(this,A.y),J=tt.call(this,q)-M.h,Q=this.ctx.transform.applyToPoint(new u(A.x,q)),et=this.ctx.transform.decompose(),rt=new f;rt=(rt=(rt=rt.multiply(et.translate)).multiply(et.skew)).multiply(et.scale);for(var At,Lt,Ft,_t=this.ctx.transform.applyToRectangle(new h(A.x,q,M.w,M.h)),Ut=rt.applyToRectangle(new h(A.x,J,M.w,M.h)),ct=D.call(this,Ut),E=[],Kt=0;Kt<ct.length;Kt+=1)E.indexOf(ct[Kt])===-1&&E.push(ct[Kt]);if(G(E),this.autoPaging)for(var Mt=E[0],xt=E[E.length-1],Nt=Mt;Nt<xt+1;Nt++){this.pdf.setPage(Nt);var Ct=Nt===1?this.posY+this.margin[0]:this.margin[0],kt=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],Et=this.pdf.internal.pageSize.height-this.margin[2],Gt=Et-this.margin[0],Qt=this.pdf.internal.pageSize.width-this.margin[1],te=Qt-this.margin[3],ie=Nt===1?0:kt+(Nt-2)*Gt;if(this.ctx.clip_path.length!==0){var de=this.path;At=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=B(At,this.posX+this.margin[3],-1*ie+Ct),ut.call(this,"fill",!0),this.path=de}var Wt=B([JSON.parse(JSON.stringify(Ut))],this.posX+this.margin[3],-ie+Ct+this.ctx.prevPageLastElemOffset)[0];A.scale>=.01&&(Lt=this.pdf.internal.getFontSize(),this.pdf.setFontSize(Lt*A.scale),Ft=this.lineWidth,this.lineWidth=Ft*A.scale);var ee=this.autoPaging!=="text";if(ee||Wt.y+Wt.h<=Et){if(ee||Wt.y>=Ct&&Wt.x<=Qt){var It=ee?A.text:this.pdf.splitTextToSize(A.text,A.maxWidth||Qt-Wt.x)[0],Ye=B([JSON.parse(JSON.stringify(_t))],this.posX+this.margin[3],-ie+Ct+this.ctx.prevPageLastElemOffset)[0],oe=ee&&(Nt>Mt||Nt<xt)&&P.call(this);oe&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],te,Gt,null).clip().discardPath()),this.pdf.text(It,Ye.x,Ye.y,{angle:A.angle,align:j,renderingMode:A.renderingMode}),oe&&this.pdf.restoreGraphicsState()}}else Wt.y<Et&&(this.ctx.prevPageLastElemOffset+=Et-Wt.y);A.scale>=.01&&(this.pdf.setFontSize(Lt),this.lineWidth=Ft)}else A.scale>=.01&&(Lt=this.pdf.internal.getFontSize(),this.pdf.setFontSize(Lt*A.scale),Ft=this.lineWidth,this.lineWidth=Ft*A.scale),this.pdf.text(A.text,Q.x+this.posX,Q.y+this.posY,{angle:A.angle,align:j,renderingMode:A.renderingMode,maxWidth:A.maxWidth}),A.scale>=.01&&(this.pdf.setFontSize(Lt),this.lineWidth=Ft)},W=function(A,j,M,q){M=M||0,q=q||0,this.pdf.internal.out(e(A+M)+" "+i(j+q)+" l")},R=function(A,j,M){return this.pdf.lines(A,j,M,null,null)},st=function(A,j,M,q,J,Q,et,rt){this.pdf.internal.out([t(o(M+A)),t(a(q+j)),t(o(J+A)),t(a(Q+j)),t(o(et+A)),t(a(rt+j)),"c"].join(" "))},at=function(A,j,M,q){for(var J=2*Math.PI,Q=Math.PI/2;j>M;)j-=J;var et=Math.abs(M-j);et<J&&q&&(et=J-et);for(var rt=[],At=q?-1:1,Lt=j;et>1e-5;){var Ft=Lt+At*Math.min(et,Q);rt.push(ft.call(this,A,Lt,Ft)),et-=Math.abs(Ft-Lt),Lt=Ft}return rt},ft=function(A,j,M){var q=(M-j)/2,J=A*Math.cos(q),Q=A*Math.sin(q),et=J,rt=-Q,At=et*et+rt*rt,Lt=At+et*J+rt*Q,Ft=4/3*(Math.sqrt(2*At*Lt)-Lt)/(et*Q-rt*J),_t=et-Ft*rt,Ut=rt+Ft*et,ct=_t,E=-Ut,Kt=q+j,Mt=Math.cos(Kt),xt=Math.sin(Kt);return{x1:A*Math.cos(j),y1:A*Math.sin(j),x2:_t*Mt-Ut*xt,y2:_t*xt+Ut*Mt,x3:ct*Mt-E*xt,y3:ct*xt+E*Mt,x4:A*Math.cos(M),y4:A*Math.sin(M)}},$=function(A){return 180*A/Math.PI},ht=function(A,j,M,q,J,Q){var et=A+.5*(M-A),rt=j+.5*(q-j),At=J+.5*(M-J),Lt=Q+.5*(q-Q),Ft=Math.min(A,J,et,At),_t=Math.max(A,J,et,At),Ut=Math.min(j,Q,rt,Lt),ct=Math.max(j,Q,rt,Lt);return new h(Ft,Ut,_t-Ft,ct-Ut)},dt=function(A,j,M,q,J,Q,et,rt){var At,Lt,Ft,_t,Ut,ct,E,Kt,Mt,xt,Nt,Ct,kt,Et,Gt=M-A,Qt=q-j,te=J-M,ie=Q-q,de=et-J,Wt=rt-Q;for(Lt=0;Lt<41;Lt++)Mt=(E=(Ft=A+(At=Lt/40)*Gt)+At*((Ut=M+At*te)-Ft))+At*(Ut+At*(J+At*de-Ut)-E),xt=(Kt=(_t=j+At*Qt)+At*((ct=q+At*ie)-_t))+At*(ct+At*(Q+At*Wt-ct)-Kt),Lt==0?(Nt=Mt,Ct=xt,kt=Mt,Et=xt):(Nt=Math.min(Nt,Mt),Ct=Math.min(Ct,xt),kt=Math.max(kt,Mt),Et=Math.max(Et,xt));return new h(Math.round(Nt),Math.round(Ct),Math.round(kt-Nt),Math.round(Et-Ct))},jt=function(){if(this.prevLineDash||this.ctx.lineDash.length||this.ctx.lineDashOffset){var A,j,M=(A=this.ctx.lineDash,j=this.ctx.lineDashOffset,JSON.stringify({lineDash:A,lineDashOffset:j}));this.prevLineDash!==M&&(this.pdf.setLineDash(this.ctx.lineDash,this.ctx.lineDashOffset),this.prevLineDash=M)}}})(zt.API),function(r){var t=function(a){var u,h,f,d,v,m,w,p,F,P;for(h=[],f=0,d=(a+=u="\0\0\0\0".slice(a.length%4||4)).length;d>f;f+=4)(v=(a.charCodeAt(f)<<24)+(a.charCodeAt(f+1)<<16)+(a.charCodeAt(f+2)<<8)+a.charCodeAt(f+3))!==0?(m=(v=((v=((v=((v=(v-(P=v%85))/85)-(F=v%85))/85)-(p=v%85))/85)-(w=v%85))/85)%85,h.push(m+33,w+33,p+33,F+33,P+33)):h.push(122);return function(D,_){for(var B=_;B>0;B--)D.pop()}(h,u.length),String.fromCharCode.apply(String,h)+"~>"},e=function(a){var u,h,f,d,v,m=String,w="length",p=255,F="charCodeAt",P="slice",D="replace";for(a[P](-2),a=a[P](0,-2)[D](/\s/g,"")[D]("z","!!!!!"),f=[],d=0,v=(a+=u="uuuuu"[P](a[w]%5||5))[w];v>d;d+=5)h=52200625*(a[F](d)-33)+614125*(a[F](d+1)-33)+7225*(a[F](d+2)-33)+85*(a[F](d+3)-33)+(a[F](d+4)-33),f.push(p&h>>24,p&h>>16,p&h>>8,p&h);return function(_,B){for(var G=B;G>0;G--)_.pop()}(f,u[w]),m.fromCharCode.apply(m,f)},i=function(a){var u=new RegExp(/^([0-9A-Fa-f]{2})+$/);if((a=a.replace(/\s/g,"")).indexOf(">")!==-1&&(a=a.substr(0,a.indexOf(">"))),a.length%2&&(a+="0"),u.test(a)===!1)return"";for(var h="",f=0;f<a.length;f+=2)h+=String.fromCharCode("0x"+(a[f]+a[f+1]));return h},o=function(a){for(var u=new Uint8Array(a.length),h=a.length;h--;)u[h]=a.charCodeAt(h);return a=(u=Cs(u)).reduce(function(f,d){return f+String.fromCharCode(d)},"")};r.processDataByFilters=function(a,u){var h=0,f=a||"",d=[];for(typeof(u=u||[])=="string"&&(u=[u]),h=0;h<u.length;h+=1)switch(u[h]){case"ASCII85Decode":case"/ASCII85Decode":f=e(f),d.push("/ASCII85Encode");break;case"ASCII85Encode":case"/ASCII85Encode":f=t(f),d.push("/ASCII85Decode");break;case"ASCIIHexDecode":case"/ASCIIHexDecode":f=i(f),d.push("/ASCIIHexEncode");break;case"ASCIIHexEncode":case"/ASCIIHexEncode":f=f.split("").map(function(v){return("0"+v.charCodeAt().toString(16)).slice(-2)}).join("")+">",d.push("/ASCIIHexDecode");break;case"FlateEncode":case"/FlateEncode":f=o(f),d.push("/FlateDecode");break;default:throw new Error('The filter: "'+u[h]+'" is not implemented')}return{data:f,reverseChain:d.reverse().join(" ")}}}(zt.API),function(r){r.loadFile=function(t,e,i){return function(o,a,u){a=a!==!1,u=typeof u=="function"?u:function(){};var h=void 0;try{h=function(f,d,v){var m=new XMLHttpRequest,w=0,p=function(F){var P=F.length,D=[],_=String.fromCharCode;for(w=0;w<P;w+=1)D.push(_(255&F.charCodeAt(w)));return D.join("")};if(m.open("GET",f,!d),m.overrideMimeType("text/plain; charset=x-user-defined"),d===!1&&(m.onload=function(){m.status===200?v(p(this.responseText)):v(void 0)}),m.send(null),d&&m.status===200)return p(m.responseText)}(o,a,u)}catch{}return h}(t,e,i)},r.loadImageFile=r.loadFile}(zt.API),function(r){function t(){return(Ht.html2canvas?Promise.resolve(Ht.html2canvas):Promise.resolve().then(()=>require("./html2canvas.esm-BA_v9SIU.cjs"))).catch(function(u){return Promise.reject(new Error("Could not load html2canvas: "+u))}).then(function(u){return u.default?u.default:u})}function e(){return(Ht.DOMPurify?Promise.resolve(Ht.DOMPurify):Promise.resolve().then(()=>require("./purify.es-D1I7B1hP.cjs"))).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 h=he(u);return h==="undefined"?"undefined":h==="string"||u instanceof String?"string":h==="number"||u instanceof Number?"number":h==="function"||u instanceof Function?"function":u&&u.constructor===Array?"array":u&&u.nodeType===1?"element":h==="object"?"object":"unknown"},o=function(u,h){var f=document.createElement(u);for(var d in h.className&&(f.className=h.className),h.innerHTML&&h.dompurify&&(f.innerHTML=h.dompurify.sanitize(h.innerHTML)),h.style)f.style[d]=h.style[d];return f},a=function u(h){var f=Object.assign(u.convert(Promise.resolve()),JSON.parse(JSON.stringify(u.template))),d=u.convert(Promise.resolve(),f);return d=(d=d.setProgress(1,u,1,[u])).set(h)};(a.prototype=Object.create(Promise.prototype)).constructor=a,a.convert=function(u,h){return u.__proto__=h||a.prototype,u},a.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"}},a.prototype.from=function(u,h){return this.then(function(){switch(h=h||function(f){switch(i(f)){case"string":return"string";case"element":return f.nodeName.toLowerCase()==="canvas"?"canvas":"element";default:return"unknown"}}(u)){case"string":return this.then(e).then(function(f){return this.set({src:o("div",{innerHTML:u,dompurify:f})})});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.")}})},a.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.")}},a.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},h=function f(d,v){for(var m=d.nodeType===3?document.createTextNode(d.nodeValue):d.cloneNode(!1),w=d.firstChild;w;w=w.nextSibling)v!==!0&&w.nodeType===1&&w.nodeName==="SCRIPT"||m.appendChild(f(w,v));return d.nodeType===1&&(d.nodeName==="CANVAS"?(m.width=d.width,m.height=d.height,m.getContext("2d").drawImage(d,0,0)):d.nodeName!=="TEXTAREA"&&d.nodeName!=="SELECT"||(m.value=d.value),m.addEventListener("load",function(){m.scrollTop=d.scrollTop,m.scrollLeft=d.scrollLeft},!0)),m}(this.prop.src,this.opt.html2canvas.javascriptEnabled);h.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(h),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"})},a.prototype.toCanvas=function(){var u=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(u).then(t).then(function(h){var f=Object.assign({},this.opt.html2canvas);return delete f.onrendered,h(this.prop.container,f)}).then(function(h){(this.opt.html2canvas.onrendered||function(){})(h),this.prop.canvas=h,document.body.removeChild(this.prop.overlay)})},a.prototype.toContext2d=function(){var u=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(u).then(t).then(function(h){var f=this.opt.jsPDF,d=this.opt.fontFaces,v=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,m=Object.assign({async:!0,allowTaint:!0,scale:v,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 m.onrendered,f.context2d.autoPaging=this.opt.autoPaging===void 0||this.opt.autoPaging,f.context2d.posX=this.opt.x,f.context2d.posY=this.opt.y,f.context2d.margin=this.opt.margin,f.context2d.fontFaces=d,d)for(var w=0;w<d.length;++w){var p=d[w],F=p.src.find(function(P){return P.format==="truetype"});F&&f.addFont(F.url,p.ref.name,p.ref.style)}return m.windowHeight=m.windowHeight||0,m.windowHeight=m.windowHeight==0?Math.max(this.prop.container.clientHeight,this.prop.container.scrollHeight,this.prop.container.offsetHeight):m.windowHeight,f.context2d.save(!0),h(this.prop.container,m)}).then(function(h){this.opt.jsPDF.context2d.restore(!0),(this.opt.html2canvas.onrendered||function(){})(h),this.prop.canvas=h,document.body.removeChild(this.prop.overlay)})},a.prototype.toImg=function(){return this.thenList([function(){return this.prop.canvas||this.toCanvas()}]).then(function(){var u=this.prop.canvas.toDataURL("image/"+this.opt.image.type,this.opt.image.quality);this.prop.img=document.createElement("img"),this.prop.img.src=u})},a.prototype.toPdf=function(){return this.thenList([function(){return this.toContext2d()}]).then(function(){this.prop.pdf=this.prop.pdf||this.opt.jsPDF})},a.prototype.output=function(u,h,f){return(f=f||"pdf").toLowerCase()==="img"||f.toLowerCase()==="image"?this.outputImg(u,h):this.outputPdf(u,h)},a.prototype.outputPdf=function(u,h){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then(function(){return this.prop.pdf.output(u,h)})},a.prototype.outputImg=function(u){return this.thenList([function(){return this.prop.img||this.toImg()}]).then(function(){switch(u){case void 0:case"img":return this.prop.img;case"datauristring":case"dataurlstring":return this.prop.img.src;case"datauri":case"dataurl":return document.location.href=this.prop.img.src;default:throw'Image output type "'+u+'" is not supported.'}})},a.prototype.save=function(u){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).set(u?{filename:u}:null).then(function(){this.prop.pdf.save(this.opt.filename)})},a.prototype.doCallback=function(){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then(function(){this.prop.callback(this.prop.pdf)})},a.prototype.set=function(u){if(i(u)!=="object")return this;var h=Object.keys(u||{}).map(function(f){if(f in a.template.prop)return function(){this.prop[f]=u[f]};switch(f){case"margin":return this.setMargin.bind(this,u.margin);case"jsPDF":return function(){return this.opt.jsPDF=u.jsPDF,this.setPageSize()};case"pageSize":return this.setPageSize.bind(this,u.pageSize);default:return function(){this.opt[f]=u[f]}}},this);return this.then(function(){return this.thenList(h)})},a.prototype.get=function(u,h){return this.then(function(){var f=u in a.template.prop?this.prop[u]:this.opt[u];return h?h(f):f})},a.prototype.setMargin=function(u){return this.then(function(){switch(i(u)){case"number":u=[u,u,u,u];case"array":if(u.length===2&&(u=[u[0],u[1],u[0],u[1]]),u.length===4)break;default:return this.error("Invalid margin array.")}this.opt.margin=u}).then(this.setPageSize)},a.prototype.setPageSize=function(u){function h(f,d){return Math.floor(f*d/72*96)}return this.then(function(){(u=u||zt.getPageSize(this.opt.jsPDF)).hasOwnProperty("inner")||(u.inner={width:u.width-this.opt.margin[1]-this.opt.margin[3],height:u.height-this.opt.margin[0]-this.opt.margin[2]},u.inner.px={width:h(u.inner.width,u.k),height:h(u.inner.height,u.k)},u.inner.ratio=u.inner.height/u.inner.width),this.prop.pageSize=u})},a.prototype.setProgress=function(u,h,f,d){return u!=null&&(this.progress.val=u),h!=null&&(this.progress.state=h),f!=null&&(this.progress.n=f),d!=null&&(this.progress.stack=d),this.progress.ratio=this.progress.val/this.progress.state,this},a.prototype.updateProgress=function(u,h,f,d){return this.setProgress(u?this.progress.val+u:null,h||null,f?this.progress.n+f:null,d?this.progress.stack.concat(d):null)},a.prototype.then=function(u,h){var f=this;return this.thenCore(u,h,function(d,v){return f.updateProgress(null,null,1,[d]),Promise.prototype.then.call(this,function(m){return f.updateProgress(null,d),m}).then(d,v).then(function(m){return f.updateProgress(1),m})})},a.prototype.thenCore=function(u,h,f){f=f||Promise.prototype.then,u&&(u=u.bind(this)),h&&(h=h.bind(this));var d=Promise.toString().indexOf("[native code]")!==-1&&Promise.name==="Promise"?this:a.convert(Object.assign({},this),Promise.prototype),v=f.call(d,u,h);return a.convert(v,this.__proto__)},a.prototype.thenExternal=function(u,h){return Promise.prototype.then.call(this,u,h)},a.prototype.thenList=function(u){var h=this;return u.forEach(function(f){h=h.thenCore(f)}),h},a.prototype.catch=function(u){u&&(u=u.bind(this));var h=Promise.prototype.catch.call(this,u);return a.convert(h,this)},a.prototype.catchExternal=function(u){return Promise.prototype.catch.call(this,u)},a.prototype.error=function(u){return this.then(function(){throw new Error(u)})},a.prototype.using=a.prototype.set,a.prototype.saveAs=a.prototype.save,a.prototype.export=a.prototype.output,a.prototype.run=a.prototype.then,zt.getPageSize=function(u,h,f){if(he(u)==="object"){var d=u;u=d.orientation,h=d.unit||h,f=d.format||f}h=h||"mm",f=f||"a4",u=(""+(u||"P")).toLowerCase();var v,m=(""+f).toLowerCase(),w={a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89],a5:[419.53,595.28],a6:[297.64,419.53],a7:[209.76,297.64],a8:[147.4,209.76],a9:[104.88,147.4],a10:[73.7,104.88],b0:[2834.65,4008.19],b1:[2004.09,2834.65],b2:[1417.32,2004.09],b3:[1000.63,1417.32],b4:[708.66,1000.63],b5:[498.9,708.66],b6:[354.33,498.9],b7:[249.45,354.33],b8:[175.75,249.45],b9:[124.72,175.75],b10:[87.87,124.72],c0:[2599.37,3676.54],c1:[1836.85,2599.37],c2:[1298.27,1836.85],c3:[918.43,1298.27],c4:[649.13,918.43],c5:[459.21,649.13],c6:[323.15,459.21],c7:[229.61,323.15],c8:[161.57,229.61],c9:[113.39,161.57],c10:[79.37,113.39],dl:[311.81,623.62],letter:[612,792],"government-letter":[576,756],legal:[612,1008],"junior-legal":[576,360],ledger:[1224,792],tabloid:[792,1224],"credit-card":[153,243]};switch(h){case"pt":v=1;break;case"mm":v=72/25.4;break;case"cm":v=72/2.54;break;case"in":v=72;break;case"px":v=.75;break;case"pc":case"em":v=12;break;case"ex":v=6;break;default:throw"Invalid unit: "+h}var p,F=0,P=0;if(w.hasOwnProperty(m))F=w[m][1]/v,P=w[m][0]/v;else try{F=f[1],P=f[0]}catch{throw new Error("Invalid format: "+f)}if(u==="p"||u==="portrait")u="p",P>F&&(p=P,P=F,F=p);else{if(u!=="l"&&u!=="landscape")throw"Invalid orientation: "+u;u="l",F>P&&(p=P,P=F,F=p)}return{width:P,height:F,unit:h,k:v,orientation:u}},r.html=function(u,h){(h=h||{}).callback=h.callback||function(){},h.html2canvas=h.html2canvas||{},h.html2canvas.canvas=h.html2canvas.canvas||this.canvas,h.jsPDF=h.jsPDF||this,h.fontFaces=h.fontFaces?h.fontFaces.map(Ms):null;var f=new a(h);return h.worker?f:f.from(u).doCallback()}}(zt.API),zt.API.addJS=function(r){return Fu=r,this.internal.events.subscribe("postPutResources",function(){ho=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/Names [(EmbeddedJS) "+(ho+1)+" 0 R]"),this.internal.out(">>"),this.internal.out("endobj"),ku=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/S /JavaScript"),this.internal.out("/JS ("+Fu+")"),this.internal.out(">>"),this.internal.out("endobj")}),this.internal.events.subscribe("putCatalog",function(){ho!==void 0&&ku!==void 0&&this.internal.out("/Names <</JavaScript "+ho+" 0 R>>")}),this},function(r){var t;r.events.push(["postPutResources",function(){var e=this,i=/^(\d+) 0 obj$/;if(this.outline.root.children.length>0)for(var o=e.outline.render().split(/\r\n/),a=0;a<o.length;a++){var u=o[a],h=i.exec(u);if(h!=null){var f=h[1];e.internal.newObjectDeferredBegin(f,!1)}e.internal.write(u)}if(this.outline.createNamedDestinations){var d=this.internal.pages.length,v=[];for(a=0;a<d;a++){var m=e.internal.newObject();v.push(m);var w=e.internal.getPageInfo(a+1);e.internal.write("<< /D["+w.objId+" 0 R /XYZ null null null]>> endobj")}var p=e.internal.newObject();for(e.internal.write("<< /Names [ "),a=0;a<v.length;a++)e.internal.write("(page_"+(a+1)+")"+v[a]+" 0 R");e.internal.write(" ] >>","endobj"),t=e.internal.newObject(),e.internal.write("<< /Dests "+p+" 0 R"),e.internal.write(">>","endobj")}}]),r.events.push(["putCatalog",function(){this.outline.root.children.length>0&&(this.internal.write("/Outlines",this.outline.makeRef(this.outline.root)),this.outline.createNamedDestinations&&this.internal.write("/Names "+t+" 0 R"))}]),r.events.push(["initialized",function(){var e=this;e.outline={createNamedDestinations:!1,root:{children:[]}},e.outline.add=function(i,o,a){var u={title:o,options:a,children:[]};return i==null&&(i=this.root),i.children.push(u),u},e.outline.render=function(){return this.ctx={},this.ctx.val="",this.ctx.pdf=e,this.genIds_r(this.root),this.renderRoot(this.root),this.renderItems(this.root),this.ctx.val},e.outline.genIds_r=function(i){i.id=e.internal.newObjectDeferred();for(var o=0;o<i.children.length;o++)this.genIds_r(i.children[o])},e.outline.renderRoot=function(i){this.objStart(i),this.line("/Type /Outlines"),i.children.length>0&&(this.line("/First "+this.makeRef(i.children[0])),this.line("/Last "+this.makeRef(i.children[i.children.length-1]))),this.line("/Count "+this.count_r({count:0},i)),this.objEnd()},e.outline.renderItems=function(i){for(var o=this.ctx.pdf.internal.getVerticalCoordinateString,a=0;a<i.children.length;a++){var u=i.children[a];this.objStart(u),this.line("/Title "+this.makeString(u.title)),this.line("/Parent "+this.makeRef(i)),a>0&&this.line("/Prev "+this.makeRef(i.children[a-1])),a<i.children.length-1&&this.line("/Next "+this.makeRef(i.children[a+1])),u.children.length>0&&(this.line("/First "+this.makeRef(u.children[0])),this.line("/Last "+this.makeRef(u.children[u.children.length-1])));var h=this.count=this.count_r({count:0},u);if(h>0&&this.line("/Count "+h),u.options&&u.options.pageNumber){var f=e.internal.getPageInfo(u.options.pageNumber);this.line("/Dest ["+f.objId+" 0 R /XYZ 0 "+o(0)+" 0]")}this.objEnd()}for(var d=0;d<i.children.length;d++)this.renderItems(i.children[d])},e.outline.line=function(i){this.ctx.val+=i+`\r
119
- `},e.outline.makeRef=function(i){return i.id+" 0 R"},e.outline.makeString=function(i){return"("+e.internal.pdfEscape(i)+")"},e.outline.objStart=function(i){this.ctx.val+=`\r
120
- `+i.id+` 0 obj\r
121
- <<\r
122
- `},e.outline.objEnd=function(){this.ctx.val+=`>> \r
123
- endobj\r
124
- `},e.outline.count_r=function(i,o){for(var a=0;a<o.children.length;a++)i.count++,this.count_r(i,o.children[a]);return i.count}}])}(zt.API),function(r){var t=[192,193,194,195,196,197,198,199];r.processJPEG=function(e,i,o,a,u,h){var f,d=this.decode.DCT_DECODE,v=null;if(typeof e=="string"||this.__addimage__.isArrayBuffer(e)||this.__addimage__.isArrayBufferView(e)){switch(e=u||e,e=this.__addimage__.isArrayBuffer(e)?new Uint8Array(e):e,(f=function(m){for(var w,p=256*m.charCodeAt(4)+m.charCodeAt(5),F=m.length,P={width:0,height:0,numcomponents:1},D=4;D<F;D+=2){if(D+=p,t.indexOf(m.charCodeAt(D+1))!==-1){w=256*m.charCodeAt(D+5)+m.charCodeAt(D+6),P={width:256*m.charCodeAt(D+7)+m.charCodeAt(D+8),height:w,numcomponents:m.charCodeAt(D+9)};break}p=256*m.charCodeAt(D+2)+m.charCodeAt(D+3)}return P}(e=this.__addimage__.isArrayBufferView(e)?this.__addimage__.arrayBufferToBinaryString(e):e)).numcomponents){case 1:h=this.color_spaces.DEVICE_GRAY;break;case 4:h=this.color_spaces.DEVICE_CMYK;break;case 3:h=this.color_spaces.DEVICE_RGB}v={data:e,width:f.width,height:f.height,colorSpace:h,bitsPerComponent:8,filter:d,index:i,alias:o}}return v}}(zt.API);var ki,fo,Cu,Iu,ju,Uh=function(){var r,t,e;function i(a){var u,h,f,d,v,m,w,p,F,P,D,_,B,G;for(this.data=a,this.pos=8,this.palette=[],this.imgData=[],this.transparency={},this.animation=null,this.text={},m=null;;){switch(u=this.readUInt32(),F=(function(){var it,ut;for(ut=[],it=0;it<4;++it)ut.push(String.fromCharCode(this.data[this.pos++]));return ut}).call(this).join("")){case"IHDR":this.width=this.readUInt32(),this.height=this.readUInt32(),this.bits=this.data[this.pos++],this.colorType=this.data[this.pos++],this.compressionMethod=this.data[this.pos++],this.filterMethod=this.data[this.pos++],this.interlaceMethod=this.data[this.pos++];break;case"acTL":this.animation={numFrames:this.readUInt32(),numPlays:this.readUInt32()||1/0,frames:[]};break;case"PLTE":this.palette=this.read(u);break;case"fcTL":m&&this.animation.frames.push(m),this.pos+=4,m={width:this.readUInt32(),height:this.readUInt32(),xOffset:this.readUInt32(),yOffset:this.readUInt32()},v=this.readUInt16(),d=this.readUInt16()||100,m.delay=1e3*v/d,m.disposeOp=this.data[this.pos++],m.blendOp=this.data[this.pos++],m.data=[];break;case"IDAT":case"fdAT":for(F==="fdAT"&&(this.pos+=4,u-=4),a=(m!=null?m.data:void 0)||this.imgData,_=0;0<=u?_<u:_>u;0<=u?++_:--_)a.push(this.data[this.pos++]);break;case"tRNS":switch(this.transparency={},this.colorType){case 3:if(f=this.palette.length/3,this.transparency.indexed=this.read(u),this.transparency.indexed.length>f)throw new Error("More transparent colors than palette size");if((P=f-this.transparency.indexed.length)>0)for(B=0;0<=P?B<P:B>P;0<=P?++B:--B)this.transparency.indexed.push(255);break;case 0:this.transparency.grayscale=this.read(u)[0];break;case 2:this.transparency.rgb=this.read(u)}break;case"tEXt":w=(D=this.read(u)).indexOf(0),p=String.fromCharCode.apply(String,D.slice(0,w)),this.text[p]=String.fromCharCode.apply(String,D.slice(w+1));break;case"IEND":return m&&this.animation.frames.push(m),this.colors=(function(){switch(this.colorType){case 0:case 3:case 4:return 1;case 2:case 6:return 3}}).call(this),this.hasAlphaChannel=(G=this.colorType)===4||G===6,h=this.colors+(this.hasAlphaChannel?1:0),this.pixelBitlength=this.bits*h,this.colorSpace=(function(){switch(this.colors){case 1:return"DeviceGray";case 3:return"DeviceRGB"}}).call(this),void(this.imgData=new Uint8Array(this.imgData));default:this.pos+=u}if(this.pos+=4,this.pos>this.data.length)throw new Error("Incomplete or corrupt PNG file")}}i.prototype.read=function(a){var u,h;for(h=[],u=0;0<=a?u<a:u>a;0<=a?++u:--u)h.push(this.data[this.pos++]);return h},i.prototype.readUInt32=function(){return this.data[this.pos++]<<24|this.data[this.pos++]<<16|this.data[this.pos++]<<8|this.data[this.pos++]},i.prototype.readUInt16=function(){return this.data[this.pos++]<<8|this.data[this.pos++]},i.prototype.decodePixels=function(a){var u=this.pixelBitlength/8,h=new Uint8Array(this.width*this.height*u),f=0,d=this;if(a==null&&(a=this.imgData),a.length===0)return new Uint8Array(0);function v(m,w,p,F){var P,D,_,B,G,it,ut,wt,tt,z,nt,pt,k,C,W,R,st,at,ft,$,ht,dt=Math.ceil((d.width-m)/p),jt=Math.ceil((d.height-w)/F),A=d.width==dt&&d.height==jt;for(C=u*dt,pt=A?h:new Uint8Array(C*jt),it=a.length,k=0,D=0;k<jt&&f<it;){switch(a[f++]){case 0:for(B=st=0;st<C;B=st+=1)pt[D++]=a[f++];break;case 1:for(B=at=0;at<C;B=at+=1)P=a[f++],G=B<u?0:pt[D-u],pt[D++]=(P+G)%256;break;case 2:for(B=ft=0;ft<C;B=ft+=1)P=a[f++],_=(B-B%u)/u,W=k&&pt[(k-1)*C+_*u+B%u],pt[D++]=(W+P)%256;break;case 3:for(B=$=0;$<C;B=$+=1)P=a[f++],_=(B-B%u)/u,G=B<u?0:pt[D-u],W=k&&pt[(k-1)*C+_*u+B%u],pt[D++]=(P+Math.floor((G+W)/2))%256;break;case 4:for(B=ht=0;ht<C;B=ht+=1)P=a[f++],_=(B-B%u)/u,G=B<u?0:pt[D-u],k===0?W=R=0:(W=pt[(k-1)*C+_*u+B%u],R=_&&pt[(k-1)*C+(_-1)*u+B%u]),ut=G+W-R,wt=Math.abs(ut-G),z=Math.abs(ut-W),nt=Math.abs(ut-R),tt=wt<=z&&wt<=nt?G:z<=nt?W:R,pt[D++]=(P+tt)%256;break;default:throw new Error("Invalid filter algorithm: "+a[f-1])}if(!A){var j=((w+k*F)*d.width+m)*u,M=k*C;for(B=0;B<dt;B+=1){for(var q=0;q<u;q+=1)h[j++]=pt[M++];j+=(p-1)*u}}k++}}return a=wh(a),d.interlaceMethod==1?(v(0,0,8,8),v(4,0,8,8),v(0,4,4,8),v(2,0,4,4),v(0,2,2,4),v(1,0,2,2),v(0,1,1,2)):v(0,0,1,1),h},i.prototype.decodePalette=function(){var a,u,h,f,d,v,m,w,p;for(h=this.palette,v=this.transparency.indexed||[],d=new Uint8Array((v.length||0)+h.length),f=0,a=0,u=m=0,w=h.length;m<w;u=m+=3)d[f++]=h[u],d[f++]=h[u+1],d[f++]=h[u+2],d[f++]=(p=v[a++])!=null?p:255;return d},i.prototype.copyToImageData=function(a,u){var h,f,d,v,m,w,p,F,P,D,_;if(f=this.colors,P=null,h=this.hasAlphaChannel,this.palette.length&&(P=(_=this._decodedPalette)!=null?_:this._decodedPalette=this.decodePalette(),f=4,h=!0),F=(d=a.data||a).length,m=P||u,v=w=0,f===1)for(;v<F;)p=P?4*u[v/4]:w,D=m[p++],d[v++]=D,d[v++]=D,d[v++]=D,d[v++]=h?m[p++]:255,w=p;else for(;v<F;)p=P?4*u[v/4]:w,d[v++]=m[p++],d[v++]=m[p++],d[v++]=m[p++],d[v++]=h?m[p++]:255,w=p},i.prototype.decode=function(){var a;return a=new Uint8Array(this.width*this.height*4),this.copyToImageData(a,this.decodePixels()),a};var o=function(){if(Object.prototype.toString.call(Ht)==="[object Window]"){try{t=Ht.document.createElement("canvas"),e=t.getContext("2d")}catch{return!1}return!0}return!1};return o(),r=function(a){var u;if(o()===!0)return e.width=a.width,e.height=a.height,e.clearRect(0,0,a.width,a.height),e.putImageData(a,0,0),(u=new Image).src=t.toDataURL(),u;throw new Error("This method requires a Browser with Canvas-capability.")},i.prototype.decodeFrames=function(a){var u,h,f,d,v,m,w,p;if(this.animation){for(p=[],h=v=0,m=(w=this.animation.frames).length;v<m;h=++v)u=w[h],f=a.createImageData(u.width,u.height),d=this.decodePixels(new Uint8Array(u.data)),this.copyToImageData(f,d),u.imageData=f,p.push(u.image=r(f));return p}},i.prototype.renderFrame=function(a,u){var h,f,d;return h=(f=this.animation.frames)[u],d=f[u-1],u===0&&a.clearRect(0,0,this.width,this.height),(d!=null?d.disposeOp:void 0)===1?a.clearRect(d.xOffset,d.yOffset,d.width,d.height):(d!=null?d.disposeOp:void 0)===2&&a.putImageData(d.imageData,d.xOffset,d.yOffset),h.blendOp===0&&a.clearRect(h.xOffset,h.yOffset,h.width,h.height),a.drawImage(h.image,h.xOffset,h.yOffset)},i.prototype.animate=function(a){var u,h,f,d,v,m,w=this;return h=0,m=this.animation,d=m.numFrames,f=m.frames,v=m.numPlays,(u=function(){var p,F;if(p=h++%d,F=f[p],w.renderFrame(a,p),d>1&&h/d<v)return w.animation._timeout=setTimeout(u,F.delay)})()},i.prototype.stopAnimation=function(){var a;return clearTimeout((a=this.animation)!=null?a._timeout:void 0)},i.prototype.render=function(a){var u,h;return a._png&&a._png.stopAnimation(),a._png=this,a.width=this.width,a.height=this.height,u=a.getContext("2d"),this.animation?(this.decodeFrames(u),this.animate(u)):(h=u.createImageData(this.width,this.height),this.copyToImageData(h,this.decodePixels()),u.putImageData(h,0,0))},i}();/**
125
- * @license
126
- *
127
- * Copyright (c) 2014 James Robb, https://github.com/jamesbrobb
128
- *
129
- * Permission is hereby granted, free of charge, to any person obtaining
130
- * a copy of this software and associated documentation files (the
131
- * "Software"), to deal in the Software without restriction, including
132
- * without limitation the rights to use, copy, modify, merge, publish,
133
- * distribute, sublicense, and/or sell copies of the Software, and to
134
- * permit persons to whom the Software is furnished to do so, subject to
135
- * the following conditions:
136
- *
137
- * The above copyright notice and this permission notice shall be
138
- * included in all copies or substantial portions of the Software.
139
- *
140
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
141
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
142
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
143
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
144
- * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
145
- * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
146
- * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
147
- * ====================================================================
148
- *//**
149
- * @license
150
- * (c) Dean McNamee <dean@gmail.com>, 2013.
151
- *
152
- * https://github.com/deanm/omggif
153
- *
154
- * Permission is hereby granted, free of charge, to any person obtaining a copy
155
- * of this software and associated documentation files (the "Software"), to
156
- * deal in the Software without restriction, including without limitation the
157
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
158
- * sell copies of the Software, and to permit persons to whom the Software is
159
- * furnished to do so, subject to the following conditions:
160
- *
161
- * The above copyright notice and this permission notice shall be included in
162
- * all copies or substantial portions of the Software.
163
- *
164
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
165
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
166
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
167
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
168
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
169
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
170
- * IN THE SOFTWARE.
171
- *
172
- * omggif is a JavaScript implementation of a GIF 89a encoder and decoder,
173
- * including animation and compression. It does not rely on any specific
174
- * underlying system, so should run in the browser, Node, or Plask.
175
- */function Hh(r){var t=0;if(r[t++]!==71||r[t++]!==73||r[t++]!==70||r[t++]!==56||(r[t++]+1&253)!=56||r[t++]!==97)throw new Error("Invalid GIF 87a/89a header.");var e=r[t++]|r[t++]<<8,i=r[t++]|r[t++]<<8,o=r[t++],a=o>>7,u=1<<(7&o)+1;r[t++],r[t++];var h=null,f=null;a&&(h=t,f=u,t+=3*u);var d=!0,v=[],m=0,w=null,p=0,F=null;for(this.width=e,this.height=i;d&&t<r.length;)switch(r[t++]){case 33:switch(r[t++]){case 255:if(r[t]!==11||r[t+1]==78&&r[t+2]==69&&r[t+3]==84&&r[t+4]==83&&r[t+5]==67&&r[t+6]==65&&r[t+7]==80&&r[t+8]==69&&r[t+9]==50&&r[t+10]==46&&r[t+11]==48&&r[t+12]==3&&r[t+13]==1&&r[t+16]==0)t+=14,F=r[t++]|r[t++]<<8,t++;else for(t+=12;;){if(!((k=r[t++])>=0))throw Error("Invalid block size");if(k===0)break;t+=k}break;case 249:if(r[t++]!==4||r[t+4]!==0)throw new Error("Invalid graphics extension block.");var P=r[t++];m=r[t++]|r[t++]<<8,w=r[t++],(1&P)==0&&(w=null),p=P>>2&7,t++;break;case 254:for(;;){if(!((k=r[t++])>=0))throw Error("Invalid block size");if(k===0)break;t+=k}break;default:throw new Error("Unknown graphic control label: 0x"+r[t-1].toString(16))}break;case 44:var D=r[t++]|r[t++]<<8,_=r[t++]|r[t++]<<8,B=r[t++]|r[t++]<<8,G=r[t++]|r[t++]<<8,it=r[t++],ut=it>>6&1,wt=1<<(7&it)+1,tt=h,z=f,nt=!1;it>>7&&(nt=!0,tt=t,z=wt,t+=3*wt);var pt=t;for(t++;;){var k;if(!((k=r[t++])>=0))throw Error("Invalid block size");if(k===0)break;t+=k}v.push({x:D,y:_,width:B,height:G,has_local_palette:nt,palette_offset:tt,palette_size:z,data_offset:pt,data_length:t-pt,transparent_index:w,interlaced:!!ut,delay:m,disposal:p});break;case 59:d=!1;break;default:throw new Error("Unknown gif block: 0x"+r[t-1].toString(16))}this.numFrames=function(){return v.length},this.loopCount=function(){return F},this.frameInfo=function(C){if(C<0||C>=v.length)throw new Error("Frame index out of range.");return v[C]},this.decodeAndBlitFrameBGRA=function(C,W){var R=this.frameInfo(C),st=R.width*R.height,at=new Uint8Array(st);Ou(r,R.data_offset,at,st);var ft=R.palette_offset,$=R.transparent_index;$===null&&($=256);var ht=R.width,dt=e-ht,jt=ht,A=4*(R.y*e+R.x),j=4*((R.y+R.height)*e+R.x),M=A,q=4*dt;R.interlaced===!0&&(q+=4*e*7);for(var J=8,Q=0,et=at.length;Q<et;++Q){var rt=at[Q];if(jt===0&&(jt=ht,(M+=q)>=j&&(q=4*dt+4*e*(J-1),M=A+(ht+dt)*(J<<1),J>>=1)),rt===$)M+=4;else{var At=r[ft+3*rt],Lt=r[ft+3*rt+1],Ft=r[ft+3*rt+2];W[M++]=Ft,W[M++]=Lt,W[M++]=At,W[M++]=255}--jt}},this.decodeAndBlitFrameRGBA=function(C,W){var R=this.frameInfo(C),st=R.width*R.height,at=new Uint8Array(st);Ou(r,R.data_offset,at,st);var ft=R.palette_offset,$=R.transparent_index;$===null&&($=256);var ht=R.width,dt=e-ht,jt=ht,A=4*(R.y*e+R.x),j=4*((R.y+R.height)*e+R.x),M=A,q=4*dt;R.interlaced===!0&&(q+=4*e*7);for(var J=8,Q=0,et=at.length;Q<et;++Q){var rt=at[Q];if(jt===0&&(jt=ht,(M+=q)>=j&&(q=4*dt+4*e*(J-1),M=A+(ht+dt)*(J<<1),J>>=1)),rt===$)M+=4;else{var At=r[ft+3*rt],Lt=r[ft+3*rt+1],Ft=r[ft+3*rt+2];W[M++]=At,W[M++]=Lt,W[M++]=Ft,W[M++]=255}--jt}}}function Ou(r,t,e,i){for(var o=r[t++],a=1<<o,u=a+1,h=u+1,f=o+1,d=(1<<f)-1,v=0,m=0,w=0,p=r[t++],F=new Int32Array(4096),P=null;;){for(;v<16&&p!==0;)m|=r[t++]<<v,v+=8,p===1?p=r[t++]:--p;if(v<f)break;var D=m&d;if(m>>=f,v-=f,D!==a){if(D===u)break;for(var _=D<h?D:P,B=0,G=_;G>a;)G=F[G]>>8,++B;var it=G;if(w+B+(_!==D?1:0)>i)return void me.log("Warning, gif stream longer than expected.");e[w++]=it;var ut=w+=B;for(_!==D&&(e[w++]=it),G=_;B--;)G=F[G],e[--ut]=255&G,G>>=8;P!==null&&h<4096&&(F[h++]=P<<8|it,h>=d+1&&f<12&&(++f,d=d<<1|1)),P=D}else h=u+1,d=(1<<(f=o+1))-1,P=null}return w!==i&&me.log("Warning, gif stream shorter than expected."),e}/**
176
- * @license
177
- Copyright (c) 2008, Adobe Systems Incorporated
178
- All rights reserved.
179
-
180
- Redistribution and use in source and binary forms, with or without
181
- modification, are permitted provided that the following conditions are
182
- met:
183
-
184
- * Redistributions of source code must retain the above copyright notice,
185
- this list of conditions and the following disclaimer.
186
-
187
- * Redistributions in binary form must reproduce the above copyright
188
- notice, this list of conditions and the following disclaimer in the
189
- documentation and/or other materials provided with the distribution.
190
-
191
- * Neither the name of Adobe Systems Incorporated nor the names of its
192
- contributors may be used to endorse or promote products derived from
193
- this software without specific prior written permission.
194
-
195
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
196
- IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
197
- THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
198
- PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
199
- CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
200
- EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
201
- PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
202
- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
203
- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
204
- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
205
- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
206
- */function xs(r){var t,e,i,o,a,u=Math.floor,h=new Array(64),f=new Array(64),d=new Array(64),v=new Array(64),m=new Array(65535),w=new Array(65535),p=new Array(64),F=new Array(64),P=[],D=0,_=7,B=new Array(64),G=new Array(64),it=new Array(64),ut=new Array(256),wt=new Array(2048),tt=[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],z=[0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0],nt=[0,1,2,3,4,5,6,7,8,9,10,11],pt=[0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,125],k=[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],C=[0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0],W=[0,1,2,3,4,5,6,7,8,9,10,11],R=[0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,119],st=[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 at(A,j){for(var M=0,q=0,J=new Array,Q=1;Q<=16;Q++){for(var et=1;et<=A[Q];et++)J[j[q]]=[],J[j[q]][0]=M,J[j[q]][1]=Q,q++,M++;M*=2}return J}function ft(A){for(var j=A[0],M=A[1]-1;M>=0;)j&1<<M&&(D|=1<<_),M--,--_<0&&(D==255?($(255),$(0)):$(D),_=7,D=0)}function $(A){P.push(A)}function ht(A){$(A>>8&255),$(255&A)}function dt(A,j,M,q,J){for(var Q,et=J[0],rt=J[240],At=function(xt,Nt){var Ct,kt,Et,Gt,Qt,te,ie,de,Wt,ee,It=0;for(Wt=0;Wt<8;++Wt){Ct=xt[It],kt=xt[It+1],Et=xt[It+2],Gt=xt[It+3],Qt=xt[It+4],te=xt[It+5],ie=xt[It+6];var Ye=Ct+(de=xt[It+7]),oe=Ct-de,Sr=kt+ie,ge=kt-ie,xe=Et+te,zr=Et-te,ue=Gt+Qt,Bn=Gt-Qt,Ae=Ye+ue,_r=Ye-ue,en=Sr+xe,Ne=Sr-xe;xt[It]=Ae+en,xt[It+4]=Ae-en;var Yt=.707106781*(Ne+_r);xt[It+2]=_r+Yt,xt[It+6]=_r-Yt;var le=.382683433*((Ae=Bn+zr)-(Ne=ge+oe)),Mn=.5411961*Ae+le,We=1.306562965*Ne+le,Ur=.707106781*(en=zr+ge),Hr=oe+Ur,qt=oe-Ur;xt[It+5]=qt+Mn,xt[It+3]=qt-Mn,xt[It+1]=Hr+We,xt[It+7]=Hr-We,It+=8}for(It=0,Wt=0;Wt<8;++Wt){Ct=xt[It],kt=xt[It+8],Et=xt[It+16],Gt=xt[It+24],Qt=xt[It+32],te=xt[It+40],ie=xt[It+48];var Pr=Ct+(de=xt[It+56]),Wr=Ct-de,ir=kt+ie,Re=kt-ie,De=Et+te,fr=Et-te,$n=Gt+Qt,rn=Gt-Qt,kr=Pr+$n,Fr=Pr-$n,Cr=ir+De,Vr=ir-De;xt[It]=kr+Cr,xt[It+32]=kr-Cr;var mr=.707106781*(Vr+Fr);xt[It+16]=Fr+mr,xt[It+48]=Fr-mr;var Gr=.382683433*((kr=rn+fr)-(Vr=Re+Wr)),En=.5411961*kr+Gr,Qn=1.306562965*Vr+Gr,ti=.707106781*(Cr=fr+Re),ei=Wr+ti,ri=Wr-ti;xt[It+40]=ri+En,xt[It+24]=ri-En,xt[It+8]=ei+Qn,xt[It+56]=ei-Qn,It++}for(Wt=0;Wt<64;++Wt)ee=xt[Wt]*Nt[Wt],p[Wt]=ee>0?ee+.5|0:ee-.5|0;return p}(A,j),Lt=0;Lt<64;++Lt)F[tt[Lt]]=At[Lt];var Ft=F[0]-M;M=F[0],Ft==0?ft(q[0]):(ft(q[w[Q=32767+Ft]]),ft(m[Q]));for(var _t=63;_t>0&&F[_t]==0;)_t--;if(_t==0)return ft(et),M;for(var Ut,ct=1;ct<=_t;){for(var E=ct;F[ct]==0&&ct<=_t;)++ct;var Kt=ct-E;if(Kt>=16){Ut=Kt>>4;for(var Mt=1;Mt<=Ut;++Mt)ft(rt);Kt&=15}Q=32767+F[ct],ft(J[(Kt<<4)+w[Q]]),ft(m[Q]),ct++}return _t!=63&&ft(et),M}function jt(A){A=Math.min(Math.max(A,1),100),a!=A&&(function(j){for(var M=[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],q=0;q<64;q++){var J=u((M[q]*j+50)/100);J=Math.min(Math.max(J,1),255),h[tt[q]]=J}for(var Q=[17,18,24,47,99,99,99,99,18,21,26,66,99,99,99,99,24,26,56,99,99,99,99,99,47,66,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99],et=0;et<64;et++){var rt=u((Q[et]*j+50)/100);rt=Math.min(Math.max(rt,1),255),f[tt[et]]=rt}for(var At=[1,1.387039845,1.306562965,1.175875602,1,.785694958,.5411961,.275899379],Lt=0,Ft=0;Ft<8;Ft++)for(var _t=0;_t<8;_t++)d[Lt]=1/(h[tt[Lt]]*At[Ft]*At[_t]*8),v[Lt]=1/(f[tt[Lt]]*At[Ft]*At[_t]*8),Lt++}(A<50?Math.floor(5e3/A):Math.floor(200-2*A)),a=A)}this.encode=function(A,j){j&&jt(j),P=new Array,D=0,_=7,ht(65496),ht(65504),ht(16),$(74),$(70),$(73),$(70),$(0),$(1),$(1),$(0),ht(1),ht(1),$(0),$(0),function(){ht(65499),ht(132),$(0);for(var kt=0;kt<64;kt++)$(h[kt]);$(1);for(var Et=0;Et<64;Et++)$(f[Et])}(),function(kt,Et){ht(65472),ht(17),$(8),ht(Et),ht(kt),$(3),$(1),$(17),$(0),$(2),$(17),$(1),$(3),$(17),$(1)}(A.width,A.height),function(){ht(65476),ht(418),$(0);for(var kt=0;kt<16;kt++)$(z[kt+1]);for(var Et=0;Et<=11;Et++)$(nt[Et]);$(16);for(var Gt=0;Gt<16;Gt++)$(pt[Gt+1]);for(var Qt=0;Qt<=161;Qt++)$(k[Qt]);$(1);for(var te=0;te<16;te++)$(C[te+1]);for(var ie=0;ie<=11;ie++)$(W[ie]);$(17);for(var de=0;de<16;de++)$(R[de+1]);for(var Wt=0;Wt<=161;Wt++)$(st[Wt])}(),ht(65498),ht(12),$(3),$(1),$(0),$(2),$(17),$(3),$(17),$(0),$(63),$(0);var M=0,q=0,J=0;D=0,_=7,this.encode.displayName="_encode_";for(var Q,et,rt,At,Lt,Ft,_t,Ut,ct,E=A.data,Kt=A.width,Mt=A.height,xt=4*Kt,Nt=0;Nt<Mt;){for(Q=0;Q<xt;){for(Lt=xt*Nt+Q,_t=-1,Ut=0,ct=0;ct<64;ct++)Ft=Lt+(Ut=ct>>3)*xt+(_t=4*(7&ct)),Nt+Ut>=Mt&&(Ft-=xt*(Nt+1+Ut-Mt)),Q+_t>=xt&&(Ft-=Q+_t-xt+4),et=E[Ft++],rt=E[Ft++],At=E[Ft++],B[ct]=(wt[et]+wt[rt+256>>0]+wt[At+512>>0]>>16)-128,G[ct]=(wt[et+768>>0]+wt[rt+1024>>0]+wt[At+1280>>0]>>16)-128,it[ct]=(wt[et+1280>>0]+wt[rt+1536>>0]+wt[At+1792>>0]>>16)-128;M=dt(B,d,M,t,i),q=dt(G,v,q,e,o),J=dt(it,v,J,e,o),Q+=32}Nt+=8}if(_>=0){var Ct=[];Ct[1]=_+1,Ct[0]=(1<<_+1)-1,ft(Ct)}return ht(65497),new Uint8Array(P)},r=r||50,function(){for(var A=String.fromCharCode,j=0;j<256;j++)ut[j]=A(j)}(),t=at(z,nt),e=at(C,W),i=at(pt,k),o=at(R,st),function(){for(var A=1,j=2,M=1;M<=15;M++){for(var q=A;q<j;q++)w[32767+q]=M,m[32767+q]=[],m[32767+q][1]=M,m[32767+q][0]=q;for(var J=-(j-1);J<=-A;J++)w[32767+J]=M,m[32767+J]=[],m[32767+J][1]=M,m[32767+J][0]=j-1+J;A<<=1,j<<=1}}(),function(){for(var A=0;A<256;A++)wt[A]=19595*A,wt[A+256>>0]=38470*A,wt[A+512>>0]=7471*A+32768,wt[A+768>>0]=-11059*A,wt[A+1024>>0]=-21709*A,wt[A+1280>>0]=32768*A+8421375,wt[A+1536>>0]=-27439*A,wt[A+1792>>0]=-5329*A}(),jt(r)}/**
207
- * @license
208
- * Copyright (c) 2017 Aras Abbasi
209
- *
210
- * Licensed under the MIT License.
211
- * http://opensource.org/licenses/mit-license
212
- */function Er(r,t){if(this.pos=0,this.buffer=r,this.datav=new DataView(r.buffer),this.is_with_alpha=!!t,this.bottom_up=!0,this.flag=String.fromCharCode(this.buffer[0])+String.fromCharCode(this.buffer[1]),this.pos+=2,["BM","BA","CI","CP","IC","PT"].indexOf(this.flag)===-1)throw new Error("Invalid BMP File");this.parseHeader(),this.parseBGR()}function Du(r){function t(z){if(!z)throw Error("assert :P")}function e(z,nt,pt){for(var k=0;4>k;k++)if(z[nt+k]!=pt.charCodeAt(k))return!0;return!1}function i(z,nt,pt,k,C){for(var W=0;W<C;W++)z[nt+W]=pt[k+W]}function o(z,nt,pt,k){for(var C=0;C<k;C++)z[nt+C]=pt}function a(z){return new Int32Array(z)}function u(z,nt){for(var pt=[],k=0;k<z;k++)pt.push(new nt);return pt}function h(z,nt){var pt=[];return function k(C,W,R){for(var st=R[W],at=0;at<st&&(C.push(R.length>W+1?[]:new nt),!(R.length<W+1));at++)k(C[at],W+1,R)}(pt,0,z),pt}var f=function(){var z=this;function nt(n,s){for(var c=1<<s-1>>>0;n&c;)c>>>=1;return c?(n&c-1)+c:n}function pt(n,s,c,g,b){t(!(g%c));do n[s+(g-=c)]=b;while(0<g)}function k(n,s,c,g,b){if(t(2328>=b),512>=b)var x=a(512);else if((x=a(b))==null)return 0;return function(L,N,S,I,U,K){var Z,Y,mt=N,ot=1<<S,H=a(16),V=a(16);for(t(U!=0),t(I!=null),t(L!=null),t(0<S),Y=0;Y<U;++Y){if(15<I[Y])return 0;++H[I[Y]]}if(H[0]==U)return 0;for(V[1]=0,Z=1;15>Z;++Z){if(H[Z]>1<<Z)return 0;V[Z+1]=V[Z]+H[Z]}for(Y=0;Y<U;++Y)Z=I[Y],0<I[Y]&&(K[V[Z]++]=Y);if(V[15]==1)return(I=new C).g=0,I.value=K[0],pt(L,mt,1,ot,I),ot;var gt,bt=-1,vt=ot-1,Dt=0,St=1,Tt=1,Pt=1<<S;for(Y=0,Z=1,U=2;Z<=S;++Z,U<<=1){if(St+=Tt<<=1,0>(Tt-=H[Z]))return 0;for(;0<H[Z];--H[Z])(I=new C).g=Z,I.value=K[Y++],pt(L,mt+Dt,U,Pt,I),Dt=nt(Dt,Z)}for(Z=S+1,U=2;15>=Z;++Z,U<<=1){if(St+=Tt<<=1,0>(Tt-=H[Z]))return 0;for(;0<H[Z];--H[Z]){if(I=new C,(Dt&vt)!=bt){for(mt+=Pt,gt=1<<(bt=Z)-S;15>bt&&!(0>=(gt-=H[bt]));)++bt,gt<<=1;ot+=Pt=1<<(gt=bt-S),L[N+(bt=Dt&vt)].g=gt+S,L[N+bt].value=mt-N-bt}I.g=Z-S,I.value=K[Y++],pt(L,mt+(Dt>>S),U,Pt,I),Dt=nt(Dt,Z)}}return St!=2*V[15]-1?0:ot}(n,s,c,g,b,x)}function C(){this.value=this.g=0}function W(){this.value=this.g=0}function R(){this.G=u(5,C),this.H=a(5),this.jc=this.Qb=this.qb=this.nd=0,this.pd=u(Ve,W)}function st(n,s,c,g){t(n!=null),t(s!=null),t(2147483648>g),n.Ca=254,n.I=0,n.b=-8,n.Ka=0,n.oa=s,n.pa=c,n.Jd=s,n.Yc=c+g,n.Zc=4<=g?c+g-4+1:c,Q(n)}function at(n,s){for(var c=0;0<s--;)c|=rt(n,128)<<s;return c}function ft(n,s){var c=at(n,s);return et(n)?-c:c}function $(n,s,c,g){var b,x=0;for(t(n!=null),t(s!=null),t(4294967288>g),n.Sb=g,n.Ra=0,n.u=0,n.h=0,4<g&&(g=4),b=0;b<g;++b)x+=s[c+b]<<8*b;n.Ra=x,n.bb=g,n.oa=s,n.pa=c}function ht(n){for(;8<=n.u&&n.bb<n.Sb;)n.Ra>>>=8,n.Ra+=n.oa[n.pa+n.bb]<<mi-8>>>0,++n.bb,n.u-=8;M(n)&&(n.h=1,n.u=0)}function dt(n,s){if(t(0<=s),!n.h&&s<=vi){var c=j(n)&gi[s];return n.u+=s,ht(n),c}return n.h=1,n.u=0}function jt(){this.b=this.Ca=this.I=0,this.oa=[],this.pa=0,this.Jd=[],this.Yc=0,this.Zc=[],this.Ka=0}function A(){this.Ra=0,this.oa=[],this.h=this.u=this.bb=this.Sb=this.pa=0}function j(n){return n.Ra>>>(n.u&mi-1)>>>0}function M(n){return t(n.bb<=n.Sb),n.h||n.bb==n.Sb&&n.u>mi}function q(n,s){n.u=s,n.h=M(n)}function J(n){n.u>=ea&&(t(n.u>=ea),ht(n))}function Q(n){t(n!=null&&n.oa!=null),n.pa<n.Zc?(n.I=(n.oa[n.pa++]|n.I<<8)>>>0,n.b+=8):(t(n!=null&&n.oa!=null),n.pa<n.Yc?(n.b+=8,n.I=n.oa[n.pa++]|n.I<<8):n.Ka?n.b=0:(n.I<<=8,n.b+=8,n.Ka=1))}function et(n){return at(n,1)}function rt(n,s){var c=n.Ca;0>n.b&&Q(n);var g=n.b,b=c*s>>>8,x=(n.I>>>g>b)+0;for(x?(c-=b,n.I-=b+1<<g>>>0):c=b+1,g=c,b=0;256<=g;)b+=8,g>>=8;return g=7^b+or[g],n.b-=g,n.Ca=(c<<g)-1,x}function At(n,s,c){n[s+0]=c>>24&255,n[s+1]=c>>16&255,n[s+2]=c>>8&255,n[s+3]=c>>0&255}function Lt(n,s){return n[s+0]<<0|n[s+1]<<8}function Ft(n,s){return Lt(n,s)|n[s+2]<<16}function _t(n,s){return Lt(n,s)|Lt(n,s+2)<<16}function Ut(n,s){var c=1<<s;return t(n!=null),t(0<s),n.X=a(c),n.X==null?0:(n.Mb=32-s,n.Xa=s,1)}function ct(n,s){t(n!=null),t(s!=null),t(n.Xa==s.Xa),i(s.X,0,n.X,0,1<<s.Xa)}function E(){this.X=[],this.Xa=this.Mb=0}function Kt(n,s,c,g){t(c!=null),t(g!=null);var b=c[0],x=g[0];return b==0&&(b=(n*x+s/2)/s),x==0&&(x=(s*b+n/2)/n),0>=b||0>=x?0:(c[0]=b,g[0]=x,1)}function Mt(n,s){return n+(1<<s)-1>>>s}function xt(n,s){return((4278255360&n)+(4278255360&s)>>>0&4278255360)+((16711935&n)+(16711935&s)>>>0&16711935)>>>0}function Nt(n,s){z[s]=function(c,g,b,x,L,N,S){var I;for(I=0;I<L;++I){var U=z[n](N[S+I-1],b,x+I);N[S+I]=xt(c[g+I],U)}}}function Ct(){this.ud=this.hd=this.jd=0}function kt(n,s){return((4278124286&(n^s))>>>1)+(n&s)>>>0}function Et(n){return 0<=n&&256>n?n:0>n?0:255<n?255:void 0}function Gt(n,s){return Et(n+(n-s+.5>>1))}function Qt(n,s,c){return Math.abs(s-c)-Math.abs(n-c)}function te(n,s,c,g,b,x,L){for(g=x[L-1],c=0;c<b;++c)x[L+c]=g=xt(n[s+c],g)}function ie(n,s,c,g,b){var x;for(x=0;x<c;++x){var L=n[s+x],N=L>>8&255,S=16711935&(S=(S=16711935&L)+((N<<16)+N));g[b+x]=(4278255360&L)+S>>>0}}function de(n,s){s.jd=n>>0&255,s.hd=n>>8&255,s.ud=n>>16&255}function Wt(n,s,c,g,b,x){var L;for(L=0;L<g;++L){var N=s[c+L],S=N>>>8,I=N,U=255&(U=(U=N>>>16)+((n.jd<<24>>24)*(S<<24>>24)>>>5));I=255&(I=(I=I+((n.hd<<24>>24)*(S<<24>>24)>>>5))+((n.ud<<24>>24)*(U<<24>>24)>>>5)),b[x+L]=(4278255360&N)+(U<<16)+I}}function ee(n,s,c,g,b){z[s]=function(x,L,N,S,I,U,K,Z,Y){for(S=K;S<Z;++S)for(K=0;K<Y;++K)I[U++]=b(N[g(x[L++])])},z[n]=function(x,L,N,S,I,U,K){var Z=8>>x.b,Y=x.Ea,mt=x.K[0],ot=x.w;if(8>Z)for(x=(1<<x.b)-1,ot=(1<<Z)-1;L<N;++L){var H,V=0;for(H=0;H<Y;++H)H&x||(V=g(S[I++])),U[K++]=b(mt[V&ot]),V>>=Z}else z["VP8LMapColor"+c](S,I,mt,ot,U,K,L,N,Y)}}function It(n,s,c,g,b){for(c=s+c;s<c;){var x=n[s++];g[b++]=x>>16&255,g[b++]=x>>8&255,g[b++]=x>>0&255}}function Ye(n,s,c,g,b){for(c=s+c;s<c;){var x=n[s++];g[b++]=x>>16&255,g[b++]=x>>8&255,g[b++]=x>>0&255,g[b++]=x>>24&255}}function oe(n,s,c,g,b){for(c=s+c;s<c;){var x=(L=n[s++])>>16&240|L>>12&15,L=L>>0&240|L>>28&15;g[b++]=x,g[b++]=L}}function Sr(n,s,c,g,b){for(c=s+c;s<c;){var x=(L=n[s++])>>16&248|L>>13&7,L=L>>5&224|L>>3&31;g[b++]=x,g[b++]=L}}function ge(n,s,c,g,b){for(c=s+c;s<c;){var x=n[s++];g[b++]=x>>0&255,g[b++]=x>>8&255,g[b++]=x>>16&255}}function xe(n,s,c,g,b,x){if(x==0)for(c=s+c;s<c;)At(g,((x=n[s++])[0]>>24|x[1]>>8&65280|x[2]<<8&16711680|x[3]<<24)>>>0),b+=32;else i(g,b,n,s,c)}function zr(n,s){z[s][0]=z[n+"0"],z[s][1]=z[n+"1"],z[s][2]=z[n+"2"],z[s][3]=z[n+"3"],z[s][4]=z[n+"4"],z[s][5]=z[n+"5"],z[s][6]=z[n+"6"],z[s][7]=z[n+"7"],z[s][8]=z[n+"8"],z[s][9]=z[n+"9"],z[s][10]=z[n+"10"],z[s][11]=z[n+"11"],z[s][12]=z[n+"12"],z[s][13]=z[n+"13"],z[s][14]=z[n+"0"],z[s][15]=z[n+"0"]}function ue(n){return n==$o||n==Qo||n==Ja||n==ts}function Bn(){this.eb=[],this.size=this.A=this.fb=0}function Ae(){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 _r(){this.Rd=this.height=this.width=this.S=0,this.f={},this.f.RGBA=new Bn,this.f.kb=new Ae,this.sd=null}function en(){this.width=[0],this.height=[0],this.Pd=[0],this.Qd=[0],this.format=[0]}function Ne(){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 Yt(n){return alert("todo:WebPSamplerProcessPlane"),n.T}function le(n,s){var c=n.T,g=s.ba.f.RGBA,b=g.eb,x=g.fb+n.ka*g.A,L=Ar[s.ba.S],N=n.y,S=n.O,I=n.f,U=n.N,K=n.ea,Z=n.W,Y=s.cc,mt=s.dc,ot=s.Mc,H=s.Nc,V=n.ka,gt=n.ka+n.T,bt=n.U,vt=bt+1>>1;for(V==0?L(N,S,null,null,I,U,K,Z,I,U,K,Z,b,x,null,null,bt):(L(s.ec,s.fc,N,S,Y,mt,ot,H,I,U,K,Z,b,x-g.A,b,x,bt),++c);V+2<gt;V+=2)Y=I,mt=U,ot=K,H=Z,U+=n.Rc,Z+=n.Rc,x+=2*g.A,L(N,(S+=2*n.fa)-n.fa,N,S,Y,mt,ot,H,I,U,K,Z,b,x-g.A,b,x,bt);return S+=n.fa,n.j+gt<n.o?(i(s.ec,s.fc,N,S,bt),i(s.cc,s.dc,I,U,vt),i(s.Mc,s.Nc,K,Z,vt),c--):1&gt||L(N,S,null,null,I,U,K,Z,I,U,K,Z,b,x+g.A,null,null,bt),c}function Mn(n,s,c){var g=n.F,b=[n.J];if(g!=null){var x=n.U,L=s.ba.S,N=L==Ya||L==Ja;s=s.ba.f.RGBA;var S=[0],I=n.ka;S[0]=n.T,n.Kb&&(I==0?--S[0]:(--I,b[0]-=n.width),n.j+n.ka+n.T==n.o&&(S[0]=n.o-n.j-I));var U=s.eb;I=s.fb+I*s.A,n=ye(g,b[0],n.width,x,S,U,I+(N?0:3),s.A),t(c==S),n&&ue(L)&&xr(U,I,N,x,S,s.A)}return 0}function We(n){var s=n.ma,c=s.ba.S,g=11>c,b=c==Va||c==Ga||c==Ya||c==Zo||c==12||ue(c);if(s.memory=null,s.Ib=null,s.Jb=null,s.Nd=null,!Qi(s.Oa,n,b?11:12))return 0;if(b&&ue(c)&&yt(),n.da)alert("todo:use_scaling");else{if(g){if(s.Ib=Yt,n.Kb){if(c=n.U+1>>1,s.memory=a(n.U+2*c),s.memory==null)return 0;s.ec=s.memory,s.fc=0,s.cc=s.ec,s.dc=s.fc+n.U,s.Mc=s.cc,s.Nc=s.dc+c,s.Ib=le,yt()}}else alert("todo:EmitYUV");b&&(s.Jb=Mn,g&&X())}if(g&&!$s){for(n=0;256>n;++n)Hl[n]=89858*(n-128)+Ka>>Xa,Gl[n]=-22014*(n-128)+Ka,Vl[n]=-45773*(n-128),Wl[n]=113618*(n-128)+Ka>>Xa;for(n=ua;n<ns;++n)s=76283*(n-16)+Ka>>Xa,Yl[n-ua]=cr(s,255),Jl[n-ua]=cr(s+8>>4,15);$s=1}return 1}function Ur(n){var s=n.ma,c=n.U,g=n.T;return t(!(1&n.ka)),0>=c||0>=g?0:(c=s.Ib(n,s),s.Jb!=null&&s.Jb(n,s,c),s.Dc+=c,1)}function Hr(n){n.ma.memory=null}function qt(n,s,c,g){return dt(n,8)!=47?0:(s[0]=dt(n,14)+1,c[0]=dt(n,14)+1,g[0]=dt(n,1),dt(n,3)!=0?0:!n.h)}function Pr(n,s){if(4>n)return n+1;var c=n-2>>1;return(2+(1&n)<<c)+dt(s,c)+1}function Wr(n,s){return 120<s?s-120:1<=(c=((c=Fl[s-1])>>4)*n+(8-(15&c)))?c:1;var c}function ir(n,s,c){var g=j(c),b=n[s+=255&g].g-8;return 0<b&&(q(c,c.u+8),g=j(c),s+=n[s].value,s+=g&(1<<b)-1),q(c,c.u+n[s].g),n[s].value}function Re(n,s,c){return c.g+=n.g,c.value+=n.value<<s>>>0,t(8>=c.g),n.g}function De(n,s,c){var g=n.xc;return t((s=g==0?0:n.vc[n.md*(c>>g)+(s>>g)])<n.Wb),n.Ya[s]}function fr(n,s,c,g){var b=n.ab,x=n.c*s,L=n.C;s=L+s;var N=c,S=g;for(g=n.Ta,c=n.Ua;0<b--;){var I=n.gc[b],U=L,K=s,Z=N,Y=S,mt=(S=g,N=c,I.Ea);switch(t(U<K),t(K<=I.nc),I.hc){case 2:Ra(Z,Y,(K-U)*mt,S,N);break;case 0:var ot=U,H=K,V=S,gt=N,bt=(Pt=I).Ea;ot==0&&(Xo(Z,Y,null,null,1,V,gt),te(Z,Y+1,0,0,bt-1,V,gt+1),Y+=bt,gt+=bt,++ot);for(var vt=1<<Pt.b,Dt=vt-1,St=Mt(bt,Pt.b),Tt=Pt.K,Pt=Pt.w+(ot>>Pt.b)*St;ot<H;){var se=Tt,fe=Pt,ae=1;for(ra(Z,Y,V,gt-bt,1,V,gt);ae<bt;){var re=(ae&~Dt)+vt;re>bt&&(re=bt),(0,yn[se[fe++]>>8&15])(Z,Y+ +ae,V,gt+ae-bt,re-ae,V,gt+ae),ae=re}Y+=bt,gt+=bt,++ot&Dt||(Pt+=St)}K!=I.nc&&i(S,N-mt,S,N+(K-U-1)*mt,mt);break;case 1:for(mt=Z,H=Y,bt=(Z=I.Ea)-(gt=Z&~(V=(Y=1<<I.b)-1)),ot=Mt(Z,I.b),vt=I.K,I=I.w+(U>>I.b)*ot;U<K;){for(Dt=vt,St=I,Tt=new Ct,Pt=H+gt,se=H+Z;H<Pt;)de(Dt[St++],Tt),Un(Tt,mt,H,Y,S,N),H+=Y,N+=Y;H<se&&(de(Dt[St++],Tt),Un(Tt,mt,H,bt,S,N),H+=bt,N+=bt),++U&V||(I+=ot)}break;case 3:if(Z==S&&Y==N&&0<I.b){for(H=S,Z=mt=N+(K-U)*mt-(gt=(K-U)*Mt(I.Ea,I.b)),Y=S,V=N,ot=[],gt=(bt=gt)-1;0<=gt;--gt)ot[gt]=Y[V+gt];for(gt=bt-1;0<=gt;--gt)H[Z+gt]=ot[gt];br(I,U,K,S,mt,S,N)}else br(I,U,K,Z,Y,S,N)}N=g,S=c}S!=c&&i(g,c,N,S,x)}function $n(n,s){var c=n.V,g=n.Ba+n.c*n.C,b=s-n.C;if(t(s<=n.l.o),t(16>=b),0<b){var x=n.l,L=n.Ta,N=n.Ua,S=x.width;if(fr(n,b,c,g),b=N=[N],t((c=n.C)<(g=s)),t(x.v<x.va),g>x.o&&(g=x.o),c<x.j){var I=x.j-c;c=x.j,b[0]+=I*S}if(c>=g?c=0:(b[0]+=4*x.v,x.ka=c-x.j,x.U=x.va-x.v,x.T=g-c,c=1),c){if(N=N[0],11>(c=n.ca).S){var U=c.f.RGBA,K=(g=c.S,b=x.U,x=x.T,I=U.eb,U.A),Z=x;for(U=U.fb+n.Ma*U.A;0<Z--;){var Y=L,mt=N,ot=b,H=I,V=U;switch(g){case Wa:sr(Y,mt,ot,H,V);break;case Va:er(Y,mt,ot,H,V);break;case $o:er(Y,mt,ot,H,V),xr(H,V,0,ot,1,0);break;case Hs:sn(Y,mt,ot,H,V);break;case Ga:xe(Y,mt,ot,H,V,1);break;case Qo:xe(Y,mt,ot,H,V,1),xr(H,V,0,ot,1,0);break;case Ya:xe(Y,mt,ot,H,V,0);break;case Ja:xe(Y,mt,ot,H,V,0),xr(H,V,1,ot,1,0);break;case Zo:wn(Y,mt,ot,H,V);break;case ts:wn(Y,mt,ot,H,V),be(H,V,ot,1,0);break;case Ws:on(Y,mt,ot,H,V);break;default:t(0)}N+=S,U+=K}n.Ma+=x}else alert("todo:EmitRescaledRowsYUVA");t(n.Ma<=c.height)}}n.C=s,t(n.C<=n.i)}function rn(n){var s;if(0<n.ua)return 0;for(s=0;s<n.Wb;++s){var c=n.Ya[s].G,g=n.Ya[s].H;if(0<c[1][g[1]+0].g||0<c[2][g[2]+0].g||0<c[3][g[3]+0].g)return 0}return 1}function kr(n,s,c,g,b,x){if(n.Z!=0){var L=n.qd,N=n.rd;for(t(Nn[n.Z]!=null);s<c;++s)Nn[n.Z](L,N,g,b,g,b,x),L=g,N=b,b+=x;n.qd=L,n.rd=N}}function Fr(n,s){var c=n.l.ma,g=c.Z==0||c.Z==1?n.l.j:n.C;if(g=n.C<g?g:n.C,t(s<=n.l.o),s>g){var b=n.l.width,x=c.ca,L=c.tb+b*g,N=n.V,S=n.Ba+n.c*g,I=n.gc;t(n.ab==1),t(I[0].hc==3),Ta(I[0],g,s,N,S,x,L),kr(c,g,s,x,L,b)}n.C=n.Ma=s}function Cr(n,s,c,g,b,x,L){var N=n.$/g,S=n.$%g,I=n.m,U=n.s,K=c+n.$,Z=K;b=c+g*b;var Y=c+g*x,mt=280+U.ua,ot=n.Pb?N:16777216,H=0<U.ua?U.Wa:null,V=U.wc,gt=K<Y?De(U,S,N):null;t(n.C<x),t(Y<=b);var bt=!1;t:for(;;){for(;bt||K<Y;){var vt=0;if(N>=ot){var Dt=K-c;t((ot=n).Pb),ot.wd=ot.m,ot.xd=Dt,0<ot.s.ua&&ct(ot.s.Wa,ot.s.vb),ot=N+Il}if(S&V||(gt=De(U,S,N)),t(gt!=null),gt.Qb&&(s[K]=gt.qb,bt=!0),!bt)if(J(I),gt.jc){vt=I,Dt=s;var St=K,Tt=gt.pd[j(vt)&Ve-1];t(gt.jc),256>Tt.g?(q(vt,vt.u+Tt.g),Dt[St]=Tt.value,vt=0):(q(vt,vt.u+Tt.g-256),t(256<=Tt.value),vt=Tt.value),vt==0&&(bt=!0)}else vt=ir(gt.G[0],gt.H[0],I);if(I.h)break;if(bt||256>vt){if(!bt)if(gt.nd)s[K]=(gt.qb|vt<<8)>>>0;else{if(J(I),bt=ir(gt.G[1],gt.H[1],I),J(I),Dt=ir(gt.G[2],gt.H[2],I),St=ir(gt.G[3],gt.H[3],I),I.h)break;s[K]=(St<<24|bt<<16|vt<<8|Dt)>>>0}if(bt=!1,++K,++S>=g&&(S=0,++N,L!=null&&N<=x&&!(N%16)&&L(n,N),H!=null))for(;Z<K;)vt=s[Z++],H.X[(506832829*vt&4294967295)>>>H.Mb]=vt}else if(280>vt){if(vt=Pr(vt-256,I),Dt=ir(gt.G[4],gt.H[4],I),J(I),Dt=Wr(g,Dt=Pr(Dt,I)),I.h)break;if(K-c<Dt||b-K<vt)break t;for(St=0;St<vt;++St)s[K+St]=s[K+St-Dt];for(K+=vt,S+=vt;S>=g;)S-=g,++N,L!=null&&N<=x&&!(N%16)&&L(n,N);if(t(K<=b),S&V&&(gt=De(U,S,N)),H!=null)for(;Z<K;)vt=s[Z++],H.X[(506832829*vt&4294967295)>>>H.Mb]=vt}else{if(!(vt<mt))break t;for(bt=vt-280,t(H!=null);Z<K;)vt=s[Z++],H.X[(506832829*vt&4294967295)>>>H.Mb]=vt;vt=K,t(!(bt>>>(Dt=H).Xa)),s[vt]=Dt.X[bt],bt=!0}bt||t(I.h==M(I))}if(n.Pb&&I.h&&K<b)t(n.m.h),n.a=5,n.m=n.wd,n.$=n.xd,0<n.s.ua&&ct(n.s.vb,n.s.Wa);else{if(I.h)break t;L!=null&&L(n,N>x?x:N),n.a=0,n.$=K-c}return 1}return n.a=3,0}function Vr(n){t(n!=null),n.vc=null,n.yc=null,n.Ya=null;var s=n.Wa;s!=null&&(s.X=null),n.vb=null,t(n!=null)}function mr(){var n=new Jo;return n==null?null:(n.a=0,n.xb=Ys,zr("Predictor","VP8LPredictors"),zr("Predictor","VP8LPredictors_C"),zr("PredictorAdd","VP8LPredictorsAdd"),zr("PredictorAdd","VP8LPredictorsAdd_C"),Ra=ie,Un=Wt,sr=It,er=Ye,wn=oe,on=Sr,sn=ge,z.VP8LMapColor32b=bi,z.VP8LMapColor8b=qa,n)}function Gr(n,s,c,g,b){var x=1,L=[n],N=[s],S=g.m,I=g.s,U=null,K=0;t:for(;;){if(c)for(;x&&dt(S,1);){var Z=L,Y=N,mt=g,ot=1,H=mt.m,V=mt.gc[mt.ab],gt=dt(H,2);if(mt.Oc&1<<gt)x=0;else{switch(mt.Oc|=1<<gt,V.hc=gt,V.Ea=Z[0],V.nc=Y[0],V.K=[null],++mt.ab,t(4>=mt.ab),gt){case 0:case 1:V.b=dt(H,3)+2,ot=Gr(Mt(V.Ea,V.b),Mt(V.nc,V.b),0,mt,V.K),V.K=V.K[0];break;case 3:var bt,vt=dt(H,8)+1,Dt=16<vt?0:4<vt?1:2<vt?2:3;if(Z[0]=Mt(V.Ea,Dt),V.b=Dt,bt=ot=Gr(vt,1,0,mt,V.K)){var St,Tt=vt,Pt=V,se=1<<(8>>Pt.b),fe=a(se);if(fe==null)bt=0;else{var ae=Pt.K[0],re=Pt.w;for(fe[0]=Pt.K[0][0],St=1;St<1*Tt;++St)fe[St]=xt(ae[re+St],fe[St-1]);for(;St<4*se;++St)fe[St]=0;Pt.K[0]=null,Pt.K[0]=fe,bt=1}}ot=bt;break;case 2:break;default:t(0)}x=ot}}if(L=L[0],N=N[0],x&&dt(S,1)&&!(x=1<=(K=dt(S,4))&&11>=K)){g.a=3;break t}var ve;if(ve=x)e:{var pe,$t,Me,ur=g,Ee=L,lr=N,ce=K,pr=c,gr=ur.m,ze=ur.s,Ge=[null],nr=1,Nr=0,Kr=Cl[ce];r:for(;;){if(pr&&dt(gr,1)){var Ue=dt(gr,3)+2,fn=Mt(Ee,Ue),Yn=Mt(lr,Ue),Ai=fn*Yn;if(!Gr(fn,Yn,0,ur,Ge))break r;for(Ge=Ge[0],ze.xc=Ue,pe=0;pe<Ai;++pe){var Sn=Ge[pe]>>8&65535;Ge[pe]=Sn,Sn>=nr&&(nr=Sn+1)}}if(gr.h)break r;for($t=0;5>$t;++$t){var _e=Vs[$t];!$t&&0<ce&&(_e+=1<<ce),Nr<_e&&(Nr=_e)}var is=u(nr*Kr,C),eu=nr,ru=u(eu,R);if(ru==null)var $a=null;else t(65536>=eu),$a=ru;var la=a(Nr);if($a==null||la==null||is==null){ur.a=1;break r}var Qa=is;for(pe=Me=0;pe<nr;++pe){var Br=$a[pe],Ni=Br.G,Si=Br.H,nu=0,to=1,iu=0;for($t=0;5>$t;++$t){_e=Vs[$t],Ni[$t]=Qa,Si[$t]=Me,!$t&&0<ce&&(_e+=1<<ce);i:{var eo,as=_e,ro=ur,ha=la,Zl=Qa,$l=Me,os=0,_n=ro.m,Ql=dt(_n,1);if(o(ha,0,0,as),Ql){var th=dt(_n,1)+1,eh=dt(_n,1),au=dt(_n,eh==0?1:8);ha[au]=1,th==2&&(ha[au=dt(_n,8)]=1);var no=1}else{var ou=a(19),su=dt(_n,4)+4;if(19<su){ro.a=3;var io=0;break i}for(eo=0;eo<su;++eo)ou[kl[eo]]=dt(_n,3);var ss=void 0,fa=void 0,uu=ro,rh=ou,ao=as,lu=ha,us=0,Pn=uu.m,hu=8,fu=u(128,C);n:for(;k(fu,0,7,rh,19);){if(dt(Pn,1)){var nh=2+2*dt(Pn,3);if((ss=2+dt(Pn,nh))>ao)break n}else ss=ao;for(fa=0;fa<ao&&ss--;){J(Pn);var cu=fu[0+(127&j(Pn))];q(Pn,Pn.u+cu.g);var _i=cu.value;if(16>_i)lu[fa++]=_i,_i!=0&&(hu=_i);else{var ih=_i==16,du=_i-16,ah=_l[du],pu=dt(Pn,Sl[du])+ah;if(fa+pu>ao)break n;for(var oh=ih?hu:0;0<pu--;)lu[fa++]=oh}}us=1;break n}us||(uu.a=3),no=us}(no=no&&!_n.h)&&(os=k(Zl,$l,8,ha,as)),no&&os!=0?io=os:(ro.a=3,io=0)}if(io==0)break r;if(to&&Pl[$t]==1&&(to=Qa[Me].g==0),nu+=Qa[Me].g,Me+=io,3>=$t){var ca,ls=la[0];for(ca=1;ca<_e;++ca)la[ca]>ls&&(ls=la[ca]);iu+=ls}}if(Br.nd=to,Br.Qb=0,to&&(Br.qb=(Ni[3][Si[3]+0].value<<24|Ni[1][Si[1]+0].value<<16|Ni[2][Si[2]+0].value)>>>0,nu==0&&256>Ni[0][Si[0]+0].value&&(Br.Qb=1,Br.qb+=Ni[0][Si[0]+0].value<<8)),Br.jc=!Br.Qb&&6>iu,Br.jc){var oo,cn=Br;for(oo=0;oo<Ve;++oo){var kn=oo,Fn=cn.pd[kn],so=cn.G[0][cn.H[0]+kn];256<=so.value?(Fn.g=so.g+256,Fn.value=so.value):(Fn.g=0,Fn.value=0,kn>>=Re(so,8,Fn),kn>>=Re(cn.G[1][cn.H[1]+kn],16,Fn),kn>>=Re(cn.G[2][cn.H[2]+kn],0,Fn),Re(cn.G[3][cn.H[3]+kn],24,Fn))}}}ze.vc=Ge,ze.Wb=nr,ze.Ya=$a,ze.yc=is,ve=1;break e}ve=0}if(!(x=ve)){g.a=3;break t}if(0<K){if(I.ua=1<<K,!Ut(I.Wa,K)){g.a=1,x=0;break t}}else I.ua=0;var hs=g,gu=L,sh=N,fs=hs.s,cs=fs.xc;if(hs.c=gu,hs.i=sh,fs.md=Mt(gu,cs),fs.wc=cs==0?-1:(1<<cs)-1,c){g.xb=Rl;break t}if((U=a(L*N))==null){g.a=1,x=0;break t}x=(x=Cr(g,U,0,L,N,N,null))&&!S.h;break t}return x?(b!=null?b[0]=U:(t(U==null),t(c)),g.$=0,c||Vr(I)):Vr(I),x}function En(n,s){var c=n.c*n.i,g=c+s+16*s;return t(n.c<=s),n.V=a(g),n.V==null?(n.Ta=null,n.Ua=0,n.a=1,0):(n.Ta=n.V,n.Ua=n.Ba+c+s,1)}function Qn(n,s){var c=n.C,g=s-c,b=n.V,x=n.Ba+n.c*c;for(t(s<=n.l.o);0<g;){var L=16<g?16:g,N=n.l.ma,S=n.l.width,I=S*L,U=N.ca,K=N.tb+S*c,Z=n.Ta,Y=n.Ua;fr(n,L,b,x),Ce(Z,Y,U,K,I),kr(N,c,c+L,U,K,S),g-=L,b+=L*n.c,c+=L}t(c==s),n.C=n.Ma=s}function ti(){this.ub=this.yd=this.td=this.Rb=0}function ei(){this.Kd=this.Ld=this.Ud=this.Td=this.i=this.c=0}function ri(){this.Fb=this.Bb=this.Cb=0,this.Zb=a(4),this.Lb=a(4)}function ba(){this.Yb=function(){var n=[];return function s(c,g,b){for(var x=b[g],L=0;L<x&&(c.push(b.length>g+1?[]:0),!(b.length<g+1));L++)s(c[L],g+1,b)}(n,0,[3,11]),n}()}function So(){this.jb=a(3),this.Wc=h([4,8],ba),this.Xc=h([4,17],ba)}function _o(){this.Pc=this.wb=this.Tb=this.zd=0,this.vd=new a(4),this.od=new a(4)}function ni(){this.ld=this.La=this.dd=this.tc=0}function ya(){this.Na=this.la=0}function Po(){this.Sc=[0,0],this.Eb=[0,0],this.Qc=[0,0],this.ia=this.lc=0}function Ei(){this.ad=a(384),this.Za=0,this.Ob=a(16),this.$b=this.Ad=this.ia=this.Gc=this.Hc=this.Dd=0}function ko(){this.uc=this.M=this.Nb=0,this.wa=Array(new ni),this.Y=0,this.ya=Array(new Ei),this.aa=0,this.l=new ii}function wa(){this.y=a(16),this.f=a(8),this.ea=a(8)}function Fo(){this.cb=this.a=0,this.sc="",this.m=new jt,this.Od=new ti,this.Kc=new ei,this.ed=new _o,this.Qa=new ri,this.Ic=this.$c=this.Aa=0,this.D=new ko,this.Xb=this.Va=this.Hb=this.zb=this.yb=this.Ub=this.za=0,this.Jc=u(8,jt),this.ia=0,this.pb=u(4,Po),this.Pa=new So,this.Bd=this.kc=0,this.Ac=[],this.Bc=0,this.zc=[0,0,0,0],this.Gd=Array(new wa),this.Hd=0,this.rb=Array(new ya),this.sb=0,this.wa=Array(new ni),this.Y=0,this.oc=[],this.pc=0,this.sa=[],this.ta=0,this.qa=[],this.ra=0,this.Ha=[],this.B=this.R=this.Ia=0,this.Ec=[],this.M=this.ja=this.Vb=this.Fc=0,this.ya=Array(new Ei),this.L=this.aa=0,this.gd=h([4,2],ni),this.ga=null,this.Fa=[],this.Cc=this.qc=this.P=0,this.Gb=[],this.Uc=0,this.mb=[],this.nb=0,this.rc=[],this.Ga=this.Vc=0}function ii(){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 Co(){var n=new Fo;return n!=null&&(n.a=0,n.sc="OK",n.cb=0,n.Xb=0,sa||(sa=Aa)),n}function ke(n,s,c){return n.a==0&&(n.a=s,n.sc=c,n.cb=0),0}function xa(n,s,c){return 3<=c&&n[s+0]==157&&n[s+1]==1&&n[s+2]==42}function La(n,s){if(n==null)return 0;if(n.a=0,n.sc="OK",s==null)return ke(n,2,"null VP8Io passed to VP8GetHeaders()");var c=s.data,g=s.w,b=s.ha;if(4>b)return ke(n,7,"Truncated header.");var x=c[g+0]|c[g+1]<<8|c[g+2]<<16,L=n.Od;if(L.Rb=!(1&x),L.td=x>>1&7,L.yd=x>>4&1,L.ub=x>>5,3<L.td)return ke(n,3,"Incorrect keyframe parameters.");if(!L.yd)return ke(n,4,"Frame not displayable.");g+=3,b-=3;var N=n.Kc;if(L.Rb){if(7>b)return ke(n,7,"cannot parse picture header");if(!xa(c,g,b))return ke(n,3,"Bad code word");N.c=16383&(c[g+4]<<8|c[g+3]),N.Td=c[g+4]>>6,N.i=16383&(c[g+6]<<8|c[g+5]),N.Ud=c[g+6]>>6,g+=7,b-=7,n.za=N.c+15>>4,n.Ub=N.i+15>>4,s.width=N.c,s.height=N.i,s.Da=0,s.j=0,s.v=0,s.va=s.width,s.o=s.height,s.da=0,s.ib=s.width,s.hb=s.height,s.U=s.width,s.T=s.height,o((x=n.Pa).jb,0,255,x.jb.length),t((x=n.Qa)!=null),x.Cb=0,x.Bb=0,x.Fb=1,o(x.Zb,0,0,x.Zb.length),o(x.Lb,0,0,x.Lb)}if(L.ub>b)return ke(n,7,"bad partition length");st(x=n.m,c,g,L.ub),g+=L.ub,b-=L.ub,L.Rb&&(N.Ld=et(x),N.Kd=et(x)),N=n.Qa;var S,I=n.Pa;if(t(x!=null),t(N!=null),N.Cb=et(x),N.Cb){if(N.Bb=et(x),et(x)){for(N.Fb=et(x),S=0;4>S;++S)N.Zb[S]=et(x)?ft(x,7):0;for(S=0;4>S;++S)N.Lb[S]=et(x)?ft(x,6):0}if(N.Bb)for(S=0;3>S;++S)I.jb[S]=et(x)?at(x,8):255}else N.Bb=0;if(x.Ka)return ke(n,3,"cannot parse segment header");if((N=n.ed).zd=et(x),N.Tb=at(x,6),N.wb=at(x,3),N.Pc=et(x),N.Pc&&et(x)){for(I=0;4>I;++I)et(x)&&(N.vd[I]=ft(x,6));for(I=0;4>I;++I)et(x)&&(N.od[I]=ft(x,6))}if(n.L=N.Tb==0?0:N.zd?1:2,x.Ka)return ke(n,3,"cannot parse filter header");var U=b;if(b=S=g,g=S+U,N=U,n.Xb=(1<<at(n.m,2))-1,U<3*(I=n.Xb))c=7;else{for(S+=3*I,N-=3*I,U=0;U<I;++U){var K=c[b+0]|c[b+1]<<8|c[b+2]<<16;K>N&&(K=N),st(n.Jc[+U],c,S,K),S+=K,N-=K,b+=3}st(n.Jc[+I],c,S,N),c=S<g?0:5}if(c!=0)return ke(n,c,"cannot parse partitions");for(c=at(S=n.m,7),b=et(S)?ft(S,4):0,g=et(S)?ft(S,4):0,N=et(S)?ft(S,4):0,I=et(S)?ft(S,4):0,S=et(S)?ft(S,4):0,U=n.Qa,K=0;4>K;++K){if(U.Cb){var Z=U.Zb[K];U.Fb||(Z+=c)}else{if(0<K){n.pb[K]=n.pb[0];continue}Z=c}var Y=n.pb[K];Y.Sc[0]=es[cr(Z+b,127)],Y.Sc[1]=rs[cr(Z+0,127)],Y.Eb[0]=2*es[cr(Z+g,127)],Y.Eb[1]=101581*rs[cr(Z+N,127)]>>16,8>Y.Eb[1]&&(Y.Eb[1]=8),Y.Qc[0]=es[cr(Z+I,117)],Y.Qc[1]=rs[cr(Z+S,127)],Y.lc=Z+S}if(!L.Rb)return ke(n,4,"Not a key frame.");for(et(x),L=n.Pa,c=0;4>c;++c){for(b=0;8>b;++b)for(g=0;3>g;++g)for(N=0;11>N;++N)I=rt(x,Ml[c][b][g][N])?at(x,8):Dl[c][b][g][N],L.Wc[c][b].Yb[g][N]=I;for(b=0;17>b;++b)L.Xc[c][b]=L.Wc[c][El[b]]}return n.kc=et(x),n.kc&&(n.Bd=at(x,8)),n.cb=1}function Aa(n,s,c,g,b,x,L){var N=s[b].Yb[c];for(c=0;16>b;++b){if(!rt(n,N[c+0]))return b;for(;!rt(n,N[c+1]);)if(N=s[++b].Yb[0],c=0,b==16)return 16;var S=s[b+1].Yb;if(rt(n,N[c+2])){var I=n,U=0;if(rt(I,(Z=N)[(K=c)+3]))if(rt(I,Z[K+6])){for(N=0,K=2*(U=rt(I,Z[K+8]))+(Z=rt(I,Z[K+9+U])),U=0,Z=jl[K];Z[N];++N)U+=U+rt(I,Z[N]);U+=3+(8<<K)}else rt(I,Z[K+7])?(U=7+2*rt(I,165),U+=rt(I,145)):U=5+rt(I,159);else U=rt(I,Z[K+4])?3+rt(I,Z[K+5]):2;N=S[2]}else U=1,N=S[1];S=L+Ol[b],0>(I=n).b&&Q(I);var K,Z=I.b,Y=(K=I.Ca>>1)-(I.I>>Z)>>31;--I.b,I.Ca+=Y,I.Ca|=1,I.I-=(K+1&Y)<<Z,x[S]=((U^Y)-Y)*g[(0<b)+0]}return 16}function Ri(n){var s=n.rb[n.sb-1];s.la=0,s.Na=0,o(n.zc,0,0,n.zc.length),n.ja=0}function Io(n,s){if(n==null)return 0;if(s==null)return ke(n,2,"NULL VP8Io parameter in VP8Decode().");if(!n.cb&&!La(n,s))return 0;if(t(n.cb),s.ac==null||s.ac(s)){s.ob&&(n.L=0);var c=Za[n.L];if(n.L==2?(n.yb=0,n.zb=0):(n.yb=s.v-c>>4,n.zb=s.j-c>>4,0>n.yb&&(n.yb=0),0>n.zb&&(n.zb=0)),n.Va=s.o+15+c>>4,n.Hb=s.va+15+c>>4,n.Hb>n.za&&(n.Hb=n.za),n.Va>n.Ub&&(n.Va=n.Ub),0<n.L){var g=n.ed;for(c=0;4>c;++c){var b;if(n.Qa.Cb){var x=n.Qa.Lb[c];n.Qa.Fb||(x+=g.Tb)}else x=g.Tb;for(b=0;1>=b;++b){var L=n.gd[c][b],N=x;if(g.Pc&&(N+=g.vd[0],b&&(N+=g.od[0])),0<(N=0>N?0:63<N?63:N)){var S=N;0<g.wb&&(S=4<g.wb?S>>2:S>>1)>9-g.wb&&(S=9-g.wb),1>S&&(S=1),L.dd=S,L.tc=2*N+S,L.ld=40<=N?2:15<=N?1:0}else L.tc=0;L.La=b}}}c=0}else ke(n,6,"Frame setup failed"),c=n.a;if(c=c==0){if(c){n.$c=0,0<n.Aa||(n.Ic=Kl);t:{c=n.Ic,g=4*(S=n.za);var I=32*S,U=S+1,K=0<n.L?S*(0<n.Aa?2:1):0,Z=(n.Aa==2?2:1)*S;if((L=g+832+(b=3*(16*c+Za[n.L])/2*I)+(x=n.Fa!=null&&0<n.Fa.length?n.Kc.c*n.Kc.i:0))!=L)c=0;else{if(L>n.Vb){if(n.Vb=0,n.Ec=a(L),n.Fc=0,n.Ec==null){c=ke(n,1,"no memory during frame initialization.");break t}n.Vb=L}L=n.Ec,N=n.Fc,n.Ac=L,n.Bc=N,N+=g,n.Gd=u(I,wa),n.Hd=0,n.rb=u(U+1,ya),n.sb=1,n.wa=K?u(K,ni):null,n.Y=0,n.D.Nb=0,n.D.wa=n.wa,n.D.Y=n.Y,0<n.Aa&&(n.D.Y+=S),t(!0),n.oc=L,n.pc=N,N+=832,n.ya=u(Z,Ei),n.aa=0,n.D.ya=n.ya,n.D.aa=n.aa,n.Aa==2&&(n.D.aa+=S),n.R=16*S,n.B=8*S,S=(I=Za[n.L])*n.R,I=I/2*n.B,n.sa=L,n.ta=N+S,n.qa=n.sa,n.ra=n.ta+16*c*n.R+I,n.Ha=n.qa,n.Ia=n.ra+8*c*n.B+I,n.$c=0,N+=b,n.mb=x?L:null,n.nb=x?N:null,t(N+x<=n.Fc+n.Vb),Ri(n),o(n.Ac,n.Bc,0,g),c=1}}if(c){if(s.ka=0,s.y=n.sa,s.O=n.ta,s.f=n.qa,s.N=n.ra,s.ea=n.Ha,s.Vd=n.Ia,s.fa=n.R,s.Rc=n.B,s.F=null,s.J=0,!Ua){for(c=-255;255>=c;++c)Te[255+c]=0>c?-c:c;for(c=-1020;1020>=c;++c)ln[1020+c]=-128>c?-128:127<c?127:c;for(c=-112;112>=c;++c)oa[112+c]=-16>c?-16:15<c?15:c;for(c=-255;510>=c;++c)Li[255+c]=0>c?0:255<c?255:c;Ua=1}yi=Do,un=jo,na=Sa,rr=Oo,yr=_a,Fe=Na,wi=Wi,za=qn,ia=Yo,Hn=Vi,Wn=Go,xn=hi,Vn=Gi,xi=Ba,Gn=Da,Ln=Jr,aa=an,wr=Vo,Dr[0]=Yr,Dr[1]=Bo,Dr[2]=To,Dr[3]=qo,Dr[4]=Fa,Dr[5]=ui,Dr[6]=Ca,Dr[7]=zi,Dr[8]=Uo,Dr[9]=zo,An[0]=Pa,An[1]=Eo,An[2]=nn,An[3]=oi,An[4]=Je,An[5]=Ro,An[6]=ka,hn[0]=vn,hn[1]=Mo,hn[2]=Ho,hn[3]=Ui,hn[4]=Tn,hn[5]=Wo,hn[6]=Hi,c=1}else c=0}c&&(c=function(Y,mt){for(Y.M=0;Y.M<Y.Va;++Y.M){var ot,H=Y.Jc[Y.M&Y.Xb],V=Y.m,gt=Y;for(ot=0;ot<gt.za;++ot){var bt=V,vt=gt,Dt=vt.Ac,St=vt.Bc+4*ot,Tt=vt.zc,Pt=vt.ya[vt.aa+ot];if(vt.Qa.Bb?Pt.$b=rt(bt,vt.Pa.jb[0])?2+rt(bt,vt.Pa.jb[2]):rt(bt,vt.Pa.jb[1]):Pt.$b=0,vt.kc&&(Pt.Ad=rt(bt,vt.Bd)),Pt.Za=!rt(bt,145)+0,Pt.Za){var se=Pt.Ob,fe=0;for(vt=0;4>vt;++vt){var ae,re=Tt[0+vt];for(ae=0;4>ae;++ae){re=Bl[Dt[St+ae]][re];for(var ve=Gs[rt(bt,re[0])];0<ve;)ve=Gs[2*ve+rt(bt,re[ve])];re=-ve,Dt[St+ae]=re}i(se,fe,Dt,St,4),fe+=4,Tt[0+vt]=re}}else re=rt(bt,156)?rt(bt,128)?1:3:rt(bt,163)?2:0,Pt.Ob[0]=re,o(Dt,St,re,4),o(Tt,0,re,4);Pt.Dd=rt(bt,142)?rt(bt,114)?rt(bt,183)?1:3:2:0}if(gt.m.Ka)return ke(Y,7,"Premature end-of-partition0 encountered.");for(;Y.ja<Y.za;++Y.ja){if(gt=H,bt=(V=Y).rb[V.sb-1],Dt=V.rb[V.sb+V.ja],ot=V.ya[V.aa+V.ja],St=V.kc?ot.Ad:0)bt.la=Dt.la=0,ot.Za||(bt.Na=Dt.Na=0),ot.Hc=0,ot.Gc=0,ot.ia=0;else{var pe,$t;if(bt=Dt,Dt=gt,St=V.Pa.Xc,Tt=V.ya[V.aa+V.ja],Pt=V.pb[Tt.$b],vt=Tt.ad,se=0,fe=V.rb[V.sb-1],re=ae=0,o(vt,se,0,384),Tt.Za)var Me=0,ur=St[3];else{ve=a(16);var Ee=bt.Na+fe.Na;if(Ee=sa(Dt,St[1],Ee,Pt.Eb,0,ve,0),bt.Na=fe.Na=(0<Ee)+0,1<Ee)yi(ve,0,vt,se);else{var lr=ve[0]+3>>3;for(ve=0;256>ve;ve+=16)vt[se+ve]=lr}Me=1,ur=St[0]}var ce=15&bt.la,pr=15&fe.la;for(ve=0;4>ve;++ve){var gr=1&pr;for(lr=$t=0;4>lr;++lr)ce=ce>>1|(gr=(Ee=sa(Dt,ur,Ee=gr+(1&ce),Pt.Sc,Me,vt,se))>Me)<<7,$t=$t<<2|(3<Ee?3:1<Ee?2:vt[se+0]!=0),se+=16;ce>>=4,pr=pr>>1|gr<<7,ae=(ae<<8|$t)>>>0}for(ur=ce,Me=pr>>4,pe=0;4>pe;pe+=2){for($t=0,ce=bt.la>>4+pe,pr=fe.la>>4+pe,ve=0;2>ve;++ve){for(gr=1&pr,lr=0;2>lr;++lr)Ee=gr+(1&ce),ce=ce>>1|(gr=0<(Ee=sa(Dt,St[2],Ee,Pt.Qc,0,vt,se)))<<3,$t=$t<<2|(3<Ee?3:1<Ee?2:vt[se+0]!=0),se+=16;ce>>=2,pr=pr>>1|gr<<5}re|=$t<<4*pe,ur|=ce<<4<<pe,Me|=(240&pr)<<pe}bt.la=ur,fe.la=Me,Tt.Hc=ae,Tt.Gc=re,Tt.ia=43690&re?0:Pt.ia,St=!(ae|re)}if(0<V.L&&(V.wa[V.Y+V.ja]=V.gd[ot.$b][ot.Za],V.wa[V.Y+V.ja].La|=!St),gt.Ka)return ke(Y,7,"Premature end-of-file encountered.")}if(Ri(Y),V=mt,gt=1,ot=(H=Y).D,bt=0<H.L&&H.M>=H.zb&&H.M<=H.Va,H.Aa==0)t:{if(ot.M=H.M,ot.uc=bt,$i(H,ot),gt=1,ot=($t=H.D).Nb,bt=(re=Za[H.L])*H.R,Dt=re/2*H.B,ve=16*ot*H.R,lr=8*ot*H.B,St=H.sa,Tt=H.ta-bt+ve,Pt=H.qa,vt=H.ra-Dt+lr,se=H.Ha,fe=H.Ia-Dt+lr,pr=(ce=$t.M)==0,ae=ce>=H.Va-1,H.Aa==2&&$i(H,$t),$t.uc)for(gr=(Ee=H).D.M,t(Ee.D.uc),$t=Ee.yb;$t<Ee.Hb;++$t){Me=$t,ur=gr;var ze=(Ge=(_e=Ee).D).Nb;pe=_e.R;var Ge=Ge.wa[Ge.Y+Me],nr=_e.sa,Nr=_e.ta+16*ze*pe+16*Me,Kr=Ge.dd,Ue=Ge.tc;if(Ue!=0)if(t(3<=Ue),_e.L==1)0<Me&&Ln(nr,Nr,pe,Ue+4),Ge.La&&wr(nr,Nr,pe,Ue),0<ur&&Gn(nr,Nr,pe,Ue+4),Ge.La&&aa(nr,Nr,pe,Ue);else{var fn=_e.B,Yn=_e.qa,Ai=_e.ra+8*ze*fn+8*Me,Sn=_e.Ha,_e=_e.Ia+8*ze*fn+8*Me;ze=Ge.ld,0<Me&&(za(nr,Nr,pe,Ue+4,Kr,ze),Hn(Yn,Ai,Sn,_e,fn,Ue+4,Kr,ze)),Ge.La&&(xn(nr,Nr,pe,Ue,Kr,ze),xi(Yn,Ai,Sn,_e,fn,Ue,Kr,ze)),0<ur&&(wi(nr,Nr,pe,Ue+4,Kr,ze),ia(Yn,Ai,Sn,_e,fn,Ue+4,Kr,ze)),Ge.La&&(Wn(nr,Nr,pe,Ue,Kr,ze),Vn(Yn,Ai,Sn,_e,fn,Ue,Kr,ze))}}if(H.ia&&alert("todo:DitherRow"),V.put!=null){if($t=16*ce,ce=16*(ce+1),pr?(V.y=H.sa,V.O=H.ta+ve,V.f=H.qa,V.N=H.ra+lr,V.ea=H.Ha,V.W=H.Ia+lr):($t-=re,V.y=St,V.O=Tt,V.f=Pt,V.N=vt,V.ea=se,V.W=fe),ae||(ce-=re),ce>V.o&&(ce=V.o),V.F=null,V.J=null,H.Fa!=null&&0<H.Fa.length&&$t<ce&&(V.J=Ki(H,V,$t,ce-$t),V.F=H.mb,V.F==null&&V.F.length==0)){gt=ke(H,3,"Could not decode alpha data.");break t}$t<V.j&&(re=V.j-$t,$t=V.j,t(!(1&re)),V.O+=H.R*re,V.N+=H.B*(re>>1),V.W+=H.B*(re>>1),V.F!=null&&(V.J+=V.width*re)),$t<ce&&(V.O+=V.v,V.N+=V.v>>1,V.W+=V.v>>1,V.F!=null&&(V.J+=V.v),V.ka=$t-V.j,V.U=V.va-V.v,V.T=ce-$t,gt=V.put(V))}ot+1!=H.Ic||ae||(i(H.sa,H.ta-bt,St,Tt+16*H.R,bt),i(H.qa,H.ra-Dt,Pt,vt+8*H.B,Dt),i(H.Ha,H.Ia-Dt,se,fe+8*H.B,Dt))}if(!gt)return ke(Y,6,"Output aborted.")}return 1}(n,s)),s.bc!=null&&s.bc(s),c&=1}return c?(n.cb=0,c):0}function Ir(n,s,c,g,b){b=n[s+c+32*g]+(b>>3),n[s+c+32*g]=-256&b?0>b?0:255:b}function ai(n,s,c,g,b,x){Ir(n,s,0,c,g+b),Ir(n,s,1,c,g+x),Ir(n,s,2,c,g-x),Ir(n,s,3,c,g-b)}function ar(n){return(20091*n>>16)+n}function Ti(n,s,c,g){var b,x=0,L=a(16);for(b=0;4>b;++b){var N=n[s+0]+n[s+8],S=n[s+0]-n[s+8],I=(35468*n[s+4]>>16)-ar(n[s+12]),U=ar(n[s+4])+(35468*n[s+12]>>16);L[x+0]=N+U,L[x+1]=S+I,L[x+2]=S-I,L[x+3]=N-U,x+=4,s++}for(b=x=0;4>b;++b)N=(n=L[x+0]+4)+L[x+8],S=n-L[x+8],I=(35468*L[x+4]>>16)-ar(L[x+12]),Ir(c,g,0,0,N+(U=ar(L[x+4])+(35468*L[x+12]>>16))),Ir(c,g,1,0,S+I),Ir(c,g,2,0,S-I),Ir(c,g,3,0,N-U),x++,g+=32}function Na(n,s,c,g){var b=n[s+0]+4,x=35468*n[s+4]>>16,L=ar(n[s+4]),N=35468*n[s+1]>>16;ai(c,g,0,b+L,n=ar(n[s+1]),N),ai(c,g,1,b+x,n,N),ai(c,g,2,b-x,n,N),ai(c,g,3,b-L,n,N)}function jo(n,s,c,g,b){Ti(n,s,c,g),b&&Ti(n,s+16,c,g+4)}function Sa(n,s,c,g){un(n,s+0,c,g,1),un(n,s+32,c,g+128,1)}function Oo(n,s,c,g){var b;for(n=n[s+0]+4,b=0;4>b;++b)for(s=0;4>s;++s)Ir(c,g,s,b,n)}function _a(n,s,c,g){n[s+0]&&rr(n,s+0,c,g),n[s+16]&&rr(n,s+16,c,g+4),n[s+32]&&rr(n,s+32,c,g+128),n[s+48]&&rr(n,s+48,c,g+128+4)}function Do(n,s,c,g){var b,x=a(16);for(b=0;4>b;++b){var L=n[s+0+b]+n[s+12+b],N=n[s+4+b]+n[s+8+b],S=n[s+4+b]-n[s+8+b],I=n[s+0+b]-n[s+12+b];x[0+b]=L+N,x[8+b]=L-N,x[4+b]=I+S,x[12+b]=I-S}for(b=0;4>b;++b)L=(n=x[0+4*b]+3)+x[3+4*b],N=x[1+4*b]+x[2+4*b],S=x[1+4*b]-x[2+4*b],I=n-x[3+4*b],c[g+0]=L+N>>3,c[g+16]=I+S>>3,c[g+32]=L-N>>3,c[g+48]=I-S>>3,g+=64}function qi(n,s,c){var g,b=s-32,x=dr,L=255-n[b-1];for(g=0;g<c;++g){var N,S=x,I=L+n[s-1];for(N=0;N<c;++N)n[s+N]=S[I+n[b+N]];s+=32}}function Bo(n,s){qi(n,s,4)}function Mo(n,s){qi(n,s,8)}function Eo(n,s){qi(n,s,16)}function nn(n,s){var c;for(c=0;16>c;++c)i(n,s+32*c,n,s-32,16)}function oi(n,s){var c;for(c=16;0<c;--c)o(n,s,n[s-1],16),s+=32}function si(n,s,c){var g;for(g=0;16>g;++g)o(s,c+32*g,n,16)}function Pa(n,s){var c,g=16;for(c=0;16>c;++c)g+=n[s-1+32*c]+n[s+c-32];si(g>>5,n,s)}function Je(n,s){var c,g=8;for(c=0;16>c;++c)g+=n[s-1+32*c];si(g>>4,n,s)}function Ro(n,s){var c,g=8;for(c=0;16>c;++c)g+=n[s+c-32];si(g>>4,n,s)}function ka(n,s){si(128,n,s)}function Vt(n,s,c){return n+2*s+c+2>>2}function To(n,s){var c,g=s-32;for(g=new Uint8Array([Vt(n[g-1],n[g+0],n[g+1]),Vt(n[g+0],n[g+1],n[g+2]),Vt(n[g+1],n[g+2],n[g+3]),Vt(n[g+2],n[g+3],n[g+4])]),c=0;4>c;++c)i(n,s+32*c,g,0,g.length)}function qo(n,s){var c=n[s-1],g=n[s-1+32],b=n[s-1+64],x=n[s-1+96];At(n,s+0,16843009*Vt(n[s-1-32],c,g)),At(n,s+32,16843009*Vt(c,g,b)),At(n,s+64,16843009*Vt(g,b,x)),At(n,s+96,16843009*Vt(b,x,x))}function Yr(n,s){var c,g=4;for(c=0;4>c;++c)g+=n[s+c-32]+n[s-1+32*c];for(g>>=3,c=0;4>c;++c)o(n,s+32*c,g,4)}function Fa(n,s){var c=n[s-1+0],g=n[s-1+32],b=n[s-1+64],x=n[s-1-32],L=n[s+0-32],N=n[s+1-32],S=n[s+2-32],I=n[s+3-32];n[s+0+96]=Vt(g,b,n[s-1+96]),n[s+1+96]=n[s+0+64]=Vt(c,g,b),n[s+2+96]=n[s+1+64]=n[s+0+32]=Vt(x,c,g),n[s+3+96]=n[s+2+64]=n[s+1+32]=n[s+0+0]=Vt(L,x,c),n[s+3+64]=n[s+2+32]=n[s+1+0]=Vt(N,L,x),n[s+3+32]=n[s+2+0]=Vt(S,N,L),n[s+3+0]=Vt(I,S,N)}function Ca(n,s){var c=n[s+1-32],g=n[s+2-32],b=n[s+3-32],x=n[s+4-32],L=n[s+5-32],N=n[s+6-32],S=n[s+7-32];n[s+0+0]=Vt(n[s+0-32],c,g),n[s+1+0]=n[s+0+32]=Vt(c,g,b),n[s+2+0]=n[s+1+32]=n[s+0+64]=Vt(g,b,x),n[s+3+0]=n[s+2+32]=n[s+1+64]=n[s+0+96]=Vt(b,x,L),n[s+3+32]=n[s+2+64]=n[s+1+96]=Vt(x,L,N),n[s+3+64]=n[s+2+96]=Vt(L,N,S),n[s+3+96]=Vt(N,S,S)}function ui(n,s){var c=n[s-1+0],g=n[s-1+32],b=n[s-1+64],x=n[s-1-32],L=n[s+0-32],N=n[s+1-32],S=n[s+2-32],I=n[s+3-32];n[s+0+0]=n[s+1+64]=x+L+1>>1,n[s+1+0]=n[s+2+64]=L+N+1>>1,n[s+2+0]=n[s+3+64]=N+S+1>>1,n[s+3+0]=S+I+1>>1,n[s+0+96]=Vt(b,g,c),n[s+0+64]=Vt(g,c,x),n[s+0+32]=n[s+1+96]=Vt(c,x,L),n[s+1+32]=n[s+2+96]=Vt(x,L,N),n[s+2+32]=n[s+3+96]=Vt(L,N,S),n[s+3+32]=Vt(N,S,I)}function zi(n,s){var c=n[s+0-32],g=n[s+1-32],b=n[s+2-32],x=n[s+3-32],L=n[s+4-32],N=n[s+5-32],S=n[s+6-32],I=n[s+7-32];n[s+0+0]=c+g+1>>1,n[s+1+0]=n[s+0+64]=g+b+1>>1,n[s+2+0]=n[s+1+64]=b+x+1>>1,n[s+3+0]=n[s+2+64]=x+L+1>>1,n[s+0+32]=Vt(c,g,b),n[s+1+32]=n[s+0+96]=Vt(g,b,x),n[s+2+32]=n[s+1+96]=Vt(b,x,L),n[s+3+32]=n[s+2+96]=Vt(x,L,N),n[s+3+64]=Vt(L,N,S),n[s+3+96]=Vt(N,S,I)}function zo(n,s){var c=n[s-1+0],g=n[s-1+32],b=n[s-1+64],x=n[s-1+96];n[s+0+0]=c+g+1>>1,n[s+2+0]=n[s+0+32]=g+b+1>>1,n[s+2+32]=n[s+0+64]=b+x+1>>1,n[s+1+0]=Vt(c,g,b),n[s+3+0]=n[s+1+32]=Vt(g,b,x),n[s+3+32]=n[s+1+64]=Vt(b,x,x),n[s+3+64]=n[s+2+64]=n[s+0+96]=n[s+1+96]=n[s+2+96]=n[s+3+96]=x}function Uo(n,s){var c=n[s-1+0],g=n[s-1+32],b=n[s-1+64],x=n[s-1+96],L=n[s-1-32],N=n[s+0-32],S=n[s+1-32],I=n[s+2-32];n[s+0+0]=n[s+2+32]=c+L+1>>1,n[s+0+32]=n[s+2+64]=g+c+1>>1,n[s+0+64]=n[s+2+96]=b+g+1>>1,n[s+0+96]=x+b+1>>1,n[s+3+0]=Vt(N,S,I),n[s+2+0]=Vt(L,N,S),n[s+1+0]=n[s+3+32]=Vt(c,L,N),n[s+1+32]=n[s+3+64]=Vt(g,c,L),n[s+1+64]=n[s+3+96]=Vt(b,g,c),n[s+1+96]=Vt(x,b,g)}function Ho(n,s){var c;for(c=0;8>c;++c)i(n,s+32*c,n,s-32,8)}function Ui(n,s){var c;for(c=0;8>c;++c)o(n,s,n[s-1],8),s+=32}function Rn(n,s,c){var g;for(g=0;8>g;++g)o(s,c+32*g,n,8)}function vn(n,s){var c,g=8;for(c=0;8>c;++c)g+=n[s+c-32]+n[s-1+32*c];Rn(g>>4,n,s)}function Wo(n,s){var c,g=4;for(c=0;8>c;++c)g+=n[s+c-32];Rn(g>>3,n,s)}function Tn(n,s){var c,g=4;for(c=0;8>c;++c)g+=n[s-1+32*c];Rn(g>>3,n,s)}function Hi(n,s){Rn(128,n,s)}function li(n,s,c){var g=n[s-c],b=n[s+0],x=3*(b-g)+Ko[1020+n[s-2*c]-n[s+c]],L=Ha[112+(x+4>>3)];n[s-c]=dr[255+g+Ha[112+(x+3>>3)]],n[s+0]=dr[255+b-L]}function Ia(n,s,c,g){var b=n[s+0],x=n[s+c];return Lr[255+n[s-2*c]-n[s-c]]>g||Lr[255+x-b]>g}function ja(n,s,c,g){return 4*Lr[255+n[s-c]-n[s+0]]+Lr[255+n[s-2*c]-n[s+c]]<=g}function Oa(n,s,c,g,b){var x=n[s-3*c],L=n[s-2*c],N=n[s-c],S=n[s+0],I=n[s+c],U=n[s+2*c],K=n[s+3*c];return 4*Lr[255+N-S]+Lr[255+L-I]>g?0:Lr[255+n[s-4*c]-x]<=b&&Lr[255+x-L]<=b&&Lr[255+L-N]<=b&&Lr[255+K-U]<=b&&Lr[255+U-I]<=b&&Lr[255+I-S]<=b}function Da(n,s,c,g){var b=2*g+1;for(g=0;16>g;++g)ja(n,s+g,c,b)&&li(n,s+g,c)}function Jr(n,s,c,g){var b=2*g+1;for(g=0;16>g;++g)ja(n,s+g*c,1,b)&&li(n,s+g*c,1)}function an(n,s,c,g){var b;for(b=3;0<b;--b)Da(n,s+=4*c,c,g)}function Vo(n,s,c,g){var b;for(b=3;0<b;--b)Jr(n,s+=4,c,g)}function mn(n,s,c,g,b,x,L,N){for(x=2*x+1;0<b--;){if(Oa(n,s,c,x,L))if(Ia(n,s,c,N))li(n,s,c);else{var S=n,I=s,U=c,K=S[I-2*U],Z=S[I-U],Y=S[I+0],mt=S[I+U],ot=S[I+2*U],H=27*(gt=Ko[1020+3*(Y-Z)+Ko[1020+K-mt]])+63>>7,V=18*gt+63>>7,gt=9*gt+63>>7;S[I-3*U]=dr[255+S[I-3*U]+gt],S[I-2*U]=dr[255+K+V],S[I-U]=dr[255+Z+H],S[I+0]=dr[255+Y-H],S[I+U]=dr[255+mt-V],S[I+2*U]=dr[255+ot-gt]}s+=g}}function jr(n,s,c,g,b,x,L,N){for(x=2*x+1;0<b--;){if(Oa(n,s,c,x,L))if(Ia(n,s,c,N))li(n,s,c);else{var S=n,I=s,U=c,K=S[I-U],Z=S[I+0],Y=S[I+U],mt=Ha[112+((ot=3*(Z-K))+4>>3)],ot=Ha[112+(ot+3>>3)],H=mt+1>>1;S[I-2*U]=dr[255+S[I-2*U]+H],S[I-U]=dr[255+K+ot],S[I+0]=dr[255+Z-mt],S[I+U]=dr[255+Y-H]}s+=g}}function Wi(n,s,c,g,b,x){mn(n,s,c,1,16,g,b,x)}function qn(n,s,c,g,b,x){mn(n,s,1,c,16,g,b,x)}function Go(n,s,c,g,b,x){var L;for(L=3;0<L;--L)jr(n,s+=4*c,c,1,16,g,b,x)}function hi(n,s,c,g,b,x){var L;for(L=3;0<L;--L)jr(n,s+=4,1,c,16,g,b,x)}function Yo(n,s,c,g,b,x,L,N){mn(n,s,b,1,8,x,L,N),mn(c,g,b,1,8,x,L,N)}function Vi(n,s,c,g,b,x,L,N){mn(n,s,1,b,8,x,L,N),mn(c,g,1,b,8,x,L,N)}function Gi(n,s,c,g,b,x,L,N){jr(n,s+4*b,b,1,8,x,L,N),jr(c,g+4*b,b,1,8,x,L,N)}function Ba(n,s,c,g,b,x,L,N){jr(n,s+4,1,b,8,x,L,N),jr(c,g+4,1,b,8,x,L,N)}function fi(){this.ba=new _r,this.ec=[],this.cc=[],this.Mc=[],this.Dc=this.Nc=this.dc=this.fc=0,this.Oa=new Ne,this.memory=0,this.Ib="OutputFunc",this.Jb="OutputAlphaFunc",this.Nd="OutputRowFunc"}function Yi(){this.data=[],this.offset=this.kd=this.ha=this.w=0,this.na=[],this.xa=this.gb=this.Ja=this.Sa=this.P=0}function Ji(){this.nc=this.Ea=this.b=this.hc=0,this.K=[],this.w=0}function Ma(){this.ua=0,this.Wa=new E,this.vb=new E,this.md=this.xc=this.wc=0,this.vc=[],this.Wb=0,this.Ya=new R,this.yc=new C}function Jo(){this.xb=this.a=0,this.l=new ii,this.ca=new _r,this.V=[],this.Ba=0,this.Ta=[],this.Ua=0,this.m=new A,this.Pb=0,this.wd=new A,this.Ma=this.$=this.C=this.i=this.c=this.xd=0,this.s=new Ma,this.ab=0,this.gc=u(4,Ji),this.Oc=0}function ci(){this.Lc=this.Z=this.$a=this.i=this.c=0,this.l=new ii,this.ic=0,this.ca=[],this.tb=0,this.qd=null,this.rd=0}function zn(n,s,c,g,b,x,L){for(n=n==null?0:n[s+0],s=0;s<L;++s)b[x+s]=n+c[g+s]&255,n=b[x+s]}function Xi(n,s,c,g,b,x,L){var N;if(n==null)zn(null,null,c,g,b,x,L);else for(N=0;N<L;++N)b[x+N]=n[s+N]+c[g+N]&255}function bn(n,s,c,g,b,x,L){if(n==null)zn(null,null,c,g,b,x,L);else{var N,S=n[s+0],I=S,U=S;for(N=0;N<L;++N)I=U+(S=n[s+N])-I,U=c[g+N]+(-256&I?0>I?0:255:I)&255,I=S,b[x+N]=U}}function Ki(n,s,c,g){var b=s.width,x=s.o;if(t(n!=null&&s!=null),0>c||0>=g||c+g>x)return null;if(!n.Cc){if(n.ga==null){var L;if(n.ga=new ci,(L=n.ga==null)||(L=s.width*s.o,t(n.Gb.length==0),n.Gb=a(L),n.Uc=0,n.Gb==null?L=0:(n.mb=n.Gb,n.nb=n.Uc,n.rc=null,L=1),L=!L),!L){L=n.ga;var N=n.Fa,S=n.P,I=n.qc,U=n.mb,K=n.nb,Z=S+1,Y=I-1,mt=L.l;if(t(N!=null&&U!=null&&s!=null),Nn[0]=null,Nn[1]=zn,Nn[2]=Xi,Nn[3]=bn,L.ca=U,L.tb=K,L.c=s.width,L.i=s.height,t(0<L.c&&0<L.i),1>=I)s=0;else if(L.$a=N[S+0]>>0&3,L.Z=N[S+0]>>2&3,L.Lc=N[S+0]>>4&3,S=N[S+0]>>6&3,0>L.$a||1<L.$a||4<=L.Z||1<L.Lc||S)s=0;else if(mt.put=Ur,mt.ac=We,mt.bc=Hr,mt.ma=L,mt.width=s.width,mt.height=s.height,mt.Da=s.Da,mt.v=s.v,mt.va=s.va,mt.j=s.j,mt.o=s.o,L.$a)t:{t(L.$a==1),s=mr();e:for(;;){if(s==null){s=0;break t}if(t(L!=null),L.mc=s,s.c=L.c,s.i=L.i,s.l=L.l,s.l.ma=L,s.l.width=L.c,s.l.height=L.i,s.a=0,$(s.m,N,Z,Y),!Gr(L.c,L.i,1,s,null)||(s.ab==1&&s.gc[0].hc==3&&rn(s.s)?(L.ic=1,N=s.c*s.i,s.Ta=null,s.Ua=0,s.V=a(N),s.Ba=0,s.V==null?(s.a=1,s=0):s=1):(L.ic=0,s=En(s,L.c)),!s))break e;s=1;break t}L.mc=null,s=0}else s=Y>=L.c*L.i;L=!s}if(L)return null;n.ga.Lc!=1?n.Ga=0:g=x-c}t(n.ga!=null),t(c+g<=x);t:{if(s=(N=n.ga).c,x=N.l.o,N.$a==0){if(Z=n.rc,Y=n.Vc,mt=n.Fa,S=n.P+1+c*s,I=n.mb,U=n.nb+c*s,t(S<=n.P+n.qc),N.Z!=0)for(t(Nn[N.Z]!=null),L=0;L<g;++L)Nn[N.Z](Z,Y,mt,S,I,U,s),Z=I,Y=U,U+=s,S+=s;else for(L=0;L<g;++L)i(I,U,mt,S,s),Z=I,Y=U,U+=s,S+=s;n.rc=Z,n.Vc=Y}else{if(t(N.mc!=null),s=c+g,t((L=N.mc)!=null),t(s<=L.i),L.C>=s)s=1;else if(N.ic||X(),N.ic){N=L.V,Z=L.Ba,Y=L.c;var ot=L.i,H=(mt=1,S=L.$/Y,I=L.$%Y,U=L.m,K=L.s,L.$),V=Y*ot,gt=Y*s,bt=K.wc,vt=H<gt?De(K,I,S):null;t(H<=V),t(s<=ot),t(rn(K));e:for(;;){for(;!U.h&&H<gt;){if(I&bt||(vt=De(K,I,S)),t(vt!=null),J(U),256>(ot=ir(vt.G[0],vt.H[0],U)))N[Z+H]=ot,++H,++I>=Y&&(I=0,++S<=s&&!(S%16)&&Fr(L,S));else{if(!(280>ot)){mt=0;break e}ot=Pr(ot-256,U);var Dt,St=ir(vt.G[4],vt.H[4],U);if(J(U),!(H>=(St=Wr(Y,St=Pr(St,U)))&&V-H>=ot)){mt=0;break e}for(Dt=0;Dt<ot;++Dt)N[Z+H+Dt]=N[Z+H+Dt-St];for(H+=ot,I+=ot;I>=Y;)I-=Y,++S<=s&&!(S%16)&&Fr(L,S);H<gt&&I&bt&&(vt=De(K,I,S))}t(U.h==M(U))}Fr(L,S>s?s:S);break e}!mt||U.h&&H<V?(mt=0,L.a=U.h?5:3):L.$=H,s=mt}else s=Cr(L,L.V,L.Ba,L.c,L.i,s,Qn);if(!s){g=0;break t}}c+g>=x&&(n.Cc=1),g=1}if(!g)return null;if(n.Cc&&((g=n.ga)!=null&&(g.mc=null),n.ga=null,0<n.Ga))return alert("todo:WebPDequantizeLevels"),null}return n.nb+c*b}function l(n,s,c,g,b,x){for(;0<b--;){var L,N=n,S=s+(c?1:0),I=n,U=s+(c?0:3);for(L=0;L<g;++L){var K=I[U+4*L];K!=255&&(K*=32897,N[S+4*L+0]=N[S+4*L+0]*K>>23,N[S+4*L+1]=N[S+4*L+1]*K>>23,N[S+4*L+2]=N[S+4*L+2]*K>>23)}s+=x}}function y(n,s,c,g,b){for(;0<g--;){var x;for(x=0;x<c;++x){var L=n[s+2*x+0],N=15&(I=n[s+2*x+1]),S=4369*N,I=(240&I|I>>4)*S>>16;n[s+2*x+0]=(240&L|L>>4)*S>>16&240|(15&L|L<<4)*S>>16>>4&15,n[s+2*x+1]=240&I|N}s+=b}}function O(n,s,c,g,b,x,L,N){var S,I,U=255;for(I=0;I<b;++I){for(S=0;S<g;++S){var K=n[s+S];x[L+4*S]=K,U&=K}s+=c,L+=N}return U!=255}function T(n,s,c,g,b){var x;for(x=0;x<b;++x)c[g+x]=n[s+x]>>8}function X(){xr=l,be=y,ye=O,Ce=T}function lt(n,s,c){z[n]=function(g,b,x,L,N,S,I,U,K,Z,Y,mt,ot,H,V,gt,bt){var vt,Dt=bt-1>>1,St=N[S+0]|I[U+0]<<16,Tt=K[Z+0]|Y[mt+0]<<16;t(g!=null);var Pt=3*St+Tt+131074>>2;for(s(g[b+0],255&Pt,Pt>>16,ot,H),x!=null&&(Pt=3*Tt+St+131074>>2,s(x[L+0],255&Pt,Pt>>16,V,gt)),vt=1;vt<=Dt;++vt){var se=N[S+vt]|I[U+vt]<<16,fe=K[Z+vt]|Y[mt+vt]<<16,ae=St+se+Tt+fe+524296,re=ae+2*(se+Tt)>>3;Pt=re+St>>1,St=(ae=ae+2*(St+fe)>>3)+se>>1,s(g[b+2*vt-1],255&Pt,Pt>>16,ot,H+(2*vt-1)*c),s(g[b+2*vt-0],255&St,St>>16,ot,H+(2*vt-0)*c),x!=null&&(Pt=ae+Tt>>1,St=re+fe>>1,s(x[L+2*vt-1],255&Pt,Pt>>16,V,gt+(2*vt-1)*c),s(x[L+2*vt+0],255&St,St>>16,V,gt+(2*vt+0)*c)),St=se,Tt=fe}1&bt||(Pt=3*St+Tt+131074>>2,s(g[b+bt-1],255&Pt,Pt>>16,ot,H+(bt-1)*c),x!=null&&(Pt=3*Tt+St+131074>>2,s(x[L+bt-1],255&Pt,Pt>>16,V,gt+(bt-1)*c)))}}function yt(){Ar[Wa]=Tl,Ar[Va]=Js,Ar[Hs]=ql,Ar[Ga]=Xs,Ar[Ya]=Ks,Ar[Zo]=Zs,Ar[Ws]=zl,Ar[$o]=Js,Ar[Qo]=Xs,Ar[Ja]=Ks,Ar[ts]=Zs}function Ot(n){return n&-16384?0>n?0:255:n>>Ul}function Rt(n,s){return Ot((19077*n>>8)+(26149*s>>8)-14234)}function Zt(n,s,c){return Ot((19077*n>>8)-(6419*s>>8)-(13320*c>>8)+8708)}function Jt(n,s){return Ot((19077*n>>8)+(33050*s>>8)-17685)}function ne(n,s,c,g,b){g[b+0]=Rt(n,c),g[b+1]=Zt(n,s,c),g[b+2]=Jt(n,s)}function Le(n,s,c,g,b){g[b+0]=Jt(n,s),g[b+1]=Zt(n,s,c),g[b+2]=Rt(n,c)}function Se(n,s,c,g,b){var x=Zt(n,s,c);s=x<<3&224|Jt(n,s)>>3,g[b+0]=248&Rt(n,c)|x>>5,g[b+1]=s}function Be(n,s,c,g,b){var x=240&Jt(n,s)|15;g[b+0]=240&Rt(n,c)|Zt(n,s,c)>>4,g[b+1]=x}function Xe(n,s,c,g,b){g[b+0]=255,ne(n,s,c,g,b+1)}function qe(n,s,c,g,b){Le(n,s,c,g,b),g[b+3]=255}function Or(n,s,c,g,b){ne(n,s,c,g,b),g[b+3]=255}function cr(n,s){return 0>n?0:n>s?s:n}function Xr(n,s,c){z[n]=function(g,b,x,L,N,S,I,U,K){for(var Z=U+(-2&K)*c;U!=Z;)s(g[b+0],x[L+0],N[S+0],I,U),s(g[b+1],x[L+0],N[S+0],I,U+c),b+=2,++L,++S,U+=2*c;1&K&&s(g[b+0],x[L+0],N[S+0],I,U)}}function Ea(n,s,c){return c==0?n==0?s==0?6:5:s==0?4:0:c}function Zi(n,s,c,g,b){switch(n>>>30){case 3:un(s,c,g,b,0);break;case 2:Fe(s,c,g,b);break;case 1:rr(s,c,g,b)}}function $i(n,s){var c,g,b=s.M,x=s.Nb,L=n.oc,N=n.pc+40,S=n.oc,I=n.pc+584,U=n.oc,K=n.pc+600;for(c=0;16>c;++c)L[N+32*c-1]=129;for(c=0;8>c;++c)S[I+32*c-1]=129,U[K+32*c-1]=129;for(0<b?L[N-1-32]=S[I-1-32]=U[K-1-32]=129:(o(L,N-32-1,127,21),o(S,I-32-1,127,9),o(U,K-32-1,127,9)),g=0;g<n.za;++g){var Z=s.ya[s.aa+g];if(0<g){for(c=-1;16>c;++c)i(L,N+32*c-4,L,N+32*c+12,4);for(c=-1;8>c;++c)i(S,I+32*c-4,S,I+32*c+4,4),i(U,K+32*c-4,U,K+32*c+4,4)}var Y=n.Gd,mt=n.Hd+g,ot=Z.ad,H=Z.Hc;if(0<b&&(i(L,N-32,Y[mt].y,0,16),i(S,I-32,Y[mt].f,0,8),i(U,K-32,Y[mt].ea,0,8)),Z.Za){var V=L,gt=N-32+16;for(0<b&&(g>=n.za-1?o(V,gt,Y[mt].y[15],4):i(V,gt,Y[mt+1].y,0,4)),c=0;4>c;c++)V[gt+128+c]=V[gt+256+c]=V[gt+384+c]=V[gt+0+c];for(c=0;16>c;++c,H<<=2)V=L,gt=N+Qs[c],Dr[Z.Ob[c]](V,gt),Zi(H,ot,16*+c,V,gt)}else if(V=Ea(g,b,Z.Ob[0]),An[V](L,N),H!=0)for(c=0;16>c;++c,H<<=2)Zi(H,ot,16*+c,L,N+Qs[c]);for(c=Z.Gc,V=Ea(g,b,Z.Dd),hn[V](S,I),hn[V](U,K),H=ot,V=S,gt=I,255&(Z=c>>0)&&(170&Z?na(H,256,V,gt):yr(H,256,V,gt)),Z=U,H=K,255&(c>>=8)&&(170&c?na(ot,320,Z,H):yr(ot,320,Z,H)),b<n.Ub-1&&(i(Y[mt].y,0,L,N+480,16),i(Y[mt].f,0,S,I+224,8),i(Y[mt].ea,0,U,K+224,8)),c=8*x*n.B,Y=n.sa,mt=n.ta+16*g+16*x*n.R,ot=n.qa,Z=n.ra+8*g+c,H=n.Ha,V=n.Ia+8*g+c,c=0;16>c;++c)i(Y,mt+c*n.R,L,N+32*c,16);for(c=0;8>c;++c)i(ot,Z+c*n.B,S,I+32*c,8),i(H,V+c*n.B,U,K+32*c,8)}}function di(n,s,c,g,b,x,L,N,S){var I=[0],U=[0],K=0,Z=S!=null?S.kd:0,Y=S??new Yi;if(n==null||12>c)return 7;Y.data=n,Y.w=s,Y.ha=c,s=[s],c=[c],Y.gb=[Y.gb];t:{var mt=s,ot=c,H=Y.gb;if(t(n!=null),t(ot!=null),t(H!=null),H[0]=0,12<=ot[0]&&!e(n,mt[0],"RIFF")){if(e(n,mt[0]+8,"WEBP")){H=3;break t}var V=_t(n,mt[0]+4);if(12>V||4294967286<V){H=3;break t}if(Z&&V>ot[0]-8){H=7;break t}H[0]=V,mt[0]+=12,ot[0]-=12}H=0}if(H!=0)return H;for(V=0<Y.gb[0],c=c[0];;){t:{var gt=n;ot=s,H=c;var bt=I,vt=U,Dt=mt=[0];if((Pt=K=[K])[0]=0,8>H[0])H=7;else{if(!e(gt,ot[0],"VP8X")){if(_t(gt,ot[0]+4)!=10){H=3;break t}if(18>H[0]){H=7;break t}var St=_t(gt,ot[0]+8),Tt=1+Ft(gt,ot[0]+12);if(2147483648<=Tt*(gt=1+Ft(gt,ot[0]+15))){H=3;break t}Dt!=null&&(Dt[0]=St),bt!=null&&(bt[0]=Tt),vt!=null&&(vt[0]=gt),ot[0]+=18,H[0]-=18,Pt[0]=1}H=0}}if(K=K[0],mt=mt[0],H!=0)return H;if(ot=!!(2&mt),!V&&K)return 3;if(x!=null&&(x[0]=!!(16&mt)),L!=null&&(L[0]=ot),N!=null&&(N[0]=0),L=I[0],mt=U[0],K&&ot&&S==null){H=0;break}if(4>c){H=7;break}if(V&&K||!V&&!K&&!e(n,s[0],"ALPH")){c=[c],Y.na=[Y.na],Y.P=[Y.P],Y.Sa=[Y.Sa];t:{St=n,H=s,V=c;var Pt=Y.gb;bt=Y.na,vt=Y.P,Dt=Y.Sa,Tt=22,t(St!=null),t(V!=null),gt=H[0];var se=V[0];for(t(bt!=null),t(Dt!=null),bt[0]=null,vt[0]=null,Dt[0]=0;;){if(H[0]=gt,V[0]=se,8>se){H=7;break t}var fe=_t(St,gt+4);if(4294967286<fe){H=3;break t}var ae=8+fe+1&-2;if(Tt+=ae,0<Pt&&Tt>Pt){H=3;break t}if(!e(St,gt,"VP8 ")||!e(St,gt,"VP8L")){H=0;break t}if(se[0]<ae){H=7;break t}e(St,gt,"ALPH")||(bt[0]=St,vt[0]=gt+8,Dt[0]=fe),gt+=ae,se-=ae}}if(c=c[0],Y.na=Y.na[0],Y.P=Y.P[0],Y.Sa=Y.Sa[0],H!=0)break}c=[c],Y.Ja=[Y.Ja],Y.xa=[Y.xa];t:if(Pt=n,H=s,V=c,bt=Y.gb[0],vt=Y.Ja,Dt=Y.xa,St=H[0],gt=!e(Pt,St,"VP8 "),Tt=!e(Pt,St,"VP8L"),t(Pt!=null),t(V!=null),t(vt!=null),t(Dt!=null),8>V[0])H=7;else{if(gt||Tt){if(Pt=_t(Pt,St+4),12<=bt&&Pt>bt-12){H=3;break t}if(Z&&Pt>V[0]-8){H=7;break t}vt[0]=Pt,H[0]+=8,V[0]-=8,Dt[0]=Tt}else Dt[0]=5<=V[0]&&Pt[St+0]==47&&!(Pt[St+4]>>5),vt[0]=V[0];H=0}if(c=c[0],Y.Ja=Y.Ja[0],Y.xa=Y.xa[0],s=s[0],H!=0)break;if(4294967286<Y.Ja)return 3;if(N==null||ot||(N[0]=Y.xa?2:1),L=[L],mt=[mt],Y.xa){if(5>c){H=7;break}N=L,Z=mt,ot=x,n==null||5>c?n=0:5<=c&&n[s+0]==47&&!(n[s+4]>>5)?(V=[0],Pt=[0],bt=[0],$(vt=new A,n,s,c),qt(vt,V,Pt,bt)?(N!=null&&(N[0]=V[0]),Z!=null&&(Z[0]=Pt[0]),ot!=null&&(ot[0]=bt[0]),n=1):n=0):n=0}else{if(10>c){H=7;break}N=mt,n==null||10>c||!xa(n,s+3,c-3)?n=0:(Z=n[s+0]|n[s+1]<<8|n[s+2]<<16,ot=16383&(n[s+7]<<8|n[s+6]),n=16383&(n[s+9]<<8|n[s+8]),1&Z||3<(Z>>1&7)||!(Z>>4&1)||Z>>5>=Y.Ja||!ot||!n?n=0:(L&&(L[0]=ot),N&&(N[0]=n),n=1))}if(!n||(L=L[0],mt=mt[0],K&&(I[0]!=L||U[0]!=mt)))return 3;S!=null&&(S[0]=Y,S.offset=s-S.w,t(4294967286>s-S.w),t(S.offset==S.ha-c));break}return H==0||H==7&&K&&S==null?(x!=null&&(x[0]|=Y.na!=null&&0<Y.na.length),g!=null&&(g[0]=L),b!=null&&(b[0]=mt),0):H}function Qi(n,s,c){var g=s.width,b=s.height,x=0,L=0,N=g,S=b;if(s.Da=n!=null&&0<n.Da,s.Da&&(N=n.cd,S=n.bd,x=n.v,L=n.j,11>c||(x&=-2,L&=-2),0>x||0>L||0>=N||0>=S||x+N>g||L+S>b))return 0;if(s.v=x,s.j=L,s.va=x+N,s.o=L+S,s.U=N,s.T=S,s.da=n!=null&&0<n.da,s.da){if(!Kt(N,S,c=[n.ib],x=[n.hb]))return 0;s.ib=c[0],s.hb=x[0]}return s.ob=n!=null&&n.ob,s.Kb=n==null||!n.Sd,s.da&&(s.ob=s.ib<3*g/4&&s.hb<3*b/4,s.Kb=0),1}function ta(n){if(n==null)return 2;if(11>n.S){var s=n.f.RGBA;s.fb+=(n.height-1)*s.A,s.A=-s.A}else s=n.f.kb,n=n.height,s.O+=(n-1)*s.fa,s.fa=-s.fa,s.N+=(n-1>>1)*s.Ab,s.Ab=-s.Ab,s.W+=(n-1>>1)*s.Db,s.Db=-s.Db,s.F!=null&&(s.J+=(n-1)*s.lb,s.lb=-s.lb);return 0}function pi(n,s,c,g){if(g==null||0>=n||0>=s)return 2;if(c!=null){if(c.Da){var b=c.cd,x=c.bd,L=-2&c.v,N=-2&c.j;if(0>L||0>N||0>=b||0>=x||L+b>n||N+x>s)return 2;n=b,s=x}if(c.da){if(!Kt(n,s,b=[c.ib],x=[c.hb]))return 2;n=b[0],s=x[0]}}g.width=n,g.height=s;t:{var S=g.width,I=g.height;if(n=g.S,0>=S||0>=I||!(n>=Wa&&13>n))n=2;else{if(0>=g.Rd&&g.sd==null){L=x=b=s=0;var U=(N=S*tu[n])*I;if(11>n||(x=(I+1)/2*(s=(S+1)/2),n==12&&(L=(b=S)*I)),(I=a(U+2*x+L))==null){n=1;break t}g.sd=I,11>n?((S=g.f.RGBA).eb=I,S.fb=0,S.A=N,S.size=U):((S=g.f.kb).y=I,S.O=0,S.fa=N,S.Fd=U,S.f=I,S.N=0+U,S.Ab=s,S.Cd=x,S.ea=I,S.W=0+U+x,S.Db=s,S.Ed=x,n==12&&(S.F=I,S.J=0+U+2*x),S.Tc=L,S.lb=b)}if(s=1,b=g.S,x=g.width,L=g.height,b>=Wa&&13>b)if(11>b)n=g.f.RGBA,s&=(N=Math.abs(n.A))*(L-1)+x<=n.size,s&=N>=x*tu[b],s&=n.eb!=null;else{n=g.f.kb,N=(x+1)/2,U=(L+1)/2,S=Math.abs(n.fa),I=Math.abs(n.Ab);var K=Math.abs(n.Db),Z=Math.abs(n.lb),Y=Z*(L-1)+x;s&=S*(L-1)+x<=n.Fd,s&=I*(U-1)+N<=n.Cd,s=(s&=K*(U-1)+N<=n.Ed)&S>=x&I>=N&K>=N,s&=n.y!=null,s&=n.f!=null,s&=n.ea!=null,b==12&&(s&=Z>=x,s&=Y<=n.Tc,s&=n.F!=null)}else s=0;n=s?0:2}}return n!=0||c!=null&&c.fd&&(n=ta(g)),n}var Ve=64,gi=[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],vi=24,mi=32,ea=8,or=[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];Nt("Predictor0","PredictorAdd0"),z.Predictor0=function(){return 4278190080},z.Predictor1=function(n){return n},z.Predictor2=function(n,s,c){return s[c+0]},z.Predictor3=function(n,s,c){return s[c+1]},z.Predictor4=function(n,s,c){return s[c-1]},z.Predictor5=function(n,s,c){return kt(kt(n,s[c+1]),s[c+0])},z.Predictor6=function(n,s,c){return kt(n,s[c-1])},z.Predictor7=function(n,s,c){return kt(n,s[c+0])},z.Predictor8=function(n,s,c){return kt(s[c-1],s[c+0])},z.Predictor9=function(n,s,c){return kt(s[c+0],s[c+1])},z.Predictor10=function(n,s,c){return kt(kt(n,s[c-1]),kt(s[c+0],s[c+1]))},z.Predictor11=function(n,s,c){var g=s[c+0];return 0>=Qt(g>>24&255,n>>24&255,(s=s[c-1])>>24&255)+Qt(g>>16&255,n>>16&255,s>>16&255)+Qt(g>>8&255,n>>8&255,s>>8&255)+Qt(255&g,255&n,255&s)?g:n},z.Predictor12=function(n,s,c){var g=s[c+0];return(Et((n>>24&255)+(g>>24&255)-((s=s[c-1])>>24&255))<<24|Et((n>>16&255)+(g>>16&255)-(s>>16&255))<<16|Et((n>>8&255)+(g>>8&255)-(s>>8&255))<<8|Et((255&n)+(255&g)-(255&s)))>>>0},z.Predictor13=function(n,s,c){var g=s[c-1];return(Gt((n=kt(n,s[c+0]))>>24&255,g>>24&255)<<24|Gt(n>>16&255,g>>16&255)<<16|Gt(n>>8&255,g>>8&255)<<8|Gt(n>>0&255,g>>0&255))>>>0};var Xo=z.PredictorAdd0;z.PredictorAdd1=te,Nt("Predictor2","PredictorAdd2"),Nt("Predictor3","PredictorAdd3"),Nt("Predictor4","PredictorAdd4"),Nt("Predictor5","PredictorAdd5"),Nt("Predictor6","PredictorAdd6"),Nt("Predictor7","PredictorAdd7"),Nt("Predictor8","PredictorAdd8"),Nt("Predictor9","PredictorAdd9"),Nt("Predictor10","PredictorAdd10"),Nt("Predictor11","PredictorAdd11"),Nt("Predictor12","PredictorAdd12"),Nt("Predictor13","PredictorAdd13");var ra=z.PredictorAdd2;ee("ColorIndexInverseTransform","MapARGB","32b",function(n){return n>>8&255},function(n){return n}),ee("VP8LColorIndexInverseTransformAlpha","MapAlpha","8b",function(n){return n},function(n){return n>>8&255});var Ra,br=z.ColorIndexInverseTransform,bi=z.MapARGB,Ta=z.VP8LColorIndexInverseTransformAlpha,qa=z.MapAlpha,yn=z.VP8LPredictorsAdd=[];yn.length=16,(z.VP8LPredictors=[]).length=16,(z.VP8LPredictorsAdd_C=[]).length=16,(z.VP8LPredictors_C=[]).length=16;var Un,sr,er,wn,on,sn,yi,un,Fe,na,rr,yr,wi,za,ia,Hn,Wn,xn,Vn,xi,Gn,Ln,aa,wr,xr,be,ye,Ce,Te=a(511),ln=a(2041),oa=a(225),Li=a(767),Ua=0,Ko=ln,Ha=oa,dr=Li,Lr=Te,Wa=0,Va=1,Hs=2,Ga=3,Ya=4,Zo=5,Ws=6,$o=7,Qo=8,Ja=9,ts=10,Sl=[2,3,7],_l=[3,3,11],Vs=[280,256,256,256,40],Pl=[0,1,1,1,0],kl=[17,18,0,1,2,3,4,5,16,6,7,8,9,10,11,12,13,14,15],Fl=[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],Cl=[2954,2956,2958,2962,2970,2986,3018,3082,3212,3468,3980,5004],Il=8,es=[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],rs=[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],sa=null,jl=[[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]],Ol=[0,1,4,8,5,2,3,6,9,12,13,10,7,11,14,15],Gs=[-0,1,-1,2,-2,3,4,6,-3,5,-4,-5,-6,7,-7,8,-8,-9],Dl=[[[[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]]]],Bl=[[[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]]],Ml=[[[[255,255,255,255,255,255,255,255,255,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]]]],El=[0,1,2,3,6,4,5,6,6,6,6,6,6,6,6,7,0],An=[],Dr=[],hn=[],Rl=1,Ys=2,Nn=[],Ar=[];lt("UpsampleRgbLinePair",ne,3),lt("UpsampleBgrLinePair",Le,3),lt("UpsampleRgbaLinePair",Or,4),lt("UpsampleBgraLinePair",qe,4),lt("UpsampleArgbLinePair",Xe,4),lt("UpsampleRgba4444LinePair",Be,2),lt("UpsampleRgb565LinePair",Se,2);var Tl=z.UpsampleRgbLinePair,ql=z.UpsampleBgrLinePair,Js=z.UpsampleRgbaLinePair,Xs=z.UpsampleBgraLinePair,Ks=z.UpsampleArgbLinePair,Zs=z.UpsampleRgba4444LinePair,zl=z.UpsampleRgb565LinePair,Xa=16,Ka=1<<Xa-1,ua=-227,ns=482,Ul=6,$s=0,Hl=a(256),Wl=a(256),Vl=a(256),Gl=a(256),Yl=a(ns-ua),Jl=a(ns-ua);Xr("YuvToRgbRow",ne,3),Xr("YuvToBgrRow",Le,3),Xr("YuvToRgbaRow",Or,4),Xr("YuvToBgraRow",qe,4),Xr("YuvToArgbRow",Xe,4),Xr("YuvToRgba4444Row",Be,2),Xr("YuvToRgb565Row",Se,2);var Qs=[0,4,8,12,128,132,136,140,256,260,264,268,384,388,392,396],Za=[0,2,8],Xl=[8,7,6,4,4,2,2,2,1,1,1,1],Kl=1;this.WebPDecodeRGBA=function(n,s,c,g,b){var x=Va,L=new fi,N=new _r;L.ba=N,N.S=x,N.width=[N.width],N.height=[N.height];var S=N.width,I=N.height,U=new en;if(U==null||n==null)var K=2;else t(U!=null),K=di(n,s,c,U.width,U.height,U.Pd,U.Qd,U.format,null);if(K!=0?S=0:(S!=null&&(S[0]=U.width[0]),I!=null&&(I[0]=U.height[0]),S=1),S){N.width=N.width[0],N.height=N.height[0],g!=null&&(g[0]=N.width),b!=null&&(b[0]=N.height);t:{if(g=new ii,(b=new Yi).data=n,b.w=s,b.ha=c,b.kd=1,s=[0],t(b!=null),((n=di(b.data,b.w,b.ha,null,null,null,s,null,b))==0||n==7)&&s[0]&&(n=4),(s=n)==0){if(t(L!=null),g.data=b.data,g.w=b.w+b.offset,g.ha=b.ha-b.offset,g.put=Ur,g.ac=We,g.bc=Hr,g.ma=L,b.xa){if((n=mr())==null){L=1;break t}if(function(Z,Y){var mt=[0],ot=[0],H=[0];e:for(;;){if(Z==null)return 0;if(Y==null)return Z.a=2,0;if(Z.l=Y,Z.a=0,$(Z.m,Y.data,Y.w,Y.ha),!qt(Z.m,mt,ot,H)){Z.a=3;break e}if(Z.xb=Ys,Y.width=mt[0],Y.height=ot[0],!Gr(mt[0],ot[0],1,Z,null))break e;return 1}return t(Z.a!=0),0}(n,g)){if(g=(s=pi(g.width,g.height,L.Oa,L.ba))==0){e:{g=n;r:for(;;){if(g==null){g=0;break e}if(t(g.s.yc!=null),t(g.s.Ya!=null),t(0<g.s.Wb),t((c=g.l)!=null),t((b=c.ma)!=null),g.xb!=0){if(g.ca=b.ba,g.tb=b.tb,t(g.ca!=null),!Qi(b.Oa,c,Ga)){g.a=2;break r}if(!En(g,c.width)||c.da)break r;if((c.da||ue(g.ca.S))&&X(),11>g.ca.S||(alert("todo:WebPInitConvertARGBToYUV"),g.ca.f.kb.F!=null&&X()),g.Pb&&0<g.s.ua&&g.s.vb.X==null&&!Ut(g.s.vb,g.s.Wa.Xa)){g.a=1;break r}g.xb=0}if(!Cr(g,g.V,g.Ba,g.c,g.i,c.o,$n))break r;b.Dc=g.Ma,g=1;break e}t(g.a!=0),g=0}g=!g}g&&(s=n.a)}else s=n.a}else{if((n=new Co)==null){L=1;break t}if(n.Fa=b.na,n.P=b.P,n.qc=b.Sa,La(n,g)){if((s=pi(g.width,g.height,L.Oa,L.ba))==0){if(n.Aa=0,c=L.Oa,t((b=n)!=null),c!=null){if(0<(S=0>(S=c.Md)?0:100<S?255:255*S/100)){for(I=U=0;4>I;++I)12>(K=b.pb[I]).lc&&(K.ia=S*Xl[0>K.lc?0:K.lc]>>3),U|=K.ia;U&&(alert("todo:VP8InitRandom"),b.ia=1)}b.Ga=c.Id,100<b.Ga?b.Ga=100:0>b.Ga&&(b.Ga=0)}Io(n,g)||(s=n.a)}}else s=n.a}s==0&&L.Oa!=null&&L.Oa.fd&&(s=ta(L.ba))}L=s}x=L!=0?null:11>x?N.f.RGBA.eb:N.f.kb.y}else x=null;return x};var tu=[3,4,3,4,4,2,2,4,4,4,2,1,1]};function d(z,nt){for(var pt="",k=0;k<4;k++)pt+=String.fromCharCode(z[nt++]);return pt}function v(z,nt){return(z[nt+0]<<0|z[nt+1]<<8|z[nt+2]<<16)>>>0}function m(z,nt){return(z[nt+0]<<0|z[nt+1]<<8|z[nt+2]<<16|z[nt+3]<<24)>>>0}new f;var w=[0],p=[0],F=[],P=new f,D=r,_=function(z,nt){var pt={},k=0,C=!1,W=0,R=0;if(pt.frames=[],!function(j,M,q,J){for(var Q=0;Q<J;Q++)if(j[M+Q]!=q.charCodeAt(Q))return!0;return!1}(z,nt,"RIFF",4)){for(m(z,nt+=4),nt+=8;nt<z.length;){var st=d(z,nt),at=m(z,nt+=4);nt+=4;var ft=at+(1&at);switch(st){case"VP8 ":case"VP8L":pt.frames[k]===void 0&&(pt.frames[k]={}),(dt=pt.frames[k]).src_off=C?R:nt-8,dt.src_size=W+at+8,k++,C&&(C=!1,W=0,R=0);break;case"VP8X":(dt=pt.header={}).feature_flags=z[nt];var $=nt+4;dt.canvas_width=1+v(z,$),$+=3,dt.canvas_height=1+v(z,$),$+=3;break;case"ALPH":C=!0,W=ft+8,R=nt-8;break;case"ANIM":(dt=pt.header).bgcolor=m(z,nt),$=nt+4,dt.loop_count=(jt=z)[(A=$)+0]<<0|jt[A+1]<<8,$+=2;break;case"ANMF":var ht,dt;(dt=pt.frames[k]={}).offset_x=2*v(z,nt),nt+=3,dt.offset_y=2*v(z,nt),nt+=3,dt.width=1+v(z,nt),nt+=3,dt.height=1+v(z,nt),nt+=3,dt.duration=v(z,nt),nt+=3,ht=z[nt++],dt.dispose=1&ht,dt.blend=ht>>1&1}st!="ANMF"&&(nt+=ft)}var jt,A;return pt}}(D,0);_.response=D,_.rgbaoutput=!0,_.dataurl=!1;var B=_.header?_.header:null,G=_.frames?_.frames:null;if(B){B.loop_counter=B.loop_count,w=[B.canvas_height],p=[B.canvas_width];for(var it=0;it<G.length&&G[it].blend!=0;it++);}var ut=G[0],wt=P.WebPDecodeRGBA(D,ut.src_off,ut.src_size,p,w);ut.rgba=wt,ut.imgwidth=p[0],ut.imgheight=w[0];for(var tt=0;tt<p[0]*w[0]*4;tt++)F[tt]=wt[tt];return this.width=p,this.height=w,this.data=F,this}(function(r){var t=function(){return typeof Cs=="function"},e=function(w,p,F,P){var D=4,_=u;switch(P){case r.image_compression.FAST:D=1,_=a;break;case r.image_compression.MEDIUM:D=6,_=h;break;case r.image_compression.SLOW:D=9,_=f}w=i(w,p,F,_);var B=Cs(w,{level:D});return r.__addimage__.arrayBufferToBinaryString(B)},i=function(w,p,F,P){for(var D,_,B,G=w.length/p,it=new Uint8Array(w.length+G),ut=v(),wt=0;wt<G;wt+=1){if(B=wt*p,D=w.subarray(B,B+p),P)it.set(P(D,F,_),B+wt);else{for(var tt,z=ut.length,nt=[];tt<z;tt+=1)nt[tt]=ut[tt](D,F,_);var pt=m(nt.concat());it.set(nt[pt],B+wt)}_=D}return it},o=function(w){var p=Array.apply([],w);return p.unshift(0),p},a=function(w,p){var F,P=[],D=w.length;P[0]=1;for(var _=0;_<D;_+=1)F=w[_-p]||0,P[_+1]=w[_]-F+256&255;return P},u=function(w,p,F){var P,D=[],_=w.length;D[0]=2;for(var B=0;B<_;B+=1)P=F&&F[B]||0,D[B+1]=w[B]-P+256&255;return D},h=function(w,p,F){var P,D,_=[],B=w.length;_[0]=3;for(var G=0;G<B;G+=1)P=w[G-p]||0,D=F&&F[G]||0,_[G+1]=w[G]+256-(P+D>>>1)&255;return _},f=function(w,p,F){var P,D,_,B,G=[],it=w.length;G[0]=4;for(var ut=0;ut<it;ut+=1)P=w[ut-p]||0,D=F&&F[ut]||0,_=F&&F[ut-p]||0,B=d(P,D,_),G[ut+1]=w[ut]-B+256&255;return G},d=function(w,p,F){if(w===p&&p===F)return w;var P=Math.abs(p-F),D=Math.abs(w-F),_=Math.abs(w+p-F-F);return P<=D&&P<=_?w:D<=_?p:F},v=function(){return[o,a,u,h,f]},m=function(w){var p=w.map(function(F){return F.reduce(function(P,D){return P+Math.abs(D)},0)});return p.indexOf(Math.min.apply(null,p))};r.processPNG=function(w,p,F,P){var D,_,B,G,it,ut,wt,tt,z,nt,pt,k,C,W,R,st=this.decode.FLATE_DECODE,at="";if(this.__addimage__.isArrayBuffer(w)&&(w=new Uint8Array(w)),this.__addimage__.isArrayBufferView(w)){if(w=(B=new Uh(w)).imgData,_=B.bits,D=B.colorSpace,it=B.colors,[4,6].indexOf(B.colorType)!==-1){if(B.bits===8){z=(tt=B.pixelBitlength==32?new Uint32Array(B.decodePixels().buffer):B.pixelBitlength==16?new Uint16Array(B.decodePixels().buffer):new Uint8Array(B.decodePixels().buffer)).length,pt=new Uint8Array(z*B.colors),nt=new Uint8Array(z);var ft,$=B.pixelBitlength-B.bits;for(W=0,R=0;W<z;W++){for(C=tt[W],ft=0;ft<$;)pt[R++]=C>>>ft&255,ft+=B.bits;nt[W]=C>>>ft&255}}if(B.bits===16){z=(tt=new Uint32Array(B.decodePixels().buffer)).length,pt=new Uint8Array(z*(32/B.pixelBitlength)*B.colors),nt=new Uint8Array(z*(32/B.pixelBitlength)),k=B.colors>1,W=0,R=0;for(var ht=0;W<z;)C=tt[W++],pt[R++]=C>>>0&255,k&&(pt[R++]=C>>>16&255,C=tt[W++],pt[R++]=C>>>0&255),nt[ht++]=C>>>16&255;_=8}P!==r.image_compression.NONE&&t()?(w=e(pt,B.width*B.colors,B.colors,P),wt=e(nt,B.width,1,P)):(w=pt,wt=nt,st=void 0)}if(B.colorType===3&&(D=this.color_spaces.INDEXED,ut=B.palette,B.transparency.indexed)){var dt=B.transparency.indexed,jt=0;for(W=0,z=dt.length;W<z;++W)jt+=dt[W];if((jt/=255)===z-1&&dt.indexOf(0)!==-1)G=[dt.indexOf(0)];else if(jt!==z){for(tt=B.decodePixels(),nt=new Uint8Array(tt.length),W=0,z=tt.length;W<z;W++)nt[W]=dt[tt[W]];wt=e(nt,B.width,1)}}var A=function(j){var M;switch(j){case r.image_compression.FAST:M=11;break;case r.image_compression.MEDIUM:M=13;break;case r.image_compression.SLOW:M=14;break;default:M=12}return M}(P);return st===this.decode.FLATE_DECODE&&(at="/Predictor "+A+" "),at+="/Colors "+it+" /BitsPerComponent "+_+" /Columns "+B.width,(this.__addimage__.isArrayBuffer(w)||this.__addimage__.isArrayBufferView(w))&&(w=this.__addimage__.arrayBufferToBinaryString(w)),(wt&&this.__addimage__.isArrayBuffer(wt)||this.__addimage__.isArrayBufferView(wt))&&(wt=this.__addimage__.arrayBufferToBinaryString(wt)),{alias:F,data:w,index:p,filter:st,decodeParameters:at,transparency:G,palette:ut,sMask:wt,predictor:A,width:B.width,height:B.height,bitsPerComponent:_,colorSpace:D}}}})(zt.API),function(r){r.processGIF89A=function(t,e,i,o){var a=new Hh(t),u=a.width,h=a.height,f=[];a.decodeAndBlitFrameRGBA(0,f);var d={data:f,width:u,height:h},v=new xs(100).encode(d,100);return r.processJPEG.call(this,v,e,i,o)},r.processGIF87A=r.processGIF89A}(zt.API),Er.prototype.parseHeader=function(){if(this.fileSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.reserved=this.datav.getUint32(this.pos,!0),this.pos+=4,this.offset=this.datav.getUint32(this.pos,!0),this.pos+=4,this.headerSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.width=this.datav.getUint32(this.pos,!0),this.pos+=4,this.height=this.datav.getInt32(this.pos,!0),this.pos+=4,this.planes=this.datav.getUint16(this.pos,!0),this.pos+=2,this.bitPP=this.datav.getUint16(this.pos,!0),this.pos+=2,this.compress=this.datav.getUint32(this.pos,!0),this.pos+=4,this.rawSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.hr=this.datav.getUint32(this.pos,!0),this.pos+=4,this.vr=this.datav.getUint32(this.pos,!0),this.pos+=4,this.colors=this.datav.getUint32(this.pos,!0),this.pos+=4,this.importantColors=this.datav.getUint32(this.pos,!0),this.pos+=4,this.bitPP===16&&this.is_with_alpha&&(this.bitPP=15),this.bitPP<15){var r=this.colors===0?1<<this.bitPP:this.colors;this.palette=new Array(r);for(var t=0;t<r;t++){var e=this.datav.getUint8(this.pos++,!0),i=this.datav.getUint8(this.pos++,!0),o=this.datav.getUint8(this.pos++,!0),a=this.datav.getUint8(this.pos++,!0);this.palette[t]={red:o,green:i,blue:e,quad:a}}}this.height<0&&(this.height*=-1,this.bottom_up=!1)},Er.prototype.parseBGR=function(){this.pos=this.offset;try{var r="bit"+this.bitPP,t=this.width*this.height*4;this.data=new Uint8Array(t),this[r]()}catch(e){me.log("bit decode error:"+e)}},Er.prototype.bit1=function(){var r,t=Math.ceil(this.width/8),e=t%4;for(r=this.height-1;r>=0;r--){for(var i=this.bottom_up?r:this.height-1-r,o=0;o<t;o++)for(var a=this.datav.getUint8(this.pos++,!0),u=i*this.width*4+8*o*4,h=0;h<8&&8*o+h<this.width;h++){var f=this.palette[a>>7-h&1];this.data[u+4*h]=f.blue,this.data[u+4*h+1]=f.green,this.data[u+4*h+2]=f.red,this.data[u+4*h+3]=255}e!==0&&(this.pos+=4-e)}},Er.prototype.bit4=function(){for(var r=Math.ceil(this.width/2),t=r%4,e=this.height-1;e>=0;e--){for(var i=this.bottom_up?e:this.height-1-e,o=0;o<r;o++){var a=this.datav.getUint8(this.pos++,!0),u=i*this.width*4+2*o*4,h=a>>4,f=15&a,d=this.palette[h];if(this.data[u]=d.blue,this.data[u+1]=d.green,this.data[u+2]=d.red,this.data[u+3]=255,2*o+1>=this.width)break;d=this.palette[f],this.data[u+4]=d.blue,this.data[u+4+1]=d.green,this.data[u+4+2]=d.red,this.data[u+4+3]=255}t!==0&&(this.pos+=4-t)}},Er.prototype.bit8=function(){for(var r=this.width%4,t=this.height-1;t>=0;t--){for(var e=this.bottom_up?t:this.height-1-t,i=0;i<this.width;i++){var o=this.datav.getUint8(this.pos++,!0),a=e*this.width*4+4*i;if(o<this.palette.length){var u=this.palette[o];this.data[a]=u.red,this.data[a+1]=u.green,this.data[a+2]=u.blue,this.data[a+3]=255}else this.data[a]=255,this.data[a+1]=255,this.data[a+2]=255,this.data[a+3]=255}r!==0&&(this.pos+=4-r)}},Er.prototype.bit15=function(){for(var r=this.width%3,t=parseInt("11111",2),e=this.height-1;e>=0;e--){for(var i=this.bottom_up?e:this.height-1-e,o=0;o<this.width;o++){var a=this.datav.getUint16(this.pos,!0);this.pos+=2;var u=(a&t)/t*255|0,h=(a>>5&t)/t*255|0,f=(a>>10&t)/t*255|0,d=a>>15?255:0,v=i*this.width*4+4*o;this.data[v]=f,this.data[v+1]=h,this.data[v+2]=u,this.data[v+3]=d}this.pos+=r}},Er.prototype.bit16=function(){for(var r=this.width%3,t=parseInt("11111",2),e=parseInt("111111",2),i=this.height-1;i>=0;i--){for(var o=this.bottom_up?i:this.height-1-i,a=0;a<this.width;a++){var u=this.datav.getUint16(this.pos,!0);this.pos+=2;var h=(u&t)/t*255|0,f=(u>>5&e)/e*255|0,d=(u>>11)/t*255|0,v=o*this.width*4+4*a;this.data[v]=d,this.data[v+1]=f,this.data[v+2]=h,this.data[v+3]=255}this.pos+=r}},Er.prototype.bit24=function(){for(var r=this.height-1;r>=0;r--){for(var t=this.bottom_up?r:this.height-1-r,e=0;e<this.width;e++){var i=this.datav.getUint8(this.pos++,!0),o=this.datav.getUint8(this.pos++,!0),a=this.datav.getUint8(this.pos++,!0),u=t*this.width*4+4*e;this.data[u]=a,this.data[u+1]=o,this.data[u+2]=i,this.data[u+3]=255}this.pos+=this.width%4}},Er.prototype.bit32=function(){for(var r=this.height-1;r>=0;r--)for(var t=this.bottom_up?r:this.height-1-r,e=0;e<this.width;e++){var i=this.datav.getUint8(this.pos++,!0),o=this.datav.getUint8(this.pos++,!0),a=this.datav.getUint8(this.pos++,!0),u=this.datav.getUint8(this.pos++,!0),h=t*this.width*4+4*e;this.data[h]=a,this.data[h+1]=o,this.data[h+2]=i,this.data[h+3]=u}},Er.prototype.getData=function(){return this.data},function(r){r.processBMP=function(t,e,i,o){var a=new Er(t,!1),u=a.width,h=a.height,f={data:a.getData(),width:u,height:h},d=new xs(100).encode(f,100);return r.processJPEG.call(this,d,e,i,o)}}(zt.API),Du.prototype.getData=function(){return this.data},function(r){r.processWEBP=function(t,e,i,o){var a=new Du(t),u=a.width,h=a.height,f={data:a.getData(),width:u,height:h},d=new xs(100).encode(f,100);return r.processJPEG.call(this,d,e,i,o)}}(zt.API),zt.API.processRGBA=function(r,t,e){for(var i=r.data,o=i.length,a=new Uint8Array(o/4*3),u=new Uint8Array(o/4),h=0,f=0,d=0;d<o;d+=4){var v=i[d],m=i[d+1],w=i[d+2],p=i[d+3];a[h++]=v,a[h++]=m,a[h++]=w,u[f++]=p}var F=this.__addimage__.arrayBufferToBinaryString(a);return{alpha:this.__addimage__.arrayBufferToBinaryString(u),data:F,index:t,alias:e,colorSpace:"DeviceRGB",bitsPerComponent:8,width:r.width,height:r.height}},zt.API.setLanguage=function(r){return this.internal.languageSettings===void 0&&(this.internal.languageSettings={},this.internal.languageSettings.isSubscribed=!1),{af:"Afrikaans",sq:"Albanian",ar:"Arabic (Standard)","ar-DZ":"Arabic (Algeria)","ar-BH":"Arabic (Bahrain)","ar-EG":"Arabic (Egypt)","ar-IQ":"Arabic (Iraq)","ar-JO":"Arabic (Jordan)","ar-KW":"Arabic (Kuwait)","ar-LB":"Arabic (Lebanon)","ar-LY":"Arabic (Libya)","ar-MA":"Arabic (Morocco)","ar-OM":"Arabic (Oman)","ar-QA":"Arabic (Qatar)","ar-SA":"Arabic (Saudi Arabia)","ar-SY":"Arabic (Syria)","ar-TN":"Arabic (Tunisia)","ar-AE":"Arabic (U.A.E.)","ar-YE":"Arabic (Yemen)",an:"Aragonese",hy:"Armenian",as:"Assamese",ast:"Asturian",az:"Azerbaijani",eu:"Basque",be:"Belarusian",bn:"Bengali",bs:"Bosnian",br:"Breton",bg:"Bulgarian",my:"Burmese",ca:"Catalan",ch:"Chamorro",ce:"Chechen",zh:"Chinese","zh-HK":"Chinese (Hong Kong)","zh-CN":"Chinese (PRC)","zh-SG":"Chinese (Singapore)","zh-TW":"Chinese (Taiwan)",cv:"Chuvash",co:"Corsican",cr:"Cree",hr:"Croatian",cs:"Czech",da:"Danish",nl:"Dutch (Standard)","nl-BE":"Dutch (Belgian)",en:"English","en-AU":"English (Australia)","en-BZ":"English (Belize)","en-CA":"English (Canada)","en-IE":"English (Ireland)","en-JM":"English (Jamaica)","en-NZ":"English (New Zealand)","en-PH":"English (Philippines)","en-ZA":"English (South Africa)","en-TT":"English (Trinidad & Tobago)","en-GB":"English (United Kingdom)","en-US":"English (United States)","en-ZW":"English (Zimbabwe)",eo:"Esperanto",et:"Estonian",fo:"Faeroese",fj:"Fijian",fi:"Finnish",fr:"French (Standard)","fr-BE":"French (Belgium)","fr-CA":"French (Canada)","fr-FR":"French (France)","fr-LU":"French (Luxembourg)","fr-MC":"French (Monaco)","fr-CH":"French (Switzerland)",fy:"Frisian",fur:"Friulian",gd:"Gaelic (Scots)","gd-IE":"Gaelic (Irish)",gl:"Galacian",ka:"Georgian",de:"German (Standard)","de-AT":"German (Austria)","de-DE":"German (Germany)","de-LI":"German (Liechtenstein)","de-LU":"German (Luxembourg)","de-CH":"German (Switzerland)",el:"Greek",gu:"Gujurati",ht:"Haitian",he:"Hebrew",hi:"Hindi",hu:"Hungarian",is:"Icelandic",id:"Indonesian",iu:"Inuktitut",ga:"Irish",it:"Italian (Standard)","it-CH":"Italian (Switzerland)",ja:"Japanese",kn:"Kannada",ks:"Kashmiri",kk:"Kazakh",km:"Khmer",ky:"Kirghiz",tlh:"Klingon",ko:"Korean","ko-KP":"Korean (North Korea)","ko-KR":"Korean (South Korea)",la:"Latin",lv:"Latvian",lt:"Lithuanian",lb:"Luxembourgish",mk:"North Macedonia",ms:"Malay",ml:"Malayalam",mt:"Maltese",mi:"Maori",mr:"Marathi",mo:"Moldavian",nv:"Navajo",ng:"Ndonga",ne:"Nepali",no:"Norwegian",nb:"Norwegian (Bokmal)",nn:"Norwegian (Nynorsk)",oc:"Occitan",or:"Oriya",om:"Oromo",fa:"Persian","fa-IR":"Persian/Iran",pl:"Polish",pt:"Portuguese","pt-BR":"Portuguese (Brazil)",pa:"Punjabi","pa-IN":"Punjabi (India)","pa-PK":"Punjabi (Pakistan)",qu:"Quechua",rm:"Rhaeto-Romanic",ro:"Romanian","ro-MO":"Romanian (Moldavia)",ru:"Russian","ru-MO":"Russian (Moldavia)",sz:"Sami (Lappish)",sg:"Sango",sa:"Sanskrit",sc:"Sardinian",sd:"Sindhi",si:"Singhalese",sr:"Serbian",sk:"Slovak",sl:"Slovenian",so:"Somani",sb:"Sorbian",es:"Spanish","es-AR":"Spanish (Argentina)","es-BO":"Spanish (Bolivia)","es-CL":"Spanish (Chile)","es-CO":"Spanish (Colombia)","es-CR":"Spanish (Costa Rica)","es-DO":"Spanish (Dominican Republic)","es-EC":"Spanish (Ecuador)","es-SV":"Spanish (El Salvador)","es-GT":"Spanish (Guatemala)","es-HN":"Spanish (Honduras)","es-MX":"Spanish (Mexico)","es-NI":"Spanish (Nicaragua)","es-PA":"Spanish (Panama)","es-PY":"Spanish (Paraguay)","es-PE":"Spanish (Peru)","es-PR":"Spanish (Puerto Rico)","es-ES":"Spanish (Spain)","es-UY":"Spanish (Uruguay)","es-VE":"Spanish (Venezuela)",sx:"Sutu",sw:"Swahili",sv:"Swedish","sv-FI":"Swedish (Finland)","sv-SV":"Swedish (Sweden)",ta:"Tamil",tt:"Tatar",te:"Teluga",th:"Thai",tig:"Tigre",ts:"Tsonga",tn:"Tswana",tr:"Turkish",tk:"Turkmen",uk:"Ukrainian",hsb:"Upper Sorbian",ur:"Urdu",ve:"Venda",vi:"Vietnamese",vo:"Volapuk",wa:"Walloon",cy:"Welsh",xh:"Xhosa",ji:"Yiddish",zu:"Zulu"}[r]!==void 0&&(this.internal.languageSettings.languageCode=r,this.internal.languageSettings.isSubscribed===!1&&(this.internal.events.subscribe("putCatalog",function(){this.internal.write("/Lang ("+this.internal.languageSettings.languageCode+")")}),this.internal.languageSettings.isSubscribed=!0)),this},ki=zt.API,fo=ki.getCharWidthsArray=function(r,t){var e,i,o=(t=t||{}).font||this.internal.getFont(),a=t.fontSize||this.internal.getFontSize(),u=t.charSpace||this.internal.getCharSpace(),h=t.widths?t.widths:o.metadata.Unicode.widths,f=h.fof?h.fof:1,d=t.kerning?t.kerning:o.metadata.Unicode.kerning,v=d.fof?d.fof:1,m=t.doKerning!==!1,w=0,p=r.length,F=0,P=h[0]||f,D=[];for(e=0;e<p;e++)i=r.charCodeAt(e),typeof o.metadata.widthOfString=="function"?D.push((o.metadata.widthOfGlyph(o.metadata.characterToGlyph(i))+u*(1e3/a)||0)/1e3):(w=m&&he(d[i])==="object"&&!isNaN(parseInt(d[i][F],10))?d[i][F]/v:0,D.push((h[i]||P)/f+w)),F=i;return D},Cu=ki.getStringUnitWidth=function(r,t){var e=(t=t||{}).fontSize||this.internal.getFontSize(),i=t.font||this.internal.getFont(),o=t.charSpace||this.internal.getCharSpace();return ki.processArabic&&(r=ki.processArabic(r)),typeof i.metadata.widthOfString=="function"?i.metadata.widthOfString(r,e,o)/e:fo.apply(this,arguments).reduce(function(a,u){return a+u},0)},Iu=function(r,t,e,i){for(var o=[],a=0,u=r.length,h=0;a!==u&&h+t[a]<e;)h+=t[a],a++;o.push(r.slice(0,a));var f=a;for(h=0;a!==u;)h+t[a]>i&&(o.push(r.slice(f,a)),h=0,f=a),h+=t[a],a++;return f!==a&&o.push(r.slice(f,a)),o},ju=function(r,t,e){e||(e={});var i,o,a,u,h,f,d,v=[],m=[v],w=e.textIndent||0,p=0,F=0,P=r.split(" "),D=fo.apply(this,[" ",e])[0];if(f=e.lineIndent===-1?P[0].length+2:e.lineIndent||0){var _=Array(f).join(" "),B=[];P.map(function(it){(it=it.split(/\s*\n/)).length>1?B=B.concat(it.map(function(ut,wt){return(wt&&ut.length?`
213
- `:"")+ut})):B.push(it[0])}),P=B,f=Cu.apply(this,[_,e])}for(a=0,u=P.length;a<u;a++){var G=0;if(i=P[a],f&&i[0]==`
214
- `&&(i=i.substr(1),G=1),w+p+(F=(o=fo.apply(this,[i,e])).reduce(function(it,ut){return it+ut},0))>t||G){if(F>t){for(h=Iu.apply(this,[i,o,t-(w+p),t]),v.push(h.shift()),v=[h.pop()];h.length;)m.push([h.shift()]);F=o.slice(i.length-(v[0]?v[0].length:0)).reduce(function(it,ut){return it+ut},0)}else v=[i];m.push(v),w=F+f,p=D}else v.push(i),w+=p+F,p=D}return d=f?function(it,ut){return(ut?_:"")+it.join(" ")}:function(it){return it.join(" ")},m.map(d)},ki.splitTextToSize=function(r,t,e){var i,o=(e=e||{}).fontSize||this.internal.getFontSize(),a=(function(v){if(v.widths&&v.kerning)return{widths:v.widths,kerning:v.kerning};var m=this.internal.getFont(v.fontName,v.fontStyle);return m.metadata.Unicode?{widths:m.metadata.Unicode.widths||{0:1},kerning:m.metadata.Unicode.kerning||{}}:{font:m.metadata,fontSize:this.internal.getFontSize(),charSpace:this.internal.getCharSpace()}}).call(this,e);i=Array.isArray(r)?r:String(r).split(/\r?\n/);var u=1*this.internal.scaleFactor*t/o;a.textIndent=e.textIndent?1*e.textIndent*this.internal.scaleFactor/o:0,a.lineIndent=e.lineIndent;var h,f,d=[];for(h=0,f=i.length;h<f;h++)d=d.concat(ju.apply(this,[i[h],u,a]));return d},function(r){r.__fontmetrics__=r.__fontmetrics__||{};for(var t="klmnopqrstuvwxyz",e={},i={},o=0;o<t.length;o++)e[t[o]]="0123456789abcdef"[o],i["0123456789abcdef"[o]]=t[o];var a=function(m){return"0x"+parseInt(m,10).toString(16)},u=r.__fontmetrics__.compress=function(m){var w,p,F,P,D=["{"];for(var _ in m){if(w=m[_],isNaN(parseInt(_,10))?p="'"+_+"'":(_=parseInt(_,10),p=(p=a(_).slice(2)).slice(0,-1)+i[p.slice(-1)]),typeof w=="number")w<0?(F=a(w).slice(3),P="-"):(F=a(w).slice(2),P=""),F=P+F.slice(0,-1)+i[F.slice(-1)];else{if(he(w)!=="object")throw new Error("Don't know what to do with value type "+he(w)+".");F=u(w)}D.push(p+F)}return D.push("}"),D.join("")},h=r.__fontmetrics__.uncompress=function(m){if(typeof m!="string")throw new Error("Invalid argument passed to uncompress.");for(var w,p,F,P,D={},_=1,B=D,G=[],it="",ut="",wt=m.length-1,tt=1;tt<wt;tt+=1)(P=m[tt])=="'"?w?(F=w.join(""),w=void 0):w=[]:w?w.push(P):P=="{"?(G.push([B,F]),B={},F=void 0):P=="}"?((p=G.pop())[0][p[1]]=B,F=void 0,B=p[0]):P=="-"?_=-1:F===void 0?e.hasOwnProperty(P)?(it+=e[P],F=parseInt(it,16)*_,_=1,it=""):it+=P:e.hasOwnProperty(P)?(ut+=e[P],B[F]=parseInt(ut,16)*_,_=1,F=void 0,ut=""):ut+=P;return D},f={codePages:["WinAnsiEncoding"],WinAnsiEncoding:h("{19m8n201n9q201o9r201s9l201t9m201u8m201w9n201x9o201y8o202k8q202l8r202m9p202q8p20aw8k203k8t203t8v203u9v2cq8s212m9t15m8w15n9w2dw9s16k8u16l9u17s9z17x8y17y9y}")},d={Unicode:{Courier:f,"Courier-Bold":f,"Courier-BoldOblique":f,"Courier-Oblique":f,Helvetica:f,"Helvetica-Bold":f,"Helvetica-BoldOblique":f,"Helvetica-Oblique":f,"Times-Roman":f,"Times-Bold":f,"Times-BoldItalic":f,"Times-Italic":f}},v={Unicode:{"Courier-Oblique":h("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-BoldItalic":h("{'widths'{k3o2q4ycx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2r202m2n2n3m2o3m2p5n202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5n4l4m4m4m4n4m4o4s4p4m4q4m4r4s4s4y4t2r4u3m4v4m4w3x4x5t4y4s4z4s5k3x5l4s5m4m5n3r5o3x5p4s5q4m5r5t5s4m5t3x5u3x5v2l5w1w5x2l5y3t5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q2l6r3m6s3r6t1w6u1w6v3m6w1w6x4y6y3r6z3m7k3m7l3m7m2r7n2r7o1w7p3r7q2w7r4m7s3m7t2w7u2r7v2n7w1q7x2n7y3t202l3mcl4mal2ram3man3mao3map3mar3mas2lat4uau1uav3maw3way4uaz2lbk2sbl3t'fof'6obo2lbp3tbq3mbr1tbs2lbu1ybv3mbz3mck4m202k3mcm4mcn4mco4mcp4mcq5ycr4mcs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz2w203k6o212m6o2dw2l2cq2l3t3m3u2l17s3x19m3m}'kerning'{cl{4qu5kt5qt5rs17ss5ts}201s{201ss}201t{cks4lscmscnscoscpscls2wu2yu201ts}201x{2wu2yu}2k{201ts}2w{4qx5kx5ou5qx5rs17su5tu}2x{17su5tu5ou}2y{4qx5kx5ou5qx5rs17ss5ts}'fof'-6ofn{17sw5tw5ou5qw5rs}7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qs}3v{17su5tu5os5qs}7p{17su5tu}ck{4qu5kt5qt5rs17ss5ts}4l{4qu5kt5qt5rs17ss5ts}cm{4qu5kt5qt5rs17ss5ts}cn{4qu5kt5qt5rs17ss5ts}co{4qu5kt5qt5rs17ss5ts}cp{4qu5kt5qt5rs17ss5ts}6l{4qu5ou5qw5rt17su5tu}5q{ckuclucmucnucoucpu4lu}5r{ckuclucmucnucoucpu4lu}7q{cksclscmscnscoscps4ls}6p{4qu5ou5qw5rt17sw5tw}ek{4qu5ou5qw5rt17su5tu}el{4qu5ou5qw5rt17su5tu}em{4qu5ou5qw5rt17su5tu}en{4qu5ou5qw5rt17su5tu}eo{4qu5ou5qw5rt17su5tu}ep{4qu5ou5qw5rt17su5tu}es{17ss5ts5qs4qu}et{4qu5ou5qw5rt17sw5tw}eu{4qu5ou5qw5rt17ss5ts}ev{17ss5ts5qs4qu}6z{17sw5tw5ou5qw5rs}fm{17sw5tw5ou5qw5rs}7n{201ts}fo{17sw5tw5ou5qw5rs}fp{17sw5tw5ou5qw5rs}fq{17sw5tw5ou5qw5rs}7r{cksclscmscnscoscps4ls}fs{17sw5tw5ou5qw5rs}ft{17su5tu}fu{17su5tu}fv{17su5tu}fw{17su5tu}fz{cksclscmscnscoscps4ls}}}"),"Helvetica-Bold":h("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"),Courier:h("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-BoldOblique":h("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Bold":h("{'widths'{k3q2q5ncx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2l202m2n2n3m2o3m2p6o202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5x4l4s4m4m4n4s4o4s4p4m4q3x4r4y4s4y4t2r4u3m4v4y4w4m4x5y4y4s4z4y5k3x5l4y5m4s5n3r5o4m5p4s5q4s5r6o5s4s5t4s5u4m5v2l5w1w5x2l5y3u5z3m6k2l6l3m6m3r6n2w6o3r6p2w6q2l6r3m6s3r6t1w6u2l6v3r6w1w6x5n6y3r6z3m7k3r7l3r7m2w7n2r7o2l7p3r7q3m7r4s7s3m7t3m7u2w7v2r7w1q7x2r7y3o202l3mcl4sal2lam3man3mao3map3mar3mas2lat4uau1yav3maw3tay4uaz2lbk2sbl3t'fof'6obo2lbp3rbr1tbs2lbu2lbv3mbz3mck4s202k3mcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3rek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3m3u2l17s4s19m3m}'kerning'{cl{4qt5ks5ot5qy5rw17sv5tv}201t{cks4lscmscnscoscpscls4wv}2k{201ts}2w{4qu5ku7mu5os5qx5ru17su5tu}2x{17su5tu5ou5qs}2y{4qv5kv7mu5ot5qz5ru17su5tu}'fof'-6o7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qu}3v{17su5tu5os5qu}fu{17su5tu5ou5qu}7p{17su5tu5ou5qu}ck{4qt5ks5ot5qy5rw17sv5tv}4l{4qt5ks5ot5qy5rw17sv5tv}cm{4qt5ks5ot5qy5rw17sv5tv}cn{4qt5ks5ot5qy5rw17sv5tv}co{4qt5ks5ot5qy5rw17sv5tv}cp{4qt5ks5ot5qy5rw17sv5tv}6l{17st5tt5ou5qu}17s{ckuclucmucnucoucpu4lu4wu}5o{ckuclucmucnucoucpu4lu4wu}5q{ckzclzcmzcnzcozcpz4lz4wu}5r{ckxclxcmxcnxcoxcpx4lx4wu}5t{ckuclucmucnucoucpu4lu4wu}7q{ckuclucmucnucoucpu4lu}6p{17sw5tw5ou5qu}ek{17st5tt5qu}el{17st5tt5ou5qu}em{17st5tt5qu}en{17st5tt5qu}eo{17st5tt5qu}ep{17st5tt5ou5qu}es{17ss5ts5qu}et{17sw5tw5ou5qu}eu{17sw5tw5ou5qu}ev{17ss5ts5qu}6z{17sw5tw5ou5qu5rs}fm{17sw5tw5ou5qu5rs}fn{17sw5tw5ou5qu5rs}fo{17sw5tw5ou5qu5rs}fp{17sw5tw5ou5qu5rs}fq{17sw5tw5ou5qu5rs}7r{cktcltcmtcntcotcpt4lt5os}fs{17sw5tw5ou5qu5rs}ft{17su5tu5ou5qu}7m{5os}fv{17su5tu5ou5qu}fw{17su5tu5ou5qu}fz{cksclscmscnscoscps4ls}}}"),Symbol:h("{'widths'{k3uaw4r19m3m2k1t2l2l202m2y2n3m2p5n202q6o3k3m2s2l2t2l2v3r2w1t3m3m2y1t2z1wbk2sbl3r'fof'6o3n3m3o3m3p3m3q3m3r3m3s3m3t3m3u1w3v1w3w3r3x3r3y3r3z2wbp3t3l3m5v2l5x2l5z3m2q4yfr3r7v3k7w1o7x3k}'kerning'{'fof'-6o}}"),Helvetica:h("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}"),"Helvetica-BoldOblique":h("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"),ZapfDingbats:h("{'widths'{k4u2k1w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-Bold":h("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Italic":h("{'widths'{k3n2q4ycx2l201n3m201o5t201s2l201t2l201u2l201w3r201x3r201y3r2k1t2l2l202m2n2n3m2o3m2p5n202q5t2r1p2s2l2t2l2u3m2v4n2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w4n3x4n3y4n3z3m4k5w4l3x4m3x4n4m4o4s4p3x4q3x4r4s4s4s4t2l4u2w4v4m4w3r4x5n4y4m4z4s5k3x5l4s5m3x5n3m5o3r5p4s5q3x5r5n5s3x5t3r5u3r5v2r5w1w5x2r5y2u5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q1w6r3m6s3m6t1w6u1w6v2w6w1w6x4s6y3m6z3m7k3m7l3m7m2r7n2r7o1w7p3m7q2w7r4m7s2w7t2w7u2r7v2s7w1v7x2s7y3q202l3mcl3xal2ram3man3mao3map3mar3mas2lat4wau1vav3maw4nay4waz2lbk2sbl4n'fof'6obo2lbp3mbq3obr1tbs2lbu1zbv3mbz3mck3x202k3mcm3xcn3xco3xcp3xcq5tcr4mcs3xct3xcu3xcv3xcw2l2m2ucy2lcz2ldl4mdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr4nfs3mft3mfu3mfv3mfw3mfz2w203k6o212m6m2dw2l2cq2l3t3m3u2l17s3r19m3m}'kerning'{cl{5kt4qw}201s{201sw}201t{201tw2wy2yy6q-t}201x{2wy2yy}2k{201tw}2w{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}2x{17ss5ts5os}2y{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}'fof'-6o6t{17ss5ts5qs}7t{5os}3v{5qs}7p{17su5tu5qs}ck{5kt4qw}4l{5kt4qw}cm{5kt4qw}cn{5kt4qw}co{5kt4qw}cp{5kt4qw}6l{4qs5ks5ou5qw5ru17su5tu}17s{2ks}5q{ckvclvcmvcnvcovcpv4lv}5r{ckuclucmucnucoucpu4lu}5t{2ks}6p{4qs5ks5ou5qw5ru17su5tu}ek{4qs5ks5ou5qw5ru17su5tu}el{4qs5ks5ou5qw5ru17su5tu}em{4qs5ks5ou5qw5ru17su5tu}en{4qs5ks5ou5qw5ru17su5tu}eo{4qs5ks5ou5qw5ru17su5tu}ep{4qs5ks5ou5qw5ru17su5tu}es{5ks5qs4qs}et{4qs5ks5ou5qw5ru17su5tu}eu{4qs5ks5qw5ru17su5tu}ev{5ks5qs4qs}ex{17ss5ts5qs}6z{4qv5ks5ou5qw5ru17su5tu}fm{4qv5ks5ou5qw5ru17su5tu}fn{4qv5ks5ou5qw5ru17su5tu}fo{4qv5ks5ou5qw5ru17su5tu}fp{4qv5ks5ou5qw5ru17su5tu}fq{4qv5ks5ou5qw5ru17su5tu}7r{5os}fs{4qv5ks5ou5qw5ru17su5tu}ft{17su5tu5qs}fu{17su5tu5qs}fv{17su5tu5qs}fw{17su5tu5qs}}}"),"Times-Roman":h("{'widths'{k3n2q4ycx2l201n3m201o6o201s2l201t2l201u2l201w2w201x2w201y2w2k1t2l2l202m2n2n3m2o3m2p5n202q6o2r1m2s2l2t2l2u3m2v3s2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v1w3w3s3x3s3y3s3z2w4k5w4l4s4m4m4n4m4o4s4p3x4q3r4r4s4s4s4t2l4u2r4v4s4w3x4x5t4y4s4z4s5k3r5l4s5m4m5n3r5o3x5p4s5q4s5r5y5s4s5t4s5u3x5v2l5w1w5x2l5y2z5z3m6k2l6l2w6m3m6n2w6o3m6p2w6q2l6r3m6s3m6t1w6u1w6v3m6w1w6x4y6y3m6z3m7k3m7l3m7m2l7n2r7o1w7p3m7q3m7r4s7s3m7t3m7u2w7v3k7w1o7x3k7y3q202l3mcl4sal2lam3man3mao3map3mar3mas2lat4wau1vav3maw3say4waz2lbk2sbl3s'fof'6obo2lbp3mbq2xbr1tbs2lbu1zbv3mbz2wck4s202k3mcm4scn4sco4scp4scq5tcr4mcs3xct3xcu3xcv3xcw2l2m2tcy2lcz2ldl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek2wel2wem2wen2weo2wep2weq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr3sfs3mft3mfu3mfv3mfw3mfz3m203k6o212m6m2dw2l2cq2l3t3m3u1w17s4s19m3m}'kerning'{cl{4qs5ku17sw5ou5qy5rw201ss5tw201ws}201s{201ss}201t{ckw4lwcmwcnwcowcpwclw4wu201ts}2k{201ts}2w{4qs5kw5os5qx5ru17sx5tx}2x{17sw5tw5ou5qu}2y{4qs5kw5os5qx5ru17sx5tx}'fof'-6o7t{ckuclucmucnucoucpu4lu5os5rs}3u{17su5tu5qs}3v{17su5tu5qs}7p{17sw5tw5qs}ck{4qs5ku17sw5ou5qy5rw201ss5tw201ws}4l{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cm{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cn{4qs5ku17sw5ou5qy5rw201ss5tw201ws}co{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cp{4qs5ku17sw5ou5qy5rw201ss5tw201ws}6l{17su5tu5os5qw5rs}17s{2ktclvcmvcnvcovcpv4lv4wuckv}5o{ckwclwcmwcnwcowcpw4lw4wu}5q{ckyclycmycnycoycpy4ly4wu5ms}5r{cktcltcmtcntcotcpt4lt4ws}5t{2ktclvcmvcnvcovcpv4lv4wuckv}7q{cksclscmscnscoscps4ls}6p{17su5tu5qw5rs}ek{5qs5rs}el{17su5tu5os5qw5rs}em{17su5tu5os5qs5rs}en{17su5qs5rs}eo{5qs5rs}ep{17su5tu5os5qw5rs}es{5qs}et{17su5tu5qw5rs}eu{17su5tu5qs5rs}ev{5qs}6z{17sv5tv5os5qx5rs}fm{5os5qt5rs}fn{17sv5tv5os5qx5rs}fo{17sv5tv5os5qx5rs}fp{5os5qt5rs}fq{5os5qt5rs}7r{ckuclucmucnucoucpu4lu5os}fs{17sv5tv5os5qx5rs}ft{17ss5ts5qs}fu{17sw5tw5qs}fv{17sw5tw5qs}fw{17ss5ts5qs}fz{ckuclucmucnucoucpu4lu5os5rs}}}"),"Helvetica-Oblique":h("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}")}};r.events.push(["addFont",function(m){var w=m.font,p=v.Unicode[w.postScriptName];p&&(w.metadata.Unicode={},w.metadata.Unicode.widths=p.widths,w.metadata.Unicode.kerning=p.kerning);var F=d.Unicode[w.postScriptName];F&&(w.metadata.Unicode.encoding=F,w.encoding=F.codePages[0])}])}(zt.API),function(r){var t=function(e){for(var i=e.length,o=new Uint8Array(i),a=0;a<i;a++)o[a]=e.charCodeAt(a);return o};r.API.events.push(["addFont",function(e){var i=void 0,o=e.font,a=e.instance;if(!o.isStandardFont){if(a===void 0)throw new Error("Font does not exist in vFS, import fonts or remove declaration doc.addFont('"+o.postScriptName+"').");if(typeof(i=a.existsFileInVFS(o.postScriptName)===!1?a.loadFile(o.postScriptName):a.getFileFromVFS(o.postScriptName))!="string")throw new Error("Font is not stored as string-data in vFS, import fonts or remove declaration doc.addFont('"+o.postScriptName+"').");(function(u,h){h=/^\x00\x01\x00\x00/.test(h)?t(h):t(ga(h)),u.metadata=r.API.TTFFont.open(h),u.metadata.Unicode=u.metadata.Unicode||{encoding:{},kerning:{},widths:[]},u.metadata.glyIdsUsed=[0]})(o,i)}}])}(zt),function(r){function t(){return(Ht.canvg?Promise.resolve(Ht.canvg):Promise.resolve().then(()=>require("./index.es-CWhDHun6.cjs"))).catch(function(e){return Promise.reject(new Error("Could not load canvg: "+e))}).then(function(e){return e.default?e.default:e})}zt.API.addSvgAsImage=function(e,i,o,a,u,h,f,d){if(isNaN(i)||isNaN(o))throw me.error("jsPDF.addSvgAsImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addSvgAsImage");if(isNaN(a)||isNaN(u))throw me.error("jsPDF.addSvgAsImage: Invalid measurements",arguments),new Error("Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage");var v=document.createElement("canvas");v.width=a,v.height=u;var m=v.getContext("2d");m.fillStyle="#fff",m.fillRect(0,0,v.width,v.height);var w={ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0},p=this;return t().then(function(F){return F.fromString(m,e,w)},function(){return Promise.reject(new Error("Could not load canvg."))}).then(function(F){return F.render(w)}).then(function(){p.addImage(v.toDataURL("image/jpeg",1),i,o,a,u,f,d)})}}(),zt.API.putTotalPages=function(r){var t,e=0;parseInt(this.internal.getFont().id.substr(1),10)<15?(t=new RegExp(r,"g"),e=this.internal.getNumberOfPages()):(t=new RegExp(this.pdfEscape16(r,this.internal.getFont()),"g"),e=this.pdfEscape16(this.internal.getNumberOfPages()+"",this.internal.getFont()));for(var i=1;i<=this.internal.getNumberOfPages();i++)for(var o=0;o<this.internal.pages[i].length;o++)this.internal.pages[i][o]=this.internal.pages[i][o].replace(t,e);return this},zt.API.viewerPreferences=function(r,t){var e;r=r||{},t=t||!1;var i,o,a,u={HideToolbar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideMenubar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideWindowUI:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},FitWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},CenterWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},DisplayDocTitle:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.4},NonFullScreenPageMode:{defaultValue:"UseNone",value:"UseNone",type:"name",explicitSet:!1,valueSet:["UseNone","UseOutlines","UseThumbs","UseOC"],pdfVersion:1.3},Direction:{defaultValue:"L2R",value:"L2R",type:"name",explicitSet:!1,valueSet:["L2R","R2L"],pdfVersion:1.3},ViewArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},ViewClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintScaling:{defaultValue:"AppDefault",value:"AppDefault",type:"name",explicitSet:!1,valueSet:["AppDefault","None"],pdfVersion:1.6},Duplex:{defaultValue:"",value:"none",type:"name",explicitSet:!1,valueSet:["Simplex","DuplexFlipShortEdge","DuplexFlipLongEdge","none"],pdfVersion:1.7},PickTrayByPDFSize:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.7},PrintPageRange:{defaultValue:"",value:"",type:"array",explicitSet:!1,valueSet:null,pdfVersion:1.7},NumCopies:{defaultValue:1,value:1,type:"integer",explicitSet:!1,valueSet:null,pdfVersion:1.7}},h=Object.keys(u),f=[],d=0,v=0,m=0;function w(F,P){var D,_=!1;for(D=0;D<F.length;D+=1)F[D]===P&&(_=!0);return _}if(this.internal.viewerpreferences===void 0&&(this.internal.viewerpreferences={},this.internal.viewerpreferences.configuration=JSON.parse(JSON.stringify(u)),this.internal.viewerpreferences.isSubscribed=!1),e=this.internal.viewerpreferences.configuration,r==="reset"||t===!0){var p=h.length;for(m=0;m<p;m+=1)e[h[m]].value=e[h[m]].defaultValue,e[h[m]].explicitSet=!1}if(he(r)==="object"){for(o in r)if(a=r[o],w(h,o)&&a!==void 0){if(e[o].type==="boolean"&&typeof a=="boolean")e[o].value=a;else if(e[o].type==="name"&&w(e[o].valueSet,a))e[o].value=a;else if(e[o].type==="integer"&&Number.isInteger(a))e[o].value=a;else if(e[o].type==="array"){for(d=0;d<a.length;d+=1)if(i=!0,a[d].length===1&&typeof a[d][0]=="number")f.push(String(a[d]-1));else if(a[d].length>1){for(v=0;v<a[d].length;v+=1)typeof a[d][v]!="number"&&(i=!1);i===!0&&f.push([a[d][0]-1,a[d][1]-1].join(" "))}e[o].value="["+f.join(" ")+"]"}else e[o].value=e[o].defaultValue;e[o].explicitSet=!0}}return this.internal.viewerpreferences.isSubscribed===!1&&(this.internal.events.subscribe("putCatalog",function(){var F,P=[];for(F in e)e[F].explicitSet===!0&&(e[F].type==="name"?P.push("/"+F+" /"+e[F].value):P.push("/"+F+" "+e[F].value));P.length!==0&&this.internal.write(`/ViewerPreferences
215
- <<
216
- `+P.join(`
217
- `)+`
218
- >>`)}),this.internal.viewerpreferences.isSubscribed=!0),this.internal.viewerpreferences.configuration=e,this},function(r){var t=function(){var i='<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><rdf:Description rdf:about="" xmlns:jspdf="'+this.internal.__metadata__.namespaceuri+'"><jspdf:metadata>',o=unescape(encodeURIComponent('<x:xmpmeta xmlns:x="adobe:ns:meta/">')),a=unescape(encodeURIComponent(i)),u=unescape(encodeURIComponent(this.internal.__metadata__.metadata)),h=unescape(encodeURIComponent("</jspdf:metadata></rdf:Description></rdf:RDF>")),f=unescape(encodeURIComponent("</x:xmpmeta>")),d=a.length+u.length+h.length+o.length+f.length;this.internal.__metadata__.metadata_object_number=this.internal.newObject(),this.internal.write("<< /Type /Metadata /Subtype /XML /Length "+d+" >>"),this.internal.write("stream"),this.internal.write(o+a+u+h+f),this.internal.write("endstream"),this.internal.write("endobj")},e=function(){this.internal.__metadata__.metadata_object_number&&this.internal.write("/Metadata "+this.internal.__metadata__.metadata_object_number+" 0 R")};r.addMetadata=function(i,o){return this.internal.__metadata__===void 0&&(this.internal.__metadata__={metadata:i,namespaceuri:o||"http://jspdf.default.namespaceuri/"},this.internal.events.subscribe("putCatalog",e),this.internal.events.subscribe("postPutResources",t)),this}}(zt.API),function(r){var t=r.API,e=t.pdfEscape16=function(a,u){for(var h,f=u.metadata.Unicode.widths,d=["","0","00","000","0000"],v=[""],m=0,w=a.length;m<w;++m){if(h=u.metadata.characterToGlyph(a.charCodeAt(m)),u.metadata.glyIdsUsed.push(h),u.metadata.toUnicode[h]=a.charCodeAt(m),f.indexOf(h)==-1&&(f.push(h),f.push([parseInt(u.metadata.widthOfGlyph(h),10)])),h=="0")return v.join("");h=h.toString(16),v.push(d[4-h.length],h)}return v.join("")},i=function(a){var u,h,f,d,v,m,w;for(v=`/CIDInit /ProcSet findresource begin
219
- 12 dict begin
220
- begincmap
221
- /CIDSystemInfo <<
222
- /Registry (Adobe)
223
- /Ordering (UCS)
224
- /Supplement 0
225
- >> def
226
- /CMapName /Adobe-Identity-UCS def
227
- /CMapType 2 def
228
- 1 begincodespacerange
229
- <0000><ffff>
230
- endcodespacerange`,f=[],m=0,w=(h=Object.keys(a).sort(function(p,F){return p-F})).length;m<w;m++)u=h[m],f.length>=100&&(v+=`
231
- `+f.length+` beginbfchar
232
- `+f.join(`
233
- `)+`
234
- endbfchar`,f=[]),a[u]!==void 0&&a[u]!==null&&typeof a[u].toString=="function"&&(d=("0000"+a[u].toString(16)).slice(-4),u=("0000"+(+u).toString(16)).slice(-4),f.push("<"+u+"><"+d+">"));return f.length&&(v+=`
235
- `+f.length+` beginbfchar
236
- `+f.join(`
237
- `)+`
238
- endbfchar
239
- `),v+=`endcmap
240
- CMapName currentdict /CMap defineresource pop
241
- end
242
- end`};t.events.push(["putFont",function(a){(function(u){var h=u.font,f=u.out,d=u.newObject,v=u.putStream;if(h.metadata instanceof r.API.TTFFont&&h.encoding==="Identity-H"){for(var m=h.metadata.Unicode.widths,w=h.metadata.subset.encode(h.metadata.glyIdsUsed,1),p="",F=0;F<w.length;F++)p+=String.fromCharCode(w[F]);var P=d();v({data:p,addLength1:!0,objectId:P}),f("endobj");var D=d();v({data:i(h.metadata.toUnicode),addLength1:!0,objectId:D}),f("endobj");var _=d();f("<<"),f("/Type /FontDescriptor"),f("/FontName /"+Ci(h.fontName)),f("/FontFile2 "+P+" 0 R"),f("/FontBBox "+r.API.PDFObject.convert(h.metadata.bbox)),f("/Flags "+h.metadata.flags),f("/StemV "+h.metadata.stemV),f("/ItalicAngle "+h.metadata.italicAngle),f("/Ascent "+h.metadata.ascender),f("/Descent "+h.metadata.decender),f("/CapHeight "+h.metadata.capHeight),f(">>"),f("endobj");var B=d();f("<<"),f("/Type /Font"),f("/BaseFont /"+Ci(h.fontName)),f("/FontDescriptor "+_+" 0 R"),f("/W "+r.API.PDFObject.convert(m)),f("/CIDToGIDMap /Identity"),f("/DW 1000"),f("/Subtype /CIDFontType2"),f("/CIDSystemInfo"),f("<<"),f("/Supplement 0"),f("/Registry (Adobe)"),f("/Ordering ("+h.encoding+")"),f(">>"),f(">>"),f("endobj"),h.objectNumber=d(),f("<<"),f("/Type /Font"),f("/Subtype /Type0"),f("/ToUnicode "+D+" 0 R"),f("/BaseFont /"+Ci(h.fontName)),f("/Encoding /"+h.encoding),f("/DescendantFonts ["+B+" 0 R]"),f(">>"),f("endobj"),h.isAlreadyPutted=!0}})(a)}]),t.events.push(["putFont",function(a){(function(u){var h=u.font,f=u.out,d=u.newObject,v=u.putStream;if(h.metadata instanceof r.API.TTFFont&&h.encoding==="WinAnsiEncoding"){for(var m=h.metadata.rawData,w="",p=0;p<m.length;p++)w+=String.fromCharCode(m[p]);var F=d();v({data:w,addLength1:!0,objectId:F}),f("endobj");var P=d();v({data:i(h.metadata.toUnicode),addLength1:!0,objectId:P}),f("endobj");var D=d();f("<<"),f("/Descent "+h.metadata.decender),f("/CapHeight "+h.metadata.capHeight),f("/StemV "+h.metadata.stemV),f("/Type /FontDescriptor"),f("/FontFile2 "+F+" 0 R"),f("/Flags 96"),f("/FontBBox "+r.API.PDFObject.convert(h.metadata.bbox)),f("/FontName /"+Ci(h.fontName)),f("/ItalicAngle "+h.metadata.italicAngle),f("/Ascent "+h.metadata.ascender),f(">>"),f("endobj"),h.objectNumber=d();for(var _=0;_<h.metadata.hmtx.widths.length;_++)h.metadata.hmtx.widths[_]=parseInt(h.metadata.hmtx.widths[_]*(1e3/h.metadata.head.unitsPerEm));f("<</Subtype/TrueType/Type/Font/ToUnicode "+P+" 0 R/BaseFont/"+Ci(h.fontName)+"/FontDescriptor "+D+" 0 R/Encoding/"+h.encoding+" /FirstChar 29 /LastChar 255 /Widths "+r.API.PDFObject.convert(h.metadata.hmtx.widths)+">>"),f("endobj"),h.isAlreadyPutted=!0}})(a)}]);var o=function(a){var u,h=a.text||"",f=a.x,d=a.y,v=a.options||{},m=a.mutex||{},w=m.pdfEscape,p=m.activeFontKey,F=m.fonts,P=p,D="",_=0,B="",G=F[P].encoding;if(F[P].encoding!=="Identity-H")return{text:h,x:f,y:d,options:v,mutex:m};for(B=h,P=p,Array.isArray(h)&&(B=h[0]),_=0;_<B.length;_+=1)F[P].metadata.hasOwnProperty("cmap")&&(u=F[P].metadata.cmap.unicode.codeMap[B[_].charCodeAt(0)]),u||B[_].charCodeAt(0)<256&&F[P].metadata.hasOwnProperty("Unicode")?D+=B[_]:D+="";var it="";return parseInt(P.slice(1))<14||G==="WinAnsiEncoding"?it=w(D,P).split("").map(function(ut){return ut.charCodeAt(0).toString(16)}).join(""):G==="Identity-H"&&(it=e(D,F[P])),m.isHex=!0,{text:it,x:f,y:d,options:v,mutex:m}};t.events.push(["postProcessText",function(a){var u=a.text||"",h=[],f={text:u,x:a.x,y:a.y,options:a.options,mutex:a.mutex};if(Array.isArray(u)){var d=0;for(d=0;d<u.length;d+=1)Array.isArray(u[d])&&u[d].length===3?h.push([o(Object.assign({},f,{text:u[d][0]})).text,u[d][1],u[d][2]]):h.push(o(Object.assign({},f,{text:u[d]})).text);a.text=h}else a.text=o(Object.assign({},f,{text:u})).text}])}(zt),function(r){var t=function(){return this.internal.vFS===void 0&&(this.internal.vFS={}),!0};r.existsFileInVFS=function(e){return t.call(this),this.internal.vFS[e]!==void 0},r.addFileToVFS=function(e,i){return t.call(this),this.internal.vFS[e]=i,this},r.getFileFromVFS=function(e){return t.call(this),this.internal.vFS[e]!==void 0?this.internal.vFS[e]:null}}(zt.API),function(r){r.__bidiEngine__=r.prototype.__bidiEngine__=function(i){var o,a,u,h,f,d,v,m=t,w=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],p=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],F={L:0,R:1,EN:2,AN:3,N:4,B:5,S:6},P={0:0,5:1,6:2,7:3,32:4,251:5,254:6,255:7},D=["(",")","(","<",">","<","[","]","[","{","}","{","«","»","«","‹","›","‹","⁅","⁆","⁅","⁽","⁾","⁽","₍","₎","₍","≤","≥","≤","〈","〉","〈","﹙","﹚","﹙","﹛","﹜","﹛","﹝","﹞","﹝","﹤","﹥","﹤"],_=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)$/),B=!1,G=0;this.__bidiEngine__={};var it=function(k){var C=k.charCodeAt(),W=C>>8,R=P[W];return R!==void 0?m[256*R+(255&C)]:W===252||W===253?"AL":_.test(W)?"L":W===8?"R":"N"},ut=function(k){for(var C,W=0;W<k.length;W++){if((C=it(k.charAt(W)))==="L")return!1;if(C==="R")return!0}return!1},wt=function(k,C,W,R){var st,at,ft,$,ht=C[R];switch(ht){case"L":case"R":B=!1;break;case"N":case"AN":break;case"EN":B&&(ht="AN");break;case"AL":B=!0,ht="R";break;case"WS":ht="N";break;case"CS":R<1||R+1>=C.length||(st=W[R-1])!=="EN"&&st!=="AN"||(at=C[R+1])!=="EN"&&at!=="AN"?ht="N":B&&(at="AN"),ht=at===st?at:"N";break;case"ES":ht=(st=R>0?W[R-1]:"B")==="EN"&&R+1<C.length&&C[R+1]==="EN"?"EN":"N";break;case"ET":if(R>0&&W[R-1]==="EN"){ht="EN";break}if(B){ht="N";break}for(ft=R+1,$=C.length;ft<$&&C[ft]==="ET";)ft++;ht=ft<$&&C[ft]==="EN"?"EN":"N";break;case"NSM":if(u&&!h){for($=C.length,ft=R+1;ft<$&&C[ft]==="NSM";)ft++;if(ft<$){var dt=k[R],jt=dt>=1425&&dt<=2303||dt===64286;if(st=C[ft],jt&&(st==="R"||st==="AL")){ht="R";break}}}ht=R<1||(st=C[R-1])==="B"?"N":W[R-1];break;case"B":B=!1,o=!0,ht=G;break;case"S":a=!0,ht="N";break;case"LRE":case"RLE":case"LRO":case"RLO":case"PDF":B=!1;break;case"BN":ht="N"}return ht},tt=function(k,C,W){var R=k.split("");return W&&z(R,W,{hiLevel:G}),R.reverse(),C&&C.reverse(),R.join("")},z=function(k,C,W){var R,st,at,ft,$,ht=-1,dt=k.length,jt=0,A=[],j=G?p:w,M=[];for(B=!1,o=!1,a=!1,st=0;st<dt;st++)M[st]=it(k[st]);for(at=0;at<dt;at++){if($=jt,A[at]=wt(k,M,A,at),R=240&(jt=j[$][F[A[at]]]),jt&=15,C[at]=ft=j[jt][5],R>0)if(R===16){for(st=ht;st<at;st++)C[st]=1;ht=-1}else ht=-1;if(j[jt][6])ht===-1&&(ht=at);else if(ht>-1){for(st=ht;st<at;st++)C[st]=ft;ht=-1}M[at]==="B"&&(C[at]=0),W.hiLevel|=ft}a&&function(q,J,Q){for(var et=0;et<Q;et++)if(q[et]==="S"){J[et]=G;for(var rt=et-1;rt>=0&&q[rt]==="WS";rt--)J[rt]=G}}(M,C,dt)},nt=function(k,C,W,R,st){if(!(st.hiLevel<k)){if(k===1&&G===1&&!o)return C.reverse(),void(W&&W.reverse());for(var at,ft,$,ht,dt=C.length,jt=0;jt<dt;){if(R[jt]>=k){for($=jt+1;$<dt&&R[$]>=k;)$++;for(ht=jt,ft=$-1;ht<ft;ht++,ft--)at=C[ht],C[ht]=C[ft],C[ft]=at,W&&(at=W[ht],W[ht]=W[ft],W[ft]=at);jt=$}jt++}}},pt=function(k,C,W){var R=k.split(""),st={hiLevel:G};return W||(W=[]),z(R,W,st),function(at,ft,$){if($.hiLevel!==0&&v)for(var ht,dt=0;dt<at.length;dt++)ft[dt]===1&&(ht=D.indexOf(at[dt]))>=0&&(at[dt]=D[ht+1])}(R,W,st),nt(2,R,C,W,st),nt(1,R,C,W,st),R.join("")};return this.__bidiEngine__.doBidiReorder=function(k,C,W){if(function(st,at){if(at)for(var ft=0;ft<st.length;ft++)at[ft]=ft;h===void 0&&(h=ut(st)),d===void 0&&(d=ut(st))}(k,C),u||!f||d)if(u&&f&&h^d)G=h?1:0,k=tt(k,C,W);else if(!u&&f&&d)G=h?1:0,k=pt(k,C,W),k=tt(k,C);else if(!u||h||f||d){if(u&&!f&&h^d)k=tt(k,C),h?(G=0,k=pt(k,C,W)):(G=1,k=pt(k,C,W),k=tt(k,C));else if(u&&h&&!f&&d)G=1,k=pt(k,C,W),k=tt(k,C);else if(!u&&!f&&h^d){var R=v;h?(G=1,k=pt(k,C,W),G=0,v=!1,k=pt(k,C,W),v=R):(G=0,k=pt(k,C,W),k=tt(k,C),G=1,v=!1,k=pt(k,C,W),v=R,k=tt(k,C))}}else G=0,k=pt(k,C,W);else G=h?1:0,k=pt(k,C,W);return k},this.__bidiEngine__.setOptions=function(k){k&&(u=k.isInputVisual,f=k.isOutputVisual,h=k.isInputRtl,d=k.isOutputRtl,v=k.isSymmetricSwapping)},this.__bidiEngine__.setOptions(i),this.__bidiEngine__};var t=["BN","BN","BN","BN","BN","BN","BN","BN","BN","S","B","S","WS","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","B","B","B","S","WS","N","N","ET","ET","ET","N","N","N","N","N","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","BN","BN","BN","BN","BN","BN","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","CS","N","ET","ET","ET","ET","N","N","N","N","L","N","N","BN","N","N","ET","ET","EN","EN","N","L","N","N","N","EN","L","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","N","N","N","N","N","ET","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","R","NSM","R","NSM","NSM","R","NSM","NSM","R","NSM","N","N","N","N","N","N","N","N","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","N","N","N","N","N","R","R","R","R","R","N","N","N","N","N","N","N","N","N","N","N","AN","AN","AN","AN","AN","AN","N","N","AL","ET","ET","AL","CS","AL","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AN","AN","AN","AN","AN","AN","AN","AN","AN","AN","ET","AN","AN","AL","AL","AL","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AN","N","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","NSM","NSM","N","NSM","NSM","NSM","NSM","AL","AL","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","AL","AL","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AL","N","N","N","N","N","N","N","N","N","N","N","N","N","N","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","R","R","N","N","N","N","R","N","N","N","N","N","WS","WS","WS","WS","WS","WS","WS","WS","WS","WS","WS","BN","BN","BN","L","R","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","WS","B","LRE","RLE","PDF","LRO","RLO","CS","ET","ET","ET","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","CS","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","WS","BN","BN","BN","BN","BN","N","LRI","RLI","FSI","PDI","BN","BN","BN","BN","BN","BN","EN","L","N","N","EN","EN","EN","EN","EN","EN","ES","ES","N","N","N","L","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","ES","ES","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","L","L","N","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","N","N","N","N","N","R","NSM","R","R","R","R","R","R","R","R","R","R","ES","R","R","R","R","R","R","R","R","R","R","R","R","R","N","R","R","R","R","R","N","R","N","R","R","N","R","R","N","R","R","R","R","R","R","R","R","R","R","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","CS","N","CS","N","N","CS","N","N","N","N","N","N","N","N","N","ET","N","N","ES","ES","N","N","N","N","N","ET","ET","N","N","N","N","N","AL","AL","AL","AL","AL","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","N","BN","N","N","N","ET","ET","ET","N","N","N","N","N","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","L","L","L","L","L","L","N","N","L","L","L","L","L","L","N","N","L","L","L","L","L","L","N","N","L","L","L","N","N","N","ET","ET","N","N","N","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N"],e=new r.__bidiEngine__({isInputVisual:!0});r.API.events.push(["postProcessText",function(i){var o=i.text;i.x,i.y;var a=i.options||{};i.mutex,a.lang;var u=[];if(a.isInputVisual=typeof a.isInputVisual!="boolean"||a.isInputVisual,e.setOptions(a),Object.prototype.toString.call(o)==="[object Array]"){var h=0;for(u=[],h=0;h<o.length;h+=1)Object.prototype.toString.call(o[h])==="[object Array]"?u.push([e.doBidiReorder(o[h][0]),o[h][1],o[h][2]]):u.push([e.doBidiReorder(o[h])]);i.text=u}else i.text=e.doBidiReorder(o);e.setOptions({isInputVisual:!0})}])}(zt),zt.API.TTFFont=function(){function r(t){var e;if(this.rawData=t,e=this.contents=new Dn(t),this.contents.pos=4,e.readString(4)==="ttcf")throw new Error("TTCF not supported.");e.pos=0,this.parse(),this.subset=new af(this),this.registerTTF()}return r.open=function(t){return new r(t)},r.prototype.parse=function(){return this.directory=new Wh(this.contents),this.head=new Gh(this),this.name=new Zh(this),this.cmap=new ul(this),this.toUnicode={},this.hhea=new Yh(this),this.maxp=new $h(this),this.hmtx=new Qh(this),this.post=new Xh(this),this.os2=new Jh(this),this.loca=new nf(this),this.glyf=new tf(this),this.ascender=this.os2.exists&&this.os2.ascender||this.hhea.ascender,this.decender=this.os2.exists&&this.os2.decender||this.hhea.decender,this.lineGap=this.os2.exists&&this.os2.lineGap||this.hhea.lineGap,this.bbox=[this.head.xMin,this.head.yMin,this.head.xMax,this.head.yMax]},r.prototype.registerTTF=function(){var t,e,i,o,a;if(this.scaleFactor=1e3/this.head.unitsPerEm,this.bbox=(function(){var u,h,f,d;for(d=[],u=0,h=(f=this.bbox).length;u<h;u++)t=f[u],d.push(Math.round(t*this.scaleFactor));return d}).call(this),this.stemV=0,this.post.exists?(i=255&(o=this.post.italic_angle),(32768&(e=o>>16))!=0&&(e=-(1+(65535^e))),this.italicAngle=+(e+"."+i)):this.italicAngle=0,this.ascender=Math.round(this.ascender*this.scaleFactor),this.decender=Math.round(this.decender*this.scaleFactor),this.lineGap=Math.round(this.lineGap*this.scaleFactor),this.capHeight=this.os2.exists&&this.os2.capHeight||this.ascender,this.xHeight=this.os2.exists&&this.os2.xHeight||0,this.familyClass=(this.os2.exists&&this.os2.familyClass||0)>>8,this.isSerif=(a=this.familyClass)===1||a===2||a===3||a===4||a===5||a===7,this.isScript=this.familyClass===10,this.flags=0,this.post.isFixedPitch&&(this.flags|=1),this.isSerif&&(this.flags|=2),this.isScript&&(this.flags|=8),this.italicAngle!==0&&(this.flags|=64),this.flags|=32,!this.cmap.unicode)throw new Error("No unicode cmap for font")},r.prototype.characterToGlyph=function(t){var e;return((e=this.cmap.unicode)!=null?e.codeMap[t]:void 0)||0},r.prototype.widthOfGlyph=function(t){var e;return e=1e3/this.head.unitsPerEm,this.hmtx.forGlyph(t).advance*e},r.prototype.widthOfString=function(t,e,i){var o,a,u,h;for(u=0,a=0,h=(t=""+t).length;0<=h?a<h:a>h;a=0<=h?++a:--a)o=t.charCodeAt(a),u+=this.widthOfGlyph(this.characterToGlyph(o))+i*(1e3/e)||0;return u*(e/1e3)},r.prototype.lineHeight=function(t,e){var i;return e==null&&(e=!1),i=e?this.lineGap:0,(this.ascender+i-this.decender)/1e3*t},r}();var qr,Dn=function(){function r(t){this.data=t??[],this.pos=0,this.length=this.data.length}return r.prototype.readByte=function(){return this.data[this.pos++]},r.prototype.writeByte=function(t){return this.data[this.pos++]=t},r.prototype.readUInt32=function(){return 16777216*this.readByte()+(this.readByte()<<16)+(this.readByte()<<8)+this.readByte()},r.prototype.writeUInt32=function(t){return this.writeByte(t>>>24&255),this.writeByte(t>>16&255),this.writeByte(t>>8&255),this.writeByte(255&t)},r.prototype.readInt32=function(){var t;return(t=this.readUInt32())>=2147483648?t-4294967296:t},r.prototype.writeInt32=function(t){return t<0&&(t+=4294967296),this.writeUInt32(t)},r.prototype.readUInt16=function(){return this.readByte()<<8|this.readByte()},r.prototype.writeUInt16=function(t){return this.writeByte(t>>8&255),this.writeByte(255&t)},r.prototype.readInt16=function(){var t;return(t=this.readUInt16())>=32768?t-65536:t},r.prototype.writeInt16=function(t){return t<0&&(t+=65536),this.writeUInt16(t)},r.prototype.readString=function(t){var e,i;for(i=[],e=0;0<=t?e<t:e>t;e=0<=t?++e:--e)i[e]=String.fromCharCode(this.readByte());return i.join("")},r.prototype.writeString=function(t){var e,i,o;for(o=[],e=0,i=t.length;0<=i?e<i:e>i;e=0<=i?++e:--e)o.push(this.writeByte(t.charCodeAt(e)));return o},r.prototype.readShort=function(){return this.readInt16()},r.prototype.writeShort=function(t){return this.writeInt16(t)},r.prototype.readLongLong=function(){var t,e,i,o,a,u,h,f;return t=this.readByte(),e=this.readByte(),i=this.readByte(),o=this.readByte(),a=this.readByte(),u=this.readByte(),h=this.readByte(),f=this.readByte(),128&t?-1*(72057594037927940*(255^t)+281474976710656*(255^e)+1099511627776*(255^i)+4294967296*(255^o)+16777216*(255^a)+65536*(255^u)+256*(255^h)+(255^f)+1):72057594037927940*t+281474976710656*e+1099511627776*i+4294967296*o+16777216*a+65536*u+256*h+f},r.prototype.writeLongLong=function(t){var e,i;return e=Math.floor(t/4294967296),i=4294967295&t,this.writeByte(e>>24&255),this.writeByte(e>>16&255),this.writeByte(e>>8&255),this.writeByte(255&e),this.writeByte(i>>24&255),this.writeByte(i>>16&255),this.writeByte(i>>8&255),this.writeByte(255&i)},r.prototype.readInt=function(){return this.readInt32()},r.prototype.writeInt=function(t){return this.writeInt32(t)},r.prototype.read=function(t){var e,i;for(e=[],i=0;0<=t?i<t:i>t;i=0<=t?++i:--i)e.push(this.readByte());return e},r.prototype.write=function(t){var e,i,o,a;for(a=[],i=0,o=t.length;i<o;i++)e=t[i],a.push(this.writeByte(e));return a},r}(),Wh=function(){var r;function t(e){var i,o,a;for(this.scalarType=e.readInt(),this.tableCount=e.readShort(),this.searchRange=e.readShort(),this.entrySelector=e.readShort(),this.rangeShift=e.readShort(),this.tables={},o=0,a=this.tableCount;0<=a?o<a:o>a;o=0<=a?++o:--o)i={tag:e.readString(4),checksum:e.readInt(),offset:e.readInt(),length:e.readInt()},this.tables[i.tag]=i}return t.prototype.encode=function(e){var i,o,a,u,h,f,d,v,m,w,p,F,P;for(P in p=Object.keys(e).length,f=Math.log(2),m=16*Math.floor(Math.log(p)/f),u=Math.floor(m/f),v=16*p-m,(o=new Dn).writeInt(this.scalarType),o.writeShort(p),o.writeShort(m),o.writeShort(u),o.writeShort(v),a=16*p,d=o.pos+a,h=null,F=[],e)for(w=e[P],o.writeString(P),o.writeInt(r(w)),o.writeInt(d),o.writeInt(w.length),F=F.concat(w),P==="head"&&(h=d),d+=w.length;d%4;)F.push(0),d++;return o.write(F),i=2981146554-r(o.data),o.pos=h+8,o.writeUInt32(i),o.data},r=function(e){var i,o,a,u;for(e=ll.call(e);e.length%4;)e.push(0);for(a=new Dn(e),o=0,i=0,u=e.length;i<u;i=i+=4)o+=a.readUInt32();return 4294967295&o},t}(),Vh={}.hasOwnProperty,tn=function(r,t){for(var e in t)Vh.call(t,e)&&(r[e]=t[e]);function i(){this.constructor=r}return i.prototype=t.prototype,r.prototype=new i,r.__super__=t.prototype,r};qr=function(){function r(t){var e;this.file=t,e=this.file.directory.tables[this.tag],this.exists=!!e,e&&(this.offset=e.offset,this.length=e.length,this.parse(this.file.contents))}return r.prototype.parse=function(){},r.prototype.encode=function(){},r.prototype.raw=function(){return this.exists?(this.file.contents.pos=this.offset,this.file.contents.read(this.length)):null},r}();var Gh=function(r){function t(){return t.__super__.constructor.apply(this,arguments)}return tn(t,qr),t.prototype.tag="head",t.prototype.parse=function(e){return e.pos=this.offset,this.version=e.readInt(),this.revision=e.readInt(),this.checkSumAdjustment=e.readInt(),this.magicNumber=e.readInt(),this.flags=e.readShort(),this.unitsPerEm=e.readShort(),this.created=e.readLongLong(),this.modified=e.readLongLong(),this.xMin=e.readShort(),this.yMin=e.readShort(),this.xMax=e.readShort(),this.yMax=e.readShort(),this.macStyle=e.readShort(),this.lowestRecPPEM=e.readShort(),this.fontDirectionHint=e.readShort(),this.indexToLocFormat=e.readShort(),this.glyphDataFormat=e.readShort()},t.prototype.encode=function(e){var i;return(i=new Dn).writeInt(this.version),i.writeInt(this.revision),i.writeInt(this.checkSumAdjustment),i.writeInt(this.magicNumber),i.writeShort(this.flags),i.writeShort(this.unitsPerEm),i.writeLongLong(this.created),i.writeLongLong(this.modified),i.writeShort(this.xMin),i.writeShort(this.yMin),i.writeShort(this.xMax),i.writeShort(this.yMax),i.writeShort(this.macStyle),i.writeShort(this.lowestRecPPEM),i.writeShort(this.fontDirectionHint),i.writeShort(e),i.writeShort(this.glyphDataFormat),i.data},t}(),Bu=function(){function r(t,e){var i,o,a,u,h,f,d,v,m,w,p,F,P,D,_,B,G;switch(this.platformID=t.readUInt16(),this.encodingID=t.readShort(),this.offset=e+t.readInt(),m=t.pos,t.pos=this.offset,this.format=t.readUInt16(),this.length=t.readUInt16(),this.language=t.readUInt16(),this.isUnicode=this.platformID===3&&this.encodingID===1&&this.format===4||this.platformID===0&&this.format===4,this.codeMap={},this.format){case 0:for(f=0;f<256;++f)this.codeMap[f]=t.readByte();break;case 4:for(p=t.readUInt16(),w=p/2,t.pos+=6,a=function(){var it,ut;for(ut=[],f=it=0;0<=w?it<w:it>w;f=0<=w?++it:--it)ut.push(t.readUInt16());return ut}(),t.pos+=2,P=function(){var it,ut;for(ut=[],f=it=0;0<=w?it<w:it>w;f=0<=w?++it:--it)ut.push(t.readUInt16());return ut}(),d=function(){var it,ut;for(ut=[],f=it=0;0<=w?it<w:it>w;f=0<=w?++it:--it)ut.push(t.readUInt16());return ut}(),v=function(){var it,ut;for(ut=[],f=it=0;0<=w?it<w:it>w;f=0<=w?++it:--it)ut.push(t.readUInt16());return ut}(),o=(this.length-t.pos+this.offset)/2,h=function(){var it,ut;for(ut=[],f=it=0;0<=o?it<o:it>o;f=0<=o?++it:--it)ut.push(t.readUInt16());return ut}(),f=_=0,G=a.length;_<G;f=++_)for(D=a[f],i=B=F=P[f];F<=D?B<=D:B>=D;i=F<=D?++B:--B)v[f]===0?u=i+d[f]:(u=h[v[f]/2+(i-F)-(w-f)]||0)!==0&&(u+=d[f]),this.codeMap[i]=65535&u}t.pos=m}return r.encode=function(t,e){var i,o,a,u,h,f,d,v,m,w,p,F,P,D,_,B,G,it,ut,wt,tt,z,nt,pt,k,C,W,R,st,at,ft,$,ht,dt,jt,A,j,M,q,J,Q,et,rt,At,Lt,Ft;switch(R=new Dn,u=Object.keys(t).sort(function(_t,Ut){return _t-Ut}),e){case"macroman":for(P=0,D=function(){var _t=[];for(F=0;F<256;++F)_t.push(0);return _t}(),B={0:0},a={},st=0,ht=u.length;st<ht;st++)B[rt=t[o=u[st]]]==null&&(B[rt]=++P),a[o]={old:t[o],new:B[t[o]]},D[o]=B[t[o]];return R.writeUInt16(1),R.writeUInt16(0),R.writeUInt32(12),R.writeUInt16(0),R.writeUInt16(262),R.writeUInt16(0),R.write(D),{charMap:a,subtable:R.data,maxGlyphID:P+1};case"unicode":for(C=[],m=[],G=0,B={},i={},_=d=null,at=0,dt=u.length;at<dt;at++)B[ut=t[o=u[at]]]==null&&(B[ut]=++G),i[o]={old:ut,new:B[ut]},h=B[ut]-o,_!=null&&h===d||(_&&m.push(_),C.push(o),d=h),_=o;for(_&&m.push(_),m.push(65535),C.push(65535),pt=2*(nt=C.length),z=2*Math.pow(Math.log(nt)/Math.LN2,2),w=Math.log(z/2)/Math.LN2,tt=2*nt-z,f=[],wt=[],p=[],F=ft=0,jt=C.length;ft<jt;F=++ft){if(k=C[F],v=m[F],k===65535){f.push(0),wt.push(0);break}if(k-(W=i[k].new)>=32768)for(f.push(0),wt.push(2*(p.length+nt-F)),o=$=k;k<=v?$<=v:$>=v;o=k<=v?++$:--$)p.push(i[o].new);else f.push(W-k),wt.push(0)}for(R.writeUInt16(3),R.writeUInt16(1),R.writeUInt32(12),R.writeUInt16(4),R.writeUInt16(16+8*nt+2*p.length),R.writeUInt16(0),R.writeUInt16(pt),R.writeUInt16(z),R.writeUInt16(w),R.writeUInt16(tt),Q=0,A=m.length;Q<A;Q++)o=m[Q],R.writeUInt16(o);for(R.writeUInt16(0),et=0,j=C.length;et<j;et++)o=C[et],R.writeUInt16(o);for(At=0,M=f.length;At<M;At++)h=f[At],R.writeUInt16(h);for(Lt=0,q=wt.length;Lt<q;Lt++)it=wt[Lt],R.writeUInt16(it);for(Ft=0,J=p.length;Ft<J;Ft++)P=p[Ft],R.writeUInt16(P);return{charMap:i,subtable:R.data,maxGlyphID:G+1}}},r}(),ul=function(r){function t(){return t.__super__.constructor.apply(this,arguments)}return tn(t,qr),t.prototype.tag="cmap",t.prototype.parse=function(e){var i,o,a;for(e.pos=this.offset,this.version=e.readUInt16(),a=e.readUInt16(),this.tables=[],this.unicode=null,o=0;0<=a?o<a:o>a;o=0<=a?++o:--o)i=new Bu(e,this.offset),this.tables.push(i),i.isUnicode&&this.unicode==null&&(this.unicode=i);return!0},t.encode=function(e,i){var o,a;return i==null&&(i="macroman"),o=Bu.encode(e,i),(a=new Dn).writeUInt16(0),a.writeUInt16(1),o.table=a.data.concat(o.subtable),o},t}(),Yh=function(r){function t(){return t.__super__.constructor.apply(this,arguments)}return tn(t,qr),t.prototype.tag="hhea",t.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()},t}(),Jh=function(r){function t(){return t.__super__.constructor.apply(this,arguments)}return tn(t,qr),t.prototype.tag="OS/2",t.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 i,o;for(o=[],i=0;i<10;++i)o.push(e.readByte());return o}(),this.charRange=function(){var i,o;for(o=[],i=0;i<4;++i)o.push(e.readInt());return o}(),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 i,o;for(o=[],i=0;i<2;i=++i)o.push(e.readInt());return o}(),this.version>1))return this.xHeight=e.readShort(),this.capHeight=e.readShort(),this.defaultChar=e.readShort(),this.breakChar=e.readShort(),this.maxContext=e.readShort()},t}(),Xh=function(r){function t(){return t.__super__.constructor.apply(this,arguments)}return tn(t,qr),t.prototype.tag="post",t.prototype.parse=function(e){var i,o,a;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:break;case 131072:var u;for(o=e.readUInt16(),this.glyphNameIndex=[],u=0;0<=o?u<o:u>o;u=0<=o?++u:--u)this.glyphNameIndex.push(e.readUInt16());for(this.names=[],a=[];e.pos<this.offset+this.length;)i=e.readByte(),a.push(this.names.push(e.readString(i)));return a;case 151552:return o=e.readUInt16(),this.offsets=e.read(o);case 196608:break;case 262144:return this.map=(function(){var h,f,d;for(d=[],u=h=0,f=this.file.maxp.numGlyphs;0<=f?h<f:h>f;u=0<=f?++h:--h)d.push(e.readUInt32());return d}).call(this)}},t}(),Kh=function(r,t){this.raw=r,this.length=r.length,this.platformID=t.platformID,this.encodingID=t.encodingID,this.languageID=t.languageID},Zh=function(r){function t(){return t.__super__.constructor.apply(this,arguments)}return tn(t,qr),t.prototype.tag="name",t.prototype.parse=function(e){var i,o,a,u,h,f,d,v,m,w,p;for(e.pos=this.offset,e.readShort(),i=e.readShort(),f=e.readShort(),o=[],u=0;0<=i?u<i:u>i;u=0<=i?++u:--u)o.push({platformID:e.readShort(),encodingID:e.readShort(),languageID:e.readShort(),nameID:e.readShort(),length:e.readShort(),offset:this.offset+f+e.readShort()});for(d={},u=m=0,w=o.length;m<w;u=++m)a=o[u],e.pos=a.offset,v=e.readString(a.length),h=new Kh(v,a),d[p=a.nameID]==null&&(d[p]=[]),d[a.nameID].push(h);this.strings=d,this.copyright=d[0],this.fontFamily=d[1],this.fontSubfamily=d[2],this.uniqueSubfamily=d[3],this.fontName=d[4],this.version=d[5];try{this.postscriptName=d[6][0].raw.replace(/[\x00-\x19\x80-\xff]/g,"")}catch{this.postscriptName=d[4][0].raw.replace(/[\x00-\x19\x80-\xff]/g,"")}return this.trademark=d[7],this.manufacturer=d[8],this.designer=d[9],this.description=d[10],this.vendorUrl=d[11],this.designerUrl=d[12],this.license=d[13],this.licenseUrl=d[14],this.preferredFamily=d[15],this.preferredSubfamily=d[17],this.compatibleFull=d[18],this.sampleText=d[19]},t}(),$h=function(r){function t(){return t.__super__.constructor.apply(this,arguments)}return tn(t,qr),t.prototype.tag="maxp",t.prototype.parse=function(e){return e.pos=this.offset,this.version=e.readInt(),this.numGlyphs=e.readUInt16(),this.maxPoints=e.readUInt16(),this.maxContours=e.readUInt16(),this.maxCompositePoints=e.readUInt16(),this.maxComponentContours=e.readUInt16(),this.maxZones=e.readUInt16(),this.maxTwilightPoints=e.readUInt16(),this.maxStorage=e.readUInt16(),this.maxFunctionDefs=e.readUInt16(),this.maxInstructionDefs=e.readUInt16(),this.maxStackElements=e.readUInt16(),this.maxSizeOfInstructions=e.readUInt16(),this.maxComponentElements=e.readUInt16(),this.maxComponentDepth=e.readUInt16()},t}(),Qh=function(r){function t(){return t.__super__.constructor.apply(this,arguments)}return tn(t,qr),t.prototype.tag="hmtx",t.prototype.parse=function(e){var i,o,a,u,h,f,d;for(e.pos=this.offset,this.metrics=[],i=0,f=this.file.hhea.numberOfMetrics;0<=f?i<f:i>f;i=0<=f?++i:--i)this.metrics.push({advance:e.readUInt16(),lsb:e.readInt16()});for(a=this.file.maxp.numGlyphs-this.file.hhea.numberOfMetrics,this.leftSideBearings=function(){var v,m;for(m=[],i=v=0;0<=a?v<a:v>a;i=0<=a?++v:--v)m.push(e.readInt16());return m}(),this.widths=(function(){var v,m,w,p;for(p=[],v=0,m=(w=this.metrics).length;v<m;v++)u=w[v],p.push(u.advance);return p}).call(this),o=this.widths[this.widths.length-1],d=[],i=h=0;0<=a?h<a:h>a;i=0<=a?++h:--h)d.push(this.widths.push(o));return d},t.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]}},t}(),ll=[].slice,tf=function(r){function t(){return t.__super__.constructor.apply(this,arguments)}return tn(t,qr),t.prototype.tag="glyf",t.prototype.parse=function(){return this.cache={}},t.prototype.glyphFor=function(e){var i,o,a,u,h,f,d,v,m,w;return e in this.cache?this.cache[e]:(u=this.file.loca,i=this.file.contents,o=u.indexOf(e),(a=u.lengthOf(e))===0?this.cache[e]=null:(i.pos=this.offset+o,h=(f=new Dn(i.read(a))).readShort(),v=f.readShort(),w=f.readShort(),d=f.readShort(),m=f.readShort(),this.cache[e]=h===-1?new rf(f,v,w,d,m):new ef(f,h,v,w,d,m),this.cache[e]))},t.prototype.encode=function(e,i,o){var a,u,h,f,d;for(h=[],u=[],f=0,d=i.length;f<d;f++)a=e[i[f]],u.push(h.length),a&&(h=h.concat(a.encode(o)));return u.push(h.length),{table:h,offsets:u}},t}(),ef=function(){function r(t,e,i,o,a,u){this.raw=t,this.numberOfContours=e,this.xMin=i,this.yMin=o,this.xMax=a,this.yMax=u,this.compound=!1}return r.prototype.encode=function(){return this.raw.data},r}(),rf=function(){function r(t,e,i,o,a){var u,h;for(this.raw=t,this.xMin=e,this.yMin=i,this.xMax=o,this.yMax=a,this.compound=!0,this.glyphIDs=[],this.glyphOffsets=[],u=this.raw;h=u.readShort(),this.glyphOffsets.push(u.pos),this.glyphIDs.push(u.readUInt16()),32&h;)u.pos+=1&h?4:2,128&h?u.pos+=8:64&h?u.pos+=4:8&h&&(u.pos+=2)}return r.prototype.encode=function(){var t,e,i;for(e=new Dn(ll.call(this.raw.data)),t=0,i=this.glyphIDs.length;t<i;++t)e.pos=this.glyphOffsets[t];return e.data},r}(),nf=function(r){function t(){return t.__super__.constructor.apply(this,arguments)}return tn(t,qr),t.prototype.tag="loca",t.prototype.parse=function(e){var i,o;return e.pos=this.offset,i=this.file.head.indexToLocFormat,this.offsets=i===0?(function(){var a,u;for(u=[],o=0,a=this.length;o<a;o+=2)u.push(2*e.readUInt16());return u}).call(this):(function(){var a,u;for(u=[],o=0,a=this.length;o<a;o+=4)u.push(e.readUInt32());return u}).call(this)},t.prototype.indexOf=function(e){return this.offsets[e]},t.prototype.lengthOf=function(e){return this.offsets[e+1]-this.offsets[e]},t.prototype.encode=function(e,i){for(var o=new Uint32Array(this.offsets.length),a=0,u=0,h=0;h<o.length;++h)if(o[h]=a,u<i.length&&i[u]==h){++u,o[h]=a;var f=this.offsets[h],d=this.offsets[h+1]-f;d>0&&(a+=d)}for(var v=new Array(4*o.length),m=0;m<o.length;++m)v[4*m+3]=255&o[m],v[4*m+2]=(65280&o[m])>>8,v[4*m+1]=(16711680&o[m])>>16,v[4*m]=(4278190080&o[m])>>24;return v},t}(),af=function(){function r(t){this.font=t,this.subset={},this.unicodes={},this.next=33}return r.prototype.generateCmap=function(){var t,e,i,o,a;for(e in o=this.font.cmap.tables[0].codeMap,t={},a=this.subset)i=a[e],t[e]=o[i];return t},r.prototype.glyphsFor=function(t){var e,i,o,a,u,h,f;for(o={},u=0,h=t.length;u<h;u++)o[a=t[u]]=this.font.glyf.glyphFor(a);for(a in e=[],o)(i=o[a])!=null&&i.compound&&e.push.apply(e,i.glyphIDs);if(e.length>0)for(a in f=this.glyphsFor(e))i=f[a],o[a]=i;return o},r.prototype.encode=function(t,e){var i,o,a,u,h,f,d,v,m,w,p,F,P,D,_;for(o in i=ul.encode(this.generateCmap(),"unicode"),u=this.glyphsFor(t),p={0:0},_=i.charMap)p[(f=_[o]).old]=f.new;for(F in w=i.maxGlyphID,u)F in p||(p[F]=w++);return v=function(B){var G,it;for(G in it={},B)it[B[G]]=G;return it}(p),m=Object.keys(v).sort(function(B,G){return B-G}),P=function(){var B,G,it;for(it=[],B=0,G=m.length;B<G;B++)h=m[B],it.push(v[h]);return it}(),a=this.font.glyf.encode(u,P,p),d=this.font.loca.encode(a.offsets,P),D={cmap:this.font.cmap.raw(),glyf:a.table,loca:d,hmtx:this.font.hmtx.raw(),hhea:this.font.hhea.raw(),maxp:this.font.maxp.raw(),post:this.font.post.raw(),name:this.font.name.raw(),head:this.font.head.encode(e)},this.font.os2.exists&&(D["OS/2"]=this.font.os2.raw()),this.font.directory.encode(D)},r}();zt.API.PDFObject=function(){var r;function t(){}return r=function(e,i){return(Array(i+1).join("0")+e).slice(-i)},t.convert=function(e){var i,o,a,u;if(Array.isArray(e))return"["+function(){var h,f,d;for(d=[],h=0,f=e.length;h<f;h++)i=e[h],d.push(t.convert(i));return d}().join(" ")+"]";if(typeof e=="string")return"/"+e;if(e!=null&&e.isString)return"("+e+")";if(e instanceof Date)return"(D:"+r(e.getUTCFullYear(),4)+r(e.getUTCMonth(),2)+r(e.getUTCDate(),2)+r(e.getUTCHours(),2)+r(e.getUTCMinutes(),2)+r(e.getUTCSeconds(),2)+"Z)";if({}.toString.call(e)==="[object Object]"){for(o in a=["<<"],e)u=e[o],a.push("/"+o+" "+t.convert(u));return a.push(">>"),a.join(`
243
- `)}return""+e},t}();function hl(r,t,e,i,o){i=i||{};var a=1.15,u=o.internal.scaleFactor,h=o.internal.getFontSize()/u,f=o.getLineHeightFactor?o.getLineHeightFactor():a,d=h*f,v=/\r\n|\r|\n/g,m="",w=1;if((i.valign==="middle"||i.valign==="bottom"||i.halign==="center"||i.halign==="right")&&(m=typeof r=="string"?r.split(v):r,w=m.length||1),e+=h*(2-a),i.valign==="middle"?e-=w/2*d:i.valign==="bottom"&&(e-=w*d),i.halign==="center"||i.halign==="right"){var p=h;if(i.halign==="center"&&(p*=.5),m&&w>=1){for(var F=0;F<m.length;F++)o.text(m[F],t-o.getStringUnitWidth(m[F])*p,e),e+=d;return o}t-=o.getStringUnitWidth(r)*p}return i.halign==="justify"?o.text(r,t,e,{maxWidth:i.maxWidth||100,align:"justify"}):o.text(r,t,e),o}var Mu={},Mi=function(){function r(t){this.jsPDFDocument=t,this.userStyles={textColor:t.getTextColor?this.jsPDFDocument.getTextColor():0,fontSize:t.internal.getFontSize(),fontStyle:t.internal.getFont().fontStyle,font:t.internal.getFont().fontName,lineWidth:t.getLineWidth?this.jsPDFDocument.getLineWidth():0,lineColor:t.getDrawColor?this.jsPDFDocument.getDrawColor():0}}return r.setDefaults=function(t,e){e===void 0&&(e=null),e?e.__autoTableDocumentDefaults=t:Mu=t},r.unifyColor=function(t){return Array.isArray(t)?t:typeof t=="number"?[t,t,t]:typeof t=="string"?[t]:null},r.prototype.applyStyles=function(t,e){var i,o,a;e===void 0&&(e=!1),t.fontStyle&&this.jsPDFDocument.setFontStyle&&this.jsPDFDocument.setFontStyle(t.fontStyle);var u=this.jsPDFDocument.internal.getFont(),h=u.fontStyle,f=u.fontName;if(t.font&&(f=t.font),t.fontStyle){h=t.fontStyle;var d=this.getFontList()[f];d&&d.indexOf(h)===-1&&this.jsPDFDocument.setFontStyle&&(this.jsPDFDocument.setFontStyle(d[0]),h=d[0])}if(this.jsPDFDocument.setFont(f,h),t.fontSize&&this.jsPDFDocument.setFontSize(t.fontSize),!e){var v=r.unifyColor(t.fillColor);v&&(i=this.jsPDFDocument).setFillColor.apply(i,v),v=r.unifyColor(t.textColor),v&&(o=this.jsPDFDocument).setTextColor.apply(o,v),v=r.unifyColor(t.lineColor),v&&(a=this.jsPDFDocument).setDrawColor.apply(a,v),typeof t.lineWidth=="number"&&this.jsPDFDocument.setLineWidth(t.lineWidth)}},r.prototype.splitTextToSize=function(t,e,i){return this.jsPDFDocument.splitTextToSize(t,e,i)},r.prototype.rect=function(t,e,i,o,a){return this.jsPDFDocument.rect(t,e,i,o,a)},r.prototype.getLastAutoTable=function(){return this.jsPDFDocument.lastAutoTable||null},r.prototype.getTextWidth=function(t){return this.jsPDFDocument.getTextWidth(t)},r.prototype.getDocument=function(){return this.jsPDFDocument},r.prototype.setPage=function(t){this.jsPDFDocument.setPage(t)},r.prototype.addPage=function(){return this.jsPDFDocument.addPage()},r.prototype.getFontList=function(){return this.jsPDFDocument.getFontList()},r.prototype.getGlobalOptions=function(){return Mu||{}},r.prototype.getDocumentOptions=function(){return this.jsPDFDocument.__autoTableDocumentDefaults||{}},r.prototype.pageSize=function(){var t=this.jsPDFDocument.internal.pageSize;return t.width==null&&(t={width:t.getWidth(),height:t.getHeight()}),t},r.prototype.scaleFactor=function(){return this.jsPDFDocument.internal.scaleFactor},r.prototype.getLineHeightFactor=function(){var t=this.jsPDFDocument;return t.getLineHeightFactor?t.getLineHeightFactor():1.15},r.prototype.getLineHeight=function(t){return t/this.scaleFactor()*this.getLineHeightFactor()},r.prototype.pageNumber=function(){var t=this.jsPDFDocument.internal.getCurrentPageInfo();return t?t.pageNumber:this.jsPDFDocument.internal.getNumberOfPages()},r}(),Es=function(r,t){return Es=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,i){e.__proto__=i}||function(e,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(e[o]=i[o])},Es(r,t)};function fl(r,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Es(r,t);function e(){this.constructor=r}r.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}var cl=function(r){fl(t,r);function t(e){var i=r.call(this)||this;return i._element=e,i}return t}(Array);function of(r){return{font:"helvetica",fontStyle:"normal",overflow:"linebreak",fillColor:!1,textColor:20,halign:"left",valign:"top",fontSize:10,cellPadding:5/r,lineColor:200,lineWidth:0,cellWidth:"auto",minCellHeight:0,minCellWidth:0}}function sf(r){var t={striped:{table:{fillColor:255,textColor:80,fontStyle:"normal"},head:{textColor:255,fillColor:[41,128,185],fontStyle:"bold"},body:{},foot:{textColor:255,fillColor:[41,128,185],fontStyle:"bold"},alternateRow:{fillColor:245}},grid:{table:{fillColor:255,textColor:80,fontStyle:"normal",lineWidth:.1},head:{textColor:255,fillColor:[26,188,156],fontStyle:"bold",lineWidth:0},body:{},foot:{textColor:255,fillColor:[26,188,156],fontStyle:"bold",lineWidth:0},alternateRow:{}},plain:{head:{fontStyle:"bold"},foot:{fontStyle:"bold"}}};return t[r]}function yo(r,t,e){e.applyStyles(t,!0);var i=Array.isArray(r)?r:[r],o=i.map(function(a){return e.getTextWidth(a)}).reduce(function(a,u){return Math.max(a,u)},0);return o}function dl(r,t,e,i){var o=t.settings.tableLineWidth,a=t.settings.tableLineColor;r.applyStyles({lineWidth:o,lineColor:a});var u=pl(o,!1);u&&r.rect(e.x,e.y,t.getWidth(r.pageSize().width),i.y-e.y,u)}function pl(r,t){var e=r>0,i=t||t===0;return e&&i?"DF":e?"S":i?"F":null}function No(r,t){var e,i,o,a;if(r=r||t,Array.isArray(r)){if(r.length>=4)return{top:r[0],right:r[1],bottom:r[2],left:r[3]};if(r.length===3)return{top:r[0],right:r[1],bottom:r[2],left:r[1]};if(r.length===2)return{top:r[0],right:r[1],bottom:r[0],left:r[1]};r.length===1?r=r[0]:r=t}return typeof r=="object"?(typeof r.vertical=="number"&&(r.top=r.vertical,r.bottom=r.vertical),typeof r.horizontal=="number"&&(r.right=r.horizontal,r.left=r.horizontal),{left:(e=r.left)!==null&&e!==void 0?e:t,top:(i=r.top)!==null&&i!==void 0?i:t,right:(o=r.right)!==null&&o!==void 0?o:t,bottom:(a=r.bottom)!==null&&a!==void 0?a:t}):(typeof r!="number"&&(r=t),{top:r,right:r,bottom:r,left:r})}function gl(r,t){var e=No(t.settings.margin,0);return r.pageSize().width-(e.left+e.right)}function uf(r,t,e,i,o){var a={},u=1.3333333333333333,h=Ls(t,function(G){return o.getComputedStyle(G).backgroundColor});h!=null&&(a.fillColor=h);var f=Ls(t,function(G){return o.getComputedStyle(G).color});f!=null&&(a.textColor=f);var d=hf(i,e);d&&(a.cellPadding=d);var v="borderTopColor",m=u*e,w=i.borderTopWidth;if(i.borderBottomWidth===w&&i.borderRightWidth===w&&i.borderLeftWidth===w){var p=(parseFloat(w)||0)/m;p&&(a.lineWidth=p)}else a.lineWidth={top:(parseFloat(i.borderTopWidth)||0)/m,right:(parseFloat(i.borderRightWidth)||0)/m,bottom:(parseFloat(i.borderBottomWidth)||0)/m,left:(parseFloat(i.borderLeftWidth)||0)/m},a.lineWidth.top||(a.lineWidth.right?v="borderRightColor":a.lineWidth.bottom?v="borderBottomColor":a.lineWidth.left&&(v="borderLeftColor"));var F=Ls(t,function(G){return o.getComputedStyle(G)[v]});F!=null&&(a.lineColor=F);var P=["left","right","center","justify"];P.indexOf(i.textAlign)!==-1&&(a.halign=i.textAlign),P=["middle","bottom","top"],P.indexOf(i.verticalAlign)!==-1&&(a.valign=i.verticalAlign);var D=parseInt(i.fontSize||"");isNaN(D)||(a.fontSize=D/u);var _=lf(i);_&&(a.fontStyle=_);var B=(i.fontFamily||"").toLowerCase();return r.indexOf(B)!==-1&&(a.font=B),a}function lf(r){var t="";return(r.fontWeight==="bold"||r.fontWeight==="bolder"||parseInt(r.fontWeight)>=700)&&(t="bold"),(r.fontStyle==="italic"||r.fontStyle==="oblique")&&(t+="italic"),t}function Ls(r,t){var e=vl(r,t);if(!e)return null;var i=e.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d*\.?\d*))?\)$/);if(!i||!Array.isArray(i))return null;var o=[parseInt(i[1]),parseInt(i[2]),parseInt(i[3])],a=parseInt(i[4]);return a===0||isNaN(o[0])||isNaN(o[1])||isNaN(o[2])?null:o}function vl(r,t){var e=t(r);return e==="rgba(0, 0, 0, 0)"||e==="transparent"||e==="initial"||e==="inherit"?r.parentElement==null?null:vl(r.parentElement,t):e}function hf(r,t){var e=[r.paddingTop,r.paddingRight,r.paddingBottom,r.paddingLeft],i=96/(72/t),o=(parseInt(r.lineHeight)-parseInt(r.fontSize))/t/2,a=e.map(function(h){return parseInt(h||"0")/i}),u=No(a,0);return o>u.top&&(u.top=o),o>u.bottom&&(u.bottom=o),u}function ml(r,t,e,i,o){var a,u;i===void 0&&(i=!1),o===void 0&&(o=!1);var h;typeof t=="string"?h=e.document.querySelector(t):h=t;var f=Object.keys(r.getFontList()),d=r.scaleFactor(),v=[],m=[],w=[];if(!h)return console.error("Html table could not be found with input: ",t),{head:v,body:m,foot:w};for(var p=0;p<h.rows.length;p++){var F=h.rows[p],P=(u=(a=F==null?void 0:F.parentElement)===null||a===void 0?void 0:a.tagName)===null||u===void 0?void 0:u.toLowerCase(),D=ff(f,d,e,F,i,o);D&&(P==="thead"?v.push(D):P==="tfoot"?w.push(D):m.push(D))}return{head:v,body:m,foot:w}}function ff(r,t,e,i,o,a){for(var u=new cl(i),h=0;h<i.cells.length;h++){var f=i.cells[h],d=e.getComputedStyle(f);if(o||d.display!=="none"){var v=void 0;a&&(v=uf(r,f,t,d,e)),u.push({rowSpan:f.rowSpan,colSpan:f.colSpan,styles:v,_element:f,content:cf(f)})}}var m=e.getComputedStyle(i);if(u.length>0&&(o||m.display!=="none"))return u}function cf(r){var t=r.cloneNode(!0);return t.innerHTML=t.innerHTML.replace(/\n/g,"").replace(/ +/g," "),t.innerHTML=t.innerHTML.split(/<br.*?>/).map(function(e){return e.trim()}).join(`
244
- `),t.innerText||t.textContent||""}function df(r,t,e){for(var i=0,o=[r,t,e];i<o.length;i++){var a=o[i];a&&typeof a!="object"&&console.error("The options parameter should be of type object, is: "+typeof a),a.startY&&typeof a.startY!="number"&&(console.error("Invalid value for startY option",a.startY),delete a.startY)}}function pn(r,t,e,i,o){if(r==null)throw new TypeError("Cannot convert undefined or null to object");for(var a=Object(r),u=1;u<arguments.length;u++){var h=arguments[u];if(h!=null)for(var f in h)Object.prototype.hasOwnProperty.call(h,f)&&(a[f]=h[f])}return a}function bl(r,t){var e=new Mi(r),i=e.getDocumentOptions(),o=e.getGlobalOptions();df(o,i,t);var a=pn({},o,i,t),u;typeof window<"u"&&(u=window);var h=pf(o,i,t),f=gf(o,i,t),d=vf(e,a),v=bf(e,a,u);return{id:t.tableId,content:v,hooks:f,styles:h,settings:d}}function pf(r,t,e){for(var i={styles:{},headStyles:{},bodyStyles:{},footStyles:{},alternateRowStyles:{},columnStyles:{}},o=function(f){if(f==="columnStyles"){var d=r[f],v=t[f],m=e[f];i.columnStyles=pn({},d,v,m)}else{var w=[r,t,e],p=w.map(function(F){return F[f]||{}});i[f]=pn({},p[0],p[1],p[2])}},a=0,u=Object.keys(i);a<u.length;a++){var h=u[a];o(h)}return i}function gf(r,t,e){for(var i=[r,t,e],o={didParseCell:[],willDrawCell:[],didDrawCell:[],willDrawPage:[],didDrawPage:[]},a=0,u=i;a<u.length;a++){var h=u[a];h.didParseCell&&o.didParseCell.push(h.didParseCell),h.willDrawCell&&o.willDrawCell.push(h.willDrawCell),h.didDrawCell&&o.didDrawCell.push(h.didDrawCell),h.willDrawPage&&o.willDrawPage.push(h.willDrawPage),h.didDrawPage&&o.didDrawPage.push(h.didDrawPage)}return o}function vf(r,t){var e,i,o,a,u,h,f,d,v,m,w,p,F=No(t.margin,40/r.scaleFactor()),P=(e=mf(r,t.startY))!==null&&e!==void 0?e:F.top,D;t.showFoot===!0?D="everyPage":t.showFoot===!1?D="never":D=(i=t.showFoot)!==null&&i!==void 0?i:"everyPage";var _;t.showHead===!0?_="everyPage":t.showHead===!1?_="never":_=(o=t.showHead)!==null&&o!==void 0?o:"everyPage";var B=(a=t.useCss)!==null&&a!==void 0?a:!1,G=t.theme||(B?"plain":"striped"),it=!!t.horizontalPageBreak,ut=(u=t.horizontalPageBreakRepeat)!==null&&u!==void 0?u:null;return{includeHiddenHtml:(h=t.includeHiddenHtml)!==null&&h!==void 0?h:!1,useCss:B,theme:G,startY:P,margin:F,pageBreak:(f=t.pageBreak)!==null&&f!==void 0?f:"auto",rowPageBreak:(d=t.rowPageBreak)!==null&&d!==void 0?d:"auto",tableWidth:(v=t.tableWidth)!==null&&v!==void 0?v:"auto",showHead:_,showFoot:D,tableLineWidth:(m=t.tableLineWidth)!==null&&m!==void 0?m:0,tableLineColor:(w=t.tableLineColor)!==null&&w!==void 0?w:200,horizontalPageBreak:it,horizontalPageBreakRepeat:ut,horizontalPageBreakBehaviour:(p=t.horizontalPageBreakBehaviour)!==null&&p!==void 0?p:"afterAllRows"}}function mf(r,t){var e=r.getLastAutoTable(),i=r.scaleFactor(),o=r.pageNumber(),a=!1;if(e&&e.startPageNumber){var u=e.startPageNumber+e.pageNumber-1;a=u===o}return typeof t=="number"?t:(t==null||t===!1)&&a&&(e==null?void 0:e.finalY)!=null?e.finalY+20/i:null}function bf(r,t,e){var i=t.head||[],o=t.body||[],a=t.foot||[];if(t.html){var u=t.includeHiddenHtml;if(e){var h=ml(r,t.html,e,u,t.useCss)||{};i=h.head||i,o=h.body||i,a=h.foot||i}else console.error("Cannot parse html in non browser environment")}var f=t.columns||yf(i,o,a);return{columns:f,head:i,body:o,foot:a}}function yf(r,t,e){var i=r[0]||t[0]||e[0]||[],o=[];return Object.keys(i).filter(function(a){return a!=="_element"}).forEach(function(a){var u=1,h;Array.isArray(i)?h=i[parseInt(a)]:h=i[a],typeof h=="object"&&!Array.isArray(h)&&(u=(h==null?void 0:h.colSpan)||1);for(var f=0;f<u;f++){var d=void 0;Array.isArray(i)?d=o.length:d=a+(f>0?"_".concat(f):"");var v={dataKey:d};o.push(v)}}),o}var Rs=function(){function r(t,e,i){this.table=e,this.pageNumber=e.pageNumber,this.settings=e.settings,this.cursor=i,this.doc=t.getDocument()}return r}(),wf=function(r){fl(t,r);function t(e,i,o,a,u,h){var f=r.call(this,e,i,h)||this;return f.cell=o,f.row=a,f.column=u,f.section=a.section,f}return t}(Rs),xf=function(){function r(t,e){this.pageNumber=1,this.id=t.id,this.settings=t.settings,this.styles=t.styles,this.hooks=t.hooks,this.columns=e.columns,this.head=e.head,this.body=e.body,this.foot=e.foot}return r.prototype.getHeadHeight=function(t){return this.head.reduce(function(e,i){return e+i.getMaxCellHeight(t)},0)},r.prototype.getFootHeight=function(t){return this.foot.reduce(function(e,i){return e+i.getMaxCellHeight(t)},0)},r.prototype.allRows=function(){return this.head.concat(this.body).concat(this.foot)},r.prototype.callCellHooks=function(t,e,i,o,a,u){for(var h=0,f=e;h<f.length;h++){var d=f[h],v=new wf(t,this,i,o,a,u),m=d(v)===!1;if(i.text=Array.isArray(i.text)?i.text:[i.text],m)return!1}return!0},r.prototype.callEndPageHooks=function(t,e){t.applyStyles(t.userStyles);for(var i=0,o=this.hooks.didDrawPage;i<o.length;i++){var a=o[i];a(new Rs(t,this,e))}},r.prototype.callWillDrawPageHooks=function(t,e){for(var i=0,o=this.hooks.willDrawPage;i<o.length;i++){var a=o[i];a(new Rs(t,this,e))}},r.prototype.getWidth=function(t){if(typeof this.settings.tableWidth=="number")return this.settings.tableWidth;if(this.settings.tableWidth==="wrap"){var e=this.columns.reduce(function(o,a){return o+a.wrappedWidth},0);return e}else{var i=this.settings.margin;return t-i.left-i.right}},r}(),yl=function(){function r(t,e,i,o,a){a===void 0&&(a=!1),this.height=0,this.raw=t,t instanceof cl&&(this.raw=t._element,this.element=t._element),this.index=e,this.section=i,this.cells=o,this.spansMultiplePages=a}return r.prototype.getMaxCellHeight=function(t){var e=this;return t.reduce(function(i,o){var a;return Math.max(i,((a=e.cells[o.index])===null||a===void 0?void 0:a.height)||0)},0)},r.prototype.hasRowSpan=function(t){var e=this;return t.filter(function(i){var o=e.cells[i.index];return o?o.rowSpan>1:!1}).length>0},r.prototype.canEntireRowFit=function(t,e){return this.getMaxCellHeight(e)<=t},r.prototype.getMinimumRowHeight=function(t,e){var i=this;return t.reduce(function(o,a){var u=i.cells[a.index];if(!u)return 0;var h=e.getLineHeight(u.styles.fontSize),f=u.padding("vertical"),d=f+h;return d>o?d:o},0)},r}(),wl=function(){function r(t,e,i){var o;this.contentHeight=0,this.contentWidth=0,this.wrappedWidth=0,this.minReadableWidth=0,this.minWidth=0,this.width=0,this.height=0,this.x=0,this.y=0,this.styles=e,this.section=i,this.raw=t;var a=t;t!=null&&typeof t=="object"&&!Array.isArray(t)?(this.rowSpan=t.rowSpan||1,this.colSpan=t.colSpan||1,a=(o=t.content)!==null&&o!==void 0?o:t,t._element&&(this.raw=t._element)):(this.rowSpan=1,this.colSpan=1);var u=a!=null?""+a:"",h=/\r\n|\r|\n/g;this.text=u.split(h)}return r.prototype.getTextPos=function(){var t;if(this.styles.valign==="top")t=this.y+this.padding("top");else if(this.styles.valign==="bottom")t=this.y+this.height-this.padding("bottom");else{var e=this.height-this.padding("vertical");t=this.y+e/2+this.padding("top")}var i;if(this.styles.halign==="right")i=this.x+this.width-this.padding("right");else if(this.styles.halign==="center"){var o=this.width-this.padding("horizontal");i=this.x+o/2+this.padding("left")}else i=this.x+this.padding("left");return{x:i,y:t}},r.prototype.getContentHeight=function(t,e){e===void 0&&(e=1.15);var i=Array.isArray(this.text)?this.text.length:1,o=this.styles.fontSize/t*e,a=i*o+this.padding("vertical");return Math.max(a,this.styles.minCellHeight)},r.prototype.padding=function(t){var e=No(this.styles.cellPadding,0);return t==="vertical"?e.top+e.bottom:t==="horizontal"?e.left+e.right:e[t]},r}(),Lf=function(){function r(t,e,i){this.wrappedWidth=0,this.minReadableWidth=0,this.minWidth=0,this.width=0,this.dataKey=t,this.raw=e,this.index=i}return r.prototype.getMaxCustomCellWidth=function(t){for(var e=0,i=0,o=t.allRows();i<o.length;i++){var a=o[i],u=a.cells[this.index];u&&typeof u.styles.cellWidth=="number"&&(e=Math.max(e,u.styles.cellWidth))}return e},r}();function Af(r,t){Nf(r,t);var e=[],i=0;t.columns.forEach(function(a){var u=a.getMaxCustomCellWidth(t);u?a.width=u:(a.width=a.wrappedWidth,e.push(a)),i+=a.width});var o=t.getWidth(r.pageSize().width)-i;o&&(o=Ts(e,o,function(a){return Math.max(a.minReadableWidth,a.minWidth)})),o&&(o=Ts(e,o,function(a){return a.minWidth})),o=Math.abs(o),!t.settings.horizontalPageBreak&&o>.1/r.scaleFactor()&&(o=o<1?o:Math.round(o),console.warn("Of the table content, ".concat(o," units width could not fit page"))),_f(t),Pf(t,r),Sf(t)}function Nf(r,t){var e=r.scaleFactor(),i=t.settings.horizontalPageBreak,o=gl(r,t);t.allRows().forEach(function(a){for(var u=0,h=t.columns;u<h.length;u++){var f=h[u],d=a.cells[f.index];if(d){var v=t.hooks.didParseCell;t.callCellHooks(r,v,d,a,f,null);var m=d.padding("horizontal");d.contentWidth=yo(d.text,d.styles,r)+m;var w=yo(d.text.join(" ").split(/[^\S\u00A0]+/),d.styles,r);if(d.minReadableWidth=w+d.padding("horizontal"),typeof d.styles.cellWidth=="number")d.minWidth=d.styles.cellWidth,d.wrappedWidth=d.styles.cellWidth;else if(d.styles.cellWidth==="wrap"||i===!0)d.contentWidth>o?(d.minWidth=o,d.wrappedWidth=o):(d.minWidth=d.contentWidth,d.wrappedWidth=d.contentWidth);else{var p=10/e;d.minWidth=d.styles.minCellWidth||p,d.wrappedWidth=d.contentWidth,d.minWidth>d.wrappedWidth&&(d.wrappedWidth=d.minWidth)}}}}),t.allRows().forEach(function(a){for(var u=0,h=t.columns;u<h.length;u++){var f=h[u],d=a.cells[f.index];if(d&&d.colSpan===1)f.wrappedWidth=Math.max(f.wrappedWidth,d.wrappedWidth),f.minWidth=Math.max(f.minWidth,d.minWidth),f.minReadableWidth=Math.max(f.minReadableWidth,d.minReadableWidth);else{var v=t.styles.columnStyles[f.dataKey]||t.styles.columnStyles[f.index]||{},m=v.cellWidth||v.minCellWidth;m&&typeof m=="number"&&(f.minWidth=m,f.wrappedWidth=m)}d&&(d.colSpan>1&&!f.minWidth&&(f.minWidth=d.minWidth),d.colSpan>1&&!f.wrappedWidth&&(f.wrappedWidth=d.minWidth))}})}function Ts(r,t,e){for(var i=t,o=r.reduce(function(p,F){return p+F.wrappedWidth},0),a=0;a<r.length;a++){var u=r[a],h=u.wrappedWidth/o,f=i*h,d=u.width+f,v=e(u),m=d<v?v:d;t-=m-u.width,u.width=m}if(t=Math.round(t*1e10)/1e10,t){var w=r.filter(function(p){return t<0?p.width>e(p):!0});w.length&&(t=Ts(w,t,e))}return t}function Sf(r){for(var t={},e=1,i=r.allRows(),o=0;o<i.length;o++)for(var a=i[o],u=0,h=r.columns;u<h.length;u++){var f=h[u],d=t[f.index];if(e>1)e--,delete a.cells[f.index];else if(d)d.cell.height+=a.height,e=d.cell.colSpan,delete a.cells[f.index],d.left--,d.left<=1&&delete t[f.index];else{var v=a.cells[f.index];if(!v)continue;if(v.height=a.height,v.rowSpan>1){var m=i.length-o,w=v.rowSpan>m?m:v.rowSpan;t[f.index]={cell:v,left:w,row:a}}}}}function _f(r){for(var t=r.allRows(),e=0;e<t.length;e++)for(var i=t[e],o=null,a=0,u=0,h=0;h<r.columns.length;h++){var f=r.columns[h];if(u-=1,u>1&&r.columns[h+1])a+=f.width,delete i.cells[f.index];else if(o){var d=o;delete i.cells[f.index],o=null,d.width=f.width+a}else{var d=i.cells[f.index];if(!d)continue;if(u=d.colSpan,a=0,d.colSpan>1){o=d,a+=f.width;continue}d.width=f.width+a}}}function Pf(r,t){for(var e={count:0,height:0},i=0,o=r.allRows();i<o.length;i++){for(var a=o[i],u=0,h=r.columns;u<h.length;u++){var f=h[u],d=a.cells[f.index];if(d){t.applyStyles(d.styles,!0);var v=d.width-d.padding("horizontal");if(d.styles.overflow==="linebreak")d.text=t.splitTextToSize(d.text,v+1/t.scaleFactor(),{fontSize:d.styles.fontSize});else if(d.styles.overflow==="ellipsize")d.text=Eu(d.text,v,d.styles,t,"...");else if(d.styles.overflow==="hidden")d.text=Eu(d.text,v,d.styles,t,"");else if(typeof d.styles.overflow=="function"){var m=d.styles.overflow(d.text,v);typeof m=="string"?d.text=[m]:d.text=m}d.contentHeight=d.getContentHeight(t.scaleFactor(),t.getLineHeightFactor());var w=d.contentHeight/d.rowSpan;d.rowSpan>1&&e.count*e.height<w*d.rowSpan?e={height:w,count:d.rowSpan}:e&&e.count>0&&e.height>w&&(w=e.height),w>a.height&&(a.height=w)}}e.count--}}function Eu(r,t,e,i,o){return r.map(function(a){return kf(a,t,e,i,o)})}function kf(r,t,e,i,o){var a=1e4*i.scaleFactor();if(t=Math.ceil(t*a)/a,t>=yo(r,e,i))return r;for(;t<yo(r+o,e,i)&&!(r.length<=1);)r=r.substring(0,r.length-1);return r.trim()+o}function xl(r,t){var e=new Mi(r),i=Ff(t,e.scaleFactor()),o=new xf(t,i);return Af(e,o),e.applyStyles(e.userStyles),o}function Ff(r,t){var e=r.content,i=If(e.columns);if(e.head.length===0){var o=Ru(i,"head");o&&e.head.push(o)}if(e.foot.length===0){var o=Ru(i,"foot");o&&e.foot.push(o)}var a=r.settings.theme,u=r.styles;return{columns:i,head:As("head",e.head,i,u,a,t),body:As("body",e.body,i,u,a,t),foot:As("foot",e.foot,i,u,a,t)}}function As(r,t,e,i,o,a){var u={},h=t.map(function(f,d){for(var v=0,m={},w=0,p=0,F=0,P=e;F<P.length;F++){var D=P[F];if(u[D.index]==null||u[D.index].left===0)if(p===0){var _=void 0;Array.isArray(f)?_=f[D.index-w-v]:_=f[D.dataKey];var B={};typeof _=="object"&&!Array.isArray(_)&&(B=(_==null?void 0:_.styles)||{});var G=jf(r,D,d,o,i,a,B),it=new wl(_,G,r);m[D.dataKey]=it,m[D.index]=it,p=it.colSpan-1,u[D.index]={left:it.rowSpan-1,times:p}}else p--,w++;else u[D.index].left--,p=u[D.index].times,v++}return new yl(f,d,r,m)});return h}function Ru(r,t){var e={};return r.forEach(function(i){if(i.raw!=null){var o=Cf(t,i.raw);o!=null&&(e[i.dataKey]=o)}}),Object.keys(e).length>0?e:null}function Cf(r,t){if(r==="head"){if(typeof t=="object")return t.header||null;if(typeof t=="string"||typeof t=="number")return t}else if(r==="foot"&&typeof t=="object")return t.footer;return null}function If(r){return r.map(function(t,e){var i,o;return typeof t=="object"?o=(i=t.dataKey)!==null&&i!==void 0?i:e:o=e,new Lf(o,t,e)})}function jf(r,t,e,i,o,a,u){var h=sf(i),f;r==="head"?f=o.headStyles:r==="body"?f=o.bodyStyles:r==="foot"&&(f=o.footStyles);var d=pn({},h.table,h[r],o.styles,f),v=o.columnStyles[t.dataKey]||o.columnStyles[t.index]||{},m=r==="body"?v:{},w=r==="body"&&e%2===0?pn({},h.alternateRow,o.alternateRowStyles):{},p=of(a),F=pn({},p,d,w,m);return pn(F,u)}function Of(r,t,e){var i;e===void 0&&(e={});var o=gl(r,t),a=new Map,u=[],h=[],f=[];Array.isArray(t.settings.horizontalPageBreakRepeat)?f=t.settings.horizontalPageBreakRepeat:(typeof t.settings.horizontalPageBreakRepeat=="string"||typeof t.settings.horizontalPageBreakRepeat=="number")&&(f=[t.settings.horizontalPageBreakRepeat]),f.forEach(function(w){var p=t.columns.find(function(F){return F.dataKey===w||F.index===w});p&&!a.has(p.index)&&(a.set(p.index,!0),u.push(p.index),h.push(t.columns[p.index]),o-=p.wrappedWidth)});for(var d=!0,v=(i=e==null?void 0:e.start)!==null&&i!==void 0?i:0;v<t.columns.length;){if(a.has(v)){v++;continue}var m=t.columns[v].wrappedWidth;if(d||o>=m)d=!1,u.push(v),h.push(t.columns[v]),o-=m;else break;v++}return{colIndexes:u,columns:h,lastIndex:v-1}}function Df(r,t){for(var e=[],i=0;i<t.columns.length;i++){var o=Of(r,t,{start:i});o.columns.length&&(e.push(o),i=o.lastIndex)}return e}function Ll(r,t){var e=t.settings,i=e.startY,o=e.margin,a={x:o.left,y:i},u=t.getHeadHeight(t.columns)+t.getFootHeight(t.columns),h=i+o.bottom+u;if(e.pageBreak==="avoid"){var f=t.body,d=f.reduce(function(w,p){return w+p.height},0);h+=d}var v=new Mi(r);(e.pageBreak==="always"||e.startY!=null&&h>v.pageSize().height)&&(Nl(v),a.y=o.top),t.callWillDrawPageHooks(v,a);var m=pn({},a);t.startPageNumber=v.pageNumber(),e.horizontalPageBreak?Bf(v,t,m,a):(v.applyStyles(v.userStyles),(e.showHead==="firstPage"||e.showHead==="everyPage")&&t.head.forEach(function(w){return gn(v,t,w,a,t.columns)}),v.applyStyles(v.userStyles),t.body.forEach(function(w,p){var F=p===t.body.length-1;wo(v,t,w,F,m,a,t.columns)}),v.applyStyles(v.userStyles),(e.showFoot==="lastPage"||e.showFoot==="everyPage")&&t.foot.forEach(function(w){return gn(v,t,w,a,t.columns)})),dl(v,t,m,a),t.callEndPageHooks(v,a),t.finalY=a.y,r.lastAutoTable=t,v.applyStyles(v.userStyles)}function Bf(r,t,e,i){var o=Df(r,t),a=t.settings;if(a.horizontalPageBreakBehaviour==="afterAllRows")o.forEach(function(d,v){r.applyStyles(r.userStyles),v>0?va(r,t,e,i,d.columns,!0):Tu(r,t,i,d.columns),Mf(r,t,e,i,d.columns),Ns(r,t,i,d.columns)});else for(var u=-1,h=o[0],f=function(){var d=u;if(h){r.applyStyles(r.userStyles);var v=h.columns;u>=0?va(r,t,e,i,v,!0):Tu(r,t,i,v),d=qu(r,t,u+1,i,v),Ns(r,t,i,v)}var m=d-u;o.slice(1).forEach(function(w){r.applyStyles(r.userStyles),va(r,t,e,i,w.columns,!0),qu(r,t,u+1,i,w.columns,m),Ns(r,t,i,w.columns)}),u=d};u<t.body.length-1;)f()}function Tu(r,t,e,i){var o=t.settings;r.applyStyles(r.userStyles),(o.showHead==="firstPage"||o.showHead==="everyPage")&&t.head.forEach(function(a){return gn(r,t,a,e,i)})}function Mf(r,t,e,i,o){r.applyStyles(r.userStyles),t.body.forEach(function(a,u){var h=u===t.body.length-1;wo(r,t,a,h,e,i,o)})}function qu(r,t,e,i,o,a){r.applyStyles(r.userStyles),a=a??t.body.length;var u=Math.min(e+a,t.body.length),h=-1;return t.body.slice(e,u).forEach(function(f,d){var v=e+d===t.body.length-1,m=Al(r,t,v,i);f.canEntireRowFit(m,o)&&(gn(r,t,f,i,o),h=e+d)}),h}function Ns(r,t,e,i){var o=t.settings;r.applyStyles(r.userStyles),(o.showFoot==="lastPage"||o.showFoot==="everyPage")&&t.foot.forEach(function(a){return gn(r,t,a,e,i)})}function Ef(r,t,e){var i=e.getLineHeight(r.styles.fontSize),o=r.padding("vertical"),a=Math.floor((t-o)/i);return Math.max(0,a)}function Rf(r,t,e,i){var o={};r.spansMultiplePages=!0,r.height=0;for(var a=0,u=0,h=e.columns;u<h.length;u++){var f=h[u],d=r.cells[f.index];if(d){Array.isArray(d.text)||(d.text=[d.text]);var v=new wl(d.raw,d.styles,d.section);v=pn(v,d),v.text=[];var m=Ef(d,t,i);d.text.length>m&&(v.text=d.text.splice(m,d.text.length));var w=i.scaleFactor(),p=i.getLineHeightFactor();d.contentHeight=d.getContentHeight(w,p),d.contentHeight>=t&&(d.contentHeight=t,v.styles.minCellHeight-=t),d.contentHeight>r.height&&(r.height=d.contentHeight),v.contentHeight=v.getContentHeight(w,p),v.contentHeight>a&&(a=v.contentHeight),o[f.index]=v}}var F=new yl(r.raw,-1,r.section,o,!0);F.height=a;for(var P=0,D=e.columns;P<D.length;P++){var f=D[P],v=F.cells[f.index];v&&(v.height=F.height);var d=r.cells[f.index];d&&(d.height=r.height)}return F}function Tf(r,t,e,i){var o=r.pageSize().height,a=i.settings.margin,u=a.top+a.bottom,h=o-u;t.section==="body"&&(h-=i.getHeadHeight(i.columns)+i.getFootHeight(i.columns));var f=t.getMinimumRowHeight(i.columns,r),d=f<e;if(f>h)return console.error("Will not be able to print row ".concat(t.index," correctly since it's minimum height is larger than page height")),!0;if(!d)return!1;var v=t.hasRowSpan(i.columns),m=t.getMaxCellHeight(i.columns)>h;return m?(v&&console.error("The content of row ".concat(t.index," will not be drawn correctly since drawing rows with a height larger than the page height and has cells with rowspans is not supported.")),!0):!(v||i.settings.rowPageBreak==="avoid")}function wo(r,t,e,i,o,a,u){var h=Al(r,t,i,a);if(e.canEntireRowFit(h,u))gn(r,t,e,a,u);else if(Tf(r,e,h,t)){var f=Rf(e,h,t,r);gn(r,t,e,a,u),va(r,t,o,a,u),wo(r,t,f,i,o,a,u)}else va(r,t,o,a,u),wo(r,t,e,i,o,a,u)}function gn(r,t,e,i,o){i.x=t.settings.margin.left;for(var a=0,u=o;a<u.length;a++){var h=u[a],f=e.cells[h.index];if(!f){i.x+=h.width;continue}r.applyStyles(f.styles),f.x=i.x,f.y=i.y;var d=t.callCellHooks(r,t.hooks.willDrawCell,f,e,h,i);if(d===!1){i.x+=h.width;continue}qf(r,f,i);var v=f.getTextPos();hl(f.text,v.x,v.y,{halign:f.styles.halign,valign:f.styles.valign,maxWidth:Math.ceil(f.width-f.padding("left")-f.padding("right"))},r.getDocument()),t.callCellHooks(r,t.hooks.didDrawCell,f,e,h,i),i.x+=h.width}i.y+=e.height}function qf(r,t,e){var i=t.styles;if(r.getDocument().setFillColor(r.getDocument().getFillColor()),typeof i.lineWidth=="number"){var o=pl(i.lineWidth,i.fillColor);o&&r.rect(t.x,e.y,t.width,t.height,o)}else typeof i.lineWidth=="object"&&(i.fillColor&&r.rect(t.x,e.y,t.width,t.height,"F"),zf(r,t,e,i.lineWidth))}function zf(r,t,e,i){var o,a,u,h;i.top&&(o=e.x,a=e.y,u=e.x+t.width,h=e.y,i.right&&(u+=.5*i.right),i.left&&(o-=.5*i.left),f(i.top,o,a,u,h)),i.bottom&&(o=e.x,a=e.y+t.height,u=e.x+t.width,h=e.y+t.height,i.right&&(u+=.5*i.right),i.left&&(o-=.5*i.left),f(i.bottom,o,a,u,h)),i.left&&(o=e.x,a=e.y,u=e.x,h=e.y+t.height,i.top&&(a-=.5*i.top),i.bottom&&(h+=.5*i.bottom),f(i.left,o,a,u,h)),i.right&&(o=e.x+t.width,a=e.y,u=e.x+t.width,h=e.y+t.height,i.top&&(a-=.5*i.top),i.bottom&&(h+=.5*i.bottom),f(i.right,o,a,u,h));function f(d,v,m,w,p){r.getDocument().setLineWidth(d),r.getDocument().line(v,m,w,p,"S")}}function Al(r,t,e,i){var o=t.settings.margin.bottom,a=t.settings.showFoot;return(a==="everyPage"||a==="lastPage"&&e)&&(o+=t.getFootHeight(t.columns)),r.pageSize().height-i.y-o}function va(r,t,e,i,o,a){o===void 0&&(o=[]),a===void 0&&(a=!1),r.applyStyles(r.userStyles),t.settings.showFoot==="everyPage"&&!a&&t.foot.forEach(function(h){return gn(r,t,h,i,o)}),t.callEndPageHooks(r,i);var u=t.settings.margin;dl(r,t,e,i),Nl(r),t.pageNumber++,i.x=u.left,i.y=u.top,e.y=u.top,t.callWillDrawPageHooks(r,i),t.settings.showHead==="everyPage"&&(t.head.forEach(function(h){return gn(r,t,h,i,o)}),r.applyStyles(r.userStyles))}function Nl(r){var t=r.pageNumber();r.setPage(t+1);var e=r.pageNumber();return e===t?(r.addPage(),!0):!1}function Uf(r){r.API.autoTable=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var i=t[0],o=bl(this,i),a=xl(this,o);return Ll(this,a),this},r.API.lastAutoTable=!1,r.API.autoTableText=function(t,e,i,o){hl(t,e,i,o,this)},r.API.autoTableSetDefaults=function(t){return Mi.setDefaults(t,this),this},r.autoTableSetDefaults=function(t,e){Mi.setDefaults(t,e)},r.API.autoTableHtmlToJson=function(t,e){var i;if(e===void 0&&(e=!1),typeof window>"u")return console.error("Cannot run autoTableHtmlToJson in non browser environment"),null;var o=new Mi(this),a=ml(o,t,window,e,!1),u=a.head,h=a.body,f=((i=u[0])===null||i===void 0?void 0:i.map(function(d){return d.content}))||[];return{columns:f,rows:h,data:h}}}var Ss;function Hf(r,t){var e=bl(r,t),i=xl(r,e);Ll(r,i)}try{if(typeof window<"u"&&window){var zu=window,Uu=zu.jsPDF||((Ss=zu.jspdf)===null||Ss===void 0?void 0:Ss.jsPDF);Uu&&Uf(Uu)}}catch(r){console.error("Could not apply autoTable plugin",r)}exports.E=zt;exports._typeof=he;exports.autoTable=Hf;