@esri/solutions-components 5.1.10 → 5.1.11
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.
- package/dist/cdn/{WKO7FD3G.js → 2AH3XLSP.js} +1 -1
- package/dist/cdn/{UOMLB2VF.js → 2BTYCY73.js} +1 -1
- package/dist/cdn/{MZLGG4TG.js → 2GTM4OM5.js} +1 -1
- package/dist/cdn/{KTPO53JO.js → 2MNK2M2M.js} +1 -1
- package/dist/cdn/{2HPIGWIB.js → 2PTMXOMF.js} +1 -1
- package/dist/cdn/2Q4QB7TO.js +2 -0
- package/dist/cdn/{ECEZOF4D.js → 2TOUVQE2.js} +1 -1
- package/dist/cdn/{6PJXRZLY.js → 3BNJMNCD.js} +1 -1
- package/dist/cdn/{KIEHSIOJ.js → 3J3AZRUR.js} +1 -1
- package/dist/cdn/{EUG36OCW.js → 3J64FXVL.js} +1 -1
- package/dist/cdn/{2K2YQ45L.js → 3Q6BLEUW.js} +1 -1
- package/dist/cdn/{PPEPIUC4.js → 3ZNW2HIP.js} +1 -1
- package/dist/cdn/{AE272XE3.js → 4AONNWHB.js} +1 -1
- package/dist/cdn/{4LAXSM63.js → 4QVVEETV.js} +1 -1
- package/dist/cdn/{M6YYTOSO.js → 5C7DC2SL.js} +2 -2
- package/dist/cdn/{F2EGGQ3W.js → 5GWQZCK5.js} +1 -1
- package/dist/cdn/{XR6IYM4R.js → 5KYL2NR6.js} +1 -1
- package/dist/cdn/{Q7SDLDQW.js → 5OHUBPLI.js} +1 -1
- package/dist/cdn/{W2MQCT4W.js → 5UOHLES7.js} +1 -1
- package/dist/cdn/{4YCW3VWN.js → 5Z4SUP7T.js} +1 -1
- package/dist/cdn/{NCCSRCZ2.js → 6CHMTQ7X.js} +1 -1
- package/dist/cdn/{C5KDPY7R.js → 6DJOSQ7E.js} +1 -1
- package/dist/cdn/{WWTVTT5J.js → 6JW66HJW.js} +1 -1
- package/dist/cdn/{4PJ467WK.js → 6OEAB4NL.js} +1 -1
- package/dist/cdn/6OHUYDZC.js +2 -0
- package/dist/cdn/{5AQFUEQB.js → 6PS3XLRH.js} +1 -1
- package/dist/cdn/{OOVVT6VG.js → 6R6R4TFH.js} +1 -1
- package/dist/cdn/{WJ5N6JPF.js → 732AAGGJ.js} +1 -1
- package/dist/cdn/{PZRAETRN.js → 7BC75SVD.js} +1 -1
- package/dist/cdn/{PAV6AMLY.js → 7HYQYHMK.js} +1 -1
- package/dist/cdn/{6Z3LGOUQ.js → 7SZGYR22.js} +1 -1
- package/dist/cdn/{XJQG7EGF.js → 7TAWNPBZ.js} +1 -1
- package/dist/cdn/7YPSCUDA.js +2 -0
- package/dist/cdn/{BLUKS5FJ.js → ABPDYKOZ.js} +1 -1
- package/dist/cdn/ACTGIDKO.js +4 -0
- package/dist/cdn/{FXDJTMGY.js → AK6SGWFY.js} +1 -1
- package/dist/cdn/{GACGFXNN.js → AKPQCVFU.js} +1 -1
- package/dist/cdn/{TE2VLVWS.js → B56TSN42.js} +1 -1
- package/dist/cdn/{N47PSCNQ.js → BAAVBUK6.js} +1 -1
- package/dist/cdn/{5T64N34W.js → BG7E5RJ7.js} +1 -1
- package/dist/cdn/{OKJ6QAHM.js → BOTOPHKQ.js} +1 -1
- package/dist/cdn/{XV6XQ6BU.js → C5NGEPGX.js} +1 -1
- package/dist/cdn/{YM4U4HSN.js → CMCDRXVO.js} +1 -1
- package/dist/cdn/COSMV4TW.js +2 -0
- package/dist/cdn/{ZTVNKDEK.js → CTCWANBA.js} +1 -1
- package/dist/cdn/{SHQFXQEI.js → D53I5PX3.js} +1 -1
- package/dist/cdn/{6EQSEEAD.js → D7BCH5JY.js} +1 -1
- package/dist/cdn/{UG3QQIMB.js → DBJOFIGI.js} +1 -1
- package/dist/cdn/{DI3IFDJG.js → DBRM6W63.js} +1 -1
- package/dist/cdn/{PUFUUKRQ.js → DC4XE3RK.js} +1 -1
- package/dist/cdn/{FSKZZJUF.js → DCKMZWHU.js} +1 -1
- package/dist/cdn/{SUGRUFSJ.js → E2LHNWJK.js} +1 -1
- package/dist/cdn/{5HJ6EE4G.js → EACWQKLG.js} +1 -1
- package/dist/cdn/EXPBVOCZ.js +2 -0
- package/dist/cdn/{THZKWIXD.js → FETSFCBL.js} +1 -1
- package/dist/cdn/{VMDJMTU2.js → FM47F4IP.js} +1 -1
- package/dist/cdn/{BQLGP7UD.js → FY72EUAV.js} +1 -1
- package/dist/cdn/{5FDLHAS4.js → GCSG5D4A.js} +1 -1
- package/dist/cdn/{RKJHNKGM.js → GDBULXEH.js} +1 -1
- package/dist/cdn/{XQBLBK5A.js → GG6W2UKU.js} +1 -1
- package/dist/cdn/GMBKLZ7L.js +2 -0
- package/dist/cdn/{MA4TKCKK.js → GNE54PDA.js} +1 -1
- package/dist/cdn/{CPUKQ2OY.js → GSEA4VV7.js} +1 -1
- package/dist/cdn/{AZJYH7I7.js → H3NTIWHD.js} +1 -1
- package/dist/cdn/{XYIGNT62.js → HXRZFGOY.js} +1 -1
- package/dist/cdn/{V232YHD7.js → IYMK3E6M.js} +1 -1
- package/dist/cdn/{KJ3CURXB.js → JMYTCCTQ.js} +1 -1
- package/dist/cdn/{QF5BFH3R.js → JSHNQPGP.js} +1 -1
- package/dist/cdn/{K5VCPN45.js → JYU3PWGS.js} +1 -1
- package/dist/cdn/{OLYZZUDI.js → JZZLKETM.js} +1 -1
- package/dist/cdn/{RUMT4B4X.js → K4LUU652.js} +1 -1
- package/dist/cdn/{C34LZE4Q.js → KMN7UYCS.js} +1 -1
- package/dist/cdn/{FFSZ5CYN.js → KOIR626Q.js} +1 -1
- package/dist/cdn/{CQYD3TH5.js → KPD6SAOC.js} +1 -1
- package/dist/cdn/L3DICS7J.js +2 -0
- package/dist/cdn/{7VY6KY45.js → LEF6LYRH.js} +1 -1
- package/dist/cdn/{4VV7DDBG.js → LFBK5LL3.js} +1 -1
- package/dist/cdn/{CPOU3UCE.js → LT6TNRF6.js} +1 -1
- package/dist/cdn/{DAQ57N3D.js → LTOKLDCW.js} +1 -1
- package/dist/cdn/{ELGHSGTO.js → M2RKXX76.js} +1 -1
- package/dist/cdn/{OQWPF3PK.js → M6KMGWHY.js} +112 -112
- package/dist/cdn/{RUNSGWMR.js → MDBRPVIW.js} +1 -1
- package/dist/cdn/{L4EVXVMR.js → MIEA46UR.js} +1 -1
- package/dist/cdn/{WZMO2SQE.js → MPOW6X2Q.js} +1 -1
- package/dist/cdn/{SIQTPM44.js → MXX6VR25.js} +1 -1
- package/dist/cdn/{B4JCBMGE.js → N6RHZQIZ.js} +1 -1
- package/dist/cdn/{4R2OJQVH.js → NFLDV2BR.js} +1 -1
- package/dist/cdn/{DLAKQTNZ.js → NJQV2ASV.js} +1 -1
- package/dist/cdn/{SIBQRSHI.js → NT2KAJ24.js} +1 -1
- package/dist/cdn/NTFCCNHZ.js +2 -0
- package/dist/cdn/{ASQ2ASAR.js → NYLOU7ZM.js} +1 -1
- package/dist/cdn/OBCQW5HQ.js +2 -0
- package/dist/cdn/{RQ6B7DOH.js → OIGQMEOA.js} +1 -1
- package/dist/cdn/{Z7C3QF2Q.js → OPBYN6K6.js} +1 -1
- package/dist/cdn/{JOH2V3WI.js → OQUU2BPX.js} +1 -1
- package/dist/cdn/{GC3FZF6H.js → P42EMHKE.js} +1 -1
- package/dist/cdn/{35CQS4OH.js → P5XPWB3Q.js} +1 -1
- package/dist/cdn/{6GVJDW4C.js → PFI2WBBU.js} +1 -1
- package/dist/cdn/{A6BQFFPE.js → Q3MOIT4E.js} +1 -1
- package/dist/cdn/{4E4CF6Q7.js → QAVOSU5J.js} +1 -1
- package/dist/cdn/{4CDVQJQA.js → QBQZPRIE.js} +1 -1
- package/dist/cdn/{5MYEU5AR.js → QQL4IXXC.js} +1 -1
- package/dist/cdn/{FCBPBLC6.js → RGK67WAK.js} +1 -1
- package/dist/cdn/{2ZDSUBVY.js → RN7VHNTN.js} +1 -1
- package/dist/cdn/{3EZYKC6C.js → RPYS2BGE.js} +1 -1
- package/dist/cdn/{XUOTOCCL.js → S2E4VZKV.js} +1 -1
- package/dist/cdn/{MCV6DHJB.js → S5QUASO4.js} +1 -1
- package/dist/cdn/{KX6TYZ5K.js → SO6FENAY.js} +1 -1
- package/dist/cdn/{N5GSNHSN.js → TCPO7PEE.js} +1 -1
- package/dist/cdn/{WQ5ENRKJ.js → TM3HQUQN.js} +1 -1
- package/dist/cdn/{AHI2MTG5.js → TPQU557H.js} +1 -1
- package/dist/cdn/{IIJ5ZZTX.js → TWCRSSGO.js} +1 -1
- package/dist/cdn/{I3OUQRK4.js → U2J33BNN.js} +1 -1
- package/dist/cdn/UA54WQWK.js +358 -0
- package/dist/cdn/{DYEOE6I6.js → UCUB4NM7.js} +1 -1
- package/dist/cdn/{SPBY5FBC.js → USBGSJAW.js} +1 -1
- package/dist/cdn/{3REF4TDF.js → V6TC7O53.js} +1 -1
- package/dist/cdn/{676PIMSM.js → VBPF56MA.js} +1 -1
- package/dist/cdn/{ZFBW6LYC.js → VINK2SLZ.js} +1 -1
- package/dist/cdn/{FDX3I6JP.js → VMM72GMK.js} +1 -1
- package/dist/cdn/{I4GVAMDM.js → VXTI3UUR.js} +1 -1
- package/dist/cdn/WDSHKWCQ.js +2 -0
- package/dist/cdn/{GEEMZCDZ.js → WMEGJGIX.js} +1 -1
- package/dist/cdn/WMM6XQNF.js +2 -0
- package/dist/cdn/WPDKKXGG.js +7 -0
- package/dist/cdn/WRO2YCVL.js +2 -0
- package/dist/cdn/{P2RGP6L2.js → WSDTBHMX.js} +1 -1
- package/dist/cdn/{NWVVA2OS.js → X67AT4PH.js} +1 -1
- package/dist/cdn/{PA7UC7MJ.js → XGRQ65AI.js} +1 -1
- package/dist/cdn/{VUOKGQXZ.js → XIQUZ5FD.js} +1 -1
- package/dist/cdn/{CQE44Z6L.js → XT7FRIZE.js} +1 -1
- package/dist/cdn/{IJR4CI4G.js → YDYRX5L6.js} +1 -1
- package/dist/cdn/{TDKGF25P.js → YQ6MHPLB.js} +1 -1
- package/dist/cdn/{PIXT3QPN.js → YQI2AE2N.js} +1 -1
- package/dist/cdn/{V7HVK5MH.js → Z35NON2P.js} +1 -1
- package/dist/cdn/{PIJIETWD.js → Z7SEICRM.js} +1 -1
- package/dist/cdn/{DKY76MHW.js → ZDXFFQJI.js} +1 -1
- package/dist/cdn/{AIFW3W6B.js → ZJP5YPZW.js} +1 -1
- package/dist/cdn/ZRHDQGYH.js +2 -0
- package/dist/cdn/index.js +1 -1
- package/dist/chunks/runtime.js +1 -1
- package/dist/components/layer-table/customElement.js +121 -81
- package/dist/components/map-card/customElement.js +29 -24
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/solutions-components_commit.txt +4 -4
- package/package.json +1 -1
- package/dist/cdn/25QMR32G.js +0 -2
- package/dist/cdn/3WOIIFS2.js +0 -2
- package/dist/cdn/BL4VPKUH.js +0 -2
- package/dist/cdn/CJ3EZE7U.js +0 -2
- package/dist/cdn/CYMX2JCD.js +0 -2
- package/dist/cdn/DF5KXARH.js +0 -2
- package/dist/cdn/E6L2N2MO.js +0 -2
- package/dist/cdn/EKB54JZO.js +0 -2
- package/dist/cdn/IADXB53D.js +0 -2
- package/dist/cdn/PGR3XQ7V.js +0 -2
- package/dist/cdn/U65LFJEF.js +0 -2
- package/dist/cdn/WHUO5NPJ.js +0 -7
- package/dist/cdn/WTSL6A4A.js +0 -2
- package/dist/cdn/XEXP4MZX.js +0 -351
- package/dist/cdn/XXIEONFX.js +0 -2
- package/dist/cdn/YJQ6BJTX.js +0 -2
- package/dist/cdn/YVWFYZTI.js +0 -4
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{a as Sf}from"./VVZAS55G.js";import{b as Af,ya as Nf}from"./AO7XKW2U.js";import{a as Le}from"./US5FON7D.js";import a from"./WV7QX3ED.js";import{c as xf}from"./
|
|
2
|
+
import{a as Sf}from"./VVZAS55G.js";import{b as Af,ya as Nf}from"./AO7XKW2U.js";import{a as Le}from"./US5FON7D.js";import a from"./WV7QX3ED.js";import{c as xf}from"./ZRHDQGYH.js";export default $arcgis.t(([Dh,a1,{b:Lf}])=>{var lr=Uint8Array,Bn=Uint16Array,Fl=Int32Array,El=new lr([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]),Cl=new lr([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]),kf=new lr([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Ef=function(t,n){for(var e=new Bn(31),r=0;r<31;++r)e[r]=n+=1<<t[r-1];for(var i=new Fl(e[30]),r=1;r<30;++r)for(var a=e[r];a<e[r+1];++a)i[a]=a-e[r]<<5|r;return{b:e,r:i}},Cf=Ef(El,2),Y1=Cf.b,kl=Cf.r;Y1[28]=258,kl[258]=28;var Of=Ef(Cl,0),sp=Of.b,Pf=Of.r,Pl=new Bn(32768);for(be=0;be<32768;++be)Zr=(be&43690)>>1|(be&21845)<<1,Zr=(Zr&52428)>>2|(Zr&13107)<<2,Zr=(Zr&61680)>>4|(Zr&3855)<<4,Pl[be]=((Zr&65280)>>8|(Zr&255)<<8)>>1;var Zr,be,oo=(function(t,n,e){for(var r=t.length,i=0,a=new Bn(n);i<r;++i)t[i]&&++a[t[i]-1];var h=new Bn(n);for(i=1;i<n;++i)h[i]=h[i-1]+a[i-1]<<1;var l;if(e){l=new Bn(1<<n);var f=15-n;for(i=0;i<r;++i)if(t[i])for(var u=i<<4|t[i],g=n-t[i],y=h[t[i]-1]++<<g,x=y|(1<<g)-1;y<=x;++y)l[Pl[y]>>f]=u}else for(l=new Bn(r),i=0;i<r;++i)t[i]&&(l[i]=Pl[h[t[i]-1]++]>>15-t[i]);return l}),ji=new lr(288);for(be=0;be<144;++be)ji[be]=8;var be;for(be=144;be<256;++be)ji[be]=9;var be;for(be=256;be<280;++be)ji[be]=7;var be;for(be=280;be<288;++be)ji[be]=8;var be,us=new lr(32);for(be=0;be<32;++be)us[be]=5;var be,K1=oo(ji,9,0);var X1=oo(us,5,0);var Tf=function(t){return(t+7)/8|0},J1=function(t,n,e){return(n==null||n<0)&&(n=0),(e==null||e>t.length)&&(e=t.length),new lr(t.subarray(n,e))};var $r=function(t,n,e){e<<=n&7;var r=n/8|0;t[r]|=e,t[r+1]|=e>>8},io=function(t,n,e){e<<=n&7;var r=n/8|0;t[r]|=e,t[r+1]|=e>>8,t[r+2]|=e>>16},Sl=function(t,n){for(var e=[],r=0;r<t.length;++r)t[r]&&e.push({s:r,f:t[r]});var i=e.length,a=e.slice();if(!i)return{t:Rf,l:0};if(i==1){var h=new lr(e[0].s+1);return h[e[0].s]=1,{t:h,l:1}}e.sort(function(rt,mt){return rt.f-mt.f}),e.push({s:-1,f:25001});var l=e[0],f=e[1],u=0,g=1,y=2;for(e[0]={s:-1,f:l.f+f.f,l,r:f};g!=i-1;)l=e[e[u].f<e[y].f?u++:y++],f=e[u!=g&&e[u].f<e[y].f?u++:y++],e[g++]={s:-1,f:l.f+f.f,l,r:f};for(var x=a[0].s,r=1;r<i;++r)a[r].s>x&&(x=a[r].s);var p=new Bn(x+1),F=Il(e[g-1],p,0);if(F>n){var r=0,P=0,D=F-n,N=1<<D;for(a.sort(function(mt,ct){return p[ct.s]-p[mt.s]||mt.f-ct.f});r<i;++r){var H=a[r].s;if(p[H]>n)P+=N-(1<<F-p[H]),p[H]=n;else break}for(P>>=D;P>0;){var q=a[r].s;p[q]<n?P-=1<<n-p[q]++-1:++r}for(;r>=0&&P;--r){var M=a[r].s;p[M]==n&&(--p[M],++P)}F=n}return{t:new lr(p),l:F}},Il=function(t,n,e){return t.s==-1?Math.max(Il(t.l,n,e+1),Il(t.r,n,e+1)):n[t.s]=e},If=function(t){for(var n=t.length;n&&!t[--n];);for(var e=new Bn(++n),r=0,i=t[0],a=1,h=function(f){e[r++]=f},l=1;l<=n;++l)if(t[l]==i&&l!=n)++a;else{if(!i&&a>2){for(;a>138;a-=138)h(32754);a>2&&(h(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(h(i),--a;a>6;a-=6)h(8304);a>2&&(h(a-3<<5|8208),a=0)}for(;a--;)h(i);a=1,i=t[l]}return{c:e.subarray(0,r),n}},ao=function(t,n){for(var e=0,r=0;r<n.length;++r)e+=t[r]*n[r];return e},Df=function(t,n,e){var r=e.length,i=Tf(n+2);t[i]=r&255,t[i+1]=r>>8,t[i+2]=t[i]^255,t[i+3]=t[i+1]^255;for(var a=0;a<r;++a)t[i+a+4]=e[a];return(i+4+r)*8},Ff=function(t,n,e,r,i,a,h,l,f,u,g){$r(n,g++,e),++i[256];for(var y=Sl(i,15),x=y.t,p=y.l,F=Sl(a,15),P=F.t,D=F.l,N=If(x),H=N.c,q=N.n,M=If(P),rt=M.c,mt=M.n,ct=new Bn(19),Y=0;Y<H.length;++Y)++ct[H[Y]&31];for(var Y=0;Y<rt.length;++Y)++ct[rt[Y]&31];for(var j=Sl(ct,7),tt=j.t,S=j.l,O=19;O>4&&!tt[kf[O-1]];--O);var W=u+5<<3,U=ao(i,ji)+ao(a,us)+h,it=ao(i,x)+ao(a,P)+h+14+3*O+ao(ct,tt)+2*ct[16]+3*ct[17]+7*ct[18];if(f>=0&&W<=U&&W<=it)return Df(n,g,t.subarray(f,f+u));var st,ht,nt,ut;if($r(n,g,1+(it<U)),g+=2,it<U){st=oo(x,p,0),ht=x,nt=oo(P,D,0),ut=P;var At=oo(tt,S,0);$r(n,g,q-257),$r(n,g+5,mt-1),$r(n,g+10,O-4),g+=14;for(var Y=0;Y<O;++Y)$r(n,g+3*Y,tt[kf[Y]]);g+=3*O;for(var wt=[H,rt],A=0;A<2;++A)for(var R=wt[A],Y=0;Y<R.length;++Y){var B=R[Y]&31;$r(n,g,At[B]),g+=tt[B],B>15&&($r(n,g,R[Y]>>5&127),g+=R[Y]>>12)}}else st=K1,ht=ji,nt=X1,ut=us;for(var Y=0;Y<l;++Y){var G=r[Y];if(G>255){var B=G>>18&31;io(n,g,st[B+257]),g+=ht[B+257],B>7&&($r(n,g,G>>23&31),g+=El[B]);var $=G&31;io(n,g,nt[$]),g+=ut[$],$>3&&(io(n,g,G>>5&8191),g+=Cl[$])}else io(n,g,st[G]),g+=ht[G]}return io(n,g,st[256]),g+ht[256]},Q1=new Fl([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),Rf=new lr(0),t0=function(t,n,e,r,i,a){var h=a.z||t.length,l=new lr(r+h+5*(1+Math.ceil(h/7e3))+i),f=l.subarray(r,l.length-i),u=a.l,g=(a.r||0)&7;if(n){g&&(f[0]=a.r>>3);for(var y=Q1[n-1],x=y>>13,p=y&8191,F=(1<<e)-1,P=a.p||new Bn(32768),D=a.h||new Bn(F+1),N=Math.ceil(e/3),H=2*N,q=function(Bt){return(t[Bt]^t[Bt+1]<<N^t[Bt+2]<<H)&F},M=new Fl(25e3),rt=new Bn(288),mt=new Bn(32),ct=0,Y=0,j=a.i||0,tt=0,S=a.w||0,O=0;j+2<h;++j){var W=q(j),U=j&32767,it=D[W];if(P[U]=it,D[W]=U,S<=j){var st=h-j;if((ct>7e3||tt>24576)&&(st>423||!u)){g=Ff(t,f,0,M,rt,mt,Y,tt,O,j-O,g),tt=ct=Y=0,O=j;for(var ht=0;ht<286;++ht)rt[ht]=0;for(var ht=0;ht<30;++ht)mt[ht]=0}var nt=2,ut=0,At=p,wt=U-it&32767;if(st>2&&W==q(j-wt))for(var A=Math.min(x,st)-1,R=Math.min(32767,j),B=Math.min(258,st);wt<=R&&--At&&U!=it;){if(t[j+nt]==t[j+nt-wt]){for(var G=0;G<B&&t[j+G]==t[j+G-wt];++G);if(G>nt){if(nt=G,ut=wt,G>A)break;for(var $=Math.min(wt,G-2),J=0,ht=0;ht<$;++ht){var at=j-wt+ht&32767,ot=P[at],gt=at-ot&32767;gt>J&&(J=gt,it=at)}}}U=it,it=P[U],wt+=U-it&32767}if(ut){M[tt++]=268435456|kl[nt]<<18|Pf[ut];var xt=kl[nt]&31,kt=Pf[ut]&31;Y+=El[xt]+Cl[kt],++rt[257+xt],++mt[kt],S=j+nt,++ct}else M[tt++]=t[j],++rt[t[j]]}}for(j=Math.max(j,S);j<h;++j)M[tt++]=t[j],++rt[t[j]];g=Ff(t,f,u,M,rt,mt,Y,tt,O,j-O,g),u||(a.r=g&7|f[g/8|0]<<3,g-=7,a.h=D,a.p=P,a.i=j,a.w=S)}else{for(var j=a.w||0;j<h+u;j+=65535){var St=j+65535;St>=h&&(f[g/8|0]=u,St=h),g=Df(f,g+1,t.subarray(j,St))}a.i=h}return J1(l,0,r+Tf(g)+i)};var Mf=function(){var t=1,n=0;return{p:function(e){for(var r=t,i=n,a=e.length|0,h=0;h!=a;){for(var l=Math.min(h+2655,a);h<l;++h)i+=r+=e[h];r=(r&65535)+15*(r>>16),i=(i&65535)+15*(i>>16)}t=r,n=i},d:function(){return t%=65521,n%=65521,(t&255)<<24|(t&65280)<<8|(n&255)<<8|n>>8}}},e0=function(t,n,e,r,i){if(!i&&(i={l:1},n.dictionary)){var a=n.dictionary.subarray(-32768),h=new lr(a.length+t.length);h.set(a),h.set(t,a.length),t=h,i.w=a.length}return t0(t,n.level==null?6:n.level,n.mem==null?i.l?Math.ceil(Math.max(8,Math.min(13,Math.log(t.length)))*1.5):20:12+n.mem,e,r,i)};var jf=function(t,n,e){for(;e;++n)t[n]=e,e>>>=8};var n0=function(t,n){var e=n.level,r=e==0?0:e<6?1:e==9?3:2;if(t[0]=120,t[1]=r<<6|(n.dictionary&&32),t[1]|=31-(t[0]<<8|t[1])%31,n.dictionary){var i=Mf();i.p(n.dictionary),jf(t,2,i.d())}};function ds(t,n){n||(n={});var e=Mf();e.p(t);var r=e0(t,n,n.dictionary?6:2,4);return n0(r,n),jf(r,r.length-4,e.d()),r}var r0=typeof TextDecoder<"u"&&new TextDecoder,i0=0;try{r0.decode(Rf,{stream:!0}),i0=1}catch{}function Bf(t){if(Array.isArray(t))return t}function zf(t,n){var e=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(e!=null){var r,i,a,h,l=[],f=!0,u=!1;try{if(a=(e=e.call(t)).next,n===0){if(Object(e)!==e)return;f=!1}else for(;!(f=(r=a.call(e)).done)&&(l.push(r.value),l.length!==n);f=!0);}catch(g){u=!0,i=g}finally{try{if(!f&&e.return!=null&&(h=e.return(),Object(h)!==h))return}finally{if(u)throw i}}return l}}function Ol(t,n){(n==null||n>t.length)&&(n=t.length);for(var e=0,r=Array(n);e<n;e++)r[e]=t[e];return r}function Uf(t,n){if(t){if(typeof t=="string")return Ol(t,n);var e={}.toString.call(t).slice(8,-1);return e==="Object"&&t.constructor&&(e=t.constructor.name),e==="Map"||e==="Set"?Array.from(t):e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?Ol(t,n):void 0}}function qf(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
3
3
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Tl(t,n){return Bf(t)||zf(t,n)||Uf(t,n)||qf()}function Dl(t,n="utf8"){return new TextDecoder(n).decode(t)}var a0=new TextEncoder;function Hf(t){return a0.encode(t)}var o0=1024*8,s0=(()=>{let t=new Uint8Array(4),n=new Uint32Array(t.buffer);return!((n[0]=1)&t[0])})(),Rl={int8:globalThis.Int8Array,uint8:globalThis.Uint8Array,int16:globalThis.Int16Array,uint16:globalThis.Uint16Array,int32:globalThis.Int32Array,uint32:globalThis.Uint32Array,uint64:globalThis.BigUint64Array,int64:globalThis.BigInt64Array,float32:globalThis.Float32Array,float64:globalThis.Float64Array},so=class t{buffer;byteLength;byteOffset;length;offset;lastWrittenByte;littleEndian;_data;_mark;_marks;constructor(n=o0,e={}){let r=!1;typeof n=="number"?n=new ArrayBuffer(n):(r=!0,this.lastWrittenByte=n.byteLength);let i=e.offset?e.offset>>>0:0,a=n.byteLength-i,h=i;(ArrayBuffer.isView(n)||n instanceof t)&&(n.byteLength!==n.buffer.byteLength&&(h=n.byteOffset+i),n=n.buffer),r?this.lastWrittenByte=a:this.lastWrittenByte=0,this.buffer=n,this.length=a,this.byteLength=a,this.byteOffset=h,this.offset=0,this.littleEndian=!0,this._data=new DataView(this.buffer,h,a),this._mark=0,this._marks=[]}available(n=1){return this.offset+n<=this.length}isLittleEndian(){return this.littleEndian}setLittleEndian(){return this.littleEndian=!0,this}isBigEndian(){return!this.littleEndian}setBigEndian(){return this.littleEndian=!1,this}skip(n=1){return this.offset+=n,this}back(n=1){return this.offset-=n,this}seek(n){return this.offset=n,this}mark(){return this._mark=this.offset,this}reset(){return this.offset=this._mark,this}pushMark(){return this._marks.push(this.offset),this}popMark(){let n=this._marks.pop();if(n===void 0)throw new Error("Mark stack empty");return this.seek(n),this}rewind(){return this.offset=0,this}ensureAvailable(n=1){if(!this.available(n)){let r=(this.offset+n)*2,i=new Uint8Array(r);i.set(new Uint8Array(this.buffer)),this.buffer=i.buffer,this.length=r,this.byteLength=r,this._data=new DataView(this.buffer)}return this}readBoolean(){return this.readUint8()!==0}readInt8(){return this._data.getInt8(this.offset++)}readUint8(){return this._data.getUint8(this.offset++)}readByte(){return this.readUint8()}readBytes(n=1){return this.readArray(n,"uint8")}readArray(n,e){let r=Rl[e].BYTES_PER_ELEMENT*n,i=this.byteOffset+this.offset,a=this.buffer.slice(i,i+r);if(this.littleEndian===s0&&e!=="uint8"&&e!=="int8"){let l=new Uint8Array(this.buffer.slice(i,i+r));l.reverse();let f=new Rl[e](l.buffer);return this.offset+=r,f.reverse(),f}let h=new Rl[e](a);return this.offset+=r,h}readInt16(){let n=this._data.getInt16(this.offset,this.littleEndian);return this.offset+=2,n}readUint16(){let n=this._data.getUint16(this.offset,this.littleEndian);return this.offset+=2,n}readInt32(){let n=this._data.getInt32(this.offset,this.littleEndian);return this.offset+=4,n}readUint32(){let n=this._data.getUint32(this.offset,this.littleEndian);return this.offset+=4,n}readFloat32(){let n=this._data.getFloat32(this.offset,this.littleEndian);return this.offset+=4,n}readFloat64(){let n=this._data.getFloat64(this.offset,this.littleEndian);return this.offset+=8,n}readBigInt64(){let n=this._data.getBigInt64(this.offset,this.littleEndian);return this.offset+=8,n}readBigUint64(){let n=this._data.getBigUint64(this.offset,this.littleEndian);return this.offset+=8,n}readChar(){return String.fromCharCode(this.readInt8())}readChars(n=1){let e="";for(let r=0;r<n;r++)e+=this.readChar();return e}readUtf8(n=1){return Dl(this.readBytes(n))}decodeText(n=1,e="utf8"){return Dl(this.readBytes(n),e)}writeBoolean(n){return this.writeUint8(n?255:0),this}writeInt8(n){return this.ensureAvailable(1),this._data.setInt8(this.offset++,n),this._updateLastWrittenByte(),this}writeUint8(n){return this.ensureAvailable(1),this._data.setUint8(this.offset++,n),this._updateLastWrittenByte(),this}writeByte(n){return this.writeUint8(n)}writeBytes(n){this.ensureAvailable(n.length);for(let e=0;e<n.length;e++)this._data.setUint8(this.offset++,n[e]);return this._updateLastWrittenByte(),this}writeInt16(n){return this.ensureAvailable(2),this._data.setInt16(this.offset,n,this.littleEndian),this.offset+=2,this._updateLastWrittenByte(),this}writeUint16(n){return this.ensureAvailable(2),this._data.setUint16(this.offset,n,this.littleEndian),this.offset+=2,this._updateLastWrittenByte(),this}writeInt32(n){return this.ensureAvailable(4),this._data.setInt32(this.offset,n,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeUint32(n){return this.ensureAvailable(4),this._data.setUint32(this.offset,n,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeFloat32(n){return this.ensureAvailable(4),this._data.setFloat32(this.offset,n,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeFloat64(n){return this.ensureAvailable(8),this._data.setFloat64(this.offset,n,this.littleEndian),this.offset+=8,this._updateLastWrittenByte(),this}writeBigInt64(n){return this.ensureAvailable(8),this._data.setBigInt64(this.offset,n,this.littleEndian),this.offset+=8,this._updateLastWrittenByte(),this}writeBigUint64(n){return this.ensureAvailable(8),this._data.setBigUint64(this.offset,n,this.littleEndian),this.offset+=8,this._updateLastWrittenByte(),this}writeChar(n){return this.writeUint8(n.charCodeAt(0))}writeChars(n){for(let e=0;e<n.length;e++)this.writeUint8(n.charCodeAt(e));return this}writeUtf8(n){return this.writeBytes(Hf(n))}toArray(){return new Uint8Array(this.buffer,this.byteOffset,this.lastWrittenByte)}getWrittenByteLength(){return this.lastWrittenByte-this.byteOffset}_updateLastWrittenByte(){this.offset>this.lastWrittenByte&&(this.lastWrittenByte=this.offset)}};function ma(t){let n=t.length;for(;--n>=0;)t[n]=0}var l0=0,Fc=1,h0=2,f0=3,c0=258,oh=29,xo=256,go=xo+1+oh,ua=30,sh=19,Ec=2*go+1,Bi=15,Ml=16,u0=7,lh=256,Cc=16,Oc=17,Tc=18,Xl=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),ws=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),d0=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),Dc=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),p0=512,Kr=new Array((go+2)*2);ma(Kr);var co=new Array(ua*2);ma(co);var mo=new Array(p0);ma(mo);var vo=new Array(c0-f0+1);ma(vo);var hh=new Array(oh);ma(hh);var ys=new Array(ua);ma(ys);function jl(t,n,e,r,i){this.static_tree=t,this.extra_bits=n,this.extra_base=e,this.elems=r,this.max_length=i,this.has_stree=t&&t.length}var Rc,Mc,jc;function Bl(t,n){this.dyn_tree=t,this.max_code=0,this.stat_desc=n}var Bc=t=>t<256?mo[t]:mo[256+(t>>>7)],bo=(t,n)=>{t.pending_buf[t.pending++]=n&255,t.pending_buf[t.pending++]=n>>>8&255},In=(t,n,e)=>{t.bi_valid>Ml-e?(t.bi_buf|=n<<t.bi_valid&65535,bo(t,t.bi_buf),t.bi_buf=n>>Ml-t.bi_valid,t.bi_valid+=e-Ml):(t.bi_buf|=n<<t.bi_valid&65535,t.bi_valid+=e)},Ar=(t,n,e)=>{In(t,e[n*2],e[n*2+1])},zc=(t,n)=>{let e=0;do e|=t&1,t>>>=1,e<<=1;while(--n>0);return e>>>1},g0=t=>{t.bi_valid===16?(bo(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=t.bi_buf&255,t.bi_buf>>=8,t.bi_valid-=8)},m0=(t,n)=>{let e=n.dyn_tree,r=n.max_code,i=n.stat_desc.static_tree,a=n.stat_desc.has_stree,h=n.stat_desc.extra_bits,l=n.stat_desc.extra_base,f=n.stat_desc.max_length,u,g,y,x,p,F,P=0;for(x=0;x<=Bi;x++)t.bl_count[x]=0;for(e[t.heap[t.heap_max]*2+1]=0,u=t.heap_max+1;u<Ec;u++)g=t.heap[u],x=e[e[g*2+1]*2+1]+1,x>f&&(x=f,P++),e[g*2+1]=x,!(g>r)&&(t.bl_count[x]++,p=0,g>=l&&(p=h[g-l]),F=e[g*2],t.opt_len+=F*(x+p),a&&(t.static_len+=F*(i[g*2+1]+p)));if(P!==0){do{for(x=f-1;t.bl_count[x]===0;)x--;t.bl_count[x]--,t.bl_count[x+1]+=2,t.bl_count[f]--,P-=2}while(P>0);for(x=f;x!==0;x--)for(g=t.bl_count[x];g!==0;)y=t.heap[--u],!(y>r)&&(e[y*2+1]!==x&&(t.opt_len+=(x-e[y*2+1])*e[y*2],e[y*2+1]=x),g--)}},Uc=(t,n,e)=>{let r=new Array(Bi+1),i=0,a,h;for(a=1;a<=Bi;a++)i=i+e[a-1]<<1,r[a]=i;for(h=0;h<=n;h++){let l=t[h*2+1];l!==0&&(t[h*2]=zc(r[l]++,l))}},v0=()=>{let t,n,e,r,i,a=new Array(Bi+1);for(e=0,r=0;r<oh-1;r++)for(hh[r]=e,t=0;t<1<<Xl[r];t++)vo[e++]=r;for(vo[e-1]=r,i=0,r=0;r<16;r++)for(ys[r]=i,t=0;t<1<<ws[r];t++)mo[i++]=r;for(i>>=7;r<ua;r++)for(ys[r]=i<<7,t=0;t<1<<ws[r]-7;t++)mo[256+i++]=r;for(n=0;n<=Bi;n++)a[n]=0;for(t=0;t<=143;)Kr[t*2+1]=8,t++,a[8]++;for(;t<=255;)Kr[t*2+1]=9,t++,a[9]++;for(;t<=279;)Kr[t*2+1]=7,t++,a[7]++;for(;t<=287;)Kr[t*2+1]=8,t++,a[8]++;for(Uc(Kr,go+1,a),t=0;t<ua;t++)co[t*2+1]=5,co[t*2]=zc(t,5);Rc=new jl(Kr,Xl,xo+1,go,Bi),Mc=new jl(co,ws,0,ua,Bi),jc=new jl(new Array(0),d0,0,sh,u0)},qc=t=>{let n;for(n=0;n<go;n++)t.dyn_ltree[n*2]=0;for(n=0;n<ua;n++)t.dyn_dtree[n*2]=0;for(n=0;n<sh;n++)t.bl_tree[n*2]=0;t.dyn_ltree[lh*2]=1,t.opt_len=t.static_len=0,t.sym_next=t.matches=0},Hc=t=>{t.bi_valid>8?bo(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0},Wf=(t,n,e,r)=>{let i=n*2,a=e*2;return t[i]<t[a]||t[i]===t[a]&&r[n]<=r[e]},zl=(t,n,e)=>{let r=t.heap[e],i=e<<1;for(;i<=t.heap_len&&(i<t.heap_len&&Wf(n,t.heap[i+1],t.heap[i],t.depth)&&i++,!Wf(n,r,t.heap[i],t.depth));)t.heap[e]=t.heap[i],e=i,i<<=1;t.heap[e]=r},Gf=(t,n,e)=>{let r,i,a=0,h,l;if(t.sym_next!==0)do r=t.pending_buf[t.sym_buf+a++]&255,r+=(t.pending_buf[t.sym_buf+a++]&255)<<8,i=t.pending_buf[t.sym_buf+a++],r===0?Ar(t,i,n):(h=vo[i],Ar(t,h+xo+1,n),l=Xl[h],l!==0&&(i-=hh[h],In(t,i,l)),r--,h=Bc(r),Ar(t,h,e),l=ws[h],l!==0&&(r-=ys[h],In(t,r,l)));while(a<t.sym_next);Ar(t,lh,n)},Jl=(t,n)=>{let e=n.dyn_tree,r=n.stat_desc.static_tree,i=n.stat_desc.has_stree,a=n.stat_desc.elems,h,l,f=-1,u;for(t.heap_len=0,t.heap_max=Ec,h=0;h<a;h++)e[h*2]!==0?(t.heap[++t.heap_len]=f=h,t.depth[h]=0):e[h*2+1]=0;for(;t.heap_len<2;)u=t.heap[++t.heap_len]=f<2?++f:0,e[u*2]=1,t.depth[u]=0,t.opt_len--,i&&(t.static_len-=r[u*2+1]);for(n.max_code=f,h=t.heap_len>>1;h>=1;h--)zl(t,e,h);u=a;do h=t.heap[1],t.heap[1]=t.heap[t.heap_len--],zl(t,e,1),l=t.heap[1],t.heap[--t.heap_max]=h,t.heap[--t.heap_max]=l,e[u*2]=e[h*2]+e[l*2],t.depth[u]=(t.depth[h]>=t.depth[l]?t.depth[h]:t.depth[l])+1,e[h*2+1]=e[l*2+1]=u,t.heap[1]=u++,zl(t,e,1);while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],m0(t,n),Uc(e,f,t.bl_count)},Vf=(t,n,e)=>{let r,i=-1,a,h=n[1],l=0,f=7,u=4;for(h===0&&(f=138,u=3),n[(e+1)*2+1]=65535,r=0;r<=e;r++)a=h,h=n[(r+1)*2+1],!(++l<f&&a===h)&&(l<u?t.bl_tree[a*2]+=l:a!==0?(a!==i&&t.bl_tree[a*2]++,t.bl_tree[Cc*2]++):l<=10?t.bl_tree[Oc*2]++:t.bl_tree[Tc*2]++,l=0,i=a,h===0?(f=138,u=3):a===h?(f=6,u=3):(f=7,u=4))},Zf=(t,n,e)=>{let r,i=-1,a,h=n[1],l=0,f=7,u=4;for(h===0&&(f=138,u=3),r=0;r<=e;r++)if(a=h,h=n[(r+1)*2+1],!(++l<f&&a===h)){if(l<u)do Ar(t,a,t.bl_tree);while(--l!==0);else a!==0?(a!==i&&(Ar(t,a,t.bl_tree),l--),Ar(t,Cc,t.bl_tree),In(t,l-3,2)):l<=10?(Ar(t,Oc,t.bl_tree),In(t,l-3,3)):(Ar(t,Tc,t.bl_tree),In(t,l-11,7));l=0,i=a,h===0?(f=138,u=3):a===h?(f=6,u=3):(f=7,u=4)}},b0=t=>{let n;for(Vf(t,t.dyn_ltree,t.l_desc.max_code),Vf(t,t.dyn_dtree,t.d_desc.max_code),Jl(t,t.bl_desc),n=sh-1;n>=3&&t.bl_tree[Dc[n]*2+1]===0;n--);return t.opt_len+=3*(n+1)+5+5+4,n},w0=(t,n,e,r)=>{let i;for(In(t,n-257,5),In(t,e-1,5),In(t,r-4,4),i=0;i<r;i++)In(t,t.bl_tree[Dc[i]*2+1],3);Zf(t,t.dyn_ltree,n-1),Zf(t,t.dyn_dtree,e-1)},y0=t=>{let n=4093624447,e;for(e=0;e<=31;e++,n>>>=1)if(n&1&&t.dyn_ltree[e*2]!==0)return 0;if(t.dyn_ltree[18]!==0||t.dyn_ltree[20]!==0||t.dyn_ltree[26]!==0)return 1;for(e=32;e<xo;e++)if(t.dyn_ltree[e*2]!==0)return 1;return 0},$f=!1,_0=t=>{$f||(v0(),$f=!0),t.l_desc=new Bl(t.dyn_ltree,Rc),t.d_desc=new Bl(t.dyn_dtree,Mc),t.bl_desc=new Bl(t.bl_tree,jc),t.bi_buf=0,t.bi_valid=0,qc(t)},Wc=(t,n,e,r)=>{In(t,(l0<<1)+(r?1:0),3),Hc(t),bo(t,e),bo(t,~e),e&&t.pending_buf.set(t.window.subarray(n,n+e),t.pending),t.pending+=e},x0=t=>{In(t,Fc<<1,3),Ar(t,lh,Kr),g0(t)},A0=(t,n,e,r)=>{let i,a,h=0;t.level>0?(t.strm.data_type===2&&(t.strm.data_type=y0(t)),Jl(t,t.l_desc),Jl(t,t.d_desc),h=b0(t),i=t.opt_len+3+7>>>3,a=t.static_len+3+7>>>3,a<=i&&(i=a)):i=a=e+5,e+4<=i&&n!==-1?Wc(t,n,e,r):t.strategy===4||a===i?(In(t,(Fc<<1)+(r?1:0),3),Gf(t,Kr,co)):(In(t,(h0<<1)+(r?1:0),3),w0(t,t.l_desc.max_code+1,t.d_desc.max_code+1,h+1),Gf(t,t.dyn_ltree,t.dyn_dtree)),qc(t),r&&Hc(t)},N0=(t,n,e)=>(t.pending_buf[t.sym_buf+t.sym_next++]=n,t.pending_buf[t.sym_buf+t.sym_next++]=n>>8,t.pending_buf[t.sym_buf+t.sym_next++]=e,n===0?t.dyn_ltree[e*2]++:(t.matches++,n--,t.dyn_ltree[(vo[e]+xo+1)*2]++,t.dyn_dtree[Bc(n)*2]++),t.sym_next===t.sym_end),L0=_0,S0=Wc,k0=A0,P0=N0,I0=x0,F0={_tr_init:L0,_tr_stored_block:S0,_tr_flush_block:k0,_tr_tally:P0,_tr_align:I0},E0=(t,n,e,r)=>{let i=t&65535|0,a=t>>>16&65535|0,h=0;for(;e!==0;){h=e>2e3?2e3:e,e-=h;do i=i+n[r++]|0,a=a+i|0;while(--h);i%=65521,a%=65521}return i|a<<16|0},wo=E0,C0=()=>{let t,n=[];for(var e=0;e<256;e++){t=e;for(var r=0;r<8;r++)t=t&1?3988292384^t>>>1:t>>>1;n[e]=t}return n},O0=new Uint32Array(C0()),T0=(t,n,e,r)=>{let i=O0,a=r+e;t^=-1;for(let h=r;h<a;h++)t=t>>>8^i[(t^n[h])&255];return t^-1},on=T0,qi={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},va={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8},{_tr_init:D0,_tr_stored_block:Ql,_tr_flush_block:R0,_tr_tally:gi,_tr_align:M0}=F0,{Z_NO_FLUSH:mi,Z_PARTIAL_FLUSH:j0,Z_FULL_FLUSH:B0,Z_FINISH:Xn,Z_BLOCK:Yf,Z_OK:pn,Z_STREAM_END:Kf,Z_STREAM_ERROR:Nr,Z_DATA_ERROR:z0,Z_BUF_ERROR:Ul,Z_DEFAULT_COMPRESSION:U0,Z_FILTERED:q0,Z_HUFFMAN_ONLY:ps,Z_RLE:H0,Z_FIXED:W0,Z_DEFAULT_STRATEGY:G0,Z_UNKNOWN:V0,Z_DEFLATED:As}=va,Z0=9,$0=15,Y0=8,K0=29,X0=256,th=X0+1+K0,J0=30,Q0=19,t2=2*th+1,e2=15,ve=3,pi=258,Lr=pi+ve+1,n2=32,pa=42,fh=57,eh=69,nh=73,rh=91,ih=103,zi=113,ho=666,Ln=1,ba=2,Hi=3,wa=4,r2=3,Ui=(t,n)=>(t.msg=qi[n],n),Xf=t=>t*2-(t>4?9:0),di=t=>{let n=t.length;for(;--n>=0;)t[n]=0},i2=t=>{let n,e,r,i=t.w_size;n=t.hash_size,r=n;do e=t.head[--r],t.head[r]=e>=i?e-i:0;while(--n);n=i,r=n;do e=t.prev[--r],t.prev[r]=e>=i?e-i:0;while(--n)},ch=(t,n,e)=>(n<<t.hash_shift^e)&t.hash_mask,Wi=(t,n)=>{let e;if(t.legacy_hash)e=t.ins_h=ch(t,t.ins_h,t.window[n+ve-1]);else{let i=t.window,a=i[n]|i[n+1]<<8|i[n+2]<<16|i[n+3]<<24;e=t.ins_h=Math.imul(a,66521)+66521>>>16&t.hash_mask}let r=t.prev[n&t.w_mask]=t.head[e];return t.head[e]=n,r},zn=t=>{let n=t.state,e=n.pending;e>t.avail_out&&(e=t.avail_out),e!==0&&(t.output.set(n.pending_buf.subarray(n.pending_out,n.pending_out+e),t.next_out),t.next_out+=e,n.pending_out+=e,t.total_out+=e,t.avail_out-=e,n.pending-=e,n.pending===0&&(n.pending_out=0))},Un=(t,n)=>{R0(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,n),t.block_start=t.strstart,zn(t.strm)},we=(t,n)=>{t.pending_buf[t.pending++]=n},lo=(t,n)=>{t.pending_buf[t.pending++]=n>>>8&255,t.pending_buf[t.pending++]=n&255},ah=(t,n,e,r)=>{let i=t.avail_in;return i>r&&(i=r),i===0?0:(t.avail_in-=i,n.set(t.input.subarray(t.next_in,t.next_in+i),e),t.state.wrap===1?t.adler=wo(t.adler,n,i,e):t.state.wrap===2&&(t.adler=on(t.adler,n,i,e)),t.next_in+=i,t.total_in+=i,i)},Gc=(t,n)=>{let e=t.max_chain_length,r=t.strstart,i,a,h=t.prev_length,l=t.nice_match,f=t.strstart>t.w_size-Lr?t.strstart-(t.w_size-Lr):0,u=t.window,g=t.w_mask,y=t.prev,x=t.strstart+pi,p=u[r+h-1],F=u[r+h];t.prev_length>=t.good_match&&(e>>=2),l>t.lookahead&&(l=t.lookahead);do if(i=n,!(u[i+h]!==F||u[i+h-1]!==p||u[i]!==u[r]||u[++i]!==u[r+1])){r+=2,i++;do;while(u[++r]===u[++i]&&u[++r]===u[++i]&&u[++r]===u[++i]&&u[++r]===u[++i]&&u[++r]===u[++i]&&u[++r]===u[++i]&&u[++r]===u[++i]&&u[++r]===u[++i]&&r<x);if(a=pi-(x-r),r=x-pi,a>h){if(t.match_start=n,h=a,a>=l)break;p=u[r+h-1],F=u[r+h]}}while((n=y[n&g])>f&&--e!==0);return h<=t.lookahead?h:t.lookahead},ga=t=>{let n=t.w_size,e,r,i;do{if(r=t.window_size-t.lookahead-t.strstart,t.strstart>=n+(n-Lr)&&(t.window.set(t.window.subarray(n,n+n-r),0),t.match_start-=n,t.strstart-=n,t.block_start-=n,t.insert>t.strstart&&(t.insert=t.strstart),i2(t),r+=n),t.strm.avail_in===0)break;if(e=ah(t.strm,t.window,t.strstart+t.lookahead,r),t.lookahead+=e,t.legacy_hash){if(t.lookahead+t.insert>=ve)for(i=t.strstart-t.insert,t.ins_h=t.window[i],t.ins_h=ch(t,t.ins_h,t.window[i+1]);t.insert&&(Wi(t,i),i++,t.insert--,!(t.lookahead+t.insert<ve)););}else if(t.lookahead+t.insert>ve)for(i=t.strstart-t.insert;t.insert&&(Wi(t,i),i++,t.insert--,!(t.lookahead+t.insert<=ve)););}while(t.lookahead<Lr&&t.strm.avail_in!==0)},Vc=(t,n)=>{let e=t.pending_buf_size-5>t.w_size?t.w_size:t.pending_buf_size-5,r,i,a,h=0,l=t.strm.avail_in;do{if(r=65535,a=t.bi_valid+42>>3,t.strm.avail_out<a||(a=t.strm.avail_out-a,i=t.strstart-t.block_start,r>i+t.strm.avail_in&&(r=i+t.strm.avail_in),r>a&&(r=a),r<e&&(r===0&&n!==Xn||n===mi||r!==i+t.strm.avail_in)))break;h=n===Xn&&r===i+t.strm.avail_in?1:0,Ql(t,0,0,h),t.pending_buf[t.pending-4]=r,t.pending_buf[t.pending-3]=r>>8,t.pending_buf[t.pending-2]=~r,t.pending_buf[t.pending-1]=~r>>8,zn(t.strm),i&&(i>r&&(i=r),t.strm.output.set(t.window.subarray(t.block_start,t.block_start+i),t.strm.next_out),t.strm.next_out+=i,t.strm.avail_out-=i,t.strm.total_out+=i,t.block_start+=i,r-=i),r&&(ah(t.strm,t.strm.output,t.strm.next_out,r),t.strm.next_out+=r,t.strm.avail_out-=r,t.strm.total_out+=r)}while(h===0);return l-=t.strm.avail_in,l&&(l>=t.w_size?(t.matches=2,t.window.set(t.strm.input.subarray(t.strm.next_in-t.w_size,t.strm.next_in),0),t.strstart=t.w_size,t.insert=t.strstart):(t.window_size-t.strstart<=l&&(t.strstart-=t.w_size,t.window.set(t.window.subarray(t.w_size,t.w_size+t.strstart),0),t.matches<2&&t.matches++,t.insert>t.strstart&&(t.insert=t.strstart)),t.window.set(t.strm.input.subarray(t.strm.next_in-l,t.strm.next_in),t.strstart),t.strstart+=l,t.insert+=l>t.w_size-t.insert?t.w_size-t.insert:l),t.block_start=t.strstart),t.high_water<t.strstart&&(t.high_water=t.strstart),h?wa:n!==mi&&n!==Xn&&t.strm.avail_in===0&&t.strstart===t.block_start?ba:(a=t.window_size-t.strstart,t.strm.avail_in>a&&t.block_start>=t.w_size&&(t.block_start-=t.w_size,t.strstart-=t.w_size,t.window.set(t.window.subarray(t.w_size,t.w_size+t.strstart),0),t.matches<2&&t.matches++,a+=t.w_size,t.insert>t.strstart&&(t.insert=t.strstart)),a>t.strm.avail_in&&(a=t.strm.avail_in),a&&(ah(t.strm,t.window,t.strstart,a),t.strstart+=a,t.insert+=a>t.w_size-t.insert?t.w_size-t.insert:a),t.high_water<t.strstart&&(t.high_water=t.strstart),a=t.bi_valid+42>>3,a=t.pending_buf_size-a>65535?65535:t.pending_buf_size-a,e=a>t.w_size?t.w_size:a,i=t.strstart-t.block_start,(i>=e||(i||n===Xn)&&n!==mi&&t.strm.avail_in===0&&i<=a)&&(r=i>a?a:i,h=n===Xn&&t.strm.avail_in===0&&r===i?1:0,Ql(t,t.block_start,r,h),t.block_start+=r,zn(t.strm)),h?Hi:Ln)},ql=(t,n)=>{let e,r;for(;;){if(t.lookahead<Lr){if(ga(t),t.lookahead<Lr&&n===mi)return Ln;if(t.lookahead===0)break}if(e=0,t.lookahead>=ve&&(e=Wi(t,t.strstart)),e!==0&&t.strstart-e<=t.w_size-Lr&&(t.match_length=Gc(t,e)),t.match_length>=ve)if(r=gi(t,t.strstart-t.match_start,t.match_length-ve),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=ve){t.match_length--;do t.strstart++,e=Wi(t,t.strstart);while(--t.match_length!==0);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.legacy_hash&&(t.ins_h=t.window[t.strstart],t.ins_h=ch(t,t.ins_h,t.window[t.strstart+1]));else r=gi(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(r&&(Un(t,!1),t.strm.avail_out===0))return Ln}return t.insert=t.strstart<ve-1?t.strstart:ve-1,n===Xn?(Un(t,!0),t.strm.avail_out===0?Hi:wa):t.sym_next&&(Un(t,!1),t.strm.avail_out===0)?Ln:ba},fa=(t,n)=>{let e,r,i;for(;;){if(t.lookahead<Lr){if(ga(t),t.lookahead<Lr&&n===mi)return Ln;if(t.lookahead===0)break}if(e=0,t.lookahead>=ve&&(e=Wi(t,t.strstart)),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=ve-1,e!==0&&t.prev_length<t.max_lazy_match&&t.strstart-e<=t.w_size-Lr&&(t.match_length=Gc(t,e),t.match_length<=5&&(t.strategy===q0||t.match_length===ve&&t.strstart-t.match_start>4096)&&(t.match_length=ve-1)),t.prev_length>=ve&&t.match_length<=t.prev_length){i=t.strstart+t.lookahead-ve,r=gi(t,t.strstart-1-t.prev_match,t.prev_length-ve),t.lookahead-=t.prev_length-1,t.prev_length-=2;do++t.strstart<=i&&(e=Wi(t,t.strstart));while(--t.prev_length!==0);if(t.match_available=0,t.match_length=ve-1,t.strstart++,r&&(Un(t,!1),t.strm.avail_out===0))return Ln}else if(t.match_available){if(r=gi(t,0,t.window[t.strstart-1]),r&&Un(t,!1),t.strstart++,t.lookahead--,t.strm.avail_out===0)return Ln}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(r=gi(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<ve-1?t.strstart:ve-1,n===Xn?(Un(t,!0),t.strm.avail_out===0?Hi:wa):t.sym_next&&(Un(t,!1),t.strm.avail_out===0)?Ln:ba},a2=(t,n)=>{let e,r,i,a,h=t.window;for(;;){if(t.lookahead<=pi){if(ga(t),t.lookahead<=pi&&n===mi)return Ln;if(t.lookahead===0)break}if(t.match_length=0,t.lookahead>=ve&&t.strstart>0&&(i=t.strstart-1,r=h[i],r===h[++i]&&r===h[++i]&&r===h[++i])){a=t.strstart+pi;do;while(r===h[++i]&&r===h[++i]&&r===h[++i]&&r===h[++i]&&r===h[++i]&&r===h[++i]&&r===h[++i]&&r===h[++i]&&i<a);t.match_length=pi-(a-i),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=ve?(e=gi(t,1,t.match_length-ve),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(e=gi(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),e&&(Un(t,!1),t.strm.avail_out===0))return Ln}return t.insert=0,n===Xn?(Un(t,!0),t.strm.avail_out===0?Hi:wa):t.sym_next&&(Un(t,!1),t.strm.avail_out===0)?Ln:ba},o2=(t,n)=>{let e;for(;;){if(t.lookahead===0&&(ga(t),t.lookahead===0)){if(n===mi)return Ln;break}if(t.match_length=0,e=gi(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,e&&(Un(t,!1),t.strm.avail_out===0))return Ln}return t.insert=0,n===Xn?(Un(t,!0),t.strm.avail_out===0?Hi:wa):t.sym_next&&(Un(t,!1),t.strm.avail_out===0)?Ln:ba};function _r(t,n,e,r,i){this.good_length=t,this.max_lazy=n,this.nice_length=e,this.max_chain=r,this.func=i}var fo=[new _r(0,0,0,0,Vc),new _r(4,4,8,4,ql),new _r(4,5,16,8,ql),new _r(4,6,32,32,ql),new _r(4,4,16,16,fa),new _r(8,16,32,32,fa),new _r(8,16,128,128,fa),new _r(8,32,128,256,fa),new _r(32,128,258,1024,fa),new _r(32,258,258,4096,fa)],s2=t=>{t.window_size=2*t.w_size,di(t.head),t.max_lazy_match=fo[t.level].max_lazy,t.good_match=fo[t.level].good_length,t.nice_match=fo[t.level].nice_length,t.max_chain_length=fo[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=ve-1,t.match_available=0,t.ins_h=0};function l2(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=As,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.legacy_hash=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(t2*2),this.dyn_dtree=new Uint16Array((2*J0+1)*2),this.bl_tree=new Uint16Array((2*Q0+1)*2),di(this.dyn_ltree),di(this.dyn_dtree),di(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(e2+1),this.heap=new Uint16Array(2*th+1),di(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(2*th+1),di(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}var Ao=t=>{if(!t)return 1;let n=t.state;return!n||n.strm!==t||n.status!==pa&&n.status!==fh&&n.status!==eh&&n.status!==nh&&n.status!==rh&&n.status!==ih&&n.status!==zi&&n.status!==ho?1:0},Zc=t=>{if(Ao(t))return Ui(t,Nr);t.total_in=t.total_out=0,t.data_type=V0;let n=t.state;return n.pending=0,n.pending_out=0,n.wrap<0&&(n.wrap=-n.wrap),n.status=n.wrap===2?fh:n.wrap?pa:zi,t.adler=n.wrap===2?0:1,n.last_flush=-2,D0(n),pn},$c=t=>{let n=Zc(t);return n===pn&&s2(t.state),n},h2=(t,n)=>Ao(t)||t.state.wrap!==2?Nr:(t.state.gzhead=n,pn),Yc=(t,n,e,r,i,a,h)=>{if(!t)return Nr;let l=1;if(n===U0&&(n=6),r<0?(l=0,r=-r):r>15&&(l=2,r-=16),i<1||i>Z0||e!==As||r<8||r>15||n<0||n>9||a<0||a>W0||r===8&&l!==1)return Ui(t,Nr);r===8&&(r=9);let f=new l2;return t.state=f,f.strm=t,f.status=pa,f.wrap=l,f.gzhead=null,f.w_bits=r,f.w_size=1<<f.w_bits,f.w_mask=f.w_size-1,f.legacy_hash=h?1:0,f.hash_bits=i+7,!f.legacy_hash&&f.hash_bits<15&&(f.hash_bits=15),f.hash_size=1<<f.hash_bits,f.hash_mask=f.hash_size-1,f.hash_shift=~~((f.hash_bits+ve-1)/ve),f.window=new Uint8Array(f.w_size*2),f.head=new Uint16Array(f.hash_size),f.prev=new Uint16Array(f.w_size),f.lit_bufsize=1<<i+6,f.pending_buf_size=f.lit_bufsize*4,f.pending_buf=new Uint8Array(f.pending_buf_size),f.sym_buf=f.lit_bufsize,f.sym_end=(f.lit_bufsize-1)*3,f.level=n,f.strategy=a,f.method=e,$c(t)},f2=(t,n)=>Yc(t,n,As,$0,Y0,G0),c2=(t,n)=>{if(Ao(t)||n>Yf||n<0)return t?Ui(t,Nr):Nr;let e=t.state;if(!t.output||t.avail_in!==0&&!t.input||e.status===ho&&n!==Xn)return Ui(t,t.avail_out===0?Ul:Nr);let r=e.last_flush;if(e.last_flush=n,e.pending!==0){if(zn(t),t.avail_out===0)return e.last_flush=-1,pn}else if(t.avail_in===0&&Xf(n)<=Xf(r)&&n!==Xn)return Ui(t,Ul);if(e.status===ho&&t.avail_in!==0)return Ui(t,Ul);if(e.status===pa&&e.wrap===0&&(e.status=zi),e.status===pa){let i=As+(e.w_bits-8<<4)<<8,a=-1;if(e.strategy>=ps||e.level<2?a=0:e.level<6?a=1:e.level===6?a=2:a=3,i|=a<<6,e.strstart!==0&&(i|=n2),i+=31-i%31,lo(e,i),e.strstart!==0&&(lo(e,t.adler>>>16),lo(e,t.adler&65535)),t.adler=1,e.status=zi,zn(t),e.pending!==0)return e.last_flush=-1,pn}if(e.status===fh){if(t.adler=0,we(e,31),we(e,139),we(e,8),e.gzhead)we(e,(e.gzhead.text?1:0)+(e.gzhead.hcrc?2:0)+(e.gzhead.extra?4:0)+(e.gzhead.name?8:0)+(e.gzhead.comment?16:0)),we(e,e.gzhead.time&255),we(e,e.gzhead.time>>8&255),we(e,e.gzhead.time>>16&255),we(e,e.gzhead.time>>24&255),we(e,e.level===9?2:e.strategy>=ps||e.level<2?4:0),we(e,e.gzhead.os&255),e.gzhead.extra&&e.gzhead.extra.length&&(we(e,e.gzhead.extra.length&255),we(e,e.gzhead.extra.length>>8&255)),e.gzhead.hcrc&&(t.adler=on(t.adler,e.pending_buf,e.pending,0)),e.gzindex=0,e.status=eh;else if(we(e,0),we(e,0),we(e,0),we(e,0),we(e,0),we(e,e.level===9?2:e.strategy>=ps||e.level<2?4:0),we(e,r2),e.status=zi,zn(t),e.pending!==0)return e.last_flush=-1,pn}if(e.status===eh){if(e.gzhead.extra){let i=e.pending,a=(e.gzhead.extra.length&65535)-e.gzindex;for(;e.pending+a>e.pending_buf_size;){let l=e.pending_buf_size-e.pending;if(e.pending_buf.set(e.gzhead.extra.subarray(e.gzindex,e.gzindex+l),e.pending),e.pending=e.pending_buf_size,e.gzhead.hcrc&&e.pending>i&&(t.adler=on(t.adler,e.pending_buf,e.pending-i,i)),e.gzindex+=l,zn(t),e.pending!==0)return e.last_flush=-1,pn;i=0,a-=l}let h=new Uint8Array(e.gzhead.extra);e.pending_buf.set(h.subarray(e.gzindex,e.gzindex+a),e.pending),e.pending+=a,e.gzhead.hcrc&&e.pending>i&&(t.adler=on(t.adler,e.pending_buf,e.pending-i,i)),e.gzindex=0}e.status=nh}if(e.status===nh){if(e.gzhead.name){let i=e.pending,a;do{if(e.pending===e.pending_buf_size){if(e.gzhead.hcrc&&e.pending>i&&(t.adler=on(t.adler,e.pending_buf,e.pending-i,i)),zn(t),e.pending!==0)return e.last_flush=-1,pn;i=0}e.gzindex<e.gzhead.name.length?a=e.gzhead.name.charCodeAt(e.gzindex++)&255:a=0,we(e,a)}while(a!==0);e.gzhead.hcrc&&e.pending>i&&(t.adler=on(t.adler,e.pending_buf,e.pending-i,i)),e.gzindex=0}e.status=rh}if(e.status===rh){if(e.gzhead.comment){let i=e.pending,a;do{if(e.pending===e.pending_buf_size){if(e.gzhead.hcrc&&e.pending>i&&(t.adler=on(t.adler,e.pending_buf,e.pending-i,i)),zn(t),e.pending!==0)return e.last_flush=-1,pn;i=0}e.gzindex<e.gzhead.comment.length?a=e.gzhead.comment.charCodeAt(e.gzindex++)&255:a=0,we(e,a)}while(a!==0);e.gzhead.hcrc&&e.pending>i&&(t.adler=on(t.adler,e.pending_buf,e.pending-i,i))}e.status=ih}if(e.status===ih){if(e.gzhead.hcrc){if(e.pending+2>e.pending_buf_size&&(zn(t),e.pending!==0))return e.last_flush=-1,pn;we(e,t.adler&255),we(e,t.adler>>8&255),t.adler=0}if(e.status=zi,zn(t),e.pending!==0)return e.last_flush=-1,pn}if(t.avail_in!==0||e.lookahead!==0||n!==mi&&e.status!==ho){let i=e.level===0?Vc(e,n):e.strategy===ps?o2(e,n):e.strategy===H0?a2(e,n):fo[e.level].func(e,n);if((i===Hi||i===wa)&&(e.status=ho),i===Ln||i===Hi)return t.avail_out===0&&(e.last_flush=-1),pn;if(i===ba&&(n===j0?M0(e):n!==Yf&&(Ql(e,0,0,!1),n===B0&&(di(e.head),e.lookahead===0&&(e.strstart=0,e.block_start=0,e.insert=0))),zn(t),t.avail_out===0))return e.last_flush=-1,pn}return n!==Xn?pn:e.wrap<=0?Kf:(e.wrap===2?(we(e,t.adler&255),we(e,t.adler>>8&255),we(e,t.adler>>16&255),we(e,t.adler>>24&255),we(e,t.total_in&255),we(e,t.total_in>>8&255),we(e,t.total_in>>16&255),we(e,t.total_in>>24&255)):(lo(e,t.adler>>>16),lo(e,t.adler&65535)),zn(t),e.wrap>0&&(e.wrap=-e.wrap),e.pending!==0?pn:Kf)},u2=t=>{if(Ao(t))return Nr;let n=t.state.status;return t.state=null,n===zi?Ui(t,z0):pn},d2=(t,n)=>{let e=n.length;if(Ao(t))return Nr;let r=t.state,i=r.wrap;if(i===2||i===1&&r.status!==pa||r.lookahead)return Nr;if(i===1&&(t.adler=wo(t.adler,n,e,0)),r.wrap=0,e>=r.w_size){i===0&&(di(r.head),r.strstart=0,r.block_start=0,r.insert=0);let f=new Uint8Array(r.w_size);f.set(n.subarray(e-r.w_size,e),0),n=f,e=r.w_size}let a=t.avail_in,h=t.next_in,l=t.input;for(t.avail_in=e,t.next_in=0,t.input=n,ga(r);r.lookahead>=ve;){let f=r.strstart,u=r.lookahead-(ve-1);do Wi(r,f),f++;while(--u);r.strstart=f,r.lookahead=ve-1,ga(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=ve-1,r.match_available=0,t.next_in=h,t.input=l,t.avail_in=a,r.wrap=i,pn},p2=f2,g2=Yc,m2=$c,v2=Zc,b2=h2,w2=c2,y2=u2,_2=d2,x2="pako deflate (from Nodeca project)",uo={deflateInit:p2,deflateInit2:g2,deflateReset:m2,deflateResetKeep:v2,deflateSetHeader:b2,deflate:w2,deflateEnd:y2,deflateSetDictionary:_2,deflateInfo:x2},A2=(t,n)=>Object.prototype.hasOwnProperty.call(t,n),N2=function(t){let n=Array.prototype.slice.call(arguments,1);for(;n.length;){let e=n.shift();if(e){if(typeof e!="object")throw new TypeError(e+"must be non-object");for(let r in e)A2(e,r)&&(t[r]=e[r])}}return t},L2=t=>{let n=0;for(let r=0,i=t.length;r<i;r++)n+=t[r].length;let e=new Uint8Array(n);for(let r=0,i=0,a=t.length;r<a;r++){let h=t[r];e.set(h,i),i+=h.length}return e},Ns={assign:N2,flattenChunks:L2},Kc=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{Kc=!1}var yo=new Uint8Array(256);for(let t=0;t<256;t++)yo[t]=t>=252?6:t>=248?5:t>=240?4:t>=224?3:t>=192?2:1;yo[254]=yo[255]=1;var S2=t=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(t);let n,e,r,i,a,h=t.length,l=0;for(i=0;i<h;i++)e=t.charCodeAt(i),(e&64512)===55296&&i+1<h&&(r=t.charCodeAt(i+1),(r&64512)===56320&&(e=65536+(e-55296<<10)+(r-56320),i++)),l+=e<128?1:e<2048?2:e<65536?3:4;for(n=new Uint8Array(l),a=0,i=0;a<l;i++)e=t.charCodeAt(i),(e&64512)===55296&&i+1<h&&(r=t.charCodeAt(i+1),(r&64512)===56320&&(e=65536+(e-55296<<10)+(r-56320),i++)),e<128?n[a++]=e:e<2048?(n[a++]=192|e>>>6,n[a++]=128|e&63):e<65536?(n[a++]=224|e>>>12,n[a++]=128|e>>>6&63,n[a++]=128|e&63):(n[a++]=240|e>>>18,n[a++]=128|e>>>12&63,n[a++]=128|e>>>6&63,n[a++]=128|e&63);return n},k2=(t,n)=>{if(n<65534&&t.subarray&&Kc)return String.fromCharCode.apply(null,t.length===n?t:t.subarray(0,n));let e="";for(let r=0;r<n;r++)e+=String.fromCharCode(t[r]);return e},P2=(t,n)=>{let e=n||t.length;if(typeof TextDecoder=="function"&&TextDecoder.prototype.decode)return new TextDecoder().decode(t.subarray(0,n));let r,i,a=new Array(e*2);for(i=0,r=0;r<e;){let h=t[r++];if(h<128){a[i++]=h;continue}let l=yo[h];if(l>4){a[i++]=65533,r+=l-1;continue}for(h&=l===2?31:l===3?15:7;l>1&&r<e;)h=h<<6|t[r++]&63,l--;if(l>1){a[i++]=65533;continue}h<65536?a[i++]=h:(h-=65536,a[i++]=55296|h>>10&1023,a[i++]=56320|h&1023)}return k2(a,i)},I2=(t,n)=>{n=n||t.length,n>t.length&&(n=t.length);let e=n-1;for(;e>=0&&(t[e]&192)===128;)e--;return e<0||e===0?n:e+yo[t[e]]>n?e:n},_o={string2buf:S2,buf2string:P2,utf8border:I2};function F2(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}var Xc=F2,Jc=Object.prototype.toString,{Z_NO_FLUSH:E2,Z_SYNC_FLUSH:C2,Z_FULL_FLUSH:O2,Z_FINISH:T2,Z_OK:_s,Z_STREAM_END:D2,Z_DEFAULT_COMPRESSION:R2,Z_DEFAULT_STRATEGY:M2,Z_DEFLATED:j2}=va,B2={level:R2,method:j2,chunkSize:16384,windowBits:15,memLevel:8,strategy:M2,legacyHash:!0};function No(t){this.options=Ns.assign({},B2,t||{});let n=this.options;n.raw&&n.windowBits>0?n.windowBits=-n.windowBits:n.gzip&&n.windowBits>0&&n.windowBits<16&&(n.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Xc,this.strm.avail_out=0;let e=uo.deflateInit2(this.strm,n.level,n.method,n.windowBits,n.memLevel,n.strategy,n.legacyHash);if(e!==_s)throw new Error(qi[e]);if(n.header&&uo.deflateSetHeader(this.strm,n.header),n.dictionary){let r;if(typeof n.dictionary=="string"?r=_o.string2buf(n.dictionary):Jc.call(n.dictionary)==="[object ArrayBuffer]"?r=new Uint8Array(n.dictionary):r=n.dictionary,e=uo.deflateSetDictionary(this.strm,r),e!==_s)throw new Error(qi[e]);this._dict_set=!0}}No.prototype.push=function(t,n){let e=this.strm,r=this.options.chunkSize,i,a;if(this.ended)return!1;for(n===~~n?a=n:a=n===!0?T2:E2,typeof t=="string"?e.input=_o.string2buf(t):Jc.call(t)==="[object ArrayBuffer]"?e.input=new Uint8Array(t):e.input=t,e.next_in=0,e.avail_in=e.input.length;;){if(e.avail_out===0&&(e.output=new Uint8Array(r),e.next_out=0,e.avail_out=r),(a===C2||a===O2)&&e.avail_out<=6){this.onData(e.output.subarray(0,e.next_out)),e.avail_out=0;continue}if(i=uo.deflate(e,a),i===D2)return e.next_out>0&&this.onData(e.output.subarray(0,e.next_out)),i=uo.deflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===_s;if(e.avail_out===0){this.onData(e.output);continue}if(a>0&&e.next_out>0){this.onData(e.output.subarray(0,e.next_out)),e.avail_out=0;continue}if(e.avail_in===0)break}return!0};No.prototype.onData=function(t){this.chunks.push(t)};No.prototype.onEnd=function(t){t===_s&&(this.result=Ns.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};function uh(t,n){let e=new No(n);if(e.push(t,!0),e.err)throw e.msg||qi[e.err];return e.result}function z2(t,n){return n=n||{},n.raw=!0,uh(t,n)}function U2(t,n){return n=n||{},n.gzip=!0,uh(t,n)}var q2=No,H2=uh,W2=z2,G2=U2,V2=va,Z2={Deflate:q2,deflate:H2,deflateRaw:W2,gzip:G2,constants:V2},gs=16209,$2=16191,Y2=function(n,e){let r,i,a,h,l,f,u,g,y,x,p,F,P,D,N,H,q,M,rt,mt,ct,Y,j,tt,S=n.state;r=n.next_in,j=n.input,i=r+(n.avail_in-5),a=n.next_out,tt=n.output,h=a-(e-n.avail_out),l=a+(n.avail_out-257),f=S.dmax,u=S.wsize,g=S.whave,y=S.wnext,x=S.window,p=S.hold,F=S.bits,P=S.lencode,D=S.distcode,N=(1<<S.lenbits)-1,H=(1<<S.distbits)-1;t:do{F<15&&(p+=j[r++]<<F,F+=8,p+=j[r++]<<F,F+=8),q=P[p&N];e:for(;;){if(M=q>>>24,p>>>=M,F-=M,M=q>>>16&255,M===0)tt[a++]=q&65535;else if(M&16){rt=q&65535,M&=15,M&&(F<M&&(p+=j[r++]<<F,F+=8),rt+=p&(1<<M)-1,p>>>=M,F-=M),F<15&&(p+=j[r++]<<F,F+=8,p+=j[r++]<<F,F+=8),q=D[p&H];n:for(;;){if(M=q>>>24,p>>>=M,F-=M,M=q>>>16&255,M&16){if(mt=q&65535,M&=15,F<M&&(p+=j[r++]<<F,F+=8,F<M&&(p+=j[r++]<<F,F+=8)),mt+=p&(1<<M)-1,mt>f){n.msg="invalid distance too far back",S.mode=gs;break t}if(p>>>=M,F-=M,M=a-h,mt>M){if(M=mt-M,M>g&&S.sane){n.msg="invalid distance too far back",S.mode=gs;break t}if(ct=0,Y=x,y===0){if(ct+=u-M,M<rt){rt-=M;do tt[a++]=x[ct++];while(--M);ct=a-mt,Y=tt}}else if(y<M){if(ct+=u+y-M,M-=y,M<rt){rt-=M;do tt[a++]=x[ct++];while(--M);if(ct=0,y<rt){M=y,rt-=M;do tt[a++]=x[ct++];while(--M);ct=a-mt,Y=tt}}}else if(ct+=y-M,M<rt){rt-=M;do tt[a++]=x[ct++];while(--M);ct=a-mt,Y=tt}for(;rt>2;)tt[a++]=Y[ct++],tt[a++]=Y[ct++],tt[a++]=Y[ct++],rt-=3;rt&&(tt[a++]=Y[ct++],rt>1&&(tt[a++]=Y[ct++]))}else{ct=a-mt;do tt[a++]=tt[ct++],tt[a++]=tt[ct++],tt[a++]=tt[ct++],rt-=3;while(rt>2);rt&&(tt[a++]=tt[ct++],rt>1&&(tt[a++]=tt[ct++]))}}else if((M&64)===0){q=D[(q&65535)+(p&(1<<M)-1)];continue n}else{n.msg="invalid distance code",S.mode=gs;break t}break}}else if((M&64)===0){q=P[(q&65535)+(p&(1<<M)-1)];continue e}else if(M&32){S.mode=$2;break t}else{n.msg="invalid literal/length code",S.mode=gs;break t}break}}while(r<i&&a<l);rt=F>>3,r-=rt,F-=rt<<3,p&=(1<<F)-1,n.next_in=r,n.next_out=a,n.avail_in=r<i?5+(i-r):5-(r-i),n.avail_out=a<l?257+(l-a):257-(a-l),S.hold=p,S.bits=F},ca=15,Jf=852,Qf=592,tc=0,Hl=1,ec=2,K2=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),X2=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,199,75]),J2=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),Q2=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]),t5=(t,n,e,r,i,a,h,l)=>{let f=l.bits,u=0,g=0,y=0,x=0,p=0,F=0,P=0,D=0,N=0,H=0,q,M,rt,mt,ct,Y=null,j,tt=new Uint16Array(ca+1),S=new Uint16Array(ca+1),O=null,W,U,it;for(u=0;u<=ca;u++)tt[u]=0;for(g=0;g<r;g++)tt[n[e+g]]++;for(p=f,x=ca;x>=1&&tt[x]===0;x--);if(p>x&&(p=x),x===0)return i[a++]=1<<24|64<<16|0,i[a++]=1<<24|64<<16|0,l.bits=1,0;for(y=1;y<x&&tt[y]===0;y++);for(p<y&&(p=y),D=1,u=1;u<=ca;u++)if(D<<=1,D-=tt[u],D<0)return-1;if(D>0&&(t===tc||x!==1))return-1;for(S[1]=0,u=1;u<ca;u++)S[u+1]=S[u]+tt[u];for(g=0;g<r;g++)n[e+g]!==0&&(h[S[n[e+g]]++]=g);if(t===tc?(Y=O=h,j=20):t===Hl?(Y=K2,O=X2,j=257):(Y=J2,O=Q2,j=0),H=0,g=0,u=y,ct=a,F=p,P=0,rt=-1,N=1<<p,mt=N-1,t===Hl&&N>Jf||t===ec&&N>Qf)return 1;for(;;){W=u-P,h[g]+1<j?(U=0,it=h[g]):h[g]>=j?(U=O[h[g]-j],it=Y[h[g]-j]):(U=96,it=0),q=1<<u-P,M=1<<F,y=M;do M-=q,i[ct+(H>>P)+M]=W<<24|U<<16|it|0;while(M!==0);for(q=1<<u-1;H&q;)q>>=1;if(q!==0?(H&=q-1,H+=q):H=0,g++,--tt[u]===0){if(u===x)break;u=n[e+h[g]]}if(u>p&&(H&mt)!==rt){for(P===0&&(P=p),ct+=y,F=u-P,D=1<<F;F+P<x&&(D-=tt[F+P],!(D<=0));)F++,D<<=1;if(N+=1<<F,t===Hl&&N>Jf||t===ec&&N>Qf)return 1;rt=H&mt,i[rt]=p<<24|F<<16|ct-a|0}}return H!==0&&(i[ct+H]=u-P<<24|64<<16|0),l.bits=p,0},po=t5,e5=0,Qc=1,tu=2,{Z_FINISH:nc,Z_BLOCK:n5,Z_TREES:ms,Z_OK:Gi,Z_STREAM_END:r5,Z_NEED_DICT:i5,Z_STREAM_ERROR:Jn,Z_DATA_ERROR:eu,Z_MEM_ERROR:nu,Z_BUF_ERROR:a5,Z_DEFLATED:rc}=va,Ls=16180,ic=16181,ac=16182,oc=16183,sc=16184,lc=16185,hc=16186,fc=16187,cc=16188,uc=16189,xs=16190,Yr=16191,Wl=16192,dc=16193,Gl=16194,pc=16195,gc=16196,mc=16197,vc=16198,vs=16199,bs=16200,bc=16201,wc=16202,yc=16203,_c=16204,xc=16205,Vl=16206,Ac=16207,Nc=16208,De=16209,ru=16210,iu=16211,o5=852,s5=592,l5=15,h5=l5,Lc=t=>(t>>>24&255)+(t>>>8&65280)+((t&65280)<<8)+((t&255)<<24);function f5(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}var Vi=t=>{if(!t)return 1;let n=t.state;return!n||n.strm!==t||n.mode<Ls||n.mode>iu?1:0},au=t=>{if(Vi(t))return Jn;let n=t.state;return t.total_in=t.total_out=n.total=0,t.msg="",n.wrap&&(t.adler=n.wrap&1),n.mode=Ls,n.last=0,n.havedict=0,n.flags=-1,n.dmax=32768,n.head=null,n.hold=0,n.bits=0,n.lencode=n.lendyn=new Int32Array(o5),n.distcode=n.distdyn=new Int32Array(s5),n.sane=1,n.back=-1,Gi},ou=t=>{if(Vi(t))return Jn;let n=t.state;return n.wsize=0,n.whave=0,n.wnext=0,au(t)},su=(t,n)=>{let e;if(Vi(t))return Jn;let r=t.state;return n<0?(e=0,n=-n):(e=(n>>4)+5,n<48&&(n&=15)),n&&(n<8||n>15)?Jn:(r.window!==null&&r.wbits!==n&&(r.window=null),r.wrap=e,r.wbits=n,ou(t))},lu=(t,n)=>{if(!t)return Jn;let e=new f5;t.state=e,e.strm=t,e.window=null,e.mode=Ls;let r=su(t,n);return r!==Gi&&(t.state=null),r},c5=t=>lu(t,h5),Sc=!0,Zl,$l,u5=t=>{if(Sc){Zl=new Int32Array(512),$l=new Int32Array(32);let n=0;for(;n<144;)t.lens[n++]=8;for(;n<256;)t.lens[n++]=9;for(;n<280;)t.lens[n++]=7;for(;n<288;)t.lens[n++]=8;for(po(Qc,t.lens,0,288,Zl,0,t.work,{bits:9}),n=0;n<32;)t.lens[n++]=5;po(tu,t.lens,0,32,$l,0,t.work,{bits:5}),Sc=!1}t.lencode=Zl,t.lenbits=9,t.distcode=$l,t.distbits=5},hu=(t,n,e,r)=>{let i,a=t.state;return a.window===null&&(a.window=new Uint8Array(1<<a.wbits)),a.wsize===0&&(a.wsize=1<<a.wbits,a.wnext=0,a.whave=0),r>=a.wsize?(a.window.set(n.subarray(e-a.wsize,e),0),a.wnext=0,a.whave=a.wsize):(i=a.wsize-a.wnext,i>r&&(i=r),a.window.set(n.subarray(e-r,e-r+i),a.wnext),r-=i,r?(a.window.set(n.subarray(e-r,e),0),a.wnext=r,a.whave=a.wsize):(a.wnext+=i,a.wnext===a.wsize&&(a.wnext=0),a.whave<a.wsize&&(a.whave+=i))),0},d5=(t,n)=>{let e,r,i,a,h,l,f,u,g,y,x,p,F,P,D=0,N,H,q,M,rt,mt,ct,Y,j=new Uint8Array(4),tt,S,O=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(Vi(t)||!t.output||!t.input&&t.avail_in!==0)return Jn;e=t.state,e.mode===Yr&&(e.mode=Wl),h=t.next_out,i=t.output,f=t.avail_out,a=t.next_in,r=t.input,l=t.avail_in,u=e.hold,g=e.bits,y=l,x=f,Y=Gi;t:for(;;)switch(e.mode){case Ls:if(e.wrap===0){e.mode=Wl;break}for(;g<16;){if(l===0)break t;l--,u+=r[a++]<<g,g+=8}if(e.wrap&2&&u===35615){e.wbits===0&&(e.wbits=15),e.check=0,j[0]=u&255,j[1]=u>>>8&255,e.check=on(e.check,j,2,0),u=0,g=0,e.mode=ic;break}if(e.head&&(e.head.done=!1),!(e.wrap&1)||(((u&255)<<8)+(u>>8))%31){t.msg="incorrect header check",e.mode=De;break}if((u&15)!==rc){t.msg="unknown compression method",e.mode=De;break}if(u>>>=4,g-=4,ct=(u&15)+8,e.wbits===0&&(e.wbits=ct),ct>15||ct>e.wbits){t.msg="invalid window size",e.mode=De;break}e.dmax=1<<e.wbits,e.flags=0,t.adler=e.check=1,e.mode=u&512?uc:Yr,u=0,g=0;break;case ic:for(;g<16;){if(l===0)break t;l--,u+=r[a++]<<g,g+=8}if(e.flags=u,(e.flags&255)!==rc){t.msg="unknown compression method",e.mode=De;break}if(e.flags&57344){t.msg="unknown header flags set",e.mode=De;break}e.head&&(e.head.text=u>>8&1),e.flags&512&&e.wrap&4&&(j[0]=u&255,j[1]=u>>>8&255,e.check=on(e.check,j,2,0)),u=0,g=0,e.mode=ac;case ac:for(;g<32;){if(l===0)break t;l--,u+=r[a++]<<g,g+=8}e.head&&(e.head.time=u),e.flags&512&&e.wrap&4&&(j[0]=u&255,j[1]=u>>>8&255,j[2]=u>>>16&255,j[3]=u>>>24&255,e.check=on(e.check,j,4,0)),u=0,g=0,e.mode=oc;case oc:for(;g<16;){if(l===0)break t;l--,u+=r[a++]<<g,g+=8}e.head&&(e.head.xflags=u&255,e.head.os=u>>8),e.flags&512&&e.wrap&4&&(j[0]=u&255,j[1]=u>>>8&255,e.check=on(e.check,j,2,0)),u=0,g=0,e.mode=sc;case sc:if(e.flags&1024){for(;g<16;){if(l===0)break t;l--,u+=r[a++]<<g,g+=8}e.length=u,e.head&&(e.head.extra_len=u),e.flags&512&&e.wrap&4&&(j[0]=u&255,j[1]=u>>>8&255,e.check=on(e.check,j,2,0)),u=0,g=0}else e.head&&(e.head.extra=null);e.mode=lc;case lc:if(e.flags&1024&&(p=e.length,p>l&&(p=l),p&&(e.head&&(ct=e.head.extra_len-e.length,e.head.extra||(e.head.extra=new Uint8Array(e.head.extra_len)),e.head.extra.set(r.subarray(a,a+p),ct)),e.flags&512&&e.wrap&4&&(e.check=on(e.check,r,p,a)),l-=p,a+=p,e.length-=p),e.length))break t;e.length=0,e.mode=hc;case hc:if(e.flags&2048){if(l===0)break t;p=0;do ct=r[a+p++],e.head&&ct&&e.length<65536&&(e.head.name+=String.fromCharCode(ct));while(ct&&p<l);if(e.flags&512&&e.wrap&4&&(e.check=on(e.check,r,p,a)),l-=p,a+=p,ct)break t}else e.head&&(e.head.name=null);e.length=0,e.mode=fc;case fc:if(e.flags&4096){if(l===0)break t;p=0;do ct=r[a+p++],e.head&&ct&&e.length<65536&&(e.head.comment+=String.fromCharCode(ct));while(ct&&p<l);if(e.flags&512&&e.wrap&4&&(e.check=on(e.check,r,p,a)),l-=p,a+=p,ct)break t}else e.head&&(e.head.comment=null);e.mode=cc;case cc:if(e.flags&512){for(;g<16;){if(l===0)break t;l--,u+=r[a++]<<g,g+=8}if(e.wrap&4&&u!==(e.check&65535)){t.msg="header crc mismatch",e.mode=De;break}u=0,g=0}e.head&&(e.head.hcrc=e.flags>>9&1,e.head.done=!0),t.adler=e.check=0,e.mode=Yr;break;case uc:for(;g<32;){if(l===0)break t;l--,u+=r[a++]<<g,g+=8}t.adler=e.check=Lc(u),u=0,g=0,e.mode=xs;case xs:if(e.havedict===0)return t.next_out=h,t.avail_out=f,t.next_in=a,t.avail_in=l,e.hold=u,e.bits=g,i5;t.adler=e.check=1,e.mode=Yr;case Yr:if(n===n5||n===ms)break t;case Wl:if(e.last){u>>>=g&7,g-=g&7,e.mode=Vl;break}for(;g<3;){if(l===0)break t;l--,u+=r[a++]<<g,g+=8}switch(e.last=u&1,u>>>=1,g-=1,u&3){case 0:e.mode=dc;break;case 1:if(u5(e),e.mode=vs,n===ms){u>>>=2,g-=2;break t}break;case 2:e.mode=gc;break;case 3:t.msg="invalid block type",e.mode=De}u>>>=2,g-=2;break;case dc:for(u>>>=g&7,g-=g&7;g<32;){if(l===0)break t;l--,u+=r[a++]<<g,g+=8}if((u&65535)!==(u>>>16^65535)){t.msg="invalid stored block lengths",e.mode=De;break}if(e.length=u&65535,u=0,g=0,e.mode=Gl,n===ms)break t;case Gl:e.mode=pc;case pc:if(p=e.length,p){if(p>l&&(p=l),p>f&&(p=f),p===0)break t;i.set(r.subarray(a,a+p),h),l-=p,a+=p,f-=p,h+=p,e.length-=p;break}e.mode=Yr;break;case gc:for(;g<14;){if(l===0)break t;l--,u+=r[a++]<<g,g+=8}if(e.nlen=(u&31)+257,u>>>=5,g-=5,e.ndist=(u&31)+1,u>>>=5,g-=5,e.ncode=(u&15)+4,u>>>=4,g-=4,e.nlen>286||e.ndist>30){t.msg="too many length or distance symbols",e.mode=De;break}e.have=0,e.mode=mc;case mc:for(;e.have<e.ncode;){for(;g<3;){if(l===0)break t;l--,u+=r[a++]<<g,g+=8}e.lens[O[e.have++]]=u&7,u>>>=3,g-=3}for(;e.have<19;)e.lens[O[e.have++]]=0;if(e.lencode=e.lendyn,e.lenbits=7,tt={bits:e.lenbits},Y=po(e5,e.lens,0,19,e.lencode,0,e.work,tt),e.lenbits=tt.bits,Y){t.msg="invalid code lengths set",e.mode=De;break}e.have=0,e.mode=vc;case vc:for(;e.have<e.nlen+e.ndist;){for(;D=e.lencode[u&(1<<e.lenbits)-1],N=D>>>24,H=D>>>16&255,q=D&65535,!(N<=g);){if(l===0)break t;l--,u+=r[a++]<<g,g+=8}if(q<16)u>>>=N,g-=N,e.lens[e.have++]=q;else{if(q===16){for(S=N+2;g<S;){if(l===0)break t;l--,u+=r[a++]<<g,g+=8}if(u>>>=N,g-=N,e.have===0){t.msg="invalid bit length repeat",e.mode=De;break}ct=e.lens[e.have-1],p=3+(u&3),u>>>=2,g-=2}else if(q===17){for(S=N+3;g<S;){if(l===0)break t;l--,u+=r[a++]<<g,g+=8}u>>>=N,g-=N,ct=0,p=3+(u&7),u>>>=3,g-=3}else{for(S=N+7;g<S;){if(l===0)break t;l--,u+=r[a++]<<g,g+=8}u>>>=N,g-=N,ct=0,p=11+(u&127),u>>>=7,g-=7}if(e.have+p>e.nlen+e.ndist){t.msg="invalid bit length repeat",e.mode=De;break}for(;p--;)e.lens[e.have++]=ct}}if(e.mode===De)break;if(e.lens[256]===0){t.msg="invalid code -- missing end-of-block",e.mode=De;break}if(e.lenbits=9,tt={bits:e.lenbits},Y=po(Qc,e.lens,0,e.nlen,e.lencode,0,e.work,tt),e.lenbits=tt.bits,Y){t.msg="invalid literal/lengths set",e.mode=De;break}if(e.distbits=6,e.distcode=e.distdyn,tt={bits:e.distbits},Y=po(tu,e.lens,e.nlen,e.ndist,e.distcode,0,e.work,tt),e.distbits=tt.bits,Y){t.msg="invalid distances set",e.mode=De;break}if(e.mode=vs,n===ms)break t;case vs:e.mode=bs;case bs:if(l>=6&&f>=258){t.next_out=h,t.avail_out=f,t.next_in=a,t.avail_in=l,e.hold=u,e.bits=g,Y2(t,x),h=t.next_out,i=t.output,f=t.avail_out,a=t.next_in,r=t.input,l=t.avail_in,u=e.hold,g=e.bits,e.mode===Yr&&(e.back=-1);break}for(e.back=0;D=e.lencode[u&(1<<e.lenbits)-1],N=D>>>24,H=D>>>16&255,q=D&65535,!(N<=g);){if(l===0)break t;l--,u+=r[a++]<<g,g+=8}if(H&&(H&240)===0){for(M=N,rt=H,mt=q;D=e.lencode[mt+((u&(1<<M+rt)-1)>>M)],N=D>>>24,H=D>>>16&255,q=D&65535,!(M+N<=g);){if(l===0)break t;l--,u+=r[a++]<<g,g+=8}u>>>=M,g-=M,e.back+=M}if(u>>>=N,g-=N,e.back+=N,e.length=q,H===0){e.mode=xc;break}if(H&32){e.back=-1,e.mode=Yr;break}if(H&64){t.msg="invalid literal/length code",e.mode=De;break}e.extra=H&15,e.mode=bc;case bc:if(e.extra){for(S=e.extra;g<S;){if(l===0)break t;l--,u+=r[a++]<<g,g+=8}e.length+=u&(1<<e.extra)-1,u>>>=e.extra,g-=e.extra,e.back+=e.extra}e.was=e.length,e.mode=wc;case wc:for(;D=e.distcode[u&(1<<e.distbits)-1],N=D>>>24,H=D>>>16&255,q=D&65535,!(N<=g);){if(l===0)break t;l--,u+=r[a++]<<g,g+=8}if((H&240)===0){for(M=N,rt=H,mt=q;D=e.distcode[mt+((u&(1<<M+rt)-1)>>M)],N=D>>>24,H=D>>>16&255,q=D&65535,!(M+N<=g);){if(l===0)break t;l--,u+=r[a++]<<g,g+=8}u>>>=M,g-=M,e.back+=M}if(u>>>=N,g-=N,e.back+=N,H&64){t.msg="invalid distance code",e.mode=De;break}e.offset=q,e.extra=H&15,e.mode=yc;case yc:if(e.extra){for(S=e.extra;g<S;){if(l===0)break t;l--,u+=r[a++]<<g,g+=8}e.offset+=u&(1<<e.extra)-1,u>>>=e.extra,g-=e.extra,e.back+=e.extra}if(e.offset>e.dmax){t.msg="invalid distance too far back",e.mode=De;break}e.mode=_c;case _c:if(f===0)break t;if(p=x-f,e.offset>p){if(p=e.offset-p,p>e.whave&&e.sane){t.msg="invalid distance too far back",e.mode=De;break}p>e.wnext?(p-=e.wnext,F=e.wsize-p):F=e.wnext-p,p>e.length&&(p=e.length),P=e.window}else P=i,F=h-e.offset,p=e.length;p>f&&(p=f),f-=p,e.length-=p;do i[h++]=P[F++];while(--p);e.length===0&&(e.mode=bs);break;case xc:if(f===0)break t;i[h++]=e.length,f--,e.mode=bs;break;case Vl:if(e.wrap){for(;g<32;){if(l===0)break t;l--,u|=r[a++]<<g,g+=8}if(x-=f,t.total_out+=x,e.total+=x,e.wrap&4&&x&&(t.adler=e.check=e.flags?on(e.check,i,x,h-x):wo(e.check,i,x,h-x)),x=f,e.wrap&4&&(e.flags?u:Lc(u))!==e.check){t.msg="incorrect data check",e.mode=De;break}u=0,g=0}e.mode=Ac;case Ac:if(e.wrap&&e.flags){for(;g<32;){if(l===0)break t;l--,u+=r[a++]<<g,g+=8}if(e.wrap&4&&u!==(e.total&4294967295)){t.msg="incorrect length check",e.mode=De;break}u=0,g=0}e.mode=Nc;case Nc:Y=r5;break t;case De:Y=eu;break t;case ru:return nu;case iu:default:return Jn}return t.next_out=h,t.avail_out=f,t.next_in=a,t.avail_in=l,e.hold=u,e.bits=g,(e.wsize||x!==t.avail_out&&e.mode<De&&(e.mode<Vl||n!==nc))&&hu(t,t.output,t.next_out,x-t.avail_out),y-=t.avail_in,x-=t.avail_out,t.total_in+=y,t.total_out+=x,e.total+=x,e.wrap&4&&x&&(t.adler=e.check=e.flags?on(e.check,i,x,t.next_out-x):wo(e.check,i,x,t.next_out-x)),t.data_type=e.bits+(e.last?64:0)+(e.mode===Yr?128:0)+(e.mode===vs||e.mode===Gl?256:0),(y===0&&x===0||n===nc)&&Y===Gi&&(Y=a5),Y},p5=t=>{if(Vi(t))return Jn;let n=t.state;return n.window&&(n.window=null),t.state=null,Gi},g5=(t,n)=>{if(Vi(t))return Jn;let e=t.state;return(e.wrap&2)===0?Jn:(e.head=n,n.done=!1,Gi)},m5=(t,n)=>{let e=n.length,r,i,a;return Vi(t)||(r=t.state,r.wrap!==0&&r.mode!==xs)?Jn:r.mode===xs&&(i=1,i=wo(i,n,e,0),i!==r.check)?eu:(a=hu(t,n,e,e),a?(r.mode=ru,nu):(r.havedict=1,Gi))},v5=ou,b5=su,w5=au,y5=c5,_5=lu,x5=d5,A5=p5,N5=g5,L5=m5,S5="pako inflate (from Nodeca project)",xr={inflateReset:v5,inflateReset2:b5,inflateResetKeep:w5,inflateInit:y5,inflateInit2:_5,inflate:x5,inflateEnd:A5,inflateGetHeader:N5,inflateSetDictionary:L5,inflateInfo:S5};function k5(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}var P5=k5,fu=Object.prototype.toString,{Z_NO_FLUSH:I5,Z_FINISH:kc,Z_OK:da,Z_STREAM_END:Yl,Z_NEED_DICT:Kl,Z_STREAM_ERROR:F5,Z_DATA_ERROR:Pc,Z_MEM_ERROR:E5,Z_BUF_ERROR:Ic}=va,C5={chunkSize:1024*64,windowBits:15,to:""};function Lo(t){this.options=Ns.assign({},C5,t||{});let n=this.options;n.raw&&n.windowBits>=0&&n.windowBits<16&&(n.windowBits=-n.windowBits,n.windowBits===0&&(n.windowBits=-15)),n.windowBits>=0&&n.windowBits<16&&!(t&&t.windowBits)&&(n.windowBits+=32),n.windowBits>15&&n.windowBits<48&&(n.windowBits&15)===0&&(n.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Xc,this.strm.avail_out=0;let e=xr.inflateInit2(this.strm,n.windowBits);if(e!==da)throw new Error(qi[e]);if(this.header=new P5,xr.inflateGetHeader(this.strm,this.header),n.dictionary&&(typeof n.dictionary=="string"?n.dictionary=_o.string2buf(n.dictionary):fu.call(n.dictionary)==="[object ArrayBuffer]"&&(n.dictionary=new Uint8Array(n.dictionary)),n.raw&&(e=xr.inflateSetDictionary(this.strm,n.dictionary),e!==da)))throw new Error(qi[e])}Lo.prototype.push=function(t,n){let e=this.strm,r=this.options.chunkSize,i=this.options.dictionary,a,h,l;if(this.ended)return!1;for(n===~~n?h=n:h=n===!0?kc:I5,fu.call(t)==="[object ArrayBuffer]"?e.input=new Uint8Array(t):e.input=t,e.next_in=0,e.avail_in=e.input.length;;){for(e.avail_out===0&&(e.output=new Uint8Array(r),e.next_out=0,e.avail_out=r),a=xr.inflate(e,h),a===Kl&&i&&(a=xr.inflateSetDictionary(e,i),a===da?a=xr.inflate(e,h):a===Pc&&(a=Kl));e.avail_in>0&&a===Yl&&e.state.wrap&2&&e.state.flags!==0&&e.input[e.next_in]!==0;)xr.inflateReset(e),a=xr.inflate(e,h);switch(a){case F5:case Pc:case Kl:case E5:return this.onEnd(a),this.ended=!0,!1}if(l=e.avail_out,e.next_out&&(e.avail_out===0||a===Yl||h>0))if(this.options.to==="string"){let f=_o.utf8border(e.output,e.next_out),u=e.next_out-f,g=_o.buf2string(e.output,f);e.next_out=u,e.avail_out=r-u,u&&e.output.set(e.output.subarray(f,f+u),0),this.onData(g)}else this.onData(e.output.length===e.next_out?e.output:e.output.subarray(0,e.next_out)),e.avail_out=0,e.next_out=0;if(!((a===da||a===Ic)&&l===0)){if(a===Yl)return a=xr.inflateEnd(this.strm),this.onEnd(a),this.ended=!0,!0;if(e.avail_in===0){if(h===kc)return a=xr.inflateEnd(this.strm),this.onEnd(a===da?Ic:a),this.ended=!0,!1;break}}}return!0};Lo.prototype.onData=function(t){this.chunks.push(t)};Lo.prototype.onEnd=function(t){t===da&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=Ns.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};function dh(t,n){let e=new Lo(n);if(e.push(t,!0),e.err)throw e.msg||qi[e.err];return e.result}function O5(t,n){return n=n||{},n.raw=!0,dh(t,n)}var T5=Lo,D5=dh,R5=O5,M5=dh,j5=va,B5={Inflate:T5,inflate:D5,inflateRaw:R5,ungzip:M5,constants:j5},{Deflate:Ap,deflate:Np,deflateRaw:Lp,gzip:Sp}=Z2,{Inflate:z5,inflate:U5,inflateRaw:kp,ungzip:Pp}=B5;var ph=z5,cu=U5;var du=[];for(let t=0;t<256;t++){let n=t;for(let e=0;e<8;e++)n&1?n=3988292384^n>>>1:n=n>>>1;du[t]=n}var uu=4294967295;function q5(t,n,e){let r=t;for(let i=0;i<e;i++)r=du[(r^n[i])&255]^r>>>8;return r}function H5(t,n){return(q5(uu,t,n)^uu)>>>0}function gh(t,n,e){let r=t.readUint32(),i=H5(new Uint8Array(t.buffer,t.byteOffset+t.offset-n-4,n),n);if(i!==r)throw new Error(`CRC mismatch for chunk ${e}. Expected ${r}, found ${i}`)}function Ss(t,n,e){for(let r=0;r<e;r++)n[r]=t[r]}function ks(t,n,e,r){let i=0;for(;i<r;i++)n[i]=t[i];for(;i<e;i++)n[i]=t[i]+n[i-r]&255}function Ps(t,n,e,r){let i=0;if(e.length===0)for(;i<r;i++)n[i]=t[i];else for(;i<r;i++)n[i]=t[i]+e[i]&255}function Is(t,n,e,r,i){let a=0;if(e.length===0){for(;a<i;a++)n[a]=t[a];for(;a<r;a++)n[a]=t[a]+(n[a-i]>>1)&255}else{for(;a<i;a++)n[a]=t[a]+(e[a]>>1)&255;for(;a<r;a++)n[a]=t[a]+(n[a-i]+e[a]>>1)&255}}function Fs(t,n,e,r,i){let a=0;if(e.length===0){for(;a<i;a++)n[a]=t[a];for(;a<r;a++)n[a]=t[a]+n[a-i]&255}else{for(;a<i;a++)n[a]=t[a]+e[a]&255;for(;a<r;a++)n[a]=t[a]+W5(n[a-i],e[a],e[a-i])&255}}function W5(t,n,e){let r=t+n-e,i=Math.abs(r-t),a=Math.abs(r-n),h=Math.abs(r-e);return i<=a&&i<=h?t:a<=h?n:e}function pu(t,n,e,r,i,a){switch(t){case 0:Ss(n,e,i);break;case 1:ks(n,e,i,a);break;case 2:Ps(n,e,r,i);break;case 3:Is(n,e,r,i,a);break;case 4:Fs(n,e,r,i,a);break;default:throw new Error(`Unsupported filter: ${t}`)}}var G5=new Uint16Array([255]),V5=new Uint8Array(G5.buffer),Z5=V5[0]===255;function gu(t){let{data:n,width:e,height:r,channels:i,depth:a}=t,h=[{x:0,y:0,xStep:8,yStep:8},{x:4,y:0,xStep:8,yStep:8},{x:0,y:4,xStep:4,yStep:8},{x:2,y:0,xStep:4,yStep:4},{x:0,y:2,xStep:2,yStep:4},{x:1,y:0,xStep:2,yStep:2},{x:0,y:1,xStep:1,yStep:2}],l=Math.ceil(a/8)*i,f=new Uint8Array(r*e*l),u=0;for(let g=0;g<7;g++){let y=h[g],x=Math.ceil((e-y.x)/y.xStep),p=Math.ceil((r-y.y)/y.yStep);if(x<=0||p<=0)continue;let F=x*l,P=new Uint8Array(F);for(let D=0;D<p;D++){let N=n[u++],H=n.subarray(u,u+F);u+=F;let q=new Uint8Array(F);pu(N,H,q,P,F,l),P.set(q);for(let M=0;M<x;M++){let rt=y.x+M*y.xStep,mt=y.y+D*y.yStep;if(!(rt>=e||mt>=r))for(let ct=0;ct<l;ct++)f[(mt*e+rt)*l+ct]=q[M*l+ct]}}}if(a===16){let g=new Uint16Array(f.buffer);if(Z5)for(let y=0;y<g.length;y++)g[y]=$5(g[y]);return g}else return f}function $5(t){return(t&255)<<8|t>>8&255}var Y5=new Uint16Array([255]),K5=new Uint8Array(Y5.buffer),X5=K5[0]===255,J5=new Uint8Array(0);function mh(t){let{data:n,width:e,height:r,channels:i,depth:a}=t,h=Math.ceil(a/8)*i,l=Math.ceil(a/8*i*e),f=new Uint8Array(r*l),u=J5,g=0,y,x;for(let p=0;p<r;p++){switch(y=n.subarray(g+1,g+1+l),x=f.subarray(p*l,(p+1)*l),n[g]){case 0:Ss(y,x,l);break;case 1:ks(y,x,l,h);break;case 2:Ps(y,x,u,l);break;case 3:Is(y,x,u,l,h);break;case 4:Fs(y,x,u,l,h);break;default:throw new Error(`Unsupported filter: ${n[g]}`)}u=x,g+=l+1}if(a===16){let p=new Uint16Array(f.buffer);if(X5)for(let F=0;F<p.length;F++)p[F]=Q5(p[F]);return p}else return f}function Q5(t){return(t&255)<<8|t>>8&255}var Es=Uint8Array.of(137,80,78,71,13,10,26,10);function vh(t){if(!mu(t.readBytes(Es.length)))throw new Error("wrong PNG signature")}function mu(t){if(t.length<Es.length)return!1;for(let n=0;n<Es.length;n++)if(t[n]!==Es[n])return!1;return!0}var vu="tEXt",ed=0,bu=new TextDecoder("latin1");function nd(t){if(id(t),t.length===0||t.length>79)throw new Error("keyword length must be between 1 and 79")}var rd=/^[\u0000-\u00FF]*$/;function id(t){if(!rd.test(t))throw new Error("invalid latin1 text")}function wu(t,n,e){let r=bh(n);t[r]=ad(n,e-r.length-1)}function bh(t){for(t.mark();t.readByte()!==ed;);let n=t.offset;t.reset();let e=bu.decode(t.readBytes(n-t.offset-1));return t.skip(1),nd(e),e}function ad(t,n){return bu.decode(t.readBytes(n))}var Sn={UNKNOWN:-1,GREYSCALE:0,TRUECOLOUR:2,INDEXED_COLOUR:3,GREYSCALE_ALPHA:4,TRUECOLOUR_ALPHA:6},So={UNKNOWN:-1,DEFLATE:0},Cs={UNKNOWN:-1,ADAPTIVE:0},ko={UNKNOWN:-1,NO_INTERLACE:0,ADAM7:1},Po={NONE:0,BACKGROUND:1,PREVIOUS:2},Os={SOURCE:0,OVER:1};var Io=class extends so{_checkCrc;_inflator;_png;_apng;_end;_hasPalette;_palette;_hasTransparency;_transparency;_compressionMethod;_filterMethod;_interlaceMethod;_colorType;_isAnimated;_numberOfFrames;_numberOfPlays;_frames;_writingDataChunks;constructor(n,e={}){super(n);let{checkCrc:r=!1}=e;this._checkCrc=r,this._inflator=new ph,this._png={width:-1,height:-1,channels:-1,data:new Uint8Array(0),depth:1,text:{}},this._apng={width:-1,height:-1,channels:-1,depth:1,numberOfFrames:1,numberOfPlays:0,text:{},frames:[]},this._end=!1,this._hasPalette=!1,this._palette=[],this._hasTransparency=!1,this._transparency=new Uint16Array(0),this._compressionMethod=So.UNKNOWN,this._filterMethod=Cs.UNKNOWN,this._interlaceMethod=ko.UNKNOWN,this._colorType=Sn.UNKNOWN,this._isAnimated=!1,this._numberOfFrames=1,this._numberOfPlays=0,this._frames=[],this._writingDataChunks=!1,this.setBigEndian()}decode(){for(vh(this);!this._end;){let n=this.readUint32(),e=this.readChars(4);this.decodeChunk(n,e)}return this.decodeImage(),this._png}decodeApng(){for(vh(this);!this._end;){let n=this.readUint32(),e=this.readChars(4);this.decodeApngChunk(n,e)}return this.decodeApngImage(),this._apng}decodeChunk(n,e){let r=this.offset;switch(e){case"IHDR":this.decodeIHDR();break;case"PLTE":this.decodePLTE(n);break;case"IDAT":this.decodeIDAT(n);break;case"IEND":this._end=!0;break;case"tRNS":this.decodetRNS(n);break;case"iCCP":this.decodeiCCP(n);break;case vu:wu(this._png.text,this,n);break;case"pHYs":this.decodepHYs();break;default:this.skip(n);break}if(this.offset-r!==n)throw new Error(`Length mismatch while decoding chunk ${e}`);this._checkCrc?gh(this,n+4,e):this.skip(4)}decodeApngChunk(n,e){let r=this.offset;switch(e!=="fdAT"&&e!=="IDAT"&&this._writingDataChunks&&this.pushDataToFrame(),e){case"acTL":this.decodeACTL();break;case"fcTL":this.decodeFCTL();break;case"fdAT":this.decodeFDAT(n);break;default:this.decodeChunk(n,e),this.offset=r+n;break}if(this.offset-r!==n)throw new Error(`Length mismatch while decoding chunk ${e}`);this._checkCrc?gh(this,n+4,e):this.skip(4)}decodeIHDR(){let n=this._png;n.width=this.readUint32(),n.height=this.readUint32(),n.depth=od(this.readUint8());let e=this.readUint8();this._colorType=e;let r;switch(e){case Sn.GREYSCALE:r=1;break;case Sn.TRUECOLOUR:r=3;break;case Sn.INDEXED_COLOUR:r=1;break;case Sn.GREYSCALE_ALPHA:r=2;break;case Sn.TRUECOLOUR_ALPHA:r=4;break;case Sn.UNKNOWN:default:throw new Error(`Unknown color type: ${e}`)}if(this._png.channels=r,this._compressionMethod=this.readUint8(),this._compressionMethod!==So.DEFLATE)throw new Error(`Unsupported compression method: ${this._compressionMethod}`);this._filterMethod=this.readUint8(),this._interlaceMethod=this.readUint8()}decodeACTL(){this._numberOfFrames=this.readUint32(),this._numberOfPlays=this.readUint32(),this._isAnimated=!0}decodeFCTL(){let n={sequenceNumber:this.readUint32(),width:this.readUint32(),height:this.readUint32(),xOffset:this.readUint32(),yOffset:this.readUint32(),delayNumber:this.readUint16(),delayDenominator:this.readUint16(),disposeOp:this.readUint8(),blendOp:this.readUint8(),data:new Uint8Array(0)};this._frames.push(n)}decodePLTE(n){if(n%3!==0)throw new RangeError(`PLTE field length must be a multiple of 3. Got ${n}`);let e=n/3;this._hasPalette=!0;let r=[];this._palette=r;for(let i=0;i<e;i++)r.push([this.readUint8(),this.readUint8(),this.readUint8()])}decodeIDAT(n){this._writingDataChunks=!0;let e=n,r=this.offset+this.byteOffset;if(this._inflator.push(new Uint8Array(this.buffer,r,e)),this._inflator.err)throw new Error(`Error while decompressing the data: ${this._inflator.err}`);this.skip(n)}decodeFDAT(n){this._writingDataChunks=!0;let e=n,r=this.offset+this.byteOffset;if(r+=4,e-=4,this._inflator.push(new Uint8Array(this.buffer,r,e)),this._inflator.err)throw new Error(`Error while decompressing the data: ${this._inflator.err}`);this.skip(n)}decodetRNS(n){switch(this._colorType){case Sn.GREYSCALE:case Sn.TRUECOLOUR:{if(n%2!==0)throw new RangeError(`tRNS chunk length must be a multiple of 2. Got ${n}`);if(n/2>this._png.width*this._png.height)throw new Error(`tRNS chunk contains more alpha values than there are pixels (${n/2} vs ${this._png.width*this._png.height})`);this._hasTransparency=!0,this._transparency=new Uint16Array(n/2);for(let e=0;e<n/2;e++)this._transparency[e]=this.readUint16();break}case Sn.INDEXED_COLOUR:{if(n>this._palette.length)throw new Error(`tRNS chunk contains more alpha values than there are palette colors (${n} vs ${this._palette.length})`);let e=0;for(;e<n;e++){let r=this.readByte();this._palette[e].push(r)}for(;e<this._palette.length;e++)this._palette[e].push(255);break}case Sn.UNKNOWN:case Sn.GREYSCALE_ALPHA:case Sn.TRUECOLOUR_ALPHA:default:throw new Error(`tRNS chunk is not supported for color type ${this._colorType}`)}}decodeiCCP(n){let e=bh(this),r=this.readUint8();if(r!==So.DEFLATE)throw new Error(`Unsupported iCCP compression method: ${r}`);let i=this.readBytes(n-e.length-2);this._png.iccEmbeddedProfile={name:e,profile:cu(i)}}decodepHYs(){let n=this.readUint32(),e=this.readUint32(),r=this.readByte();this._png.resolution={x:n,y:e,unit:r}}decodeApngImage(){this._apng.width=this._png.width,this._apng.height=this._png.height,this._apng.channels=this._png.channels,this._apng.depth=this._png.depth,this._apng.numberOfFrames=this._numberOfFrames,this._apng.numberOfPlays=this._numberOfPlays,this._apng.text=this._png.text,this._apng.resolution=this._png.resolution;for(let n=0;n<this._numberOfFrames;n++){let e={sequenceNumber:this._frames[n].sequenceNumber,delayNumber:this._frames[n].delayNumber,delayDenominator:this._frames[n].delayDenominator,data:this._apng.depth===8?new Uint8Array(this._apng.width*this._apng.height*this._apng.channels):new Uint16Array(this._apng.width*this._apng.height*this._apng.channels)},r=this._frames.at(n);if(r){if(r.data=mh({data:r.data,width:r.width,height:r.height,channels:this._apng.channels,depth:this._apng.depth}),this._hasPalette&&(this._apng.palette=this._palette),this._hasTransparency&&(this._apng.transparency=this._transparency),n===0||r.xOffset===0&&r.yOffset===0&&r.width===this._png.width&&r.height===this._png.height)e.data=r.data;else{let i=this._apng.frames.at(n-1);this.disposeFrame(r,i,e),this.addFrameDataToCanvas(e,r)}this._apng.frames.push(e)}}return this._apng}disposeFrame(n,e,r){switch(n.disposeOp){case Po.NONE:break;case Po.BACKGROUND:for(let i=0;i<this._png.height;i++)for(let a=0;a<this._png.width;a++){let h=(i*n.width+a)*this._png.channels;for(let l=0;l<this._png.channels;l++)r.data[h+l]=0}break;case Po.PREVIOUS:r.data.set(e.data);break;default:throw new Error("Unknown disposeOp")}}addFrameDataToCanvas(n,e){let r=1<<this._png.depth,i=(a,h)=>{let l=((a+e.yOffset)*this._png.width+e.xOffset+h)*this._png.channels,f=(a*e.width+h)*this._png.channels;return{index:l,frameIndex:f}};switch(e.blendOp){case Os.SOURCE:for(let a=0;a<e.height;a++)for(let h=0;h<e.width;h++){let{index:l,frameIndex:f}=i(a,h);for(let u=0;u<this._png.channels;u++)n.data[l+u]=e.data[f+u]}break;case Os.OVER:for(let a=0;a<e.height;a++)for(let h=0;h<e.width;h++){let{index:l,frameIndex:f}=i(a,h);for(let u=0;u<this._png.channels;u++){let g=e.data[f+this._png.channels-1]/r,y=u%(this._png.channels-1)===0?1:e.data[f+u],x=Math.floor(g*y+(1-g)*n.data[l+u]);n.data[l+u]+=x}}break;default:throw new Error("Unknown blendOp")}}decodeImage(){if(this._inflator.err)throw new Error(`Error while decompressing the data: ${this._inflator.err}`);let n=this._isAnimated?(this._frames?.at(0)).data:this._inflator.result;if(this._filterMethod!==Cs.ADAPTIVE)throw new Error(`Filter method ${this._filterMethod} not supported`);if(this._interlaceMethod===ko.NO_INTERLACE)this._png.data=mh({data:n,width:this._png.width,height:this._png.height,channels:this._png.channels,depth:this._png.depth});else if(this._interlaceMethod===ko.ADAM7)this._png.data=gu({data:n,width:this._png.width,height:this._png.height,channels:this._png.channels,depth:this._png.depth});else throw new Error(`Interlace method ${this._interlaceMethod} not supported`);this._hasPalette&&(this._png.palette=this._palette),this._hasTransparency&&(this._png.transparency=this._transparency)}pushDataToFrame(){let n=this._inflator.result,e=this._frames.at(-1);e?e.data=n:this._frames.push({sequenceNumber:0,width:this._png.width,height:this._png.height,xOffset:0,yOffset:0,delayNumber:0,delayDenominator:0,disposeOp:Po.NONE,blendOp:Os.SOURCE,data:n}),this._inflator=new ph,this._writingDataChunks=!1}};function od(t){if(t!==1&&t!==2&&t!==4&&t!==8&&t!==16)throw new Error(`invalid bit depth: ${t}`);return t}var yu;(function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.METRE=1]="METRE"})(yu||(yu={}));function _u(t,n){return new Io(t,n).decode()}var $t=(function(){return typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:this})();function wh(){$t.console&&typeof $t.console.log=="function"&&$t.console.log.apply($t.console,arguments)}var Pe={log:wh,warn:function(t){$t.console&&(typeof $t.console.warn=="function"?$t.console.warn.apply($t.console,arguments):wh.call(null,arguments))},error:function(t){$t.console&&(typeof $t.console.error=="function"?$t.console.error.apply($t.console,arguments):wh(t))}};function yh(t,n,e){var r=new XMLHttpRequest;r.open("GET",t),r.responseType="blob",r.onload=function(){Zi(r.response,n,e)},r.onerror=function(){Pe.error("could not download file")},r.send()}function xu(t){var n=new XMLHttpRequest;n.open("HEAD",t,!1);try{n.send()}catch{}return n.status>=200&&n.status<=299}function Ts(t){try{t.dispatchEvent(new MouseEvent("click"))}catch{var n=document.createEvent("MouseEvents");n.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),t.dispatchEvent(n)}}var Zi=$t.saveAs||((typeof window>"u"?"undefined":Le(window))!=="object"||window!==$t?function(){}:typeof HTMLAnchorElement<"u"&&"download"in HTMLAnchorElement.prototype?function(t,n,e){var r=$t.URL||$t.webkitURL,i=document.createElement("a");n=n||t.name||"download",i.download=n,i.rel="noopener",typeof t=="string"?(i.href=t,i.origin!==location.origin?xu(i.href)?yh(t,n,e):Ts(i,i.target="_blank"):Ts(i)):(i.href=r.createObjectURL(t),setTimeout(function(){r.revokeObjectURL(i.href)},4e4),setTimeout(function(){Ts(i)},0))}:"msSaveOrOpenBlob"in navigator?function(t,n,e){if(n=n||t.name||"download",typeof t=="string")if(xu(t))yh(t,n,e);else{var r=document.createElement("a");r.href=t,r.target="_blank",setTimeout(function(){Ts(r)})}else navigator.msSaveOrOpenBlob((function(i,a){return a===void 0?a={autoBom:!1}:Le(a)!=="object"&&(Pe.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(i.type)?new Blob(["\uFEFF",i],{type:i.type}):i})(t,e),n)}:function(t,n,e,r){if((r=r||open("","_blank"))&&(r.document.title=r.document.body.innerText="downloading..."),typeof t=="string")return yh(t,n,e);var i=t.type==="application/octet-stream",a=/constructor/i.test($t.HTMLElement)||$t.safari,h=/CriOS\/[\d]+/.test(navigator.userAgent);if((h||i&&a)&&(typeof FileReader>"u"?"undefined":Le(FileReader))==="object"){var l=new FileReader;l.onloadend=function(){var g=l.result;g=h?g:g.replace(/^data:[^;]*;/,"data:attachment/file;"),r?r.location.href=g:location=g,r=null},l.readAsDataURL(t)}else{var f=$t.URL||$t.webkitURL,u=f.createObjectURL(t);r?r.location=u:location.href=u,r=null,setTimeout(function(){f.revokeObjectURL(u)},4e4)}});function Vu(t){var n;t=t||"",this.ok=!1,t.charAt(0)=="#"&&(t=t.substr(1,6)),t={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"}[t=(t=t.replace(/ /g,"")).toLowerCase()]||t;for(var e=[{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(l){return[parseInt(l[1]),parseInt(l[2]),parseInt(l[3])]}},{re:/^(\w{2})(\w{2})(\w{2})$/,example:["#00ff00","336699"],process:function(l){return[parseInt(l[1],16),parseInt(l[2],16),parseInt(l[3],16)]}},{re:/^(\w{1})(\w{1})(\w{1})$/,example:["#fb0","f0f"],process:function(l){return[parseInt(l[1]+l[1],16),parseInt(l[2]+l[2],16),parseInt(l[3]+l[3],16)]}}],r=0;r<e.length;r++){var i=e[r].re,a=e[r].process,h=i.exec(t);h&&(n=a(h),this.r=n[0],this.g=n[1],this.b=n[2],this.ok=!0)}this.r=this.r<0||isNaN(this.r)?0:this.r>255?255:this.r,this.g=this.g<0||isNaN(this.g)?0:this.g>255?255:this.g,this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b,this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},this.toHex=function(){var l=this.r.toString(16),f=this.g.toString(16),u=this.b.toString(16);return l.length==1&&(l="0"+l),f.length==1&&(f="0"+f),u.length==1&&(u="0"+u),"#"+l+f+u}}var js=$t.atob.bind($t),Au=$t.btoa.bind($t);function _h(t,n){var e=t[0],r=t[1],i=t[2],a=t[3];e=vn(e,r,i,a,n[0],7,-680876936),a=vn(a,e,r,i,n[1],12,-389564586),i=vn(i,a,e,r,n[2],17,606105819),r=vn(r,i,a,e,n[3],22,-1044525330),e=vn(e,r,i,a,n[4],7,-176418897),a=vn(a,e,r,i,n[5],12,1200080426),i=vn(i,a,e,r,n[6],17,-1473231341),r=vn(r,i,a,e,n[7],22,-45705983),e=vn(e,r,i,a,n[8],7,1770035416),a=vn(a,e,r,i,n[9],12,-1958414417),i=vn(i,a,e,r,n[10],17,-42063),r=vn(r,i,a,e,n[11],22,-1990404162),e=vn(e,r,i,a,n[12],7,1804603682),a=vn(a,e,r,i,n[13],12,-40341101),i=vn(i,a,e,r,n[14],17,-1502002290),e=bn(e,r=vn(r,i,a,e,n[15],22,1236535329),i,a,n[1],5,-165796510),a=bn(a,e,r,i,n[6],9,-1069501632),i=bn(i,a,e,r,n[11],14,643717713),r=bn(r,i,a,e,n[0],20,-373897302),e=bn(e,r,i,a,n[5],5,-701558691),a=bn(a,e,r,i,n[10],9,38016083),i=bn(i,a,e,r,n[15],14,-660478335),r=bn(r,i,a,e,n[4],20,-405537848),e=bn(e,r,i,a,n[9],5,568446438),a=bn(a,e,r,i,n[14],9,-1019803690),i=bn(i,a,e,r,n[3],14,-187363961),r=bn(r,i,a,e,n[8],20,1163531501),e=bn(e,r,i,a,n[13],5,-1444681467),a=bn(a,e,r,i,n[2],9,-51403784),i=bn(i,a,e,r,n[7],14,1735328473),e=wn(e,r=bn(r,i,a,e,n[12],20,-1926607734),i,a,n[5],4,-378558),a=wn(a,e,r,i,n[8],11,-2022574463),i=wn(i,a,e,r,n[11],16,1839030562),r=wn(r,i,a,e,n[14],23,-35309556),e=wn(e,r,i,a,n[1],4,-1530992060),a=wn(a,e,r,i,n[4],11,1272893353),i=wn(i,a,e,r,n[7],16,-155497632),r=wn(r,i,a,e,n[10],23,-1094730640),e=wn(e,r,i,a,n[13],4,681279174),a=wn(a,e,r,i,n[0],11,-358537222),i=wn(i,a,e,r,n[3],16,-722521979),r=wn(r,i,a,e,n[6],23,76029189),e=wn(e,r,i,a,n[9],4,-640364487),a=wn(a,e,r,i,n[12],11,-421815835),i=wn(i,a,e,r,n[15],16,530742520),e=yn(e,r=wn(r,i,a,e,n[2],23,-995338651),i,a,n[0],6,-198630844),a=yn(a,e,r,i,n[7],10,1126891415),i=yn(i,a,e,r,n[14],15,-1416354905),r=yn(r,i,a,e,n[5],21,-57434055),e=yn(e,r,i,a,n[12],6,1700485571),a=yn(a,e,r,i,n[3],10,-1894986606),i=yn(i,a,e,r,n[10],15,-1051523),r=yn(r,i,a,e,n[1],21,-2054922799),e=yn(e,r,i,a,n[8],6,1873313359),a=yn(a,e,r,i,n[15],10,-30611744),i=yn(i,a,e,r,n[6],15,-1560198380),r=yn(r,i,a,e,n[13],21,1309151649),e=yn(e,r,i,a,n[4],6,-145523070),a=yn(a,e,r,i,n[11],10,-1120210379),i=yn(i,a,e,r,n[2],15,718787259),r=yn(r,i,a,e,n[9],21,-343485551),t[0]=bi(e,t[0]),t[1]=bi(r,t[1]),t[2]=bi(i,t[2]),t[3]=bi(a,t[3])}function Gs(t,n,e,r,i,a){return n=bi(bi(n,t),bi(r,a)),bi(n<<i|n>>>32-i,e)}function vn(t,n,e,r,i,a,h){return Gs(n&e|~n&r,t,n,i,a,h)}function bn(t,n,e,r,i,a,h){return Gs(n&r|e&~r,t,n,i,a,h)}function wn(t,n,e,r,i,a,h){return Gs(n^e^r,t,n,i,a,h)}function yn(t,n,e,r,i,a,h){return Gs(e^(n|~r),t,n,i,a,h)}function Zu(t){var n,e=t.length,r=[1732584193,-271733879,-1732584194,271733878];for(n=64;n<=t.length;n+=64)_h(r,sd(t.substring(n-64,n)));t=t.substring(n-64);var i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(n=0;n<t.length;n++)i[n>>2]|=t.charCodeAt(n)<<(n%4<<3);if(i[n>>2]|=128<<(n%4<<3),n>55)for(_h(r,i),n=0;n<16;n++)i[n]=0;return i[14]=8*e,_h(r,i),r}function sd(t){var n,e=[];for(n=0;n<64;n+=4)e[n>>2]=t.charCodeAt(n)+(t.charCodeAt(n+1)<<8)+(t.charCodeAt(n+2)<<16)+(t.charCodeAt(n+3)<<24);return e}var Nu="0123456789abcdef".split("");function ld(t){for(var n="",e=0;e<4;e++)n+=Nu[t>>8*e+4&15]+Nu[t>>8*e&15];return n}function hd(t){return String.fromCharCode(255&t,(65280&t)>>8,(16711680&t)>>16,(4278190080&t)>>24)}function kh(t){return Zu(t).map(hd).join("")}var fd=(function(t){for(var n=0;n<t.length;n++)t[n]=ld(t[n]);return t.join("")})(Zu("hello"))!="5d41402abc4b2a76b9719d911017c592";function bi(t,n){if(fd){var e=(65535&t)+(65535&n);return(t>>16)+(n>>16)+(e>>16)<<16|65535&e}return t+n&4294967295}function Ph(t,n){var e,r,i,a;if(t!==e){for(var h=(i=t,a=1+(256/t.length|0),new Array(a+1).join(i)),l=[],f=0;f<256;f++)l[f]=f;var u=0;for(f=0;f<256;f++){var g=l[f];u=(u+g+h.charCodeAt(f))%256,l[f]=l[u],l[u]=g}e=t,r=l}else l=r;var y=n.length,x=0,p=0,F="";for(f=0;f<y;f++)p=(p+(g=l[x=(x+1)%256]))%256,l[x]=l[p],l[p]=g,h=l[(l[x]+l[p])%256],F+=String.fromCharCode(n.charCodeAt(f)^h);return F}var Lu={print:4,modify:8,copy:16,"annot-forms":32};function xa(t,n,e,r){this.v=1,this.r=2;var i=192;t.forEach(function(l){if(Lu.perm!==void 0)throw new Error("Invalid permission: "+l);i+=Lu[l]}),this.padding="(\xBFN^Nu\x8AAd\0NV\xFF\xFA\b..\0\xB6\xD0h>\x80/\f\xA9\xFEdSiz";var a=(n+this.padding).substr(0,32),h=(e+this.padding).substr(0,32);this.O=this.processOwnerPassword(a,h),this.P=-(1+(255^i)),this.encryptionKey=kh(a+this.O+this.lsbFirstWord(this.P)+this.hexToBytes(r)).substr(0,5),this.U=Ph(this.encryptionKey,this.padding)}function Aa(t){if(/[^\u0000-\u00ff]/.test(t))throw new Error("Invalid PDF Name Object: "+t+", Only accept ASCII characters.");for(var n="",e=t.length,r=0;r<e;r++){var i=t.charCodeAt(r);n+=i<33||i===35||i===37||i===40||i===41||i===47||i===60||i===62||i===91||i===93||i===123||i===125||i>126?"#"+("0"+i.toString(16)).slice(-2):t[r]}return n}function Su(t){if(Le(t)!=="object")throw new Error("Invalid Context passed to initialize PubSub (jsPDF-module)");var n={};this.subscribe=function(e,r,i){if(i=i||!1,typeof e!="string"||typeof r!="function"||typeof i!="boolean")throw new Error("Invalid arguments passed to PubSub.subscribe (jsPDF-module)");n.hasOwnProperty(e)||(n[e]={});var a=Math.random().toString(35);return n[e][a]=[r,!!i],a},this.unsubscribe=function(e){for(var r in n)if(n[r][e])return delete n[r][e],Object.keys(n[r]).length===0&&delete n[r],!0;return!1},this.publish=function(e){if(n.hasOwnProperty(e)){var r=Array.prototype.slice.call(arguments,1),i=[];for(var a in n[e]){var h=n[e][a];try{h[0].apply(t,r)}catch(l){$t.console&&Pe.error("jsPDF PubSub Error",l.message,l)}h[1]&&i.push(a)}i.length&&i.forEach(this.unsubscribe)}},this.getTopics=function(){return n}}function Hs(t){if(!(this instanceof Hs))return new Hs(t);var n="opacity,stroke-opacity".split(",");for(var e in t)t.hasOwnProperty(e)&&n.indexOf(e)>=0&&(this[e]=t[e]);this.id="",this.objectNumber=-1}function $u(t,n){this.gState=t,this.matrix=n,this.id="",this.objectNumber=-1}function $i(t,n,e,r,i){if(!(this instanceof $i))return new $i(t,n,e,r,i);this.type=t==="axial"?2:3,this.coords=n,this.colors=e,$u.call(this,r,i)}function Na(t,n,e,r,i){if(!(this instanceof Na))return new Na(t,n,e,r,i);this.boundingBox=t,this.xStep=n,this.yStep=e,this.stream="",this.cloneIndex=0,$u.call(this,r,i)}function Rt(t){var n,e=typeof arguments[0]=="string"?arguments[0]:"p",r=arguments[1],i=arguments[2],a=arguments[3],h=[],l=1,f=16,u="S",g=null;Le(t=t||{})==="object"&&(e=t.orientation,r=t.unit||r,i=t.format||i,a=t.compress||t.compressPdf||a,(g=t.encryption||null)!==null&&(g.userPassword=g.userPassword||"",g.ownerPassword=g.ownerPassword||"",g.userPermissions=g.userPermissions||[]),l=typeof t.userUnit=="number"?Math.abs(t.userUnit):1,t.precision!==void 0&&(n=t.precision),t.floatPrecision!==void 0&&(f=t.floatPrecision),u=t.defaultPathOperation||"S"),h=t.filters||(a===!0?["FlateEncode"]:h),r=r||"mm",e=(""+(e||"P")).toLowerCase();var y=t.putOnlyUsedFonts||!1,x={},p={internal:{},__private__:{}};p.__private__.PubSub=Su;var F="1.3",P=p.__private__.getPdfVersion=function(){return F};p.__private__.setPdfVersion=function(c){F=c};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 N=p.__private__.getPageFormat=function(c){return D[c]};i=i||"a4";var H="compat",q="advanced",M=H;function rt(){this.saveGraphicsState(),I(new Vt(ee,0,0,-ee,0,Pi()*ee).toString()+" cm"),this.setFontSize(this.getFontSize()/ee),u="n",M=q}function mt(){this.restoreGraphicsState(),u="S",M=H}var ct=p.__private__.combineFontStyleAndFontWeight=function(c,v){if(c=="bold"&&v=="normal"||c=="bold"&&v==400||c=="normal"&&v=="italic"||c=="bold"&&v=="italic")throw new Error("Invalid Combination of fontweight and fontstyle");return v&&(c=v==400||v==="normal"?c==="italic"?"italic":"normal":v!=700&&v!=="bold"||c!=="normal"?(v==700?"bold":v)+""+c:"bold"),c};p.advancedAPI=function(c){var v=M===H;return v&&rt.call(this),typeof c!="function"||(c(this),v&&mt.call(this)),this},p.compatAPI=function(c){var v=M===q;return v&&mt.call(this),typeof c!="function"||(c(this),v&&rt.call(this)),this},p.isAdvancedAPI=function(){return M===q};var Y,j=function(c){if(M!==q)throw new Error(c+" is only available in 'advanced' API mode. You need to call advancedAPI() first.")},tt=p.roundToPrecision=p.__private__.roundToPrecision=function(c,v){var T=n||v;if(isNaN(c)||isNaN(T))throw new Error("Invalid argument passed to jsPDF.roundToPrecision");return c.toFixed(T).replace(/0+$/,"")};Y=p.hpf=p.__private__.hpf=typeof f=="number"?function(c){if(isNaN(c))throw new Error("Invalid argument passed to jsPDF.hpf");return tt(c,f)}:f==="smart"?function(c){if(isNaN(c))throw new Error("Invalid argument passed to jsPDF.hpf");return tt(c,c>-1&&c<1?16:5)}:function(c){if(isNaN(c))throw new Error("Invalid argument passed to jsPDF.hpf");return tt(c,16)};var S=p.f2=p.__private__.f2=function(c){if(isNaN(c))throw new Error("Invalid argument passed to jsPDF.f2");return tt(c,2)},O=p.__private__.f3=function(c){if(isNaN(c))throw new Error("Invalid argument passed to jsPDF.f3");return tt(c,3)},W=p.scale=p.__private__.scale=function(c){if(isNaN(c))throw new Error("Invalid argument passed to jsPDF.scale");return M===H?c*ee:M===q?c:void 0},U=function(c){return W((function(v){return M===H?Pi()-v:M===q?v:void 0})(c))};p.__private__.setPrecision=p.setPrecision=function(c){typeof parseInt(c,10)=="number"&&(n=parseInt(c,10))};var it,st="00000000000000000000000000000000",ht=p.__private__.getFileId=function(){return st},nt=p.__private__.setFileId=function(c){return st=c!==void 0&&/^[a-fA-F0-9]{32}$/.test(c)?c.toUpperCase():st.split("").map(function(){return"ABCDEF0123456789".charAt(Math.floor(16*Math.random()))}).join(""),g!==null&&(Je=new xa(g.userPermissions,g.userPassword,g.ownerPassword,st)),st};p.setFileId=function(c){return nt(c),this},p.getFileId=function(){return ht()};var ut=p.__private__.convertDateToPDFDate=function(c){var v=c.getTimezoneOffset(),T=v<0?"+":"-",z=Math.floor(Math.abs(v/60)),K=Math.abs(v%60),dt=[T,B(z),"'",B(K),"'"].join("");return["D:",c.getFullYear(),B(c.getMonth()+1),B(c.getDate()),B(c.getHours()),B(c.getMinutes()),B(c.getSeconds()),dt].join("")},At=p.__private__.convertPDFDateToDate=function(c){var v=parseInt(c.substr(2,4),10),T=parseInt(c.substr(6,2),10)-1,z=parseInt(c.substr(8,2),10),K=parseInt(c.substr(10,2),10),dt=parseInt(c.substr(12,2),10),vt=parseInt(c.substr(14,2),10);return new Date(v,T,z,K,dt,vt,0)},wt=p.__private__.setCreationDate=function(c){var v;if(c===void 0&&(c=new Date),c instanceof Date)v=ut(c);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(c))throw new Error("Invalid argument passed to jsPDF.setCreationDate");v=c}return it=v},A=p.__private__.getCreationDate=function(c){var v=it;return c==="jsDate"&&(v=At(it)),v};p.setCreationDate=function(c){return wt(c),this},p.getCreationDate=function(c){return A(c)};var R,B=p.__private__.padd2=function(c){return("0"+parseInt(c)).slice(-2)},G=p.__private__.padd2Hex=function(c){return("00"+(c=c.toString())).substr(c.length)},$=0,J=[],at=[],ot=0,gt=[],xt=[],kt=!1,St=at;p.__private__.setCustomOutputDestination=function(c){kt=!0,St=c};var Bt=function(c){kt||(St=c)};p.__private__.resetCustomOutputDestination=function(){kt=!1,St=at};var I=p.__private__.out=function(c){return c=c.toString(),ot+=c.length+1,St.push(c),St},Lt=p.__private__.write=function(c){return I(arguments.length===1?c.toString():Array.prototype.join.call(arguments," "))},ae=p.__private__.getArrayBuffer=function(c){for(var v=c.length,T=new ArrayBuffer(v),z=new Uint8Array(T);v--;)z[v]=c.charCodeAt(v);return T},Ht=[["Helvetica","helvetica","normal","WinAnsiEncoding"],["Helvetica-Bold","helvetica","bold","WinAnsiEncoding"],["Helvetica-Oblique","helvetica","italic","WinAnsiEncoding"],["Helvetica-BoldOblique","helvetica","bolditalic","WinAnsiEncoding"],["Courier","courier","normal","WinAnsiEncoding"],["Courier-Bold","courier","bold","WinAnsiEncoding"],["Courier-Oblique","courier","italic","WinAnsiEncoding"],["Courier-BoldOblique","courier","bolditalic","WinAnsiEncoding"],["Times-Roman","times","normal","WinAnsiEncoding"],["Times-Bold","times","bold","WinAnsiEncoding"],["Times-Italic","times","italic","WinAnsiEncoding"],["Times-BoldItalic","times","bolditalic","WinAnsiEncoding"],["ZapfDingbats","zapfdingbats","normal",null],["Symbol","symbol","normal",null]];p.__private__.getStandardFonts=function(){return Ht};var yt=t.fontSize||16;p.__private__.setFontSize=p.setFontSize=function(c){return yt=M===q?c/ee:c,this};var Wt,It=p.__private__.getFontSize=p.getFontSize=function(){return M===H?yt:yt*ee},qt=t.R2L||!1;p.__private__.setR2L=p.setR2L=function(c){return qt=c,this},p.__private__.getR2L=p.getR2L=function(){return qt};var zt,ye=p.__private__.setZoomMode=function(c){if(/^(?:\d+\.\d*|\d*\.\d+|\d+)%$/.test(c))Wt=c;else if(isNaN(c)){if([void 0,null,"fullwidth","fullheight","fullpage","original"].indexOf(c)===-1)throw new Error('zoom must be Integer (e.g. 2), a percentage Value (e.g. 300%) or fullwidth, fullheight, fullpage, original. "'+c+'" is not recognized.');Wt=c}else Wt=parseInt(c,10)};p.__private__.getZoomMode=function(){return Wt};var he,Jt=p.__private__.setPageMode=function(c){if([void 0,null,"UseNone","UseOutlines","UseThumbs","FullScreen"].indexOf(c)==-1)throw new Error('Page mode must be one of UseNone, UseOutlines, UseThumbs, or FullScreen. "'+c+'" is not recognized.');zt=c};p.__private__.getPageMode=function(){return zt};var ce=p.__private__.setLayoutMode=function(c){if([void 0,null,"continuous","single","twoleft","tworight","two"].indexOf(c)==-1)throw new Error('Layout mode must be one of continuous, single, twoleft, tworight. "'+c+'" is not recognized.');he=c};p.__private__.getLayoutMode=function(){return he},p.__private__.setDisplayMode=p.setDisplayMode=function(c,v,T){return ye(c),ce(v),Jt(T),this};var fe={title:"",subject:"",author:"",keywords:"",creator:""};p.__private__.getDocumentProperty=function(c){if(Object.keys(fe).indexOf(c)===-1)throw new Error("Invalid argument passed to jsPDF.getDocumentProperty");return fe[c]},p.__private__.getDocumentProperties=function(){return fe},p.__private__.setDocumentProperties=p.setProperties=p.setDocumentProperties=function(c){for(var v in fe)fe.hasOwnProperty(v)&&c[v]&&(fe[v]=c[v]);return this},p.__private__.setDocumentProperty=function(c,v){if(Object.keys(fe).indexOf(c)===-1)throw new Error("Invalid arguments passed to jsPDF.setDocumentProperty");return fe[c]=v};var Tt,ee,jt,Ue,pe,oe={},se={},Oe=[],Ut={},Ie={},Zt={},Qt={},Te=null,le=0,Gt=[],_e=new Su(p),yi=t.hotfixes||[],gn={},Ir={},ur=[],Vt=function c(v,T,z,K,dt,vt){if(!(this instanceof c))return new c(v,T,z,K,dt,vt);isNaN(v)&&(v=1),isNaN(T)&&(T=0),isNaN(z)&&(z=0),isNaN(K)&&(K=1),isNaN(dt)&&(dt=0),isNaN(vt)&&(vt=0),this._matrix=[v,T,z,K,dt,vt]};Object.defineProperty(Vt.prototype,"sx",{get:function(){return this._matrix[0]},set:function(c){this._matrix[0]=c}}),Object.defineProperty(Vt.prototype,"shy",{get:function(){return this._matrix[1]},set:function(c){this._matrix[1]=c}}),Object.defineProperty(Vt.prototype,"shx",{get:function(){return this._matrix[2]},set:function(c){this._matrix[2]=c}}),Object.defineProperty(Vt.prototype,"sy",{get:function(){return this._matrix[3]},set:function(c){this._matrix[3]=c}}),Object.defineProperty(Vt.prototype,"tx",{get:function(){return this._matrix[4]},set:function(c){this._matrix[4]=c}}),Object.defineProperty(Vt.prototype,"ty",{get:function(){return this._matrix[5]},set:function(c){this._matrix[5]=c}}),Object.defineProperty(Vt.prototype,"a",{get:function(){return this._matrix[0]},set:function(c){this._matrix[0]=c}}),Object.defineProperty(Vt.prototype,"b",{get:function(){return this._matrix[1]},set:function(c){this._matrix[1]=c}}),Object.defineProperty(Vt.prototype,"c",{get:function(){return this._matrix[2]},set:function(c){this._matrix[2]=c}}),Object.defineProperty(Vt.prototype,"d",{get:function(){return this._matrix[3]},set:function(c){this._matrix[3]=c}}),Object.defineProperty(Vt.prototype,"e",{get:function(){return this._matrix[4]},set:function(c){this._matrix[4]=c}}),Object.defineProperty(Vt.prototype,"f",{get:function(){return this._matrix[5]},set:function(c){this._matrix[5]=c}}),Object.defineProperty(Vt.prototype,"rotation",{get:function(){return Math.atan2(this.shx,this.sx)}}),Object.defineProperty(Vt.prototype,"scaleX",{get:function(){return this.decompose().scale.sx}}),Object.defineProperty(Vt.prototype,"scaleY",{get:function(){return this.decompose().scale.sy}}),Object.defineProperty(Vt.prototype,"isIdentity",{get:function(){return this.sx===1&&this.shy===0&&this.shx===0&&this.sy===1&&this.tx===0&&this.ty===0}}),Vt.prototype.join=function(c){return[this.sx,this.shy,this.shx,this.sy,this.tx,this.ty].map(Y).join(c)},Vt.prototype.multiply=function(c){var v=c.sx*this.sx+c.shy*this.shx,T=c.sx*this.shy+c.shy*this.sy,z=c.shx*this.sx+c.sy*this.shx,K=c.shx*this.shy+c.sy*this.sy,dt=c.tx*this.sx+c.ty*this.shx+this.tx,vt=c.tx*this.shy+c.ty*this.sy+this.ty;return new Vt(v,T,z,K,dt,vt)},Vt.prototype.decompose=function(){var c=this.sx,v=this.shy,T=this.shx,z=this.sy,K=this.tx,dt=this.ty,vt=Math.sqrt(c*c+v*v),Et=(c/=vt)*T+(v/=vt)*z;T-=c*Et,z-=v*Et;var Dt=Math.sqrt(T*T+z*z);return Et/=Dt,c*(z/=Dt)<v*(T/=Dt)&&(c=-c,v=-v,Et=-Et,vt=-vt),{scale:new Vt(vt,0,0,Dt,0,0),translate:new Vt(1,0,0,1,K,dt),rotate:new Vt(c,v,-v,c,0,0),skew:new Vt(1,0,Et,1,0,0)}},Vt.prototype.toString=function(c){return this.join(" ")},Vt.prototype.inversed=function(){var c=this.sx,v=this.shy,T=this.shx,z=this.sy,K=this.tx,dt=this.ty,vt=1/(c*z-v*T),Et=z*vt,Dt=-v*vt,Yt=-T*vt,ne=c*vt;return new Vt(Et,Dt,Yt,ne,-Et*K-Yt*dt,-Dt*K-ne*dt)},Vt.prototype.applyToPoint=function(c){var v=c.x*this.sx+c.y*this.shx+this.tx,T=c.x*this.shy+c.y*this.sy+this.ty;return new Rr(v,T)},Vt.prototype.applyToRectangle=function(c){var v=this.applyToPoint(c),T=this.applyToPoint(new Rr(c.x+c.w,c.y+c.h));return new ja(v.x,v.y,T.x-v.x,T.y-v.y)},Vt.prototype.clone=function(){var c=this.sx,v=this.shy,T=this.shx,z=this.sy,K=this.tx,dt=this.ty;return new Vt(c,v,T,z,K,dt)},p.Matrix=Vt;var Fr=p.matrixMult=function(c,v){return v.multiply(c)},Er=new Vt(1,0,0,1,0,0);p.unitMatrix=p.identityMatrix=Er;var qn=function(c,v){if(!Ie[c]){var T=(v instanceof $i?"Sh":"P")+(Object.keys(Ut).length+1).toString(10);v.id=T,Ie[c]=T,Ut[T]=v,_e.publish("addPattern",v)}};p.ShadingPattern=$i,p.TilingPattern=Na,p.addShadingPattern=function(c,v){return j("addShadingPattern()"),qn(c,v),this},p.beginTilingPattern=function(c){j("beginTilingPattern()"),Ba(c.boundingBox[0],c.boundingBox[1],c.boundingBox[2]-c.boundingBox[0],c.boundingBox[3]-c.boundingBox[1],c.matrix)},p.endTilingPattern=function(c,v){j("endTilingPattern()"),v.stream=xt[R].join(`
|
|
4
4
|
`),qn(c,v),_e.publish("endTilingPattern",v),ur.pop().restore()};var Hn,Me=p.__private__.newObject=function(){var c=an();return ln(c,!0),c},an=p.__private__.newObjectDeferred=function(){return $++,J[$]=function(){return ot},$},ln=function(c,v){return v=typeof v=="boolean"&&v,J[c]=ot,v&&I(c+" 0 obj"),c},_i=p.__private__.newAdditionalObject=function(){var c={objId:an(),content:""};return gt.push(c),c},Xr=an(),tr=an(),dr=p.__private__.decodeColorString=function(c){var v=c.split(" ");if(v.length!==2||v[1]!=="g"&&v[1]!=="G")v.length!==5||v[4]!=="k"&&v[4]!=="K"||(v=[(1-v[0])*(1-v[3]),(1-v[1])*(1-v[3]),(1-v[2])*(1-v[3]),"r"]);else{var T=parseFloat(v[0]);v=[T,T,T,"r"]}for(var z="#",K=0;K<3;K++)z+=("0"+Math.floor(255*parseFloat(v[K])).toString(16)).slice(-2);return z},er=p.__private__.encodeColorString=function(c){var v;typeof c=="string"&&(c={ch1:c});var T=c.ch1,z=c.ch2,K=c.ch3,dt=c.ch4,vt=c.pdfColorType==="draw"?["G","RG","K"]:["g","rg","k"];if(typeof T=="string"&&T.charAt(0)!=="#"){var Et=new Vu(T);if(Et.ok)T=Et.toHex();else if(!/^\d*\.?\d*$/.test(T))throw new Error('Invalid color "'+T+'" passed to jsPDF.encodeColorString.')}if(typeof T=="string"&&/^#[0-9A-Fa-f]{3}$/.test(T)&&(T="#"+T[1]+T[1]+T[2]+T[2]+T[3]+T[3]),typeof T=="string"&&/^#[0-9A-Fa-f]{6}$/.test(T)){var Dt=parseInt(T.substr(1),16);T=Dt>>16&255,z=Dt>>8&255,K=255&Dt}if(z===void 0||dt===void 0&&T===z&&z===K)v=typeof T=="string"?T+" "+vt[0]:c.precision===2?S(T/255)+" "+vt[0]:O(T/255)+" "+vt[0];else if(dt===void 0||Le(dt)==="object"){if(dt&&!isNaN(dt.a)&&dt.a===0)return["1.","1.","1.",vt[1]].join(" ");v=typeof T=="string"?[T,z,K,vt[1]].join(" "):c.precision===2?[S(T/255),S(z/255),S(K/255),vt[1]].join(" "):[O(T/255),O(z/255),O(K/255),vt[1]].join(" ")}else v=typeof T=="string"?[T,z,K,dt,vt[2]].join(" "):c.precision===2?[S(T),S(z),S(K),S(dt),vt[2]].join(" "):[O(T),O(z),O(K),O(dt),vt[2]].join(" ");return v},nr=p.__private__.getFilters=function(){return h},Wn=p.__private__.putStream=function(c){var v=(c=c||{}).data||"",T=c.filters||nr(),z=c.alreadyAppliedFilters||[],K=c.addLength1||!1,dt=v.length,vt=c.objectId,Et=function(Qe){return Qe};if(g!==null&&vt===void 0)throw new Error("ObjectId must be passed to putStream for file encryption");g!==null&&(Et=Je.encryptor(vt,0));var Dt={};T===!0&&(T=["FlateEncode"]);var Yt=c.additionalKeyValues||[],ne=(Dt=Rt.API.processDataByFilters!==void 0?Rt.API.processDataByFilters(v,T):{data:v,reverseChain:[]}).reverseChain+(Array.isArray(z)?z.join(" "):z.toString());if(Dt.data.length!==0&&(Yt.push({key:"Length",value:Dt.data.length}),K===!0&&Yt.push({key:"Length1",value:dt})),ne.length!=0)if(ne.split("/").length-1==1)Yt.push({key:"Filter",value:ne});else{Yt.push({key:"Filter",value:"["+ne+"]"});for(var ge=0;ge<Yt.length;ge+=1)if(Yt[ge].key==="DecodeParms"){for(var Re=[],Ke=0;Ke<Dt.reverseChain.split("/").length-1;Ke+=1)Re.push("null");Re.push(Yt[ge].value),Yt[ge].value="["+Re.join(" ")+"]"}}I("<<");for(var Fe=0;Fe<Yt.length;Fe++)I("/"+Yt[Fe].key+" "+Yt[Fe].value);I(">>"),Dt.data.length!==0&&(I("stream"),I(Et(Dt.data)),I("endstream"))},xi=p.__private__.putPage=function(c){var v=c.number,T=c.data,z=c.objId,K=c.contentsObjId;ln(z,!0),I("<</Type /Page"),I("/Parent "+c.rootDictionaryObjId+" 0 R"),I("/Resources "+c.resourceDictionaryObjId+" 0 R"),I("/MediaBox ["+parseFloat(Y(c.mediaBox.bottomLeftX))+" "+parseFloat(Y(c.mediaBox.bottomLeftY))+" "+Y(c.mediaBox.topRightX)+" "+Y(c.mediaBox.topRightY)+"]"),c.cropBox!==null&&I("/CropBox ["+Y(c.cropBox.bottomLeftX)+" "+Y(c.cropBox.bottomLeftY)+" "+Y(c.cropBox.topRightX)+" "+Y(c.cropBox.topRightY)+"]"),c.bleedBox!==null&&I("/BleedBox ["+Y(c.bleedBox.bottomLeftX)+" "+Y(c.bleedBox.bottomLeftY)+" "+Y(c.bleedBox.topRightX)+" "+Y(c.bleedBox.topRightY)+"]"),c.trimBox!==null&&I("/TrimBox ["+Y(c.trimBox.bottomLeftX)+" "+Y(c.trimBox.bottomLeftY)+" "+Y(c.trimBox.topRightX)+" "+Y(c.trimBox.topRightY)+"]"),c.artBox!==null&&I("/ArtBox ["+Y(c.artBox.bottomLeftX)+" "+Y(c.artBox.bottomLeftY)+" "+Y(c.artBox.topRightX)+" "+Y(c.artBox.topRightY)+"]"),typeof c.userUnit=="number"&&c.userUnit!==1&&I("/UserUnit "+c.userUnit),_e.publish("putPage",{objId:z,pageContext:Gt[v],pageNumber:v,page:T}),I("/Contents "+K+" 0 R"),I(">>"),I("endobj");var dt=T.join(`
|
|
5
5
|
`);return M===q&&(dt+=`
|
|
@@ -39,7 +39,7 @@ T* `):c.join(` Tj
|
|
|
39
39
|
`),n}},Cross:{createAppearanceStream:function(t){var n={D:{Off:Ft.RadioButton.Cross.OffPushDown},N:{}};return n.N[t]=Ft.RadioButton.Cross.YesNormal,n.D[t]=Ft.RadioButton.Cross.YesPushDown,n},getCA:function(){return"8"},YesNormal:function(t){var n=Sr(t);n.scope=t.scope;var e=[],r=Ft.internal.calculateCross(t);return e.push("q"),e.push("1 1 "+Xt(Ft.internal.getWidth(t)-2)+" "+Xt(Ft.internal.getHeight(t)-2)+" re"),e.push("W"),e.push("n"),e.push(Xt(r.x1.x)+" "+Xt(r.x1.y)+" m"),e.push(Xt(r.x2.x)+" "+Xt(r.x2.y)+" l"),e.push(Xt(r.x4.x)+" "+Xt(r.x4.y)+" m"),e.push(Xt(r.x3.x)+" "+Xt(r.x3.y)+" l"),e.push("s"),e.push("Q"),n.stream=e.join(`
|
|
40
40
|
`),n},YesPushDown:function(t){var n=Sr(t);n.scope=t.scope;var e=Ft.internal.calculateCross(t),r=[];return r.push("0.749023 g"),r.push("0 0 "+Xt(Ft.internal.getWidth(t))+" "+Xt(Ft.internal.getHeight(t))+" re"),r.push("f"),r.push("q"),r.push("1 1 "+Xt(Ft.internal.getWidth(t)-2)+" "+Xt(Ft.internal.getHeight(t)-2)+" re"),r.push("W"),r.push("n"),r.push(Xt(e.x1.x)+" "+Xt(e.x1.y)+" m"),r.push(Xt(e.x2.x)+" "+Xt(e.x2.y)+" l"),r.push(Xt(e.x4.x)+" "+Xt(e.x4.y)+" m"),r.push(Xt(e.x3.x)+" "+Xt(e.x3.y)+" l"),r.push("s"),r.push("Q"),n.stream=r.join(`
|
|
41
41
|
`),n},OffPushDown:function(t){var n=Sr(t);n.scope=t.scope;var e=[];return e.push("0.749023 g"),e.push("0 0 "+Xt(Ft.internal.getWidth(t))+" "+Xt(Ft.internal.getHeight(t))+" re"),e.push("f"),n.stream=e.join(`
|
|
42
|
-
`),n}}},createDefaultAppearanceStream:function(t){var n=t.scope.internal.getFont(t.fontName,t.fontStyle).id,e=t.scope.__private__.encodeColorString(t.color);return"/"+n+" "+t.fontSize+" Tf "+e}};Ft.internal={Bezier_C:.551915024494,calculateCross:function(t){var n=Ft.internal.getWidth(t),e=Ft.internal.getHeight(t),r=Math.min(n,e);return{x1:{x:(n-r)/2,y:(e-r)/2+r},x2:{x:(n-r)/2+r,y:(e-r)/2},x3:{x:(n-r)/2,y:(e-r)/2},x4:{x:(n-r)/2+r,y:(e-r)/2+r}}}},Ft.internal.getWidth=function(t){var n=0;return Le(t)==="object"&&(n=ku(t.Rect[2])),n},Ft.internal.getHeight=function(t){var n=0;return Le(t)==="object"&&(n=ku(t.Rect[3])),n};var wd=ze.addField=function(t){if(bd(this,t),!(t instanceof fr))throw new Error("Invalid argument passed to jsPDF.addField.");var n;return(n=t).scope.internal.acroformPlugin.printedOut&&(n.scope.internal.acroformPlugin.printedOut=!1,n.scope.internal.acroformPlugin.acroFormDictionaryRoot=null),n.scope.internal.acroformPlugin.acroFormDictionaryRoot.Fields.push(n),t.page=t.scope.internal.getCurrentPageInfo().pageNumber,this};ze.AcroFormChoiceField=La,ze.AcroFormListBox=Sa,ze.AcroFormComboBox=ka,ze.AcroFormEditBox=Bs,ze.AcroFormButton=sn,ze.AcroFormPushButton=zs,ze.AcroFormRadioButton=Pa,ze.AcroFormCheckBox=Us,ze.AcroFormTextField=Yi,ze.AcroFormPasswordField=qs,ze.AcroFormAppearance=Ft,ze.AcroForm={ChoiceField:La,ListBox:Sa,ComboBox:ka,EditBox:Bs,Button:sn,PushButton:zs,RadioButton:Pa,CheckBox:Us,TextField:Yi,PasswordField:qs,Appearance:Ft},Rt.AcroForm={ChoiceField:La,ListBox:Sa,ComboBox:ka,EditBox:Bs,Button:sn,PushButton:zs,RadioButton:Pa,CheckBox:Us,TextField:Yi,PasswordField:qs,Appearance:Ft};var _g=Rt.AcroForm;function Ju(t){return t.reduce(function(n,e,r){return n[e]=r,n},{})}(function(t){var n="addImage_";t.__addimage__={};var e="UNKNOWN",r={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=t.__addimage__.getImageFileTypeByImageData=function(S,O){var W,U,it,st,ht,nt=e;if((O=O||e)==="RGBA"||S.data!==void 0&&S.data instanceof Uint8ClampedArray&&"height"in S&&"width"in S)return"RGBA";if(mt(S))for(ht in r)for(it=r[ht],W=0;W<it.length;W+=1){for(st=!0,U=0;U<it[W].length;U+=1)if(it[W][U]!==void 0&&it[W][U]!==S[U]){st=!1;break}if(st===!0){nt=ht;break}}else for(ht in r)for(it=r[ht],W=0;W<it.length;W+=1){for(st=!0,U=0;U<it[W].length;U+=1)if(it[W][U]!==void 0&&it[W][U]!==S.charCodeAt(U)){st=!1;break}if(st===!0){nt=ht;break}}return nt===e&&O!==e&&(nt=O),nt},a=function S(O){for(var W=this.internal.write,U=this.internal.putStream,it=(0,this.internal.getFilters)();it.indexOf("FlateEncode")!==-1;)it.splice(it.indexOf("FlateEncode"),1);O.objectId=this.internal.newObject();var st=[];if(st.push({key:"Type",value:"/XObject"}),st.push({key:"Subtype",value:"/Image"}),st.push({key:"Width",value:O.width}),st.push({key:"Height",value:O.height}),O.colorSpace===N.INDEXED?st.push({key:"ColorSpace",value:"[/Indexed /DeviceRGB "+(O.palette.length/3-1)+" "+("sMask"in O&&O.sMask!==void 0?O.objectId+2:O.objectId+1)+" 0 R]"}):(st.push({key:"ColorSpace",value:"/"+O.colorSpace}),O.colorSpace===N.DEVICE_CMYK&&st.push({key:"Decode",value:"[1 0 1 0 1 0 1 0]"})),st.push({key:"BitsPerComponent",value:O.bitsPerComponent}),"decodeParameters"in O&&O.decodeParameters!==void 0&&st.push({key:"DecodeParms",value:"<<"+O.decodeParameters+">>"}),"transparency"in O&&Array.isArray(O.transparency)&&O.transparency.length>0){for(var ht="",nt=0,ut=O.transparency.length;nt<ut;nt++)ht+=O.transparency[nt]+" "+O.transparency[nt]+" ";st.push({key:"Mask",value:"["+ht+"]"})}O.sMask!==void 0&&st.push({key:"SMask",value:O.objectId+1+" 0 R"});var At=O.filter!==void 0?["/"+O.filter]:void 0;if(U({data:O.data,additionalKeyValues:st,alreadyAppliedFilters:At,objectId:O.objectId}),W("endobj"),"sMask"in O&&O.sMask!==void 0){var wt,A=(wt=O.sMaskBitsPerComponent)!==null&&wt!==void 0?wt:O.bitsPerComponent,R={width:O.width,height:O.height,colorSpace:"DeviceGray",bitsPerComponent:A,data:O.sMask};"filter"in O&&(R.decodeParameters="/Predictor ".concat(O.predictor," /Colors 1 /BitsPerComponent ").concat(A," /Columns ").concat(O.width),R.filter=O.filter),S.call(this,R)}if(O.colorSpace===N.INDEXED){var B=this.internal.newObject();U({data:Y(new Uint8Array(O.palette)),objectId:B}),W("endobj")}},h=function(){var S=this.internal.collections[n+"images"];for(var O in S)a.call(this,S[O])},l=function(){var S,O=this.internal.collections[n+"images"],W=this.internal.write;for(var U in O)W("/I"+(S=O[U]).index,S.objectId,"0","R")},f=function(){this.internal.collections[n+"images"]||(this.internal.collections[n+"images"]={},this.internal.events.subscribe("putResources",h),this.internal.events.subscribe("putXobjectDict",l))},u=function(){var S=this.internal.collections[n+"images"];return f.call(this),S},g=function(){return Object.keys(this.internal.collections[n+"images"]).length},y=function(S){return typeof t["process"+S.toUpperCase()]=="function"},x=function(S){return Le(S)==="object"&&S.nodeType===1},p=function(S,O){if(S.nodeName==="IMG"&&S.hasAttribute("src")){var W=""+S.getAttribute("src");if(W.indexOf("data:image/")===0)return js(unescape(W).split("base64,").pop());var U=t.loadFile(W,!0);if(U!==void 0)return U}if(S.nodeName==="CANVAS"){if(S.width===0||S.height===0)throw new Error("Given canvas must have data. Canvas width: "+S.width+", height: "+S.height);var it;switch(O){case"PNG":it="image/png";break;case"WEBP":it="image/webp";break;default:it="image/jpeg"}return js(S.toDataURL(it,1).split("base64,").pop())}},F=function(S){var O=this.internal.collections[n+"images"];if(O){for(var W in O)if(S===O[W].alias)return O[W]}},P=function(S,O,W){return S||O||(S=-96,O=-96),S<0&&(S=-1*W.width*72/S/this.internal.scaleFactor),O<0&&(O=-1*W.height*72/O/this.internal.scaleFactor),S===0&&(S=O*W.width/W.height),O===0&&(O=S*W.height/W.width),[S,O]},D=function(S,O,W,U,it,st){var ht=P.call(this,W,U,it),nt=this.internal.getCoordinateString,ut=this.internal.getVerticalCoordinateString,At=u.call(this);if(W=ht[0],U=ht[1],At[it.index]=it,st){st*=Math.PI/180;var wt=Math.cos(st),A=Math.sin(st),R=function(G){return G.toFixed(4)},B=[R(wt),R(A),R(-1*A),R(wt),0,0,"cm"]}this.internal.write("q"),st?(this.internal.write([1,"0","0",1,nt(S),ut(O+U),"cm"].join(" ")),this.internal.write(B.join(" ")),this.internal.write([nt(W),"0","0",nt(U),"0","0","cm"].join(" "))):this.internal.write([nt(W),"0","0",nt(U),nt(S),ut(O+U),"cm"].join(" ")),this.isAdvancedAPI()&&this.internal.write([1,0,0,-1,0,0,"cm"].join(" ")),this.internal.write("/I"+it.index+" Do"),this.internal.write("Q")},N=t.color_spaces={DEVICE_RGB:"DeviceRGB",DEVICE_GRAY:"DeviceGray",DEVICE_CMYK:"DeviceCMYK",CAL_GREY:"CalGray",CAL_RGB:"CalRGB",LAB:"Lab",ICC_BASED:"ICCBased",INDEXED:"Indexed",PATTERN:"Pattern",SEPARATION:"Separation",DEVICE_N:"DeviceN"};t.decode={DCT_DECODE:"DCTDecode",FLATE_DECODE:"FlateDecode",LZW_DECODE:"LZWDecode",JPX_DECODE:"JPXDecode",JBIG2_DECODE:"JBIG2Decode",ASCII85_DECODE:"ASCII85Decode",ASCII_HEX_DECODE:"ASCIIHexDecode",RUN_LENGTH_DECODE:"RunLengthDecode",CCITT_FAX_DECODE:"CCITTFaxDecode"};var H=t.image_compression={NONE:"NONE",FAST:"FAST",MEDIUM:"MEDIUM",SLOW:"SLOW"},q=t.__addimage__.sHashCode=function(S){var O,W,U=0;if(typeof S=="string")for(W=S.length,O=0;O<W;O++)U=(U<<5)-U+S.charCodeAt(O),U|=0;else if(mt(S))for(W=S.byteLength/2,O=0;O<W;O++)U=(U<<5)-U+S[O],U|=0;return U},M=t.__addimage__.validateStringAsBase64=function(S){(S=S||"").toString().trim();var O=!0;return S.length===0&&(O=!1),S.length%4!=0&&(O=!1),/^[A-Za-z0-9+/]+$/.test(S.substr(0,S.length-2))===!1&&(O=!1),/^[A-Za-z0-9/][A-Za-z0-9+/]|[A-Za-z0-9+/]=|==$/.test(S.substr(-2))===!1&&(O=!1),O},rt=t.__addimage__.extractImageFromDataUrl=function(S){if(S==null||!(S=S.trim()).startsWith("data:"))return null;var O=S.indexOf(",");return O<0?null:S.substring(0,O).trim().endsWith("base64")?S.substring(O+1):null};t.__addimage__.isArrayBuffer=function(S){return S instanceof ArrayBuffer};var mt=t.__addimage__.isArrayBufferView=function(S){return S instanceof Int8Array||S instanceof Uint8Array||S instanceof Uint8ClampedArray||S instanceof Int16Array||S instanceof Uint16Array||S instanceof Int32Array||S instanceof Uint32Array||S instanceof Float32Array||S instanceof Float64Array},ct=t.__addimage__.binaryStringToUint8Array=function(S){for(var O=S.length,W=new Uint8Array(O),U=0;U<O;U++)W[U]=S.charCodeAt(U);return W},Y=t.__addimage__.arrayBufferToBinaryString=function(S){for(var O="",W=mt(S)?S:new Uint8Array(S),U=0;U<W.length;U+=8192)O+=String.fromCharCode.apply(null,W.subarray(U,U+8192));return O};t.addImage=function(){var S,O,W,U,it,st,ht,nt,ut;if(typeof arguments[1]=="number"?(O=e,W=arguments[1],U=arguments[2],it=arguments[3],st=arguments[4],ht=arguments[5],nt=arguments[6],ut=arguments[7]):(O=arguments[1],W=arguments[2],U=arguments[3],it=arguments[4],st=arguments[5],ht=arguments[6],nt=arguments[7],ut=arguments[8]),Le(S=arguments[0])==="object"&&!x(S)&&"imageData"in S){var At=S;S=At.imageData,O=At.format||O||e,W=At.x||W||0,U=At.y||U||0,it=At.w||At.width||it,st=At.h||At.height||st,ht=At.alias||ht,nt=At.compression||nt,ut=At.rotation||At.angle||ut}var wt=this.internal.getFilters();if(nt===void 0&&wt.indexOf("FlateEncode")!==-1&&(nt="SLOW"),isNaN(W)||isNaN(U))throw new Error("Invalid coordinates passed to jsPDF.addImage");f.call(this);var A=j.call(this,S,O,ht,nt);return D.call(this,W,U,it,st,A,ut),this};var j=function(S,O,W,U){var it,st,ht;if(typeof S=="string"&&i(S)===e){S=unescape(S);var nt=tt(S,!1);(nt!==""||(nt=t.loadFile(S,!0))!==void 0)&&(S=nt)}if(x(S)&&(S=p(S,O)),O=i(S,O),!y(O))throw new Error("addImage does not support files of type '"+O+"', please ensure that a plugin for '"+O+"' support is added.");if(((ht=W)==null||ht.length===0)&&(W=(function(ut){return typeof ut=="string"||mt(ut)?q(ut):mt(ut.data)?q(ut.data):null})(S)),(it=F.call(this,W))||(S instanceof Uint8Array||O==="RGBA"||(st=S,S=ct(S)),it=this["process"+O.toUpperCase()](S,g.call(this),W,(function(ut){return ut&&typeof ut=="string"&&(ut=ut.toUpperCase()),ut in t.image_compression?ut:H.NONE})(U),st)),!it)throw new Error("An unknown error occurred whilst processing the image.");return it},tt=t.__addimage__.convertBase64ToBinaryString=function(S,O){O=typeof O!="boolean"||O;var W,U="";if(typeof S=="string"){var it;W=(it=rt(S))!==null&&it!==void 0?it:S;try{U=js(W)}catch(st){if(O)throw M(W)?new Error("atob-Error in jsPDF.convertBase64ToBinaryString "+st.message):new Error("Supplied Data is not a valid base64-String jsPDF.convertBase64ToBinaryString ")}}return U};t.getImageProperties=function(S){var O,W,U="";if(x(S)&&(S=p(S)),typeof S=="string"&&i(S)===e&&((U=tt(S,!1))===""&&(U=t.loadFile(S)||""),S=U),W=i(S),!y(W))throw new Error("addImage does not support files of type '"+W+"', please ensure that a plugin for '"+W+"' support is added.");if(S instanceof Uint8Array||(S=ct(S)),!(O=this["process"+W.toUpperCase()](S)))throw new Error("An unknown error occurred whilst processing the image");return O.fileType=W,O}})(Rt.API),(function(t){var n=function(e){if(e!==void 0&&e!="")return!0};Rt.API.events.push(["addPage",function(e){this.internal.getPageInfo(e.pageNumber).pageContext.annotations=[]}]),t.events.push(["putPage",function(e){for(var r,i,a,h=this.internal.getCoordinateString,l=this.internal.getVerticalCoordinateString,f=this.internal.getPageInfoByObjId(e.objId),u=e.pageContext.annotations,g=!1,y=0;y<u.length&&!g;y++)switch((r=u[y]).type){case"link":(n(r.options.url)||n(r.options.pageNumber))&&(g=!0);break;case"reference":case"text":case"freetext":g=!0}if(g!=0){this.internal.write("/Annots [");for(var x=0;x<u.length;x++){r=u[x];var p=this.internal.pdfEscape,F=this.internal.getEncryptor(e.objId);switch(r.type){case"reference":this.internal.write(" "+r.object.objId+" 0 R ");break;case"text":var P=this.internal.newAdditionalObject(),D=this.internal.newAdditionalObject(),N=this.internal.getEncryptor(P.objId),H=r.title||"Note";a="<</Type /Annot /Subtype /Text "+(i="/Rect ["+h(r.bounds.x)+" "+l(r.bounds.y+r.bounds.h)+" "+h(r.bounds.x+r.bounds.w)+" "+l(r.bounds.y)+"] ")+"/Contents ("+p(N(r.contents))+")",a+=" /Popup "+D.objId+" 0 R",a+=" /P "+f.objId+" 0 R",a+=" /T ("+p(N(H))+") >>",P.content=a;var q=P.objId+" 0 R";a="<</Type /Annot /Subtype /Popup "+(i="/Rect ["+h(r.bounds.x+30)+" "+l(r.bounds.y+r.bounds.h)+" "+h(r.bounds.x+r.bounds.w+30)+" "+l(r.bounds.y)+"] ")+" /Parent "+q,r.open&&(a+=" /Open true"),a+=" >>",D.content=a,this.internal.write(P.objId,"0 R",D.objId,"0 R");break;case"freetext":i="/Rect ["+h(r.bounds.x)+" "+l(r.bounds.y)+" "+h(r.bounds.x+r.bounds.w)+" "+l(r.bounds.y+r.bounds.h)+"] ";var M=r.color||"#000000";a="<</Type /Annot /Subtype /FreeText "+i+"/Contents ("+p(F(r.contents))+")",a+=" /DS(font: Helvetica,sans-serif 12.0pt; text-align:left; color:#"+M+")",a+=" /Border [0 0 0]",a+=" >>",this.internal.write(a);break;case"link":if(r.options.name){var rt=this.annotations._nameMap[r.options.name];r.options.pageNumber=rt.page,r.options.top=rt.y}else r.options.top||(r.options.top=0);if(i="/Rect ["+r.finalBounds.x+" "+r.finalBounds.y+" "+r.finalBounds.w+" "+r.finalBounds.h+"] ",a="",r.options.url)a="<</Type /Annot /Subtype /Link "+i+"/Border [0 0 0] /A <</S /URI /URI ("+p(F(r.options.url))+") >>";else if(r.options.pageNumber)switch(a="<</Type /Annot /Subtype /Link "+i+"/Border [0 0 0] /Dest ["+this.internal.getPageInfo(r.options.pageNumber).objId+" 0 R",r.options.magFactor=r.options.magFactor||"XYZ",r.options.magFactor){case"Fit":a+=" /Fit]";break;case"FitH":a+=" /FitH "+r.options.top+"]";break;case"FitV":r.options.left=r.options.left||0,a+=" /FitV "+r.options.left+"]";break;default:var mt=l(r.options.top);r.options.left=r.options.left||0,r.options.zoom===void 0&&(r.options.zoom=0),a+=" /XYZ "+r.options.left+" "+mt+" "+r.options.zoom+"]"}a!=""&&(a+=" >>",this.internal.write(a))}}this.internal.write("]")}}]),t.createAnnotation=function(e){var r=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":r.pageContext.annotations.push(e)}},t.link=function(e,r,i,a,h){var l=this.internal.getCurrentPageInfo(),f=this.internal.getCoordinateString,u=this.internal.getVerticalCoordinateString;l.pageContext.annotations.push({finalBounds:{x:f(e),y:u(r),w:f(e+i),h:u(r+a)},options:h,type:"link"})},t.textWithLink=function(e,r,i,a){var h,l,f=this.getTextWidth(e),u=this.internal.getLineHeight()/this.internal.scaleFactor;if(a.maxWidth!==void 0){l=a.maxWidth;var g=this.splitTextToSize(e,l).length;h=Math.ceil(u*g)}else l=f,h=u;return this.text(e,r,i,a),i+=.2*u,a.align==="center"&&(r-=f/2),a.align==="right"&&(r-=f),this.link(r,i-u,l,h,a),f},t.getTextWidth=function(e){var r=this.internal.getFontSize();return this.getStringUnitWidth(e)*r/this.internal.scaleFactor}})(Rt.API),(function(t){var n={1569:[65152],1570:[65153,65154],1571:[65155,65156],1572:[65157,65158],1573:[65159,65160],1574:[65161,65162,65163,65164],1575:[65165,65166],1576:[65167,65168,65169,65170],1577:[65171,65172],1578:[65173,65174,65175,65176],1579:[65177,65178,65179,65180],1580:[65181,65182,65183,65184],1581:[65185,65186,65187,65188],1582:[65189,65190,65191,65192],1583:[65193,65194],1584:[65195,65196],1585:[65197,65198],1586:[65199,65200],1587:[65201,65202,65203,65204],1588:[65205,65206,65207,65208],1589:[65209,65210,65211,65212],1590:[65213,65214,65215,65216],1591:[65217,65218,65219,65220],1592:[65221,65222,65223,65224],1593:[65225,65226,65227,65228],1594:[65229,65230,65231,65232],1601:[65233,65234,65235,65236],1602:[65237,65238,65239,65240],1603:[65241,65242,65243,65244],1604:[65245,65246,65247,65248],1605:[65249,65250,65251,65252],1606:[65253,65254,65255,65256],1607:[65257,65258,65259,65260],1608:[65261,65262],1609:[65263,65264,64488,64489],1610:[65265,65266,65267,65268],1649:[64336,64337],1655:[64477],1657:[64358,64359,64360,64361],1658:[64350,64351,64352,64353],1659:[64338,64339,64340,64341],1662:[64342,64343,64344,64345],1663:[64354,64355,64356,64357],1664:[64346,64347,64348,64349],1667:[64374,64375,64376,64377],1668:[64370,64371,64372,64373],1670:[64378,64379,64380,64381],1671:[64382,64383,64384,64385],1672:[64392,64393],1676:[64388,64389],1677:[64386,64387],1678:[64390,64391],1681:[64396,64397],1688:[64394,64395],1700:[64362,64363,64364,64365],1702:[64366,64367,64368,64369],1705:[64398,64399,64400,64401],1709:[64467,64468,64469,64470],1711:[64402,64403,64404,64405],1713:[64410,64411,64412,64413],1715:[64406,64407,64408,64409],1722:[64414,64415],1723:[64416,64417,64418,64419],1726:[64426,64427,64428,64429],1728:[64420,64421],1729:[64422,64423,64424,64425],1733:[64480,64481],1734:[64473,64474],1735:[64471,64472],1736:[64475,64476],1737:[64482,64483],1739:[64478,64479],1740:[64508,64509,64510,64511],1744:[64484,64485,64486,64487],1746:[64430,64431],1747:[64432,64433]},e={65247:{65154:65269,65156:65271,65160:65273,65166:65275},65248:{65154:65270,65156:65272,65160:65274,65166:65276},65165:{65247:{65248:{65258:65010}}},1617:{1612:64606,1613:64607,1614:64608,1615:64609,1616:64610}},r={1612:64606,1613:64607,1614:64608,1615:64609,1616:64610},i=[1570,1571,1573,1575];t.__arabicParser__={};var a=t.__arabicParser__.isInArabicSubstitutionA=function(P){return n[P.charCodeAt(0)]!==void 0},h=t.__arabicParser__.isArabicLetter=function(P){return typeof P=="string"&&/^[\u0600-\u06FF\u0750-\u077F\u08A0-\u08FF\uFB50-\uFDFF\uFE70-\uFEFF]+$/.test(P)},l=t.__arabicParser__.isArabicEndLetter=function(P){return h(P)&&a(P)&&n[P.charCodeAt(0)].length<=2},f=t.__arabicParser__.isArabicAlfLetter=function(P){return h(P)&&i.indexOf(P.charCodeAt(0))>=0};t.__arabicParser__.arabicLetterHasIsolatedForm=function(P){return h(P)&&a(P)&&n[P.charCodeAt(0)].length>=1};var u=t.__arabicParser__.arabicLetterHasFinalForm=function(P){return h(P)&&a(P)&&n[P.charCodeAt(0)].length>=2};t.__arabicParser__.arabicLetterHasInitialForm=function(P){return h(P)&&a(P)&&n[P.charCodeAt(0)].length>=3};var g=t.__arabicParser__.arabicLetterHasMedialForm=function(P){return h(P)&&a(P)&&n[P.charCodeAt(0)].length==4},y=t.__arabicParser__.resolveLigatures=function(P){var D=0,N=e,H="",q=0;for(D=0;D<P.length;D+=1)N[P.charCodeAt(D)]!==void 0?(q++,typeof(N=N[P.charCodeAt(D)])=="number"&&(H+=String.fromCharCode(N),N=e,q=0),D===P.length-1&&(N=e,H+=P.charAt(D-(q-1)),D-=q-1,q=0)):(N=e,H+=P.charAt(D-q),D-=q,q=0);return H};t.__arabicParser__.isArabicDiacritic=function(P){return P!==void 0&&r[P.charCodeAt(0)]!==void 0};var x=t.__arabicParser__.getCorrectForm=function(P,D,N){return h(P)?a(P)===!1?-1:!u(P)||!h(D)&&!h(N)||!h(N)&&l(D)||l(P)&&!h(D)||l(P)&&f(D)||l(P)&&l(D)?0:g(P)&&h(D)&&!l(D)&&h(N)&&u(N)?3:l(P)||!h(N)?1:2:-1},p=function(P){var D=0,N=0,H=0,q="",M="",rt="",mt=(P=P||"").split("\\s+"),ct=[];for(D=0;D<mt.length;D+=1){for(ct.push(""),N=0;N<mt[D].length;N+=1)q=mt[D][N],M=mt[D][N-1],rt=mt[D][N+1],h(q)?(H=x(q,M,rt),ct[D]+=H!==-1?String.fromCharCode(n[q.charCodeAt(0)][H]):q):ct[D]+=q;ct[D]=y(ct[D])}return ct.join(" ")},F=t.__arabicParser__.processArabic=t.processArabic=function(){var P,D=typeof arguments[0]=="string"?arguments[0]:arguments[0].text,N=[];if(Array.isArray(D)){var H=0;for(N=[],H=0;H<D.length;H+=1)Array.isArray(D[H])?N.push([p(D[H][0]),D[H][1],D[H][2]]):N.push([p(D[H])]);P=N}else P=p(D);return typeof arguments[0]=="string"?P:(arguments[0].text=P,arguments[0])};t.events.push(["preProcessText",F])})(Rt.API),Rt.API.autoPrint=function(t){var n;return(t=t||{}).variant=t.variant||"non-conform",t.variant==="javascript"?this.addJS("print({});"):(this.internal.events.subscribe("postPutResources",function(){n=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/S /Named"),this.internal.out("/Type /Action"),this.internal.out("/N /Print"),this.internal.out(">>"),this.internal.out("endobj")}),this.internal.events.subscribe("putCatalog",function(){this.internal.out("/OpenAction "+n+" 0 R")})),this},(function(t){var n=function(){var e=void 0;Object.defineProperty(this,"pdf",{get:function(){return e},set:function(l){e=l}});var r=150;Object.defineProperty(this,"width",{get:function(){return r},set:function(l){r=isNaN(l)||Number.isInteger(l)===!1||l<0?150:l,this.getContext("2d").pageWrapXEnabled&&(this.getContext("2d").pageWrapX=r+1)}});var i=300;Object.defineProperty(this,"height",{get:function(){return i},set:function(l){i=isNaN(l)||Number.isInteger(l)===!1||l<0?300:l,this.getContext("2d").pageWrapYEnabled&&(this.getContext("2d").pageWrapY=i+1)}});var a=[];Object.defineProperty(this,"childNodes",{get:function(){return a},set:function(l){a=l}});var h={};Object.defineProperty(this,"style",{get:function(){return h},set:function(l){h=l}}),Object.defineProperty(this,"parentNode",{})};n.prototype.getContext=function(e,r){var i;if((e=e||"2d")!=="2d")return null;for(i in r)this.pdf.context2d.hasOwnProperty(i)&&(this.pdf.context2d[i]=r[i]);return this.pdf.context2d._canvas=this,this.pdf.context2d},n.prototype.toDataURL=function(){throw new Error("toDataURL is not implemented.")},t.events.push(["initialized",function(){this.canvas=new n,this.canvas.pdf=this}])})(Rt.API),(function(t){var n={left:0,top:0,bottom:0,right:0},e=!1,r=function(){this.internal.__cell__===void 0&&(this.internal.__cell__={},this.internal.__cell__.padding=3,this.internal.__cell__.headerFunction=void 0,this.internal.__cell__.margins=Object.assign({},n),this.internal.__cell__.margins.width=this.getPageWidth(),i.call(this))},i=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 u=arguments[1];Object.defineProperty(this,"y",{enumerable:!0,get:function(){return u},set:function(P){u=P}});var g=arguments[2];Object.defineProperty(this,"width",{enumerable:!0,get:function(){return g},set:function(P){g=P}});var y=arguments[3];Object.defineProperty(this,"height",{enumerable:!0,get:function(){return y},set:function(P){y=P}});var x=arguments[4];Object.defineProperty(this,"text",{enumerable:!0,get:function(){return x},set:function(P){x=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]},t.setHeaderFunction=function(f){return r.call(this),this.internal.__cell__.headerFunction=typeof f=="function"?f:void 0,this},t.getTextDimensions=function(f,u){r.call(this);var g=(u=u||{}).fontSize||this.getFontSize(),y=u.font||this.getFont(),x=u.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 N=u.maxWidth;N>0?typeof f=="string"?f=this.splitTextToSize(f,N):Object.prototype.toString.call(f)==="[object Array]"&&(f=f.reduce(function(q,M){return q.concat(D.splitTextToSize(M,N))},[])):f=Array.isArray(f)?f:[f];for(var H=0;H<f.length;H++)p<(P=this.getStringUnitWidth(f[H],{font:y})*g)&&(p=P);return p!==0&&(F=f.length),{w:p/=x,h:Math.max((F*g*this.getLineHeightFactor()-g*(this.getLineHeightFactor()-1))/x,0)}},t.cellAddPage=function(){r.call(this),this.addPage();var f=this.internal.__cell__.margins||n;return this.internal.__cell__.lastCell=new a(f.left,f.top,void 0,void 0),this.internal.__cell__.pages+=1,this};var h=t.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],arguments[6]),r.call(this);var u=this.internal.__cell__.lastCell,g=this.internal.__cell__.padding,y=this.internal.__cell__.margins||n,x=this.internal.__cell__.tableHeaderRow,p=this.internal.__cell__.printHeaders;return u.lineNumber!==void 0&&(u.lineNumber===f.lineNumber?(f.x=(u.x||0)+(u.width||0),f.y=u.y||0):u.y+u.height+f.height+y.bottom>this.getPageHeight()?(this.cellAddPage(),f.y=y.top,p&&x&&(this.printHeaderRow(f.lineNumber,!0),f.y+=x[0].height)):f.y=u.y+u.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-g,f.y+g,{align:"right",baseline:"top"}):f.align==="center"?this.text(f.text,f.x+f.width/2,f.y+g,{align:"center",baseline:"top",maxWidth:f.width-g-g}):this.text(f.text,f.x+g,f.y+g,{align:"left",baseline:"top",maxWidth:f.width-g-g})),this.internal.__cell__.lastCell=f,this};t.table=function(f,u,g,y,x){if(r.call(this),!g)throw new Error("No data for PDF table.");var p,F,P,D,N=[],H=[],q=[],M={},rt={},mt=[],ct=[],Y=(x=x||{}).autoSize||!1,j=x.printHeaders!==!1,tt=x.css&&x.css["font-size"]!==void 0?16*x.css["font-size"]:x.fontSize||12,S=x.margins||Object.assign({width:this.getPageWidth()},n),O=typeof x.padding=="number"?x.padding:3,W=x.headerBackgroundColor||"#c8c8c8",U=x.headerTextColor||"#000";if(i.call(this),this.internal.__cell__.printHeaders=j,this.internal.__cell__.margins=S,this.internal.__cell__.table_font_size=tt,this.internal.__cell__.padding=O,this.internal.__cell__.headerBackgroundColor=W,this.internal.__cell__.headerTextColor=U,this.setFontSize(tt),y==null)H=N=Object.keys(g[0]),q=N.map(function(){return"left"});else if(Array.isArray(y)&&Le(y[0])==="object")for(N=y.map(function(At){return At.name}),H=y.map(function(At){return At.prompt||At.name||""}),q=y.map(function(At){return At.align||"left"}),p=0;p<y.length;p+=1)rt[y[p].name]=.7499990551181103*y[p].width;else Array.isArray(y)&&typeof y[0]=="string"&&(H=N=y,q=N.map(function(){return"left"}));if(Y||Array.isArray(y)&&typeof y[0]=="string")for(p=0;p<N.length;p+=1){for(M[D=N[p]]=g.map(function(At){return At[D]}),this.setFont(void 0,"bold"),mt.push(this.getTextDimensions(H[p],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w),F=M[D],this.setFont(void 0,"normal"),P=0;P<F.length;P+=1)mt.push(this.getTextDimensions(F[P],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w);rt[D]=Math.max.apply(null,mt)+O+O,mt=[]}if(j){var it={};for(p=0;p<N.length;p+=1)it[N[p]]={},it[N[p]].text=H[p],it[N[p]].align=q[p];var st=l.call(this,it,rt);ct=N.map(function(At){return new a(f,u,rt[At],st,it[At].text,void 0,it[At].align)}),this.setTableHeaderRow(ct),this.printHeaderRow(1,!1)}var ht=y.reduce(function(At,wt){return At[wt.name]=wt.align,At},{});for(p=0;p<g.length;p+=1){"rowStart"in x&&x.rowStart instanceof Function&&x.rowStart({row:p,data:g[p]},this);var nt=l.call(this,g[p],rt);for(P=0;P<N.length;P+=1){var ut=g[p][N[P]];"cellStart"in x&&x.cellStart instanceof Function&&x.cellStart({row:p,col:P,data:ut},this),h.call(this,new a(f,u,rt[N[P]],nt,ut,p+2,ht[N[P]]))}}return this.internal.__cell__.table_x=f,this.internal.__cell__.table_y=u,this};var l=function(f,u){var g=this.internal.__cell__.padding,y=this.internal.__cell__.table_font_size,x=this.internal.scaleFactor;return Object.keys(f).map(function(p){var F=f[p];return this.splitTextToSize(F.hasOwnProperty("text")?F.text:F,u[p]-g-g)},this).map(function(p){return this.getLineHeightFactor()*p.length*y/x+g+g},this).reduce(function(p,F){return Math.max(p,F)},0)};t.setTableHeaderRow=function(f){r.call(this),this.internal.__cell__.tableHeaderRow=f},t.printHeaderRow=function(f,u){if(r.call(this),!this.internal.__cell__.tableHeaderRow)throw new Error("Property tableHeaderRow does not exist.");var g;if(e=!0,typeof this.internal.__cell__.headerFunction=="function"){var y=this.internal.__cell__.headerFunction(this,this.internal.__cell__.pages);this.internal.__cell__.lastCell=new a(y[0],y[1],y[2],y[3],void 0,-1)}this.setFont(void 0,"bold");for(var x=[],p=0;p<this.internal.__cell__.tableHeaderRow.length;p+=1){g=this.internal.__cell__.tableHeaderRow[p].clone(),u&&(g.y=this.internal.__cell__.margins.top||0,x.push(g)),g.lineNumber=f;var F=this.getTextColor();this.setTextColor(this.internal.__cell__.headerTextColor),this.setFillColor(this.internal.__cell__.headerBackgroundColor),h.call(this,g),this.setTextColor(F)}x.length>0&&this.setTableHeaderRow(x),this.setFont(void 0,"normal"),e=!1}})(Rt.API);var Qu={italic:["italic","oblique","normal"],oblique:["oblique","italic","normal"],normal:["normal","oblique","italic"]},t1=["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded"],Fh=Ju(t1),e1=[100,200,300,400,500,600,700,800,900],yd=Ju(e1);function Ah(t){var n=t.family.replace(/"|'/g,"").toLowerCase(),e=(function(a){return Qu[a=a||"normal"]?a:"normal"})(t.style),r=(function(a){return a?typeof a=="number"?a>=100&&a<=900&&a%100==0?a:400:/^\d00$/.test(a)?parseInt(a):a==="bold"?700:400:400})(t.weight),i=(function(a){return typeof Fh[a=a||"normal"]=="number"?a:"normal"})(t.stretch);return{family:n,style:e,weight:r,stretch:i,src:t.src||[],ref:t.ref||{name:n,style:[i,e,r].join(" ")}}}function Pu(t,n,e,r){var i;for(i=e;i>=0&&i<n.length;i+=r)if(t[n[i]])return t[n[i]];for(i=e;i>=0&&i<n.length;i-=r)if(t[n[i]])return t[n[i]]}var _d={"sans-serif":"helvetica",fixed:"courier",monospace:"courier",terminal:"courier",cursive:"times",fantasy:"times",serif:"times"},Iu={caption:"times",icon:"times",menu:"times","message-box":"times","small-caption":"times","status-bar":"times"};function Fu(t){return[t.stretch,t.style,t.weight,t.family].join(" ")}function Eu(t){return t.trimLeft()}function xd(t,n){for(var e=0;e<t.length;){if(t.charAt(e)===n)return[t.substring(0,e),t.substring(e+1)];e+=1}return null}function Ad(t){var n=t.match(/^(-[a-z_]|[a-z_])[a-z0-9_-]*/i);return n===null?null:[n[0],t.substring(n[0].length)]}var Rs,Cu,Ou,_a,Ms,Tu,Du,Ru,Nh=["times"];function Mu(t,n,e,r,i){var a=4,h=Bu;switch(i){case Rt.API.image_compression.FAST:a=1,h=ju;break;case Rt.API.image_compression.MEDIUM:a=6,h=zu;break;case Rt.API.image_compression.SLOW:a=9,h=Uu}t=(function(f,u,g,y){for(var x,p=f.length/u,F=new Uint8Array(f.length+p),P=[Nd,ju,Bu,zu,Uu],D=0;D<p;D+=1){var N=D*u,H=f.subarray(N,N+u);if(y)F.set(y(H,g,x),N+D);else{for(var q=P.length,M=[],rt=0;rt<q;rt+=1)M[rt]=P[rt](H,g,x);var mt=Sd(M.concat());F.set(M[mt],N+D)}x=H}return F})(t,n,Math.ceil(e*r/8),h);var l=ds(t,{level:a});return Rt.API.__addimage__.arrayBufferToBinaryString(l)}function Nd(t){var n=Array.apply([],t);return n.unshift(0),n}function ju(t,n){var e=t.length,r=[];r[0]=1;for(var i=0;i<e;i+=1){var a=t[i-n]||0;r[i+1]=t[i]-a+256&255}return r}function Bu(t,n,e){var r=t.length,i=[];i[0]=2;for(var a=0;a<r;a+=1){var h=e&&e[a]||0;i[a+1]=t[a]-h+256&255}return i}function zu(t,n,e){var r=t.length,i=[];i[0]=3;for(var a=0;a<r;a+=1){var h=t[a-n]||0,l=e&&e[a]||0;i[a+1]=t[a]+256-(h+l>>>1)&255}return i}function Uu(t,n,e){var r=t.length,i=[];i[0]=4;for(var a=0;a<r;a+=1){var h=Ld(t[a-n]||0,e&&e[a]||0,e&&e[a-n]||0);i[a+1]=t[a]-h+256&255}return i}function Ld(t,n,e){if(t===n&&n===e)return t;var r=Math.abs(n-e),i=Math.abs(t-e),a=Math.abs(t+n-e-e);return r<=i&&r<=a?t:i<=a?n:e}function Sd(t){var n=t.map(function(e){return e.reduce(function(r,i){return r+Math.abs(i)},0)});return n.indexOf(Math.min.apply(null,n))}function Lh(t,n,e){var r=n*e,i=Math.floor(r/8),a=16-(r-8*i+e),h=(1<<e)-1;return n1(t,i)>>a&h}function qu(t,n,e,r){var i=e*r,a=Math.floor(i/8),h=16-(i-8*a+r),l=(1<<r)-1,f=(n&l)<<h;(function(u,g,y){if(g+1<u.byteLength)u.setUint16(g,y,!1);else{var x=y>>8&255;u.setUint8(g,x)}})(t,a,n1(t,a)&~(l<<h)&65535|f)}function n1(t,n){return n+1<t.byteLength?t.getUint16(n,!1):t.getUint8(n)<<8}function kd(t){var n=0;if(t[n++]!==71||t[n++]!==73||t[n++]!==70||t[n++]!==56||(t[n++]+1&253)!=56||t[n++]!==97)throw new Error("Invalid GIF 87a/89a header.");var e=t[n++]|t[n++]<<8,r=t[n++]|t[n++]<<8,i=t[n++],a=i>>7,h=1<<1+(7&i);t[n++],t[n++];var l=null,f=null;a&&(l=n,f=h,n+=3*h);var u=!0,g=[],y=0,x=null,p=0,F=null;for(this.width=e,this.height=r;u&&n<t.length;)switch(t[n++]){case 33:switch(t[n++]){case 255:if(t[n]!==11||t[n+1]==78&&t[n+2]==69&&t[n+3]==84&&t[n+4]==83&&t[n+5]==67&&t[n+6]==65&&t[n+7]==80&&t[n+8]==69&&t[n+9]==50&&t[n+10]==46&&t[n+11]==48&&t[n+12]==3&&t[n+13]==1&&t[n+16]==0)n+=14,F=t[n++]|t[n++]<<8,n++;else for(n+=12;;){if(!((S=t[n++])>=0))throw Error("Invalid block size");if(S===0)break;n+=S}break;case 249:if(t[n++]!==4||t[n+4]!==0)throw new Error("Invalid graphics extension block.");var P=t[n++];y=t[n++]|t[n++]<<8,x=t[n++],1&P||(x=null),p=P>>2&7,n++;break;case 254:for(;;){if(!((S=t[n++])>=0))throw Error("Invalid block size");if(S===0)break;n+=S}break;default:throw new Error("Unknown graphic control label: 0x"+t[n-1].toString(16))}break;case 44:var D=t[n++]|t[n++]<<8,N=t[n++]|t[n++]<<8,H=t[n++]|t[n++]<<8,q=t[n++]|t[n++]<<8,M=t[n++],rt=M>>6&1,mt=1<<1+(7&M),ct=l,Y=f,j=!1;M>>7&&(j=!0,ct=n,Y=mt,n+=3*mt);var tt=n;for(n++;;){var S;if(!((S=t[n++])>=0))throw Error("Invalid block size");if(S===0)break;n+=S}g.push({x:D,y:N,width:H,height:q,has_local_palette:j,palette_offset:ct,palette_size:Y,data_offset:tt,data_length:n-tt,transparent_index:x,interlaced:!!rt,delay:y,disposal:p});break;case 59:u=!1;break;default:throw new Error("Unknown gif block: 0x"+t[n-1].toString(16))}this.numFrames=function(){return g.length},this.loopCount=function(){return F},this.frameInfo=function(O){if(O<0||O>=g.length)throw new Error("Frame index out of range.");return g[O]},this.decodeAndBlitFrameBGRA=function(O,W){var U=this.frameInfo(O),it=U.width*U.height,st=new Uint8Array(it);Hu(t,U.data_offset,st,it);var ht=U.palette_offset,nt=U.transparent_index;nt===null&&(nt=256);var ut=U.width,At=e-ut,wt=ut,A=4*(U.y*e+U.x),R=4*((U.y+U.height)*e+U.x),B=A,G=4*At;U.interlaced===!0&&(G+=4*e*7);for(var $=8,J=0,at=st.length;J<at;++J){var ot=st[J];if(wt===0&&(wt=ut,(B+=G)>=R&&(G=4*At+4*e*($-1),B=A+(ut+At)*($<<1),$>>=1)),ot===nt)B+=4;else{var gt=t[ht+3*ot],xt=t[ht+3*ot+1],kt=t[ht+3*ot+2];W[B++]=kt,W[B++]=xt,W[B++]=gt,W[B++]=255}--wt}},this.decodeAndBlitFrameRGBA=function(O,W){var U=this.frameInfo(O),it=U.width*U.height,st=new Uint8Array(it);Hu(t,U.data_offset,st,it);var ht=U.palette_offset,nt=U.transparent_index;nt===null&&(nt=256);var ut=U.width,At=e-ut,wt=ut,A=4*(U.y*e+U.x),R=4*((U.y+U.height)*e+U.x),B=A,G=4*At;U.interlaced===!0&&(G+=4*e*7);for(var $=8,J=0,at=st.length;J<at;++J){var ot=st[J];if(wt===0&&(wt=ut,(B+=G)>=R&&(G=4*At+4*e*($-1),B=A+(ut+At)*($<<1),$>>=1)),ot===nt)B+=4;else{var gt=t[ht+3*ot],xt=t[ht+3*ot+1],kt=t[ht+3*ot+2];W[B++]=gt,W[B++]=xt,W[B++]=kt,W[B++]=255}--wt}}}function Hu(t,n,e,r){for(var i=t[n++],a=1<<i,h=a+1,l=h+1,f=i+1,u=(1<<f)-1,g=0,y=0,x=0,p=t[n++],F=new Int32Array(4096),P=null;;){for(;g<16&&p!==0;)y|=t[n++]<<g,g+=8,p===1?p=t[n++]:--p;if(g<f)break;var D=y&u;if(y>>=f,g-=f,D!==a){if(D===h)break;for(var N=D<l?D:P,H=0,q=N;q>a;)q=F[q]>>8,++H;var M=q;if(x+H+(N!==D?1:0)>r)return void Pe.log("Warning, gif stream longer than expected.");e[x++]=M;var rt=x+=H;for(N!==D&&(e[x++]=M),q=N;H--;)q=F[q],e[--rt]=255&q,q>>=8;P!==null&&l<4096&&(F[l++]=P<<8|M,l>=u+1&&f<12&&(++f,u=u<<1|1)),P=D}else l=h+1,u=(1<<(f=i+1))-1,P=null}return x!==r&&Pe.log("Warning, gif stream shorter than expected."),e}function Sh(t){var n,e,r,i,a,h=Math.floor,l=new Array(64),f=new Array(64),u=new Array(64),g=new Array(64),y=new Array(65535),x=new Array(65535),p=new Array(64),F=new Array(64),P=[],D=0,N=7,H=new Array(64),q=new Array(64),M=new Array(64),rt=new Array(256),mt=new Array(2048),ct=[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],Y=[0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0],j=[0,1,2,3,4,5,6,7,8,9,10,11],tt=[0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,125],S=[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],O=[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],U=[0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,119],it=[0,1,2,3,17,4,5,33,49,6,18,65,81,7,97,113,19,34,50,129,8,20,66,145,161,177,193,9,35,51,82,240,21,98,114,209,10,22,36,52,225,37,241,23,24,25,26,38,39,40,41,42,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,130,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,226,227,228,229,230,231,232,233,234,242,243,244,245,246,247,248,249,250];function st(A,R){for(var B=0,G=0,$=new Array,J=1;J<=16;J++){for(var at=1;at<=A[J];at++)$[R[G]]=[],$[R[G]][0]=B,$[R[G]][1]=J,G++,B++;B*=2}return $}function ht(A){for(var R=A[0],B=A[1]-1;B>=0;)R&1<<B&&(D|=1<<N),B--,--N<0&&(D==255?(nt(255),nt(0)):nt(D),N=7,D=0)}function nt(A){P.push(A)}function ut(A){nt(A>>8&255),nt(255&A)}function At(A,R,B,G,$){for(var J,at=$[0],ot=$[240],gt=(function(yt,Wt){var It,qt,zt,ye,he,Jt,ce,fe,Tt,ee,jt=0;for(Tt=0;Tt<8;++Tt){It=yt[jt],qt=yt[jt+1],zt=yt[jt+2],ye=yt[jt+3],he=yt[jt+4],Jt=yt[jt+5],ce=yt[jt+6];var Ue=It+(fe=yt[jt+7]),pe=It-fe,oe=qt+ce,se=qt-ce,Oe=zt+Jt,Ut=zt-Jt,Ie=ye+he,Zt=ye-he,Qt=Ue+Ie,Te=Ue-Ie,le=oe+Oe,Gt=oe-Oe;yt[jt]=Qt+le,yt[jt+4]=Qt-le;var _e=.707106781*(Gt+Te);yt[jt+2]=Te+_e,yt[jt+6]=Te-_e;var yi=.382683433*((Qt=Zt+Ut)-(Gt=se+pe)),gn=.5411961*Qt+yi,Ir=1.306562965*Gt+yi,ur=.707106781*(le=Ut+se),Vt=pe+ur,Fr=pe-ur;yt[jt+5]=Fr+gn,yt[jt+3]=Fr-gn,yt[jt+1]=Vt+Ir,yt[jt+7]=Vt-Ir,jt+=8}for(jt=0,Tt=0;Tt<8;++Tt){It=yt[jt],qt=yt[jt+8],zt=yt[jt+16],ye=yt[jt+24],he=yt[jt+32],Jt=yt[jt+40],ce=yt[jt+48];var Er=It+(fe=yt[jt+56]),qn=It-fe,Hn=qt+ce,Me=qt-ce,an=zt+Jt,ln=zt-Jt,_i=ye+he,Xr=ye-he,tr=Er+_i,dr=Er-_i,er=Hn+an,nr=Hn-an;yt[jt]=tr+er,yt[jt+32]=tr-er;var Wn=.707106781*(nr+dr);yt[jt+16]=dr+Wn,yt[jt+48]=dr-Wn;var xi=.382683433*((tr=Xr+ln)-(nr=Me+qn)),pr=.5411961*tr+xi,Ai=1.306562965*nr+xi,Xi=.707106781*(er=ln+Me),Ji=qn+Xi,Qi=qn-Xi;yt[jt+40]=Qi+pr,yt[jt+24]=Qi-pr,yt[jt+8]=Ji+Ai,yt[jt+56]=Ji-Ai,jt++}for(Tt=0;Tt<64;++Tt)ee=yt[Tt]*Wt[Tt],p[Tt]=ee>0?ee+.5|0:ee-.5|0;return p})(A,R),xt=0;xt<64;++xt)F[ct[xt]]=gt[xt];var kt=F[0]-B;B=F[0],kt==0?ht(G[0]):(ht(G[x[J=32767+kt]]),ht(y[J]));for(var St=63;St>0&&F[St]==0;)St--;if(St==0)return ht(at),B;for(var Bt,I=1;I<=St;){for(var Lt=I;F[I]==0&&I<=St;)++I;var ae=I-Lt;if(ae>=16){Bt=ae>>4;for(var Ht=1;Ht<=Bt;++Ht)ht(ot);ae&=15}J=32767+F[I],ht($[(ae<<4)+x[J]]),ht(y[J]),I++}return St!=63&&ht(at),B}function wt(A){A=Math.min(Math.max(A,1),100),a!=A&&((function(R){for(var B=[16,11,10,16,24,40,51,61,12,12,14,19,26,58,60,55,14,13,16,24,40,57,69,56,14,17,22,29,51,87,80,62,18,22,37,56,68,109,103,77,24,35,55,64,81,104,113,92,49,64,78,87,103,121,120,101,72,92,95,98,112,100,103,99],G=0;G<64;G++){var $=h((B[G]*R+50)/100);$=Math.min(Math.max($,1),255),l[ct[G]]=$}for(var J=[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],at=0;at<64;at++){var ot=h((J[at]*R+50)/100);ot=Math.min(Math.max(ot,1),255),f[ct[at]]=ot}for(var gt=[1,1.387039845,1.306562965,1.175875602,1,.785694958,.5411961,.275899379],xt=0,kt=0;kt<8;kt++)for(var St=0;St<8;St++)u[xt]=1/(l[ct[xt]]*gt[kt]*gt[St]*8),g[xt]=1/(f[ct[xt]]*gt[kt]*gt[St]*8),xt++})(A<50?Math.floor(5e3/A):Math.floor(200-2*A)),a=A)}this.encode=function(A,R){R&&wt(R),P=new Array,D=0,N=7,ut(65496),ut(65504),ut(16),nt(74),nt(70),nt(73),nt(70),nt(0),nt(1),nt(1),nt(0),ut(1),ut(1),nt(0),nt(0),(function(){ut(65499),ut(132),nt(0);for(var qt=0;qt<64;qt++)nt(l[qt]);nt(1);for(var zt=0;zt<64;zt++)nt(f[zt])})(),(function(qt,zt){ut(65472),ut(17),nt(8),ut(zt),ut(qt),nt(3),nt(1),nt(17),nt(0),nt(2),nt(17),nt(1),nt(3),nt(17),nt(1)})(A.width,A.height),(function(){ut(65476),ut(418),nt(0);for(var qt=0;qt<16;qt++)nt(Y[qt+1]);for(var zt=0;zt<=11;zt++)nt(j[zt]);nt(16);for(var ye=0;ye<16;ye++)nt(tt[ye+1]);for(var he=0;he<=161;he++)nt(S[he]);nt(1);for(var Jt=0;Jt<16;Jt++)nt(O[Jt+1]);for(var ce=0;ce<=11;ce++)nt(W[ce]);nt(17);for(var fe=0;fe<16;fe++)nt(U[fe+1]);for(var Tt=0;Tt<=161;Tt++)nt(it[Tt])})(),ut(65498),ut(12),nt(3),nt(1),nt(0),nt(2),nt(17),nt(3),nt(17),nt(0),nt(63),nt(0);var B=0,G=0,$=0;D=0,N=7,this.encode.displayName="_encode_";for(var J,at,ot,gt,xt,kt,St,Bt,I,Lt=A.data,ae=A.width,Ht=A.height,yt=4*ae,Wt=0;Wt<Ht;){for(J=0;J<yt;){for(xt=yt*Wt+J,St=-1,Bt=0,I=0;I<64;I++)kt=xt+(Bt=I>>3)*yt+(St=4*(7&I)),Wt+Bt>=Ht&&(kt-=yt*(Wt+1+Bt-Ht)),J+St>=yt&&(kt-=J+St-yt+4),at=Lt[kt++],ot=Lt[kt++],gt=Lt[kt++],H[I]=(mt[at]+mt[ot+256|0]+mt[gt+512|0]>>16)-128,q[I]=(mt[at+768|0]+mt[ot+1024|0]+mt[gt+1280|0]>>16)-128,M[I]=(mt[at+1280|0]+mt[ot+1536|0]+mt[gt+1792|0]>>16)-128;B=At(H,u,B,n,r),G=At(q,g,G,e,i),$=At(M,g,$,e,i),J+=32}Wt+=8}if(N>=0){var It=[];It[1]=N+1,It[0]=(1<<N+1)-1,ht(It)}return ut(65497),new Uint8Array(P)},t=t||50,(function(){for(var A=String.fromCharCode,R=0;R<256;R++)rt[R]=A(R)})(),n=st(Y,j),e=st(O,W),r=st(tt,S),i=st(U,it),(function(){for(var A=1,R=2,B=1;B<=15;B++){for(var G=A;G<R;G++)x[32767+G]=B,y[32767+G]=[],y[32767+G][1]=B,y[32767+G][0]=G;for(var $=-(R-1);$<=-A;$++)x[32767+$]=B,y[32767+$]=[],y[32767+$][1]=B,y[32767+$][0]=R-1+$;A<<=1,R<<=1}})(),(function(){for(var A=0;A<256;A++)mt[A]=19595*A,mt[A+256|0]=38470*A,mt[A+512|0]=7471*A+32768,mt[A+768|0]=-11059*A,mt[A+1024|0]=-21709*A,mt[A+1280|0]=32768*A+8421375,mt[A+1536|0]=-27439*A,mt[A+1792|0]=-5329*A})(),wt(t)}function hr(t,n){if(this.pos=0,this.buffer=t,this.datav=new DataView(t.buffer),this.is_with_alpha=!!n,this.bottom_up=!0,this.flag=String.fromCharCode(this.buffer[0])+String.fromCharCode(this.buffer[1]),this.pos+=2,["BM","BA","CI","CP","IC","PT"].indexOf(this.flag)===-1)throw new Error("Invalid BMP File");this.parseHeader(),this.parseBGR()}function Wu(t){function n(j){if(!j)throw Error("assert :P")}function e(j,tt,S){for(var O=0;4>O;O++)if(j[tt+O]!=S.charCodeAt(O))return!0;return!1}function r(j,tt,S,O,W){for(var U=0;U<W;U++)j[tt+U]=S[O+U]}function i(j,tt,S,O){for(var W=0;W<O;W++)j[tt+W]=S}function a(j){return new Int32Array(j)}function h(j,tt){for(var S=[],O=0;O<j;O++)S.push(new tt);return S}function l(j,tt){var S=[];return(function O(W,U,it){for(var st=it[U],ht=0;ht<st&&(W.push(it.length>U+1?[]:new tt),!(it.length<U+1));ht++)O(W[ht],U+1,it)})(S,0,j),S}var f=function(){var j=this;function tt(o,s){for(var d=1<<s-1>>>0;o&d;)d>>>=1;return d?(o&d-1)+d:o}function S(o,s,d,m,b){n(!(m%d));do o[s+(m-=d)]=b;while(0<m)}function O(o,s,d,m,b){if(n(2328>=b),512>=b)var w=a(512);else if((w=a(b))==null)return 0;return(function(_,L,k,E,V,et){var C,Z,X=L,lt=1<<k,Q=a(16),ft=a(16);for(n(V!=0),n(E!=null),n(_!=null),n(0<k),Z=0;Z<V;++Z){if(15<E[Z])return 0;++Q[E[Z]]}if(Q[0]==V)return 0;for(ft[1]=0,C=1;15>C;++C){if(Q[C]>1<<C)return 0;ft[C+1]=ft[C]+Q[C]}for(Z=0;Z<V;++Z)C=E[Z],0<E[Z]&&(et[ft[C]++]=Z);if(ft[15]==1)return(E=new W).g=0,E.value=et[0],S(_,X,1,lt,E),lt;var pt,_t=-1,bt=lt-1,Mt=0,Pt=1,re=1,Ct=1<<k;for(Z=0,C=1,V=2;C<=k;++C,V<<=1){if(Pt+=re<<=1,0>(re-=Q[C]))return 0;for(;0<Q[C];--Q[C])(E=new W).g=C,E.value=et[Z++],S(_,X+Mt,V,Ct,E),Mt=tt(Mt,C)}for(C=k+1,V=2;15>=C;++C,V<<=1){if(Pt+=re<<=1,0>(re-=Q[C]))return 0;for(;0<Q[C];--Q[C]){if(E=new W,(Mt&bt)!=_t){for(X+=Ct,pt=1<<(_t=C)-k;15>_t&&!(0>=(pt-=Q[_t]));)++_t,pt<<=1;lt+=Ct=1<<(pt=_t-k),_[L+(_t=Mt&bt)].g=pt+k,_[L+_t].value=X-L-_t}E.g=C-k,E.value=et[Z++],S(_,X+(Mt>>k),V,Ct,E),Mt=tt(Mt,C)}}return Pt!=2*ft[15]-1?0:lt})(o,s,d,m,b,w)}function W(){this.value=this.g=0}function U(){this.value=this.g=0}function it(){this.G=h(5,W),this.H=a(5),this.jc=this.Qb=this.qb=this.nd=0,this.pd=h(Ti,U)}function st(o,s,d,m){n(o!=null),n(s!=null),n(2147483648>m),o.Ca=254,o.I=0,o.b=-8,o.Ka=0,o.oa=s,o.pa=d,o.Jd=s,o.Yc=d+m,o.Zc=4<=m?d+m-4+1:d,at(o)}function ht(o,s){for(var d=0;0<s--;)d|=gt(o,128)<<s;return d}function nt(o,s){var d=ht(o,s);return ot(o)?-d:d}function ut(o,s,d,m){var b,w=0;for(n(o!=null),n(s!=null),n(4294967288>m),o.Sb=m,o.Ra=0,o.u=0,o.h=0,4<m&&(m=4),b=0;b<m;++b)w+=s[d+b]<<8*b;o.Ra=w,o.bb=m,o.oa=s,o.pa=d}function At(o){for(;8<=o.u&&o.bb<o.Sb;)o.Ra>>>=8,o.Ra+=o.oa[o.pa+o.bb]<<ei-8>>>0,++o.bb,o.u-=8;G(o)&&(o.h=1,o.u=0)}function wt(o,s){if(n(0<=s),!o.h&&s<=Cn){var d=B(o)&En[s];return o.u+=s,At(o),d}return o.h=1,o.u=0}function A(){this.b=this.Ca=this.I=0,this.oa=[],this.pa=0,this.Jd=[],this.Yc=0,this.Zc=[],this.Ka=0}function R(){this.Ra=0,this.oa=[],this.h=this.u=this.bb=this.Sb=this.pa=0}function B(o){return o.Ra>>>(o.u&ei-1)>>>0}function G(o){return n(o.bb<=o.Sb),o.h||o.bb==o.Sb&&o.u>ei}function $(o,s){o.u=s,o.h=G(o)}function J(o){o.u>=qr&&(n(o.u>=qr),At(o))}function at(o){n(o!=null&&o.oa!=null),o.pa<o.Zc?(o.I=(o.oa[o.pa++]|o.I<<8)>>>0,o.b+=8):(n(o!=null&&o.oa!=null),o.pa<o.Yc?(o.b+=8,o.I=o.oa[o.pa++]|o.I<<8):o.Ka?o.b=0:(o.I<<=8,o.b+=8,o.Ka=1))}function ot(o){return ht(o,1)}function gt(o,s){var d=o.Ca;0>o.b&&at(o);var m=o.b,b=d*s>>>8,w=(o.I>>>m>b)+0;for(w?(d-=b,o.I-=b+1<<m>>>0):d=b+1,m=d,b=0;256<=m;)b+=8,m>>=8;return m=7^b+ni[m],o.b-=m,o.Ca=(d<<m)-1,w}function xt(o,s,d){o[s+0]=d>>24&255,o[s+1]=d>>16&255,o[s+2]=d>>8&255,o[s+3]=255&d}function kt(o,s){return o[s+0]|o[s+1]<<8}function St(o,s){return kt(o,s)|o[s+2]<<16}function Bt(o,s){return kt(o,s)|kt(o,s+2)<<16}function I(o,s){var d=1<<s;return n(o!=null),n(0<s),o.X=a(d),o.X==null?0:(o.Mb=32-s,o.Xa=s,1)}function Lt(o,s){n(o!=null),n(s!=null),n(o.Xa==s.Xa),r(s.X,0,o.X,0,1<<s.Xa)}function ae(){this.X=[],this.Xa=this.Mb=0}function Ht(o,s,d,m){n(d!=null),n(m!=null);var b=d[0],w=m[0];return b==0&&(b=(o*w+s/2)/s),w==0&&(w=(s*b+o/2)/o),0>=b||0>=w?0:(d[0]=b,m[0]=w,1)}function yt(o,s){return o+(1<<s)-1>>>s}function Wt(o,s){return((4278255360&o)+(4278255360&s)>>>0&4278255360)+((16711935&o)+(16711935&s)>>>0&16711935)>>>0}function It(o,s){j[s]=function(d,m,b,w,_,L,k){var E;for(E=0;E<_;++E){var V=j[o](L[k+E-1],b,w+E);L[k+E]=Wt(d[m+E],V)}}}function qt(){this.ud=this.hd=this.jd=0}function zt(o,s){return((4278124286&(o^s))>>>1)+(o&s)>>>0}function ye(o){return 0<=o&&256>o?o:0>o?0:255<o?255:void 0}function he(o,s){return ye(o+(o-s+.5>>1))}function Jt(o,s,d){return Math.abs(s-d)-Math.abs(o-d)}function ce(o,s,d,m,b,w,_){for(m=w[_-1],d=0;d<b;++d)w[_+d]=m=Wt(o[s+d],m)}function fe(o,s,d,m,b){var w;for(w=0;w<d;++w){var _=o[s+w],L=_>>8&255,k=16711935&(k=(k=16711935&_)+((L<<16)+L));m[b+w]=(4278255360&_)+k>>>0}}function Tt(o,s){s.jd=255&o,s.hd=o>>8&255,s.ud=o>>16&255}function ee(o,s,d,m,b,w){var _;for(_=0;_<m;++_){var L=s[d+_],k=L>>>8,E=L,V=255&(V=(V=L>>>16)+((o.jd<<24>>24)*(k<<24>>24)>>>5));E=255&(E=(E+=(o.hd<<24>>24)*(k<<24>>24)>>>5)+((o.ud<<24>>24)*(V<<24>>24)>>>5)),b[w+_]=(4278255360&L)+(V<<16)+E}}function jt(o,s,d,m,b){j[s]=function(w,_,L,k,E,V,et,C,Z){for(k=et;k<C;++k)for(et=0;et<Z;++et)E[V++]=b(L[m(w[_++])])},j[o]=function(w,_,L,k,E,V,et){var C=8>>w.b,Z=w.Ea,X=w.K[0],lt=w.w;if(8>C)for(w=(1<<w.b)-1,lt=(1<<C)-1;_<L;++_){var Q,ft=0;for(Q=0;Q<Z;++Q)Q&w||(ft=m(k[E++])),V[et++]=b(X[ft<]),ft>>=C}else j["VP8LMapColor"+d](k,E,X,lt,V,et,_,L,Z)}}function Ue(o,s,d,m,b){for(d=s+d;s<d;){var w=o[s++];m[b++]=w>>16&255,m[b++]=w>>8&255,m[b++]=255&w}}function pe(o,s,d,m,b){for(d=s+d;s<d;){var w=o[s++];m[b++]=w>>16&255,m[b++]=w>>8&255,m[b++]=255&w,m[b++]=w>>24&255}}function oe(o,s,d,m,b){for(d=s+d;s<d;){var w=(_=o[s++])>>16&240|_>>12&15,_=240&_|_>>28&15;m[b++]=w,m[b++]=_}}function se(o,s,d,m,b){for(d=s+d;s<d;){var w=(_=o[s++])>>16&248|_>>13&7,_=_>>5&224|_>>3&31;m[b++]=w,m[b++]=_}}function Oe(o,s,d,m,b){for(d=s+d;s<d;){var w=o[s++];m[b++]=255&w,m[b++]=w>>8&255,m[b++]=w>>16&255}}function Ut(o,s,d,m,b,w){if(w==0)for(d=s+d;s<d;)xt(m,((w=o[s++])[0]>>24|w[1]>>8&65280|w[2]<<8&16711680|w[3]<<24)>>>0),b+=32;else r(m,b,o,s,d)}function Ie(o,s){j[s][0]=j[o+"0"],j[s][1]=j[o+"1"],j[s][2]=j[o+"2"],j[s][3]=j[o+"3"],j[s][4]=j[o+"4"],j[s][5]=j[o+"5"],j[s][6]=j[o+"6"],j[s][7]=j[o+"7"],j[s][8]=j[o+"8"],j[s][9]=j[o+"9"],j[s][10]=j[o+"10"],j[s][11]=j[o+"11"],j[s][12]=j[o+"12"],j[s][13]=j[o+"13"],j[s][14]=j[o+"0"],j[s][15]=j[o+"0"]}function Zt(o){return o==ul||o==dl||o==es||o==pl}function Qt(){this.eb=[],this.size=this.A=this.fb=0}function Te(){this.y=[],this.f=[],this.ea=[],this.F=[],this.Tc=this.Ed=this.Cd=this.Fd=this.lb=this.Db=this.Ab=this.fa=this.J=this.W=this.N=this.O=0}function le(){this.Rd=this.height=this.width=this.S=0,this.f={},this.f.RGBA=new Qt,this.f.kb=new Te,this.sd=null}function Gt(){this.width=[0],this.height=[0],this.Pd=[0],this.Qd=[0],this.format=[0]}function _e(){this.Id=this.fd=this.Md=this.hb=this.ib=this.da=this.bd=this.cd=this.j=this.v=this.Da=this.Sd=this.ob=0}function yi(o){return alert("todo:WebPSamplerProcessPlane"),o.T}function gn(o,s){var d=o.T,m=s.ba.f.RGBA,b=m.eb,w=m.fb+o.ka*m.A,_=Kn[s.ba.S],L=o.y,k=o.O,E=o.f,V=o.N,et=o.ea,C=o.W,Z=s.cc,X=s.dc,lt=s.Mc,Q=s.Nc,ft=o.ka,pt=o.ka+o.T,_t=o.U,bt=_t+1>>1;for(ft==0?_(L,k,null,null,E,V,et,C,E,V,et,C,b,w,null,null,_t):(_(s.ec,s.fc,L,k,Z,X,lt,Q,E,V,et,C,b,w-m.A,b,w,_t),++d);ft+2<pt;ft+=2)Z=E,X=V,lt=et,Q=C,V+=o.Rc,C+=o.Rc,w+=2*m.A,_(L,(k+=2*o.fa)-o.fa,L,k,Z,X,lt,Q,E,V,et,C,b,w-m.A,b,w,_t);return k+=o.fa,o.j+pt<o.o?(r(s.ec,s.fc,L,k,_t),r(s.cc,s.dc,E,V,bt),r(s.Mc,s.Nc,et,C,bt),d--):1&pt||_(L,k,null,null,E,V,et,C,E,V,et,C,b,w+m.A,null,null,_t),d}function Ir(o,s,d){var m=o.F,b=[o.J];if(m!=null){var w=o.U,_=s.ba.S,L=_==ts||_==es;s=s.ba.f.RGBA;var k=[0],E=o.ka;k[0]=o.T,o.Kb&&(E==0?--k[0]:(--E,b[0]-=o.width),o.j+o.ka+o.T==o.o&&(k[0]=o.o-o.j-E));var V=s.eb;E=s.fb+E*s.A,o=Wh(m,b[0],o.width,w,k,V,E+(L?0:3),s.A),n(d==k),o&&Zt(_)&&Ja(V,E,L,w,k,s.A)}return 0}function ur(o){var s=o.ma,d=s.ba.S,m=11>d,b=d==Jo||d==Qo||d==ts||d==cl||d==12||Zt(d);if(s.memory=null,s.Ib=null,s.Jb=null,s.Nd=null,!Wa(s.Oa,o,b?11:12))return 0;if(b&&Zt(d)&&Ua(),o.da)alert("todo:use_scaling");else{if(m){if(s.Ib=yi,o.Kb){if(d=o.U+1>>1,s.memory=a(o.U+2*d),s.memory==null)return 0;s.ec=s.memory,s.fc=0,s.cc=s.ec,s.dc=s.fc+o.U,s.Mc=s.cc,s.Nc=s.dc+d,s.Ib=gn,Ua()}}else alert("todo:EmitYUV");b&&(s.Jb=Ir,m&&ir())}if(m&&!lf){for(o=0;256>o;++o)F1[o]=89858*(o-128)+rs>>ns,O1[o]=-22014*(o-128)+rs,C1[o]=-45773*(o-128),E1[o]=113618*(o-128)+rs>>ns;for(o=to;o<vl;++o)s=76283*(o-16)+rs>>ns,T1[o-to]=gr(s,255),D1[o-to]=gr(s+8>>4,15);lf=1}return 1}function Vt(o){var s=o.ma,d=o.U,m=o.T;return n(!(1&o.ka)),0>=d||0>=m?0:(d=s.Ib(o,s),s.Jb!=null&&s.Jb(o,s,d),s.Dc+=d,1)}function Fr(o){o.ma.memory=null}function Er(o,s,d,m){return wt(o,8)!=47?0:(s[0]=wt(o,14)+1,d[0]=wt(o,14)+1,m[0]=wt(o,1),wt(o,3)!=0?0:!o.h)}function qn(o,s){if(4>o)return o+1;var d=o-2>>1;return(2+(1&o)<<d)+wt(s,d)+1}function Hn(o,s){return 120<s?s-120:1<=(d=((d=m1[s-1])>>4)*o+(8-(15&d)))?d:1;var d}function Me(o,s,d){var m=B(d),b=o[s+=255&m].g-8;return 0<b&&($(d,d.u+8),m=B(d),s+=o[s].value,s+=m&(1<<b)-1),$(d,d.u+o[s].g),o[s].value}function an(o,s,d){return d.g+=o.g,d.value+=o.value<<s>>>0,n(8>=d.g),o.g}function ln(o,s,d){var m=o.xc;return n((s=m==0?0:o.vc[o.md*(d>>m)+(s>>m)])<o.Wb),o.Ya[s]}function _i(o,s,d,m){var b=o.ab,w=o.c*s,_=o.C;s=_+s;var L=d,k=m;for(m=o.Ta,d=o.Ua;0<b--;){var E=o.gc[b],V=_,et=s,C=L,Z=k,X=(k=m,L=d,E.Ea);switch(n(V<et),n(et<=E.nc),E.hc){case 2:qe(C,Z,(et-V)*X,k,L);break;case 0:var lt=V,Q=et,ft=k,pt=L,_t=(Ct=E).Ea;lt==0&&(Va(C,Z,null,null,1,ft,pt),ce(C,Z+1,0,0,_t-1,ft,pt+1),Z+=_t,pt+=_t,++lt);for(var bt=1<<Ct.b,Mt=bt-1,Pt=yt(_t,Ct.b),re=Ct.K,Ct=Ct.w+(lt>>Ct.b)*Pt;lt<Q;){var ue=re,en=Ct,ie=1;for(sa(C,Z,ft,pt-_t,1,ft,pt);ie<_t;){var Ot=(ie&~Mt)+bt;Ot>_t&&(Ot=_t),(0,$a[ue[en++]>>8&15])(C,Z+ +ie,ft,pt+ie-_t,Ot-ie,ft,pt+ie),ie=Ot}Z+=_t,pt+=_t,++lt&Mt||(Ct+=Pt)}et!=E.nc&&r(k,L-X,k,L+(et-V-1)*X,X);break;case 1:for(X=C,Q=Z,_t=(C=E.Ea)-(pt=C&~(ft=(Z=1<<E.b)-1)),lt=yt(C,E.b),bt=E.K,E=E.w+(V>>E.b)*lt;V<et;){for(Mt=bt,Pt=E,re=new qt,Ct=Q+pt,ue=Q+C;Q<Ct;)Tt(Mt[Pt++],re),Ya(re,X,Q,Z,k,L),Q+=Z,L+=Z;Q<ue&&(Tt(Mt[Pt++],re),Ya(re,X,Q,_t,k,L),Q+=_t,L+=_t),++V&ft||(E+=lt)}break;case 3:if(C==k&&Z==L&&0<E.b){for(Q=k,C=X=L+(et-V)*X-(pt=(et-V)*yt(E.Ea,E.b)),Z=k,ft=L,lt=[],pt=(_t=pt)-1;0<=pt;--pt)lt[pt]=Z[ft+pt];for(pt=_t-1;0<=pt;--pt)Q[C+pt]=lt[pt];$o(E,V,et,k,X,k,L)}else $o(E,V,et,C,Z,k,L)}L=m,k=d}k!=d&&r(m,d,L,k,w)}function Xr(o,s){var d=o.V,m=o.Ba+o.c*o.C,b=s-o.C;if(n(s<=o.l.o),n(16>=b),0<b){var w=o.l,_=o.Ta,L=o.Ua,k=w.width;if(_i(o,b,d,m),b=L=[L],n((d=o.C)<(m=s)),n(w.v<w.va),m>w.o&&(m=w.o),d<w.j){var E=w.j-d;d=w.j,b[0]+=E*k}if(d>=m?d=0:(b[0]+=4*w.v,w.ka=d-w.j,w.U=w.va-w.v,w.T=m-d,d=1),d){if(L=L[0],11>(d=o.ca).S){var V=d.f.RGBA,et=(m=d.S,b=w.U,w=w.T,E=V.eb,V.A),C=w;for(V=V.fb+o.Ma*V.A;0<C--;){var Z=_,X=L,lt=b,Q=E,ft=V;switch(m){case Xo:Ka(Z,X,lt,Q,ft);break;case Jo:ri(Z,X,lt,Q,ft);break;case ul:ri(Z,X,lt,Q,ft),Ja(Q,ft,0,lt,1,0);break;case Xh:Di(Z,X,lt,Q,ft);break;case Qo:Ut(Z,X,lt,Q,ft,1);break;case dl:Ut(Z,X,lt,Q,ft,1),Ja(Q,ft,0,lt,1,0);break;case ts:Ut(Z,X,lt,Q,ft,0);break;case es:Ut(Z,X,lt,Q,ft,0),Ja(Q,ft,1,lt,1,0);break;case cl:ii(Z,X,lt,Q,ft);break;case pl:ii(Z,X,lt,Q,ft),Hh(Q,ft,lt,1,0);break;case Jh:ai(Z,X,lt,Q,ft);break;default:n(0)}L+=k,V+=et}o.Ma+=w}else alert("todo:EmitRescaledRowsYUVA");n(o.Ma<=d.height)}}o.C=s,n(o.C<=o.i)}function tr(o){var s;if(0<o.ua)return 0;for(s=0;s<o.Wb;++s){var d=o.Ya[s].G,m=o.Ya[s].H;if(0<d[1][m[1]+0].g||0<d[2][m[2]+0].g||0<d[3][m[3]+0].g)return 0}return 1}function dr(o,s,d,m,b,w){if(o.Z!=0){var _=o.qd,L=o.rd;for(n(li[o.Z]!=null);s<d;++s)li[o.Z](_,L,m,b,m,b,w),_=m,L=b,b+=w;o.qd=_,o.rd=L}}function er(o,s){var d=o.l.ma,m=d.Z==0||d.Z==1?o.l.j:o.C;if(m=o.C<m?m:o.C,n(s<=o.l.o),s>m){var b=o.l.width,w=d.ca,_=d.tb+b*m,L=o.V,k=o.Ba+o.c*m,E=o.gc;n(o.ab==1),n(E[0].hc==3),wr(E[0],m,s,L,k,w,_),dr(d,m,s,w,_,b)}o.C=o.Ma=s}function nr(o,s,d,m,b,w,_){var L=o.$/m,k=o.$%m,E=o.m,V=o.s,et=d+o.$,C=et;b=d+m*b;var Z=d+m*w,X=280+V.ua,lt=o.Pb?L:16777216,Q=0<V.ua?V.Wa:null,ft=V.wc,pt=et<Z?ln(V,k,L):null;n(o.C<w),n(Z<=b);var _t=!1;t:for(;;){for(;_t||et<Z;){var bt=0;if(L>=lt){var Mt=et-d;n((lt=o).Pb),lt.wd=lt.m,lt.xd=Mt,0<lt.s.ua&&Lt(lt.s.Wa,lt.s.vb),lt=L+b1}if(k&ft||(pt=ln(V,k,L)),n(pt!=null),pt.Qb&&(s[et]=pt.qb,_t=!0),!_t)if(J(E),pt.jc){bt=E,Mt=s;var Pt=et,re=pt.pd[B(bt)&Ti-1];n(pt.jc),256>re.g?($(bt,bt.u+re.g),Mt[Pt]=re.value,bt=0):($(bt,bt.u+re.g-256),n(256<=re.value),bt=re.value),bt==0&&(_t=!0)}else bt=Me(pt.G[0],pt.H[0],E);if(E.h)break;if(_t||256>bt){if(!_t)if(pt.nd)s[et]=(pt.qb|bt<<8)>>>0;else{if(J(E),_t=Me(pt.G[1],pt.H[1],E),J(E),Mt=Me(pt.G[2],pt.H[2],E),Pt=Me(pt.G[3],pt.H[3],E),E.h)break;s[et]=(Pt<<24|_t<<16|bt<<8|Mt)>>>0}if(_t=!1,++et,++k>=m&&(k=0,++L,_!=null&&L<=w&&!(L%16)&&_(o,L),Q!=null))for(;C<et;)bt=s[C++],Q.X[(506832829*bt&4294967295)>>>Q.Mb]=bt}else if(280>bt){if(bt=qn(bt-256,E),Mt=Me(pt.G[4],pt.H[4],E),J(E),Mt=Hn(m,Mt=qn(Mt,E)),E.h)break;if(et-d<Mt||b-et<bt)break t;for(Pt=0;Pt<bt;++Pt)s[et+Pt]=s[et+Pt-Mt];for(et+=bt,k+=bt;k>=m;)k-=m,++L,_!=null&&L<=w&&!(L%16)&&_(o,L);if(n(et<=b),k&ft&&(pt=ln(V,k,L)),Q!=null)for(;C<et;)bt=s[C++],Q.X[(506832829*bt&4294967295)>>>Q.Mb]=bt}else{if(!(bt<X))break t;for(_t=bt-280,n(Q!=null);C<et;)bt=s[C++],Q.X[(506832829*bt&4294967295)>>>Q.Mb]=bt;bt=et,n(!(_t>>>(Mt=Q).Xa)),s[bt]=Mt.X[_t],_t=!0}_t||n(E.h==G(E))}if(o.Pb&&E.h&&et<b)n(o.m.h),o.a=5,o.m=o.wd,o.$=o.xd,0<o.s.ua&&Lt(o.s.vb,o.s.Wa);else{if(E.h)break t;_?.(o,L>w?w:L),o.a=0,o.$=et-d}return 1}return o.a=3,0}function Wn(o){n(o!=null),o.vc=null,o.yc=null,o.Ya=null;var s=o.Wa;s!=null&&(s.X=null),o.vb=null,n(o!=null)}function xi(){var o=new Yt;return o==null?null:(o.a=0,o.xb=ef,Ie("Predictor","VP8LPredictors"),Ie("Predictor","VP8LPredictors_C"),Ie("PredictorAdd","VP8LPredictorsAdd"),Ie("PredictorAdd","VP8LPredictorsAdd_C"),qe=fe,Ya=ee,Ka=Ue,ri=pe,ii=oe,ai=se,Di=Oe,j.VP8LMapColor32b=br,j.VP8LMapColor8b=Za,o)}function pr(o,s,d,m,b){var w=1,_=[o],L=[s],k=m.m,E=m.s,V=null,et=0;t:for(;;){if(d)for(;w&&wt(k,1);){var C=_,Z=L,X=m,lt=1,Q=X.m,ft=X.gc[X.ab],pt=wt(Q,2);if(X.Oc&1<<pt)w=0;else{switch(X.Oc|=1<<pt,ft.hc=pt,ft.Ea=C[0],ft.nc=Z[0],ft.K=[null],++X.ab,n(4>=X.ab),pt){case 0:case 1:ft.b=wt(Q,3)+2,lt=pr(yt(ft.Ea,ft.b),yt(ft.nc,ft.b),0,X,ft.K),ft.K=ft.K[0];break;case 3:var _t,bt=wt(Q,8)+1,Mt=16<bt?0:4<bt?1:2<bt?2:3;if(C[0]=yt(ft.Ea,Mt),ft.b=Mt,_t=lt=pr(bt,1,0,X,ft.K)){var Pt,re=bt,Ct=ft,ue=1<<(8>>Ct.b),en=a(ue);if(en==null)_t=0;else{var ie=Ct.K[0],Ot=Ct.w;for(en[0]=Ct.K[0][0],Pt=1;Pt<1*re;++Pt)en[Pt]=Wt(ie[Ot+Pt],en[Pt-1]);for(;Pt<4*ue;++Pt)en[Pt]=0;Ct.K[0]=null,Ct.K[0]=en,_t=1}}lt=_t;break;case 2:break;default:n(0)}w=lt}}if(_=_[0],L=L[0],w&&wt(k,1)&&!(w=1<=(et=wt(k,4))&&11>=et)){m.a=3;break t}var Nt;if(Nt=w)e:{var We,te,de,Ce=m,cn=_,xn=L,je=et,mn=d,An=Ce.m,nn=Ce.s,me=[null],Ae=1,Be=0,Ne=v1[je];n:for(;;){if(mn&&wt(An,1)){var un=wt(An,3)+2,or=yt(cn,un),Ge=yt(xn,un),kn=or*Ge;if(!pr(or,Ge,0,Ce,me))break n;for(me=me[0],nn.xc=un,We=0;We<kn;++We){var ke=me[We]>>8&65535;me[We]=ke,ke>=Ae&&(Ae=ke+1)}}if(An.h)break n;for(te=0;5>te;++te){var rn=Qh[te];!te&&0<je&&(rn+=1<<je),Be<rn&&(Be=rn)}var Tn=h(Ae*Ne,W),Nn=Ae,Dn=h(Nn,it);if(Dn==null)var Rn=null;else n(65536>=Nn),Rn=Dn;var Pn=a(Be);if(Rn==null||Pn==null||Tn==null){Ce.a=1;break n}var Mn=Tn;for(We=de=0;We<Ae;++We){var Ee=Rn[We],jn=Ee.G,sr=Ee.H,Mi=0,Gr=1,dn=0;for(te=0;5>te;++te){rn=Qh[te],jn[te]=Mn,sr[te]=de,!te&&0<je&&(rn+=1<<je);i:{var as,bl=rn,os=Ce,eo=Pn,j1=Mn,B1=de,wl=0,hi=os.m,z1=wt(hi,1);if(i(eo,0,0,bl),z1){var U1=wt(hi,1)+1,q1=wt(hi,1),cf=wt(hi,q1==0?1:8);eo[cf]=1,U1==2&&(eo[cf=wt(hi,8)]=1);var ss=1}else{var uf=a(19),df=wt(hi,4)+4;if(19<df){os.a=3;var ls=0;break i}for(as=0;as<df;++as)uf[g1[as]]=wt(hi,3);var yl=void 0,no=void 0,pf=os,H1=uf,hs=bl,gf=eo,_l=0,fi=pf.m,mf=8,vf=h(128,W);r:for(;O(vf,0,7,H1,19);){if(wt(fi,1)){var W1=2+2*wt(fi,3);if((yl=2+wt(fi,W1))>hs)break r}else yl=hs;for(no=0;no<hs&&yl--;){J(fi);var bf=vf[0+(127&B(fi))];$(fi,fi.u+bf.g);var ha=bf.value;if(16>ha)gf[no++]=ha,ha!=0&&(mf=ha);else{var G1=ha==16,wf=ha-16,V1=d1[wf],yf=wt(fi,u1[wf])+V1;if(no+yf>hs)break r;for(var Z1=G1?mf:0;0<yf--;)gf[no++]=Z1}}_l=1;break r}_l||(pf.a=3),ss=_l}(ss=ss&&!hi.h)&&(wl=O(j1,B1,8,eo,bl)),ss&&wl!=0?ls=wl:(os.a=3,ls=0)}if(ls==0)break n;if(Gr&&p1[te]==1&&(Gr=Mn[de].g==0),Mi+=Mn[de].g,de+=ls,3>=te){var ro,xl=Pn[0];for(ro=1;ro<rn;++ro)Pn[ro]>xl&&(xl=Pn[ro]);dn+=xl}}if(Ee.nd=Gr,Ee.Qb=0,Gr&&(Ee.qb=(jn[3][sr[3]+0].value<<24|jn[1][sr[1]+0].value<<16|jn[2][sr[2]+0].value)>>>0,Mi==0&&256>jn[0][sr[0]+0].value&&(Ee.Qb=1,Ee.qb+=jn[0][sr[0]+0].value<<8)),Ee.jc=!Ee.Qb&&6>dn,Ee.jc){var fs,Vr=Ee;for(fs=0;fs<Ti;++fs){var ci=fs,ui=Vr.pd[ci],cs=Vr.G[0][Vr.H[0]+ci];256<=cs.value?(ui.g=cs.g+256,ui.value=cs.value):(ui.g=0,ui.value=0,ci>>=an(cs,8,ui),ci>>=an(Vr.G[1][Vr.H[1]+ci],16,ui),ci>>=an(Vr.G[2][Vr.H[2]+ci],0,ui),an(Vr.G[3][Vr.H[3]+ci],24,ui))}}}nn.vc=me,nn.Wb=Ae,nn.Ya=Rn,nn.yc=Tn,Nt=1;break e}Nt=0}if(!(w=Nt)){m.a=3;break t}if(0<et){if(E.ua=1<<et,!I(E.Wa,et)){m.a=1,w=0;break t}}else E.ua=0;var Al=m,_f=_,$1=L,Nl=Al.s,Ll=Nl.xc;if(Al.c=_f,Al.i=$1,Nl.md=yt(_f,Ll),Nl.wc=Ll==0?-1:(1<<Ll)-1,d){m.xb=L1;break t}if((V=a(_*L))==null){m.a=1,w=0;break t}w=(w=nr(m,V,0,_,L,L,null))&&!k.h;break t}return w?(b!=null?b[0]=V:(n(V==null),n(d)),m.$=0,d||Wn(E)):Wn(E),w}function Ai(o,s){var d=o.c*o.i,m=d+s+16*s;return n(o.c<=s),o.V=a(m),o.V==null?(o.Ta=null,o.Ua=0,o.a=1,0):(o.Ta=o.V,o.Ua=o.Ba+d+s,1)}function Xi(o,s){var d=o.C,m=s-d,b=o.V,w=o.Ba+o.c*d;for(n(s<=o.l.o);0<m;){var _=16<m?16:m,L=o.l.ma,k=o.l.width,E=k*_,V=L.ca,et=L.tb+k*d,C=o.Ta,Z=o.Ua;_i(o,_,b,w),Gh(C,Z,V,et,E),dr(L,d,d+_,V,et,k),m-=_,b+=_*o.c,d+=_}n(d==s),o.C=o.Ma=s}function Ji(){this.ub=this.yd=this.td=this.Rb=0}function Qi(){this.Kd=this.Ld=this.Ud=this.Td=this.i=this.c=0}function $s(){this.Fb=this.Bb=this.Cb=0,this.Zb=a(4),this.Lb=a(4)}function Fa(){this.Yb=(function(){var o=[];return(function s(d,m,b){for(var w=b[m],_=0;_<w&&(d.push(b.length>m+1?[]:0),!(b.length<m+1));_++)s(d[_],m+1,b)})(o,0,[3,11]),o})()}function Fo(){this.jb=a(3),this.Wc=l([4,8],Fa),this.Xc=l([4,17],Fa)}function Eo(){this.Pc=this.wb=this.Tb=this.zd=0,this.vd=new a(4),this.od=new a(4)}function Gn(){this.ld=this.La=this.dd=this.tc=0}function Ea(){this.Na=this.la=0}function Co(){this.Sc=[0,0],this.Eb=[0,0],this.Qc=[0,0],this.ia=this.lc=0}function Ca(){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 Oo(){this.uc=this.M=this.Nb=0,this.wa=Array(new Gn),this.Y=0,this.ya=Array(new Ca),this.aa=0,this.l=new ta}function To(){this.y=a(16),this.f=a(8),this.ea=a(8)}function Do(){this.cb=this.a=0,this.sc="",this.m=new A,this.Od=new Ji,this.Kc=new Qi,this.ed=new Eo,this.Qa=new $s,this.Ic=this.$c=this.Aa=0,this.D=new Oo,this.Xb=this.Va=this.Hb=this.zb=this.yb=this.Ub=this.za=0,this.Jc=h(8,A),this.ia=0,this.pb=h(4,Co),this.Pa=new Fo,this.Bd=this.kc=0,this.Ac=[],this.Bc=0,this.zc=[0,0,0,0],this.Gd=Array(new To),this.Hd=0,this.rb=Array(new Ea),this.sb=0,this.wa=Array(new Gn),this.Y=0,this.oc=[],this.pc=0,this.sa=[],this.ta=0,this.qa=[],this.ra=0,this.Ha=[],this.B=this.R=this.Ia=0,this.Ec=[],this.M=this.ja=this.Vb=this.Fc=0,this.ya=Array(new Ca),this.L=this.aa=0,this.gd=l([4,2],Gn),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 gr(o,s){return 0>o?0:o>s?s:o}function ta(){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 Ys(){var o=new Do;return o!=null&&(o.a=0,o.sc="OK",o.cb=0,o.Xb=0,Qa||(Qa=ea)),o}function Ye(o,s,d){return o.a==0&&(o.a=s,o.sc=d,o.cb=0),0}function Ro(o,s,d){return 3<=d&&o[s+0]==157&&o[s+1]==1&&o[s+2]==42}function mr(o,s){if(o==null)return 0;if(o.a=0,o.sc="OK",s==null)return Ye(o,2,"null VP8Io passed to VP8GetHeaders()");var d=s.data,m=s.w,b=s.ha;if(4>b)return Ye(o,7,"Truncated header.");var w=d[m+0]|d[m+1]<<8|d[m+2]<<16,_=o.Od;if(_.Rb=!(1&w),_.td=w>>1&7,_.yd=w>>4&1,_.ub=w>>5,3<_.td)return Ye(o,3,"Incorrect keyframe parameters.");if(!_.yd)return Ye(o,4,"Frame not displayable.");m+=3,b-=3;var L=o.Kc;if(_.Rb){if(7>b)return Ye(o,7,"cannot parse picture header");if(!Ro(d,m,b))return Ye(o,3,"Bad code word");L.c=16383&(d[m+4]<<8|d[m+3]),L.Td=d[m+4]>>6,L.i=16383&(d[m+6]<<8|d[m+5]),L.Ud=d[m+6]>>6,m+=7,b-=7,o.za=L.c+15>>4,o.Ub=L.i+15>>4,s.width=L.c,s.height=L.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,i((w=o.Pa).jb,0,255,w.jb.length),n((w=o.Qa)!=null),w.Cb=0,w.Bb=0,w.Fb=1,i(w.Zb,0,0,w.Zb.length),i(w.Lb,0,0,w.Lb)}if(_.ub>b)return Ye(o,7,"bad partition length");st(w=o.m,d,m,_.ub),m+=_.ub,b-=_.ub,_.Rb&&(L.Ld=ot(w),L.Kd=ot(w)),L=o.Qa;var k,E=o.Pa;if(n(w!=null),n(L!=null),L.Cb=ot(w),L.Cb){if(L.Bb=ot(w),ot(w)){for(L.Fb=ot(w),k=0;4>k;++k)L.Zb[k]=ot(w)?nt(w,7):0;for(k=0;4>k;++k)L.Lb[k]=ot(w)?nt(w,6):0}if(L.Bb)for(k=0;3>k;++k)E.jb[k]=ot(w)?ht(w,8):255}else L.Bb=0;if(w.Ka)return Ye(o,3,"cannot parse segment header");if((L=o.ed).zd=ot(w),L.Tb=ht(w,6),L.wb=ht(w,3),L.Pc=ot(w),L.Pc&&ot(w)){for(E=0;4>E;++E)ot(w)&&(L.vd[E]=nt(w,6));for(E=0;4>E;++E)ot(w)&&(L.od[E]=nt(w,6))}if(o.L=L.Tb==0?0:L.zd?1:2,w.Ka)return Ye(o,3,"cannot parse filter header");var V=b;if(b=k=m,m=k+V,L=V,o.Xb=(1<<ht(o.m,2))-1,V<3*(E=o.Xb))d=7;else{for(k+=3*E,L-=3*E,V=0;V<E;++V){var et=d[b+0]|d[b+1]<<8|d[b+2]<<16;et>L&&(et=L),st(o.Jc[+V],d,k,et),k+=et,L-=et,b+=3}st(o.Jc[+E],d,k,L),d=k<m?0:5}if(d!=0)return Ye(o,d,"cannot parse partitions");for(d=ht(k=o.m,7),b=ot(k)?nt(k,4):0,m=ot(k)?nt(k,4):0,L=ot(k)?nt(k,4):0,E=ot(k)?nt(k,4):0,k=ot(k)?nt(k,4):0,V=o.Qa,et=0;4>et;++et){if(V.Cb){var C=V.Zb[et];V.Fb||(C+=d)}else{if(0<et){o.pb[et]=o.pb[0];continue}C=d}var Z=o.pb[et];Z.Sc[0]=gl[gr(C+b,127)],Z.Sc[1]=ml[gr(C+0,127)],Z.Eb[0]=2*gl[gr(C+m,127)],Z.Eb[1]=101581*ml[gr(C+L,127)]>>16,8>Z.Eb[1]&&(Z.Eb[1]=8),Z.Qc[0]=gl[gr(C+E,117)],Z.Qc[1]=ml[gr(C+k,127)],Z.lc=C+k}if(!_.Rb)return Ye(o,4,"Not a key frame.");for(ot(w),_=o.Pa,d=0;4>d;++d){for(b=0;8>b;++b)for(m=0;3>m;++m)for(L=0;11>L;++L)E=gt(w,A1[d][b][m][L])?ht(w,8):_1[d][b][m][L],_.Wc[d][b].Yb[m][L]=E;for(b=0;17>b;++b)_.Xc[d][b]=_.Wc[d][N1[b]]}return o.kc=ot(w),o.kc&&(o.Bd=ht(w,8)),o.cb=1}function ea(o,s,d,m,b,w,_){var L=s[b].Yb[d];for(d=0;16>b;++b){if(!gt(o,L[d+0]))return b;for(;!gt(o,L[d+1]);)if(L=s[++b].Yb[0],d=0,b==16)return 16;var k=s[b+1].Yb;if(gt(o,L[d+2])){var E=o,V=0;if(gt(E,(C=L)[(et=d)+3]))if(gt(E,C[et+6])){for(L=0,et=2*(V=gt(E,C[et+8]))+(C=gt(E,C[et+9+V])),V=0,C=w1[et];C[L];++L)V+=V+gt(E,C[L]);V+=3+(8<<et)}else gt(E,C[et+7])?(V=7+2*gt(E,165),V+=gt(E,145)):V=5+gt(E,159);else V=gt(E,C[et+4])?3+gt(E,C[et+5]):2;L=k[2]}else V=1,L=k[1];k=_+y1[b],0>(E=o).b&&at(E);var et,C=E.b,Z=(et=E.Ca>>1)-(E.I>>C)>>31;--E.b,E.Ca+=Z,E.Ca|=1,E.I-=(et+1&Z)<<C,w[k]=((V^Z)-Z)*m[(0<b)+0]}return 16}function Mo(o){var s=o.rb[o.sb-1];s.la=0,s.Na=0,i(o.zc,0,0,o.zc.length),o.ja=0}function Vn(o,s,d,m,b){b=o[s+d+32*m]+(b>>3),o[s+d+32*m]=-256&b?0>b?0:255:b}function Je(o,s,d,m,b,w){Vn(o,s,0,d,m+b),Vn(o,s,1,d,m+w),Vn(o,s,2,d,m-w),Vn(o,s,3,d,m-b)}function Cr(o){return(20091*o>>16)+o}function jo(o,s,d,m){var b,w=0,_=a(16);for(b=0;4>b;++b){var L=o[s+0]+o[s+8],k=o[s+0]-o[s+8],E=(35468*o[s+4]>>16)-Cr(o[s+12]),V=Cr(o[s+4])+(35468*o[s+12]>>16);_[w+0]=L+V,_[w+1]=k+E,_[w+2]=k-E,_[w+3]=L-V,w+=4,s++}for(b=w=0;4>b;++b)L=(o=_[w+0]+4)+_[w+8],k=o-_[w+8],E=(35468*_[w+4]>>16)-Cr(_[w+12]),Vn(d,m,0,0,L+(V=Cr(_[w+4])+(35468*_[w+12]>>16))),Vn(d,m,1,0,k+E),Vn(d,m,2,0,k-E),Vn(d,m,3,0,L-V),w++,m+=32}function Ks(o,s,d,m){var b=o[s+0]+4,w=35468*o[s+4]>>16,_=Cr(o[s+4]),L=35468*o[s+1]>>16;Je(d,m,0,b+_,o=Cr(o[s+1]),L),Je(d,m,1,b+w,o,L),Je(d,m,2,b-w,o,L),Je(d,m,3,b-_,o,L)}function Xs(o,s,d,m,b){jo(o,s,d,m),b&&jo(o,s+16,d,m+4)}function vr(o,s,d,m){Ri(o,s+0,d,m,1),Ri(o,s+32,d,m+128,1)}function Bo(o,s,d,m){var b;for(o=o[s+0]+4,b=0;4>b;++b)for(s=0;4>s;++s)Vn(d,m,s,b,o)}function zo(o,s,d,m){o[s+0]&&xe(o,s+0,d,m),o[s+16]&&xe(o,s+16,d,m+4),o[s+32]&&xe(o,s+32,d,m+128),o[s+48]&&xe(o,s+48,d,m+128+4)}function na(o,s,d,m){var b,w=a(16);for(b=0;4>b;++b){var _=o[s+0+b]+o[s+12+b],L=o[s+4+b]+o[s+8+b],k=o[s+4+b]-o[s+8+b],E=o[s+0+b]-o[s+12+b];w[0+b]=_+L,w[8+b]=_-L,w[4+b]=E+k,w[12+b]=E-k}for(b=0;4>b;++b)_=(o=w[0+4*b]+3)+w[3+4*b],L=w[1+4*b]+w[2+4*b],k=w[1+4*b]-w[2+4*b],E=o-w[3+4*b],d[m+0]=_+L>>3,d[m+16]=E+k>>3,d[m+32]=_-L>>3,d[m+48]=E-k>>3,m+=64}function Ni(o,s,d){var m,b=s-32,w=On,_=255-o[b-1];for(m=0;m<d;++m){var L,k=w,E=_+o[s-1];for(L=0;L<d;++L)o[s+L]=k[E+o[b+L]];s+=32}}function Js(o,s){Ni(o,s,4)}function Qs(o,s){Ni(o,s,8)}function tl(o,s){Ni(o,s,16)}function Oa(o,s){var d;for(d=0;16>d;++d)r(o,s+32*d,o,s-32,16)}function Uo(o,s){var d;for(d=16;0<d;--d)i(o,s,o[s-1],16),s+=32}function rr(o,s,d){var m;for(m=0;16>m;++m)i(s,d+32*m,o,16)}function el(o,s){var d,m=16;for(d=0;16>d;++d)m+=o[s-1+32*d]+o[s+d-32];rr(m>>5,o,s)}function Li(o,s){var d,m=8;for(d=0;16>d;++d)m+=o[s-1+32*d];rr(m>>4,o,s)}function Ta(o,s){var d,m=8;for(d=0;16>d;++d)m+=o[s+d-32];rr(m>>4,o,s)}function nl(o,s){rr(128,o,s)}function Kt(o,s,d){return o+2*s+d+2>>2}function rl(o,s){var d,m=s-32;for(m=new Uint8Array([Kt(o[m-1],o[m+0],o[m+1]),Kt(o[m+0],o[m+1],o[m+2]),Kt(o[m+1],o[m+2],o[m+3]),Kt(o[m+2],o[m+3],o[m+4])]),d=0;4>d;++d)r(o,s+32*d,m,0,m.length)}function il(o,s){var d=o[s-1],m=o[s-1+32],b=o[s-1+64],w=o[s-1+96];xt(o,s+0,16843009*Kt(o[s-1-32],d,m)),xt(o,s+32,16843009*Kt(d,m,b)),xt(o,s+64,16843009*Kt(m,b,w)),xt(o,s+96,16843009*Kt(b,w,w))}function al(o,s){var d,m=4;for(d=0;4>d;++d)m+=o[s+d-32]+o[s-1+32*d];for(m>>=3,d=0;4>d;++d)i(o,s+32*d,m,4)}function Or(o,s){var d=o[s-1+0],m=o[s-1+32],b=o[s-1+64],w=o[s-1-32],_=o[s+0-32],L=o[s+1-32],k=o[s+2-32],E=o[s+3-32];o[s+0+96]=Kt(m,b,o[s-1+96]),o[s+1+96]=o[s+0+64]=Kt(d,m,b),o[s+2+96]=o[s+1+64]=o[s+0+32]=Kt(w,d,m),o[s+3+96]=o[s+2+64]=o[s+1+32]=o[s+0+0]=Kt(_,w,d),o[s+3+64]=o[s+2+32]=o[s+1+0]=Kt(L,_,w),o[s+3+32]=o[s+2+0]=Kt(k,L,_),o[s+3+0]=Kt(E,k,L)}function Tr(o,s){var d=o[s+1-32],m=o[s+2-32],b=o[s+3-32],w=o[s+4-32],_=o[s+5-32],L=o[s+6-32],k=o[s+7-32];o[s+0+0]=Kt(o[s+0-32],d,m),o[s+1+0]=o[s+0+32]=Kt(d,m,b),o[s+2+0]=o[s+1+32]=o[s+0+64]=Kt(m,b,w),o[s+3+0]=o[s+2+32]=o[s+1+64]=o[s+0+96]=Kt(b,w,_),o[s+3+32]=o[s+2+64]=o[s+1+96]=Kt(w,_,L),o[s+3+64]=o[s+2+96]=Kt(_,L,k),o[s+3+96]=Kt(L,k,k)}function ol(o,s){var d=o[s-1+0],m=o[s-1+32],b=o[s-1+64],w=o[s-1-32],_=o[s+0-32],L=o[s+1-32],k=o[s+2-32],E=o[s+3-32];o[s+0+0]=o[s+1+64]=w+_+1>>1,o[s+1+0]=o[s+2+64]=_+L+1>>1,o[s+2+0]=o[s+3+64]=L+k+1>>1,o[s+3+0]=k+E+1>>1,o[s+0+96]=Kt(b,m,d),o[s+0+64]=Kt(m,d,w),o[s+0+32]=o[s+1+96]=Kt(d,w,_),o[s+1+32]=o[s+2+96]=Kt(w,_,L),o[s+2+32]=o[s+3+96]=Kt(_,L,k),o[s+3+32]=Kt(L,k,E)}function sl(o,s){var d=o[s+0-32],m=o[s+1-32],b=o[s+2-32],w=o[s+3-32],_=o[s+4-32],L=o[s+5-32],k=o[s+6-32],E=o[s+7-32];o[s+0+0]=d+m+1>>1,o[s+1+0]=o[s+0+64]=m+b+1>>1,o[s+2+0]=o[s+1+64]=b+w+1>>1,o[s+3+0]=o[s+2+64]=w+_+1>>1,o[s+0+32]=Kt(d,m,b),o[s+1+32]=o[s+0+96]=Kt(m,b,w),o[s+2+32]=o[s+1+96]=Kt(b,w,_),o[s+3+32]=o[s+2+96]=Kt(w,_,L),o[s+3+64]=Kt(_,L,k),o[s+3+96]=Kt(L,k,E)}function ra(o,s){var d=o[s-1+0],m=o[s-1+32],b=o[s-1+64],w=o[s-1+96];o[s+0+0]=d+m+1>>1,o[s+2+0]=o[s+0+32]=m+b+1>>1,o[s+2+32]=o[s+0+64]=b+w+1>>1,o[s+1+0]=Kt(d,m,b),o[s+3+0]=o[s+1+32]=Kt(m,b,w),o[s+3+32]=o[s+1+64]=Kt(b,w,w),o[s+3+64]=o[s+2+64]=o[s+0+96]=o[s+1+96]=o[s+2+96]=o[s+3+96]=w}function Da(o,s){var d=o[s-1+0],m=o[s-1+32],b=o[s-1+64],w=o[s-1+96],_=o[s-1-32],L=o[s+0-32],k=o[s+1-32],E=o[s+2-32];o[s+0+0]=o[s+2+32]=d+_+1>>1,o[s+0+32]=o[s+2+64]=m+d+1>>1,o[s+0+64]=o[s+2+96]=b+m+1>>1,o[s+0+96]=w+b+1>>1,o[s+3+0]=Kt(L,k,E),o[s+2+0]=Kt(_,L,k),o[s+1+0]=o[s+3+32]=Kt(d,_,L),o[s+1+32]=o[s+3+64]=Kt(m,d,_),o[s+1+64]=o[s+3+96]=Kt(b,m,d),o[s+1+96]=Kt(w,b,m)}function Si(o,s){var d;for(d=0;8>d;++d)r(o,s+32*d,o,s-32,8)}function ll(o,s){var d;for(d=0;8>d;++d)i(o,s,o[s-1],8),s+=32}function Dr(o,s,d){var m;for(m=0;8>m;++m)i(s,d+32*m,o,8)}function hl(o,s){var d,m=8;for(d=0;8>d;++d)m+=o[s+d-32]+o[s-1+32*d];Dr(m>>4,o,s)}function Ra(o,s){var d,m=4;for(d=0;8>d;++d)m+=o[s+d-32];Dr(m>>3,o,s)}function Ma(o,s){var d,m=4;for(d=0;8>d;++d)m+=o[s-1+32*d];Dr(m>>3,o,s)}function qo(o,s){Dr(128,o,s)}function Rr(o,s,d){var m=o[s-d],b=o[s+0],w=3*(b-m)+fl[1020+o[s-2*d]-o[s+d]],_=Ko[112+(w+4>>3)];o[s-d]=On[255+m+Ko[112+(w+3>>3)]],o[s+0]=On[255+b-_]}function ja(o,s,d,m){var b=o[s+0],w=o[s+d];return Yn[255+o[s-2*d]-o[s-d]]>m||Yn[255+w-b]>m}function ia(o,s,d,m){return 4*Yn[255+o[s-d]-o[s+0]]+Yn[255+o[s-2*d]-o[s+d]]<=m}function Ba(o,s,d,m,b){var w=o[s-3*d],_=o[s-2*d],L=o[s-d],k=o[s+0],E=o[s+d],V=o[s+2*d],et=o[s+3*d];return 4*Yn[255+L-k]+Yn[255+_-E]>m?0:Yn[255+o[s-4*d]-w]<=b&&Yn[255+w-_]<=b&&Yn[255+_-L]<=b&&Yn[255+et-V]<=b&&Yn[255+V-E]<=b&&Yn[255+E-k]<=b}function ki(o,s,d,m){var b=2*m+1;for(m=0;16>m;++m)ia(o,s+m,d,b)&&Rr(o,s+m,d)}function za(o,s,d,m){var b=2*m+1;for(m=0;16>m;++m)ia(o,s+m*d,1,b)&&Rr(o,s+m*d,1)}function Ho(o,s,d,m){var b;for(b=3;0<b;--b)ki(o,s+=4*d,d,m)}function Wo(o,s,d,m){var b;for(b=3;0<b;--b)za(o,s+=4,d,m)}function Mr(o,s,d,m,b,w,_,L){for(w=2*w+1;0<b--;){if(Ba(o,s,d,w,_))if(ja(o,s,d,L))Rr(o,s,d);else{var k=o,E=s,V=d,et=k[E-2*V],C=k[E-V],Z=k[E+0],X=k[E+V],lt=k[E+2*V],Q=27*(pt=fl[1020+3*(Z-C)+fl[1020+et-X]])+63>>7,ft=18*pt+63>>7,pt=9*pt+63>>7;k[E-3*V]=On[255+k[E-3*V]+pt],k[E-2*V]=On[255+et+ft],k[E-V]=On[255+C+Q],k[E+0]=On[255+Z-Q],k[E+V]=On[255+X-ft],k[E+2*V]=On[255+lt-pt]}s+=m}}function jr(o,s,d,m,b,w,_,L){for(w=2*w+1;0<b--;){if(Ba(o,s,d,w,_))if(ja(o,s,d,L))Rr(o,s,d);else{var k=o,E=s,V=d,et=k[E-V],C=k[E+0],Z=k[E+V],X=Ko[112+(4+(lt=3*(C-et))>>3)],lt=Ko[112+(lt+3>>3)],Q=X+1>>1;k[E-2*V]=On[255+k[E-2*V]+Q],k[E-V]=On[255+et+lt],k[E+0]=On[255+C-X],k[E+V]=On[255+Z-Q]}s+=m}}function Go(o,s,d,m,b,w){Mr(o,s,d,1,16,m,b,w)}function Pi(o,s,d,m,b,w){Mr(o,s,1,d,16,m,b,w)}function Vo(o,s,d,m,b,w){var _;for(_=3;0<_;--_)jr(o,s+=4*d,d,1,16,m,b,w)}function c(o,s,d,m,b,w){var _;for(_=3;0<_;--_)jr(o,s+=4,1,d,16,m,b,w)}function v(o,s,d,m,b,w,_,L){Mr(o,s,b,1,8,w,_,L),Mr(d,m,b,1,8,w,_,L)}function T(o,s,d,m,b,w,_,L){Mr(o,s,1,b,8,w,_,L),Mr(d,m,1,b,8,w,_,L)}function z(o,s,d,m,b,w,_,L){jr(o,s+4*b,b,1,8,w,_,L),jr(d,m+4*b,b,1,8,w,_,L)}function K(o,s,d,m,b,w,_,L){jr(o,s+4,1,b,8,w,_,L),jr(d,m+4,1,b,8,w,_,L)}function dt(){this.ba=new le,this.ec=[],this.cc=[],this.Mc=[],this.Dc=this.Nc=this.dc=this.fc=0,this.Oa=new _e,this.memory=0,this.Ib="OutputFunc",this.Jb="OutputAlphaFunc",this.Nd="OutputRowFunc"}function vt(){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 Et(){this.nc=this.Ea=this.b=this.hc=0,this.K=[],this.w=0}function Dt(){this.ua=0,this.Wa=new ae,this.vb=new ae,this.md=this.xc=this.wc=0,this.vc=[],this.Wb=0,this.Ya=new it,this.yc=new W}function Yt(){this.xb=this.a=0,this.l=new ta,this.ca=new le,this.V=[],this.Ba=0,this.Ta=[],this.Ua=0,this.m=new R,this.Pb=0,this.wd=new R,this.Ma=this.$=this.C=this.i=this.c=this.xd=0,this.s=new Dt,this.ab=0,this.gc=h(4,Et),this.Oc=0}function ne(){this.Lc=this.Z=this.$a=this.i=this.c=0,this.l=new ta,this.ic=0,this.ca=[],this.tb=0,this.qd=null,this.rd=0}function ge(o,s,d,m,b,w,_){for(o=o==null?0:o[s+0],s=0;s<_;++s)b[w+s]=o+d[m+s]&255,o=b[w+s]}function Re(o,s,d,m,b,w,_){var L;if(o==null)ge(null,null,d,m,b,w,_);else for(L=0;L<_;++L)b[w+L]=o[s+L]+d[m+L]&255}function Ke(o,s,d,m,b,w,_){if(o==null)ge(null,null,d,m,b,w,_);else{var L,k=o[s+0],E=k,V=k;for(L=0;L<_;++L)E=V+(k=o[s+L])-E,V=d[m+L]+(-256&E?0>E?0:255:E)&255,E=k,b[w+L]=V}}function Fe(o,s,d,m){var b=s.width,w=s.o;if(n(o!=null&&s!=null),0>d||0>=m||d+m>w)return null;if(!o.Cc){if(o.ga==null){var _;if(o.ga=new ne,(_=o.ga==null)||(_=s.width*s.o,n(o.Gb.length==0),o.Gb=a(_),o.Uc=0,o.Gb==null?_=0:(o.mb=o.Gb,o.nb=o.Uc,o.rc=null,_=1),_=!_),!_){_=o.ga;var L=o.Fa,k=o.P,E=o.qc,V=o.mb,et=o.nb,C=k+1,Z=E-1,X=_.l;if(n(L!=null&&V!=null&&s!=null),li[0]=null,li[1]=ge,li[2]=Re,li[3]=Ke,_.ca=V,_.tb=et,_.c=s.width,_.i=s.height,n(0<_.c&&0<_.i),1>=E)s=0;else if(_.$a=3&L[k+0],_.Z=L[k+0]>>2&3,_.Lc=L[k+0]>>4&3,k=L[k+0]>>6&3,0>_.$a||1<_.$a||4<=_.Z||1<_.Lc||k)s=0;else if(X.put=Vt,X.ac=ur,X.bc=Fr,X.ma=_,X.width=s.width,X.height=s.height,X.Da=s.Da,X.v=s.v,X.va=s.va,X.j=s.j,X.o=s.o,_.$a)t:{n(_.$a==1),s=xi();e:for(;;){if(s==null){s=0;break t}if(n(_!=null),_.mc=s,s.c=_.c,s.i=_.i,s.l=_.l,s.l.ma=_,s.l.width=_.c,s.l.height=_.i,s.a=0,ut(s.m,L,C,Z),!pr(_.c,_.i,1,s,null)||(s.ab==1&&s.gc[0].hc==3&&tr(s.s)?(_.ic=1,L=s.c*s.i,s.Ta=null,s.Ua=0,s.V=a(L),s.Ba=0,s.V==null?(s.a=1,s=0):s=1):(_.ic=0,s=Ai(s,_.c)),!s))break e;s=1;break t}_.mc=null,s=0}else s=Z>=_.c*_.i;_=!s}if(_)return null;o.ga.Lc!=1?o.Ga=0:m=w-d}n(o.ga!=null),n(d+m<=w);t:{if(s=(L=o.ga).c,w=L.l.o,L.$a==0){if(C=o.rc,Z=o.Vc,X=o.Fa,k=o.P+1+d*s,E=o.mb,V=o.nb+d*s,n(k<=o.P+o.qc),L.Z!=0)for(n(li[L.Z]!=null),_=0;_<m;++_)li[L.Z](C,Z,X,k,E,V,s),C=E,Z=V,V+=s,k+=s;else for(_=0;_<m;++_)r(E,V,X,k,s),C=E,Z=V,V+=s,k+=s;o.rc=C,o.Vc=Z}else{if(n(L.mc!=null),s=d+m,n((_=L.mc)!=null),n(s<=_.i),_.C>=s)s=1;else if(L.ic||ir(),L.ic){L=_.V,C=_.Ba,Z=_.c;var lt=_.i,Q=(X=1,k=_.$/Z,E=_.$%Z,V=_.m,et=_.s,_.$),ft=Z*lt,pt=Z*s,_t=et.wc,bt=Q<pt?ln(et,E,k):null;n(Q<=ft),n(s<=lt),n(tr(et));e:for(;;){for(;!V.h&&Q<pt;){if(E&_t||(bt=ln(et,E,k)),n(bt!=null),J(V),256>(lt=Me(bt.G[0],bt.H[0],V)))L[C+Q]=lt,++Q,++E>=Z&&(E=0,++k<=s&&!(k%16)&&er(_,k));else{if(!(280>lt)){X=0;break e}lt=qn(lt-256,V);var Mt,Pt=Me(bt.G[4],bt.H[4],V);if(J(V),!(Q>=(Pt=Hn(Z,Pt=qn(Pt,V)))&&ft-Q>=lt)){X=0;break e}for(Mt=0;Mt<lt;++Mt)L[C+Q+Mt]=L[C+Q+Mt-Pt];for(Q+=lt,E+=lt;E>=Z;)E-=Z,++k<=s&&!(k%16)&&er(_,k);Q<pt&&E&_t&&(bt=ln(et,E,k))}n(V.h==G(V))}er(_,k>s?s:k);break e}!X||V.h&&Q<ft?(X=0,_.a=V.h?5:3):_.$=Q,s=X}else s=nr(_,_.V,_.Ba,_.c,_.i,s,Xi);if(!s){m=0;break t}}d+m>=w&&(o.Cc=1),m=1}if(!m)return null;if(o.Cc&&((m=o.ga)!=null&&(m.mc=null),o.ga=null,0<o.Ga))return alert("todo:WebPDequantizeLevels"),null}return o.nb+d*b}function Qe(o,s,d,m,b,w){for(;0<b--;){var _,L=o,k=s+(d?1:0),E=o,V=s+(d?0:3);for(_=0;_<m;++_){var et=E[V+4*_];et!=255&&(et*=32897,L[k+4*_+0]=L[k+4*_+0]*et>>23,L[k+4*_+1]=L[k+4*_+1]*et>>23,L[k+4*_+2]=L[k+4*_+2]*et>>23)}s+=w}}function Xe(o,s,d,m,b){for(;0<m--;){var w;for(w=0;w<d;++w){var _=o[s+2*w+0],L=15&(E=o[s+2*w+1]),k=4369*L,E=(240&E|E>>4)*k>>16;o[s+2*w+0]=(240&_|_>>4)*k>>16&240|(15&_|_<<4)*k>>16>>4&15,o[s+2*w+1]=240&E|L}s+=b}}function hn(o,s,d,m,b,w,_,L){var k,E,V=255;for(E=0;E<b;++E){for(k=0;k<m;++k){var et=o[s+k];w[_+4*k]=et,V&=et}s+=d,_+=L}return V!=255}function Br(o,s,d,m,b){var w;for(w=0;w<b;++w)d[m+w]=o[s+w]>>8}function ir(){Ja=Qe,Hh=Xe,Wh=hn,Gh=Br}function zr(o,s,d){j[o]=function(m,b,w,_,L,k,E,V,et,C,Z,X,lt,Q,ft,pt,_t){var bt,Mt=_t-1>>1,Pt=L[k+0]|E[V+0]<<16,re=et[C+0]|Z[X+0]<<16;n(m!=null);var Ct=3*Pt+re+131074>>2;for(s(m[b+0],255&Ct,Ct>>16,lt,Q),w!=null&&(Ct=3*re+Pt+131074>>2,s(w[_+0],255&Ct,Ct>>16,ft,pt)),bt=1;bt<=Mt;++bt){var ue=L[k+bt]|E[V+bt]<<16,en=et[C+bt]|Z[X+bt]<<16,ie=Pt+ue+re+en+524296,Ot=ie+2*(ue+re)>>3;Ct=Ot+Pt>>1,Pt=(ie=ie+2*(Pt+en)>>3)+ue>>1,s(m[b+2*bt-1],255&Ct,Ct>>16,lt,Q+(2*bt-1)*d),s(m[b+2*bt-0],255&Pt,Pt>>16,lt,Q+(2*bt-0)*d),w!=null&&(Ct=ie+re>>1,Pt=Ot+en>>1,s(w[_+2*bt-1],255&Ct,Ct>>16,ft,pt+(2*bt-1)*d),s(w[_+2*bt+0],255&Pt,Pt>>16,ft,pt+(2*bt+0)*d)),Pt=ue,re=en}1&_t||(Ct=3*Pt+re+131074>>2,s(m[b+_t-1],255&Ct,Ct>>16,lt,Q+(_t-1)*d),w!=null&&(Ct=3*re+Pt+131074>>2,s(w[_+_t-1],255&Ct,Ct>>16,ft,pt+(_t-1)*d)))}}function Ua(){Kn[Xo]=S1,Kn[Jo]=nf,Kn[Xh]=k1,Kn[Qo]=rf,Kn[ts]=af,Kn[cl]=of,Kn[Jh]=P1,Kn[ul]=nf,Kn[dl]=rf,Kn[es]=af,Kn[pl]=of}function aa(o){return o&~I1?0>o?0:255:o>>sf}function Jr(o,s){return aa((19077*o>>8)+(26149*s>>8)-14234)}function Ii(o,s,d){return aa((19077*o>>8)-(6419*s>>8)-(13320*d>>8)+8708)}function Fi(o,s){return aa((19077*o>>8)+(33050*s>>8)-17685)}function Qr(o,s,d,m,b){m[b+0]=Jr(o,d),m[b+1]=Ii(o,s,d),m[b+2]=Fi(o,s)}function fn(o,s,d,m,b){m[b+0]=Fi(o,s),m[b+1]=Ii(o,s,d),m[b+2]=Jr(o,d)}function Ei(o,s,d,m,b){var w=Ii(o,s,d);s=w<<3&224|Fi(o,s)>>3,m[b+0]=248&Jr(o,d)|w>>5,m[b+1]=s}function Ci(o,s,d,m,b){var w=240&Fi(o,s)|15;m[b+0]=240&Jr(o,d)|Ii(o,s,d)>>4,m[b+1]=w}function qa(o,s,d,m,b){m[b+0]=255,Qr(o,s,d,m,b+1)}function Ha(o,s,d,m,b){fn(o,s,d,m,b),m[b+3]=255}function _n(o,s,d,m,b){Qr(o,s,d,m,b),m[b+3]=255}function Ur(o,s,d){j[o]=function(m,b,w,_,L,k,E,V,et){for(var C=V+(-2&et)*d;V!=C;)s(m[b+0],w[_+0],L[k+0],E,V),s(m[b+1],w[_+0],L[k+0],E,V+d),b+=2,++_,++k,V+=2*d;1&et&&s(m[b+0],w[_+0],L[k+0],E,V)}}function oa(o,s,d){return d==0?o==0?s==0?6:5:s==0?4:0:d}function Zo(o,s,d,m,b){switch(o>>>30){case 3:Ri(s,d,m,b,0);break;case 2:$n(s,d,m,b);break;case 1:xe(s,d,m,b)}}function Zn(o,s){var d,m,b=s.M,w=s.Nb,_=o.oc,L=o.pc+40,k=o.oc,E=o.pc+584,V=o.oc,et=o.pc+600;for(d=0;16>d;++d)_[L+32*d-1]=129;for(d=0;8>d;++d)k[E+32*d-1]=129,V[et+32*d-1]=129;for(0<b?_[L-1-32]=k[E-1-32]=V[et-1-32]=129:(i(_,L-32-1,127,21),i(k,E-32-1,127,9),i(V,et-32-1,127,9)),m=0;m<o.za;++m){var C=s.ya[s.aa+m];if(0<m){for(d=-1;16>d;++d)r(_,L+32*d-4,_,L+32*d+12,4);for(d=-1;8>d;++d)r(k,E+32*d-4,k,E+32*d+4,4),r(V,et+32*d-4,V,et+32*d+4,4)}var Z=o.Gd,X=o.Hd+m,lt=C.ad,Q=C.Hc;if(0<b&&(r(_,L-32,Z[X].y,0,16),r(k,E-32,Z[X].f,0,8),r(V,et-32,Z[X].ea,0,8)),C.Za){var ft=_,pt=L-32+16;for(0<b&&(m>=o.za-1?i(ft,pt,Z[X].y[15],4):r(ft,pt,Z[X+1].y,0,4)),d=0;4>d;d++)ft[pt+128+d]=ft[pt+256+d]=ft[pt+384+d]=ft[pt+0+d];for(d=0;16>d;++d,Q<<=2)ft=_,pt=L+hf[d],ar[C.Ob[d]](ft,pt),Zo(Q,lt,16*+d,ft,pt)}else if(ft=oa(m,b,C.Ob[0]),si[ft](_,L),Q!=0)for(d=0;16>d;++d,Q<<=2)Zo(Q,lt,16*+d,_,L+hf[d]);for(d=C.Gc,ft=oa(m,b,C.Dd),Wr[ft](k,E),Wr[ft](V,et),Q=lt,ft=k,pt=E,255&(C=0|d)&&(170&C?yr(Q,256,ft,pt):Se(Q,256,ft,pt)),C=V,Q=et,255&(d>>=8)&&(170&d?yr(lt,320,C,Q):Se(lt,320,C,Q)),b<o.Ub-1&&(r(Z[X].y,0,_,L+480,16),r(Z[X].f,0,k,E+224,8),r(Z[X].ea,0,V,et+224,8)),d=8*w*o.B,Z=o.sa,X=o.ta+16*m+16*w*o.R,lt=o.qa,C=o.ra+8*m+d,Q=o.Ha,ft=o.Ia+8*m+d,d=0;16>d;++d)r(Z,X+d*o.R,_,L+32*d,16);for(d=0;8>d;++d)r(lt,C+d*o.B,k,E+32*d,8),r(Q,ft+d*o.B,V,et+32*d,8)}}function Oi(o,s,d,m,b,w,_,L,k){var E=[0],V=[0],et=0,C=k!=null?k.kd:0,Z=k??new vt;if(o==null||12>d)return 7;Z.data=o,Z.w=s,Z.ha=d,s=[s],d=[d],Z.gb=[Z.gb];t:{var X=s,lt=d,Q=Z.gb;if(n(o!=null),n(lt!=null),n(Q!=null),Q[0]=0,12<=lt[0]&&!e(o,X[0],"RIFF")){if(e(o,X[0]+8,"WEBP")){Q=3;break t}var ft=Bt(o,X[0]+4);if(12>ft||4294967286<ft){Q=3;break t}if(C&&ft>lt[0]-8){Q=7;break t}Q[0]=ft,X[0]+=12,lt[0]-=12}Q=0}if(Q!=0)return Q;for(ft=0<Z.gb[0],d=d[0];;){t:{var pt=o;lt=s,Q=d;var _t=E,bt=V,Mt=X=[0];if((Ct=et=[et])[0]=0,8>Q[0])Q=7;else{if(!e(pt,lt[0],"VP8X")){if(Bt(pt,lt[0]+4)!=10){Q=3;break t}if(18>Q[0]){Q=7;break t}var Pt=Bt(pt,lt[0]+8),re=1+St(pt,lt[0]+12);if(2147483648<=re*(pt=1+St(pt,lt[0]+15))){Q=3;break t}Mt!=null&&(Mt[0]=Pt),_t!=null&&(_t[0]=re),bt!=null&&(bt[0]=pt),lt[0]+=18,Q[0]-=18,Ct[0]=1}Q=0}}if(et=et[0],X=X[0],Q!=0)return Q;if(lt=!!(2&X),!ft&&et)return 3;if(w!=null&&(w[0]=!!(16&X)),_!=null&&(_[0]=lt),L!=null&&(L[0]=0),_=E[0],X=V[0],et&<&&k==null){Q=0;break}if(4>d){Q=7;break}if(ft&&et||!ft&&!et&&!e(o,s[0],"ALPH")){d=[d],Z.na=[Z.na],Z.P=[Z.P],Z.Sa=[Z.Sa];t:{Pt=o,Q=s,ft=d;var Ct=Z.gb;_t=Z.na,bt=Z.P,Mt=Z.Sa,re=22,n(Pt!=null),n(ft!=null),pt=Q[0];var ue=ft[0];for(n(_t!=null),n(Mt!=null),_t[0]=null,bt[0]=null,Mt[0]=0;;){if(Q[0]=pt,ft[0]=ue,8>ue){Q=7;break t}var en=Bt(Pt,pt+4);if(4294967286<en){Q=3;break t}var ie=8+en+1&-2;if(re+=ie,0<Ct&&re>Ct){Q=3;break t}if(!e(Pt,pt,"VP8 ")||!e(Pt,pt,"VP8L")){Q=0;break t}if(ue[0]<ie){Q=7;break t}e(Pt,pt,"ALPH")||(_t[0]=Pt,bt[0]=pt+8,Mt[0]=en),pt+=ie,ue-=ie}}if(d=d[0],Z.na=Z.na[0],Z.P=Z.P[0],Z.Sa=Z.Sa[0],Q!=0)break}d=[d],Z.Ja=[Z.Ja],Z.xa=[Z.xa];t:if(Ct=o,Q=s,ft=d,_t=Z.gb[0],bt=Z.Ja,Mt=Z.xa,Pt=Q[0],pt=!e(Ct,Pt,"VP8 "),re=!e(Ct,Pt,"VP8L"),n(Ct!=null),n(ft!=null),n(bt!=null),n(Mt!=null),8>ft[0])Q=7;else{if(pt||re){if(Ct=Bt(Ct,Pt+4),12<=_t&&Ct>_t-12){Q=3;break t}if(C&&Ct>ft[0]-8){Q=7;break t}bt[0]=Ct,Q[0]+=8,ft[0]-=8,Mt[0]=re}else Mt[0]=5<=ft[0]&&Ct[Pt+0]==47&&!(Ct[Pt+4]>>5),bt[0]=ft[0];Q=0}if(d=d[0],Z.Ja=Z.Ja[0],Z.xa=Z.xa[0],s=s[0],Q!=0)break;if(4294967286<Z.Ja)return 3;if(L==null||lt||(L[0]=Z.xa?2:1),_=[_],X=[X],Z.xa){if(5>d){Q=7;break}L=_,C=X,lt=w,o==null||5>d?o=0:5<=d&&o[s+0]==47&&!(o[s+4]>>5)?(ft=[0],Ct=[0],_t=[0],ut(bt=new R,o,s,d),Er(bt,ft,Ct,_t)?(L!=null&&(L[0]=ft[0]),C!=null&&(C[0]=Ct[0]),lt!=null&&(lt[0]=_t[0]),o=1):o=0):o=0}else{if(10>d){Q=7;break}L=X,o==null||10>d||!Ro(o,s+3,d-3)?o=0:(C=o[s+0]|o[s+1]<<8|o[s+2]<<16,lt=16383&(o[s+7]<<8|o[s+6]),o=16383&(o[s+9]<<8|o[s+8]),1&C||3<(C>>1&7)||!(C>>4&1)||C>>5>=Z.Ja||!lt||!o?o=0:(_&&(_[0]=lt),L&&(L[0]=o),o=1))}if(!o||(_=_[0],X=X[0],et&&(E[0]!=_||V[0]!=X)))return 3;k!=null&&(k[0]=Z,k.offset=s-k.w,n(4294967286>s-k.w),n(k.offset==k.ha-d));break}return Q==0||Q==7&&et&&k==null?(w!=null&&(w[0]|=Z.na!=null&&0<Z.na.length),m!=null&&(m[0]=_),b!=null&&(b[0]=X),0):Q}function Wa(o,s,d){var m=s.width,b=s.height,w=0,_=0,L=m,k=b;if(s.Da=o!=null&&0<o.Da,s.Da&&(L=o.cd,k=o.bd,w=o.v,_=o.j,11>d||(w&=-2,_&=-2),0>w||0>_||0>=L||0>=k||w+L>m||_+k>b))return 0;if(s.v=w,s.j=_,s.va=w+L,s.o=_+k,s.U=L,s.T=k,s.da=o!=null&&0<o.da,s.da){if(!Ht(L,k,d=[o.ib],w=[o.hb]))return 0;s.ib=d[0],s.hb=w[0]}return s.ob=o!=null&&o.ob,s.Kb=o==null||!o.Sd,s.da&&(s.ob=s.ib<3*m/4&&s.hb<3*b/4,s.Kb=0),1}function Ga(o){if(o==null)return 2;if(11>o.S){var s=o.f.RGBA;s.fb+=(o.height-1)*s.A,s.A=-s.A}else s=o.f.kb,o=o.height,s.O+=(o-1)*s.fa,s.fa=-s.fa,s.N+=(o-1>>1)*s.Ab,s.Ab=-s.Ab,s.W+=(o-1>>1)*s.Db,s.Db=-s.Db,s.F!=null&&(s.J+=(o-1)*s.lb,s.lb=-s.lb);return 0}function ti(o,s,d,m){if(m==null||0>=o||0>=s)return 2;if(d!=null){if(d.Da){var b=d.cd,w=d.bd,_=-2&d.v,L=-2&d.j;if(0>_||0>L||0>=b||0>=w||_+b>o||L+w>s)return 2;o=b,s=w}if(d.da){if(!Ht(o,s,b=[d.ib],w=[d.hb]))return 2;o=b[0],s=w[0]}}m.width=o,m.height=s;t:{var k=m.width,E=m.height;if(o=m.S,0>=k||0>=E||!(o>=Xo&&13>o))o=2;else{if(0>=m.Rd&&m.sd==null){_=w=b=s=0;var V=(L=k*ff[o])*E;if(11>o||(w=(E+1)/2*(s=(k+1)/2),o==12&&(_=(b=k)*E)),(E=a(V+2*w+_))==null){o=1;break t}m.sd=E,11>o?((k=m.f.RGBA).eb=E,k.fb=0,k.A=L,k.size=V):((k=m.f.kb).y=E,k.O=0,k.fa=L,k.Fd=V,k.f=E,k.N=0+V,k.Ab=s,k.Cd=w,k.ea=E,k.W=0+V+w,k.Db=s,k.Ed=w,o==12&&(k.F=E,k.J=0+V+2*w),k.Tc=_,k.lb=b)}if(s=1,b=m.S,w=m.width,_=m.height,b>=Xo&&13>b)if(11>b)o=m.f.RGBA,s&=(L=Math.abs(o.A))*(_-1)+w<=o.size,s&=L>=w*ff[b],s&=o.eb!=null;else{o=m.f.kb,L=(w+1)/2,V=(_+1)/2,k=Math.abs(o.fa),E=Math.abs(o.Ab);var et=Math.abs(o.Db),C=Math.abs(o.lb),Z=C*(_-1)+w;s&=k*(_-1)+w<=o.Fd,s&=E*(V-1)+L<=o.Cd,s=(s&=et*(V-1)+L<=o.Ed)&k>=w&E>=L&et>=L,s&=o.y!=null,s&=o.f!=null,s&=o.ea!=null,b==12&&(s&=C>=w,s&=Z<=o.Tc,s&=o.F!=null)}else s=0;o=s?0:2}}return o!=0||d!=null&&d.fd&&(o=Ga(m)),o}var Ti=64,En=[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],Cn=24,ei=32,qr=8,ni=[0,0,1,1,2,2,2,2,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7];It("Predictor0","PredictorAdd0"),j.Predictor0=function(){return 4278190080},j.Predictor1=function(o){return o},j.Predictor2=function(o,s,d){return s[d+0]},j.Predictor3=function(o,s,d){return s[d+1]},j.Predictor4=function(o,s,d){return s[d-1]},j.Predictor5=function(o,s,d){return zt(zt(o,s[d+1]),s[d+0])},j.Predictor6=function(o,s,d){return zt(o,s[d-1])},j.Predictor7=function(o,s,d){return zt(o,s[d+0])},j.Predictor8=function(o,s,d){return zt(s[d-1],s[d+0])},j.Predictor9=function(o,s,d){return zt(s[d+0],s[d+1])},j.Predictor10=function(o,s,d){return zt(zt(o,s[d-1]),zt(s[d+0],s[d+1]))},j.Predictor11=function(o,s,d){var m=s[d+0];return 0>=Jt(m>>24&255,o>>24&255,(s=s[d-1])>>24&255)+Jt(m>>16&255,o>>16&255,s>>16&255)+Jt(m>>8&255,o>>8&255,s>>8&255)+Jt(255&m,255&o,255&s)?m:o},j.Predictor12=function(o,s,d){var m=s[d+0];return(ye((o>>24&255)+(m>>24&255)-((s=s[d-1])>>24&255))<<24|ye((o>>16&255)+(m>>16&255)-(s>>16&255))<<16|ye((o>>8&255)+(m>>8&255)-(s>>8&255))<<8|ye((255&o)+(255&m)-(255&s)))>>>0},j.Predictor13=function(o,s,d){var m=s[d-1];return(he((o=zt(o,s[d+0]))>>24&255,m>>24&255)<<24|he(o>>16&255,m>>16&255)<<16|he(o>>8&255,m>>8&255)<<8|he(255&o,255&m))>>>0};var Va=j.PredictorAdd0;j.PredictorAdd1=ce,It("Predictor2","PredictorAdd2"),It("Predictor3","PredictorAdd3"),It("Predictor4","PredictorAdd4"),It("Predictor5","PredictorAdd5"),It("Predictor6","PredictorAdd6"),It("Predictor7","PredictorAdd7"),It("Predictor8","PredictorAdd8"),It("Predictor9","PredictorAdd9"),It("Predictor10","PredictorAdd10"),It("Predictor11","PredictorAdd11"),It("Predictor12","PredictorAdd12"),It("Predictor13","PredictorAdd13");var sa=j.PredictorAdd2;jt("ColorIndexInverseTransform","MapARGB","32b",function(o){return o>>8&255},function(o){return o}),jt("VP8LColorIndexInverseTransformAlpha","MapAlpha","8b",function(o){return o},function(o){return o>>8&255});var qe,$o=j.ColorIndexInverseTransform,br=j.MapARGB,wr=j.VP8LColorIndexInverseTransformAlpha,Za=j.MapAlpha,$a=j.VP8LPredictorsAdd=[];$a.length=16,(j.VP8LPredictors=[]).length=16,(j.VP8LPredictorsAdd_C=[]).length=16,(j.VP8LPredictors_C=[]).length=16;var Ya,Ka,ri,ii,ai,Di,oi,Ri,$n,yr,xe,Se,He,tn,Hr,Xa,la,Yo,Mh,jh,Bh,zh,Uh,qh,Ja,Hh,Wh,Gh,Vh=a(511),Zh=a(2041),$h=a(225),Yh=a(767),Kh=0,fl=Zh,Ko=$h,On=Yh,Yn=Vh,Xo=0,Jo=1,Xh=2,Qo=3,ts=4,cl=5,Jh=6,ul=7,dl=8,es=9,pl=10,u1=[2,3,7],d1=[3,3,11],Qh=[280,256,256,256,40],p1=[0,1,1,1,0],g1=[17,18,0,1,2,3,4,5,16,6,7,8,9,10,11,12,13,14,15],m1=[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],v1=[2954,2956,2958,2962,2970,2986,3018,3082,3212,3468,3980,5004],b1=8,gl=[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],ml=[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],Qa=null,w1=[[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]],y1=[0,1,4,8,5,2,3,6,9,12,13,10,7,11,14,15],tf=[-0,1,-1,2,-2,3,4,6,-3,5,-4,-5,-6,7,-7,8,-8,-9],_1=[[[[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]]]],x1=[[[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]]],A1=[[[[255,255,255,255,255,255,255,255,255,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]]]],N1=[0,1,2,3,6,4,5,6,6,6,6,6,6,6,6,7,0],si=[],ar=[],Wr=[],L1=1,ef=2,li=[],Kn=[];zr("UpsampleRgbLinePair",Qr,3),zr("UpsampleBgrLinePair",fn,3),zr("UpsampleRgbaLinePair",_n,4),zr("UpsampleBgraLinePair",Ha,4),zr("UpsampleArgbLinePair",qa,4),zr("UpsampleRgba4444LinePair",Ci,2),zr("UpsampleRgb565LinePair",Ei,2);var S1=j.UpsampleRgbLinePair,k1=j.UpsampleBgrLinePair,nf=j.UpsampleRgbaLinePair,rf=j.UpsampleBgraLinePair,af=j.UpsampleArgbLinePair,of=j.UpsampleRgba4444LinePair,P1=j.UpsampleRgb565LinePair,ns=16,rs=1<<ns-1,to=-227,vl=482,sf=6,I1=(256<<sf)-1,lf=0,F1=a(256),E1=a(256),C1=a(256),O1=a(256),T1=a(vl-to),D1=a(vl-to);Ur("YuvToRgbRow",Qr,3),Ur("YuvToBgrRow",fn,3),Ur("YuvToRgbaRow",_n,4),Ur("YuvToBgraRow",Ha,4),Ur("YuvToArgbRow",qa,4),Ur("YuvToRgba4444Row",Ci,2),Ur("YuvToRgb565Row",Ei,2);var hf=[0,4,8,12,128,132,136,140,256,260,264,268,384,388,392,396],is=[0,2,8],R1=[8,7,6,4,4,2,2,2,1,1,1,1],M1=1;this.WebPDecodeRGBA=function(o,s,d,m,b){var w=Jo,_=new dt,L=new le;_.ba=L,L.S=w,L.width=[L.width],L.height=[L.height];var k=L.width,E=L.height,V=new Gt;if(V==null||o==null)var et=2;else n(V!=null),et=Oi(o,s,d,V.width,V.height,V.Pd,V.Qd,V.format,null);if(et!=0?k=0:(k!=null&&(k[0]=V.width[0]),E!=null&&(E[0]=V.height[0]),k=1),k){L.width=L.width[0],L.height=L.height[0],m!=null&&(m[0]=L.width),b!=null&&(b[0]=L.height);t:{if(m=new ta,(b=new vt).data=o,b.w=s,b.ha=d,b.kd=1,s=[0],n(b!=null),((o=Oi(b.data,b.w,b.ha,null,null,null,s,null,b))==0||o==7)&&s[0]&&(o=4),(s=o)==0){if(n(_!=null),m.data=b.data,m.w=b.w+b.offset,m.ha=b.ha-b.offset,m.put=Vt,m.ac=ur,m.bc=Fr,m.ma=_,b.xa){if((o=xi())==null){_=1;break t}if((function(C,Z){var X=[0],lt=[0],Q=[0];e:for(;;){if(C==null)return 0;if(Z==null)return C.a=2,0;if(C.l=Z,C.a=0,ut(C.m,Z.data,Z.w,Z.ha),!Er(C.m,X,lt,Q)){C.a=3;break e}if(C.xb=ef,Z.width=X[0],Z.height=lt[0],!pr(X[0],lt[0],1,C,null))break e;return 1}return n(C.a!=0),0})(o,m)){if(m=(s=ti(m.width,m.height,_.Oa,_.ba))==0){e:{m=o;n:for(;;){if(m==null){m=0;break e}if(n(m.s.yc!=null),n(m.s.Ya!=null),n(0<m.s.Wb),n((d=m.l)!=null),n((b=d.ma)!=null),m.xb!=0){if(m.ca=b.ba,m.tb=b.tb,n(m.ca!=null),!Wa(b.Oa,d,Qo)){m.a=2;break n}if(!Ai(m,d.width)||d.da)break n;if((d.da||Zt(m.ca.S))&&ir(),11>m.ca.S||(alert("todo:WebPInitConvertARGBToYUV"),m.ca.f.kb.F!=null&&ir()),m.Pb&&0<m.s.ua&&m.s.vb.X==null&&!I(m.s.vb,m.s.Wa.Xa)){m.a=1;break n}m.xb=0}if(!nr(m,m.V,m.Ba,m.c,m.i,d.o,Xr))break n;b.Dc=m.Ma,m=1;break e}n(m.a!=0),m=0}m=!m}m&&(s=o.a)}else s=o.a}else{if((o=new Ys)==null){_=1;break t}if(o.Fa=b.na,o.P=b.P,o.qc=b.Sa,mr(o,m)){if((s=ti(m.width,m.height,_.Oa,_.ba))==0){if(o.Aa=0,d=_.Oa,n((b=o)!=null),d!=null){if(0<(k=0>(k=d.Md)?0:100<k?255:255*k/100)){for(E=V=0;4>E;++E)12>(et=b.pb[E]).lc&&(et.ia=k*R1[0>et.lc?0:et.lc]>>3),V|=et.ia;V&&(alert("todo:VP8InitRandom"),b.ia=1)}b.Ga=d.Id,100<b.Ga?b.Ga=100:0>b.Ga&&(b.Ga=0)}(function(C,Z){if(C==null)return 0;if(Z==null)return Ye(C,2,"NULL VP8Io parameter in VP8Decode().");if(!C.cb&&!mr(C,Z))return 0;if(n(C.cb),Z.ac==null||Z.ac(Z)){Z.ob&&(C.L=0);var X=is[C.L];if(C.L==2?(C.yb=0,C.zb=0):(C.yb=Z.v-X>>4,C.zb=Z.j-X>>4,0>C.yb&&(C.yb=0),0>C.zb&&(C.zb=0)),C.Va=Z.o+15+X>>4,C.Hb=Z.va+15+X>>4,C.Hb>C.za&&(C.Hb=C.za),C.Va>C.Ub&&(C.Va=C.Ub),0<C.L){var lt=C.ed;for(X=0;4>X;++X){var Q;if(C.Qa.Cb){var ft=C.Qa.Lb[X];C.Qa.Fb||(ft+=lt.Tb)}else ft=lt.Tb;for(Q=0;1>=Q;++Q){var pt=C.gd[X][Q],_t=ft;if(lt.Pc&&(_t+=lt.vd[0],Q&&(_t+=lt.od[0])),0<(_t=0>_t?0:63<_t?63:_t)){var bt=_t;0<lt.wb&&(bt=4<lt.wb?bt>>2:bt>>1)>9-lt.wb&&(bt=9-lt.wb),1>bt&&(bt=1),pt.dd=bt,pt.tc=2*_t+bt,pt.ld=40<=_t?2:15<=_t?1:0}else pt.tc=0;pt.La=Q}}}X=0}else Ye(C,6,"Frame setup failed"),X=C.a;if(X=X==0){if(X){C.$c=0,0<C.Aa||(C.Ic=M1);e:{X=C.Ic,lt=4*(bt=C.za);var Mt=32*bt,Pt=bt+1,re=0<C.L?bt*(0<C.Aa?2:1):0,Ct=(C.Aa==2?2:1)*bt;if((pt=lt+832+(Q=3*(16*X+is[C.L])/2*Mt)+(ft=C.Fa!=null&&0<C.Fa.length?C.Kc.c*C.Kc.i:0))!=pt)X=0;else{if(pt>C.Vb){if(C.Vb=0,C.Ec=a(pt),C.Fc=0,C.Ec==null){X=Ye(C,1,"no memory during frame initialization.");break e}C.Vb=pt}pt=C.Ec,_t=C.Fc,C.Ac=pt,C.Bc=_t,_t+=lt,C.Gd=h(Mt,To),C.Hd=0,C.rb=h(Pt+1,Ea),C.sb=1,C.wa=re?h(re,Gn):null,C.Y=0,C.D.Nb=0,C.D.wa=C.wa,C.D.Y=C.Y,0<C.Aa&&(C.D.Y+=bt),n(!0),C.oc=pt,C.pc=_t,_t+=832,C.ya=h(Ct,Ca),C.aa=0,C.D.ya=C.ya,C.D.aa=C.aa,C.Aa==2&&(C.D.aa+=bt),C.R=16*bt,C.B=8*bt,bt=(Mt=is[C.L])*C.R,Mt=Mt/2*C.B,C.sa=pt,C.ta=_t+bt,C.qa=C.sa,C.ra=C.ta+16*X*C.R+Mt,C.Ha=C.qa,C.Ia=C.ra+8*X*C.B+Mt,C.$c=0,_t+=Q,C.mb=ft?pt:null,C.nb=ft?_t:null,n(_t+ft<=C.Fc+C.Vb),Mo(C),i(C.Ac,C.Bc,0,lt),X=1}}if(X){if(Z.ka=0,Z.y=C.sa,Z.O=C.ta,Z.f=C.qa,Z.N=C.ra,Z.ea=C.Ha,Z.Vd=C.Ia,Z.fa=C.R,Z.Rc=C.B,Z.F=null,Z.J=0,!Kh){for(X=-255;255>=X;++X)Vh[255+X]=0>X?-X:X;for(X=-1020;1020>=X;++X)Zh[1020+X]=-128>X?-128:127<X?127:X;for(X=-112;112>=X;++X)$h[112+X]=-16>X?-16:15<X?15:X;for(X=-255;510>=X;++X)Yh[255+X]=0>X?0:255<X?255:X;Kh=1}oi=na,Ri=Xs,yr=vr,xe=Bo,Se=zo,$n=Ks,He=Go,tn=Pi,Hr=v,Xa=T,la=Vo,Yo=c,Mh=z,jh=K,Bh=ki,zh=za,Uh=Ho,qh=Wo,ar[0]=al,ar[1]=Js,ar[2]=rl,ar[3]=il,ar[4]=Or,ar[5]=ol,ar[6]=Tr,ar[7]=sl,ar[8]=Da,ar[9]=ra,si[0]=el,si[1]=tl,si[2]=Oa,si[3]=Uo,si[4]=Li,si[5]=Ta,si[6]=nl,Wr[0]=hl,Wr[1]=Qs,Wr[2]=Si,Wr[3]=ll,Wr[4]=Ma,Wr[5]=Ra,Wr[6]=qo,X=1}else X=0}X&&(X=(function(ue,en){for(ue.M=0;ue.M<ue.Va;++ue.M){var ie,Ot=ue.Jc[ue.M&ue.Xb],Nt=ue.m,We=ue;for(ie=0;ie<We.za;++ie){var te=Nt,de=We,Ce=de.Ac,cn=de.Bc+4*ie,xn=de.zc,je=de.ya[de.aa+ie];if(de.Qa.Bb?je.$b=gt(te,de.Pa.jb[0])?2+gt(te,de.Pa.jb[2]):gt(te,de.Pa.jb[1]):je.$b=0,de.kc&&(je.Ad=gt(te,de.Bd)),je.Za=!gt(te,145)+0,je.Za){var mn=je.Ob,An=0;for(de=0;4>de;++de){var nn,me=xn[0+de];for(nn=0;4>nn;++nn){me=x1[Ce[cn+nn]][me];for(var Ae=tf[gt(te,me[0])];0<Ae;)Ae=tf[2*Ae+gt(te,me[Ae])];me=-Ae,Ce[cn+nn]=me}r(mn,An,Ce,cn,4),An+=4,xn[0+de]=me}}else me=gt(te,156)?gt(te,128)?1:3:gt(te,163)?2:0,je.Ob[0]=me,i(Ce,cn,me,4),i(xn,0,me,4);je.Dd=gt(te,142)?gt(te,114)?gt(te,183)?1:3:2:0}if(We.m.Ka)return Ye(ue,7,"Premature end-of-partition0 encountered.");for(;ue.ja<ue.za;++ue.ja){if(We=Ot,te=(Nt=ue).rb[Nt.sb-1],Ce=Nt.rb[Nt.sb+Nt.ja],ie=Nt.ya[Nt.aa+Nt.ja],cn=Nt.kc?ie.Ad:0)te.la=Ce.la=0,ie.Za||(te.Na=Ce.Na=0),ie.Hc=0,ie.Gc=0,ie.ia=0;else{var Be,Ne;if(te=Ce,Ce=We,cn=Nt.Pa.Xc,xn=Nt.ya[Nt.aa+Nt.ja],je=Nt.pb[xn.$b],de=xn.ad,mn=0,An=Nt.rb[Nt.sb-1],me=nn=0,i(de,mn,0,384),xn.Za)var un=0,or=cn[3];else{Ae=a(16);var Ge=te.Na+An.Na;if(Ge=Qa(Ce,cn[1],Ge,je.Eb,0,Ae,0),te.Na=An.Na=(0<Ge)+0,1<Ge)oi(Ae,0,de,mn);else{var kn=Ae[0]+3>>3;for(Ae=0;256>Ae;Ae+=16)de[mn+Ae]=kn}un=1,or=cn[0]}var ke=15&te.la,rn=15&An.la;for(Ae=0;4>Ae;++Ae){var Tn=1&rn;for(kn=Ne=0;4>kn;++kn)ke=ke>>1|(Tn=(Ge=Qa(Ce,or,Ge=Tn+(1&ke),je.Sc,un,de,mn))>un)<<7,Ne=Ne<<2|(3<Ge?3:1<Ge?2:de[mn+0]!=0),mn+=16;ke>>=4,rn=rn>>1|Tn<<7,nn=(nn<<8|Ne)>>>0}for(or=ke,un=rn>>4,Be=0;4>Be;Be+=2){for(Ne=0,ke=te.la>>4+Be,rn=An.la>>4+Be,Ae=0;2>Ae;++Ae){for(Tn=1&rn,kn=0;2>kn;++kn)Ge=Tn+(1&ke),ke=ke>>1|(Tn=0<(Ge=Qa(Ce,cn[2],Ge,je.Qc,0,de,mn)))<<3,Ne=Ne<<2|(3<Ge?3:1<Ge?2:de[mn+0]!=0),mn+=16;ke>>=2,rn=rn>>1|Tn<<5}me|=Ne<<4*Be,or|=ke<<4<<Be,un|=(240&rn)<<Be}te.la=or,An.la=un,xn.Hc=nn,xn.Gc=me,xn.ia=43690&me?0:je.ia,cn=!(nn|me)}if(0<Nt.L&&(Nt.wa[Nt.Y+Nt.ja]=Nt.gd[ie.$b][ie.Za],Nt.wa[Nt.Y+Nt.ja].La|=!cn),We.Ka)return Ye(ue,7,"Premature end-of-file encountered.")}if(Mo(ue),Nt=en,We=1,ie=(Ot=ue).D,te=0<Ot.L&&Ot.M>=Ot.zb&&Ot.M<=Ot.Va,Ot.Aa==0)e:{if(ie.M=Ot.M,ie.uc=te,Zn(Ot,ie),We=1,ie=(Ne=Ot.D).Nb,te=(me=is[Ot.L])*Ot.R,Ce=me/2*Ot.B,Ae=16*ie*Ot.R,kn=8*ie*Ot.B,cn=Ot.sa,xn=Ot.ta-te+Ae,je=Ot.qa,de=Ot.ra-Ce+kn,mn=Ot.Ha,An=Ot.Ia-Ce+kn,rn=(ke=Ne.M)==0,nn=ke>=Ot.Va-1,Ot.Aa==2&&Zn(Ot,Ne),Ne.uc)for(Tn=(Ge=Ot).D.M,n(Ge.D.uc),Ne=Ge.yb;Ne<Ge.Hb;++Ne){un=Ne,or=Tn;var Nn=(Dn=(dn=Ge).D).Nb;Be=dn.R;var Dn=Dn.wa[Dn.Y+un],Rn=dn.sa,Pn=dn.ta+16*Nn*Be+16*un,Mn=Dn.dd,Ee=Dn.tc;if(Ee!=0)if(n(3<=Ee),dn.L==1)0<un&&zh(Rn,Pn,Be,Ee+4),Dn.La&&qh(Rn,Pn,Be,Ee),0<or&&Bh(Rn,Pn,Be,Ee+4),Dn.La&&Uh(Rn,Pn,Be,Ee);else{var jn=dn.B,sr=dn.qa,Mi=dn.ra+8*Nn*jn+8*un,Gr=dn.Ha,dn=dn.Ia+8*Nn*jn+8*un;Nn=Dn.ld,0<un&&(tn(Rn,Pn,Be,Ee+4,Mn,Nn),Xa(sr,Mi,Gr,dn,jn,Ee+4,Mn,Nn)),Dn.La&&(Yo(Rn,Pn,Be,Ee,Mn,Nn),jh(sr,Mi,Gr,dn,jn,Ee,Mn,Nn)),0<or&&(He(Rn,Pn,Be,Ee+4,Mn,Nn),Hr(sr,Mi,Gr,dn,jn,Ee+4,Mn,Nn)),Dn.La&&(la(Rn,Pn,Be,Ee,Mn,Nn),Mh(sr,Mi,Gr,dn,jn,Ee,Mn,Nn))}}if(Ot.ia&&alert("todo:DitherRow"),Nt.put!=null){if(Ne=16*ke,ke=16*(ke+1),rn?(Nt.y=Ot.sa,Nt.O=Ot.ta+Ae,Nt.f=Ot.qa,Nt.N=Ot.ra+kn,Nt.ea=Ot.Ha,Nt.W=Ot.Ia+kn):(Ne-=me,Nt.y=cn,Nt.O=xn,Nt.f=je,Nt.N=de,Nt.ea=mn,Nt.W=An),nn||(ke-=me),ke>Nt.o&&(ke=Nt.o),Nt.F=null,Nt.J=null,Ot.Fa!=null&&0<Ot.Fa.length&&Ne<ke&&(Nt.J=Fe(Ot,Nt,Ne,ke-Ne),Nt.F=Ot.mb,Nt.F==null&&Nt.F.length==0)){We=Ye(Ot,3,"Could not decode alpha data.");break e}Ne<Nt.j&&(me=Nt.j-Ne,Ne=Nt.j,n(!(1&me)),Nt.O+=Ot.R*me,Nt.N+=Ot.B*(me>>1),Nt.W+=Ot.B*(me>>1),Nt.F!=null&&(Nt.J+=Nt.width*me)),Ne<ke&&(Nt.O+=Nt.v,Nt.N+=Nt.v>>1,Nt.W+=Nt.v>>1,Nt.F!=null&&(Nt.J+=Nt.v),Nt.ka=Ne-Nt.j,Nt.U=Nt.va-Nt.v,Nt.T=ke-Ne,We=Nt.put(Nt))}ie+1!=Ot.Ic||nn||(r(Ot.sa,Ot.ta-te,cn,xn+16*Ot.R,te),r(Ot.qa,Ot.ra-Ce,je,de+8*Ot.B,Ce),r(Ot.Ha,Ot.Ia-Ce,mn,An+8*Ot.B,Ce))}if(!We)return Ye(ue,6,"Output aborted.")}return 1})(C,Z)),Z.bc!=null&&Z.bc(Z),X&=1}return X?(C.cb=0,X):0})(o,m)||(s=o.a)}}else s=o.a}s==0&&_.Oa!=null&&_.Oa.fd&&(s=Ga(_.ba))}_=s}w=_!=0?null:11>w?L.f.RGBA.eb:L.f.kb.y}else w=null;return w};var ff=[3,4,3,4,4,2,2,4,4,4,2,1,1]};function u(j,tt){for(var S="",O=0;O<4;O++)S+=String.fromCharCode(j[tt++]);return S}function g(j,tt){return j[tt+0]|j[tt+1]<<8}function y(j,tt){return(j[tt+0]|j[tt+1]<<8|j[tt+2]<<16)>>>0}function x(j,tt){return(j[tt+0]|j[tt+1]<<8|j[tt+2]<<16|j[tt+3]<<24)>>>0}new f;var p=[0],F=[0],P=[],D=new f,N=t,H=(function(j,tt){var S={},O=0,W=!1,U=0,it=0;if(S.frames=[],!(function(A,R){for(var B=0;B<4;B++)if(A[R+B]!="RIFF".charCodeAt(B))return!0;return!1})(j,tt)){for(x(j,tt+=4),tt+=8;tt<j.length;){var st=u(j,tt),ht=x(j,tt+=4);tt+=4;var nt=ht+(1&ht);switch(st){case"VP8 ":case"VP8L":S.frames[O]===void 0&&(S.frames[O]={}),(wt=S.frames[O]).src_off=W?it:tt-8,wt.src_size=U+ht+8,O++,W&&(W=!1,U=0,it=0);break;case"VP8X":(wt=S.header={}).feature_flags=j[tt];var ut=tt+4;wt.canvas_width=1+y(j,ut),ut+=3,wt.canvas_height=1+y(j,ut),ut+=3;break;case"ALPH":W=!0,U=nt+8,it=tt-8;break;case"ANIM":(wt=S.header).bgcolor=x(j,tt),ut=tt+4,wt.loop_count=g(j,ut),ut+=2;break;case"ANMF":var At,wt;(wt=S.frames[O]={}).offset_x=2*y(j,tt),tt+=3,wt.offset_y=2*y(j,tt),tt+=3,wt.width=1+y(j,tt),tt+=3,wt.height=1+y(j,tt),tt+=3,wt.duration=y(j,tt),tt+=3,At=j[tt++],wt.dispose=1&At,wt.blend=At>>1&1}st!="ANMF"&&(tt+=nt)}return S}})(N,0);H.response=N,H.rgbaoutput=!0,H.dataurl=!1;var q=H.header?H.header:null,M=H.frames?H.frames:null;if(q){q.loop_counter=q.loop_count,p=[q.canvas_height],F=[q.canvas_width];for(var rt=0;rt<M.length&&M[rt].blend!=0;rt++);}var mt=M[0],ct=D.WebPDecodeRGBA(N,mt.src_off,mt.src_size,F,p);mt.rgba=ct,mt.imgwidth=F[0],mt.imgheight=p[0];for(var Y=0;Y<F[0]*p[0]*4;Y++)P[Y]=ct[Y];return this.width=F,this.height=p,this.data=P,this}(function(t){var n,e,r,i,a,h,l,f,u,g=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 h,this.miterLimit=A.miterLimit||10,this.lastPoint=A.lastPoint||new h,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};t.events.push(["initialized",function(){this.context2d=new y(this),n=this.internal.f2,e=this.internal.getCoordinateString,r=this.internal.getVerticalCoordinateString,i=this.internal.getHorizontalCoordinate,a=this.internal.getVerticalCoordinate,h=this.internal.Point,l=this.internal.Rectangle,f=this.internal.Matrix,u=new g}]);var y=function(A){Object.defineProperty(this,"canvas",{get:function(){return{parentNode:!1,style:!1}}});var R=A;Object.defineProperty(this,"pdf",{get:function(){return R}});var B=!1;Object.defineProperty(this,"pageWrapXEnabled",{get:function(){return B},set:function(I){B=!!I}});var G=!1;Object.defineProperty(this,"pageWrapYEnabled",{get:function(){return G},set:function(I){G=!!I}});var $=0;Object.defineProperty(this,"posX",{get:function(){return $},set:function(I){isNaN(I)||($=I)}});var J=0;Object.defineProperty(this,"posY",{get:function(){return J},set:function(I){isNaN(I)||(J=I)}}),Object.defineProperty(this,"margin",{get:function(){return u.margin},set:function(I){var Lt;typeof I=="number"?Lt=[I,I,I,I]:((Lt=new Array(4))[0]=I[0],Lt[1]=I.length>=2?I[1]:Lt[0],Lt[2]=I.length>=3?I[2]:Lt[0],Lt[3]=I.length>=4?I[3]:Lt[1]),u.margin=Lt}});var at=!1;Object.defineProperty(this,"autoPaging",{get:function(){return at},set:function(I){at=I}});var ot=0;Object.defineProperty(this,"lastBreak",{get:function(){return ot},set:function(I){ot=I}});var gt=[];Object.defineProperty(this,"pageBreaks",{get:function(){return gt},set:function(I){gt=I}}),Object.defineProperty(this,"ctx",{get:function(){return u},set:function(I){I instanceof g&&(u=I)}}),Object.defineProperty(this,"path",{get:function(){return u.path},set:function(I){u.path=I}});var xt=[];Object.defineProperty(this,"ctxStack",{get:function(){return xt},set:function(I){xt=I}}),Object.defineProperty(this,"fillStyle",{get:function(){return this.ctx.fillStyle},set:function(I){var Lt;Lt=x(I),this.ctx.fillStyle=Lt.style,this.ctx.isFillTransparent=Lt.a===0,this.ctx.fillOpacity=Lt.a,this.pdf.setFillColor(Lt.r,Lt.g,Lt.b,{a:Lt.a}),this.pdf.setTextColor(Lt.r,Lt.g,Lt.b,{a:Lt.a})}}),Object.defineProperty(this,"strokeStyle",{get:function(){return this.ctx.strokeStyle},set:function(I){var Lt=x(I);this.ctx.strokeStyle=Lt.style,this.ctx.isStrokeTransparent=Lt.a===0,this.ctx.strokeOpacity=Lt.a,Lt.a===0?this.pdf.setDrawColor(255,255,255):(Lt.a,this.pdf.setDrawColor(Lt.r,Lt.g,Lt.b))}}),Object.defineProperty(this,"lineCap",{get:function(){return this.ctx.lineCap},set:function(I){["butt","round","square"].indexOf(I)!==-1&&(this.ctx.lineCap=I,this.pdf.setLineCap(I))}}),Object.defineProperty(this,"lineWidth",{get:function(){return this.ctx.lineWidth},set:function(I){isNaN(I)||(this.ctx.lineWidth=I,this.pdf.setLineWidth(I))}}),Object.defineProperty(this,"lineJoin",{get:function(){return this.ctx.lineJoin},set:function(I){["bevel","round","miter"].indexOf(I)!==-1&&(this.ctx.lineJoin=I,this.pdf.setLineJoin(I))}}),Object.defineProperty(this,"miterLimit",{get:function(){return this.ctx.miterLimit},set:function(I){isNaN(I)||(this.ctx.miterLimit=I,this.pdf.setMiterLimit(I))}}),Object.defineProperty(this,"textBaseline",{get:function(){return this.ctx.textBaseline},set:function(I){this.ctx.textBaseline=I}}),Object.defineProperty(this,"textAlign",{get:function(){return this.ctx.textAlign},set:function(I){["right","end","center","left","start"].indexOf(I)!==-1&&(this.ctx.textAlign=I)}});var kt=null,St=null,Bt=null;Object.defineProperty(this,"fontFaces",{get:function(){return Bt},set:function(I){kt=null,St=null,Bt=I}}),Object.defineProperty(this,"font",{get:function(){return this.ctx.font},set:function(I){var Lt;if(this.ctx.font=I,(Lt=/^\s*(?=(?:(?:[-a-z]+\s*){0,2}(italic|oblique))?)(?=(?:(?:[-a-z]+\s*){0,2}(small-caps))?)(?=(?:(?:[-a-z]+\s*){0,2}(bold(?:er)?|lighter|[1-9]00))?)(?:(?:normal|\1|\2|\3)\s*){0,3}((?:xx?-)?(?:small|large)|medium|smaller|larger|[.\d]+(?:\%|in|[cem]m|ex|p[ctx]))(?:\s*\/\s*(normal|[.\d]+(?:\%|in|[cem]m|ex|p[ctx])))?\s*([-_,\"\'\sa-z0-9]+?)\s*$/i.exec(I))!==null){var ae=Lt[1];Lt[2];var Ht=Lt[3],yt=Lt[4];Lt[5];var Wt=Lt[6],It=/^([.\d]+)((?:%|in|[cem]m|ex|p[ctx]))$/i.exec(yt)[2];yt=Math.floor(It==="px"?parseFloat(yt)*this.pdf.internal.scaleFactor:It==="em"?parseFloat(yt)*this.pdf.getFontSize():parseFloat(yt)*this.pdf.internal.scaleFactor),this.pdf.setFontSize(yt);var qt=(function(jt){var Ue,pe,oe=[],se=jt.trim();if(se==="")return Nh;if(se in Iu)return[Iu[se]];for(;se!=="";){switch(pe=null,Ue=(se=Eu(se)).charAt(0)){case'"':case"'":pe=xd(se.substring(1),Ue);break;default:pe=Ad(se)}if(pe===null||(oe.push(pe[0]),(se=Eu(pe[1]))!==""&&se.charAt(0)!==","))return Nh;se=se.replace(/^,/,"")}return oe})(Wt);if(this.fontFaces){var zt=(function(jt,Ue){var pe=jt.getFontList(),oe=JSON.stringify(pe);if(kt===null||St!==oe){var se=(function(Oe){var Ut=[];return Object.keys(Oe).forEach(function(Ie){Oe[Ie].forEach(function(Zt){var Qt=null;switch(Zt){case"bold":Qt={family:Ie,weight:"bold"};break;case"italic":Qt={family:Ie,style:"italic"};break;case"bolditalic":Qt={family:Ie,weight:"bold",style:"italic"};break;case"":case"normal":Qt={family:Ie}}Qt!==null&&(Qt.ref={name:Ie,style:Zt},Ut.push(Qt))})}),Ut})(pe);kt=(function(Oe){for(var Ut={},Ie=0;Ie<Oe.length;++Ie){var Zt=Ah(Oe[Ie]),Qt=Zt.family,Te=Zt.stretch,le=Zt.style,Gt=Zt.weight;Ut[Qt]=Ut[Qt]||{},Ut[Qt][Te]=Ut[Qt][Te]||{},Ut[Qt][Te][le]=Ut[Qt][Te][le]||{},Ut[Qt][Te][le][Gt]=Zt}return Ut})(se.concat(Ue)),St=oe}return kt})(this.pdf,this.fontFaces),ye=qt.map(function(jt){return{family:jt,stretch:"normal",weight:Ht,style:ae}}),he=(function(jt,Ue,pe){for(var oe=(pe=pe||{}).defaultFontFamily||"times",se=Object.assign({},_d,pe.genericFontFamilies||{}),Oe=null,Ut=null,Ie=0;Ie<Ue.length;++Ie)if(se[(Oe=Ah(Ue[Ie])).family]&&(Oe.family=se[Oe.family]),jt.hasOwnProperty(Oe.family)){Ut=jt[Oe.family];break}if(!(Ut=Ut||jt[oe]))throw new Error("Could not find a font-family for the rule '"+Fu(Oe)+"' and default family '"+oe+"'.");if(Ut=(function(Zt,Qt){if(Qt[Zt])return Qt[Zt];var Te=Fh[Zt],le=Te<=Fh.normal?-1:1,Gt=Pu(Qt,t1,Te,le);if(!Gt)throw new Error("Could not find a matching font-stretch value for "+Zt);return Gt})(Oe.stretch,Ut),Ut=(function(Zt,Qt){if(Qt[Zt])return Qt[Zt];for(var Te=Qu[Zt],le=0;le<Te.length;++le)if(Qt[Te[le]])return Qt[Te[le]];throw new Error("Could not find a matching font-style for "+Zt)})(Oe.style,Ut),!(Ut=(function(Zt,Qt){if(Qt[Zt])return Qt[Zt];if(Zt===400&&Qt[500])return Qt[500];if(Zt===500&&Qt[400])return Qt[400];var Te=yd[Zt],le=Pu(Qt,e1,Te,Zt<400?-1:1);if(!le)throw new Error("Could not find a matching font-weight for value "+Zt);return le})(Oe.weight,Ut)))throw new Error("Failed to resolve a font for the rule '"+Fu(Oe)+"'.");return Ut})(zt,ye);this.pdf.setFont(he.ref.name,he.ref.style)}else{var Jt="";(Ht==="bold"||parseInt(Ht,10)>=700||ae==="bold")&&(Jt="bold"),ae==="italic"&&(Jt+="italic"),Jt.length===0&&(Jt="normal");for(var ce="",fe={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"},Tt=0;Tt<qt.length;Tt++){if(this.pdf.internal.getFont(qt[Tt],Jt,{noFallback:!0,disableWarning:!0})!==void 0){ce=qt[Tt];break}if(Jt==="bolditalic"&&this.pdf.internal.getFont(qt[Tt],"bold",{noFallback:!0,disableWarning:!0})!==void 0)ce=qt[Tt],Jt="bold";else if(this.pdf.internal.getFont(qt[Tt],"normal",{noFallback:!0,disableWarning:!0})!==void 0){ce=qt[Tt],Jt="normal";break}}if(ce===""){for(var ee=0;ee<qt.length;ee++)if(fe[qt[ee]]){ce=fe[qt[ee]];break}}ce=ce===""?"Times":ce,this.pdf.setFont(ce,Jt)}}}}),Object.defineProperty(this,"globalCompositeOperation",{get:function(){return this.ctx.globalCompositeOperation},set:function(I){this.ctx.globalCompositeOperation=I}}),Object.defineProperty(this,"globalAlpha",{get:function(){return this.ctx.globalAlpha},set:function(I){this.ctx.globalAlpha=I}}),Object.defineProperty(this,"lineDashOffset",{get:function(){return this.ctx.lineDashOffset},set:function(I){this.ctx.lineDashOffset=I,wt.call(this)}}),Object.defineProperty(this,"lineDash",{get:function(){return this.ctx.lineDash},set:function(I){this.ctx.lineDash=I,wt.call(this)}}),Object.defineProperty(this,"ignoreClearRect",{get:function(){return this.ctx.ignoreClearRect},set:function(I){this.ctx.ignoreClearRect=!!I}})};y.prototype.setLineDash=function(A){this.lineDash=A},y.prototype.getLineDash=function(){return this.lineDash.length%2?this.lineDash.concat(this.lineDash):this.lineDash.slice()},y.prototype.fill=function(){M.call(this,"fill",!1)},y.prototype.stroke=function(){M.call(this,"stroke",!1)},y.prototype.beginPath=function(){this.path=[{type:"begin"}]},y.prototype.moveTo=function(A,R){if(isNaN(A)||isNaN(R))throw Pe.error("jsPDF.context2d.moveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.moveTo");var B=this.ctx.transform.applyToPoint(new h(A,R));this.path.push({type:"mt",x:B.x,y:B.y}),this.ctx.lastPoint=new h(A,R)},y.prototype.closePath=function(){var A=new h(0,0),R=0;for(R=this.path.length-1;R!==-1;R--)if(this.path[R].type==="begin"&&Le(this.path[R+1])==="object"&&typeof this.path[R+1].x=="number"){A=new h(this.path[R+1].x,this.path[R+1].y);break}this.path.push({type:"close"}),this.ctx.lastPoint=new h(A.x,A.y)},y.prototype.lineTo=function(A,R){if(isNaN(A)||isNaN(R))throw Pe.error("jsPDF.context2d.lineTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.lineTo");var B=this.ctx.transform.applyToPoint(new h(A,R));this.path.push({type:"lt",x:B.x,y:B.y}),this.ctx.lastPoint=new h(B.x,B.y)},y.prototype.clip=function(){this.ctx.clip_path=JSON.parse(JSON.stringify(this.path)),M.call(this,null,!0)},y.prototype.quadraticCurveTo=function(A,R,B,G){if(isNaN(B)||isNaN(G)||isNaN(A)||isNaN(R))throw Pe.error("jsPDF.context2d.quadraticCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.quadraticCurveTo");var $=this.ctx.transform.applyToPoint(new h(B,G)),J=this.ctx.transform.applyToPoint(new h(A,R));this.path.push({type:"qct",x1:J.x,y1:J.y,x:$.x,y:$.y}),this.ctx.lastPoint=new h($.x,$.y)},y.prototype.bezierCurveTo=function(A,R,B,G,$,J){if(isNaN($)||isNaN(J)||isNaN(A)||isNaN(R)||isNaN(B)||isNaN(G))throw Pe.error("jsPDF.context2d.bezierCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.bezierCurveTo");var at=this.ctx.transform.applyToPoint(new h($,J)),ot=this.ctx.transform.applyToPoint(new h(A,R)),gt=this.ctx.transform.applyToPoint(new h(B,G));this.path.push({type:"bct",x1:ot.x,y1:ot.y,x2:gt.x,y2:gt.y,x:at.x,y:at.y}),this.ctx.lastPoint=new h(at.x,at.y)},y.prototype.arc=function(A,R,B,G,$,J){if(isNaN(A)||isNaN(R)||isNaN(B)||isNaN(G)||isNaN($))throw Pe.error("jsPDF.context2d.arc: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.arc");if(J=!!J,!this.ctx.transform.isIdentity){var at=this.ctx.transform.applyToPoint(new h(A,R));A=at.x,R=at.y;var ot=this.ctx.transform.applyToPoint(new h(0,B)),gt=this.ctx.transform.applyToPoint(new h(0,0));B=Math.sqrt(Math.pow(ot.x-gt.x,2)+Math.pow(ot.y-gt.y,2))}Math.abs($-G)>=2*Math.PI&&(G=0,$=2*Math.PI),this.path.push({type:"arc",x:A,y:R,radius:B,startAngle:G,endAngle:$,counterclockwise:J})},y.prototype.arcTo=function(A,R,B,G,$){throw new Error("arcTo not implemented.")},y.prototype.rect=function(A,R,B,G){if(isNaN(A)||isNaN(R)||isNaN(B)||isNaN(G))throw Pe.error("jsPDF.context2d.rect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rect");this.moveTo(A,R),this.lineTo(A+B,R),this.lineTo(A+B,R+G),this.lineTo(A,R+G),this.lineTo(A,R),this.lineTo(A+B,R),this.lineTo(A,R)},y.prototype.fillRect=function(A,R,B,G){if(isNaN(A)||isNaN(R)||isNaN(B)||isNaN(G))throw Pe.error("jsPDF.context2d.fillRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillRect");if(!p.call(this)){var $={};this.lineCap!=="butt"&&($.lineCap=this.lineCap,this.lineCap="butt"),this.lineJoin!=="miter"&&($.lineJoin=this.lineJoin,this.lineJoin="miter"),this.beginPath(),this.rect(A,R,B,G),this.fill(),$.hasOwnProperty("lineCap")&&(this.lineCap=$.lineCap),$.hasOwnProperty("lineJoin")&&(this.lineJoin=$.lineJoin)}},y.prototype.strokeRect=function(A,R,B,G){if(isNaN(A)||isNaN(R)||isNaN(B)||isNaN(G))throw Pe.error("jsPDF.context2d.strokeRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeRect");F.call(this)||(this.beginPath(),this.rect(A,R,B,G),this.stroke())},y.prototype.clearRect=function(A,R,B,G){if(isNaN(A)||isNaN(R)||isNaN(B)||isNaN(G))throw Pe.error("jsPDF.context2d.clearRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.clearRect");this.ignoreClearRect||(this.fillStyle="#ffffff",this.fillRect(A,R,B,G))},y.prototype.save=function(A){A=typeof A!="boolean"||A;for(var R=this.pdf.internal.getCurrentPageInfo().pageNumber,B=0;B<this.pdf.internal.getNumberOfPages();B++)this.pdf.setPage(B+1),this.pdf.internal.out("q");if(this.pdf.setPage(R),A){this.ctx.fontSize=this.pdf.internal.getFontSize();var G=new g(this.ctx);this.ctxStack.push(this.ctx),this.ctx=G}},y.prototype.restore=function(A){A=typeof A!="boolean"||A;for(var R=this.pdf.internal.getCurrentPageInfo().pageNumber,B=0;B<this.pdf.internal.getNumberOfPages();B++)this.pdf.setPage(B+1),this.pdf.internal.out("Q");this.pdf.setPage(R),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)},y.prototype.toDataURL=function(){throw new Error("toDataUrl not implemented.")};var x=function(A){var R,B,G,$;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))R=0,B=0,G=0,$=0;else{var J=/rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/.exec(A);if(J!==null)R=parseInt(J[1]),B=parseInt(J[2]),G=parseInt(J[3]),$=1;else if((J=/rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)/.exec(A))!==null)R=parseInt(J[1]),B=parseInt(J[2]),G=parseInt(J[3]),$=parseFloat(J[4]);else{if($=1,typeof A=="string"&&A.charAt(0)!=="#"){var at=new Vu(A);A=at.ok?at.toHex():"#000000"}A.length===4?(R=A.substring(1,2),R+=R,B=A.substring(2,3),B+=B,G=A.substring(3,4),G+=G):(R=A.substring(1,3),B=A.substring(3,5),G=A.substring(5,7)),R=parseInt(R,16),B=parseInt(B,16),G=parseInt(G,16)}}return{r:R,g:B,b:G,a:$,style:A}},p=function(){return this.ctx.isFillTransparent||this.globalAlpha==0},F=function(){return!!(this.ctx.isStrokeTransparent||this.globalAlpha==0)};y.prototype.fillText=function(A,R,B,G){if(isNaN(R)||isNaN(B)||typeof A!="string")throw Pe.error("jsPDF.context2d.fillText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillText");if(G=isNaN(G)?void 0:G,!p.call(this)){var $=nt(this.ctx.transform.rotation),J=this.ctx.transform.scaleX;O.call(this,{text:A,x:R,y:B,scale:J,angle:$,align:this.textAlign,maxWidth:G})}},y.prototype.strokeText=function(A,R,B,G){if(isNaN(R)||isNaN(B)||typeof A!="string")throw Pe.error("jsPDF.context2d.strokeText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeText");if(!F.call(this)){G=isNaN(G)?void 0:G;var $=nt(this.ctx.transform.rotation),J=this.ctx.transform.scaleX;O.call(this,{text:A,x:R,y:B,scale:J,renderingMode:"stroke",angle:$,align:this.textAlign,maxWidth:G})}},y.prototype.measureText=function(A){if(typeof A!="string")throw Pe.error("jsPDF.context2d.measureText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.measureText");var R=this.pdf,B=this.pdf.internal.scaleFactor,G=R.internal.getFontSize(),$=R.getStringUnitWidth(A)*G/R.internal.scaleFactor;return new function(J){var at=(J=J||{}).width||0;return Object.defineProperty(this,"width",{get:function(){return at}}),this}({width:$*=Math.round(96*B/72*1e4)/1e4})},y.prototype.scale=function(A,R){if(isNaN(A)||isNaN(R))throw Pe.error("jsPDF.context2d.scale: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.scale");var B=new f(A,0,0,R,0,0);this.ctx.transform=this.ctx.transform.multiply(B)},y.prototype.rotate=function(A){if(isNaN(A))throw Pe.error("jsPDF.context2d.rotate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rotate");var R=new f(Math.cos(A),Math.sin(A),-Math.sin(A),Math.cos(A),0,0);this.ctx.transform=this.ctx.transform.multiply(R)},y.prototype.translate=function(A,R){if(isNaN(A)||isNaN(R))throw Pe.error("jsPDF.context2d.translate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.translate");var B=new f(1,0,0,1,A,R);this.ctx.transform=this.ctx.transform.multiply(B)},y.prototype.transform=function(A,R,B,G,$,J){if(isNaN(A)||isNaN(R)||isNaN(B)||isNaN(G)||isNaN($)||isNaN(J))throw Pe.error("jsPDF.context2d.transform: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.transform");var at=new f(A,R,B,G,$,J);this.ctx.transform=this.ctx.transform.multiply(at)},y.prototype.setTransform=function(A,R,B,G,$,J){A=isNaN(A)?1:A,R=isNaN(R)?0:R,B=isNaN(B)?0:B,G=isNaN(G)?1:G,$=isNaN($)?0:$,J=isNaN(J)?0:J,this.ctx.transform=new f(A,R,B,G,$,J)};var P=function(){return this.margin[0]>0||this.margin[1]>0||this.margin[2]>0||this.margin[3]>0};y.prototype.drawImage=function(A,R,B,G,$,J,at,ot,gt){var xt=this.pdf.getImageProperties(A),kt=1,St=1,Bt=1,I=1;G!==void 0&&ot!==void 0&&(Bt=ot/G,I=gt/$,kt=xt.width/G*ot/G,St=xt.height/$*gt/$),J===void 0&&(J=R,at=B,R=0,B=0),G!==void 0&&ot===void 0&&(ot=G,gt=$),G===void 0&&ot===void 0&&(ot=xt.width,gt=xt.height);var Lt=this.ctx.transform.decompose(),ae=nt(Lt.rotate.shx),Ht=new f,yt=(Ht=(Ht=(Ht=Ht.multiply(Lt.translate)).multiply(Lt.skew)).multiply(Lt.scale)).applyToRectangle(new l(J-R*Bt,at-B*I,G*kt,$*St));if(this.autoPaging){for(var Wt,It=D.call(this,yt),qt=[],zt=0;zt<It.length;zt+=1)qt.indexOf(It[zt])===-1&&qt.push(It[zt]);q(qt);for(var ye=qt[0],he=qt[qt.length-1],Jt=ye;Jt<he+1;Jt++){this.pdf.setPage(Jt);var ce=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],fe=Jt===1?this.posY+this.margin[0]:this.margin[0],Tt=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],jt=Jt===1?0:Tt+(Jt-2)*ee;if(this.ctx.clip_path.length!==0){var Ue=this.path;Wt=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=H(Wt,this.posX+this.margin[3],-jt+fe+this.ctx.prevPageLastElemOffset),rt.call(this,"fill",!0),this.path=Ue}var pe=JSON.parse(JSON.stringify(yt));pe=H([pe],this.posX+this.margin[3],-jt+fe+this.ctx.prevPageLastElemOffset)[0];var oe=(Jt>ye||Jt<he)&&P.call(this);oe&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],ce,ee,null).clip().discardPath()),this.pdf.addImage(A,"JPEG",pe.x,pe.y,pe.w,pe.h,null,null,ae),oe&&this.pdf.restoreGraphicsState()}}else this.pdf.addImage(A,"JPEG",yt.x,yt.y,yt.w,yt.h,null,null,ae)};var D=function(A,R,B){var G=[];R=R||this.pdf.internal.pageSize.width,B=B||this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2];var $=this.posY+this.ctx.prevPageLastElemOffset;switch(A.type){default:case"mt":case"lt":G.push(Math.floor((A.y+$)/B)+1);break;case"arc":G.push(Math.floor((A.y+$-A.radius)/B)+1),G.push(Math.floor((A.y+$+A.radius)/B)+1);break;case"qct":var J=ut(this.ctx.lastPoint.x,this.ctx.lastPoint.y,A.x1,A.y1,A.x,A.y);G.push(Math.floor((J.y+$)/B)+1),G.push(Math.floor((J.y+J.h+$)/B)+1);break;case"bct":var at=At(this.ctx.lastPoint.x,this.ctx.lastPoint.y,A.x1,A.y1,A.x2,A.y2,A.x,A.y);G.push(Math.floor((at.y+$)/B)+1),G.push(Math.floor((at.y+at.h+$)/B)+1);break;case"rect":G.push(Math.floor((A.y+$)/B)+1),G.push(Math.floor((A.y+A.h+$)/B)+1)}for(var ot=0;ot<G.length;ot+=1)for(;this.pdf.internal.getNumberOfPages()<G[ot];)N.call(this);return G},N=function(){var A=this.fillStyle,R=this.strokeStyle,B=this.font,G=this.lineCap,$=this.lineWidth,J=this.lineJoin;this.pdf.addPage(),this.fillStyle=A,this.strokeStyle=R,this.font=B,this.lineCap=G,this.lineWidth=$,this.lineJoin=J},H=function(A,R,B){for(var G=0;G<A.length;G++)switch(A[G].type){case"bct":A[G].x2+=R,A[G].y2+=B;case"qct":A[G].x1+=R,A[G].y1+=B;default:A[G].x+=R,A[G].y+=B}return A},q=function(A){return A.sort(function(R,B){return R-B})},M=function(A,R){var B=this.fillStyle,G=this.strokeStyle,$=this.lineCap,J=this.lineWidth,at=Math.abs(J*this.ctx.transform.scaleX),ot=this.lineJoin;if(this.autoPaging){for(var gt,xt,kt=JSON.parse(JSON.stringify(this.path)),St=JSON.parse(JSON.stringify(this.path)),Bt=[],I=0;I<St.length;I++)if(St[I].x!==void 0)for(var Lt=D.call(this,St[I]),ae=0;ae<Lt.length;ae+=1)Bt.indexOf(Lt[ae])===-1&&Bt.push(Lt[ae]);for(var Ht=0;Ht<Bt.length;Ht++)for(;this.pdf.internal.getNumberOfPages()<Bt[Ht];)N.call(this);q(Bt);for(var yt=Bt[0],Wt=Bt[Bt.length-1],It=yt;It<Wt+1;It++){this.pdf.setPage(It),this.fillStyle=B,this.strokeStyle=G,this.lineCap=$,this.lineWidth=at,this.lineJoin=ot;var qt=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],zt=It===1?this.posY+this.margin[0]:this.margin[0],ye=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],he=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],Jt=It===1?0:ye+(It-2)*he;if(this.ctx.clip_path.length!==0){var ce=this.path;gt=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=H(gt,this.posX+this.margin[3],-Jt+zt+this.ctx.prevPageLastElemOffset),rt.call(this,A,!0),this.path=ce}if(xt=JSON.parse(JSON.stringify(kt)),this.path=H(xt,this.posX+this.margin[3],-Jt+zt+this.ctx.prevPageLastElemOffset),R===!1||It===0){var fe=(It>yt||It<Wt)&&P.call(this);fe&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],qt,he,null).clip().discardPath()),rt.call(this,A,R),fe&&this.pdf.restoreGraphicsState()}this.lineWidth=J}this.path=kt}else this.lineWidth=at,rt.call(this,A,R),this.lineWidth=J},rt=function(A,R){if((A!=="stroke"||R||!F.call(this))&&(A==="stroke"||R||!p.call(this))){for(var B,G,$=[],J=this.path,at=0;at<J.length;at++){var ot=J[at];switch(ot.type){case"begin":$.push({begin:!0});break;case"close":$.push({close:!0});break;case"mt":$.push({start:ot,deltas:[],abs:[]});break;case"lt":var gt=$.length;if(J[at-1]&&!isNaN(J[at-1].x)&&(B=[ot.x-J[at-1].x,ot.y-J[at-1].y],gt>0)){for(;gt>=0;gt--)if($[gt-1].close!==!0&&$[gt-1].begin!==!0){$[gt-1].deltas.push(B),$[gt-1].abs.push(ot);break}}break;case"bct":B=[ot.x1-J[at-1].x,ot.y1-J[at-1].y,ot.x2-J[at-1].x,ot.y2-J[at-1].y,ot.x-J[at-1].x,ot.y-J[at-1].y],$[$.length-1].deltas.push(B);break;case"qct":var xt=J[at-1].x+2/3*(ot.x1-J[at-1].x),kt=J[at-1].y+2/3*(ot.y1-J[at-1].y),St=ot.x+2/3*(ot.x1-ot.x),Bt=ot.y+2/3*(ot.y1-ot.y),I=ot.x,Lt=ot.y;B=[xt-J[at-1].x,kt-J[at-1].y,St-J[at-1].x,Bt-J[at-1].y,I-J[at-1].x,Lt-J[at-1].y],$[$.length-1].deltas.push(B);break;case"arc":$.push({deltas:[],abs:[],arc:!0}),Array.isArray($[$.length-1].abs)&&$[$.length-1].abs.push(ot)}}G=R?null:A==="stroke"?"stroke":"fill";for(var ae=!1,Ht=0;Ht<$.length;Ht++)if($[Ht].arc)for(var yt=$[Ht].abs,Wt=0;Wt<yt.length;Wt++){var It=yt[Wt];It.type==="arc"?Y.call(this,It.x,It.y,It.radius,It.startAngle,It.endAngle,It.counterclockwise,void 0,R,!ae):W.call(this,It.x,It.y),ae=!0}else if($[Ht].close===!0)this.pdf.internal.out("h"),ae=!1;else if($[Ht].begin!==!0){var qt=$[Ht].start.x,zt=$[Ht].start.y;U.call(this,$[Ht].deltas,qt,zt),ae=!0}G&&j.call(this,G),R&&tt.call(this)}},mt=function(A){var R=this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor,B=R*(this.pdf.internal.getLineHeightFactor()-1);switch(this.ctx.textBaseline){case"bottom":return A-B;case"top":return A+R-B;case"hanging":return A+R-2*B;case"middle":return A+R/2-B;default:return A}},ct=function(A){return A+this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor*(this.pdf.internal.getLineHeightFactor()-1)};y.prototype.createLinearGradient=function(){var A=function(){};return A.colorStops=[],A.addColorStop=function(R,B){this.colorStops.push([R,B])},A.getColor=function(){return this.colorStops.length===0?"#000000":this.colorStops[0][1]},A.isCanvasGradient=!0,A},y.prototype.createPattern=function(){return this.createLinearGradient()},y.prototype.createRadialGradient=function(){return this.createLinearGradient()};var Y=function(A,R,B,G,$,J,at,ot,gt){for(var xt=st.call(this,B,G,$,J),kt=0;kt<xt.length;kt++){var St=xt[kt];kt===0&&(gt?S.call(this,St.x1+A,St.y1+R):W.call(this,St.x1+A,St.y1+R)),it.call(this,A,R,St.x2,St.y2,St.x3,St.y3,St.x4,St.y4)}ot?tt.call(this):j.call(this,at)},j=function(A){switch(A){case"stroke":this.pdf.internal.out("S");break;case"fill":this.pdf.internal.out("f")}},tt=function(){this.pdf.clip(),this.pdf.discardPath()},S=function(A,R){this.pdf.internal.out(e(A)+" "+r(R)+" m")},O=function(A){var R;switch(A.align){case"right":case"end":R="right";break;case"center":R="center";break;default:R="left"}var B,G,$,J=this.pdf.getTextDimensions(A.text),at=mt.call(this,A.y),ot=ct.call(this,at)-J.h,gt=this.ctx.transform.applyToPoint(new h(A.x,at));if(this.autoPaging){var xt=this.ctx.transform.decompose(),kt=new f;kt=(kt=(kt=kt.multiply(xt.translate)).multiply(xt.skew)).multiply(xt.scale);for(var St=this.ctx.transform.applyToRectangle(new l(A.x,at,J.w,J.h)),Bt=kt.applyToRectangle(new l(A.x,ot,J.w,J.h)),I=D.call(this,Bt),Lt=[],ae=0;ae<I.length;ae+=1)Lt.indexOf(I[ae])===-1&&Lt.push(I[ae]);q(Lt);for(var Ht=Lt[0],yt=Lt[Lt.length-1],Wt=Ht;Wt<yt+1;Wt++){this.pdf.setPage(Wt);var It=Wt===1?this.posY+this.margin[0]:this.margin[0],qt=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],zt=this.pdf.internal.pageSize.height-this.margin[2],ye=zt-this.margin[0],he=this.pdf.internal.pageSize.width-this.margin[1],Jt=he-this.margin[3],ce=Wt===1?0:qt+(Wt-2)*ye;if(this.ctx.clip_path.length!==0){var fe=this.path;B=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=H(B,this.posX+this.margin[3],-1*ce+It),rt.call(this,"fill",!0),this.path=fe}var Tt=H([JSON.parse(JSON.stringify(Bt))],this.posX+this.margin[3],-ce+It+this.ctx.prevPageLastElemOffset)[0];A.scale>=.01&&(G=this.pdf.internal.getFontSize(),this.pdf.setFontSize(G*A.scale),$=this.lineWidth,this.lineWidth=$*A.scale);var ee=this.autoPaging!=="text";if(ee||Tt.y+Tt.h<=zt){if(ee||Tt.y>=It&&Tt.x<=he){var jt=ee?A.text:this.pdf.splitTextToSize(A.text,A.maxWidth||he-Tt.x)[0],Ue=H([JSON.parse(JSON.stringify(St))],this.posX+this.margin[3],-ce+It+this.ctx.prevPageLastElemOffset)[0],pe=ee&&(Wt>Ht||Wt<yt)&&P.call(this);pe&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],Jt,ye,null).clip().discardPath()),this.pdf.text(jt,Ue.x,Ue.y,{angle:A.angle,align:R,renderingMode:A.renderingMode}),pe&&this.pdf.restoreGraphicsState()}}else Tt.y<zt&&(this.ctx.prevPageLastElemOffset+=zt-Tt.y);A.scale>=.01&&(this.pdf.setFontSize(G),this.lineWidth=$)}}else A.scale>=.01&&(G=this.pdf.internal.getFontSize(),this.pdf.setFontSize(G*A.scale),$=this.lineWidth,this.lineWidth=$*A.scale),this.pdf.text(A.text,gt.x+this.posX,gt.y+this.posY,{angle:A.angle,align:R,renderingMode:A.renderingMode,maxWidth:A.maxWidth}),A.scale>=.01&&(this.pdf.setFontSize(G),this.lineWidth=$)},W=function(A,R,B,G){B=B||0,G=G||0,this.pdf.internal.out(e(A+B)+" "+r(R+G)+" l")},U=function(A,R,B){return this.pdf.lines(A,R,B,null,null)},it=function(A,R,B,G,$,J,at,ot){this.pdf.internal.out([n(i(B+A)),n(a(G+R)),n(i($+A)),n(a(J+R)),n(i(at+A)),n(a(ot+R)),"c"].join(" "))},st=function(A,R,B,G){for(var $=2*Math.PI,J=Math.PI/2;R>B;)R-=$;var at=Math.abs(B-R);at<$&&G&&(at=$-at);for(var ot=[],gt=G?-1:1,xt=R;at>1e-5;){var kt=xt+gt*Math.min(at,J);ot.push(ht.call(this,A,xt,kt)),at-=Math.abs(kt-xt),xt=kt}return ot},ht=function(A,R,B){var G=(B-R)/2,$=A*Math.cos(G),J=A*Math.sin(G),at=$,ot=-J,gt=at*at+ot*ot,xt=gt+at*$+ot*J,kt=4/3*(Math.sqrt(2*gt*xt)-xt)/(at*J-ot*$),St=at-kt*ot,Bt=ot+kt*at,I=St,Lt=-Bt,ae=G+R,Ht=Math.cos(ae),yt=Math.sin(ae);return{x1:A*Math.cos(R),y1:A*Math.sin(R),x2:St*Ht-Bt*yt,y2:St*yt+Bt*Ht,x3:I*Ht-Lt*yt,y3:I*yt+Lt*Ht,x4:A*Math.cos(B),y4:A*Math.sin(B)}},nt=function(A){return 180*A/Math.PI},ut=function(A,R,B,G,$,J){var at=A+.5*(B-A),ot=R+.5*(G-R),gt=$+.5*(B-$),xt=J+.5*(G-J),kt=Math.min(A,$,at,gt),St=Math.max(A,$,at,gt),Bt=Math.min(R,J,ot,xt),I=Math.max(R,J,ot,xt);return new l(kt,Bt,St-kt,I-Bt)},At=function(A,R,B,G,$,J,at,ot){var gt,xt,kt,St,Bt,I,Lt,ae,Ht,yt,Wt,It,qt,zt,ye=B-A,he=G-R,Jt=$-B,ce=J-G,fe=at-$,Tt=ot-J;for(xt=0;xt<41;xt++)Ht=(Lt=(kt=A+(gt=xt/40)*ye)+gt*((Bt=B+gt*Jt)-kt))+gt*(Bt+gt*($+gt*fe-Bt)-Lt),yt=(ae=(St=R+gt*he)+gt*((I=G+gt*ce)-St))+gt*(I+gt*(J+gt*Tt-I)-ae),xt==0?(Wt=Ht,It=yt,qt=Ht,zt=yt):(Wt=Math.min(Wt,Ht),It=Math.min(It,yt),qt=Math.max(qt,Ht),zt=Math.max(zt,yt));return new l(Math.round(Wt),Math.round(It),Math.round(qt-Wt),Math.round(zt-It))},wt=function(){if(this.prevLineDash||this.ctx.lineDash.length||this.ctx.lineDashOffset){var A,R,B=(A=this.ctx.lineDash,R=this.ctx.lineDashOffset,JSON.stringify({lineDash:A,lineDashOffset:R}));this.prevLineDash!==B&&(this.pdf.setLineDash(this.ctx.lineDash,this.ctx.lineDashOffset),this.prevLineDash=B)}}})(Rt.API),(function(t){var n=function(h){var l,f,u,g,y,x,p,F,P,D;for(/[^\x00-\xFF]/.test(h),f=[],u=0,g=(h+=l="\0\0\0\0".slice(h.length%4||4)).length;g>u;u+=4)(y=(h.charCodeAt(u)<<24)+(h.charCodeAt(u+1)<<16)+(h.charCodeAt(u+2)<<8)+h.charCodeAt(u+3))!==0?(x=(y=((y=((y=((y=(y-(D=y%85))/85)-(P=y%85))/85)-(F=y%85))/85)-(p=y%85))/85)%85,f.push(x+33,p+33,F+33,P+33,D+33)):f.push(122);return(function(N,H){for(var q=H;q>0;q--)N.pop()})(f,l.length),String.fromCharCode.apply(String,f)+"~>"},e=function(h){var l,f,u,g,y,x=String,p="length",F=255,P="charCodeAt",D="slice",N="replace";for(h[D](-2),h=h[D](0,-2)[N](/\s/g,"")[N]("z","!!!!!"),u=[],g=0,y=(h+=l="uuuuu"[D](h[p]%5||5))[p];y>g;g+=5)f=52200625*(h[P](g)-33)+614125*(h[P](g+1)-33)+7225*(h[P](g+2)-33)+85*(h[P](g+3)-33)+(h[P](g+4)-33),u.push(F&f>>24,F&f>>16,F&f>>8,F&f);return(function(H,q){for(var M=q;M>0;M--)H.pop()})(u,l[p]),x.fromCharCode.apply(x,u)},r=function(h){return h.split("").map(function(l){return("0"+l.charCodeAt().toString(16)).slice(-2)}).join("")+">"},i=function(h){var l=new RegExp(/^([0-9A-Fa-f]{2})+$/);if((h=h.replace(/\s/g,"")).indexOf(">")!==-1&&(h=h.substr(0,h.indexOf(">"))),h.length%2&&(h+="0"),l.test(h)===!1)return"";for(var f="",u=0;u<h.length;u+=2)f+=String.fromCharCode("0x"+(h[u]+h[u+1]));return f},a=function(h){for(var l=new Uint8Array(h.length),f=h.length;f--;)l[f]=h.charCodeAt(f);return(l=ds(l)).reduce(function(u,g){return u+String.fromCharCode(g)},"")};t.processDataByFilters=function(h,l){var f=0,u=h||"",g=[];for(typeof(l=l||[])=="string"&&(l=[l]),f=0;f<l.length;f+=1)switch(l[f]){case"ASCII85Decode":case"/ASCII85Decode":u=e(u),g.push("/ASCII85Encode");break;case"ASCII85Encode":case"/ASCII85Encode":u=n(u),g.push("/ASCII85Decode");break;case"ASCIIHexDecode":case"/ASCIIHexDecode":u=i(u),g.push("/ASCIIHexEncode");break;case"ASCIIHexEncode":case"/ASCIIHexEncode":u=r(u),g.push("/ASCIIHexDecode");break;case"FlateEncode":case"/FlateEncode":u=a(u),g.push("/FlateDecode");break;default:throw new Error('The filter: "'+l[f]+'" is not implemented')}return{data:u,reverseChain:g.reverse().join(" ")}}})(Rt.API),(function(t){t.loadFile=function(n,e,r){return(function(i,a,h){a=a!==!1,h=typeof h=="function"?h:function(){};var l=void 0;try{l=(function(f,u,g){var y=new XMLHttpRequest,x=0,p=function(F){var P=F.length,D=[],N=String.fromCharCode;for(x=0;x<P;x+=1)D.push(N(255&F.charCodeAt(x)));return D.join("")};if(y.open("GET",f,!u),y.overrideMimeType("text/plain; charset=x-user-defined"),u===!1&&(y.onload=function(){y.status===200?g(p(this.responseText)):g(void 0)}),y.send(null),u&&y.status===200)return p(y.responseText)})(i,a,h)}catch{}return l})(n,e,r)},t.loadImageFile=t.loadFile})(Rt.API),(function(t){function n(){return($t.html2canvas?Promise.resolve($t.html2canvas):import("./PKOJQT4I.js")).catch(function(l){return Promise.reject(new Error("Could not load html2canvas: "+l))}).then(function(l){return l.default?l.default:l})}function e(){return($t.DOMPurify?Promise.resolve($t.DOMPurify):import("./YVWFYZTI.js")).catch(function(l){return Promise.reject(new Error("Could not load dompurify: "+l))}).then(function(l){return l.default?l.default:l})}var r=function(l){var f=Le(l);return f==="undefined"?"undefined":f==="string"||l instanceof String?"string":f==="number"||l instanceof Number?"number":f==="function"||l instanceof Function?"function":l&&l.constructor===Array?"array":l&&l.nodeType===1?"element":f==="object"?"object":"unknown"},i=function(l,f){var u=document.createElement(l);for(var g in f.className&&(u.className=f.className),f.innerHTML&&f.dompurify&&(u.innerHTML=f.dompurify.sanitize(f.innerHTML)),f.style)u.style[g]=f.style[g];return u},a=function l(f,u){for(var g=f.nodeType===3?document.createTextNode(f.nodeValue):f.cloneNode(!1),y=f.firstChild;y;y=y.nextSibling)u!==!0&&y.nodeType===1&&y.nodeName==="SCRIPT"||g.appendChild(l(y,u));return f.nodeType===1&&(f.nodeName==="CANVAS"?(g.width=f.width,g.height=f.height,g.getContext("2d").drawImage(f,0,0)):f.nodeName!=="TEXTAREA"&&f.nodeName!=="SELECT"||(g.value=f.value),g.addEventListener("load",function(){g.scrollTop=f.scrollTop,g.scrollLeft=f.scrollLeft},!0)),g},h=function l(f){var u=Object.assign(l.convert(Promise.resolve()),JSON.parse(JSON.stringify(l.template))),g=l.convert(Promise.resolve(),u);return(g=g.setProgress(1,l,1,[l])).set(f)};(h.prototype=Object.create(Promise.prototype)).constructor=h,h.convert=function(l,f){return l.__proto__=f||h.prototype,l},h.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"}},h.prototype.from=function(l,f){return this.then(function(){switch(f=f||(function(u){switch(r(u)){case"string":return"string";case"element":return u.nodeName.toLowerCase()==="canvas"?"canvas":"element";default:return"unknown"}})(l),f){case"string":return this.then(e).then(function(u){return this.set({src:i("div",{innerHTML:l,dompurify:u})})});case"element":return this.set({src:l});case"canvas":return this.set({canvas:l});case"img":return this.set({img:l});default:return this.error("Unknown source type.")}})},h.prototype.to=function(l){switch(l){case"container":return this.toContainer();case"canvas":return this.toCanvas();case"img":return this.toImg();case"pdf":return this.toPdf();default:return this.error("Invalid target.")}},h.prototype.toContainer=function(){return this.thenList([function(){return this.prop.src||this.error("Cannot duplicate - no source HTML.")},function(){return this.prop.pageSize||this.setPageSize()}]).then(function(){var l={position:"relative",display:"inline-block",width:(typeof this.opt.width!="number"||isNaN(this.opt.width)||typeof this.opt.windowWidth!="number"||isNaN(this.opt.windowWidth)?Math.max(this.prop.src.clientWidth,this.prop.src.scrollWidth,this.prop.src.offsetWidth):this.opt.windowWidth)+"px",left:0,right:0,top:0,margin:"auto",backgroundColor:this.opt.backgroundColor},f=a(this.prop.src,this.opt.html2canvas.javascriptEnabled);f.tagName==="BODY"&&(l.height=Math.max(document.body.scrollHeight,document.body.offsetHeight,document.documentElement.clientHeight,document.documentElement.scrollHeight,document.documentElement.offsetHeight)+"px"),this.prop.overlay=i("div",{className:"html2pdf__overlay",style:{position:"fixed",overflow:"hidden",zIndex:1e3,left:"-100000px",right:0,bottom:0,top:0}}),this.prop.container=i("div",{className:"html2pdf__container",style:l}),this.prop.container.appendChild(f),this.prop.container.firstChild.appendChild(i("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"})},h.prototype.toCanvas=function(){var l=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(l).then(n).then(function(f){var u=Object.assign({},this.opt.html2canvas);return delete u.onrendered,f(this.prop.container,u)}).then(function(f){(this.opt.html2canvas.onrendered||function(){})(f),this.prop.canvas=f,document.body.removeChild(this.prop.overlay)})},h.prototype.toContext2d=function(){var l=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(l).then(n).then(function(f){var u=this.opt.jsPDF,g=this.opt.fontFaces,y=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,x=Object.assign({async:!0,allowTaint:!0,scale:y,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 x.onrendered,u.context2d.autoPaging=this.opt.autoPaging===void 0||this.opt.autoPaging,u.context2d.posX=this.opt.x,u.context2d.posY=this.opt.y,u.context2d.margin=this.opt.margin,u.context2d.fontFaces=g,g)for(var p=0;p<g.length;++p){var F=g[p],P=F.src.find(function(D){return D.format==="truetype"});P&&u.addFont(P.url,F.ref.name,F.ref.style)}return x.windowHeight=x.windowHeight||0,x.windowHeight=x.windowHeight==0?Math.max(this.prop.container.clientHeight,this.prop.container.scrollHeight,this.prop.container.offsetHeight):x.windowHeight,u.context2d.save(!0),f(this.prop.container,x)}).then(function(f){this.opt.jsPDF.context2d.restore(!0),(this.opt.html2canvas.onrendered||function(){})(f),this.prop.canvas=f,document.body.removeChild(this.prop.overlay)})},h.prototype.toImg=function(){return this.thenList([function(){return this.prop.canvas||this.toCanvas()}]).then(function(){var l=this.prop.canvas.toDataURL("image/"+this.opt.image.type,this.opt.image.quality);this.prop.img=document.createElement("img"),this.prop.img.src=l})},h.prototype.toPdf=function(){return this.thenList([function(){return this.toContext2d()}]).then(function(){this.prop.pdf=this.prop.pdf||this.opt.jsPDF})},h.prototype.output=function(l,f,u){return(u=u||"pdf").toLowerCase()==="img"||u.toLowerCase()==="image"?this.outputImg(l,f):this.outputPdf(l,f)},h.prototype.outputPdf=function(l,f){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then(function(){return this.prop.pdf.output(l,f)})},h.prototype.outputImg=function(l){return this.thenList([function(){return this.prop.img||this.toImg()}]).then(function(){switch(l){case void 0:case"img":return this.prop.img;case"datauristring":case"dataurlstring":return this.prop.img.src;case"datauri":case"dataurl":return document.location.href=this.prop.img.src;default:throw'Image output type "'+l+'" is not supported.'}})},h.prototype.save=function(l){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).set(l?{filename:l}:null).then(function(){this.prop.pdf.save(this.opt.filename)})},h.prototype.doCallback=function(){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then(function(){this.prop.callback(this.prop.pdf)})},h.prototype.set=function(l){if(r(l)!=="object")return this;var f=Object.keys(l||{}).map(function(u){if(u in h.template.prop)return function(){this.prop[u]=l[u]};switch(u){case"margin":return this.setMargin.bind(this,l.margin);case"jsPDF":return function(){return this.opt.jsPDF=l.jsPDF,this.setPageSize()};case"pageSize":return this.setPageSize.bind(this,l.pageSize);default:return function(){this.opt[u]=l[u]}}},this);return this.then(function(){return this.thenList(f)})},h.prototype.get=function(l,f){return this.then(function(){var u=l in h.template.prop?this.prop[l]:this.opt[l];return f?f(u):u})},h.prototype.setMargin=function(l){return this.then(function(){switch(r(l)){case"number":l=[l,l,l,l];case"array":if(l.length===2&&(l=[l[0],l[1],l[0],l[1]]),l.length===4)break;default:return this.error("Invalid margin array.")}this.opt.margin=l}).then(this.setPageSize)},h.prototype.setPageSize=function(l){function f(u,g){return Math.floor(u*g/72*96)}return this.then(function(){(l=l||Rt.getPageSize(this.opt.jsPDF)).hasOwnProperty("inner")||(l.inner={width:l.width-this.opt.margin[1]-this.opt.margin[3],height:l.height-this.opt.margin[0]-this.opt.margin[2]},l.inner.px={width:f(l.inner.width,l.k),height:f(l.inner.height,l.k)},l.inner.ratio=l.inner.height/l.inner.width),this.prop.pageSize=l})},h.prototype.setProgress=function(l,f,u,g){return l!=null&&(this.progress.val=l),f!=null&&(this.progress.state=f),u!=null&&(this.progress.n=u),g!=null&&(this.progress.stack=g),this.progress.ratio=this.progress.val/this.progress.state,this},h.prototype.updateProgress=function(l,f,u,g){return this.setProgress(l?this.progress.val+l:null,f||null,u?this.progress.n+u:null,g?this.progress.stack.concat(g):null)},h.prototype.then=function(l,f){var u=this;return this.thenCore(l,f,function(g,y){return u.updateProgress(null,null,1,[g]),Promise.prototype.then.call(this,function(x){return u.updateProgress(null,g),x}).then(g,y).then(function(x){return u.updateProgress(1),x})})},h.prototype.thenCore=function(l,f,u){u=u||Promise.prototype.then;var g=this;l&&(l=l.bind(g)),f&&(f=f.bind(g));var y=Promise.toString().indexOf("[native code]")!==-1&&Promise.name==="Promise"?g:h.convert(Object.assign({},g),Promise.prototype),x=u.call(y,l,f);return h.convert(x,g.__proto__)},h.prototype.thenExternal=function(l,f){return Promise.prototype.then.call(this,l,f)},h.prototype.thenList=function(l){var f=this;return l.forEach(function(u){f=f.thenCore(u)}),f},h.prototype.catch=function(l){l&&(l=l.bind(this));var f=Promise.prototype.catch.call(this,l);return h.convert(f,this)},h.prototype.catchExternal=function(l){return Promise.prototype.catch.call(this,l)},h.prototype.error=function(l){return this.then(function(){throw new Error(l)})},h.prototype.using=h.prototype.set,h.prototype.saveAs=h.prototype.save,h.prototype.export=h.prototype.output,h.prototype.run=h.prototype.then,Rt.getPageSize=function(l,f,u){if(Le(l)==="object"){var g=l;l=g.orientation,f=g.unit||f,u=g.format||u}f=f||"mm",u=u||"a4",l=(""+(l||"P")).toLowerCase();var y,x=(""+u).toLowerCase(),p={a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89],a5:[419.53,595.28],a6:[297.64,419.53],a7:[209.76,297.64],a8:[147.4,209.76],a9:[104.88,147.4],a10:[73.7,104.88],b0:[2834.65,4008.19],b1:[2004.09,2834.65],b2:[1417.32,2004.09],b3:[1000.63,1417.32],b4:[708.66,1000.63],b5:[498.9,708.66],b6:[354.33,498.9],b7:[249.45,354.33],b8:[175.75,249.45],b9:[124.72,175.75],b10:[87.87,124.72],c0:[2599.37,3676.54],c1:[1836.85,2599.37],c2:[1298.27,1836.85],c3:[918.43,1298.27],c4:[649.13,918.43],c5:[459.21,649.13],c6:[323.15,459.21],c7:[229.61,323.15],c8:[161.57,229.61],c9:[113.39,161.57],c10:[79.37,113.39],dl:[311.81,623.62],letter:[612,792],"government-letter":[576,756],legal:[612,1008],"junior-legal":[576,360],ledger:[1224,792],tabloid:[792,1224],"credit-card":[153,243]};switch(f){case"pt":y=1;break;case"mm":y=72/25.4;break;case"cm":y=72/2.54;break;case"in":y=72;break;case"px":y=.75;break;case"pc":case"em":y=12;break;case"ex":y=6;break;default:throw"Invalid unit: "+f}var F,P=0,D=0;if(p.hasOwnProperty(x))P=p[x][1]/y,D=p[x][0]/y;else try{P=u[1],D=u[0]}catch{throw new Error("Invalid format: "+u)}if(l==="p"||l==="portrait")l="p",D>P&&(F=D,D=P,P=F);else{if(l!=="l"&&l!=="landscape")throw"Invalid orientation: "+l;l="l",P>D&&(F=D,D=P,P=F)}return{width:D,height:P,unit:f,k:y,orientation:l}},t.html=function(l,f){(f=f||{}).callback=f.callback||function(){},f.html2canvas=f.html2canvas||{},f.html2canvas.canvas=f.html2canvas.canvas||this.canvas,f.jsPDF=f.jsPDF||this,f.fontFaces=f.fontFaces?f.fontFaces.map(Ah):null;var u=new h(f);return f.worker?u:u.from(l).doCallback()}})(Rt.API),Rt.API.addJS=function(t){return Ou=t,this.internal.events.subscribe("postPutResources",function(){Rs=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/Names [(EmbeddedJS) "+(Rs+1)+" 0 R]"),this.internal.out(">>"),this.internal.out("endobj"),Cu=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/S /JavaScript"),this.internal.out("/JS ("+Ou+")"),this.internal.out(">>"),this.internal.out("endobj")}),this.internal.events.subscribe("putCatalog",function(){Rs!==void 0&&Cu!==void 0&&this.internal.out("/Names <</JavaScript "+Rs+" 0 R>>")}),this},(function(t){var n;t.events.push(["postPutResources",function(){var e=this,r=/^(\d+) 0 obj$/;if(this.outline.root.children.length>0)for(var i=e.outline.render().split(/\r\n/),a=0;a<i.length;a++){var h=i[a],l=r.exec(h);if(l!=null){var f=l[1];e.internal.newObjectDeferredBegin(f,!1)}e.internal.write(h)}if(this.outline.createNamedDestinations){var u=this.internal.pages.length,g=[];for(a=0;a<u;a++){var y=e.internal.newObject();g.push(y);var x=e.internal.getPageInfo(a+1);e.internal.write("<< /D["+x.objId+" 0 R /XYZ null null null]>> endobj")}var p=e.internal.newObject();for(e.internal.write("<< /Names [ "),a=0;a<g.length;a++)e.internal.write("(page_"+(a+1)+")"+g[a]+" 0 R");e.internal.write(" ] >>","endobj"),n=e.internal.newObject(),e.internal.write("<< /Dests "+p+" 0 R"),e.internal.write(">>","endobj")}}]),t.events.push(["putCatalog",function(){var e=this;e.outline.root.children.length>0&&(e.internal.write("/Outlines",this.outline.makeRef(this.outline.root)),this.outline.createNamedDestinations&&e.internal.write("/Names "+n+" 0 R"))}]),t.events.push(["initialized",function(){var e=this;e.outline={createNamedDestinations:!1,root:{children:[]}},e.outline.add=function(r,i,a){var h={title:i,options:a,children:[]};return r==null&&(r=this.root),r.children.push(h),h},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(r){r.id=e.internal.newObjectDeferred();for(var i=0;i<r.children.length;i++)this.genIds_r(r.children[i])},e.outline.renderRoot=function(r){this.objStart(r),this.line("/Type /Outlines"),r.children.length>0&&(this.line("/First "+this.makeRef(r.children[0])),this.line("/Last "+this.makeRef(r.children[r.children.length-1]))),this.line("/Count "+this.count_r({count:0},r)),this.objEnd()},e.outline.renderItems=function(r){for(var i=this.ctx.pdf.internal.getVerticalCoordinateString,a=0;a<r.children.length;a++){var h=r.children[a];this.objStart(h),this.line("/Title "+this.makeString(h.title)),this.line("/Parent "+this.makeRef(r)),a>0&&this.line("/Prev "+this.makeRef(r.children[a-1])),a<r.children.length-1&&this.line("/Next "+this.makeRef(r.children[a+1])),h.children.length>0&&(this.line("/First "+this.makeRef(h.children[0])),this.line("/Last "+this.makeRef(h.children[h.children.length-1])));var l=this.count=this.count_r({count:0},h);if(l>0&&this.line("/Count "+l),h.options&&h.options.pageNumber){var f=e.internal.getPageInfo(h.options.pageNumber);this.line("/Dest ["+f.objId+" 0 R /XYZ 0 "+i(0)+" 0]")}this.objEnd()}for(var u=0;u<r.children.length;u++)this.renderItems(r.children[u])},e.outline.line=function(r){this.ctx.val+=r+`\r
|
|
42
|
+
`),n}}},createDefaultAppearanceStream:function(t){var n=t.scope.internal.getFont(t.fontName,t.fontStyle).id,e=t.scope.__private__.encodeColorString(t.color);return"/"+n+" "+t.fontSize+" Tf "+e}};Ft.internal={Bezier_C:.551915024494,calculateCross:function(t){var n=Ft.internal.getWidth(t),e=Ft.internal.getHeight(t),r=Math.min(n,e);return{x1:{x:(n-r)/2,y:(e-r)/2+r},x2:{x:(n-r)/2+r,y:(e-r)/2},x3:{x:(n-r)/2,y:(e-r)/2},x4:{x:(n-r)/2+r,y:(e-r)/2+r}}}},Ft.internal.getWidth=function(t){var n=0;return Le(t)==="object"&&(n=ku(t.Rect[2])),n},Ft.internal.getHeight=function(t){var n=0;return Le(t)==="object"&&(n=ku(t.Rect[3])),n};var wd=ze.addField=function(t){if(bd(this,t),!(t instanceof fr))throw new Error("Invalid argument passed to jsPDF.addField.");var n;return(n=t).scope.internal.acroformPlugin.printedOut&&(n.scope.internal.acroformPlugin.printedOut=!1,n.scope.internal.acroformPlugin.acroFormDictionaryRoot=null),n.scope.internal.acroformPlugin.acroFormDictionaryRoot.Fields.push(n),t.page=t.scope.internal.getCurrentPageInfo().pageNumber,this};ze.AcroFormChoiceField=La,ze.AcroFormListBox=Sa,ze.AcroFormComboBox=ka,ze.AcroFormEditBox=Bs,ze.AcroFormButton=sn,ze.AcroFormPushButton=zs,ze.AcroFormRadioButton=Pa,ze.AcroFormCheckBox=Us,ze.AcroFormTextField=Yi,ze.AcroFormPasswordField=qs,ze.AcroFormAppearance=Ft,ze.AcroForm={ChoiceField:La,ListBox:Sa,ComboBox:ka,EditBox:Bs,Button:sn,PushButton:zs,RadioButton:Pa,CheckBox:Us,TextField:Yi,PasswordField:qs,Appearance:Ft},Rt.AcroForm={ChoiceField:La,ListBox:Sa,ComboBox:ka,EditBox:Bs,Button:sn,PushButton:zs,RadioButton:Pa,CheckBox:Us,TextField:Yi,PasswordField:qs,Appearance:Ft};var _g=Rt.AcroForm;function Ju(t){return t.reduce(function(n,e,r){return n[e]=r,n},{})}(function(t){var n="addImage_";t.__addimage__={};var e="UNKNOWN",r={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=t.__addimage__.getImageFileTypeByImageData=function(S,O){var W,U,it,st,ht,nt=e;if((O=O||e)==="RGBA"||S.data!==void 0&&S.data instanceof Uint8ClampedArray&&"height"in S&&"width"in S)return"RGBA";if(mt(S))for(ht in r)for(it=r[ht],W=0;W<it.length;W+=1){for(st=!0,U=0;U<it[W].length;U+=1)if(it[W][U]!==void 0&&it[W][U]!==S[U]){st=!1;break}if(st===!0){nt=ht;break}}else for(ht in r)for(it=r[ht],W=0;W<it.length;W+=1){for(st=!0,U=0;U<it[W].length;U+=1)if(it[W][U]!==void 0&&it[W][U]!==S.charCodeAt(U)){st=!1;break}if(st===!0){nt=ht;break}}return nt===e&&O!==e&&(nt=O),nt},a=function S(O){for(var W=this.internal.write,U=this.internal.putStream,it=(0,this.internal.getFilters)();it.indexOf("FlateEncode")!==-1;)it.splice(it.indexOf("FlateEncode"),1);O.objectId=this.internal.newObject();var st=[];if(st.push({key:"Type",value:"/XObject"}),st.push({key:"Subtype",value:"/Image"}),st.push({key:"Width",value:O.width}),st.push({key:"Height",value:O.height}),O.colorSpace===N.INDEXED?st.push({key:"ColorSpace",value:"[/Indexed /DeviceRGB "+(O.palette.length/3-1)+" "+("sMask"in O&&O.sMask!==void 0?O.objectId+2:O.objectId+1)+" 0 R]"}):(st.push({key:"ColorSpace",value:"/"+O.colorSpace}),O.colorSpace===N.DEVICE_CMYK&&st.push({key:"Decode",value:"[1 0 1 0 1 0 1 0]"})),st.push({key:"BitsPerComponent",value:O.bitsPerComponent}),"decodeParameters"in O&&O.decodeParameters!==void 0&&st.push({key:"DecodeParms",value:"<<"+O.decodeParameters+">>"}),"transparency"in O&&Array.isArray(O.transparency)&&O.transparency.length>0){for(var ht="",nt=0,ut=O.transparency.length;nt<ut;nt++)ht+=O.transparency[nt]+" "+O.transparency[nt]+" ";st.push({key:"Mask",value:"["+ht+"]"})}O.sMask!==void 0&&st.push({key:"SMask",value:O.objectId+1+" 0 R"});var At=O.filter!==void 0?["/"+O.filter]:void 0;if(U({data:O.data,additionalKeyValues:st,alreadyAppliedFilters:At,objectId:O.objectId}),W("endobj"),"sMask"in O&&O.sMask!==void 0){var wt,A=(wt=O.sMaskBitsPerComponent)!==null&&wt!==void 0?wt:O.bitsPerComponent,R={width:O.width,height:O.height,colorSpace:"DeviceGray",bitsPerComponent:A,data:O.sMask};"filter"in O&&(R.decodeParameters="/Predictor ".concat(O.predictor," /Colors 1 /BitsPerComponent ").concat(A," /Columns ").concat(O.width),R.filter=O.filter),S.call(this,R)}if(O.colorSpace===N.INDEXED){var B=this.internal.newObject();U({data:Y(new Uint8Array(O.palette)),objectId:B}),W("endobj")}},h=function(){var S=this.internal.collections[n+"images"];for(var O in S)a.call(this,S[O])},l=function(){var S,O=this.internal.collections[n+"images"],W=this.internal.write;for(var U in O)W("/I"+(S=O[U]).index,S.objectId,"0","R")},f=function(){this.internal.collections[n+"images"]||(this.internal.collections[n+"images"]={},this.internal.events.subscribe("putResources",h),this.internal.events.subscribe("putXobjectDict",l))},u=function(){var S=this.internal.collections[n+"images"];return f.call(this),S},g=function(){return Object.keys(this.internal.collections[n+"images"]).length},y=function(S){return typeof t["process"+S.toUpperCase()]=="function"},x=function(S){return Le(S)==="object"&&S.nodeType===1},p=function(S,O){if(S.nodeName==="IMG"&&S.hasAttribute("src")){var W=""+S.getAttribute("src");if(W.indexOf("data:image/")===0)return js(unescape(W).split("base64,").pop());var U=t.loadFile(W,!0);if(U!==void 0)return U}if(S.nodeName==="CANVAS"){if(S.width===0||S.height===0)throw new Error("Given canvas must have data. Canvas width: "+S.width+", height: "+S.height);var it;switch(O){case"PNG":it="image/png";break;case"WEBP":it="image/webp";break;default:it="image/jpeg"}return js(S.toDataURL(it,1).split("base64,").pop())}},F=function(S){var O=this.internal.collections[n+"images"];if(O){for(var W in O)if(S===O[W].alias)return O[W]}},P=function(S,O,W){return S||O||(S=-96,O=-96),S<0&&(S=-1*W.width*72/S/this.internal.scaleFactor),O<0&&(O=-1*W.height*72/O/this.internal.scaleFactor),S===0&&(S=O*W.width/W.height),O===0&&(O=S*W.height/W.width),[S,O]},D=function(S,O,W,U,it,st){var ht=P.call(this,W,U,it),nt=this.internal.getCoordinateString,ut=this.internal.getVerticalCoordinateString,At=u.call(this);if(W=ht[0],U=ht[1],At[it.index]=it,st){st*=Math.PI/180;var wt=Math.cos(st),A=Math.sin(st),R=function(G){return G.toFixed(4)},B=[R(wt),R(A),R(-1*A),R(wt),0,0,"cm"]}this.internal.write("q"),st?(this.internal.write([1,"0","0",1,nt(S),ut(O+U),"cm"].join(" ")),this.internal.write(B.join(" ")),this.internal.write([nt(W),"0","0",nt(U),"0","0","cm"].join(" "))):this.internal.write([nt(W),"0","0",nt(U),nt(S),ut(O+U),"cm"].join(" ")),this.isAdvancedAPI()&&this.internal.write([1,0,0,-1,0,0,"cm"].join(" ")),this.internal.write("/I"+it.index+" Do"),this.internal.write("Q")},N=t.color_spaces={DEVICE_RGB:"DeviceRGB",DEVICE_GRAY:"DeviceGray",DEVICE_CMYK:"DeviceCMYK",CAL_GREY:"CalGray",CAL_RGB:"CalRGB",LAB:"Lab",ICC_BASED:"ICCBased",INDEXED:"Indexed",PATTERN:"Pattern",SEPARATION:"Separation",DEVICE_N:"DeviceN"};t.decode={DCT_DECODE:"DCTDecode",FLATE_DECODE:"FlateDecode",LZW_DECODE:"LZWDecode",JPX_DECODE:"JPXDecode",JBIG2_DECODE:"JBIG2Decode",ASCII85_DECODE:"ASCII85Decode",ASCII_HEX_DECODE:"ASCIIHexDecode",RUN_LENGTH_DECODE:"RunLengthDecode",CCITT_FAX_DECODE:"CCITTFaxDecode"};var H=t.image_compression={NONE:"NONE",FAST:"FAST",MEDIUM:"MEDIUM",SLOW:"SLOW"},q=t.__addimage__.sHashCode=function(S){var O,W,U=0;if(typeof S=="string")for(W=S.length,O=0;O<W;O++)U=(U<<5)-U+S.charCodeAt(O),U|=0;else if(mt(S))for(W=S.byteLength/2,O=0;O<W;O++)U=(U<<5)-U+S[O],U|=0;return U},M=t.__addimage__.validateStringAsBase64=function(S){(S=S||"").toString().trim();var O=!0;return S.length===0&&(O=!1),S.length%4!=0&&(O=!1),/^[A-Za-z0-9+/]+$/.test(S.substr(0,S.length-2))===!1&&(O=!1),/^[A-Za-z0-9/][A-Za-z0-9+/]|[A-Za-z0-9+/]=|==$/.test(S.substr(-2))===!1&&(O=!1),O},rt=t.__addimage__.extractImageFromDataUrl=function(S){if(S==null||!(S=S.trim()).startsWith("data:"))return null;var O=S.indexOf(",");return O<0?null:S.substring(0,O).trim().endsWith("base64")?S.substring(O+1):null};t.__addimage__.isArrayBuffer=function(S){return S instanceof ArrayBuffer};var mt=t.__addimage__.isArrayBufferView=function(S){return S instanceof Int8Array||S instanceof Uint8Array||S instanceof Uint8ClampedArray||S instanceof Int16Array||S instanceof Uint16Array||S instanceof Int32Array||S instanceof Uint32Array||S instanceof Float32Array||S instanceof Float64Array},ct=t.__addimage__.binaryStringToUint8Array=function(S){for(var O=S.length,W=new Uint8Array(O),U=0;U<O;U++)W[U]=S.charCodeAt(U);return W},Y=t.__addimage__.arrayBufferToBinaryString=function(S){for(var O="",W=mt(S)?S:new Uint8Array(S),U=0;U<W.length;U+=8192)O+=String.fromCharCode.apply(null,W.subarray(U,U+8192));return O};t.addImage=function(){var S,O,W,U,it,st,ht,nt,ut;if(typeof arguments[1]=="number"?(O=e,W=arguments[1],U=arguments[2],it=arguments[3],st=arguments[4],ht=arguments[5],nt=arguments[6],ut=arguments[7]):(O=arguments[1],W=arguments[2],U=arguments[3],it=arguments[4],st=arguments[5],ht=arguments[6],nt=arguments[7],ut=arguments[8]),Le(S=arguments[0])==="object"&&!x(S)&&"imageData"in S){var At=S;S=At.imageData,O=At.format||O||e,W=At.x||W||0,U=At.y||U||0,it=At.w||At.width||it,st=At.h||At.height||st,ht=At.alias||ht,nt=At.compression||nt,ut=At.rotation||At.angle||ut}var wt=this.internal.getFilters();if(nt===void 0&&wt.indexOf("FlateEncode")!==-1&&(nt="SLOW"),isNaN(W)||isNaN(U))throw new Error("Invalid coordinates passed to jsPDF.addImage");f.call(this);var A=j.call(this,S,O,ht,nt);return D.call(this,W,U,it,st,A,ut),this};var j=function(S,O,W,U){var it,st,ht;if(typeof S=="string"&&i(S)===e){S=unescape(S);var nt=tt(S,!1);(nt!==""||(nt=t.loadFile(S,!0))!==void 0)&&(S=nt)}if(x(S)&&(S=p(S,O)),O=i(S,O),!y(O))throw new Error("addImage does not support files of type '"+O+"', please ensure that a plugin for '"+O+"' support is added.");if(((ht=W)==null||ht.length===0)&&(W=(function(ut){return typeof ut=="string"||mt(ut)?q(ut):mt(ut.data)?q(ut.data):null})(S)),(it=F.call(this,W))||(S instanceof Uint8Array||O==="RGBA"||(st=S,S=ct(S)),it=this["process"+O.toUpperCase()](S,g.call(this),W,(function(ut){return ut&&typeof ut=="string"&&(ut=ut.toUpperCase()),ut in t.image_compression?ut:H.NONE})(U),st)),!it)throw new Error("An unknown error occurred whilst processing the image.");return it},tt=t.__addimage__.convertBase64ToBinaryString=function(S,O){O=typeof O!="boolean"||O;var W,U="";if(typeof S=="string"){var it;W=(it=rt(S))!==null&&it!==void 0?it:S;try{U=js(W)}catch(st){if(O)throw M(W)?new Error("atob-Error in jsPDF.convertBase64ToBinaryString "+st.message):new Error("Supplied Data is not a valid base64-String jsPDF.convertBase64ToBinaryString ")}}return U};t.getImageProperties=function(S){var O,W,U="";if(x(S)&&(S=p(S)),typeof S=="string"&&i(S)===e&&((U=tt(S,!1))===""&&(U=t.loadFile(S)||""),S=U),W=i(S),!y(W))throw new Error("addImage does not support files of type '"+W+"', please ensure that a plugin for '"+W+"' support is added.");if(S instanceof Uint8Array||(S=ct(S)),!(O=this["process"+W.toUpperCase()](S)))throw new Error("An unknown error occurred whilst processing the image");return O.fileType=W,O}})(Rt.API),(function(t){var n=function(e){if(e!==void 0&&e!="")return!0};Rt.API.events.push(["addPage",function(e){this.internal.getPageInfo(e.pageNumber).pageContext.annotations=[]}]),t.events.push(["putPage",function(e){for(var r,i,a,h=this.internal.getCoordinateString,l=this.internal.getVerticalCoordinateString,f=this.internal.getPageInfoByObjId(e.objId),u=e.pageContext.annotations,g=!1,y=0;y<u.length&&!g;y++)switch((r=u[y]).type){case"link":(n(r.options.url)||n(r.options.pageNumber))&&(g=!0);break;case"reference":case"text":case"freetext":g=!0}if(g!=0){this.internal.write("/Annots [");for(var x=0;x<u.length;x++){r=u[x];var p=this.internal.pdfEscape,F=this.internal.getEncryptor(e.objId);switch(r.type){case"reference":this.internal.write(" "+r.object.objId+" 0 R ");break;case"text":var P=this.internal.newAdditionalObject(),D=this.internal.newAdditionalObject(),N=this.internal.getEncryptor(P.objId),H=r.title||"Note";a="<</Type /Annot /Subtype /Text "+(i="/Rect ["+h(r.bounds.x)+" "+l(r.bounds.y+r.bounds.h)+" "+h(r.bounds.x+r.bounds.w)+" "+l(r.bounds.y)+"] ")+"/Contents ("+p(N(r.contents))+")",a+=" /Popup "+D.objId+" 0 R",a+=" /P "+f.objId+" 0 R",a+=" /T ("+p(N(H))+") >>",P.content=a;var q=P.objId+" 0 R";a="<</Type /Annot /Subtype /Popup "+(i="/Rect ["+h(r.bounds.x+30)+" "+l(r.bounds.y+r.bounds.h)+" "+h(r.bounds.x+r.bounds.w+30)+" "+l(r.bounds.y)+"] ")+" /Parent "+q,r.open&&(a+=" /Open true"),a+=" >>",D.content=a,this.internal.write(P.objId,"0 R",D.objId,"0 R");break;case"freetext":i="/Rect ["+h(r.bounds.x)+" "+l(r.bounds.y)+" "+h(r.bounds.x+r.bounds.w)+" "+l(r.bounds.y+r.bounds.h)+"] ";var M=r.color||"#000000";a="<</Type /Annot /Subtype /FreeText "+i+"/Contents ("+p(F(r.contents))+")",a+=" /DS(font: Helvetica,sans-serif 12.0pt; text-align:left; color:#"+M+")",a+=" /Border [0 0 0]",a+=" >>",this.internal.write(a);break;case"link":if(r.options.name){var rt=this.annotations._nameMap[r.options.name];r.options.pageNumber=rt.page,r.options.top=rt.y}else r.options.top||(r.options.top=0);if(i="/Rect ["+r.finalBounds.x+" "+r.finalBounds.y+" "+r.finalBounds.w+" "+r.finalBounds.h+"] ",a="",r.options.url)a="<</Type /Annot /Subtype /Link "+i+"/Border [0 0 0] /A <</S /URI /URI ("+p(F(r.options.url))+") >>";else if(r.options.pageNumber)switch(a="<</Type /Annot /Subtype /Link "+i+"/Border [0 0 0] /Dest ["+this.internal.getPageInfo(r.options.pageNumber).objId+" 0 R",r.options.magFactor=r.options.magFactor||"XYZ",r.options.magFactor){case"Fit":a+=" /Fit]";break;case"FitH":a+=" /FitH "+r.options.top+"]";break;case"FitV":r.options.left=r.options.left||0,a+=" /FitV "+r.options.left+"]";break;default:var mt=l(r.options.top);r.options.left=r.options.left||0,r.options.zoom===void 0&&(r.options.zoom=0),a+=" /XYZ "+r.options.left+" "+mt+" "+r.options.zoom+"]"}a!=""&&(a+=" >>",this.internal.write(a))}}this.internal.write("]")}}]),t.createAnnotation=function(e){var r=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":r.pageContext.annotations.push(e)}},t.link=function(e,r,i,a,h){var l=this.internal.getCurrentPageInfo(),f=this.internal.getCoordinateString,u=this.internal.getVerticalCoordinateString;l.pageContext.annotations.push({finalBounds:{x:f(e),y:u(r),w:f(e+i),h:u(r+a)},options:h,type:"link"})},t.textWithLink=function(e,r,i,a){var h,l,f=this.getTextWidth(e),u=this.internal.getLineHeight()/this.internal.scaleFactor;if(a.maxWidth!==void 0){l=a.maxWidth;var g=this.splitTextToSize(e,l).length;h=Math.ceil(u*g)}else l=f,h=u;return this.text(e,r,i,a),i+=.2*u,a.align==="center"&&(r-=f/2),a.align==="right"&&(r-=f),this.link(r,i-u,l,h,a),f},t.getTextWidth=function(e){var r=this.internal.getFontSize();return this.getStringUnitWidth(e)*r/this.internal.scaleFactor}})(Rt.API),(function(t){var n={1569:[65152],1570:[65153,65154],1571:[65155,65156],1572:[65157,65158],1573:[65159,65160],1574:[65161,65162,65163,65164],1575:[65165,65166],1576:[65167,65168,65169,65170],1577:[65171,65172],1578:[65173,65174,65175,65176],1579:[65177,65178,65179,65180],1580:[65181,65182,65183,65184],1581:[65185,65186,65187,65188],1582:[65189,65190,65191,65192],1583:[65193,65194],1584:[65195,65196],1585:[65197,65198],1586:[65199,65200],1587:[65201,65202,65203,65204],1588:[65205,65206,65207,65208],1589:[65209,65210,65211,65212],1590:[65213,65214,65215,65216],1591:[65217,65218,65219,65220],1592:[65221,65222,65223,65224],1593:[65225,65226,65227,65228],1594:[65229,65230,65231,65232],1601:[65233,65234,65235,65236],1602:[65237,65238,65239,65240],1603:[65241,65242,65243,65244],1604:[65245,65246,65247,65248],1605:[65249,65250,65251,65252],1606:[65253,65254,65255,65256],1607:[65257,65258,65259,65260],1608:[65261,65262],1609:[65263,65264,64488,64489],1610:[65265,65266,65267,65268],1649:[64336,64337],1655:[64477],1657:[64358,64359,64360,64361],1658:[64350,64351,64352,64353],1659:[64338,64339,64340,64341],1662:[64342,64343,64344,64345],1663:[64354,64355,64356,64357],1664:[64346,64347,64348,64349],1667:[64374,64375,64376,64377],1668:[64370,64371,64372,64373],1670:[64378,64379,64380,64381],1671:[64382,64383,64384,64385],1672:[64392,64393],1676:[64388,64389],1677:[64386,64387],1678:[64390,64391],1681:[64396,64397],1688:[64394,64395],1700:[64362,64363,64364,64365],1702:[64366,64367,64368,64369],1705:[64398,64399,64400,64401],1709:[64467,64468,64469,64470],1711:[64402,64403,64404,64405],1713:[64410,64411,64412,64413],1715:[64406,64407,64408,64409],1722:[64414,64415],1723:[64416,64417,64418,64419],1726:[64426,64427,64428,64429],1728:[64420,64421],1729:[64422,64423,64424,64425],1733:[64480,64481],1734:[64473,64474],1735:[64471,64472],1736:[64475,64476],1737:[64482,64483],1739:[64478,64479],1740:[64508,64509,64510,64511],1744:[64484,64485,64486,64487],1746:[64430,64431],1747:[64432,64433]},e={65247:{65154:65269,65156:65271,65160:65273,65166:65275},65248:{65154:65270,65156:65272,65160:65274,65166:65276},65165:{65247:{65248:{65258:65010}}},1617:{1612:64606,1613:64607,1614:64608,1615:64609,1616:64610}},r={1612:64606,1613:64607,1614:64608,1615:64609,1616:64610},i=[1570,1571,1573,1575];t.__arabicParser__={};var a=t.__arabicParser__.isInArabicSubstitutionA=function(P){return n[P.charCodeAt(0)]!==void 0},h=t.__arabicParser__.isArabicLetter=function(P){return typeof P=="string"&&/^[\u0600-\u06FF\u0750-\u077F\u08A0-\u08FF\uFB50-\uFDFF\uFE70-\uFEFF]+$/.test(P)},l=t.__arabicParser__.isArabicEndLetter=function(P){return h(P)&&a(P)&&n[P.charCodeAt(0)].length<=2},f=t.__arabicParser__.isArabicAlfLetter=function(P){return h(P)&&i.indexOf(P.charCodeAt(0))>=0};t.__arabicParser__.arabicLetterHasIsolatedForm=function(P){return h(P)&&a(P)&&n[P.charCodeAt(0)].length>=1};var u=t.__arabicParser__.arabicLetterHasFinalForm=function(P){return h(P)&&a(P)&&n[P.charCodeAt(0)].length>=2};t.__arabicParser__.arabicLetterHasInitialForm=function(P){return h(P)&&a(P)&&n[P.charCodeAt(0)].length>=3};var g=t.__arabicParser__.arabicLetterHasMedialForm=function(P){return h(P)&&a(P)&&n[P.charCodeAt(0)].length==4},y=t.__arabicParser__.resolveLigatures=function(P){var D=0,N=e,H="",q=0;for(D=0;D<P.length;D+=1)N[P.charCodeAt(D)]!==void 0?(q++,typeof(N=N[P.charCodeAt(D)])=="number"&&(H+=String.fromCharCode(N),N=e,q=0),D===P.length-1&&(N=e,H+=P.charAt(D-(q-1)),D-=q-1,q=0)):(N=e,H+=P.charAt(D-q),D-=q,q=0);return H};t.__arabicParser__.isArabicDiacritic=function(P){return P!==void 0&&r[P.charCodeAt(0)]!==void 0};var x=t.__arabicParser__.getCorrectForm=function(P,D,N){return h(P)?a(P)===!1?-1:!u(P)||!h(D)&&!h(N)||!h(N)&&l(D)||l(P)&&!h(D)||l(P)&&f(D)||l(P)&&l(D)?0:g(P)&&h(D)&&!l(D)&&h(N)&&u(N)?3:l(P)||!h(N)?1:2:-1},p=function(P){var D=0,N=0,H=0,q="",M="",rt="",mt=(P=P||"").split("\\s+"),ct=[];for(D=0;D<mt.length;D+=1){for(ct.push(""),N=0;N<mt[D].length;N+=1)q=mt[D][N],M=mt[D][N-1],rt=mt[D][N+1],h(q)?(H=x(q,M,rt),ct[D]+=H!==-1?String.fromCharCode(n[q.charCodeAt(0)][H]):q):ct[D]+=q;ct[D]=y(ct[D])}return ct.join(" ")},F=t.__arabicParser__.processArabic=t.processArabic=function(){var P,D=typeof arguments[0]=="string"?arguments[0]:arguments[0].text,N=[];if(Array.isArray(D)){var H=0;for(N=[],H=0;H<D.length;H+=1)Array.isArray(D[H])?N.push([p(D[H][0]),D[H][1],D[H][2]]):N.push([p(D[H])]);P=N}else P=p(D);return typeof arguments[0]=="string"?P:(arguments[0].text=P,arguments[0])};t.events.push(["preProcessText",F])})(Rt.API),Rt.API.autoPrint=function(t){var n;return(t=t||{}).variant=t.variant||"non-conform",t.variant==="javascript"?this.addJS("print({});"):(this.internal.events.subscribe("postPutResources",function(){n=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/S /Named"),this.internal.out("/Type /Action"),this.internal.out("/N /Print"),this.internal.out(">>"),this.internal.out("endobj")}),this.internal.events.subscribe("putCatalog",function(){this.internal.out("/OpenAction "+n+" 0 R")})),this},(function(t){var n=function(){var e=void 0;Object.defineProperty(this,"pdf",{get:function(){return e},set:function(l){e=l}});var r=150;Object.defineProperty(this,"width",{get:function(){return r},set:function(l){r=isNaN(l)||Number.isInteger(l)===!1||l<0?150:l,this.getContext("2d").pageWrapXEnabled&&(this.getContext("2d").pageWrapX=r+1)}});var i=300;Object.defineProperty(this,"height",{get:function(){return i},set:function(l){i=isNaN(l)||Number.isInteger(l)===!1||l<0?300:l,this.getContext("2d").pageWrapYEnabled&&(this.getContext("2d").pageWrapY=i+1)}});var a=[];Object.defineProperty(this,"childNodes",{get:function(){return a},set:function(l){a=l}});var h={};Object.defineProperty(this,"style",{get:function(){return h},set:function(l){h=l}}),Object.defineProperty(this,"parentNode",{})};n.prototype.getContext=function(e,r){var i;if((e=e||"2d")!=="2d")return null;for(i in r)this.pdf.context2d.hasOwnProperty(i)&&(this.pdf.context2d[i]=r[i]);return this.pdf.context2d._canvas=this,this.pdf.context2d},n.prototype.toDataURL=function(){throw new Error("toDataURL is not implemented.")},t.events.push(["initialized",function(){this.canvas=new n,this.canvas.pdf=this}])})(Rt.API),(function(t){var n={left:0,top:0,bottom:0,right:0},e=!1,r=function(){this.internal.__cell__===void 0&&(this.internal.__cell__={},this.internal.__cell__.padding=3,this.internal.__cell__.headerFunction=void 0,this.internal.__cell__.margins=Object.assign({},n),this.internal.__cell__.margins.width=this.getPageWidth(),i.call(this))},i=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 u=arguments[1];Object.defineProperty(this,"y",{enumerable:!0,get:function(){return u},set:function(P){u=P}});var g=arguments[2];Object.defineProperty(this,"width",{enumerable:!0,get:function(){return g},set:function(P){g=P}});var y=arguments[3];Object.defineProperty(this,"height",{enumerable:!0,get:function(){return y},set:function(P){y=P}});var x=arguments[4];Object.defineProperty(this,"text",{enumerable:!0,get:function(){return x},set:function(P){x=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]},t.setHeaderFunction=function(f){return r.call(this),this.internal.__cell__.headerFunction=typeof f=="function"?f:void 0,this},t.getTextDimensions=function(f,u){r.call(this);var g=(u=u||{}).fontSize||this.getFontSize(),y=u.font||this.getFont(),x=u.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 N=u.maxWidth;N>0?typeof f=="string"?f=this.splitTextToSize(f,N):Object.prototype.toString.call(f)==="[object Array]"&&(f=f.reduce(function(q,M){return q.concat(D.splitTextToSize(M,N))},[])):f=Array.isArray(f)?f:[f];for(var H=0;H<f.length;H++)p<(P=this.getStringUnitWidth(f[H],{font:y})*g)&&(p=P);return p!==0&&(F=f.length),{w:p/=x,h:Math.max((F*g*this.getLineHeightFactor()-g*(this.getLineHeightFactor()-1))/x,0)}},t.cellAddPage=function(){r.call(this),this.addPage();var f=this.internal.__cell__.margins||n;return this.internal.__cell__.lastCell=new a(f.left,f.top,void 0,void 0),this.internal.__cell__.pages+=1,this};var h=t.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],arguments[6]),r.call(this);var u=this.internal.__cell__.lastCell,g=this.internal.__cell__.padding,y=this.internal.__cell__.margins||n,x=this.internal.__cell__.tableHeaderRow,p=this.internal.__cell__.printHeaders;return u.lineNumber!==void 0&&(u.lineNumber===f.lineNumber?(f.x=(u.x||0)+(u.width||0),f.y=u.y||0):u.y+u.height+f.height+y.bottom>this.getPageHeight()?(this.cellAddPage(),f.y=y.top,p&&x&&(this.printHeaderRow(f.lineNumber,!0),f.y+=x[0].height)):f.y=u.y+u.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-g,f.y+g,{align:"right",baseline:"top"}):f.align==="center"?this.text(f.text,f.x+f.width/2,f.y+g,{align:"center",baseline:"top",maxWidth:f.width-g-g}):this.text(f.text,f.x+g,f.y+g,{align:"left",baseline:"top",maxWidth:f.width-g-g})),this.internal.__cell__.lastCell=f,this};t.table=function(f,u,g,y,x){if(r.call(this),!g)throw new Error("No data for PDF table.");var p,F,P,D,N=[],H=[],q=[],M={},rt={},mt=[],ct=[],Y=(x=x||{}).autoSize||!1,j=x.printHeaders!==!1,tt=x.css&&x.css["font-size"]!==void 0?16*x.css["font-size"]:x.fontSize||12,S=x.margins||Object.assign({width:this.getPageWidth()},n),O=typeof x.padding=="number"?x.padding:3,W=x.headerBackgroundColor||"#c8c8c8",U=x.headerTextColor||"#000";if(i.call(this),this.internal.__cell__.printHeaders=j,this.internal.__cell__.margins=S,this.internal.__cell__.table_font_size=tt,this.internal.__cell__.padding=O,this.internal.__cell__.headerBackgroundColor=W,this.internal.__cell__.headerTextColor=U,this.setFontSize(tt),y==null)H=N=Object.keys(g[0]),q=N.map(function(){return"left"});else if(Array.isArray(y)&&Le(y[0])==="object")for(N=y.map(function(At){return At.name}),H=y.map(function(At){return At.prompt||At.name||""}),q=y.map(function(At){return At.align||"left"}),p=0;p<y.length;p+=1)rt[y[p].name]=.7499990551181103*y[p].width;else Array.isArray(y)&&typeof y[0]=="string"&&(H=N=y,q=N.map(function(){return"left"}));if(Y||Array.isArray(y)&&typeof y[0]=="string")for(p=0;p<N.length;p+=1){for(M[D=N[p]]=g.map(function(At){return At[D]}),this.setFont(void 0,"bold"),mt.push(this.getTextDimensions(H[p],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w),F=M[D],this.setFont(void 0,"normal"),P=0;P<F.length;P+=1)mt.push(this.getTextDimensions(F[P],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w);rt[D]=Math.max.apply(null,mt)+O+O,mt=[]}if(j){var it={};for(p=0;p<N.length;p+=1)it[N[p]]={},it[N[p]].text=H[p],it[N[p]].align=q[p];var st=l.call(this,it,rt);ct=N.map(function(At){return new a(f,u,rt[At],st,it[At].text,void 0,it[At].align)}),this.setTableHeaderRow(ct),this.printHeaderRow(1,!1)}var ht=y.reduce(function(At,wt){return At[wt.name]=wt.align,At},{});for(p=0;p<g.length;p+=1){"rowStart"in x&&x.rowStart instanceof Function&&x.rowStart({row:p,data:g[p]},this);var nt=l.call(this,g[p],rt);for(P=0;P<N.length;P+=1){var ut=g[p][N[P]];"cellStart"in x&&x.cellStart instanceof Function&&x.cellStart({row:p,col:P,data:ut},this),h.call(this,new a(f,u,rt[N[P]],nt,ut,p+2,ht[N[P]]))}}return this.internal.__cell__.table_x=f,this.internal.__cell__.table_y=u,this};var l=function(f,u){var g=this.internal.__cell__.padding,y=this.internal.__cell__.table_font_size,x=this.internal.scaleFactor;return Object.keys(f).map(function(p){var F=f[p];return this.splitTextToSize(F.hasOwnProperty("text")?F.text:F,u[p]-g-g)},this).map(function(p){return this.getLineHeightFactor()*p.length*y/x+g+g},this).reduce(function(p,F){return Math.max(p,F)},0)};t.setTableHeaderRow=function(f){r.call(this),this.internal.__cell__.tableHeaderRow=f},t.printHeaderRow=function(f,u){if(r.call(this),!this.internal.__cell__.tableHeaderRow)throw new Error("Property tableHeaderRow does not exist.");var g;if(e=!0,typeof this.internal.__cell__.headerFunction=="function"){var y=this.internal.__cell__.headerFunction(this,this.internal.__cell__.pages);this.internal.__cell__.lastCell=new a(y[0],y[1],y[2],y[3],void 0,-1)}this.setFont(void 0,"bold");for(var x=[],p=0;p<this.internal.__cell__.tableHeaderRow.length;p+=1){g=this.internal.__cell__.tableHeaderRow[p].clone(),u&&(g.y=this.internal.__cell__.margins.top||0,x.push(g)),g.lineNumber=f;var F=this.getTextColor();this.setTextColor(this.internal.__cell__.headerTextColor),this.setFillColor(this.internal.__cell__.headerBackgroundColor),h.call(this,g),this.setTextColor(F)}x.length>0&&this.setTableHeaderRow(x),this.setFont(void 0,"normal"),e=!1}})(Rt.API);var Qu={italic:["italic","oblique","normal"],oblique:["oblique","italic","normal"],normal:["normal","oblique","italic"]},t1=["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded"],Fh=Ju(t1),e1=[100,200,300,400,500,600,700,800,900],yd=Ju(e1);function Ah(t){var n=t.family.replace(/"|'/g,"").toLowerCase(),e=(function(a){return Qu[a=a||"normal"]?a:"normal"})(t.style),r=(function(a){return a?typeof a=="number"?a>=100&&a<=900&&a%100==0?a:400:/^\d00$/.test(a)?parseInt(a):a==="bold"?700:400:400})(t.weight),i=(function(a){return typeof Fh[a=a||"normal"]=="number"?a:"normal"})(t.stretch);return{family:n,style:e,weight:r,stretch:i,src:t.src||[],ref:t.ref||{name:n,style:[i,e,r].join(" ")}}}function Pu(t,n,e,r){var i;for(i=e;i>=0&&i<n.length;i+=r)if(t[n[i]])return t[n[i]];for(i=e;i>=0&&i<n.length;i-=r)if(t[n[i]])return t[n[i]]}var _d={"sans-serif":"helvetica",fixed:"courier",monospace:"courier",terminal:"courier",cursive:"times",fantasy:"times",serif:"times"},Iu={caption:"times",icon:"times",menu:"times","message-box":"times","small-caption":"times","status-bar":"times"};function Fu(t){return[t.stretch,t.style,t.weight,t.family].join(" ")}function Eu(t){return t.trimLeft()}function xd(t,n){for(var e=0;e<t.length;){if(t.charAt(e)===n)return[t.substring(0,e),t.substring(e+1)];e+=1}return null}function Ad(t){var n=t.match(/^(-[a-z_]|[a-z_])[a-z0-9_-]*/i);return n===null?null:[n[0],t.substring(n[0].length)]}var Rs,Cu,Ou,_a,Ms,Tu,Du,Ru,Nh=["times"];function Mu(t,n,e,r,i){var a=4,h=Bu;switch(i){case Rt.API.image_compression.FAST:a=1,h=ju;break;case Rt.API.image_compression.MEDIUM:a=6,h=zu;break;case Rt.API.image_compression.SLOW:a=9,h=Uu}t=(function(f,u,g,y){for(var x,p=f.length/u,F=new Uint8Array(f.length+p),P=[Nd,ju,Bu,zu,Uu],D=0;D<p;D+=1){var N=D*u,H=f.subarray(N,N+u);if(y)F.set(y(H,g,x),N+D);else{for(var q=P.length,M=[],rt=0;rt<q;rt+=1)M[rt]=P[rt](H,g,x);var mt=Sd(M.concat());F.set(M[mt],N+D)}x=H}return F})(t,n,Math.ceil(e*r/8),h);var l=ds(t,{level:a});return Rt.API.__addimage__.arrayBufferToBinaryString(l)}function Nd(t){var n=Array.apply([],t);return n.unshift(0),n}function ju(t,n){var e=t.length,r=[];r[0]=1;for(var i=0;i<e;i+=1){var a=t[i-n]||0;r[i+1]=t[i]-a+256&255}return r}function Bu(t,n,e){var r=t.length,i=[];i[0]=2;for(var a=0;a<r;a+=1){var h=e&&e[a]||0;i[a+1]=t[a]-h+256&255}return i}function zu(t,n,e){var r=t.length,i=[];i[0]=3;for(var a=0;a<r;a+=1){var h=t[a-n]||0,l=e&&e[a]||0;i[a+1]=t[a]+256-(h+l>>>1)&255}return i}function Uu(t,n,e){var r=t.length,i=[];i[0]=4;for(var a=0;a<r;a+=1){var h=Ld(t[a-n]||0,e&&e[a]||0,e&&e[a-n]||0);i[a+1]=t[a]-h+256&255}return i}function Ld(t,n,e){if(t===n&&n===e)return t;var r=Math.abs(n-e),i=Math.abs(t-e),a=Math.abs(t+n-e-e);return r<=i&&r<=a?t:i<=a?n:e}function Sd(t){var n=t.map(function(e){return e.reduce(function(r,i){return r+Math.abs(i)},0)});return n.indexOf(Math.min.apply(null,n))}function Lh(t,n,e){var r=n*e,i=Math.floor(r/8),a=16-(r-8*i+e),h=(1<<e)-1;return n1(t,i)>>a&h}function qu(t,n,e,r){var i=e*r,a=Math.floor(i/8),h=16-(i-8*a+r),l=(1<<r)-1,f=(n&l)<<h;(function(u,g,y){if(g+1<u.byteLength)u.setUint16(g,y,!1);else{var x=y>>8&255;u.setUint8(g,x)}})(t,a,n1(t,a)&~(l<<h)&65535|f)}function n1(t,n){return n+1<t.byteLength?t.getUint16(n,!1):t.getUint8(n)<<8}function kd(t){var n=0;if(t[n++]!==71||t[n++]!==73||t[n++]!==70||t[n++]!==56||(t[n++]+1&253)!=56||t[n++]!==97)throw new Error("Invalid GIF 87a/89a header.");var e=t[n++]|t[n++]<<8,r=t[n++]|t[n++]<<8,i=t[n++],a=i>>7,h=1<<1+(7&i);t[n++],t[n++];var l=null,f=null;a&&(l=n,f=h,n+=3*h);var u=!0,g=[],y=0,x=null,p=0,F=null;for(this.width=e,this.height=r;u&&n<t.length;)switch(t[n++]){case 33:switch(t[n++]){case 255:if(t[n]!==11||t[n+1]==78&&t[n+2]==69&&t[n+3]==84&&t[n+4]==83&&t[n+5]==67&&t[n+6]==65&&t[n+7]==80&&t[n+8]==69&&t[n+9]==50&&t[n+10]==46&&t[n+11]==48&&t[n+12]==3&&t[n+13]==1&&t[n+16]==0)n+=14,F=t[n++]|t[n++]<<8,n++;else for(n+=12;;){if(!((S=t[n++])>=0))throw Error("Invalid block size");if(S===0)break;n+=S}break;case 249:if(t[n++]!==4||t[n+4]!==0)throw new Error("Invalid graphics extension block.");var P=t[n++];y=t[n++]|t[n++]<<8,x=t[n++],1&P||(x=null),p=P>>2&7,n++;break;case 254:for(;;){if(!((S=t[n++])>=0))throw Error("Invalid block size");if(S===0)break;n+=S}break;default:throw new Error("Unknown graphic control label: 0x"+t[n-1].toString(16))}break;case 44:var D=t[n++]|t[n++]<<8,N=t[n++]|t[n++]<<8,H=t[n++]|t[n++]<<8,q=t[n++]|t[n++]<<8,M=t[n++],rt=M>>6&1,mt=1<<1+(7&M),ct=l,Y=f,j=!1;M>>7&&(j=!0,ct=n,Y=mt,n+=3*mt);var tt=n;for(n++;;){var S;if(!((S=t[n++])>=0))throw Error("Invalid block size");if(S===0)break;n+=S}g.push({x:D,y:N,width:H,height:q,has_local_palette:j,palette_offset:ct,palette_size:Y,data_offset:tt,data_length:n-tt,transparent_index:x,interlaced:!!rt,delay:y,disposal:p});break;case 59:u=!1;break;default:throw new Error("Unknown gif block: 0x"+t[n-1].toString(16))}this.numFrames=function(){return g.length},this.loopCount=function(){return F},this.frameInfo=function(O){if(O<0||O>=g.length)throw new Error("Frame index out of range.");return g[O]},this.decodeAndBlitFrameBGRA=function(O,W){var U=this.frameInfo(O),it=U.width*U.height,st=new Uint8Array(it);Hu(t,U.data_offset,st,it);var ht=U.palette_offset,nt=U.transparent_index;nt===null&&(nt=256);var ut=U.width,At=e-ut,wt=ut,A=4*(U.y*e+U.x),R=4*((U.y+U.height)*e+U.x),B=A,G=4*At;U.interlaced===!0&&(G+=4*e*7);for(var $=8,J=0,at=st.length;J<at;++J){var ot=st[J];if(wt===0&&(wt=ut,(B+=G)>=R&&(G=4*At+4*e*($-1),B=A+(ut+At)*($<<1),$>>=1)),ot===nt)B+=4;else{var gt=t[ht+3*ot],xt=t[ht+3*ot+1],kt=t[ht+3*ot+2];W[B++]=kt,W[B++]=xt,W[B++]=gt,W[B++]=255}--wt}},this.decodeAndBlitFrameRGBA=function(O,W){var U=this.frameInfo(O),it=U.width*U.height,st=new Uint8Array(it);Hu(t,U.data_offset,st,it);var ht=U.palette_offset,nt=U.transparent_index;nt===null&&(nt=256);var ut=U.width,At=e-ut,wt=ut,A=4*(U.y*e+U.x),R=4*((U.y+U.height)*e+U.x),B=A,G=4*At;U.interlaced===!0&&(G+=4*e*7);for(var $=8,J=0,at=st.length;J<at;++J){var ot=st[J];if(wt===0&&(wt=ut,(B+=G)>=R&&(G=4*At+4*e*($-1),B=A+(ut+At)*($<<1),$>>=1)),ot===nt)B+=4;else{var gt=t[ht+3*ot],xt=t[ht+3*ot+1],kt=t[ht+3*ot+2];W[B++]=gt,W[B++]=xt,W[B++]=kt,W[B++]=255}--wt}}}function Hu(t,n,e,r){for(var i=t[n++],a=1<<i,h=a+1,l=h+1,f=i+1,u=(1<<f)-1,g=0,y=0,x=0,p=t[n++],F=new Int32Array(4096),P=null;;){for(;g<16&&p!==0;)y|=t[n++]<<g,g+=8,p===1?p=t[n++]:--p;if(g<f)break;var D=y&u;if(y>>=f,g-=f,D!==a){if(D===h)break;for(var N=D<l?D:P,H=0,q=N;q>a;)q=F[q]>>8,++H;var M=q;if(x+H+(N!==D?1:0)>r)return void Pe.log("Warning, gif stream longer than expected.");e[x++]=M;var rt=x+=H;for(N!==D&&(e[x++]=M),q=N;H--;)q=F[q],e[--rt]=255&q,q>>=8;P!==null&&l<4096&&(F[l++]=P<<8|M,l>=u+1&&f<12&&(++f,u=u<<1|1)),P=D}else l=h+1,u=(1<<(f=i+1))-1,P=null}return x!==r&&Pe.log("Warning, gif stream shorter than expected."),e}function Sh(t){var n,e,r,i,a,h=Math.floor,l=new Array(64),f=new Array(64),u=new Array(64),g=new Array(64),y=new Array(65535),x=new Array(65535),p=new Array(64),F=new Array(64),P=[],D=0,N=7,H=new Array(64),q=new Array(64),M=new Array(64),rt=new Array(256),mt=new Array(2048),ct=[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],Y=[0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0],j=[0,1,2,3,4,5,6,7,8,9,10,11],tt=[0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,125],S=[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],O=[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],U=[0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,119],it=[0,1,2,3,17,4,5,33,49,6,18,65,81,7,97,113,19,34,50,129,8,20,66,145,161,177,193,9,35,51,82,240,21,98,114,209,10,22,36,52,225,37,241,23,24,25,26,38,39,40,41,42,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,130,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,226,227,228,229,230,231,232,233,234,242,243,244,245,246,247,248,249,250];function st(A,R){for(var B=0,G=0,$=new Array,J=1;J<=16;J++){for(var at=1;at<=A[J];at++)$[R[G]]=[],$[R[G]][0]=B,$[R[G]][1]=J,G++,B++;B*=2}return $}function ht(A){for(var R=A[0],B=A[1]-1;B>=0;)R&1<<B&&(D|=1<<N),B--,--N<0&&(D==255?(nt(255),nt(0)):nt(D),N=7,D=0)}function nt(A){P.push(A)}function ut(A){nt(A>>8&255),nt(255&A)}function At(A,R,B,G,$){for(var J,at=$[0],ot=$[240],gt=(function(yt,Wt){var It,qt,zt,ye,he,Jt,ce,fe,Tt,ee,jt=0;for(Tt=0;Tt<8;++Tt){It=yt[jt],qt=yt[jt+1],zt=yt[jt+2],ye=yt[jt+3],he=yt[jt+4],Jt=yt[jt+5],ce=yt[jt+6];var Ue=It+(fe=yt[jt+7]),pe=It-fe,oe=qt+ce,se=qt-ce,Oe=zt+Jt,Ut=zt-Jt,Ie=ye+he,Zt=ye-he,Qt=Ue+Ie,Te=Ue-Ie,le=oe+Oe,Gt=oe-Oe;yt[jt]=Qt+le,yt[jt+4]=Qt-le;var _e=.707106781*(Gt+Te);yt[jt+2]=Te+_e,yt[jt+6]=Te-_e;var yi=.382683433*((Qt=Zt+Ut)-(Gt=se+pe)),gn=.5411961*Qt+yi,Ir=1.306562965*Gt+yi,ur=.707106781*(le=Ut+se),Vt=pe+ur,Fr=pe-ur;yt[jt+5]=Fr+gn,yt[jt+3]=Fr-gn,yt[jt+1]=Vt+Ir,yt[jt+7]=Vt-Ir,jt+=8}for(jt=0,Tt=0;Tt<8;++Tt){It=yt[jt],qt=yt[jt+8],zt=yt[jt+16],ye=yt[jt+24],he=yt[jt+32],Jt=yt[jt+40],ce=yt[jt+48];var Er=It+(fe=yt[jt+56]),qn=It-fe,Hn=qt+ce,Me=qt-ce,an=zt+Jt,ln=zt-Jt,_i=ye+he,Xr=ye-he,tr=Er+_i,dr=Er-_i,er=Hn+an,nr=Hn-an;yt[jt]=tr+er,yt[jt+32]=tr-er;var Wn=.707106781*(nr+dr);yt[jt+16]=dr+Wn,yt[jt+48]=dr-Wn;var xi=.382683433*((tr=Xr+ln)-(nr=Me+qn)),pr=.5411961*tr+xi,Ai=1.306562965*nr+xi,Xi=.707106781*(er=ln+Me),Ji=qn+Xi,Qi=qn-Xi;yt[jt+40]=Qi+pr,yt[jt+24]=Qi-pr,yt[jt+8]=Ji+Ai,yt[jt+56]=Ji-Ai,jt++}for(Tt=0;Tt<64;++Tt)ee=yt[Tt]*Wt[Tt],p[Tt]=ee>0?ee+.5|0:ee-.5|0;return p})(A,R),xt=0;xt<64;++xt)F[ct[xt]]=gt[xt];var kt=F[0]-B;B=F[0],kt==0?ht(G[0]):(ht(G[x[J=32767+kt]]),ht(y[J]));for(var St=63;St>0&&F[St]==0;)St--;if(St==0)return ht(at),B;for(var Bt,I=1;I<=St;){for(var Lt=I;F[I]==0&&I<=St;)++I;var ae=I-Lt;if(ae>=16){Bt=ae>>4;for(var Ht=1;Ht<=Bt;++Ht)ht(ot);ae&=15}J=32767+F[I],ht($[(ae<<4)+x[J]]),ht(y[J]),I++}return St!=63&&ht(at),B}function wt(A){A=Math.min(Math.max(A,1),100),a!=A&&((function(R){for(var B=[16,11,10,16,24,40,51,61,12,12,14,19,26,58,60,55,14,13,16,24,40,57,69,56,14,17,22,29,51,87,80,62,18,22,37,56,68,109,103,77,24,35,55,64,81,104,113,92,49,64,78,87,103,121,120,101,72,92,95,98,112,100,103,99],G=0;G<64;G++){var $=h((B[G]*R+50)/100);$=Math.min(Math.max($,1),255),l[ct[G]]=$}for(var J=[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],at=0;at<64;at++){var ot=h((J[at]*R+50)/100);ot=Math.min(Math.max(ot,1),255),f[ct[at]]=ot}for(var gt=[1,1.387039845,1.306562965,1.175875602,1,.785694958,.5411961,.275899379],xt=0,kt=0;kt<8;kt++)for(var St=0;St<8;St++)u[xt]=1/(l[ct[xt]]*gt[kt]*gt[St]*8),g[xt]=1/(f[ct[xt]]*gt[kt]*gt[St]*8),xt++})(A<50?Math.floor(5e3/A):Math.floor(200-2*A)),a=A)}this.encode=function(A,R){R&&wt(R),P=new Array,D=0,N=7,ut(65496),ut(65504),ut(16),nt(74),nt(70),nt(73),nt(70),nt(0),nt(1),nt(1),nt(0),ut(1),ut(1),nt(0),nt(0),(function(){ut(65499),ut(132),nt(0);for(var qt=0;qt<64;qt++)nt(l[qt]);nt(1);for(var zt=0;zt<64;zt++)nt(f[zt])})(),(function(qt,zt){ut(65472),ut(17),nt(8),ut(zt),ut(qt),nt(3),nt(1),nt(17),nt(0),nt(2),nt(17),nt(1),nt(3),nt(17),nt(1)})(A.width,A.height),(function(){ut(65476),ut(418),nt(0);for(var qt=0;qt<16;qt++)nt(Y[qt+1]);for(var zt=0;zt<=11;zt++)nt(j[zt]);nt(16);for(var ye=0;ye<16;ye++)nt(tt[ye+1]);for(var he=0;he<=161;he++)nt(S[he]);nt(1);for(var Jt=0;Jt<16;Jt++)nt(O[Jt+1]);for(var ce=0;ce<=11;ce++)nt(W[ce]);nt(17);for(var fe=0;fe<16;fe++)nt(U[fe+1]);for(var Tt=0;Tt<=161;Tt++)nt(it[Tt])})(),ut(65498),ut(12),nt(3),nt(1),nt(0),nt(2),nt(17),nt(3),nt(17),nt(0),nt(63),nt(0);var B=0,G=0,$=0;D=0,N=7,this.encode.displayName="_encode_";for(var J,at,ot,gt,xt,kt,St,Bt,I,Lt=A.data,ae=A.width,Ht=A.height,yt=4*ae,Wt=0;Wt<Ht;){for(J=0;J<yt;){for(xt=yt*Wt+J,St=-1,Bt=0,I=0;I<64;I++)kt=xt+(Bt=I>>3)*yt+(St=4*(7&I)),Wt+Bt>=Ht&&(kt-=yt*(Wt+1+Bt-Ht)),J+St>=yt&&(kt-=J+St-yt+4),at=Lt[kt++],ot=Lt[kt++],gt=Lt[kt++],H[I]=(mt[at]+mt[ot+256|0]+mt[gt+512|0]>>16)-128,q[I]=(mt[at+768|0]+mt[ot+1024|0]+mt[gt+1280|0]>>16)-128,M[I]=(mt[at+1280|0]+mt[ot+1536|0]+mt[gt+1792|0]>>16)-128;B=At(H,u,B,n,r),G=At(q,g,G,e,i),$=At(M,g,$,e,i),J+=32}Wt+=8}if(N>=0){var It=[];It[1]=N+1,It[0]=(1<<N+1)-1,ht(It)}return ut(65497),new Uint8Array(P)},t=t||50,(function(){for(var A=String.fromCharCode,R=0;R<256;R++)rt[R]=A(R)})(),n=st(Y,j),e=st(O,W),r=st(tt,S),i=st(U,it),(function(){for(var A=1,R=2,B=1;B<=15;B++){for(var G=A;G<R;G++)x[32767+G]=B,y[32767+G]=[],y[32767+G][1]=B,y[32767+G][0]=G;for(var $=-(R-1);$<=-A;$++)x[32767+$]=B,y[32767+$]=[],y[32767+$][1]=B,y[32767+$][0]=R-1+$;A<<=1,R<<=1}})(),(function(){for(var A=0;A<256;A++)mt[A]=19595*A,mt[A+256|0]=38470*A,mt[A+512|0]=7471*A+32768,mt[A+768|0]=-11059*A,mt[A+1024|0]=-21709*A,mt[A+1280|0]=32768*A+8421375,mt[A+1536|0]=-27439*A,mt[A+1792|0]=-5329*A})(),wt(t)}function hr(t,n){if(this.pos=0,this.buffer=t,this.datav=new DataView(t.buffer),this.is_with_alpha=!!n,this.bottom_up=!0,this.flag=String.fromCharCode(this.buffer[0])+String.fromCharCode(this.buffer[1]),this.pos+=2,["BM","BA","CI","CP","IC","PT"].indexOf(this.flag)===-1)throw new Error("Invalid BMP File");this.parseHeader(),this.parseBGR()}function Wu(t){function n(j){if(!j)throw Error("assert :P")}function e(j,tt,S){for(var O=0;4>O;O++)if(j[tt+O]!=S.charCodeAt(O))return!0;return!1}function r(j,tt,S,O,W){for(var U=0;U<W;U++)j[tt+U]=S[O+U]}function i(j,tt,S,O){for(var W=0;W<O;W++)j[tt+W]=S}function a(j){return new Int32Array(j)}function h(j,tt){for(var S=[],O=0;O<j;O++)S.push(new tt);return S}function l(j,tt){var S=[];return(function O(W,U,it){for(var st=it[U],ht=0;ht<st&&(W.push(it.length>U+1?[]:new tt),!(it.length<U+1));ht++)O(W[ht],U+1,it)})(S,0,j),S}var f=function(){var j=this;function tt(o,s){for(var d=1<<s-1>>>0;o&d;)d>>>=1;return d?(o&d-1)+d:o}function S(o,s,d,m,b){n(!(m%d));do o[s+(m-=d)]=b;while(0<m)}function O(o,s,d,m,b){if(n(2328>=b),512>=b)var w=a(512);else if((w=a(b))==null)return 0;return(function(_,L,k,E,V,et){var C,Z,X=L,lt=1<<k,Q=a(16),ft=a(16);for(n(V!=0),n(E!=null),n(_!=null),n(0<k),Z=0;Z<V;++Z){if(15<E[Z])return 0;++Q[E[Z]]}if(Q[0]==V)return 0;for(ft[1]=0,C=1;15>C;++C){if(Q[C]>1<<C)return 0;ft[C+1]=ft[C]+Q[C]}for(Z=0;Z<V;++Z)C=E[Z],0<E[Z]&&(et[ft[C]++]=Z);if(ft[15]==1)return(E=new W).g=0,E.value=et[0],S(_,X,1,lt,E),lt;var pt,_t=-1,bt=lt-1,Mt=0,Pt=1,re=1,Ct=1<<k;for(Z=0,C=1,V=2;C<=k;++C,V<<=1){if(Pt+=re<<=1,0>(re-=Q[C]))return 0;for(;0<Q[C];--Q[C])(E=new W).g=C,E.value=et[Z++],S(_,X+Mt,V,Ct,E),Mt=tt(Mt,C)}for(C=k+1,V=2;15>=C;++C,V<<=1){if(Pt+=re<<=1,0>(re-=Q[C]))return 0;for(;0<Q[C];--Q[C]){if(E=new W,(Mt&bt)!=_t){for(X+=Ct,pt=1<<(_t=C)-k;15>_t&&!(0>=(pt-=Q[_t]));)++_t,pt<<=1;lt+=Ct=1<<(pt=_t-k),_[L+(_t=Mt&bt)].g=pt+k,_[L+_t].value=X-L-_t}E.g=C-k,E.value=et[Z++],S(_,X+(Mt>>k),V,Ct,E),Mt=tt(Mt,C)}}return Pt!=2*ft[15]-1?0:lt})(o,s,d,m,b,w)}function W(){this.value=this.g=0}function U(){this.value=this.g=0}function it(){this.G=h(5,W),this.H=a(5),this.jc=this.Qb=this.qb=this.nd=0,this.pd=h(Ti,U)}function st(o,s,d,m){n(o!=null),n(s!=null),n(2147483648>m),o.Ca=254,o.I=0,o.b=-8,o.Ka=0,o.oa=s,o.pa=d,o.Jd=s,o.Yc=d+m,o.Zc=4<=m?d+m-4+1:d,at(o)}function ht(o,s){for(var d=0;0<s--;)d|=gt(o,128)<<s;return d}function nt(o,s){var d=ht(o,s);return ot(o)?-d:d}function ut(o,s,d,m){var b,w=0;for(n(o!=null),n(s!=null),n(4294967288>m),o.Sb=m,o.Ra=0,o.u=0,o.h=0,4<m&&(m=4),b=0;b<m;++b)w+=s[d+b]<<8*b;o.Ra=w,o.bb=m,o.oa=s,o.pa=d}function At(o){for(;8<=o.u&&o.bb<o.Sb;)o.Ra>>>=8,o.Ra+=o.oa[o.pa+o.bb]<<ei-8>>>0,++o.bb,o.u-=8;G(o)&&(o.h=1,o.u=0)}function wt(o,s){if(n(0<=s),!o.h&&s<=Cn){var d=B(o)&En[s];return o.u+=s,At(o),d}return o.h=1,o.u=0}function A(){this.b=this.Ca=this.I=0,this.oa=[],this.pa=0,this.Jd=[],this.Yc=0,this.Zc=[],this.Ka=0}function R(){this.Ra=0,this.oa=[],this.h=this.u=this.bb=this.Sb=this.pa=0}function B(o){return o.Ra>>>(o.u&ei-1)>>>0}function G(o){return n(o.bb<=o.Sb),o.h||o.bb==o.Sb&&o.u>ei}function $(o,s){o.u=s,o.h=G(o)}function J(o){o.u>=qr&&(n(o.u>=qr),At(o))}function at(o){n(o!=null&&o.oa!=null),o.pa<o.Zc?(o.I=(o.oa[o.pa++]|o.I<<8)>>>0,o.b+=8):(n(o!=null&&o.oa!=null),o.pa<o.Yc?(o.b+=8,o.I=o.oa[o.pa++]|o.I<<8):o.Ka?o.b=0:(o.I<<=8,o.b+=8,o.Ka=1))}function ot(o){return ht(o,1)}function gt(o,s){var d=o.Ca;0>o.b&&at(o);var m=o.b,b=d*s>>>8,w=(o.I>>>m>b)+0;for(w?(d-=b,o.I-=b+1<<m>>>0):d=b+1,m=d,b=0;256<=m;)b+=8,m>>=8;return m=7^b+ni[m],o.b-=m,o.Ca=(d<<m)-1,w}function xt(o,s,d){o[s+0]=d>>24&255,o[s+1]=d>>16&255,o[s+2]=d>>8&255,o[s+3]=255&d}function kt(o,s){return o[s+0]|o[s+1]<<8}function St(o,s){return kt(o,s)|o[s+2]<<16}function Bt(o,s){return kt(o,s)|kt(o,s+2)<<16}function I(o,s){var d=1<<s;return n(o!=null),n(0<s),o.X=a(d),o.X==null?0:(o.Mb=32-s,o.Xa=s,1)}function Lt(o,s){n(o!=null),n(s!=null),n(o.Xa==s.Xa),r(s.X,0,o.X,0,1<<s.Xa)}function ae(){this.X=[],this.Xa=this.Mb=0}function Ht(o,s,d,m){n(d!=null),n(m!=null);var b=d[0],w=m[0];return b==0&&(b=(o*w+s/2)/s),w==0&&(w=(s*b+o/2)/o),0>=b||0>=w?0:(d[0]=b,m[0]=w,1)}function yt(o,s){return o+(1<<s)-1>>>s}function Wt(o,s){return((4278255360&o)+(4278255360&s)>>>0&4278255360)+((16711935&o)+(16711935&s)>>>0&16711935)>>>0}function It(o,s){j[s]=function(d,m,b,w,_,L,k){var E;for(E=0;E<_;++E){var V=j[o](L[k+E-1],b,w+E);L[k+E]=Wt(d[m+E],V)}}}function qt(){this.ud=this.hd=this.jd=0}function zt(o,s){return((4278124286&(o^s))>>>1)+(o&s)>>>0}function ye(o){return 0<=o&&256>o?o:0>o?0:255<o?255:void 0}function he(o,s){return ye(o+(o-s+.5>>1))}function Jt(o,s,d){return Math.abs(s-d)-Math.abs(o-d)}function ce(o,s,d,m,b,w,_){for(m=w[_-1],d=0;d<b;++d)w[_+d]=m=Wt(o[s+d],m)}function fe(o,s,d,m,b){var w;for(w=0;w<d;++w){var _=o[s+w],L=_>>8&255,k=16711935&(k=(k=16711935&_)+((L<<16)+L));m[b+w]=(4278255360&_)+k>>>0}}function Tt(o,s){s.jd=255&o,s.hd=o>>8&255,s.ud=o>>16&255}function ee(o,s,d,m,b,w){var _;for(_=0;_<m;++_){var L=s[d+_],k=L>>>8,E=L,V=255&(V=(V=L>>>16)+((o.jd<<24>>24)*(k<<24>>24)>>>5));E=255&(E=(E+=(o.hd<<24>>24)*(k<<24>>24)>>>5)+((o.ud<<24>>24)*(V<<24>>24)>>>5)),b[w+_]=(4278255360&L)+(V<<16)+E}}function jt(o,s,d,m,b){j[s]=function(w,_,L,k,E,V,et,C,Z){for(k=et;k<C;++k)for(et=0;et<Z;++et)E[V++]=b(L[m(w[_++])])},j[o]=function(w,_,L,k,E,V,et){var C=8>>w.b,Z=w.Ea,X=w.K[0],lt=w.w;if(8>C)for(w=(1<<w.b)-1,lt=(1<<C)-1;_<L;++_){var Q,ft=0;for(Q=0;Q<Z;++Q)Q&w||(ft=m(k[E++])),V[et++]=b(X[ft<]),ft>>=C}else j["VP8LMapColor"+d](k,E,X,lt,V,et,_,L,Z)}}function Ue(o,s,d,m,b){for(d=s+d;s<d;){var w=o[s++];m[b++]=w>>16&255,m[b++]=w>>8&255,m[b++]=255&w}}function pe(o,s,d,m,b){for(d=s+d;s<d;){var w=o[s++];m[b++]=w>>16&255,m[b++]=w>>8&255,m[b++]=255&w,m[b++]=w>>24&255}}function oe(o,s,d,m,b){for(d=s+d;s<d;){var w=(_=o[s++])>>16&240|_>>12&15,_=240&_|_>>28&15;m[b++]=w,m[b++]=_}}function se(o,s,d,m,b){for(d=s+d;s<d;){var w=(_=o[s++])>>16&248|_>>13&7,_=_>>5&224|_>>3&31;m[b++]=w,m[b++]=_}}function Oe(o,s,d,m,b){for(d=s+d;s<d;){var w=o[s++];m[b++]=255&w,m[b++]=w>>8&255,m[b++]=w>>16&255}}function Ut(o,s,d,m,b,w){if(w==0)for(d=s+d;s<d;)xt(m,((w=o[s++])[0]>>24|w[1]>>8&65280|w[2]<<8&16711680|w[3]<<24)>>>0),b+=32;else r(m,b,o,s,d)}function Ie(o,s){j[s][0]=j[o+"0"],j[s][1]=j[o+"1"],j[s][2]=j[o+"2"],j[s][3]=j[o+"3"],j[s][4]=j[o+"4"],j[s][5]=j[o+"5"],j[s][6]=j[o+"6"],j[s][7]=j[o+"7"],j[s][8]=j[o+"8"],j[s][9]=j[o+"9"],j[s][10]=j[o+"10"],j[s][11]=j[o+"11"],j[s][12]=j[o+"12"],j[s][13]=j[o+"13"],j[s][14]=j[o+"0"],j[s][15]=j[o+"0"]}function Zt(o){return o==ul||o==dl||o==es||o==pl}function Qt(){this.eb=[],this.size=this.A=this.fb=0}function Te(){this.y=[],this.f=[],this.ea=[],this.F=[],this.Tc=this.Ed=this.Cd=this.Fd=this.lb=this.Db=this.Ab=this.fa=this.J=this.W=this.N=this.O=0}function le(){this.Rd=this.height=this.width=this.S=0,this.f={},this.f.RGBA=new Qt,this.f.kb=new Te,this.sd=null}function Gt(){this.width=[0],this.height=[0],this.Pd=[0],this.Qd=[0],this.format=[0]}function _e(){this.Id=this.fd=this.Md=this.hb=this.ib=this.da=this.bd=this.cd=this.j=this.v=this.Da=this.Sd=this.ob=0}function yi(o){return alert("todo:WebPSamplerProcessPlane"),o.T}function gn(o,s){var d=o.T,m=s.ba.f.RGBA,b=m.eb,w=m.fb+o.ka*m.A,_=Kn[s.ba.S],L=o.y,k=o.O,E=o.f,V=o.N,et=o.ea,C=o.W,Z=s.cc,X=s.dc,lt=s.Mc,Q=s.Nc,ft=o.ka,pt=o.ka+o.T,_t=o.U,bt=_t+1>>1;for(ft==0?_(L,k,null,null,E,V,et,C,E,V,et,C,b,w,null,null,_t):(_(s.ec,s.fc,L,k,Z,X,lt,Q,E,V,et,C,b,w-m.A,b,w,_t),++d);ft+2<pt;ft+=2)Z=E,X=V,lt=et,Q=C,V+=o.Rc,C+=o.Rc,w+=2*m.A,_(L,(k+=2*o.fa)-o.fa,L,k,Z,X,lt,Q,E,V,et,C,b,w-m.A,b,w,_t);return k+=o.fa,o.j+pt<o.o?(r(s.ec,s.fc,L,k,_t),r(s.cc,s.dc,E,V,bt),r(s.Mc,s.Nc,et,C,bt),d--):1&pt||_(L,k,null,null,E,V,et,C,E,V,et,C,b,w+m.A,null,null,_t),d}function Ir(o,s,d){var m=o.F,b=[o.J];if(m!=null){var w=o.U,_=s.ba.S,L=_==ts||_==es;s=s.ba.f.RGBA;var k=[0],E=o.ka;k[0]=o.T,o.Kb&&(E==0?--k[0]:(--E,b[0]-=o.width),o.j+o.ka+o.T==o.o&&(k[0]=o.o-o.j-E));var V=s.eb;E=s.fb+E*s.A,o=Wh(m,b[0],o.width,w,k,V,E+(L?0:3),s.A),n(d==k),o&&Zt(_)&&Ja(V,E,L,w,k,s.A)}return 0}function ur(o){var s=o.ma,d=s.ba.S,m=11>d,b=d==Jo||d==Qo||d==ts||d==cl||d==12||Zt(d);if(s.memory=null,s.Ib=null,s.Jb=null,s.Nd=null,!Wa(s.Oa,o,b?11:12))return 0;if(b&&Zt(d)&&Ua(),o.da)alert("todo:use_scaling");else{if(m){if(s.Ib=yi,o.Kb){if(d=o.U+1>>1,s.memory=a(o.U+2*d),s.memory==null)return 0;s.ec=s.memory,s.fc=0,s.cc=s.ec,s.dc=s.fc+o.U,s.Mc=s.cc,s.Nc=s.dc+d,s.Ib=gn,Ua()}}else alert("todo:EmitYUV");b&&(s.Jb=Ir,m&&ir())}if(m&&!lf){for(o=0;256>o;++o)F1[o]=89858*(o-128)+rs>>ns,O1[o]=-22014*(o-128)+rs,C1[o]=-45773*(o-128),E1[o]=113618*(o-128)+rs>>ns;for(o=to;o<vl;++o)s=76283*(o-16)+rs>>ns,T1[o-to]=gr(s,255),D1[o-to]=gr(s+8>>4,15);lf=1}return 1}function Vt(o){var s=o.ma,d=o.U,m=o.T;return n(!(1&o.ka)),0>=d||0>=m?0:(d=s.Ib(o,s),s.Jb!=null&&s.Jb(o,s,d),s.Dc+=d,1)}function Fr(o){o.ma.memory=null}function Er(o,s,d,m){return wt(o,8)!=47?0:(s[0]=wt(o,14)+1,d[0]=wt(o,14)+1,m[0]=wt(o,1),wt(o,3)!=0?0:!o.h)}function qn(o,s){if(4>o)return o+1;var d=o-2>>1;return(2+(1&o)<<d)+wt(s,d)+1}function Hn(o,s){return 120<s?s-120:1<=(d=((d=m1[s-1])>>4)*o+(8-(15&d)))?d:1;var d}function Me(o,s,d){var m=B(d),b=o[s+=255&m].g-8;return 0<b&&($(d,d.u+8),m=B(d),s+=o[s].value,s+=m&(1<<b)-1),$(d,d.u+o[s].g),o[s].value}function an(o,s,d){return d.g+=o.g,d.value+=o.value<<s>>>0,n(8>=d.g),o.g}function ln(o,s,d){var m=o.xc;return n((s=m==0?0:o.vc[o.md*(d>>m)+(s>>m)])<o.Wb),o.Ya[s]}function _i(o,s,d,m){var b=o.ab,w=o.c*s,_=o.C;s=_+s;var L=d,k=m;for(m=o.Ta,d=o.Ua;0<b--;){var E=o.gc[b],V=_,et=s,C=L,Z=k,X=(k=m,L=d,E.Ea);switch(n(V<et),n(et<=E.nc),E.hc){case 2:qe(C,Z,(et-V)*X,k,L);break;case 0:var lt=V,Q=et,ft=k,pt=L,_t=(Ct=E).Ea;lt==0&&(Va(C,Z,null,null,1,ft,pt),ce(C,Z+1,0,0,_t-1,ft,pt+1),Z+=_t,pt+=_t,++lt);for(var bt=1<<Ct.b,Mt=bt-1,Pt=yt(_t,Ct.b),re=Ct.K,Ct=Ct.w+(lt>>Ct.b)*Pt;lt<Q;){var ue=re,en=Ct,ie=1;for(sa(C,Z,ft,pt-_t,1,ft,pt);ie<_t;){var Ot=(ie&~Mt)+bt;Ot>_t&&(Ot=_t),(0,$a[ue[en++]>>8&15])(C,Z+ +ie,ft,pt+ie-_t,Ot-ie,ft,pt+ie),ie=Ot}Z+=_t,pt+=_t,++lt&Mt||(Ct+=Pt)}et!=E.nc&&r(k,L-X,k,L+(et-V-1)*X,X);break;case 1:for(X=C,Q=Z,_t=(C=E.Ea)-(pt=C&~(ft=(Z=1<<E.b)-1)),lt=yt(C,E.b),bt=E.K,E=E.w+(V>>E.b)*lt;V<et;){for(Mt=bt,Pt=E,re=new qt,Ct=Q+pt,ue=Q+C;Q<Ct;)Tt(Mt[Pt++],re),Ya(re,X,Q,Z,k,L),Q+=Z,L+=Z;Q<ue&&(Tt(Mt[Pt++],re),Ya(re,X,Q,_t,k,L),Q+=_t,L+=_t),++V&ft||(E+=lt)}break;case 3:if(C==k&&Z==L&&0<E.b){for(Q=k,C=X=L+(et-V)*X-(pt=(et-V)*yt(E.Ea,E.b)),Z=k,ft=L,lt=[],pt=(_t=pt)-1;0<=pt;--pt)lt[pt]=Z[ft+pt];for(pt=_t-1;0<=pt;--pt)Q[C+pt]=lt[pt];$o(E,V,et,k,X,k,L)}else $o(E,V,et,C,Z,k,L)}L=m,k=d}k!=d&&r(m,d,L,k,w)}function Xr(o,s){var d=o.V,m=o.Ba+o.c*o.C,b=s-o.C;if(n(s<=o.l.o),n(16>=b),0<b){var w=o.l,_=o.Ta,L=o.Ua,k=w.width;if(_i(o,b,d,m),b=L=[L],n((d=o.C)<(m=s)),n(w.v<w.va),m>w.o&&(m=w.o),d<w.j){var E=w.j-d;d=w.j,b[0]+=E*k}if(d>=m?d=0:(b[0]+=4*w.v,w.ka=d-w.j,w.U=w.va-w.v,w.T=m-d,d=1),d){if(L=L[0],11>(d=o.ca).S){var V=d.f.RGBA,et=(m=d.S,b=w.U,w=w.T,E=V.eb,V.A),C=w;for(V=V.fb+o.Ma*V.A;0<C--;){var Z=_,X=L,lt=b,Q=E,ft=V;switch(m){case Xo:Ka(Z,X,lt,Q,ft);break;case Jo:ri(Z,X,lt,Q,ft);break;case ul:ri(Z,X,lt,Q,ft),Ja(Q,ft,0,lt,1,0);break;case Xh:Di(Z,X,lt,Q,ft);break;case Qo:Ut(Z,X,lt,Q,ft,1);break;case dl:Ut(Z,X,lt,Q,ft,1),Ja(Q,ft,0,lt,1,0);break;case ts:Ut(Z,X,lt,Q,ft,0);break;case es:Ut(Z,X,lt,Q,ft,0),Ja(Q,ft,1,lt,1,0);break;case cl:ii(Z,X,lt,Q,ft);break;case pl:ii(Z,X,lt,Q,ft),Hh(Q,ft,lt,1,0);break;case Jh:ai(Z,X,lt,Q,ft);break;default:n(0)}L+=k,V+=et}o.Ma+=w}else alert("todo:EmitRescaledRowsYUVA");n(o.Ma<=d.height)}}o.C=s,n(o.C<=o.i)}function tr(o){var s;if(0<o.ua)return 0;for(s=0;s<o.Wb;++s){var d=o.Ya[s].G,m=o.Ya[s].H;if(0<d[1][m[1]+0].g||0<d[2][m[2]+0].g||0<d[3][m[3]+0].g)return 0}return 1}function dr(o,s,d,m,b,w){if(o.Z!=0){var _=o.qd,L=o.rd;for(n(li[o.Z]!=null);s<d;++s)li[o.Z](_,L,m,b,m,b,w),_=m,L=b,b+=w;o.qd=_,o.rd=L}}function er(o,s){var d=o.l.ma,m=d.Z==0||d.Z==1?o.l.j:o.C;if(m=o.C<m?m:o.C,n(s<=o.l.o),s>m){var b=o.l.width,w=d.ca,_=d.tb+b*m,L=o.V,k=o.Ba+o.c*m,E=o.gc;n(o.ab==1),n(E[0].hc==3),wr(E[0],m,s,L,k,w,_),dr(d,m,s,w,_,b)}o.C=o.Ma=s}function nr(o,s,d,m,b,w,_){var L=o.$/m,k=o.$%m,E=o.m,V=o.s,et=d+o.$,C=et;b=d+m*b;var Z=d+m*w,X=280+V.ua,lt=o.Pb?L:16777216,Q=0<V.ua?V.Wa:null,ft=V.wc,pt=et<Z?ln(V,k,L):null;n(o.C<w),n(Z<=b);var _t=!1;t:for(;;){for(;_t||et<Z;){var bt=0;if(L>=lt){var Mt=et-d;n((lt=o).Pb),lt.wd=lt.m,lt.xd=Mt,0<lt.s.ua&&Lt(lt.s.Wa,lt.s.vb),lt=L+b1}if(k&ft||(pt=ln(V,k,L)),n(pt!=null),pt.Qb&&(s[et]=pt.qb,_t=!0),!_t)if(J(E),pt.jc){bt=E,Mt=s;var Pt=et,re=pt.pd[B(bt)&Ti-1];n(pt.jc),256>re.g?($(bt,bt.u+re.g),Mt[Pt]=re.value,bt=0):($(bt,bt.u+re.g-256),n(256<=re.value),bt=re.value),bt==0&&(_t=!0)}else bt=Me(pt.G[0],pt.H[0],E);if(E.h)break;if(_t||256>bt){if(!_t)if(pt.nd)s[et]=(pt.qb|bt<<8)>>>0;else{if(J(E),_t=Me(pt.G[1],pt.H[1],E),J(E),Mt=Me(pt.G[2],pt.H[2],E),Pt=Me(pt.G[3],pt.H[3],E),E.h)break;s[et]=(Pt<<24|_t<<16|bt<<8|Mt)>>>0}if(_t=!1,++et,++k>=m&&(k=0,++L,_!=null&&L<=w&&!(L%16)&&_(o,L),Q!=null))for(;C<et;)bt=s[C++],Q.X[(506832829*bt&4294967295)>>>Q.Mb]=bt}else if(280>bt){if(bt=qn(bt-256,E),Mt=Me(pt.G[4],pt.H[4],E),J(E),Mt=Hn(m,Mt=qn(Mt,E)),E.h)break;if(et-d<Mt||b-et<bt)break t;for(Pt=0;Pt<bt;++Pt)s[et+Pt]=s[et+Pt-Mt];for(et+=bt,k+=bt;k>=m;)k-=m,++L,_!=null&&L<=w&&!(L%16)&&_(o,L);if(n(et<=b),k&ft&&(pt=ln(V,k,L)),Q!=null)for(;C<et;)bt=s[C++],Q.X[(506832829*bt&4294967295)>>>Q.Mb]=bt}else{if(!(bt<X))break t;for(_t=bt-280,n(Q!=null);C<et;)bt=s[C++],Q.X[(506832829*bt&4294967295)>>>Q.Mb]=bt;bt=et,n(!(_t>>>(Mt=Q).Xa)),s[bt]=Mt.X[_t],_t=!0}_t||n(E.h==G(E))}if(o.Pb&&E.h&&et<b)n(o.m.h),o.a=5,o.m=o.wd,o.$=o.xd,0<o.s.ua&&Lt(o.s.vb,o.s.Wa);else{if(E.h)break t;_?.(o,L>w?w:L),o.a=0,o.$=et-d}return 1}return o.a=3,0}function Wn(o){n(o!=null),o.vc=null,o.yc=null,o.Ya=null;var s=o.Wa;s!=null&&(s.X=null),o.vb=null,n(o!=null)}function xi(){var o=new Yt;return o==null?null:(o.a=0,o.xb=ef,Ie("Predictor","VP8LPredictors"),Ie("Predictor","VP8LPredictors_C"),Ie("PredictorAdd","VP8LPredictorsAdd"),Ie("PredictorAdd","VP8LPredictorsAdd_C"),qe=fe,Ya=ee,Ka=Ue,ri=pe,ii=oe,ai=se,Di=Oe,j.VP8LMapColor32b=br,j.VP8LMapColor8b=Za,o)}function pr(o,s,d,m,b){var w=1,_=[o],L=[s],k=m.m,E=m.s,V=null,et=0;t:for(;;){if(d)for(;w&&wt(k,1);){var C=_,Z=L,X=m,lt=1,Q=X.m,ft=X.gc[X.ab],pt=wt(Q,2);if(X.Oc&1<<pt)w=0;else{switch(X.Oc|=1<<pt,ft.hc=pt,ft.Ea=C[0],ft.nc=Z[0],ft.K=[null],++X.ab,n(4>=X.ab),pt){case 0:case 1:ft.b=wt(Q,3)+2,lt=pr(yt(ft.Ea,ft.b),yt(ft.nc,ft.b),0,X,ft.K),ft.K=ft.K[0];break;case 3:var _t,bt=wt(Q,8)+1,Mt=16<bt?0:4<bt?1:2<bt?2:3;if(C[0]=yt(ft.Ea,Mt),ft.b=Mt,_t=lt=pr(bt,1,0,X,ft.K)){var Pt,re=bt,Ct=ft,ue=1<<(8>>Ct.b),en=a(ue);if(en==null)_t=0;else{var ie=Ct.K[0],Ot=Ct.w;for(en[0]=Ct.K[0][0],Pt=1;Pt<1*re;++Pt)en[Pt]=Wt(ie[Ot+Pt],en[Pt-1]);for(;Pt<4*ue;++Pt)en[Pt]=0;Ct.K[0]=null,Ct.K[0]=en,_t=1}}lt=_t;break;case 2:break;default:n(0)}w=lt}}if(_=_[0],L=L[0],w&&wt(k,1)&&!(w=1<=(et=wt(k,4))&&11>=et)){m.a=3;break t}var Nt;if(Nt=w)e:{var We,te,de,Ce=m,cn=_,xn=L,je=et,mn=d,An=Ce.m,nn=Ce.s,me=[null],Ae=1,Be=0,Ne=v1[je];n:for(;;){if(mn&&wt(An,1)){var un=wt(An,3)+2,or=yt(cn,un),Ge=yt(xn,un),kn=or*Ge;if(!pr(or,Ge,0,Ce,me))break n;for(me=me[0],nn.xc=un,We=0;We<kn;++We){var ke=me[We]>>8&65535;me[We]=ke,ke>=Ae&&(Ae=ke+1)}}if(An.h)break n;for(te=0;5>te;++te){var rn=Qh[te];!te&&0<je&&(rn+=1<<je),Be<rn&&(Be=rn)}var Tn=h(Ae*Ne,W),Nn=Ae,Dn=h(Nn,it);if(Dn==null)var Rn=null;else n(65536>=Nn),Rn=Dn;var Pn=a(Be);if(Rn==null||Pn==null||Tn==null){Ce.a=1;break n}var Mn=Tn;for(We=de=0;We<Ae;++We){var Ee=Rn[We],jn=Ee.G,sr=Ee.H,Mi=0,Gr=1,dn=0;for(te=0;5>te;++te){rn=Qh[te],jn[te]=Mn,sr[te]=de,!te&&0<je&&(rn+=1<<je);i:{var as,bl=rn,os=Ce,eo=Pn,j1=Mn,B1=de,wl=0,hi=os.m,z1=wt(hi,1);if(i(eo,0,0,bl),z1){var U1=wt(hi,1)+1,q1=wt(hi,1),cf=wt(hi,q1==0?1:8);eo[cf]=1,U1==2&&(eo[cf=wt(hi,8)]=1);var ss=1}else{var uf=a(19),df=wt(hi,4)+4;if(19<df){os.a=3;var ls=0;break i}for(as=0;as<df;++as)uf[g1[as]]=wt(hi,3);var yl=void 0,no=void 0,pf=os,H1=uf,hs=bl,gf=eo,_l=0,fi=pf.m,mf=8,vf=h(128,W);r:for(;O(vf,0,7,H1,19);){if(wt(fi,1)){var W1=2+2*wt(fi,3);if((yl=2+wt(fi,W1))>hs)break r}else yl=hs;for(no=0;no<hs&&yl--;){J(fi);var bf=vf[0+(127&B(fi))];$(fi,fi.u+bf.g);var ha=bf.value;if(16>ha)gf[no++]=ha,ha!=0&&(mf=ha);else{var G1=ha==16,wf=ha-16,V1=d1[wf],yf=wt(fi,u1[wf])+V1;if(no+yf>hs)break r;for(var Z1=G1?mf:0;0<yf--;)gf[no++]=Z1}}_l=1;break r}_l||(pf.a=3),ss=_l}(ss=ss&&!hi.h)&&(wl=O(j1,B1,8,eo,bl)),ss&&wl!=0?ls=wl:(os.a=3,ls=0)}if(ls==0)break n;if(Gr&&p1[te]==1&&(Gr=Mn[de].g==0),Mi+=Mn[de].g,de+=ls,3>=te){var ro,xl=Pn[0];for(ro=1;ro<rn;++ro)Pn[ro]>xl&&(xl=Pn[ro]);dn+=xl}}if(Ee.nd=Gr,Ee.Qb=0,Gr&&(Ee.qb=(jn[3][sr[3]+0].value<<24|jn[1][sr[1]+0].value<<16|jn[2][sr[2]+0].value)>>>0,Mi==0&&256>jn[0][sr[0]+0].value&&(Ee.Qb=1,Ee.qb+=jn[0][sr[0]+0].value<<8)),Ee.jc=!Ee.Qb&&6>dn,Ee.jc){var fs,Vr=Ee;for(fs=0;fs<Ti;++fs){var ci=fs,ui=Vr.pd[ci],cs=Vr.G[0][Vr.H[0]+ci];256<=cs.value?(ui.g=cs.g+256,ui.value=cs.value):(ui.g=0,ui.value=0,ci>>=an(cs,8,ui),ci>>=an(Vr.G[1][Vr.H[1]+ci],16,ui),ci>>=an(Vr.G[2][Vr.H[2]+ci],0,ui),an(Vr.G[3][Vr.H[3]+ci],24,ui))}}}nn.vc=me,nn.Wb=Ae,nn.Ya=Rn,nn.yc=Tn,Nt=1;break e}Nt=0}if(!(w=Nt)){m.a=3;break t}if(0<et){if(E.ua=1<<et,!I(E.Wa,et)){m.a=1,w=0;break t}}else E.ua=0;var Al=m,_f=_,$1=L,Nl=Al.s,Ll=Nl.xc;if(Al.c=_f,Al.i=$1,Nl.md=yt(_f,Ll),Nl.wc=Ll==0?-1:(1<<Ll)-1,d){m.xb=L1;break t}if((V=a(_*L))==null){m.a=1,w=0;break t}w=(w=nr(m,V,0,_,L,L,null))&&!k.h;break t}return w?(b!=null?b[0]=V:(n(V==null),n(d)),m.$=0,d||Wn(E)):Wn(E),w}function Ai(o,s){var d=o.c*o.i,m=d+s+16*s;return n(o.c<=s),o.V=a(m),o.V==null?(o.Ta=null,o.Ua=0,o.a=1,0):(o.Ta=o.V,o.Ua=o.Ba+d+s,1)}function Xi(o,s){var d=o.C,m=s-d,b=o.V,w=o.Ba+o.c*d;for(n(s<=o.l.o);0<m;){var _=16<m?16:m,L=o.l.ma,k=o.l.width,E=k*_,V=L.ca,et=L.tb+k*d,C=o.Ta,Z=o.Ua;_i(o,_,b,w),Gh(C,Z,V,et,E),dr(L,d,d+_,V,et,k),m-=_,b+=_*o.c,d+=_}n(d==s),o.C=o.Ma=s}function Ji(){this.ub=this.yd=this.td=this.Rb=0}function Qi(){this.Kd=this.Ld=this.Ud=this.Td=this.i=this.c=0}function $s(){this.Fb=this.Bb=this.Cb=0,this.Zb=a(4),this.Lb=a(4)}function Fa(){this.Yb=(function(){var o=[];return(function s(d,m,b){for(var w=b[m],_=0;_<w&&(d.push(b.length>m+1?[]:0),!(b.length<m+1));_++)s(d[_],m+1,b)})(o,0,[3,11]),o})()}function Fo(){this.jb=a(3),this.Wc=l([4,8],Fa),this.Xc=l([4,17],Fa)}function Eo(){this.Pc=this.wb=this.Tb=this.zd=0,this.vd=new a(4),this.od=new a(4)}function Gn(){this.ld=this.La=this.dd=this.tc=0}function Ea(){this.Na=this.la=0}function Co(){this.Sc=[0,0],this.Eb=[0,0],this.Qc=[0,0],this.ia=this.lc=0}function Ca(){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 Oo(){this.uc=this.M=this.Nb=0,this.wa=Array(new Gn),this.Y=0,this.ya=Array(new Ca),this.aa=0,this.l=new ta}function To(){this.y=a(16),this.f=a(8),this.ea=a(8)}function Do(){this.cb=this.a=0,this.sc="",this.m=new A,this.Od=new Ji,this.Kc=new Qi,this.ed=new Eo,this.Qa=new $s,this.Ic=this.$c=this.Aa=0,this.D=new Oo,this.Xb=this.Va=this.Hb=this.zb=this.yb=this.Ub=this.za=0,this.Jc=h(8,A),this.ia=0,this.pb=h(4,Co),this.Pa=new Fo,this.Bd=this.kc=0,this.Ac=[],this.Bc=0,this.zc=[0,0,0,0],this.Gd=Array(new To),this.Hd=0,this.rb=Array(new Ea),this.sb=0,this.wa=Array(new Gn),this.Y=0,this.oc=[],this.pc=0,this.sa=[],this.ta=0,this.qa=[],this.ra=0,this.Ha=[],this.B=this.R=this.Ia=0,this.Ec=[],this.M=this.ja=this.Vb=this.Fc=0,this.ya=Array(new Ca),this.L=this.aa=0,this.gd=l([4,2],Gn),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 gr(o,s){return 0>o?0:o>s?s:o}function ta(){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 Ys(){var o=new Do;return o!=null&&(o.a=0,o.sc="OK",o.cb=0,o.Xb=0,Qa||(Qa=ea)),o}function Ye(o,s,d){return o.a==0&&(o.a=s,o.sc=d,o.cb=0),0}function Ro(o,s,d){return 3<=d&&o[s+0]==157&&o[s+1]==1&&o[s+2]==42}function mr(o,s){if(o==null)return 0;if(o.a=0,o.sc="OK",s==null)return Ye(o,2,"null VP8Io passed to VP8GetHeaders()");var d=s.data,m=s.w,b=s.ha;if(4>b)return Ye(o,7,"Truncated header.");var w=d[m+0]|d[m+1]<<8|d[m+2]<<16,_=o.Od;if(_.Rb=!(1&w),_.td=w>>1&7,_.yd=w>>4&1,_.ub=w>>5,3<_.td)return Ye(o,3,"Incorrect keyframe parameters.");if(!_.yd)return Ye(o,4,"Frame not displayable.");m+=3,b-=3;var L=o.Kc;if(_.Rb){if(7>b)return Ye(o,7,"cannot parse picture header");if(!Ro(d,m,b))return Ye(o,3,"Bad code word");L.c=16383&(d[m+4]<<8|d[m+3]),L.Td=d[m+4]>>6,L.i=16383&(d[m+6]<<8|d[m+5]),L.Ud=d[m+6]>>6,m+=7,b-=7,o.za=L.c+15>>4,o.Ub=L.i+15>>4,s.width=L.c,s.height=L.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,i((w=o.Pa).jb,0,255,w.jb.length),n((w=o.Qa)!=null),w.Cb=0,w.Bb=0,w.Fb=1,i(w.Zb,0,0,w.Zb.length),i(w.Lb,0,0,w.Lb)}if(_.ub>b)return Ye(o,7,"bad partition length");st(w=o.m,d,m,_.ub),m+=_.ub,b-=_.ub,_.Rb&&(L.Ld=ot(w),L.Kd=ot(w)),L=o.Qa;var k,E=o.Pa;if(n(w!=null),n(L!=null),L.Cb=ot(w),L.Cb){if(L.Bb=ot(w),ot(w)){for(L.Fb=ot(w),k=0;4>k;++k)L.Zb[k]=ot(w)?nt(w,7):0;for(k=0;4>k;++k)L.Lb[k]=ot(w)?nt(w,6):0}if(L.Bb)for(k=0;3>k;++k)E.jb[k]=ot(w)?ht(w,8):255}else L.Bb=0;if(w.Ka)return Ye(o,3,"cannot parse segment header");if((L=o.ed).zd=ot(w),L.Tb=ht(w,6),L.wb=ht(w,3),L.Pc=ot(w),L.Pc&&ot(w)){for(E=0;4>E;++E)ot(w)&&(L.vd[E]=nt(w,6));for(E=0;4>E;++E)ot(w)&&(L.od[E]=nt(w,6))}if(o.L=L.Tb==0?0:L.zd?1:2,w.Ka)return Ye(o,3,"cannot parse filter header");var V=b;if(b=k=m,m=k+V,L=V,o.Xb=(1<<ht(o.m,2))-1,V<3*(E=o.Xb))d=7;else{for(k+=3*E,L-=3*E,V=0;V<E;++V){var et=d[b+0]|d[b+1]<<8|d[b+2]<<16;et>L&&(et=L),st(o.Jc[+V],d,k,et),k+=et,L-=et,b+=3}st(o.Jc[+E],d,k,L),d=k<m?0:5}if(d!=0)return Ye(o,d,"cannot parse partitions");for(d=ht(k=o.m,7),b=ot(k)?nt(k,4):0,m=ot(k)?nt(k,4):0,L=ot(k)?nt(k,4):0,E=ot(k)?nt(k,4):0,k=ot(k)?nt(k,4):0,V=o.Qa,et=0;4>et;++et){if(V.Cb){var C=V.Zb[et];V.Fb||(C+=d)}else{if(0<et){o.pb[et]=o.pb[0];continue}C=d}var Z=o.pb[et];Z.Sc[0]=gl[gr(C+b,127)],Z.Sc[1]=ml[gr(C+0,127)],Z.Eb[0]=2*gl[gr(C+m,127)],Z.Eb[1]=101581*ml[gr(C+L,127)]>>16,8>Z.Eb[1]&&(Z.Eb[1]=8),Z.Qc[0]=gl[gr(C+E,117)],Z.Qc[1]=ml[gr(C+k,127)],Z.lc=C+k}if(!_.Rb)return Ye(o,4,"Not a key frame.");for(ot(w),_=o.Pa,d=0;4>d;++d){for(b=0;8>b;++b)for(m=0;3>m;++m)for(L=0;11>L;++L)E=gt(w,A1[d][b][m][L])?ht(w,8):_1[d][b][m][L],_.Wc[d][b].Yb[m][L]=E;for(b=0;17>b;++b)_.Xc[d][b]=_.Wc[d][N1[b]]}return o.kc=ot(w),o.kc&&(o.Bd=ht(w,8)),o.cb=1}function ea(o,s,d,m,b,w,_){var L=s[b].Yb[d];for(d=0;16>b;++b){if(!gt(o,L[d+0]))return b;for(;!gt(o,L[d+1]);)if(L=s[++b].Yb[0],d=0,b==16)return 16;var k=s[b+1].Yb;if(gt(o,L[d+2])){var E=o,V=0;if(gt(E,(C=L)[(et=d)+3]))if(gt(E,C[et+6])){for(L=0,et=2*(V=gt(E,C[et+8]))+(C=gt(E,C[et+9+V])),V=0,C=w1[et];C[L];++L)V+=V+gt(E,C[L]);V+=3+(8<<et)}else gt(E,C[et+7])?(V=7+2*gt(E,165),V+=gt(E,145)):V=5+gt(E,159);else V=gt(E,C[et+4])?3+gt(E,C[et+5]):2;L=k[2]}else V=1,L=k[1];k=_+y1[b],0>(E=o).b&&at(E);var et,C=E.b,Z=(et=E.Ca>>1)-(E.I>>C)>>31;--E.b,E.Ca+=Z,E.Ca|=1,E.I-=(et+1&Z)<<C,w[k]=((V^Z)-Z)*m[(0<b)+0]}return 16}function Mo(o){var s=o.rb[o.sb-1];s.la=0,s.Na=0,i(o.zc,0,0,o.zc.length),o.ja=0}function Vn(o,s,d,m,b){b=o[s+d+32*m]+(b>>3),o[s+d+32*m]=-256&b?0>b?0:255:b}function Je(o,s,d,m,b,w){Vn(o,s,0,d,m+b),Vn(o,s,1,d,m+w),Vn(o,s,2,d,m-w),Vn(o,s,3,d,m-b)}function Cr(o){return(20091*o>>16)+o}function jo(o,s,d,m){var b,w=0,_=a(16);for(b=0;4>b;++b){var L=o[s+0]+o[s+8],k=o[s+0]-o[s+8],E=(35468*o[s+4]>>16)-Cr(o[s+12]),V=Cr(o[s+4])+(35468*o[s+12]>>16);_[w+0]=L+V,_[w+1]=k+E,_[w+2]=k-E,_[w+3]=L-V,w+=4,s++}for(b=w=0;4>b;++b)L=(o=_[w+0]+4)+_[w+8],k=o-_[w+8],E=(35468*_[w+4]>>16)-Cr(_[w+12]),Vn(d,m,0,0,L+(V=Cr(_[w+4])+(35468*_[w+12]>>16))),Vn(d,m,1,0,k+E),Vn(d,m,2,0,k-E),Vn(d,m,3,0,L-V),w++,m+=32}function Ks(o,s,d,m){var b=o[s+0]+4,w=35468*o[s+4]>>16,_=Cr(o[s+4]),L=35468*o[s+1]>>16;Je(d,m,0,b+_,o=Cr(o[s+1]),L),Je(d,m,1,b+w,o,L),Je(d,m,2,b-w,o,L),Je(d,m,3,b-_,o,L)}function Xs(o,s,d,m,b){jo(o,s,d,m),b&&jo(o,s+16,d,m+4)}function vr(o,s,d,m){Ri(o,s+0,d,m,1),Ri(o,s+32,d,m+128,1)}function Bo(o,s,d,m){var b;for(o=o[s+0]+4,b=0;4>b;++b)for(s=0;4>s;++s)Vn(d,m,s,b,o)}function zo(o,s,d,m){o[s+0]&&xe(o,s+0,d,m),o[s+16]&&xe(o,s+16,d,m+4),o[s+32]&&xe(o,s+32,d,m+128),o[s+48]&&xe(o,s+48,d,m+128+4)}function na(o,s,d,m){var b,w=a(16);for(b=0;4>b;++b){var _=o[s+0+b]+o[s+12+b],L=o[s+4+b]+o[s+8+b],k=o[s+4+b]-o[s+8+b],E=o[s+0+b]-o[s+12+b];w[0+b]=_+L,w[8+b]=_-L,w[4+b]=E+k,w[12+b]=E-k}for(b=0;4>b;++b)_=(o=w[0+4*b]+3)+w[3+4*b],L=w[1+4*b]+w[2+4*b],k=w[1+4*b]-w[2+4*b],E=o-w[3+4*b],d[m+0]=_+L>>3,d[m+16]=E+k>>3,d[m+32]=_-L>>3,d[m+48]=E-k>>3,m+=64}function Ni(o,s,d){var m,b=s-32,w=On,_=255-o[b-1];for(m=0;m<d;++m){var L,k=w,E=_+o[s-1];for(L=0;L<d;++L)o[s+L]=k[E+o[b+L]];s+=32}}function Js(o,s){Ni(o,s,4)}function Qs(o,s){Ni(o,s,8)}function tl(o,s){Ni(o,s,16)}function Oa(o,s){var d;for(d=0;16>d;++d)r(o,s+32*d,o,s-32,16)}function Uo(o,s){var d;for(d=16;0<d;--d)i(o,s,o[s-1],16),s+=32}function rr(o,s,d){var m;for(m=0;16>m;++m)i(s,d+32*m,o,16)}function el(o,s){var d,m=16;for(d=0;16>d;++d)m+=o[s-1+32*d]+o[s+d-32];rr(m>>5,o,s)}function Li(o,s){var d,m=8;for(d=0;16>d;++d)m+=o[s-1+32*d];rr(m>>4,o,s)}function Ta(o,s){var d,m=8;for(d=0;16>d;++d)m+=o[s+d-32];rr(m>>4,o,s)}function nl(o,s){rr(128,o,s)}function Kt(o,s,d){return o+2*s+d+2>>2}function rl(o,s){var d,m=s-32;for(m=new Uint8Array([Kt(o[m-1],o[m+0],o[m+1]),Kt(o[m+0],o[m+1],o[m+2]),Kt(o[m+1],o[m+2],o[m+3]),Kt(o[m+2],o[m+3],o[m+4])]),d=0;4>d;++d)r(o,s+32*d,m,0,m.length)}function il(o,s){var d=o[s-1],m=o[s-1+32],b=o[s-1+64],w=o[s-1+96];xt(o,s+0,16843009*Kt(o[s-1-32],d,m)),xt(o,s+32,16843009*Kt(d,m,b)),xt(o,s+64,16843009*Kt(m,b,w)),xt(o,s+96,16843009*Kt(b,w,w))}function al(o,s){var d,m=4;for(d=0;4>d;++d)m+=o[s+d-32]+o[s-1+32*d];for(m>>=3,d=0;4>d;++d)i(o,s+32*d,m,4)}function Or(o,s){var d=o[s-1+0],m=o[s-1+32],b=o[s-1+64],w=o[s-1-32],_=o[s+0-32],L=o[s+1-32],k=o[s+2-32],E=o[s+3-32];o[s+0+96]=Kt(m,b,o[s-1+96]),o[s+1+96]=o[s+0+64]=Kt(d,m,b),o[s+2+96]=o[s+1+64]=o[s+0+32]=Kt(w,d,m),o[s+3+96]=o[s+2+64]=o[s+1+32]=o[s+0+0]=Kt(_,w,d),o[s+3+64]=o[s+2+32]=o[s+1+0]=Kt(L,_,w),o[s+3+32]=o[s+2+0]=Kt(k,L,_),o[s+3+0]=Kt(E,k,L)}function Tr(o,s){var d=o[s+1-32],m=o[s+2-32],b=o[s+3-32],w=o[s+4-32],_=o[s+5-32],L=o[s+6-32],k=o[s+7-32];o[s+0+0]=Kt(o[s+0-32],d,m),o[s+1+0]=o[s+0+32]=Kt(d,m,b),o[s+2+0]=o[s+1+32]=o[s+0+64]=Kt(m,b,w),o[s+3+0]=o[s+2+32]=o[s+1+64]=o[s+0+96]=Kt(b,w,_),o[s+3+32]=o[s+2+64]=o[s+1+96]=Kt(w,_,L),o[s+3+64]=o[s+2+96]=Kt(_,L,k),o[s+3+96]=Kt(L,k,k)}function ol(o,s){var d=o[s-1+0],m=o[s-1+32],b=o[s-1+64],w=o[s-1-32],_=o[s+0-32],L=o[s+1-32],k=o[s+2-32],E=o[s+3-32];o[s+0+0]=o[s+1+64]=w+_+1>>1,o[s+1+0]=o[s+2+64]=_+L+1>>1,o[s+2+0]=o[s+3+64]=L+k+1>>1,o[s+3+0]=k+E+1>>1,o[s+0+96]=Kt(b,m,d),o[s+0+64]=Kt(m,d,w),o[s+0+32]=o[s+1+96]=Kt(d,w,_),o[s+1+32]=o[s+2+96]=Kt(w,_,L),o[s+2+32]=o[s+3+96]=Kt(_,L,k),o[s+3+32]=Kt(L,k,E)}function sl(o,s){var d=o[s+0-32],m=o[s+1-32],b=o[s+2-32],w=o[s+3-32],_=o[s+4-32],L=o[s+5-32],k=o[s+6-32],E=o[s+7-32];o[s+0+0]=d+m+1>>1,o[s+1+0]=o[s+0+64]=m+b+1>>1,o[s+2+0]=o[s+1+64]=b+w+1>>1,o[s+3+0]=o[s+2+64]=w+_+1>>1,o[s+0+32]=Kt(d,m,b),o[s+1+32]=o[s+0+96]=Kt(m,b,w),o[s+2+32]=o[s+1+96]=Kt(b,w,_),o[s+3+32]=o[s+2+96]=Kt(w,_,L),o[s+3+64]=Kt(_,L,k),o[s+3+96]=Kt(L,k,E)}function ra(o,s){var d=o[s-1+0],m=o[s-1+32],b=o[s-1+64],w=o[s-1+96];o[s+0+0]=d+m+1>>1,o[s+2+0]=o[s+0+32]=m+b+1>>1,o[s+2+32]=o[s+0+64]=b+w+1>>1,o[s+1+0]=Kt(d,m,b),o[s+3+0]=o[s+1+32]=Kt(m,b,w),o[s+3+32]=o[s+1+64]=Kt(b,w,w),o[s+3+64]=o[s+2+64]=o[s+0+96]=o[s+1+96]=o[s+2+96]=o[s+3+96]=w}function Da(o,s){var d=o[s-1+0],m=o[s-1+32],b=o[s-1+64],w=o[s-1+96],_=o[s-1-32],L=o[s+0-32],k=o[s+1-32],E=o[s+2-32];o[s+0+0]=o[s+2+32]=d+_+1>>1,o[s+0+32]=o[s+2+64]=m+d+1>>1,o[s+0+64]=o[s+2+96]=b+m+1>>1,o[s+0+96]=w+b+1>>1,o[s+3+0]=Kt(L,k,E),o[s+2+0]=Kt(_,L,k),o[s+1+0]=o[s+3+32]=Kt(d,_,L),o[s+1+32]=o[s+3+64]=Kt(m,d,_),o[s+1+64]=o[s+3+96]=Kt(b,m,d),o[s+1+96]=Kt(w,b,m)}function Si(o,s){var d;for(d=0;8>d;++d)r(o,s+32*d,o,s-32,8)}function ll(o,s){var d;for(d=0;8>d;++d)i(o,s,o[s-1],8),s+=32}function Dr(o,s,d){var m;for(m=0;8>m;++m)i(s,d+32*m,o,8)}function hl(o,s){var d,m=8;for(d=0;8>d;++d)m+=o[s+d-32]+o[s-1+32*d];Dr(m>>4,o,s)}function Ra(o,s){var d,m=4;for(d=0;8>d;++d)m+=o[s+d-32];Dr(m>>3,o,s)}function Ma(o,s){var d,m=4;for(d=0;8>d;++d)m+=o[s-1+32*d];Dr(m>>3,o,s)}function qo(o,s){Dr(128,o,s)}function Rr(o,s,d){var m=o[s-d],b=o[s+0],w=3*(b-m)+fl[1020+o[s-2*d]-o[s+d]],_=Ko[112+(w+4>>3)];o[s-d]=On[255+m+Ko[112+(w+3>>3)]],o[s+0]=On[255+b-_]}function ja(o,s,d,m){var b=o[s+0],w=o[s+d];return Yn[255+o[s-2*d]-o[s-d]]>m||Yn[255+w-b]>m}function ia(o,s,d,m){return 4*Yn[255+o[s-d]-o[s+0]]+Yn[255+o[s-2*d]-o[s+d]]<=m}function Ba(o,s,d,m,b){var w=o[s-3*d],_=o[s-2*d],L=o[s-d],k=o[s+0],E=o[s+d],V=o[s+2*d],et=o[s+3*d];return 4*Yn[255+L-k]+Yn[255+_-E]>m?0:Yn[255+o[s-4*d]-w]<=b&&Yn[255+w-_]<=b&&Yn[255+_-L]<=b&&Yn[255+et-V]<=b&&Yn[255+V-E]<=b&&Yn[255+E-k]<=b}function ki(o,s,d,m){var b=2*m+1;for(m=0;16>m;++m)ia(o,s+m,d,b)&&Rr(o,s+m,d)}function za(o,s,d,m){var b=2*m+1;for(m=0;16>m;++m)ia(o,s+m*d,1,b)&&Rr(o,s+m*d,1)}function Ho(o,s,d,m){var b;for(b=3;0<b;--b)ki(o,s+=4*d,d,m)}function Wo(o,s,d,m){var b;for(b=3;0<b;--b)za(o,s+=4,d,m)}function Mr(o,s,d,m,b,w,_,L){for(w=2*w+1;0<b--;){if(Ba(o,s,d,w,_))if(ja(o,s,d,L))Rr(o,s,d);else{var k=o,E=s,V=d,et=k[E-2*V],C=k[E-V],Z=k[E+0],X=k[E+V],lt=k[E+2*V],Q=27*(pt=fl[1020+3*(Z-C)+fl[1020+et-X]])+63>>7,ft=18*pt+63>>7,pt=9*pt+63>>7;k[E-3*V]=On[255+k[E-3*V]+pt],k[E-2*V]=On[255+et+ft],k[E-V]=On[255+C+Q],k[E+0]=On[255+Z-Q],k[E+V]=On[255+X-ft],k[E+2*V]=On[255+lt-pt]}s+=m}}function jr(o,s,d,m,b,w,_,L){for(w=2*w+1;0<b--;){if(Ba(o,s,d,w,_))if(ja(o,s,d,L))Rr(o,s,d);else{var k=o,E=s,V=d,et=k[E-V],C=k[E+0],Z=k[E+V],X=Ko[112+(4+(lt=3*(C-et))>>3)],lt=Ko[112+(lt+3>>3)],Q=X+1>>1;k[E-2*V]=On[255+k[E-2*V]+Q],k[E-V]=On[255+et+lt],k[E+0]=On[255+C-X],k[E+V]=On[255+Z-Q]}s+=m}}function Go(o,s,d,m,b,w){Mr(o,s,d,1,16,m,b,w)}function Pi(o,s,d,m,b,w){Mr(o,s,1,d,16,m,b,w)}function Vo(o,s,d,m,b,w){var _;for(_=3;0<_;--_)jr(o,s+=4*d,d,1,16,m,b,w)}function c(o,s,d,m,b,w){var _;for(_=3;0<_;--_)jr(o,s+=4,1,d,16,m,b,w)}function v(o,s,d,m,b,w,_,L){Mr(o,s,b,1,8,w,_,L),Mr(d,m,b,1,8,w,_,L)}function T(o,s,d,m,b,w,_,L){Mr(o,s,1,b,8,w,_,L),Mr(d,m,1,b,8,w,_,L)}function z(o,s,d,m,b,w,_,L){jr(o,s+4*b,b,1,8,w,_,L),jr(d,m+4*b,b,1,8,w,_,L)}function K(o,s,d,m,b,w,_,L){jr(o,s+4,1,b,8,w,_,L),jr(d,m+4,1,b,8,w,_,L)}function dt(){this.ba=new le,this.ec=[],this.cc=[],this.Mc=[],this.Dc=this.Nc=this.dc=this.fc=0,this.Oa=new _e,this.memory=0,this.Ib="OutputFunc",this.Jb="OutputAlphaFunc",this.Nd="OutputRowFunc"}function vt(){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 Et(){this.nc=this.Ea=this.b=this.hc=0,this.K=[],this.w=0}function Dt(){this.ua=0,this.Wa=new ae,this.vb=new ae,this.md=this.xc=this.wc=0,this.vc=[],this.Wb=0,this.Ya=new it,this.yc=new W}function Yt(){this.xb=this.a=0,this.l=new ta,this.ca=new le,this.V=[],this.Ba=0,this.Ta=[],this.Ua=0,this.m=new R,this.Pb=0,this.wd=new R,this.Ma=this.$=this.C=this.i=this.c=this.xd=0,this.s=new Dt,this.ab=0,this.gc=h(4,Et),this.Oc=0}function ne(){this.Lc=this.Z=this.$a=this.i=this.c=0,this.l=new ta,this.ic=0,this.ca=[],this.tb=0,this.qd=null,this.rd=0}function ge(o,s,d,m,b,w,_){for(o=o==null?0:o[s+0],s=0;s<_;++s)b[w+s]=o+d[m+s]&255,o=b[w+s]}function Re(o,s,d,m,b,w,_){var L;if(o==null)ge(null,null,d,m,b,w,_);else for(L=0;L<_;++L)b[w+L]=o[s+L]+d[m+L]&255}function Ke(o,s,d,m,b,w,_){if(o==null)ge(null,null,d,m,b,w,_);else{var L,k=o[s+0],E=k,V=k;for(L=0;L<_;++L)E=V+(k=o[s+L])-E,V=d[m+L]+(-256&E?0>E?0:255:E)&255,E=k,b[w+L]=V}}function Fe(o,s,d,m){var b=s.width,w=s.o;if(n(o!=null&&s!=null),0>d||0>=m||d+m>w)return null;if(!o.Cc){if(o.ga==null){var _;if(o.ga=new ne,(_=o.ga==null)||(_=s.width*s.o,n(o.Gb.length==0),o.Gb=a(_),o.Uc=0,o.Gb==null?_=0:(o.mb=o.Gb,o.nb=o.Uc,o.rc=null,_=1),_=!_),!_){_=o.ga;var L=o.Fa,k=o.P,E=o.qc,V=o.mb,et=o.nb,C=k+1,Z=E-1,X=_.l;if(n(L!=null&&V!=null&&s!=null),li[0]=null,li[1]=ge,li[2]=Re,li[3]=Ke,_.ca=V,_.tb=et,_.c=s.width,_.i=s.height,n(0<_.c&&0<_.i),1>=E)s=0;else if(_.$a=3&L[k+0],_.Z=L[k+0]>>2&3,_.Lc=L[k+0]>>4&3,k=L[k+0]>>6&3,0>_.$a||1<_.$a||4<=_.Z||1<_.Lc||k)s=0;else if(X.put=Vt,X.ac=ur,X.bc=Fr,X.ma=_,X.width=s.width,X.height=s.height,X.Da=s.Da,X.v=s.v,X.va=s.va,X.j=s.j,X.o=s.o,_.$a)t:{n(_.$a==1),s=xi();e:for(;;){if(s==null){s=0;break t}if(n(_!=null),_.mc=s,s.c=_.c,s.i=_.i,s.l=_.l,s.l.ma=_,s.l.width=_.c,s.l.height=_.i,s.a=0,ut(s.m,L,C,Z),!pr(_.c,_.i,1,s,null)||(s.ab==1&&s.gc[0].hc==3&&tr(s.s)?(_.ic=1,L=s.c*s.i,s.Ta=null,s.Ua=0,s.V=a(L),s.Ba=0,s.V==null?(s.a=1,s=0):s=1):(_.ic=0,s=Ai(s,_.c)),!s))break e;s=1;break t}_.mc=null,s=0}else s=Z>=_.c*_.i;_=!s}if(_)return null;o.ga.Lc!=1?o.Ga=0:m=w-d}n(o.ga!=null),n(d+m<=w);t:{if(s=(L=o.ga).c,w=L.l.o,L.$a==0){if(C=o.rc,Z=o.Vc,X=o.Fa,k=o.P+1+d*s,E=o.mb,V=o.nb+d*s,n(k<=o.P+o.qc),L.Z!=0)for(n(li[L.Z]!=null),_=0;_<m;++_)li[L.Z](C,Z,X,k,E,V,s),C=E,Z=V,V+=s,k+=s;else for(_=0;_<m;++_)r(E,V,X,k,s),C=E,Z=V,V+=s,k+=s;o.rc=C,o.Vc=Z}else{if(n(L.mc!=null),s=d+m,n((_=L.mc)!=null),n(s<=_.i),_.C>=s)s=1;else if(L.ic||ir(),L.ic){L=_.V,C=_.Ba,Z=_.c;var lt=_.i,Q=(X=1,k=_.$/Z,E=_.$%Z,V=_.m,et=_.s,_.$),ft=Z*lt,pt=Z*s,_t=et.wc,bt=Q<pt?ln(et,E,k):null;n(Q<=ft),n(s<=lt),n(tr(et));e:for(;;){for(;!V.h&&Q<pt;){if(E&_t||(bt=ln(et,E,k)),n(bt!=null),J(V),256>(lt=Me(bt.G[0],bt.H[0],V)))L[C+Q]=lt,++Q,++E>=Z&&(E=0,++k<=s&&!(k%16)&&er(_,k));else{if(!(280>lt)){X=0;break e}lt=qn(lt-256,V);var Mt,Pt=Me(bt.G[4],bt.H[4],V);if(J(V),!(Q>=(Pt=Hn(Z,Pt=qn(Pt,V)))&&ft-Q>=lt)){X=0;break e}for(Mt=0;Mt<lt;++Mt)L[C+Q+Mt]=L[C+Q+Mt-Pt];for(Q+=lt,E+=lt;E>=Z;)E-=Z,++k<=s&&!(k%16)&&er(_,k);Q<pt&&E&_t&&(bt=ln(et,E,k))}n(V.h==G(V))}er(_,k>s?s:k);break e}!X||V.h&&Q<ft?(X=0,_.a=V.h?5:3):_.$=Q,s=X}else s=nr(_,_.V,_.Ba,_.c,_.i,s,Xi);if(!s){m=0;break t}}d+m>=w&&(o.Cc=1),m=1}if(!m)return null;if(o.Cc&&((m=o.ga)!=null&&(m.mc=null),o.ga=null,0<o.Ga))return alert("todo:WebPDequantizeLevels"),null}return o.nb+d*b}function Qe(o,s,d,m,b,w){for(;0<b--;){var _,L=o,k=s+(d?1:0),E=o,V=s+(d?0:3);for(_=0;_<m;++_){var et=E[V+4*_];et!=255&&(et*=32897,L[k+4*_+0]=L[k+4*_+0]*et>>23,L[k+4*_+1]=L[k+4*_+1]*et>>23,L[k+4*_+2]=L[k+4*_+2]*et>>23)}s+=w}}function Xe(o,s,d,m,b){for(;0<m--;){var w;for(w=0;w<d;++w){var _=o[s+2*w+0],L=15&(E=o[s+2*w+1]),k=4369*L,E=(240&E|E>>4)*k>>16;o[s+2*w+0]=(240&_|_>>4)*k>>16&240|(15&_|_<<4)*k>>16>>4&15,o[s+2*w+1]=240&E|L}s+=b}}function hn(o,s,d,m,b,w,_,L){var k,E,V=255;for(E=0;E<b;++E){for(k=0;k<m;++k){var et=o[s+k];w[_+4*k]=et,V&=et}s+=d,_+=L}return V!=255}function Br(o,s,d,m,b){var w;for(w=0;w<b;++w)d[m+w]=o[s+w]>>8}function ir(){Ja=Qe,Hh=Xe,Wh=hn,Gh=Br}function zr(o,s,d){j[o]=function(m,b,w,_,L,k,E,V,et,C,Z,X,lt,Q,ft,pt,_t){var bt,Mt=_t-1>>1,Pt=L[k+0]|E[V+0]<<16,re=et[C+0]|Z[X+0]<<16;n(m!=null);var Ct=3*Pt+re+131074>>2;for(s(m[b+0],255&Ct,Ct>>16,lt,Q),w!=null&&(Ct=3*re+Pt+131074>>2,s(w[_+0],255&Ct,Ct>>16,ft,pt)),bt=1;bt<=Mt;++bt){var ue=L[k+bt]|E[V+bt]<<16,en=et[C+bt]|Z[X+bt]<<16,ie=Pt+ue+re+en+524296,Ot=ie+2*(ue+re)>>3;Ct=Ot+Pt>>1,Pt=(ie=ie+2*(Pt+en)>>3)+ue>>1,s(m[b+2*bt-1],255&Ct,Ct>>16,lt,Q+(2*bt-1)*d),s(m[b+2*bt-0],255&Pt,Pt>>16,lt,Q+(2*bt-0)*d),w!=null&&(Ct=ie+re>>1,Pt=Ot+en>>1,s(w[_+2*bt-1],255&Ct,Ct>>16,ft,pt+(2*bt-1)*d),s(w[_+2*bt+0],255&Pt,Pt>>16,ft,pt+(2*bt+0)*d)),Pt=ue,re=en}1&_t||(Ct=3*Pt+re+131074>>2,s(m[b+_t-1],255&Ct,Ct>>16,lt,Q+(_t-1)*d),w!=null&&(Ct=3*re+Pt+131074>>2,s(w[_+_t-1],255&Ct,Ct>>16,ft,pt+(_t-1)*d)))}}function Ua(){Kn[Xo]=S1,Kn[Jo]=nf,Kn[Xh]=k1,Kn[Qo]=rf,Kn[ts]=af,Kn[cl]=of,Kn[Jh]=P1,Kn[ul]=nf,Kn[dl]=rf,Kn[es]=af,Kn[pl]=of}function aa(o){return o&~I1?0>o?0:255:o>>sf}function Jr(o,s){return aa((19077*o>>8)+(26149*s>>8)-14234)}function Ii(o,s,d){return aa((19077*o>>8)-(6419*s>>8)-(13320*d>>8)+8708)}function Fi(o,s){return aa((19077*o>>8)+(33050*s>>8)-17685)}function Qr(o,s,d,m,b){m[b+0]=Jr(o,d),m[b+1]=Ii(o,s,d),m[b+2]=Fi(o,s)}function fn(o,s,d,m,b){m[b+0]=Fi(o,s),m[b+1]=Ii(o,s,d),m[b+2]=Jr(o,d)}function Ei(o,s,d,m,b){var w=Ii(o,s,d);s=w<<3&224|Fi(o,s)>>3,m[b+0]=248&Jr(o,d)|w>>5,m[b+1]=s}function Ci(o,s,d,m,b){var w=240&Fi(o,s)|15;m[b+0]=240&Jr(o,d)|Ii(o,s,d)>>4,m[b+1]=w}function qa(o,s,d,m,b){m[b+0]=255,Qr(o,s,d,m,b+1)}function Ha(o,s,d,m,b){fn(o,s,d,m,b),m[b+3]=255}function _n(o,s,d,m,b){Qr(o,s,d,m,b),m[b+3]=255}function Ur(o,s,d){j[o]=function(m,b,w,_,L,k,E,V,et){for(var C=V+(-2&et)*d;V!=C;)s(m[b+0],w[_+0],L[k+0],E,V),s(m[b+1],w[_+0],L[k+0],E,V+d),b+=2,++_,++k,V+=2*d;1&et&&s(m[b+0],w[_+0],L[k+0],E,V)}}function oa(o,s,d){return d==0?o==0?s==0?6:5:s==0?4:0:d}function Zo(o,s,d,m,b){switch(o>>>30){case 3:Ri(s,d,m,b,0);break;case 2:$n(s,d,m,b);break;case 1:xe(s,d,m,b)}}function Zn(o,s){var d,m,b=s.M,w=s.Nb,_=o.oc,L=o.pc+40,k=o.oc,E=o.pc+584,V=o.oc,et=o.pc+600;for(d=0;16>d;++d)_[L+32*d-1]=129;for(d=0;8>d;++d)k[E+32*d-1]=129,V[et+32*d-1]=129;for(0<b?_[L-1-32]=k[E-1-32]=V[et-1-32]=129:(i(_,L-32-1,127,21),i(k,E-32-1,127,9),i(V,et-32-1,127,9)),m=0;m<o.za;++m){var C=s.ya[s.aa+m];if(0<m){for(d=-1;16>d;++d)r(_,L+32*d-4,_,L+32*d+12,4);for(d=-1;8>d;++d)r(k,E+32*d-4,k,E+32*d+4,4),r(V,et+32*d-4,V,et+32*d+4,4)}var Z=o.Gd,X=o.Hd+m,lt=C.ad,Q=C.Hc;if(0<b&&(r(_,L-32,Z[X].y,0,16),r(k,E-32,Z[X].f,0,8),r(V,et-32,Z[X].ea,0,8)),C.Za){var ft=_,pt=L-32+16;for(0<b&&(m>=o.za-1?i(ft,pt,Z[X].y[15],4):r(ft,pt,Z[X+1].y,0,4)),d=0;4>d;d++)ft[pt+128+d]=ft[pt+256+d]=ft[pt+384+d]=ft[pt+0+d];for(d=0;16>d;++d,Q<<=2)ft=_,pt=L+hf[d],ar[C.Ob[d]](ft,pt),Zo(Q,lt,16*+d,ft,pt)}else if(ft=oa(m,b,C.Ob[0]),si[ft](_,L),Q!=0)for(d=0;16>d;++d,Q<<=2)Zo(Q,lt,16*+d,_,L+hf[d]);for(d=C.Gc,ft=oa(m,b,C.Dd),Wr[ft](k,E),Wr[ft](V,et),Q=lt,ft=k,pt=E,255&(C=0|d)&&(170&C?yr(Q,256,ft,pt):Se(Q,256,ft,pt)),C=V,Q=et,255&(d>>=8)&&(170&d?yr(lt,320,C,Q):Se(lt,320,C,Q)),b<o.Ub-1&&(r(Z[X].y,0,_,L+480,16),r(Z[X].f,0,k,E+224,8),r(Z[X].ea,0,V,et+224,8)),d=8*w*o.B,Z=o.sa,X=o.ta+16*m+16*w*o.R,lt=o.qa,C=o.ra+8*m+d,Q=o.Ha,ft=o.Ia+8*m+d,d=0;16>d;++d)r(Z,X+d*o.R,_,L+32*d,16);for(d=0;8>d;++d)r(lt,C+d*o.B,k,E+32*d,8),r(Q,ft+d*o.B,V,et+32*d,8)}}function Oi(o,s,d,m,b,w,_,L,k){var E=[0],V=[0],et=0,C=k!=null?k.kd:0,Z=k??new vt;if(o==null||12>d)return 7;Z.data=o,Z.w=s,Z.ha=d,s=[s],d=[d],Z.gb=[Z.gb];t:{var X=s,lt=d,Q=Z.gb;if(n(o!=null),n(lt!=null),n(Q!=null),Q[0]=0,12<=lt[0]&&!e(o,X[0],"RIFF")){if(e(o,X[0]+8,"WEBP")){Q=3;break t}var ft=Bt(o,X[0]+4);if(12>ft||4294967286<ft){Q=3;break t}if(C&&ft>lt[0]-8){Q=7;break t}Q[0]=ft,X[0]+=12,lt[0]-=12}Q=0}if(Q!=0)return Q;for(ft=0<Z.gb[0],d=d[0];;){t:{var pt=o;lt=s,Q=d;var _t=E,bt=V,Mt=X=[0];if((Ct=et=[et])[0]=0,8>Q[0])Q=7;else{if(!e(pt,lt[0],"VP8X")){if(Bt(pt,lt[0]+4)!=10){Q=3;break t}if(18>Q[0]){Q=7;break t}var Pt=Bt(pt,lt[0]+8),re=1+St(pt,lt[0]+12);if(2147483648<=re*(pt=1+St(pt,lt[0]+15))){Q=3;break t}Mt!=null&&(Mt[0]=Pt),_t!=null&&(_t[0]=re),bt!=null&&(bt[0]=pt),lt[0]+=18,Q[0]-=18,Ct[0]=1}Q=0}}if(et=et[0],X=X[0],Q!=0)return Q;if(lt=!!(2&X),!ft&&et)return 3;if(w!=null&&(w[0]=!!(16&X)),_!=null&&(_[0]=lt),L!=null&&(L[0]=0),_=E[0],X=V[0],et&<&&k==null){Q=0;break}if(4>d){Q=7;break}if(ft&&et||!ft&&!et&&!e(o,s[0],"ALPH")){d=[d],Z.na=[Z.na],Z.P=[Z.P],Z.Sa=[Z.Sa];t:{Pt=o,Q=s,ft=d;var Ct=Z.gb;_t=Z.na,bt=Z.P,Mt=Z.Sa,re=22,n(Pt!=null),n(ft!=null),pt=Q[0];var ue=ft[0];for(n(_t!=null),n(Mt!=null),_t[0]=null,bt[0]=null,Mt[0]=0;;){if(Q[0]=pt,ft[0]=ue,8>ue){Q=7;break t}var en=Bt(Pt,pt+4);if(4294967286<en){Q=3;break t}var ie=8+en+1&-2;if(re+=ie,0<Ct&&re>Ct){Q=3;break t}if(!e(Pt,pt,"VP8 ")||!e(Pt,pt,"VP8L")){Q=0;break t}if(ue[0]<ie){Q=7;break t}e(Pt,pt,"ALPH")||(_t[0]=Pt,bt[0]=pt+8,Mt[0]=en),pt+=ie,ue-=ie}}if(d=d[0],Z.na=Z.na[0],Z.P=Z.P[0],Z.Sa=Z.Sa[0],Q!=0)break}d=[d],Z.Ja=[Z.Ja],Z.xa=[Z.xa];t:if(Ct=o,Q=s,ft=d,_t=Z.gb[0],bt=Z.Ja,Mt=Z.xa,Pt=Q[0],pt=!e(Ct,Pt,"VP8 "),re=!e(Ct,Pt,"VP8L"),n(Ct!=null),n(ft!=null),n(bt!=null),n(Mt!=null),8>ft[0])Q=7;else{if(pt||re){if(Ct=Bt(Ct,Pt+4),12<=_t&&Ct>_t-12){Q=3;break t}if(C&&Ct>ft[0]-8){Q=7;break t}bt[0]=Ct,Q[0]+=8,ft[0]-=8,Mt[0]=re}else Mt[0]=5<=ft[0]&&Ct[Pt+0]==47&&!(Ct[Pt+4]>>5),bt[0]=ft[0];Q=0}if(d=d[0],Z.Ja=Z.Ja[0],Z.xa=Z.xa[0],s=s[0],Q!=0)break;if(4294967286<Z.Ja)return 3;if(L==null||lt||(L[0]=Z.xa?2:1),_=[_],X=[X],Z.xa){if(5>d){Q=7;break}L=_,C=X,lt=w,o==null||5>d?o=0:5<=d&&o[s+0]==47&&!(o[s+4]>>5)?(ft=[0],Ct=[0],_t=[0],ut(bt=new R,o,s,d),Er(bt,ft,Ct,_t)?(L!=null&&(L[0]=ft[0]),C!=null&&(C[0]=Ct[0]),lt!=null&&(lt[0]=_t[0]),o=1):o=0):o=0}else{if(10>d){Q=7;break}L=X,o==null||10>d||!Ro(o,s+3,d-3)?o=0:(C=o[s+0]|o[s+1]<<8|o[s+2]<<16,lt=16383&(o[s+7]<<8|o[s+6]),o=16383&(o[s+9]<<8|o[s+8]),1&C||3<(C>>1&7)||!(C>>4&1)||C>>5>=Z.Ja||!lt||!o?o=0:(_&&(_[0]=lt),L&&(L[0]=o),o=1))}if(!o||(_=_[0],X=X[0],et&&(E[0]!=_||V[0]!=X)))return 3;k!=null&&(k[0]=Z,k.offset=s-k.w,n(4294967286>s-k.w),n(k.offset==k.ha-d));break}return Q==0||Q==7&&et&&k==null?(w!=null&&(w[0]|=Z.na!=null&&0<Z.na.length),m!=null&&(m[0]=_),b!=null&&(b[0]=X),0):Q}function Wa(o,s,d){var m=s.width,b=s.height,w=0,_=0,L=m,k=b;if(s.Da=o!=null&&0<o.Da,s.Da&&(L=o.cd,k=o.bd,w=o.v,_=o.j,11>d||(w&=-2,_&=-2),0>w||0>_||0>=L||0>=k||w+L>m||_+k>b))return 0;if(s.v=w,s.j=_,s.va=w+L,s.o=_+k,s.U=L,s.T=k,s.da=o!=null&&0<o.da,s.da){if(!Ht(L,k,d=[o.ib],w=[o.hb]))return 0;s.ib=d[0],s.hb=w[0]}return s.ob=o!=null&&o.ob,s.Kb=o==null||!o.Sd,s.da&&(s.ob=s.ib<3*m/4&&s.hb<3*b/4,s.Kb=0),1}function Ga(o){if(o==null)return 2;if(11>o.S){var s=o.f.RGBA;s.fb+=(o.height-1)*s.A,s.A=-s.A}else s=o.f.kb,o=o.height,s.O+=(o-1)*s.fa,s.fa=-s.fa,s.N+=(o-1>>1)*s.Ab,s.Ab=-s.Ab,s.W+=(o-1>>1)*s.Db,s.Db=-s.Db,s.F!=null&&(s.J+=(o-1)*s.lb,s.lb=-s.lb);return 0}function ti(o,s,d,m){if(m==null||0>=o||0>=s)return 2;if(d!=null){if(d.Da){var b=d.cd,w=d.bd,_=-2&d.v,L=-2&d.j;if(0>_||0>L||0>=b||0>=w||_+b>o||L+w>s)return 2;o=b,s=w}if(d.da){if(!Ht(o,s,b=[d.ib],w=[d.hb]))return 2;o=b[0],s=w[0]}}m.width=o,m.height=s;t:{var k=m.width,E=m.height;if(o=m.S,0>=k||0>=E||!(o>=Xo&&13>o))o=2;else{if(0>=m.Rd&&m.sd==null){_=w=b=s=0;var V=(L=k*ff[o])*E;if(11>o||(w=(E+1)/2*(s=(k+1)/2),o==12&&(_=(b=k)*E)),(E=a(V+2*w+_))==null){o=1;break t}m.sd=E,11>o?((k=m.f.RGBA).eb=E,k.fb=0,k.A=L,k.size=V):((k=m.f.kb).y=E,k.O=0,k.fa=L,k.Fd=V,k.f=E,k.N=0+V,k.Ab=s,k.Cd=w,k.ea=E,k.W=0+V+w,k.Db=s,k.Ed=w,o==12&&(k.F=E,k.J=0+V+2*w),k.Tc=_,k.lb=b)}if(s=1,b=m.S,w=m.width,_=m.height,b>=Xo&&13>b)if(11>b)o=m.f.RGBA,s&=(L=Math.abs(o.A))*(_-1)+w<=o.size,s&=L>=w*ff[b],s&=o.eb!=null;else{o=m.f.kb,L=(w+1)/2,V=(_+1)/2,k=Math.abs(o.fa),E=Math.abs(o.Ab);var et=Math.abs(o.Db),C=Math.abs(o.lb),Z=C*(_-1)+w;s&=k*(_-1)+w<=o.Fd,s&=E*(V-1)+L<=o.Cd,s=(s&=et*(V-1)+L<=o.Ed)&k>=w&E>=L&et>=L,s&=o.y!=null,s&=o.f!=null,s&=o.ea!=null,b==12&&(s&=C>=w,s&=Z<=o.Tc,s&=o.F!=null)}else s=0;o=s?0:2}}return o!=0||d!=null&&d.fd&&(o=Ga(m)),o}var Ti=64,En=[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],Cn=24,ei=32,qr=8,ni=[0,0,1,1,2,2,2,2,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7];It("Predictor0","PredictorAdd0"),j.Predictor0=function(){return 4278190080},j.Predictor1=function(o){return o},j.Predictor2=function(o,s,d){return s[d+0]},j.Predictor3=function(o,s,d){return s[d+1]},j.Predictor4=function(o,s,d){return s[d-1]},j.Predictor5=function(o,s,d){return zt(zt(o,s[d+1]),s[d+0])},j.Predictor6=function(o,s,d){return zt(o,s[d-1])},j.Predictor7=function(o,s,d){return zt(o,s[d+0])},j.Predictor8=function(o,s,d){return zt(s[d-1],s[d+0])},j.Predictor9=function(o,s,d){return zt(s[d+0],s[d+1])},j.Predictor10=function(o,s,d){return zt(zt(o,s[d-1]),zt(s[d+0],s[d+1]))},j.Predictor11=function(o,s,d){var m=s[d+0];return 0>=Jt(m>>24&255,o>>24&255,(s=s[d-1])>>24&255)+Jt(m>>16&255,o>>16&255,s>>16&255)+Jt(m>>8&255,o>>8&255,s>>8&255)+Jt(255&m,255&o,255&s)?m:o},j.Predictor12=function(o,s,d){var m=s[d+0];return(ye((o>>24&255)+(m>>24&255)-((s=s[d-1])>>24&255))<<24|ye((o>>16&255)+(m>>16&255)-(s>>16&255))<<16|ye((o>>8&255)+(m>>8&255)-(s>>8&255))<<8|ye((255&o)+(255&m)-(255&s)))>>>0},j.Predictor13=function(o,s,d){var m=s[d-1];return(he((o=zt(o,s[d+0]))>>24&255,m>>24&255)<<24|he(o>>16&255,m>>16&255)<<16|he(o>>8&255,m>>8&255)<<8|he(255&o,255&m))>>>0};var Va=j.PredictorAdd0;j.PredictorAdd1=ce,It("Predictor2","PredictorAdd2"),It("Predictor3","PredictorAdd3"),It("Predictor4","PredictorAdd4"),It("Predictor5","PredictorAdd5"),It("Predictor6","PredictorAdd6"),It("Predictor7","PredictorAdd7"),It("Predictor8","PredictorAdd8"),It("Predictor9","PredictorAdd9"),It("Predictor10","PredictorAdd10"),It("Predictor11","PredictorAdd11"),It("Predictor12","PredictorAdd12"),It("Predictor13","PredictorAdd13");var sa=j.PredictorAdd2;jt("ColorIndexInverseTransform","MapARGB","32b",function(o){return o>>8&255},function(o){return o}),jt("VP8LColorIndexInverseTransformAlpha","MapAlpha","8b",function(o){return o},function(o){return o>>8&255});var qe,$o=j.ColorIndexInverseTransform,br=j.MapARGB,wr=j.VP8LColorIndexInverseTransformAlpha,Za=j.MapAlpha,$a=j.VP8LPredictorsAdd=[];$a.length=16,(j.VP8LPredictors=[]).length=16,(j.VP8LPredictorsAdd_C=[]).length=16,(j.VP8LPredictors_C=[]).length=16;var Ya,Ka,ri,ii,ai,Di,oi,Ri,$n,yr,xe,Se,He,tn,Hr,Xa,la,Yo,Mh,jh,Bh,zh,Uh,qh,Ja,Hh,Wh,Gh,Vh=a(511),Zh=a(2041),$h=a(225),Yh=a(767),Kh=0,fl=Zh,Ko=$h,On=Yh,Yn=Vh,Xo=0,Jo=1,Xh=2,Qo=3,ts=4,cl=5,Jh=6,ul=7,dl=8,es=9,pl=10,u1=[2,3,7],d1=[3,3,11],Qh=[280,256,256,256,40],p1=[0,1,1,1,0],g1=[17,18,0,1,2,3,4,5,16,6,7,8,9,10,11,12,13,14,15],m1=[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],v1=[2954,2956,2958,2962,2970,2986,3018,3082,3212,3468,3980,5004],b1=8,gl=[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],ml=[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],Qa=null,w1=[[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]],y1=[0,1,4,8,5,2,3,6,9,12,13,10,7,11,14,15],tf=[-0,1,-1,2,-2,3,4,6,-3,5,-4,-5,-6,7,-7,8,-8,-9],_1=[[[[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]]]],x1=[[[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]]],A1=[[[[255,255,255,255,255,255,255,255,255,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]]]],N1=[0,1,2,3,6,4,5,6,6,6,6,6,6,6,6,7,0],si=[],ar=[],Wr=[],L1=1,ef=2,li=[],Kn=[];zr("UpsampleRgbLinePair",Qr,3),zr("UpsampleBgrLinePair",fn,3),zr("UpsampleRgbaLinePair",_n,4),zr("UpsampleBgraLinePair",Ha,4),zr("UpsampleArgbLinePair",qa,4),zr("UpsampleRgba4444LinePair",Ci,2),zr("UpsampleRgb565LinePair",Ei,2);var S1=j.UpsampleRgbLinePair,k1=j.UpsampleBgrLinePair,nf=j.UpsampleRgbaLinePair,rf=j.UpsampleBgraLinePair,af=j.UpsampleArgbLinePair,of=j.UpsampleRgba4444LinePair,P1=j.UpsampleRgb565LinePair,ns=16,rs=1<<ns-1,to=-227,vl=482,sf=6,I1=(256<<sf)-1,lf=0,F1=a(256),E1=a(256),C1=a(256),O1=a(256),T1=a(vl-to),D1=a(vl-to);Ur("YuvToRgbRow",Qr,3),Ur("YuvToBgrRow",fn,3),Ur("YuvToRgbaRow",_n,4),Ur("YuvToBgraRow",Ha,4),Ur("YuvToArgbRow",qa,4),Ur("YuvToRgba4444Row",Ci,2),Ur("YuvToRgb565Row",Ei,2);var hf=[0,4,8,12,128,132,136,140,256,260,264,268,384,388,392,396],is=[0,2,8],R1=[8,7,6,4,4,2,2,2,1,1,1,1],M1=1;this.WebPDecodeRGBA=function(o,s,d,m,b){var w=Jo,_=new dt,L=new le;_.ba=L,L.S=w,L.width=[L.width],L.height=[L.height];var k=L.width,E=L.height,V=new Gt;if(V==null||o==null)var et=2;else n(V!=null),et=Oi(o,s,d,V.width,V.height,V.Pd,V.Qd,V.format,null);if(et!=0?k=0:(k!=null&&(k[0]=V.width[0]),E!=null&&(E[0]=V.height[0]),k=1),k){L.width=L.width[0],L.height=L.height[0],m!=null&&(m[0]=L.width),b!=null&&(b[0]=L.height);t:{if(m=new ta,(b=new vt).data=o,b.w=s,b.ha=d,b.kd=1,s=[0],n(b!=null),((o=Oi(b.data,b.w,b.ha,null,null,null,s,null,b))==0||o==7)&&s[0]&&(o=4),(s=o)==0){if(n(_!=null),m.data=b.data,m.w=b.w+b.offset,m.ha=b.ha-b.offset,m.put=Vt,m.ac=ur,m.bc=Fr,m.ma=_,b.xa){if((o=xi())==null){_=1;break t}if((function(C,Z){var X=[0],lt=[0],Q=[0];e:for(;;){if(C==null)return 0;if(Z==null)return C.a=2,0;if(C.l=Z,C.a=0,ut(C.m,Z.data,Z.w,Z.ha),!Er(C.m,X,lt,Q)){C.a=3;break e}if(C.xb=ef,Z.width=X[0],Z.height=lt[0],!pr(X[0],lt[0],1,C,null))break e;return 1}return n(C.a!=0),0})(o,m)){if(m=(s=ti(m.width,m.height,_.Oa,_.ba))==0){e:{m=o;n:for(;;){if(m==null){m=0;break e}if(n(m.s.yc!=null),n(m.s.Ya!=null),n(0<m.s.Wb),n((d=m.l)!=null),n((b=d.ma)!=null),m.xb!=0){if(m.ca=b.ba,m.tb=b.tb,n(m.ca!=null),!Wa(b.Oa,d,Qo)){m.a=2;break n}if(!Ai(m,d.width)||d.da)break n;if((d.da||Zt(m.ca.S))&&ir(),11>m.ca.S||(alert("todo:WebPInitConvertARGBToYUV"),m.ca.f.kb.F!=null&&ir()),m.Pb&&0<m.s.ua&&m.s.vb.X==null&&!I(m.s.vb,m.s.Wa.Xa)){m.a=1;break n}m.xb=0}if(!nr(m,m.V,m.Ba,m.c,m.i,d.o,Xr))break n;b.Dc=m.Ma,m=1;break e}n(m.a!=0),m=0}m=!m}m&&(s=o.a)}else s=o.a}else{if((o=new Ys)==null){_=1;break t}if(o.Fa=b.na,o.P=b.P,o.qc=b.Sa,mr(o,m)){if((s=ti(m.width,m.height,_.Oa,_.ba))==0){if(o.Aa=0,d=_.Oa,n((b=o)!=null),d!=null){if(0<(k=0>(k=d.Md)?0:100<k?255:255*k/100)){for(E=V=0;4>E;++E)12>(et=b.pb[E]).lc&&(et.ia=k*R1[0>et.lc?0:et.lc]>>3),V|=et.ia;V&&(alert("todo:VP8InitRandom"),b.ia=1)}b.Ga=d.Id,100<b.Ga?b.Ga=100:0>b.Ga&&(b.Ga=0)}(function(C,Z){if(C==null)return 0;if(Z==null)return Ye(C,2,"NULL VP8Io parameter in VP8Decode().");if(!C.cb&&!mr(C,Z))return 0;if(n(C.cb),Z.ac==null||Z.ac(Z)){Z.ob&&(C.L=0);var X=is[C.L];if(C.L==2?(C.yb=0,C.zb=0):(C.yb=Z.v-X>>4,C.zb=Z.j-X>>4,0>C.yb&&(C.yb=0),0>C.zb&&(C.zb=0)),C.Va=Z.o+15+X>>4,C.Hb=Z.va+15+X>>4,C.Hb>C.za&&(C.Hb=C.za),C.Va>C.Ub&&(C.Va=C.Ub),0<C.L){var lt=C.ed;for(X=0;4>X;++X){var Q;if(C.Qa.Cb){var ft=C.Qa.Lb[X];C.Qa.Fb||(ft+=lt.Tb)}else ft=lt.Tb;for(Q=0;1>=Q;++Q){var pt=C.gd[X][Q],_t=ft;if(lt.Pc&&(_t+=lt.vd[0],Q&&(_t+=lt.od[0])),0<(_t=0>_t?0:63<_t?63:_t)){var bt=_t;0<lt.wb&&(bt=4<lt.wb?bt>>2:bt>>1)>9-lt.wb&&(bt=9-lt.wb),1>bt&&(bt=1),pt.dd=bt,pt.tc=2*_t+bt,pt.ld=40<=_t?2:15<=_t?1:0}else pt.tc=0;pt.La=Q}}}X=0}else Ye(C,6,"Frame setup failed"),X=C.a;if(X=X==0){if(X){C.$c=0,0<C.Aa||(C.Ic=M1);e:{X=C.Ic,lt=4*(bt=C.za);var Mt=32*bt,Pt=bt+1,re=0<C.L?bt*(0<C.Aa?2:1):0,Ct=(C.Aa==2?2:1)*bt;if((pt=lt+832+(Q=3*(16*X+is[C.L])/2*Mt)+(ft=C.Fa!=null&&0<C.Fa.length?C.Kc.c*C.Kc.i:0))!=pt)X=0;else{if(pt>C.Vb){if(C.Vb=0,C.Ec=a(pt),C.Fc=0,C.Ec==null){X=Ye(C,1,"no memory during frame initialization.");break e}C.Vb=pt}pt=C.Ec,_t=C.Fc,C.Ac=pt,C.Bc=_t,_t+=lt,C.Gd=h(Mt,To),C.Hd=0,C.rb=h(Pt+1,Ea),C.sb=1,C.wa=re?h(re,Gn):null,C.Y=0,C.D.Nb=0,C.D.wa=C.wa,C.D.Y=C.Y,0<C.Aa&&(C.D.Y+=bt),n(!0),C.oc=pt,C.pc=_t,_t+=832,C.ya=h(Ct,Ca),C.aa=0,C.D.ya=C.ya,C.D.aa=C.aa,C.Aa==2&&(C.D.aa+=bt),C.R=16*bt,C.B=8*bt,bt=(Mt=is[C.L])*C.R,Mt=Mt/2*C.B,C.sa=pt,C.ta=_t+bt,C.qa=C.sa,C.ra=C.ta+16*X*C.R+Mt,C.Ha=C.qa,C.Ia=C.ra+8*X*C.B+Mt,C.$c=0,_t+=Q,C.mb=ft?pt:null,C.nb=ft?_t:null,n(_t+ft<=C.Fc+C.Vb),Mo(C),i(C.Ac,C.Bc,0,lt),X=1}}if(X){if(Z.ka=0,Z.y=C.sa,Z.O=C.ta,Z.f=C.qa,Z.N=C.ra,Z.ea=C.Ha,Z.Vd=C.Ia,Z.fa=C.R,Z.Rc=C.B,Z.F=null,Z.J=0,!Kh){for(X=-255;255>=X;++X)Vh[255+X]=0>X?-X:X;for(X=-1020;1020>=X;++X)Zh[1020+X]=-128>X?-128:127<X?127:X;for(X=-112;112>=X;++X)$h[112+X]=-16>X?-16:15<X?15:X;for(X=-255;510>=X;++X)Yh[255+X]=0>X?0:255<X?255:X;Kh=1}oi=na,Ri=Xs,yr=vr,xe=Bo,Se=zo,$n=Ks,He=Go,tn=Pi,Hr=v,Xa=T,la=Vo,Yo=c,Mh=z,jh=K,Bh=ki,zh=za,Uh=Ho,qh=Wo,ar[0]=al,ar[1]=Js,ar[2]=rl,ar[3]=il,ar[4]=Or,ar[5]=ol,ar[6]=Tr,ar[7]=sl,ar[8]=Da,ar[9]=ra,si[0]=el,si[1]=tl,si[2]=Oa,si[3]=Uo,si[4]=Li,si[5]=Ta,si[6]=nl,Wr[0]=hl,Wr[1]=Qs,Wr[2]=Si,Wr[3]=ll,Wr[4]=Ma,Wr[5]=Ra,Wr[6]=qo,X=1}else X=0}X&&(X=(function(ue,en){for(ue.M=0;ue.M<ue.Va;++ue.M){var ie,Ot=ue.Jc[ue.M&ue.Xb],Nt=ue.m,We=ue;for(ie=0;ie<We.za;++ie){var te=Nt,de=We,Ce=de.Ac,cn=de.Bc+4*ie,xn=de.zc,je=de.ya[de.aa+ie];if(de.Qa.Bb?je.$b=gt(te,de.Pa.jb[0])?2+gt(te,de.Pa.jb[2]):gt(te,de.Pa.jb[1]):je.$b=0,de.kc&&(je.Ad=gt(te,de.Bd)),je.Za=!gt(te,145)+0,je.Za){var mn=je.Ob,An=0;for(de=0;4>de;++de){var nn,me=xn[0+de];for(nn=0;4>nn;++nn){me=x1[Ce[cn+nn]][me];for(var Ae=tf[gt(te,me[0])];0<Ae;)Ae=tf[2*Ae+gt(te,me[Ae])];me=-Ae,Ce[cn+nn]=me}r(mn,An,Ce,cn,4),An+=4,xn[0+de]=me}}else me=gt(te,156)?gt(te,128)?1:3:gt(te,163)?2:0,je.Ob[0]=me,i(Ce,cn,me,4),i(xn,0,me,4);je.Dd=gt(te,142)?gt(te,114)?gt(te,183)?1:3:2:0}if(We.m.Ka)return Ye(ue,7,"Premature end-of-partition0 encountered.");for(;ue.ja<ue.za;++ue.ja){if(We=Ot,te=(Nt=ue).rb[Nt.sb-1],Ce=Nt.rb[Nt.sb+Nt.ja],ie=Nt.ya[Nt.aa+Nt.ja],cn=Nt.kc?ie.Ad:0)te.la=Ce.la=0,ie.Za||(te.Na=Ce.Na=0),ie.Hc=0,ie.Gc=0,ie.ia=0;else{var Be,Ne;if(te=Ce,Ce=We,cn=Nt.Pa.Xc,xn=Nt.ya[Nt.aa+Nt.ja],je=Nt.pb[xn.$b],de=xn.ad,mn=0,An=Nt.rb[Nt.sb-1],me=nn=0,i(de,mn,0,384),xn.Za)var un=0,or=cn[3];else{Ae=a(16);var Ge=te.Na+An.Na;if(Ge=Qa(Ce,cn[1],Ge,je.Eb,0,Ae,0),te.Na=An.Na=(0<Ge)+0,1<Ge)oi(Ae,0,de,mn);else{var kn=Ae[0]+3>>3;for(Ae=0;256>Ae;Ae+=16)de[mn+Ae]=kn}un=1,or=cn[0]}var ke=15&te.la,rn=15&An.la;for(Ae=0;4>Ae;++Ae){var Tn=1&rn;for(kn=Ne=0;4>kn;++kn)ke=ke>>1|(Tn=(Ge=Qa(Ce,or,Ge=Tn+(1&ke),je.Sc,un,de,mn))>un)<<7,Ne=Ne<<2|(3<Ge?3:1<Ge?2:de[mn+0]!=0),mn+=16;ke>>=4,rn=rn>>1|Tn<<7,nn=(nn<<8|Ne)>>>0}for(or=ke,un=rn>>4,Be=0;4>Be;Be+=2){for(Ne=0,ke=te.la>>4+Be,rn=An.la>>4+Be,Ae=0;2>Ae;++Ae){for(Tn=1&rn,kn=0;2>kn;++kn)Ge=Tn+(1&ke),ke=ke>>1|(Tn=0<(Ge=Qa(Ce,cn[2],Ge,je.Qc,0,de,mn)))<<3,Ne=Ne<<2|(3<Ge?3:1<Ge?2:de[mn+0]!=0),mn+=16;ke>>=2,rn=rn>>1|Tn<<5}me|=Ne<<4*Be,or|=ke<<4<<Be,un|=(240&rn)<<Be}te.la=or,An.la=un,xn.Hc=nn,xn.Gc=me,xn.ia=43690&me?0:je.ia,cn=!(nn|me)}if(0<Nt.L&&(Nt.wa[Nt.Y+Nt.ja]=Nt.gd[ie.$b][ie.Za],Nt.wa[Nt.Y+Nt.ja].La|=!cn),We.Ka)return Ye(ue,7,"Premature end-of-file encountered.")}if(Mo(ue),Nt=en,We=1,ie=(Ot=ue).D,te=0<Ot.L&&Ot.M>=Ot.zb&&Ot.M<=Ot.Va,Ot.Aa==0)e:{if(ie.M=Ot.M,ie.uc=te,Zn(Ot,ie),We=1,ie=(Ne=Ot.D).Nb,te=(me=is[Ot.L])*Ot.R,Ce=me/2*Ot.B,Ae=16*ie*Ot.R,kn=8*ie*Ot.B,cn=Ot.sa,xn=Ot.ta-te+Ae,je=Ot.qa,de=Ot.ra-Ce+kn,mn=Ot.Ha,An=Ot.Ia-Ce+kn,rn=(ke=Ne.M)==0,nn=ke>=Ot.Va-1,Ot.Aa==2&&Zn(Ot,Ne),Ne.uc)for(Tn=(Ge=Ot).D.M,n(Ge.D.uc),Ne=Ge.yb;Ne<Ge.Hb;++Ne){un=Ne,or=Tn;var Nn=(Dn=(dn=Ge).D).Nb;Be=dn.R;var Dn=Dn.wa[Dn.Y+un],Rn=dn.sa,Pn=dn.ta+16*Nn*Be+16*un,Mn=Dn.dd,Ee=Dn.tc;if(Ee!=0)if(n(3<=Ee),dn.L==1)0<un&&zh(Rn,Pn,Be,Ee+4),Dn.La&&qh(Rn,Pn,Be,Ee),0<or&&Bh(Rn,Pn,Be,Ee+4),Dn.La&&Uh(Rn,Pn,Be,Ee);else{var jn=dn.B,sr=dn.qa,Mi=dn.ra+8*Nn*jn+8*un,Gr=dn.Ha,dn=dn.Ia+8*Nn*jn+8*un;Nn=Dn.ld,0<un&&(tn(Rn,Pn,Be,Ee+4,Mn,Nn),Xa(sr,Mi,Gr,dn,jn,Ee+4,Mn,Nn)),Dn.La&&(Yo(Rn,Pn,Be,Ee,Mn,Nn),jh(sr,Mi,Gr,dn,jn,Ee,Mn,Nn)),0<or&&(He(Rn,Pn,Be,Ee+4,Mn,Nn),Hr(sr,Mi,Gr,dn,jn,Ee+4,Mn,Nn)),Dn.La&&(la(Rn,Pn,Be,Ee,Mn,Nn),Mh(sr,Mi,Gr,dn,jn,Ee,Mn,Nn))}}if(Ot.ia&&alert("todo:DitherRow"),Nt.put!=null){if(Ne=16*ke,ke=16*(ke+1),rn?(Nt.y=Ot.sa,Nt.O=Ot.ta+Ae,Nt.f=Ot.qa,Nt.N=Ot.ra+kn,Nt.ea=Ot.Ha,Nt.W=Ot.Ia+kn):(Ne-=me,Nt.y=cn,Nt.O=xn,Nt.f=je,Nt.N=de,Nt.ea=mn,Nt.W=An),nn||(ke-=me),ke>Nt.o&&(ke=Nt.o),Nt.F=null,Nt.J=null,Ot.Fa!=null&&0<Ot.Fa.length&&Ne<ke&&(Nt.J=Fe(Ot,Nt,Ne,ke-Ne),Nt.F=Ot.mb,Nt.F==null&&Nt.F.length==0)){We=Ye(Ot,3,"Could not decode alpha data.");break e}Ne<Nt.j&&(me=Nt.j-Ne,Ne=Nt.j,n(!(1&me)),Nt.O+=Ot.R*me,Nt.N+=Ot.B*(me>>1),Nt.W+=Ot.B*(me>>1),Nt.F!=null&&(Nt.J+=Nt.width*me)),Ne<ke&&(Nt.O+=Nt.v,Nt.N+=Nt.v>>1,Nt.W+=Nt.v>>1,Nt.F!=null&&(Nt.J+=Nt.v),Nt.ka=Ne-Nt.j,Nt.U=Nt.va-Nt.v,Nt.T=ke-Ne,We=Nt.put(Nt))}ie+1!=Ot.Ic||nn||(r(Ot.sa,Ot.ta-te,cn,xn+16*Ot.R,te),r(Ot.qa,Ot.ra-Ce,je,de+8*Ot.B,Ce),r(Ot.Ha,Ot.Ia-Ce,mn,An+8*Ot.B,Ce))}if(!We)return Ye(ue,6,"Output aborted.")}return 1})(C,Z)),Z.bc!=null&&Z.bc(Z),X&=1}return X?(C.cb=0,X):0})(o,m)||(s=o.a)}}else s=o.a}s==0&&_.Oa!=null&&_.Oa.fd&&(s=Ga(_.ba))}_=s}w=_!=0?null:11>w?L.f.RGBA.eb:L.f.kb.y}else w=null;return w};var ff=[3,4,3,4,4,2,2,4,4,4,2,1,1]};function u(j,tt){for(var S="",O=0;O<4;O++)S+=String.fromCharCode(j[tt++]);return S}function g(j,tt){return j[tt+0]|j[tt+1]<<8}function y(j,tt){return(j[tt+0]|j[tt+1]<<8|j[tt+2]<<16)>>>0}function x(j,tt){return(j[tt+0]|j[tt+1]<<8|j[tt+2]<<16|j[tt+3]<<24)>>>0}new f;var p=[0],F=[0],P=[],D=new f,N=t,H=(function(j,tt){var S={},O=0,W=!1,U=0,it=0;if(S.frames=[],!(function(A,R){for(var B=0;B<4;B++)if(A[R+B]!="RIFF".charCodeAt(B))return!0;return!1})(j,tt)){for(x(j,tt+=4),tt+=8;tt<j.length;){var st=u(j,tt),ht=x(j,tt+=4);tt+=4;var nt=ht+(1&ht);switch(st){case"VP8 ":case"VP8L":S.frames[O]===void 0&&(S.frames[O]={}),(wt=S.frames[O]).src_off=W?it:tt-8,wt.src_size=U+ht+8,O++,W&&(W=!1,U=0,it=0);break;case"VP8X":(wt=S.header={}).feature_flags=j[tt];var ut=tt+4;wt.canvas_width=1+y(j,ut),ut+=3,wt.canvas_height=1+y(j,ut),ut+=3;break;case"ALPH":W=!0,U=nt+8,it=tt-8;break;case"ANIM":(wt=S.header).bgcolor=x(j,tt),ut=tt+4,wt.loop_count=g(j,ut),ut+=2;break;case"ANMF":var At,wt;(wt=S.frames[O]={}).offset_x=2*y(j,tt),tt+=3,wt.offset_y=2*y(j,tt),tt+=3,wt.width=1+y(j,tt),tt+=3,wt.height=1+y(j,tt),tt+=3,wt.duration=y(j,tt),tt+=3,At=j[tt++],wt.dispose=1&At,wt.blend=At>>1&1}st!="ANMF"&&(tt+=nt)}return S}})(N,0);H.response=N,H.rgbaoutput=!0,H.dataurl=!1;var q=H.header?H.header:null,M=H.frames?H.frames:null;if(q){q.loop_counter=q.loop_count,p=[q.canvas_height],F=[q.canvas_width];for(var rt=0;rt<M.length&&M[rt].blend!=0;rt++);}var mt=M[0],ct=D.WebPDecodeRGBA(N,mt.src_off,mt.src_size,F,p);mt.rgba=ct,mt.imgwidth=F[0],mt.imgheight=p[0];for(var Y=0;Y<F[0]*p[0]*4;Y++)P[Y]=ct[Y];return this.width=F,this.height=p,this.data=P,this}(function(t){var n,e,r,i,a,h,l,f,u,g=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 h,this.miterLimit=A.miterLimit||10,this.lastPoint=A.lastPoint||new h,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};t.events.push(["initialized",function(){this.context2d=new y(this),n=this.internal.f2,e=this.internal.getCoordinateString,r=this.internal.getVerticalCoordinateString,i=this.internal.getHorizontalCoordinate,a=this.internal.getVerticalCoordinate,h=this.internal.Point,l=this.internal.Rectangle,f=this.internal.Matrix,u=new g}]);var y=function(A){Object.defineProperty(this,"canvas",{get:function(){return{parentNode:!1,style:!1}}});var R=A;Object.defineProperty(this,"pdf",{get:function(){return R}});var B=!1;Object.defineProperty(this,"pageWrapXEnabled",{get:function(){return B},set:function(I){B=!!I}});var G=!1;Object.defineProperty(this,"pageWrapYEnabled",{get:function(){return G},set:function(I){G=!!I}});var $=0;Object.defineProperty(this,"posX",{get:function(){return $},set:function(I){isNaN(I)||($=I)}});var J=0;Object.defineProperty(this,"posY",{get:function(){return J},set:function(I){isNaN(I)||(J=I)}}),Object.defineProperty(this,"margin",{get:function(){return u.margin},set:function(I){var Lt;typeof I=="number"?Lt=[I,I,I,I]:((Lt=new Array(4))[0]=I[0],Lt[1]=I.length>=2?I[1]:Lt[0],Lt[2]=I.length>=3?I[2]:Lt[0],Lt[3]=I.length>=4?I[3]:Lt[1]),u.margin=Lt}});var at=!1;Object.defineProperty(this,"autoPaging",{get:function(){return at},set:function(I){at=I}});var ot=0;Object.defineProperty(this,"lastBreak",{get:function(){return ot},set:function(I){ot=I}});var gt=[];Object.defineProperty(this,"pageBreaks",{get:function(){return gt},set:function(I){gt=I}}),Object.defineProperty(this,"ctx",{get:function(){return u},set:function(I){I instanceof g&&(u=I)}}),Object.defineProperty(this,"path",{get:function(){return u.path},set:function(I){u.path=I}});var xt=[];Object.defineProperty(this,"ctxStack",{get:function(){return xt},set:function(I){xt=I}}),Object.defineProperty(this,"fillStyle",{get:function(){return this.ctx.fillStyle},set:function(I){var Lt;Lt=x(I),this.ctx.fillStyle=Lt.style,this.ctx.isFillTransparent=Lt.a===0,this.ctx.fillOpacity=Lt.a,this.pdf.setFillColor(Lt.r,Lt.g,Lt.b,{a:Lt.a}),this.pdf.setTextColor(Lt.r,Lt.g,Lt.b,{a:Lt.a})}}),Object.defineProperty(this,"strokeStyle",{get:function(){return this.ctx.strokeStyle},set:function(I){var Lt=x(I);this.ctx.strokeStyle=Lt.style,this.ctx.isStrokeTransparent=Lt.a===0,this.ctx.strokeOpacity=Lt.a,Lt.a===0?this.pdf.setDrawColor(255,255,255):(Lt.a,this.pdf.setDrawColor(Lt.r,Lt.g,Lt.b))}}),Object.defineProperty(this,"lineCap",{get:function(){return this.ctx.lineCap},set:function(I){["butt","round","square"].indexOf(I)!==-1&&(this.ctx.lineCap=I,this.pdf.setLineCap(I))}}),Object.defineProperty(this,"lineWidth",{get:function(){return this.ctx.lineWidth},set:function(I){isNaN(I)||(this.ctx.lineWidth=I,this.pdf.setLineWidth(I))}}),Object.defineProperty(this,"lineJoin",{get:function(){return this.ctx.lineJoin},set:function(I){["bevel","round","miter"].indexOf(I)!==-1&&(this.ctx.lineJoin=I,this.pdf.setLineJoin(I))}}),Object.defineProperty(this,"miterLimit",{get:function(){return this.ctx.miterLimit},set:function(I){isNaN(I)||(this.ctx.miterLimit=I,this.pdf.setMiterLimit(I))}}),Object.defineProperty(this,"textBaseline",{get:function(){return this.ctx.textBaseline},set:function(I){this.ctx.textBaseline=I}}),Object.defineProperty(this,"textAlign",{get:function(){return this.ctx.textAlign},set:function(I){["right","end","center","left","start"].indexOf(I)!==-1&&(this.ctx.textAlign=I)}});var kt=null,St=null,Bt=null;Object.defineProperty(this,"fontFaces",{get:function(){return Bt},set:function(I){kt=null,St=null,Bt=I}}),Object.defineProperty(this,"font",{get:function(){return this.ctx.font},set:function(I){var Lt;if(this.ctx.font=I,(Lt=/^\s*(?=(?:(?:[-a-z]+\s*){0,2}(italic|oblique))?)(?=(?:(?:[-a-z]+\s*){0,2}(small-caps))?)(?=(?:(?:[-a-z]+\s*){0,2}(bold(?:er)?|lighter|[1-9]00))?)(?:(?:normal|\1|\2|\3)\s*){0,3}((?:xx?-)?(?:small|large)|medium|smaller|larger|[.\d]+(?:\%|in|[cem]m|ex|p[ctx]))(?:\s*\/\s*(normal|[.\d]+(?:\%|in|[cem]m|ex|p[ctx])))?\s*([-_,\"\'\sa-z0-9]+?)\s*$/i.exec(I))!==null){var ae=Lt[1];Lt[2];var Ht=Lt[3],yt=Lt[4];Lt[5];var Wt=Lt[6],It=/^([.\d]+)((?:%|in|[cem]m|ex|p[ctx]))$/i.exec(yt)[2];yt=Math.floor(It==="px"?parseFloat(yt)*this.pdf.internal.scaleFactor:It==="em"?parseFloat(yt)*this.pdf.getFontSize():parseFloat(yt)*this.pdf.internal.scaleFactor),this.pdf.setFontSize(yt);var qt=(function(jt){var Ue,pe,oe=[],se=jt.trim();if(se==="")return Nh;if(se in Iu)return[Iu[se]];for(;se!=="";){switch(pe=null,Ue=(se=Eu(se)).charAt(0)){case'"':case"'":pe=xd(se.substring(1),Ue);break;default:pe=Ad(se)}if(pe===null||(oe.push(pe[0]),(se=Eu(pe[1]))!==""&&se.charAt(0)!==","))return Nh;se=se.replace(/^,/,"")}return oe})(Wt);if(this.fontFaces){var zt=(function(jt,Ue){var pe=jt.getFontList(),oe=JSON.stringify(pe);if(kt===null||St!==oe){var se=(function(Oe){var Ut=[];return Object.keys(Oe).forEach(function(Ie){Oe[Ie].forEach(function(Zt){var Qt=null;switch(Zt){case"bold":Qt={family:Ie,weight:"bold"};break;case"italic":Qt={family:Ie,style:"italic"};break;case"bolditalic":Qt={family:Ie,weight:"bold",style:"italic"};break;case"":case"normal":Qt={family:Ie}}Qt!==null&&(Qt.ref={name:Ie,style:Zt},Ut.push(Qt))})}),Ut})(pe);kt=(function(Oe){for(var Ut={},Ie=0;Ie<Oe.length;++Ie){var Zt=Ah(Oe[Ie]),Qt=Zt.family,Te=Zt.stretch,le=Zt.style,Gt=Zt.weight;Ut[Qt]=Ut[Qt]||{},Ut[Qt][Te]=Ut[Qt][Te]||{},Ut[Qt][Te][le]=Ut[Qt][Te][le]||{},Ut[Qt][Te][le][Gt]=Zt}return Ut})(se.concat(Ue)),St=oe}return kt})(this.pdf,this.fontFaces),ye=qt.map(function(jt){return{family:jt,stretch:"normal",weight:Ht,style:ae}}),he=(function(jt,Ue,pe){for(var oe=(pe=pe||{}).defaultFontFamily||"times",se=Object.assign({},_d,pe.genericFontFamilies||{}),Oe=null,Ut=null,Ie=0;Ie<Ue.length;++Ie)if(se[(Oe=Ah(Ue[Ie])).family]&&(Oe.family=se[Oe.family]),jt.hasOwnProperty(Oe.family)){Ut=jt[Oe.family];break}if(!(Ut=Ut||jt[oe]))throw new Error("Could not find a font-family for the rule '"+Fu(Oe)+"' and default family '"+oe+"'.");if(Ut=(function(Zt,Qt){if(Qt[Zt])return Qt[Zt];var Te=Fh[Zt],le=Te<=Fh.normal?-1:1,Gt=Pu(Qt,t1,Te,le);if(!Gt)throw new Error("Could not find a matching font-stretch value for "+Zt);return Gt})(Oe.stretch,Ut),Ut=(function(Zt,Qt){if(Qt[Zt])return Qt[Zt];for(var Te=Qu[Zt],le=0;le<Te.length;++le)if(Qt[Te[le]])return Qt[Te[le]];throw new Error("Could not find a matching font-style for "+Zt)})(Oe.style,Ut),!(Ut=(function(Zt,Qt){if(Qt[Zt])return Qt[Zt];if(Zt===400&&Qt[500])return Qt[500];if(Zt===500&&Qt[400])return Qt[400];var Te=yd[Zt],le=Pu(Qt,e1,Te,Zt<400?-1:1);if(!le)throw new Error("Could not find a matching font-weight for value "+Zt);return le})(Oe.weight,Ut)))throw new Error("Failed to resolve a font for the rule '"+Fu(Oe)+"'.");return Ut})(zt,ye);this.pdf.setFont(he.ref.name,he.ref.style)}else{var Jt="";(Ht==="bold"||parseInt(Ht,10)>=700||ae==="bold")&&(Jt="bold"),ae==="italic"&&(Jt+="italic"),Jt.length===0&&(Jt="normal");for(var ce="",fe={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"},Tt=0;Tt<qt.length;Tt++){if(this.pdf.internal.getFont(qt[Tt],Jt,{noFallback:!0,disableWarning:!0})!==void 0){ce=qt[Tt];break}if(Jt==="bolditalic"&&this.pdf.internal.getFont(qt[Tt],"bold",{noFallback:!0,disableWarning:!0})!==void 0)ce=qt[Tt],Jt="bold";else if(this.pdf.internal.getFont(qt[Tt],"normal",{noFallback:!0,disableWarning:!0})!==void 0){ce=qt[Tt],Jt="normal";break}}if(ce===""){for(var ee=0;ee<qt.length;ee++)if(fe[qt[ee]]){ce=fe[qt[ee]];break}}ce=ce===""?"Times":ce,this.pdf.setFont(ce,Jt)}}}}),Object.defineProperty(this,"globalCompositeOperation",{get:function(){return this.ctx.globalCompositeOperation},set:function(I){this.ctx.globalCompositeOperation=I}}),Object.defineProperty(this,"globalAlpha",{get:function(){return this.ctx.globalAlpha},set:function(I){this.ctx.globalAlpha=I}}),Object.defineProperty(this,"lineDashOffset",{get:function(){return this.ctx.lineDashOffset},set:function(I){this.ctx.lineDashOffset=I,wt.call(this)}}),Object.defineProperty(this,"lineDash",{get:function(){return this.ctx.lineDash},set:function(I){this.ctx.lineDash=I,wt.call(this)}}),Object.defineProperty(this,"ignoreClearRect",{get:function(){return this.ctx.ignoreClearRect},set:function(I){this.ctx.ignoreClearRect=!!I}})};y.prototype.setLineDash=function(A){this.lineDash=A},y.prototype.getLineDash=function(){return this.lineDash.length%2?this.lineDash.concat(this.lineDash):this.lineDash.slice()},y.prototype.fill=function(){M.call(this,"fill",!1)},y.prototype.stroke=function(){M.call(this,"stroke",!1)},y.prototype.beginPath=function(){this.path=[{type:"begin"}]},y.prototype.moveTo=function(A,R){if(isNaN(A)||isNaN(R))throw Pe.error("jsPDF.context2d.moveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.moveTo");var B=this.ctx.transform.applyToPoint(new h(A,R));this.path.push({type:"mt",x:B.x,y:B.y}),this.ctx.lastPoint=new h(A,R)},y.prototype.closePath=function(){var A=new h(0,0),R=0;for(R=this.path.length-1;R!==-1;R--)if(this.path[R].type==="begin"&&Le(this.path[R+1])==="object"&&typeof this.path[R+1].x=="number"){A=new h(this.path[R+1].x,this.path[R+1].y);break}this.path.push({type:"close"}),this.ctx.lastPoint=new h(A.x,A.y)},y.prototype.lineTo=function(A,R){if(isNaN(A)||isNaN(R))throw Pe.error("jsPDF.context2d.lineTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.lineTo");var B=this.ctx.transform.applyToPoint(new h(A,R));this.path.push({type:"lt",x:B.x,y:B.y}),this.ctx.lastPoint=new h(B.x,B.y)},y.prototype.clip=function(){this.ctx.clip_path=JSON.parse(JSON.stringify(this.path)),M.call(this,null,!0)},y.prototype.quadraticCurveTo=function(A,R,B,G){if(isNaN(B)||isNaN(G)||isNaN(A)||isNaN(R))throw Pe.error("jsPDF.context2d.quadraticCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.quadraticCurveTo");var $=this.ctx.transform.applyToPoint(new h(B,G)),J=this.ctx.transform.applyToPoint(new h(A,R));this.path.push({type:"qct",x1:J.x,y1:J.y,x:$.x,y:$.y}),this.ctx.lastPoint=new h($.x,$.y)},y.prototype.bezierCurveTo=function(A,R,B,G,$,J){if(isNaN($)||isNaN(J)||isNaN(A)||isNaN(R)||isNaN(B)||isNaN(G))throw Pe.error("jsPDF.context2d.bezierCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.bezierCurveTo");var at=this.ctx.transform.applyToPoint(new h($,J)),ot=this.ctx.transform.applyToPoint(new h(A,R)),gt=this.ctx.transform.applyToPoint(new h(B,G));this.path.push({type:"bct",x1:ot.x,y1:ot.y,x2:gt.x,y2:gt.y,x:at.x,y:at.y}),this.ctx.lastPoint=new h(at.x,at.y)},y.prototype.arc=function(A,R,B,G,$,J){if(isNaN(A)||isNaN(R)||isNaN(B)||isNaN(G)||isNaN($))throw Pe.error("jsPDF.context2d.arc: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.arc");if(J=!!J,!this.ctx.transform.isIdentity){var at=this.ctx.transform.applyToPoint(new h(A,R));A=at.x,R=at.y;var ot=this.ctx.transform.applyToPoint(new h(0,B)),gt=this.ctx.transform.applyToPoint(new h(0,0));B=Math.sqrt(Math.pow(ot.x-gt.x,2)+Math.pow(ot.y-gt.y,2))}Math.abs($-G)>=2*Math.PI&&(G=0,$=2*Math.PI),this.path.push({type:"arc",x:A,y:R,radius:B,startAngle:G,endAngle:$,counterclockwise:J})},y.prototype.arcTo=function(A,R,B,G,$){throw new Error("arcTo not implemented.")},y.prototype.rect=function(A,R,B,G){if(isNaN(A)||isNaN(R)||isNaN(B)||isNaN(G))throw Pe.error("jsPDF.context2d.rect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rect");this.moveTo(A,R),this.lineTo(A+B,R),this.lineTo(A+B,R+G),this.lineTo(A,R+G),this.lineTo(A,R),this.lineTo(A+B,R),this.lineTo(A,R)},y.prototype.fillRect=function(A,R,B,G){if(isNaN(A)||isNaN(R)||isNaN(B)||isNaN(G))throw Pe.error("jsPDF.context2d.fillRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillRect");if(!p.call(this)){var $={};this.lineCap!=="butt"&&($.lineCap=this.lineCap,this.lineCap="butt"),this.lineJoin!=="miter"&&($.lineJoin=this.lineJoin,this.lineJoin="miter"),this.beginPath(),this.rect(A,R,B,G),this.fill(),$.hasOwnProperty("lineCap")&&(this.lineCap=$.lineCap),$.hasOwnProperty("lineJoin")&&(this.lineJoin=$.lineJoin)}},y.prototype.strokeRect=function(A,R,B,G){if(isNaN(A)||isNaN(R)||isNaN(B)||isNaN(G))throw Pe.error("jsPDF.context2d.strokeRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeRect");F.call(this)||(this.beginPath(),this.rect(A,R,B,G),this.stroke())},y.prototype.clearRect=function(A,R,B,G){if(isNaN(A)||isNaN(R)||isNaN(B)||isNaN(G))throw Pe.error("jsPDF.context2d.clearRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.clearRect");this.ignoreClearRect||(this.fillStyle="#ffffff",this.fillRect(A,R,B,G))},y.prototype.save=function(A){A=typeof A!="boolean"||A;for(var R=this.pdf.internal.getCurrentPageInfo().pageNumber,B=0;B<this.pdf.internal.getNumberOfPages();B++)this.pdf.setPage(B+1),this.pdf.internal.out("q");if(this.pdf.setPage(R),A){this.ctx.fontSize=this.pdf.internal.getFontSize();var G=new g(this.ctx);this.ctxStack.push(this.ctx),this.ctx=G}},y.prototype.restore=function(A){A=typeof A!="boolean"||A;for(var R=this.pdf.internal.getCurrentPageInfo().pageNumber,B=0;B<this.pdf.internal.getNumberOfPages();B++)this.pdf.setPage(B+1),this.pdf.internal.out("Q");this.pdf.setPage(R),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)},y.prototype.toDataURL=function(){throw new Error("toDataUrl not implemented.")};var x=function(A){var R,B,G,$;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))R=0,B=0,G=0,$=0;else{var J=/rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/.exec(A);if(J!==null)R=parseInt(J[1]),B=parseInt(J[2]),G=parseInt(J[3]),$=1;else if((J=/rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)/.exec(A))!==null)R=parseInt(J[1]),B=parseInt(J[2]),G=parseInt(J[3]),$=parseFloat(J[4]);else{if($=1,typeof A=="string"&&A.charAt(0)!=="#"){var at=new Vu(A);A=at.ok?at.toHex():"#000000"}A.length===4?(R=A.substring(1,2),R+=R,B=A.substring(2,3),B+=B,G=A.substring(3,4),G+=G):(R=A.substring(1,3),B=A.substring(3,5),G=A.substring(5,7)),R=parseInt(R,16),B=parseInt(B,16),G=parseInt(G,16)}}return{r:R,g:B,b:G,a:$,style:A}},p=function(){return this.ctx.isFillTransparent||this.globalAlpha==0},F=function(){return!!(this.ctx.isStrokeTransparent||this.globalAlpha==0)};y.prototype.fillText=function(A,R,B,G){if(isNaN(R)||isNaN(B)||typeof A!="string")throw Pe.error("jsPDF.context2d.fillText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillText");if(G=isNaN(G)?void 0:G,!p.call(this)){var $=nt(this.ctx.transform.rotation),J=this.ctx.transform.scaleX;O.call(this,{text:A,x:R,y:B,scale:J,angle:$,align:this.textAlign,maxWidth:G})}},y.prototype.strokeText=function(A,R,B,G){if(isNaN(R)||isNaN(B)||typeof A!="string")throw Pe.error("jsPDF.context2d.strokeText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeText");if(!F.call(this)){G=isNaN(G)?void 0:G;var $=nt(this.ctx.transform.rotation),J=this.ctx.transform.scaleX;O.call(this,{text:A,x:R,y:B,scale:J,renderingMode:"stroke",angle:$,align:this.textAlign,maxWidth:G})}},y.prototype.measureText=function(A){if(typeof A!="string")throw Pe.error("jsPDF.context2d.measureText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.measureText");var R=this.pdf,B=this.pdf.internal.scaleFactor,G=R.internal.getFontSize(),$=R.getStringUnitWidth(A)*G/R.internal.scaleFactor;return new function(J){var at=(J=J||{}).width||0;return Object.defineProperty(this,"width",{get:function(){return at}}),this}({width:$*=Math.round(96*B/72*1e4)/1e4})},y.prototype.scale=function(A,R){if(isNaN(A)||isNaN(R))throw Pe.error("jsPDF.context2d.scale: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.scale");var B=new f(A,0,0,R,0,0);this.ctx.transform=this.ctx.transform.multiply(B)},y.prototype.rotate=function(A){if(isNaN(A))throw Pe.error("jsPDF.context2d.rotate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rotate");var R=new f(Math.cos(A),Math.sin(A),-Math.sin(A),Math.cos(A),0,0);this.ctx.transform=this.ctx.transform.multiply(R)},y.prototype.translate=function(A,R){if(isNaN(A)||isNaN(R))throw Pe.error("jsPDF.context2d.translate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.translate");var B=new f(1,0,0,1,A,R);this.ctx.transform=this.ctx.transform.multiply(B)},y.prototype.transform=function(A,R,B,G,$,J){if(isNaN(A)||isNaN(R)||isNaN(B)||isNaN(G)||isNaN($)||isNaN(J))throw Pe.error("jsPDF.context2d.transform: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.transform");var at=new f(A,R,B,G,$,J);this.ctx.transform=this.ctx.transform.multiply(at)},y.prototype.setTransform=function(A,R,B,G,$,J){A=isNaN(A)?1:A,R=isNaN(R)?0:R,B=isNaN(B)?0:B,G=isNaN(G)?1:G,$=isNaN($)?0:$,J=isNaN(J)?0:J,this.ctx.transform=new f(A,R,B,G,$,J)};var P=function(){return this.margin[0]>0||this.margin[1]>0||this.margin[2]>0||this.margin[3]>0};y.prototype.drawImage=function(A,R,B,G,$,J,at,ot,gt){var xt=this.pdf.getImageProperties(A),kt=1,St=1,Bt=1,I=1;G!==void 0&&ot!==void 0&&(Bt=ot/G,I=gt/$,kt=xt.width/G*ot/G,St=xt.height/$*gt/$),J===void 0&&(J=R,at=B,R=0,B=0),G!==void 0&&ot===void 0&&(ot=G,gt=$),G===void 0&&ot===void 0&&(ot=xt.width,gt=xt.height);var Lt=this.ctx.transform.decompose(),ae=nt(Lt.rotate.shx),Ht=new f,yt=(Ht=(Ht=(Ht=Ht.multiply(Lt.translate)).multiply(Lt.skew)).multiply(Lt.scale)).applyToRectangle(new l(J-R*Bt,at-B*I,G*kt,$*St));if(this.autoPaging){for(var Wt,It=D.call(this,yt),qt=[],zt=0;zt<It.length;zt+=1)qt.indexOf(It[zt])===-1&&qt.push(It[zt]);q(qt);for(var ye=qt[0],he=qt[qt.length-1],Jt=ye;Jt<he+1;Jt++){this.pdf.setPage(Jt);var ce=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],fe=Jt===1?this.posY+this.margin[0]:this.margin[0],Tt=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],jt=Jt===1?0:Tt+(Jt-2)*ee;if(this.ctx.clip_path.length!==0){var Ue=this.path;Wt=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=H(Wt,this.posX+this.margin[3],-jt+fe+this.ctx.prevPageLastElemOffset),rt.call(this,"fill",!0),this.path=Ue}var pe=JSON.parse(JSON.stringify(yt));pe=H([pe],this.posX+this.margin[3],-jt+fe+this.ctx.prevPageLastElemOffset)[0];var oe=(Jt>ye||Jt<he)&&P.call(this);oe&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],ce,ee,null).clip().discardPath()),this.pdf.addImage(A,"JPEG",pe.x,pe.y,pe.w,pe.h,null,null,ae),oe&&this.pdf.restoreGraphicsState()}}else this.pdf.addImage(A,"JPEG",yt.x,yt.y,yt.w,yt.h,null,null,ae)};var D=function(A,R,B){var G=[];R=R||this.pdf.internal.pageSize.width,B=B||this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2];var $=this.posY+this.ctx.prevPageLastElemOffset;switch(A.type){default:case"mt":case"lt":G.push(Math.floor((A.y+$)/B)+1);break;case"arc":G.push(Math.floor((A.y+$-A.radius)/B)+1),G.push(Math.floor((A.y+$+A.radius)/B)+1);break;case"qct":var J=ut(this.ctx.lastPoint.x,this.ctx.lastPoint.y,A.x1,A.y1,A.x,A.y);G.push(Math.floor((J.y+$)/B)+1),G.push(Math.floor((J.y+J.h+$)/B)+1);break;case"bct":var at=At(this.ctx.lastPoint.x,this.ctx.lastPoint.y,A.x1,A.y1,A.x2,A.y2,A.x,A.y);G.push(Math.floor((at.y+$)/B)+1),G.push(Math.floor((at.y+at.h+$)/B)+1);break;case"rect":G.push(Math.floor((A.y+$)/B)+1),G.push(Math.floor((A.y+A.h+$)/B)+1)}for(var ot=0;ot<G.length;ot+=1)for(;this.pdf.internal.getNumberOfPages()<G[ot];)N.call(this);return G},N=function(){var A=this.fillStyle,R=this.strokeStyle,B=this.font,G=this.lineCap,$=this.lineWidth,J=this.lineJoin;this.pdf.addPage(),this.fillStyle=A,this.strokeStyle=R,this.font=B,this.lineCap=G,this.lineWidth=$,this.lineJoin=J},H=function(A,R,B){for(var G=0;G<A.length;G++)switch(A[G].type){case"bct":A[G].x2+=R,A[G].y2+=B;case"qct":A[G].x1+=R,A[G].y1+=B;default:A[G].x+=R,A[G].y+=B}return A},q=function(A){return A.sort(function(R,B){return R-B})},M=function(A,R){var B=this.fillStyle,G=this.strokeStyle,$=this.lineCap,J=this.lineWidth,at=Math.abs(J*this.ctx.transform.scaleX),ot=this.lineJoin;if(this.autoPaging){for(var gt,xt,kt=JSON.parse(JSON.stringify(this.path)),St=JSON.parse(JSON.stringify(this.path)),Bt=[],I=0;I<St.length;I++)if(St[I].x!==void 0)for(var Lt=D.call(this,St[I]),ae=0;ae<Lt.length;ae+=1)Bt.indexOf(Lt[ae])===-1&&Bt.push(Lt[ae]);for(var Ht=0;Ht<Bt.length;Ht++)for(;this.pdf.internal.getNumberOfPages()<Bt[Ht];)N.call(this);q(Bt);for(var yt=Bt[0],Wt=Bt[Bt.length-1],It=yt;It<Wt+1;It++){this.pdf.setPage(It),this.fillStyle=B,this.strokeStyle=G,this.lineCap=$,this.lineWidth=at,this.lineJoin=ot;var qt=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],zt=It===1?this.posY+this.margin[0]:this.margin[0],ye=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],he=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],Jt=It===1?0:ye+(It-2)*he;if(this.ctx.clip_path.length!==0){var ce=this.path;gt=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=H(gt,this.posX+this.margin[3],-Jt+zt+this.ctx.prevPageLastElemOffset),rt.call(this,A,!0),this.path=ce}if(xt=JSON.parse(JSON.stringify(kt)),this.path=H(xt,this.posX+this.margin[3],-Jt+zt+this.ctx.prevPageLastElemOffset),R===!1||It===0){var fe=(It>yt||It<Wt)&&P.call(this);fe&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],qt,he,null).clip().discardPath()),rt.call(this,A,R),fe&&this.pdf.restoreGraphicsState()}this.lineWidth=J}this.path=kt}else this.lineWidth=at,rt.call(this,A,R),this.lineWidth=J},rt=function(A,R){if((A!=="stroke"||R||!F.call(this))&&(A==="stroke"||R||!p.call(this))){for(var B,G,$=[],J=this.path,at=0;at<J.length;at++){var ot=J[at];switch(ot.type){case"begin":$.push({begin:!0});break;case"close":$.push({close:!0});break;case"mt":$.push({start:ot,deltas:[],abs:[]});break;case"lt":var gt=$.length;if(J[at-1]&&!isNaN(J[at-1].x)&&(B=[ot.x-J[at-1].x,ot.y-J[at-1].y],gt>0)){for(;gt>=0;gt--)if($[gt-1].close!==!0&&$[gt-1].begin!==!0){$[gt-1].deltas.push(B),$[gt-1].abs.push(ot);break}}break;case"bct":B=[ot.x1-J[at-1].x,ot.y1-J[at-1].y,ot.x2-J[at-1].x,ot.y2-J[at-1].y,ot.x-J[at-1].x,ot.y-J[at-1].y],$[$.length-1].deltas.push(B);break;case"qct":var xt=J[at-1].x+2/3*(ot.x1-J[at-1].x),kt=J[at-1].y+2/3*(ot.y1-J[at-1].y),St=ot.x+2/3*(ot.x1-ot.x),Bt=ot.y+2/3*(ot.y1-ot.y),I=ot.x,Lt=ot.y;B=[xt-J[at-1].x,kt-J[at-1].y,St-J[at-1].x,Bt-J[at-1].y,I-J[at-1].x,Lt-J[at-1].y],$[$.length-1].deltas.push(B);break;case"arc":$.push({deltas:[],abs:[],arc:!0}),Array.isArray($[$.length-1].abs)&&$[$.length-1].abs.push(ot)}}G=R?null:A==="stroke"?"stroke":"fill";for(var ae=!1,Ht=0;Ht<$.length;Ht++)if($[Ht].arc)for(var yt=$[Ht].abs,Wt=0;Wt<yt.length;Wt++){var It=yt[Wt];It.type==="arc"?Y.call(this,It.x,It.y,It.radius,It.startAngle,It.endAngle,It.counterclockwise,void 0,R,!ae):W.call(this,It.x,It.y),ae=!0}else if($[Ht].close===!0)this.pdf.internal.out("h"),ae=!1;else if($[Ht].begin!==!0){var qt=$[Ht].start.x,zt=$[Ht].start.y;U.call(this,$[Ht].deltas,qt,zt),ae=!0}G&&j.call(this,G),R&&tt.call(this)}},mt=function(A){var R=this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor,B=R*(this.pdf.internal.getLineHeightFactor()-1);switch(this.ctx.textBaseline){case"bottom":return A-B;case"top":return A+R-B;case"hanging":return A+R-2*B;case"middle":return A+R/2-B;default:return A}},ct=function(A){return A+this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor*(this.pdf.internal.getLineHeightFactor()-1)};y.prototype.createLinearGradient=function(){var A=function(){};return A.colorStops=[],A.addColorStop=function(R,B){this.colorStops.push([R,B])},A.getColor=function(){return this.colorStops.length===0?"#000000":this.colorStops[0][1]},A.isCanvasGradient=!0,A},y.prototype.createPattern=function(){return this.createLinearGradient()},y.prototype.createRadialGradient=function(){return this.createLinearGradient()};var Y=function(A,R,B,G,$,J,at,ot,gt){for(var xt=st.call(this,B,G,$,J),kt=0;kt<xt.length;kt++){var St=xt[kt];kt===0&&(gt?S.call(this,St.x1+A,St.y1+R):W.call(this,St.x1+A,St.y1+R)),it.call(this,A,R,St.x2,St.y2,St.x3,St.y3,St.x4,St.y4)}ot?tt.call(this):j.call(this,at)},j=function(A){switch(A){case"stroke":this.pdf.internal.out("S");break;case"fill":this.pdf.internal.out("f")}},tt=function(){this.pdf.clip(),this.pdf.discardPath()},S=function(A,R){this.pdf.internal.out(e(A)+" "+r(R)+" m")},O=function(A){var R;switch(A.align){case"right":case"end":R="right";break;case"center":R="center";break;default:R="left"}var B,G,$,J=this.pdf.getTextDimensions(A.text),at=mt.call(this,A.y),ot=ct.call(this,at)-J.h,gt=this.ctx.transform.applyToPoint(new h(A.x,at));if(this.autoPaging){var xt=this.ctx.transform.decompose(),kt=new f;kt=(kt=(kt=kt.multiply(xt.translate)).multiply(xt.skew)).multiply(xt.scale);for(var St=this.ctx.transform.applyToRectangle(new l(A.x,at,J.w,J.h)),Bt=kt.applyToRectangle(new l(A.x,ot,J.w,J.h)),I=D.call(this,Bt),Lt=[],ae=0;ae<I.length;ae+=1)Lt.indexOf(I[ae])===-1&&Lt.push(I[ae]);q(Lt);for(var Ht=Lt[0],yt=Lt[Lt.length-1],Wt=Ht;Wt<yt+1;Wt++){this.pdf.setPage(Wt);var It=Wt===1?this.posY+this.margin[0]:this.margin[0],qt=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],zt=this.pdf.internal.pageSize.height-this.margin[2],ye=zt-this.margin[0],he=this.pdf.internal.pageSize.width-this.margin[1],Jt=he-this.margin[3],ce=Wt===1?0:qt+(Wt-2)*ye;if(this.ctx.clip_path.length!==0){var fe=this.path;B=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=H(B,this.posX+this.margin[3],-1*ce+It),rt.call(this,"fill",!0),this.path=fe}var Tt=H([JSON.parse(JSON.stringify(Bt))],this.posX+this.margin[3],-ce+It+this.ctx.prevPageLastElemOffset)[0];A.scale>=.01&&(G=this.pdf.internal.getFontSize(),this.pdf.setFontSize(G*A.scale),$=this.lineWidth,this.lineWidth=$*A.scale);var ee=this.autoPaging!=="text";if(ee||Tt.y+Tt.h<=zt){if(ee||Tt.y>=It&&Tt.x<=he){var jt=ee?A.text:this.pdf.splitTextToSize(A.text,A.maxWidth||he-Tt.x)[0],Ue=H([JSON.parse(JSON.stringify(St))],this.posX+this.margin[3],-ce+It+this.ctx.prevPageLastElemOffset)[0],pe=ee&&(Wt>Ht||Wt<yt)&&P.call(this);pe&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],Jt,ye,null).clip().discardPath()),this.pdf.text(jt,Ue.x,Ue.y,{angle:A.angle,align:R,renderingMode:A.renderingMode}),pe&&this.pdf.restoreGraphicsState()}}else Tt.y<zt&&(this.ctx.prevPageLastElemOffset+=zt-Tt.y);A.scale>=.01&&(this.pdf.setFontSize(G),this.lineWidth=$)}}else A.scale>=.01&&(G=this.pdf.internal.getFontSize(),this.pdf.setFontSize(G*A.scale),$=this.lineWidth,this.lineWidth=$*A.scale),this.pdf.text(A.text,gt.x+this.posX,gt.y+this.posY,{angle:A.angle,align:R,renderingMode:A.renderingMode,maxWidth:A.maxWidth}),A.scale>=.01&&(this.pdf.setFontSize(G),this.lineWidth=$)},W=function(A,R,B,G){B=B||0,G=G||0,this.pdf.internal.out(e(A+B)+" "+r(R+G)+" l")},U=function(A,R,B){return this.pdf.lines(A,R,B,null,null)},it=function(A,R,B,G,$,J,at,ot){this.pdf.internal.out([n(i(B+A)),n(a(G+R)),n(i($+A)),n(a(J+R)),n(i(at+A)),n(a(ot+R)),"c"].join(" "))},st=function(A,R,B,G){for(var $=2*Math.PI,J=Math.PI/2;R>B;)R-=$;var at=Math.abs(B-R);at<$&&G&&(at=$-at);for(var ot=[],gt=G?-1:1,xt=R;at>1e-5;){var kt=xt+gt*Math.min(at,J);ot.push(ht.call(this,A,xt,kt)),at-=Math.abs(kt-xt),xt=kt}return ot},ht=function(A,R,B){var G=(B-R)/2,$=A*Math.cos(G),J=A*Math.sin(G),at=$,ot=-J,gt=at*at+ot*ot,xt=gt+at*$+ot*J,kt=4/3*(Math.sqrt(2*gt*xt)-xt)/(at*J-ot*$),St=at-kt*ot,Bt=ot+kt*at,I=St,Lt=-Bt,ae=G+R,Ht=Math.cos(ae),yt=Math.sin(ae);return{x1:A*Math.cos(R),y1:A*Math.sin(R),x2:St*Ht-Bt*yt,y2:St*yt+Bt*Ht,x3:I*Ht-Lt*yt,y3:I*yt+Lt*Ht,x4:A*Math.cos(B),y4:A*Math.sin(B)}},nt=function(A){return 180*A/Math.PI},ut=function(A,R,B,G,$,J){var at=A+.5*(B-A),ot=R+.5*(G-R),gt=$+.5*(B-$),xt=J+.5*(G-J),kt=Math.min(A,$,at,gt),St=Math.max(A,$,at,gt),Bt=Math.min(R,J,ot,xt),I=Math.max(R,J,ot,xt);return new l(kt,Bt,St-kt,I-Bt)},At=function(A,R,B,G,$,J,at,ot){var gt,xt,kt,St,Bt,I,Lt,ae,Ht,yt,Wt,It,qt,zt,ye=B-A,he=G-R,Jt=$-B,ce=J-G,fe=at-$,Tt=ot-J;for(xt=0;xt<41;xt++)Ht=(Lt=(kt=A+(gt=xt/40)*ye)+gt*((Bt=B+gt*Jt)-kt))+gt*(Bt+gt*($+gt*fe-Bt)-Lt),yt=(ae=(St=R+gt*he)+gt*((I=G+gt*ce)-St))+gt*(I+gt*(J+gt*Tt-I)-ae),xt==0?(Wt=Ht,It=yt,qt=Ht,zt=yt):(Wt=Math.min(Wt,Ht),It=Math.min(It,yt),qt=Math.max(qt,Ht),zt=Math.max(zt,yt));return new l(Math.round(Wt),Math.round(It),Math.round(qt-Wt),Math.round(zt-It))},wt=function(){if(this.prevLineDash||this.ctx.lineDash.length||this.ctx.lineDashOffset){var A,R,B=(A=this.ctx.lineDash,R=this.ctx.lineDashOffset,JSON.stringify({lineDash:A,lineDashOffset:R}));this.prevLineDash!==B&&(this.pdf.setLineDash(this.ctx.lineDash,this.ctx.lineDashOffset),this.prevLineDash=B)}}})(Rt.API),(function(t){var n=function(h){var l,f,u,g,y,x,p,F,P,D;for(/[^\x00-\xFF]/.test(h),f=[],u=0,g=(h+=l="\0\0\0\0".slice(h.length%4||4)).length;g>u;u+=4)(y=(h.charCodeAt(u)<<24)+(h.charCodeAt(u+1)<<16)+(h.charCodeAt(u+2)<<8)+h.charCodeAt(u+3))!==0?(x=(y=((y=((y=((y=(y-(D=y%85))/85)-(P=y%85))/85)-(F=y%85))/85)-(p=y%85))/85)%85,f.push(x+33,p+33,F+33,P+33,D+33)):f.push(122);return(function(N,H){for(var q=H;q>0;q--)N.pop()})(f,l.length),String.fromCharCode.apply(String,f)+"~>"},e=function(h){var l,f,u,g,y,x=String,p="length",F=255,P="charCodeAt",D="slice",N="replace";for(h[D](-2),h=h[D](0,-2)[N](/\s/g,"")[N]("z","!!!!!"),u=[],g=0,y=(h+=l="uuuuu"[D](h[p]%5||5))[p];y>g;g+=5)f=52200625*(h[P](g)-33)+614125*(h[P](g+1)-33)+7225*(h[P](g+2)-33)+85*(h[P](g+3)-33)+(h[P](g+4)-33),u.push(F&f>>24,F&f>>16,F&f>>8,F&f);return(function(H,q){for(var M=q;M>0;M--)H.pop()})(u,l[p]),x.fromCharCode.apply(x,u)},r=function(h){return h.split("").map(function(l){return("0"+l.charCodeAt().toString(16)).slice(-2)}).join("")+">"},i=function(h){var l=new RegExp(/^([0-9A-Fa-f]{2})+$/);if((h=h.replace(/\s/g,"")).indexOf(">")!==-1&&(h=h.substr(0,h.indexOf(">"))),h.length%2&&(h+="0"),l.test(h)===!1)return"";for(var f="",u=0;u<h.length;u+=2)f+=String.fromCharCode("0x"+(h[u]+h[u+1]));return f},a=function(h){for(var l=new Uint8Array(h.length),f=h.length;f--;)l[f]=h.charCodeAt(f);return(l=ds(l)).reduce(function(u,g){return u+String.fromCharCode(g)},"")};t.processDataByFilters=function(h,l){var f=0,u=h||"",g=[];for(typeof(l=l||[])=="string"&&(l=[l]),f=0;f<l.length;f+=1)switch(l[f]){case"ASCII85Decode":case"/ASCII85Decode":u=e(u),g.push("/ASCII85Encode");break;case"ASCII85Encode":case"/ASCII85Encode":u=n(u),g.push("/ASCII85Decode");break;case"ASCIIHexDecode":case"/ASCIIHexDecode":u=i(u),g.push("/ASCIIHexEncode");break;case"ASCIIHexEncode":case"/ASCIIHexEncode":u=r(u),g.push("/ASCIIHexDecode");break;case"FlateEncode":case"/FlateEncode":u=a(u),g.push("/FlateDecode");break;default:throw new Error('The filter: "'+l[f]+'" is not implemented')}return{data:u,reverseChain:g.reverse().join(" ")}}})(Rt.API),(function(t){t.loadFile=function(n,e,r){return(function(i,a,h){a=a!==!1,h=typeof h=="function"?h:function(){};var l=void 0;try{l=(function(f,u,g){var y=new XMLHttpRequest,x=0,p=function(F){var P=F.length,D=[],N=String.fromCharCode;for(x=0;x<P;x+=1)D.push(N(255&F.charCodeAt(x)));return D.join("")};if(y.open("GET",f,!u),y.overrideMimeType("text/plain; charset=x-user-defined"),u===!1&&(y.onload=function(){y.status===200?g(p(this.responseText)):g(void 0)}),y.send(null),u&&y.status===200)return p(y.responseText)})(i,a,h)}catch{}return l})(n,e,r)},t.loadImageFile=t.loadFile})(Rt.API),(function(t){function n(){return($t.html2canvas?Promise.resolve($t.html2canvas):import("./PKOJQT4I.js")).catch(function(l){return Promise.reject(new Error("Could not load html2canvas: "+l))}).then(function(l){return l.default?l.default:l})}function e(){return($t.DOMPurify?Promise.resolve($t.DOMPurify):import("./ACTGIDKO.js")).catch(function(l){return Promise.reject(new Error("Could not load dompurify: "+l))}).then(function(l){return l.default?l.default:l})}var r=function(l){var f=Le(l);return f==="undefined"?"undefined":f==="string"||l instanceof String?"string":f==="number"||l instanceof Number?"number":f==="function"||l instanceof Function?"function":l&&l.constructor===Array?"array":l&&l.nodeType===1?"element":f==="object"?"object":"unknown"},i=function(l,f){var u=document.createElement(l);for(var g in f.className&&(u.className=f.className),f.innerHTML&&f.dompurify&&(u.innerHTML=f.dompurify.sanitize(f.innerHTML)),f.style)u.style[g]=f.style[g];return u},a=function l(f,u){for(var g=f.nodeType===3?document.createTextNode(f.nodeValue):f.cloneNode(!1),y=f.firstChild;y;y=y.nextSibling)u!==!0&&y.nodeType===1&&y.nodeName==="SCRIPT"||g.appendChild(l(y,u));return f.nodeType===1&&(f.nodeName==="CANVAS"?(g.width=f.width,g.height=f.height,g.getContext("2d").drawImage(f,0,0)):f.nodeName!=="TEXTAREA"&&f.nodeName!=="SELECT"||(g.value=f.value),g.addEventListener("load",function(){g.scrollTop=f.scrollTop,g.scrollLeft=f.scrollLeft},!0)),g},h=function l(f){var u=Object.assign(l.convert(Promise.resolve()),JSON.parse(JSON.stringify(l.template))),g=l.convert(Promise.resolve(),u);return(g=g.setProgress(1,l,1,[l])).set(f)};(h.prototype=Object.create(Promise.prototype)).constructor=h,h.convert=function(l,f){return l.__proto__=f||h.prototype,l},h.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"}},h.prototype.from=function(l,f){return this.then(function(){switch(f=f||(function(u){switch(r(u)){case"string":return"string";case"element":return u.nodeName.toLowerCase()==="canvas"?"canvas":"element";default:return"unknown"}})(l),f){case"string":return this.then(e).then(function(u){return this.set({src:i("div",{innerHTML:l,dompurify:u})})});case"element":return this.set({src:l});case"canvas":return this.set({canvas:l});case"img":return this.set({img:l});default:return this.error("Unknown source type.")}})},h.prototype.to=function(l){switch(l){case"container":return this.toContainer();case"canvas":return this.toCanvas();case"img":return this.toImg();case"pdf":return this.toPdf();default:return this.error("Invalid target.")}},h.prototype.toContainer=function(){return this.thenList([function(){return this.prop.src||this.error("Cannot duplicate - no source HTML.")},function(){return this.prop.pageSize||this.setPageSize()}]).then(function(){var l={position:"relative",display:"inline-block",width:(typeof this.opt.width!="number"||isNaN(this.opt.width)||typeof this.opt.windowWidth!="number"||isNaN(this.opt.windowWidth)?Math.max(this.prop.src.clientWidth,this.prop.src.scrollWidth,this.prop.src.offsetWidth):this.opt.windowWidth)+"px",left:0,right:0,top:0,margin:"auto",backgroundColor:this.opt.backgroundColor},f=a(this.prop.src,this.opt.html2canvas.javascriptEnabled);f.tagName==="BODY"&&(l.height=Math.max(document.body.scrollHeight,document.body.offsetHeight,document.documentElement.clientHeight,document.documentElement.scrollHeight,document.documentElement.offsetHeight)+"px"),this.prop.overlay=i("div",{className:"html2pdf__overlay",style:{position:"fixed",overflow:"hidden",zIndex:1e3,left:"-100000px",right:0,bottom:0,top:0}}),this.prop.container=i("div",{className:"html2pdf__container",style:l}),this.prop.container.appendChild(f),this.prop.container.firstChild.appendChild(i("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"})},h.prototype.toCanvas=function(){var l=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(l).then(n).then(function(f){var u=Object.assign({},this.opt.html2canvas);return delete u.onrendered,f(this.prop.container,u)}).then(function(f){(this.opt.html2canvas.onrendered||function(){})(f),this.prop.canvas=f,document.body.removeChild(this.prop.overlay)})},h.prototype.toContext2d=function(){var l=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(l).then(n).then(function(f){var u=this.opt.jsPDF,g=this.opt.fontFaces,y=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,x=Object.assign({async:!0,allowTaint:!0,scale:y,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 x.onrendered,u.context2d.autoPaging=this.opt.autoPaging===void 0||this.opt.autoPaging,u.context2d.posX=this.opt.x,u.context2d.posY=this.opt.y,u.context2d.margin=this.opt.margin,u.context2d.fontFaces=g,g)for(var p=0;p<g.length;++p){var F=g[p],P=F.src.find(function(D){return D.format==="truetype"});P&&u.addFont(P.url,F.ref.name,F.ref.style)}return x.windowHeight=x.windowHeight||0,x.windowHeight=x.windowHeight==0?Math.max(this.prop.container.clientHeight,this.prop.container.scrollHeight,this.prop.container.offsetHeight):x.windowHeight,u.context2d.save(!0),f(this.prop.container,x)}).then(function(f){this.opt.jsPDF.context2d.restore(!0),(this.opt.html2canvas.onrendered||function(){})(f),this.prop.canvas=f,document.body.removeChild(this.prop.overlay)})},h.prototype.toImg=function(){return this.thenList([function(){return this.prop.canvas||this.toCanvas()}]).then(function(){var l=this.prop.canvas.toDataURL("image/"+this.opt.image.type,this.opt.image.quality);this.prop.img=document.createElement("img"),this.prop.img.src=l})},h.prototype.toPdf=function(){return this.thenList([function(){return this.toContext2d()}]).then(function(){this.prop.pdf=this.prop.pdf||this.opt.jsPDF})},h.prototype.output=function(l,f,u){return(u=u||"pdf").toLowerCase()==="img"||u.toLowerCase()==="image"?this.outputImg(l,f):this.outputPdf(l,f)},h.prototype.outputPdf=function(l,f){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then(function(){return this.prop.pdf.output(l,f)})},h.prototype.outputImg=function(l){return this.thenList([function(){return this.prop.img||this.toImg()}]).then(function(){switch(l){case void 0:case"img":return this.prop.img;case"datauristring":case"dataurlstring":return this.prop.img.src;case"datauri":case"dataurl":return document.location.href=this.prop.img.src;default:throw'Image output type "'+l+'" is not supported.'}})},h.prototype.save=function(l){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).set(l?{filename:l}:null).then(function(){this.prop.pdf.save(this.opt.filename)})},h.prototype.doCallback=function(){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then(function(){this.prop.callback(this.prop.pdf)})},h.prototype.set=function(l){if(r(l)!=="object")return this;var f=Object.keys(l||{}).map(function(u){if(u in h.template.prop)return function(){this.prop[u]=l[u]};switch(u){case"margin":return this.setMargin.bind(this,l.margin);case"jsPDF":return function(){return this.opt.jsPDF=l.jsPDF,this.setPageSize()};case"pageSize":return this.setPageSize.bind(this,l.pageSize);default:return function(){this.opt[u]=l[u]}}},this);return this.then(function(){return this.thenList(f)})},h.prototype.get=function(l,f){return this.then(function(){var u=l in h.template.prop?this.prop[l]:this.opt[l];return f?f(u):u})},h.prototype.setMargin=function(l){return this.then(function(){switch(r(l)){case"number":l=[l,l,l,l];case"array":if(l.length===2&&(l=[l[0],l[1],l[0],l[1]]),l.length===4)break;default:return this.error("Invalid margin array.")}this.opt.margin=l}).then(this.setPageSize)},h.prototype.setPageSize=function(l){function f(u,g){return Math.floor(u*g/72*96)}return this.then(function(){(l=l||Rt.getPageSize(this.opt.jsPDF)).hasOwnProperty("inner")||(l.inner={width:l.width-this.opt.margin[1]-this.opt.margin[3],height:l.height-this.opt.margin[0]-this.opt.margin[2]},l.inner.px={width:f(l.inner.width,l.k),height:f(l.inner.height,l.k)},l.inner.ratio=l.inner.height/l.inner.width),this.prop.pageSize=l})},h.prototype.setProgress=function(l,f,u,g){return l!=null&&(this.progress.val=l),f!=null&&(this.progress.state=f),u!=null&&(this.progress.n=u),g!=null&&(this.progress.stack=g),this.progress.ratio=this.progress.val/this.progress.state,this},h.prototype.updateProgress=function(l,f,u,g){return this.setProgress(l?this.progress.val+l:null,f||null,u?this.progress.n+u:null,g?this.progress.stack.concat(g):null)},h.prototype.then=function(l,f){var u=this;return this.thenCore(l,f,function(g,y){return u.updateProgress(null,null,1,[g]),Promise.prototype.then.call(this,function(x){return u.updateProgress(null,g),x}).then(g,y).then(function(x){return u.updateProgress(1),x})})},h.prototype.thenCore=function(l,f,u){u=u||Promise.prototype.then;var g=this;l&&(l=l.bind(g)),f&&(f=f.bind(g));var y=Promise.toString().indexOf("[native code]")!==-1&&Promise.name==="Promise"?g:h.convert(Object.assign({},g),Promise.prototype),x=u.call(y,l,f);return h.convert(x,g.__proto__)},h.prototype.thenExternal=function(l,f){return Promise.prototype.then.call(this,l,f)},h.prototype.thenList=function(l){var f=this;return l.forEach(function(u){f=f.thenCore(u)}),f},h.prototype.catch=function(l){l&&(l=l.bind(this));var f=Promise.prototype.catch.call(this,l);return h.convert(f,this)},h.prototype.catchExternal=function(l){return Promise.prototype.catch.call(this,l)},h.prototype.error=function(l){return this.then(function(){throw new Error(l)})},h.prototype.using=h.prototype.set,h.prototype.saveAs=h.prototype.save,h.prototype.export=h.prototype.output,h.prototype.run=h.prototype.then,Rt.getPageSize=function(l,f,u){if(Le(l)==="object"){var g=l;l=g.orientation,f=g.unit||f,u=g.format||u}f=f||"mm",u=u||"a4",l=(""+(l||"P")).toLowerCase();var y,x=(""+u).toLowerCase(),p={a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89],a5:[419.53,595.28],a6:[297.64,419.53],a7:[209.76,297.64],a8:[147.4,209.76],a9:[104.88,147.4],a10:[73.7,104.88],b0:[2834.65,4008.19],b1:[2004.09,2834.65],b2:[1417.32,2004.09],b3:[1000.63,1417.32],b4:[708.66,1000.63],b5:[498.9,708.66],b6:[354.33,498.9],b7:[249.45,354.33],b8:[175.75,249.45],b9:[124.72,175.75],b10:[87.87,124.72],c0:[2599.37,3676.54],c1:[1836.85,2599.37],c2:[1298.27,1836.85],c3:[918.43,1298.27],c4:[649.13,918.43],c5:[459.21,649.13],c6:[323.15,459.21],c7:[229.61,323.15],c8:[161.57,229.61],c9:[113.39,161.57],c10:[79.37,113.39],dl:[311.81,623.62],letter:[612,792],"government-letter":[576,756],legal:[612,1008],"junior-legal":[576,360],ledger:[1224,792],tabloid:[792,1224],"credit-card":[153,243]};switch(f){case"pt":y=1;break;case"mm":y=72/25.4;break;case"cm":y=72/2.54;break;case"in":y=72;break;case"px":y=.75;break;case"pc":case"em":y=12;break;case"ex":y=6;break;default:throw"Invalid unit: "+f}var F,P=0,D=0;if(p.hasOwnProperty(x))P=p[x][1]/y,D=p[x][0]/y;else try{P=u[1],D=u[0]}catch{throw new Error("Invalid format: "+u)}if(l==="p"||l==="portrait")l="p",D>P&&(F=D,D=P,P=F);else{if(l!=="l"&&l!=="landscape")throw"Invalid orientation: "+l;l="l",P>D&&(F=D,D=P,P=F)}return{width:D,height:P,unit:f,k:y,orientation:l}},t.html=function(l,f){(f=f||{}).callback=f.callback||function(){},f.html2canvas=f.html2canvas||{},f.html2canvas.canvas=f.html2canvas.canvas||this.canvas,f.jsPDF=f.jsPDF||this,f.fontFaces=f.fontFaces?f.fontFaces.map(Ah):null;var u=new h(f);return f.worker?u:u.from(l).doCallback()}})(Rt.API),Rt.API.addJS=function(t){return Ou=t,this.internal.events.subscribe("postPutResources",function(){Rs=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/Names [(EmbeddedJS) "+(Rs+1)+" 0 R]"),this.internal.out(">>"),this.internal.out("endobj"),Cu=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/S /JavaScript"),this.internal.out("/JS ("+Ou+")"),this.internal.out(">>"),this.internal.out("endobj")}),this.internal.events.subscribe("putCatalog",function(){Rs!==void 0&&Cu!==void 0&&this.internal.out("/Names <</JavaScript "+Rs+" 0 R>>")}),this},(function(t){var n;t.events.push(["postPutResources",function(){var e=this,r=/^(\d+) 0 obj$/;if(this.outline.root.children.length>0)for(var i=e.outline.render().split(/\r\n/),a=0;a<i.length;a++){var h=i[a],l=r.exec(h);if(l!=null){var f=l[1];e.internal.newObjectDeferredBegin(f,!1)}e.internal.write(h)}if(this.outline.createNamedDestinations){var u=this.internal.pages.length,g=[];for(a=0;a<u;a++){var y=e.internal.newObject();g.push(y);var x=e.internal.getPageInfo(a+1);e.internal.write("<< /D["+x.objId+" 0 R /XYZ null null null]>> endobj")}var p=e.internal.newObject();for(e.internal.write("<< /Names [ "),a=0;a<g.length;a++)e.internal.write("(page_"+(a+1)+")"+g[a]+" 0 R");e.internal.write(" ] >>","endobj"),n=e.internal.newObject(),e.internal.write("<< /Dests "+p+" 0 R"),e.internal.write(">>","endobj")}}]),t.events.push(["putCatalog",function(){var e=this;e.outline.root.children.length>0&&(e.internal.write("/Outlines",this.outline.makeRef(this.outline.root)),this.outline.createNamedDestinations&&e.internal.write("/Names "+n+" 0 R"))}]),t.events.push(["initialized",function(){var e=this;e.outline={createNamedDestinations:!1,root:{children:[]}},e.outline.add=function(r,i,a){var h={title:i,options:a,children:[]};return r==null&&(r=this.root),r.children.push(h),h},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(r){r.id=e.internal.newObjectDeferred();for(var i=0;i<r.children.length;i++)this.genIds_r(r.children[i])},e.outline.renderRoot=function(r){this.objStart(r),this.line("/Type /Outlines"),r.children.length>0&&(this.line("/First "+this.makeRef(r.children[0])),this.line("/Last "+this.makeRef(r.children[r.children.length-1]))),this.line("/Count "+this.count_r({count:0},r)),this.objEnd()},e.outline.renderItems=function(r){for(var i=this.ctx.pdf.internal.getVerticalCoordinateString,a=0;a<r.children.length;a++){var h=r.children[a];this.objStart(h),this.line("/Title "+this.makeString(h.title)),this.line("/Parent "+this.makeRef(r)),a>0&&this.line("/Prev "+this.makeRef(r.children[a-1])),a<r.children.length-1&&this.line("/Next "+this.makeRef(r.children[a+1])),h.children.length>0&&(this.line("/First "+this.makeRef(h.children[0])),this.line("/Last "+this.makeRef(h.children[h.children.length-1])));var l=this.count=this.count_r({count:0},h);if(l>0&&this.line("/Count "+l),h.options&&h.options.pageNumber){var f=e.internal.getPageInfo(h.options.pageNumber);this.line("/Dest ["+f.objId+" 0 R /XYZ 0 "+i(0)+" 0]")}this.objEnd()}for(var u=0;u<r.children.length;u++)this.renderItems(r.children[u])},e.outline.line=function(r){this.ctx.val+=r+`\r
|
|
43
43
|
`},e.outline.makeRef=function(r){return r.id+" 0 R"},e.outline.makeString=function(r){return"("+e.internal.pdfEscape(r)+")"},e.outline.objStart=function(r){this.ctx.val+=`\r
|
|
44
44
|
`+r.id+` 0 obj\r
|
|
45
45
|
<<\r
|