@ianicdev/datatables2 0.10.8 → 0.10.9
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/{Columns-Dd9SfqmJ.cjs → Columns-W_jSwaNc.cjs} +1 -1
- package/dist/{Columns-QO7YU0eZ.js → Columns-dl3eMPe2.js} +1 -1
- package/dist/{Comparison-ClrNRg-V.js → Comparison-ChMG_TLF.js} +1 -1
- package/dist/{Comparison-DCWQz5X9.cjs → Comparison-Cz2qINPo.cjs} +1 -1
- package/dist/{Datepicker-Du8AggGn.js → Datepicker-CHMHJOq1.js} +452 -448
- package/dist/Datepicker-DHZwRCiL.cjs +2 -0
- package/dist/{Download-CIp1YVEq.js → Download-DhsPo8yJ.js} +2 -2
- package/dist/{Download-B2JKkFCz.cjs → Download-kq1kmD5M.cjs} +1 -1
- package/dist/{Options-DiRnomZy.cjs → Options-BNWiVRrF.cjs} +1 -1
- package/dist/{Options-BPCUGErN.js → Options-DwiLD_hO.js} +1 -1
- package/dist/{RefreshTable-B13C6sLc.js → RefreshTable-Cq6mrqWi.js} +2 -2
- package/dist/{RefreshTable-CwHf3COZ.cjs → RefreshTable-OLZf9tHE.cjs} +1 -1
- package/dist/{Search-BHVyo0uz.js → Search-C5Nj3AJd.js} +2 -2
- package/dist/{Search-CVhqyw6f.cjs → Search-DsKhSX_l.cjs} +1 -1
- package/dist/{Table-C2P9cYl_.cjs → Table-BnieRooB.cjs} +1 -1
- package/dist/{Table-DoG07zNZ.js → Table-dk0Au7Sd.js} +3 -3
- package/dist/{TableServer-BDcY2nQz.js → TableServer-B1QsOkJ2.js} +3 -3
- package/dist/{TableServer-CeJMxSCa.cjs → TableServer-CW6o1KQR.cjs} +1 -1
- package/dist/{cellRender-DZ5qL5RV.cjs → cellRender-DGXXI6zI.cjs} +1 -1
- package/dist/{cellRender-BRFdMQzg.js → cellRender-n1kqNyoy.js} +3 -3
- package/dist/dataTables-BMvhNk0d.cjs +4 -0
- package/dist/{dataTables-DRiNyKEv.js → dataTables-RDdW6ocQ.js} +283 -277
- package/dist/datatables.cjs +1 -1
- package/dist/datatables.js +1 -1
- package/dist/datatables2.css +1 -1
- package/dist/{index-DD_T-n8-.cjs → index-CXga_1To.cjs} +1 -1
- package/dist/{index-Bz4Guf4c.cjs → index-DIHxM6eL.cjs} +1 -1
- package/dist/{index-D9tMlHlC.js → index-Doqj_5F5.js} +6 -6
- package/dist/{index-DqBI0sCe.js → index-Xn9pmgz0.js} +2 -2
- package/dist/{index.es-BtDW7HTQ.cjs → index.es-BCJd8pS0.cjs} +1 -1
- package/dist/{index.es-Bv6Mb9BC.js → index.es-CtLP1GTc.js} +1 -1
- package/dist/{jspdf-D9i2dan7.js → jspdf-3qJBK9tP.js} +6 -6
- package/dist/{jspdf-BsORS480.cjs → jspdf-DyYqWhF9.cjs} +4 -4
- package/package.json +10 -10
- package/dist/Datepicker-BHbZnWHu.cjs +0 -2
- package/dist/dataTables-CmM1RF0K.cjs +0 -4
|
@@ -19,7 +19,7 @@ T* `):c.join(` Tj
|
|
|
19
19
|
/`;return fn+=jt+" "+yt+` Tf
|
|
20
20
|
`,fn+=K(yt*Ln)+` TL
|
|
21
21
|
`,fn+=fi+`
|
|
22
|
-
`,fn+=ar,fn+=c,F(fn+="ET"),x[jt]=!0,ke};var Vo=g.__private__.clip=g.clip=function(c){return F(c==="evenodd"?"W*":"W"),this};g.clipEvenOdd=function(){return Vo("evenodd")},g.__private__.discardPath=g.discardPath=function(){return F("n"),this};var sn=g.__private__.isValidStyle=function(c){var m=!1;return[void 0,null,"S","D","F","DF","FD","f","f*","B","B*","n"].indexOf(c)!==-1&&(m=!0),m};g.__private__.setDefaultPathOperation=g.setDefaultPathOperation=function(c){return sn(c)&&(h=c),this};var Ga=g.__private__.getStyle=g.getStyle=function(c){var m=h;switch(c){case"D":case"S":m="S";break;case"F":m="f";break;case"FD":case"DF":m="B";break;case"f":case"f*":case"B":case"B*":m=c}return m},Va=g.close=function(){return F("h"),this};g.stroke=function(){return F("S"),this},g.fill=function(c){return ji("f",c),this},g.fillEvenOdd=function(c){return ji("f*",c),this},g.fillStroke=function(c){return ji("B",c),this},g.fillStrokeEvenOdd=function(c){return ji("B*",c),this};var ji=function(c,m){ye(m)==="object"?Jo(m,c):F(c)},li=function(c){c===null||M===V&&c===void 0||(c=Ga(c),F(c))};function Yo(c,m,j,q,$){var dt=new Yi(m||this.boundingBox,j||this.xStep,q||this.yStep,this.gState,$||this.matrix);dt.stream=this.stream;var mt=c+"$$"+this.cloneIndex+++"$$";return Or(mt,dt),dt}var Jo=function(c,m){var j=Se[c.key],q=Ut[j];if(q instanceof _i)F("q"),F(Ko(m)),q.gState&&g.setGState(q.gState),F(c.matrix.toString()+" cm"),F("/"+j+" sh"),F("Q");else if(q instanceof Yi){var $=new Vt(1,0,0,-1,0,ci());c.matrix&&($=$.multiply(c.matrix||mn),j=Yo.call(q,c.key,c.boundingBox,c.xStep,c.yStep,$).id),F("q"),F("/Pattern cs"),F("/"+j+" scn"),q.gState&&g.setGState(q.gState),F(m),F("Q")}},Ko=function(c){switch(c){case"f":case"F":case"n":return"W n";case"f*":return"W* n";case"B":case"S":return"W S";case"B*":return"W* S"}},na=g.moveTo=function(c,m){return F(K(z(c))+" "+K(U(m))+" m"),this},Ya=g.lineTo=function(c,m){return F(K(z(c))+" "+K(U(m))+" l"),this},Vr=g.curveTo=function(c,m,j,q,$,dt){return F([K(z(c)),K(U(m)),K(z(j)),K(U(q)),K(z($)),K(U(dt)),"c"].join(" ")),this};g.__private__.line=g.line=function(c,m,j,q,$){if(isNaN(c)||isNaN(m)||isNaN(j)||isNaN(q)||!sn($))throw new Error("Invalid arguments passed to jsPDF.line");return M===G?this.lines([[j-c,q-m]],c,m,[1,1],$||"S"):this.lines([[j-c,q-m]],c,m,[1,1]).stroke()},g.__private__.lines=g.lines=function(c,m,j,q,$,dt){var mt,It,Bt,Kt,re,ge,je,Je,ke,Xe,Ke,ar;if(typeof c=="number"&&(ar=j,j=m,m=c,c=ar),q=q||[1,1],dt=dt||!1,isNaN(m)||isNaN(j)||!Array.isArray(c)||!Array.isArray(q)||!sn($)||typeof dt!="boolean")throw new Error("Invalid arguments passed to jsPDF.lines");for(na(m,j),mt=q[0],It=q[1],Kt=c.length,Xe=m,Ke=j,Bt=0;Bt<Kt;Bt++)(re=c[Bt]).length===2?(Xe=re[0]*mt+Xe,Ke=re[1]*It+Ke,Ya(Xe,Ke)):(ge=re[0]*mt+Xe,je=re[1]*It+Ke,Je=re[2]*mt+Xe,ke=re[3]*It+Ke,Xe=re[4]*mt+Xe,Ke=re[5]*It+Ke,Vr(ge,je,Je,ke,Xe,Ke));return dt&&Va(),li($),this},g.path=function(c){for(var m=0;m<c.length;m++){var j=c[m],q=j.c;switch(j.op){case"m":na(q[0],q[1]);break;case"l":Ya(q[0],q[1]);break;case"c":Vr.apply(this,q);break;case"h":Va()}}return this},g.__private__.rect=g.rect=function(c,m,j,q,$){if(isNaN(c)||isNaN(m)||isNaN(j)||isNaN(q)||!sn($))throw new Error("Invalid arguments passed to jsPDF.rect");return M===G&&(q=-q),F([K(z(c)),K(U(m)),K(z(j)),K(z(q)),"re"].join(" ")),li($),this},g.__private__.triangle=g.triangle=function(c,m,j,q,$,dt,mt){if(isNaN(c)||isNaN(m)||isNaN(j)||isNaN(q)||isNaN($)||isNaN(dt)||!sn(mt))throw new Error("Invalid arguments passed to jsPDF.triangle");return this.lines([[j-c,q-m],[$-j,dt-q],[c-$,m-dt]],c,m,[1,1],mt,!0),this},g.__private__.roundedRect=g.roundedRect=function(c,m,j,q,$,dt,mt){if(isNaN(c)||isNaN(m)||isNaN(j)||isNaN(q)||isNaN($)||isNaN(dt)||!sn(mt))throw new Error("Invalid arguments passed to jsPDF.roundedRect");var It=4/3*(Math.SQRT2-1);return $=Math.min($,.5*j),dt=Math.min(dt,.5*q),this.lines([[j-2*$,0],[$*It,0,$,dt-dt*It,$,dt],[0,q-2*dt],[0,dt*It,-$*It,dt,-$,dt],[2*$-j,0],[-$*It,0,-$,-dt*It,-$,-dt],[0,2*dt-q],[0,-dt*It,$*It,-dt,$,-dt]],c+$,m,[1,1],mt,!0),this},g.__private__.ellipse=g.ellipse=function(c,m,j,q,$){if(isNaN(c)||isNaN(m)||isNaN(j)||isNaN(q)||!sn($))throw new Error("Invalid arguments passed to jsPDF.ellipse");var dt=4/3*(Math.SQRT2-1)*j,mt=4/3*(Math.SQRT2-1)*q;return na(c+j,m),Vr(c+j,m-mt,c+dt,m-q,c,m-q),Vr(c-dt,m-q,c-j,m-mt,c-j,m),Vr(c-j,m+mt,c-dt,m+q,c,m+q),Vr(c+dt,m+q,c+j,m+mt,c+j,m),li($),this},g.__private__.circle=g.circle=function(c,m,j,q){if(isNaN(c)||isNaN(m)||isNaN(j)||!sn(q))throw new Error("Invalid arguments passed to jsPDF.circle");return this.ellipse(c,m,j,j,q)},g.setFont=function(c,m,j){return j&&(m=ct(m,j)),jt=Ua(c,m,{disableWarning:!1}),this};var $o=g.__private__.getFont=g.getFont=function(){return oe[Ua.apply(g,arguments)]};g.__private__.getFontList=g.getFontList=function(){var c,m,j={};for(c in se)if(se.hasOwnProperty(c))for(m in j[c]=[],se[c])se[c].hasOwnProperty(m)&&j[c].push(m);return j},g.addFont=function(c,m,j,q,$){var dt=["StandardEncoding","MacRomanEncoding","Identity-H","WinAnsiEncoding"];return arguments[3]&&dt.indexOf(arguments[3])!==-1?$=arguments[3]:arguments[3]&&dt.indexOf(arguments[3])==-1&&(j=ct(j,q)),Ra.call(this,c,m,j,$=$||"Identity-H")};var ui,ia=r.lineWidth||.200025,Xo=g.__private__.getLineWidth=g.getLineWidth=function(){return ia},$t=g.__private__.setLineWidth=g.setLineWidth=function(c){return ia=c,F(K(z(c))+" w"),this};g.__private__.setLineDash=Rt.API.setLineDash=Rt.API.setLineDashPattern=function(c,m){if(c=c||[],m=m||0,isNaN(m)||!Array.isArray(c))throw new Error("Invalid arguments passed to jsPDF.setLineDash");return c=c.map(function(j){return K(z(j))}).join(" "),m=K(z(m)),F("["+c+"] "+m+" d"),this};var Zo=g.__private__.getLineHeight=g.getLineHeight=function(){return yt*ui};g.__private__.getLineHeight=g.getLineHeight=function(){return yt*ui};var Qo=g.__private__.setLineHeightFactor=g.setLineHeightFactor=function(c){return typeof(c=c||1.15)=="number"&&(ui=c),this},ts=g.__private__.getLineHeightFactor=g.getLineHeightFactor=function(){return ui};Qo(r.lineHeight);var wn=g.__private__.getHorizontalCoordinate=function(c){return z(c)},yn=g.__private__.getVerticalCoordinate=function(c){return M===V?c:Gt[D].mediaBox.topRightY-Gt[D].mediaBox.bottomLeftY-z(c)},es=g.__private__.getHorizontalCoordinateString=g.getHorizontalCoordinateString=function(c){return K(wn(c))},rs=g.__private__.getVerticalCoordinateString=g.getVerticalCoordinateString=function(c){return K(yn(c))},Bi=r.strokeColor||"0 G";g.__private__.getStrokeColor=g.getDrawColor=function(){return rn(Bi)},g.__private__.setStrokeColor=g.setDrawColor=function(c,m,j,q){return Bi=Wr({ch1:c,ch2:m,ch3:j,ch4:q,pdfColorType:"draw",precision:2}),F(Bi),this};var aa=r.fillColor||"0 g";g.__private__.getFillColor=g.getFillColor=function(){return rn(aa)},g.__private__.setFillColor=g.setFillColor=function(c,m,j,q){return aa=Wr({ch1:c,ch2:m,ch3:j,ch4:q,pdfColorType:"fill",precision:2}),F(aa),this};var fi=r.textColor||"0 g",ns=g.__private__.getTextColor=g.getTextColor=function(){return rn(fi)};g.__private__.setTextColor=g.setTextColor=function(c,m,j,q){return fi=Wr({ch1:c,ch2:m,ch3:j,ch4:q,pdfColorType:"text",precision:3}),this};var xn=r.charSpace,is=g.__private__.getCharSpace=g.getCharSpace=function(){return parseFloat(xn||0)};g.__private__.setCharSpace=g.setCharSpace=function(c){if(isNaN(c))throw new Error("Invalid argument passed to jsPDF.setCharSpace");return xn=c,this};var oa=0;g.CapJoinStyles={0:0,butt:0,but:0,miter:0,1:1,round:1,rounded:1,circle:1,2:2,projecting:2,project:2,square:2,bevel:2},g.__private__.setLineCap=g.setLineCap=function(c){var m=g.CapJoinStyles[c];if(m===void 0)throw new Error("Line cap style of '"+c+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return oa=m,F(m+" J"),this};var sa=0;g.__private__.setLineJoin=g.setLineJoin=function(c){var m=g.CapJoinStyles[c];if(m===void 0)throw new Error("Line join style of '"+c+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return sa=m,F(m+" j"),this},g.__private__.setLineMiterLimit=g.__private__.setMiterLimit=g.setLineMiterLimit=g.setMiterLimit=function(c){if(c=c||0,isNaN(c))throw new Error("Invalid argument passed to jsPDF.setLineMiterLimit");return F(K(z(c))+" M"),this},g.GState=Do,g.setGState=function(c){(c=typeof c=="string"?Yt[Qt[c]]:Ja(null,c)).equals(Ee)||(F("/"+c.id+" gs"),Ee=c)};var Ja=function(c,m){if(!c||!Qt[c]){var j=!1;for(var q in Yt)if(Yt.hasOwnProperty(q)&&Yt[q].equals(m)){j=!0;break}if(j)m=Yt[q];else{var $="GS"+(Object.keys(Yt).length+1).toString(10);Yt[$]=m,m.id=$}return c&&(Qt[c]=m.id),be.publish("addGState",m),m}};g.addGState=function(c,m){return Ja(c,m),this},g.saveGraphicsState=function(){return F("q"),Ie.push({key:jt,size:yt,color:fi}),this},g.restoreGraphicsState=function(){F("Q");var c=Ie.pop();return jt=c.key,yt=c.size,fi=c.color,Ee=null,this},g.setCurrentTransformationMatrix=function(c){return F(c.toString()+" cm"),this},g.comment=function(c){return F("#"+c),this};var An=function(c,m){var j=c||0;Object.defineProperty(this,"x",{enumerable:!0,get:function(){return j},set:function(dt){isNaN(dt)||(j=parseFloat(dt))}});var q=m||0;Object.defineProperty(this,"y",{enumerable:!0,get:function(){return q},set:function(dt){isNaN(dt)||(q=parseFloat(dt))}});var $="pt";return Object.defineProperty(this,"type",{enumerable:!0,get:function(){return $},set:function(dt){$=dt.toString()}}),this},la=function(c,m,j,q){An.call(this,c,m),this.type="rect";var $=j||0;Object.defineProperty(this,"w",{enumerable:!0,get:function(){return $},set:function(mt){isNaN(mt)||($=parseFloat(mt))}});var dt=q||0;return Object.defineProperty(this,"h",{enumerable:!0,get:function(){return dt},set:function(mt){isNaN(mt)||(dt=parseFloat(mt))}}),this},Di=function(){this.page=le,this.currentPage=D,this.pages=At.slice(0),this.pagesContext=Gt.slice(0),this.x=Tt,this.y=Me,this.matrix=pe,this.width=fa(D),this.height=$a(D),this.outputDestination=St,this.id="",this.objectNumber=-1};Di.prototype.restore=function(){le=this.page,D=this.currentPage,Gt=this.pagesContext,At=this.pages,Tt=this.x,Me=this.y,pe=this.matrix,Ka(D,this.width),_n(D,this.height),St=this.outputDestination};var ua=function(c,m,j,q,$){en.push(new Di),le=D=0,At=[],Tt=c,Me=m,pe=$,ea([j,q])};for(var hi in g.beginFormObject=function(c,m,j,q,$){return ua(c,m,j,q,$),this},g.endFormObject=function(c){return(function(m){if(gn[m])en.pop().restore();else{var j=new Di,q="Xo"+(Object.keys(fr).length+1).toString(10);j.id=q,gn[m]=q,fr[q]=j,be.publish("addFormObject",j),en.pop().restore()}})(c),this},g.doFormObject=function(c,m){var j=fr[gn[c]];return F("q"),F(m.toString()+" cm"),F("/"+j.id+" Do"),F("Q"),this},g.getFormObject=function(c){var m=fr[gn[c]];return{x:m.x,y:m.y,width:m.width,height:m.height,matrix:m.matrix}},g.save=function(c,m){return c=c||"generated.pdf",(m=m||{}).returnPromise=m.returnPromise||!1,m.returnPromise===!1?(Ai(Oi(on()),c),typeof Ai.unload=="function"&&Jt.setTimeout&&setTimeout(Ai.unload,911),this):new Promise(function(j,q){try{var $=Ai(Oi(on()),c);typeof Ai.unload=="function"&&Jt.setTimeout&&setTimeout(Ai.unload,911),j($)}catch(dt){q(dt.message)}})},Rt.API)Rt.API.hasOwnProperty(hi)&&(hi==="events"&&Rt.API.events.length?(function(c,m){var j,q,$;for($=m.length-1;$!==-1;$--)j=m[$][0],q=m[$][1],c.subscribe.apply(c,[j].concat(typeof q=="function"?[q]:q))})(be,Rt.API.events):g[hi]=Rt.API[hi]);function fa(c){return Gt[c].mediaBox.topRightX-Gt[c].mediaBox.bottomLeftX}function Ka(c,m){Gt[c].mediaBox.topRightX=m+Gt[c].mediaBox.bottomLeftX}function $a(c){return Gt[c].mediaBox.topRightY-Gt[c].mediaBox.bottomLeftY}function _n(c,m){Gt[c].mediaBox.topRightY=m+Gt[c].mediaBox.bottomLeftY}var Nn=g.getPageWidth=function(c){return fa(c=c||D)/ee},Xa=g.setPageWidth=function(c,m){Ka(c,m*ee)},ci=g.getPageHeight=function(c){return $a(c=c||D)/ee},Za=g.setPageHeight=function(c,m){_n(c,m*ee)};return g.internal={pdfEscape:Dr,getStyle:Ga,getFont:$o,getFontSize:Ct,getCharSpace:is,getTextColor:ns,getLineHeight:Zo,getLineHeightFactor:ts,getLineWidth:Xo,write:Lt,getHorizontalCoordinate:wn,getVerticalCoordinate:yn,getCoordinateString:es,getVerticalCoordinateString:rs,collections:{},newObject:Be,newAdditionalObject:ai,newObjectDeferred:rr,newObjectDeferredBegin:ir,getFilters:Gr,putStream:Br,events:be,scaleFactor:ee,pageSize:{getWidth:function(){return Nn(D)},setWidth:function(c){Xa(D,c)},getHeight:function(){return ci(D)},setHeight:function(c){Za(D,c)}},encryptionOptions:p,encryption:$e,getEncryptor:function(c){return p!==null?$e.encryptor(c,0):function(m){return m}},output:Ha,getNumberOfPages:qa,get pages(){return At},out:F,f2:L,f3:O,getPageInfo:bn,getPageInfoByObjId:Wa,getCurrentPageInfo:Go,getPDFVersion:C,Point:An,Rectangle:la,Matrix:Vt,hasHotfix:Rr},Object.defineProperty(g.internal.pageSize,"width",{get:function(){return Nn(D)},set:function(c){Xa(D,c)},enumerable:!0,configurable:!0}),Object.defineProperty(g.internal.pageSize,"height",{get:function(){return ci(D)},set:function(c){Za(D,c)},enumerable:!0,configurable:!0}),(function(c){for(var m=0,j=Ht.length;m<j;m++){var q=Ra.call(this,c[m][0],c[m][1],c[m][2],Ht[m][3],!0);w===!1&&(x[q]=!0);var $=c[m][0].split("-");Da({id:q,fontName:$[0],fontStyle:$[1]||""})}be.publish("addFonts",{fonts:oe,dictionary:se})}).call(g,Ht),jt="F1",Ta(a,e),be.publish("initialized"),g}Gi.prototype.lsbFirstWord=function(r){return String.fromCharCode(255&r,r>>8&255,r>>16&255,r>>24&255)},Gi.prototype.toHexString=function(r){return r.split("").map(function(t){return("0"+(255&t.charCodeAt(0)).toString(16)).slice(-2)}).join("")},Gi.prototype.hexToBytes=function(r){for(var t=[],e=0;e<r.length;e+=2)t.push(String.fromCharCode(parseInt(r.substr(e,2),16)));return t.join("")},Gi.prototype.processOwnerPassword=function(r,t){return tl(Qs(t).substr(0,5),r)},Gi.prototype.encryptor=function(r,t){var e=Qs(this.encryptionKey+String.fromCharCode(255&r,r>>8&255,r>>16&255,255&t,t>>8&255)).substr(0,10);return function(n){return tl(e,n)}},Do.prototype.equals=function(r){var t,e="id,objectNumber,equals";if(!r||ye(r)!==ye(this))return!1;var n=0;for(t in this)if(!(e.indexOf(t)>=0)){if(this.hasOwnProperty(t)&&!r.hasOwnProperty(t)||this[t]!==r[t])return!1;n++}for(t in r)r.hasOwnProperty(t)&&e.indexOf(t)<0&&n--;return n===0},Rt.API={events:[]},Rt.version="3.0.4";var Te=Rt.API,fl=1,Pi=function(r){return r.replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},Hi=function(r){return r.replace(/\\\\/g,"\\").replace(/\\\(/g,"(").replace(/\\\)/g,")")},Xt=function(r){return r.toFixed(2)},ei=function(r){return r.toFixed(5)};Te.__acroform__={};var Ar=function(r,t){r.prototype=Object.create(t.prototype),r.prototype.constructor=r},Hu=function(r){return r*fl},cn=function(r){var t=new Zf,e=Ft.internal.getHeight(r)||0,n=Ft.internal.getWidth(r)||0;return t.BBox=[0,0,Number(Xt(n)),Number(Xt(e))],t},g2=Te.__acroform__.setBit=function(r,t){if(r=r||0,t=t||0,isNaN(r)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBit");return r|1<<t},v2=Te.__acroform__.clearBit=function(r,t){if(r=r||0,t=t||0,isNaN(r)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBit");return r&~(1<<t)},m2=Te.__acroform__.getBit=function(r,t){if(isNaN(r)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBit");return r&1<<t?1:0},We=Te.__acroform__.getBitForPdf=function(r,t){if(isNaN(r)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBitForPdf");return m2(r,t-1)},Ge=Te.__acroform__.setBitForPdf=function(r,t){if(isNaN(r)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBitForPdf");return g2(r,t-1)},Ve=Te.__acroform__.clearBitForPdf=function(r,t){if(isNaN(r)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBitForPdf");return v2(r,t-1)},b2=Te.__acroform__.calculateCoordinates=function(r,t){var e=t.internal.getHorizontalCoordinate,n=t.internal.getVerticalCoordinate,a=r[0],i=r[1],f=r[2],l=r[3],u={};return u.lowerLeft_X=e(a)||0,u.lowerLeft_Y=n(i+l)||0,u.upperRight_X=e(a+f)||0,u.upperRight_Y=n(i)||0,[Number(Xt(u.lowerLeft_X)),Number(Xt(u.lowerLeft_Y)),Number(Xt(u.upperRight_X)),Number(Xt(u.upperRight_Y))]},w2=function(r){if(r.appearanceStreamContent)return r.appearanceStreamContent;if(r.V||r.DV){var t=[],e=r._V||r.DV,n=el(r,e),a=r.scope.internal.getFont(r.fontName,r.fontStyle).id;t.push("/Tx BMC"),t.push("q"),t.push("BT"),t.push(r.scope.__private__.encodeColorString(r.color)),t.push("/"+a+" "+Xt(n.fontSize)+" Tf"),t.push("1 0 0 1 0 0 Tm"),t.push(n.text),t.push("ET"),t.push("Q"),t.push("EMC");var i=cn(r);return i.scope=r.scope,i.stream=t.join(`
|
|
22
|
+
`,fn+=ar,fn+=c,F(fn+="ET"),x[jt]=!0,ke};var Vo=g.__private__.clip=g.clip=function(c){return F(c==="evenodd"?"W*":"W"),this};g.clipEvenOdd=function(){return Vo("evenodd")},g.__private__.discardPath=g.discardPath=function(){return F("n"),this};var sn=g.__private__.isValidStyle=function(c){var m=!1;return[void 0,null,"S","D","F","DF","FD","f","f*","B","B*","n"].indexOf(c)!==-1&&(m=!0),m};g.__private__.setDefaultPathOperation=g.setDefaultPathOperation=function(c){return sn(c)&&(h=c),this};var Ga=g.__private__.getStyle=g.getStyle=function(c){var m=h;switch(c){case"D":case"S":m="S";break;case"F":m="f";break;case"FD":case"DF":m="B";break;case"f":case"f*":case"B":case"B*":m=c}return m},Va=g.close=function(){return F("h"),this};g.stroke=function(){return F("S"),this},g.fill=function(c){return ji("f",c),this},g.fillEvenOdd=function(c){return ji("f*",c),this},g.fillStroke=function(c){return ji("B",c),this},g.fillStrokeEvenOdd=function(c){return ji("B*",c),this};var ji=function(c,m){ye(m)==="object"?Jo(m,c):F(c)},li=function(c){c===null||M===V&&c===void 0||(c=Ga(c),F(c))};function Yo(c,m,j,q,$){var dt=new Yi(m||this.boundingBox,j||this.xStep,q||this.yStep,this.gState,$||this.matrix);dt.stream=this.stream;var mt=c+"$$"+this.cloneIndex+++"$$";return Or(mt,dt),dt}var Jo=function(c,m){var j=Se[c.key],q=Ut[j];if(q instanceof _i)F("q"),F(Ko(m)),q.gState&&g.setGState(q.gState),F(c.matrix.toString()+" cm"),F("/"+j+" sh"),F("Q");else if(q instanceof Yi){var $=new Vt(1,0,0,-1,0,ci());c.matrix&&($=$.multiply(c.matrix||mn),j=Yo.call(q,c.key,c.boundingBox,c.xStep,c.yStep,$).id),F("q"),F("/Pattern cs"),F("/"+j+" scn"),q.gState&&g.setGState(q.gState),F(m),F("Q")}},Ko=function(c){switch(c){case"f":case"F":case"n":return"W n";case"f*":return"W* n";case"B":case"S":return"W S";case"B*":return"W* S"}},na=g.moveTo=function(c,m){return F(K(z(c))+" "+K(U(m))+" m"),this},Ya=g.lineTo=function(c,m){return F(K(z(c))+" "+K(U(m))+" l"),this},Vr=g.curveTo=function(c,m,j,q,$,dt){return F([K(z(c)),K(U(m)),K(z(j)),K(U(q)),K(z($)),K(U(dt)),"c"].join(" ")),this};g.__private__.line=g.line=function(c,m,j,q,$){if(isNaN(c)||isNaN(m)||isNaN(j)||isNaN(q)||!sn($))throw new Error("Invalid arguments passed to jsPDF.line");return M===G?this.lines([[j-c,q-m]],c,m,[1,1],$||"S"):this.lines([[j-c,q-m]],c,m,[1,1]).stroke()},g.__private__.lines=g.lines=function(c,m,j,q,$,dt){var mt,It,Bt,Kt,re,ge,je,Je,ke,Xe,Ke,ar;if(typeof c=="number"&&(ar=j,j=m,m=c,c=ar),q=q||[1,1],dt=dt||!1,isNaN(m)||isNaN(j)||!Array.isArray(c)||!Array.isArray(q)||!sn($)||typeof dt!="boolean")throw new Error("Invalid arguments passed to jsPDF.lines");for(na(m,j),mt=q[0],It=q[1],Kt=c.length,Xe=m,Ke=j,Bt=0;Bt<Kt;Bt++)(re=c[Bt]).length===2?(Xe=re[0]*mt+Xe,Ke=re[1]*It+Ke,Ya(Xe,Ke)):(ge=re[0]*mt+Xe,je=re[1]*It+Ke,Je=re[2]*mt+Xe,ke=re[3]*It+Ke,Xe=re[4]*mt+Xe,Ke=re[5]*It+Ke,Vr(ge,je,Je,ke,Xe,Ke));return dt&&Va(),li($),this},g.path=function(c){for(var m=0;m<c.length;m++){var j=c[m],q=j.c;switch(j.op){case"m":na(q[0],q[1]);break;case"l":Ya(q[0],q[1]);break;case"c":Vr.apply(this,q);break;case"h":Va()}}return this},g.__private__.rect=g.rect=function(c,m,j,q,$){if(isNaN(c)||isNaN(m)||isNaN(j)||isNaN(q)||!sn($))throw new Error("Invalid arguments passed to jsPDF.rect");return M===G&&(q=-q),F([K(z(c)),K(U(m)),K(z(j)),K(z(q)),"re"].join(" ")),li($),this},g.__private__.triangle=g.triangle=function(c,m,j,q,$,dt,mt){if(isNaN(c)||isNaN(m)||isNaN(j)||isNaN(q)||isNaN($)||isNaN(dt)||!sn(mt))throw new Error("Invalid arguments passed to jsPDF.triangle");return this.lines([[j-c,q-m],[$-j,dt-q],[c-$,m-dt]],c,m,[1,1],mt,!0),this},g.__private__.roundedRect=g.roundedRect=function(c,m,j,q,$,dt,mt){if(isNaN(c)||isNaN(m)||isNaN(j)||isNaN(q)||isNaN($)||isNaN(dt)||!sn(mt))throw new Error("Invalid arguments passed to jsPDF.roundedRect");var It=4/3*(Math.SQRT2-1);return $=Math.min($,.5*j),dt=Math.min(dt,.5*q),this.lines([[j-2*$,0],[$*It,0,$,dt-dt*It,$,dt],[0,q-2*dt],[0,dt*It,-$*It,dt,-$,dt],[2*$-j,0],[-$*It,0,-$,-dt*It,-$,-dt],[0,2*dt-q],[0,-dt*It,$*It,-dt,$,-dt]],c+$,m,[1,1],mt,!0),this},g.__private__.ellipse=g.ellipse=function(c,m,j,q,$){if(isNaN(c)||isNaN(m)||isNaN(j)||isNaN(q)||!sn($))throw new Error("Invalid arguments passed to jsPDF.ellipse");var dt=4/3*(Math.SQRT2-1)*j,mt=4/3*(Math.SQRT2-1)*q;return na(c+j,m),Vr(c+j,m-mt,c+dt,m-q,c,m-q),Vr(c-dt,m-q,c-j,m-mt,c-j,m),Vr(c-j,m+mt,c-dt,m+q,c,m+q),Vr(c+dt,m+q,c+j,m+mt,c+j,m),li($),this},g.__private__.circle=g.circle=function(c,m,j,q){if(isNaN(c)||isNaN(m)||isNaN(j)||!sn(q))throw new Error("Invalid arguments passed to jsPDF.circle");return this.ellipse(c,m,j,j,q)},g.setFont=function(c,m,j){return j&&(m=ct(m,j)),jt=Ua(c,m,{disableWarning:!1}),this};var $o=g.__private__.getFont=g.getFont=function(){return oe[Ua.apply(g,arguments)]};g.__private__.getFontList=g.getFontList=function(){var c,m,j={};for(c in se)if(se.hasOwnProperty(c))for(m in j[c]=[],se[c])se[c].hasOwnProperty(m)&&j[c].push(m);return j},g.addFont=function(c,m,j,q,$){var dt=["StandardEncoding","MacRomanEncoding","Identity-H","WinAnsiEncoding"];return arguments[3]&&dt.indexOf(arguments[3])!==-1?$=arguments[3]:arguments[3]&&dt.indexOf(arguments[3])==-1&&(j=ct(j,q)),Ra.call(this,c,m,j,$=$||"Identity-H")};var ui,ia=r.lineWidth||.200025,Xo=g.__private__.getLineWidth=g.getLineWidth=function(){return ia},$t=g.__private__.setLineWidth=g.setLineWidth=function(c){return ia=c,F(K(z(c))+" w"),this};g.__private__.setLineDash=Rt.API.setLineDash=Rt.API.setLineDashPattern=function(c,m){if(c=c||[],m=m||0,isNaN(m)||!Array.isArray(c))throw new Error("Invalid arguments passed to jsPDF.setLineDash");return c=c.map(function(j){return K(z(j))}).join(" "),m=K(z(m)),F("["+c+"] "+m+" d"),this};var Zo=g.__private__.getLineHeight=g.getLineHeight=function(){return yt*ui};g.__private__.getLineHeight=g.getLineHeight=function(){return yt*ui};var Qo=g.__private__.setLineHeightFactor=g.setLineHeightFactor=function(c){return typeof(c=c||1.15)=="number"&&(ui=c),this},ts=g.__private__.getLineHeightFactor=g.getLineHeightFactor=function(){return ui};Qo(r.lineHeight);var wn=g.__private__.getHorizontalCoordinate=function(c){return z(c)},yn=g.__private__.getVerticalCoordinate=function(c){return M===V?c:Gt[D].mediaBox.topRightY-Gt[D].mediaBox.bottomLeftY-z(c)},es=g.__private__.getHorizontalCoordinateString=g.getHorizontalCoordinateString=function(c){return K(wn(c))},rs=g.__private__.getVerticalCoordinateString=g.getVerticalCoordinateString=function(c){return K(yn(c))},Bi=r.strokeColor||"0 G";g.__private__.getStrokeColor=g.getDrawColor=function(){return rn(Bi)},g.__private__.setStrokeColor=g.setDrawColor=function(c,m,j,q){return Bi=Wr({ch1:c,ch2:m,ch3:j,ch4:q,pdfColorType:"draw",precision:2}),F(Bi),this};var aa=r.fillColor||"0 g";g.__private__.getFillColor=g.getFillColor=function(){return rn(aa)},g.__private__.setFillColor=g.setFillColor=function(c,m,j,q){return aa=Wr({ch1:c,ch2:m,ch3:j,ch4:q,pdfColorType:"fill",precision:2}),F(aa),this};var fi=r.textColor||"0 g",ns=g.__private__.getTextColor=g.getTextColor=function(){return rn(fi)};g.__private__.setTextColor=g.setTextColor=function(c,m,j,q){return fi=Wr({ch1:c,ch2:m,ch3:j,ch4:q,pdfColorType:"text",precision:3}),this};var xn=r.charSpace,is=g.__private__.getCharSpace=g.getCharSpace=function(){return parseFloat(xn||0)};g.__private__.setCharSpace=g.setCharSpace=function(c){if(isNaN(c))throw new Error("Invalid argument passed to jsPDF.setCharSpace");return xn=c,this};var oa=0;g.CapJoinStyles={0:0,butt:0,but:0,miter:0,1:1,round:1,rounded:1,circle:1,2:2,projecting:2,project:2,square:2,bevel:2},g.__private__.setLineCap=g.setLineCap=function(c){var m=g.CapJoinStyles[c];if(m===void 0)throw new Error("Line cap style of '"+c+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return oa=m,F(m+" J"),this};var sa=0;g.__private__.setLineJoin=g.setLineJoin=function(c){var m=g.CapJoinStyles[c];if(m===void 0)throw new Error("Line join style of '"+c+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return sa=m,F(m+" j"),this},g.__private__.setLineMiterLimit=g.__private__.setMiterLimit=g.setLineMiterLimit=g.setMiterLimit=function(c){if(c=c||0,isNaN(c))throw new Error("Invalid argument passed to jsPDF.setLineMiterLimit");return F(K(z(c))+" M"),this},g.GState=Do,g.setGState=function(c){(c=typeof c=="string"?Yt[Qt[c]]:Ja(null,c)).equals(Ee)||(F("/"+c.id+" gs"),Ee=c)};var Ja=function(c,m){if(!c||!Qt[c]){var j=!1;for(var q in Yt)if(Yt.hasOwnProperty(q)&&Yt[q].equals(m)){j=!0;break}if(j)m=Yt[q];else{var $="GS"+(Object.keys(Yt).length+1).toString(10);Yt[$]=m,m.id=$}return c&&(Qt[c]=m.id),be.publish("addGState",m),m}};g.addGState=function(c,m){return Ja(c,m),this},g.saveGraphicsState=function(){return F("q"),Ie.push({key:jt,size:yt,color:fi}),this},g.restoreGraphicsState=function(){F("Q");var c=Ie.pop();return jt=c.key,yt=c.size,fi=c.color,Ee=null,this},g.setCurrentTransformationMatrix=function(c){return F(c.toString()+" cm"),this},g.comment=function(c){return F("#"+c),this};var An=function(c,m){var j=c||0;Object.defineProperty(this,"x",{enumerable:!0,get:function(){return j},set:function(dt){isNaN(dt)||(j=parseFloat(dt))}});var q=m||0;Object.defineProperty(this,"y",{enumerable:!0,get:function(){return q},set:function(dt){isNaN(dt)||(q=parseFloat(dt))}});var $="pt";return Object.defineProperty(this,"type",{enumerable:!0,get:function(){return $},set:function(dt){$=dt.toString()}}),this},la=function(c,m,j,q){An.call(this,c,m),this.type="rect";var $=j||0;Object.defineProperty(this,"w",{enumerable:!0,get:function(){return $},set:function(mt){isNaN(mt)||($=parseFloat(mt))}});var dt=q||0;return Object.defineProperty(this,"h",{enumerable:!0,get:function(){return dt},set:function(mt){isNaN(mt)||(dt=parseFloat(mt))}}),this},Di=function(){this.page=le,this.currentPage=D,this.pages=At.slice(0),this.pagesContext=Gt.slice(0),this.x=Tt,this.y=Me,this.matrix=pe,this.width=fa(D),this.height=$a(D),this.outputDestination=St,this.id="",this.objectNumber=-1};Di.prototype.restore=function(){le=this.page,D=this.currentPage,Gt=this.pagesContext,At=this.pages,Tt=this.x,Me=this.y,pe=this.matrix,Ka(D,this.width),_n(D,this.height),St=this.outputDestination};var ua=function(c,m,j,q,$){en.push(new Di),le=D=0,At=[],Tt=c,Me=m,pe=$,ea([j,q])};for(var hi in g.beginFormObject=function(c,m,j,q,$){return ua(c,m,j,q,$),this},g.endFormObject=function(c){return(function(m){if(gn[m])en.pop().restore();else{var j=new Di,q="Xo"+(Object.keys(fr).length+1).toString(10);j.id=q,gn[m]=q,fr[q]=j,be.publish("addFormObject",j),en.pop().restore()}})(c),this},g.doFormObject=function(c,m){var j=fr[gn[c]];return F("q"),F(m.toString()+" cm"),F("/"+j.id+" Do"),F("Q"),this},g.getFormObject=function(c){var m=fr[gn[c]];return{x:m.x,y:m.y,width:m.width,height:m.height,matrix:m.matrix}},g.save=function(c,m){return c=c||"generated.pdf",(m=m||{}).returnPromise=m.returnPromise||!1,m.returnPromise===!1?(Ai(Oi(on()),c),typeof Ai.unload=="function"&&Jt.setTimeout&&setTimeout(Ai.unload,911),this):new Promise(function(j,q){try{var $=Ai(Oi(on()),c);typeof Ai.unload=="function"&&Jt.setTimeout&&setTimeout(Ai.unload,911),j($)}catch(dt){q(dt.message)}})},Rt.API)Rt.API.hasOwnProperty(hi)&&(hi==="events"&&Rt.API.events.length?(function(c,m){var j,q,$;for($=m.length-1;$!==-1;$--)j=m[$][0],q=m[$][1],c.subscribe.apply(c,[j].concat(typeof q=="function"?[q]:q))})(be,Rt.API.events):g[hi]=Rt.API[hi]);function fa(c){return Gt[c].mediaBox.topRightX-Gt[c].mediaBox.bottomLeftX}function Ka(c,m){Gt[c].mediaBox.topRightX=m+Gt[c].mediaBox.bottomLeftX}function $a(c){return Gt[c].mediaBox.topRightY-Gt[c].mediaBox.bottomLeftY}function _n(c,m){Gt[c].mediaBox.topRightY=m+Gt[c].mediaBox.bottomLeftY}var Nn=g.getPageWidth=function(c){return fa(c=c||D)/ee},Xa=g.setPageWidth=function(c,m){Ka(c,m*ee)},ci=g.getPageHeight=function(c){return $a(c=c||D)/ee},Za=g.setPageHeight=function(c,m){_n(c,m*ee)};return g.internal={pdfEscape:Dr,getStyle:Ga,getFont:$o,getFontSize:Ct,getCharSpace:is,getTextColor:ns,getLineHeight:Zo,getLineHeightFactor:ts,getLineWidth:Xo,write:Lt,getHorizontalCoordinate:wn,getVerticalCoordinate:yn,getCoordinateString:es,getVerticalCoordinateString:rs,collections:{},newObject:Be,newAdditionalObject:ai,newObjectDeferred:rr,newObjectDeferredBegin:ir,getFilters:Gr,putStream:Br,events:be,scaleFactor:ee,pageSize:{getWidth:function(){return Nn(D)},setWidth:function(c){Xa(D,c)},getHeight:function(){return ci(D)},setHeight:function(c){Za(D,c)}},encryptionOptions:p,encryption:$e,getEncryptor:function(c){return p!==null?$e.encryptor(c,0):function(m){return m}},output:Ha,getNumberOfPages:qa,get pages(){return At},out:F,f2:L,f3:O,getPageInfo:bn,getPageInfoByObjId:Wa,getCurrentPageInfo:Go,getPDFVersion:C,Point:An,Rectangle:la,Matrix:Vt,hasHotfix:Rr},Object.defineProperty(g.internal.pageSize,"width",{get:function(){return Nn(D)},set:function(c){Xa(D,c)},enumerable:!0,configurable:!0}),Object.defineProperty(g.internal.pageSize,"height",{get:function(){return ci(D)},set:function(c){Za(D,c)},enumerable:!0,configurable:!0}),(function(c){for(var m=0,j=Ht.length;m<j;m++){var q=Ra.call(this,c[m][0],c[m][1],c[m][2],Ht[m][3],!0);w===!1&&(x[q]=!0);var $=c[m][0].split("-");Da({id:q,fontName:$[0],fontStyle:$[1]||""})}be.publish("addFonts",{fonts:oe,dictionary:se})}).call(g,Ht),jt="F1",Ta(a,e),be.publish("initialized"),g}Gi.prototype.lsbFirstWord=function(r){return String.fromCharCode(255&r,r>>8&255,r>>16&255,r>>24&255)},Gi.prototype.toHexString=function(r){return r.split("").map(function(t){return("0"+(255&t.charCodeAt(0)).toString(16)).slice(-2)}).join("")},Gi.prototype.hexToBytes=function(r){for(var t=[],e=0;e<r.length;e+=2)t.push(String.fromCharCode(parseInt(r.substr(e,2),16)));return t.join("")},Gi.prototype.processOwnerPassword=function(r,t){return tl(Qs(t).substr(0,5),r)},Gi.prototype.encryptor=function(r,t){var e=Qs(this.encryptionKey+String.fromCharCode(255&r,r>>8&255,r>>16&255,255&t,t>>8&255)).substr(0,10);return function(n){return tl(e,n)}},Do.prototype.equals=function(r){var t,e="id,objectNumber,equals";if(!r||ye(r)!==ye(this))return!1;var n=0;for(t in this)if(!(e.indexOf(t)>=0)){if(this.hasOwnProperty(t)&&!r.hasOwnProperty(t)||this[t]!==r[t])return!1;n++}for(t in r)r.hasOwnProperty(t)&&e.indexOf(t)<0&&n--;return n===0},Rt.API={events:[]},Rt.version="4.0.0";var Te=Rt.API,fl=1,Pi=function(r){return r.replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},Hi=function(r){return r.replace(/\\\\/g,"\\").replace(/\\\(/g,"(").replace(/\\\)/g,")")},Xt=function(r){return r.toFixed(2)},ei=function(r){return r.toFixed(5)};Te.__acroform__={};var Ar=function(r,t){r.prototype=Object.create(t.prototype),r.prototype.constructor=r},Hu=function(r){return r*fl},cn=function(r){var t=new Zf,e=Ft.internal.getHeight(r)||0,n=Ft.internal.getWidth(r)||0;return t.BBox=[0,0,Number(Xt(n)),Number(Xt(e))],t},g2=Te.__acroform__.setBit=function(r,t){if(r=r||0,t=t||0,isNaN(r)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBit");return r|1<<t},v2=Te.__acroform__.clearBit=function(r,t){if(r=r||0,t=t||0,isNaN(r)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBit");return r&~(1<<t)},m2=Te.__acroform__.getBit=function(r,t){if(isNaN(r)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBit");return r&1<<t?1:0},We=Te.__acroform__.getBitForPdf=function(r,t){if(isNaN(r)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBitForPdf");return m2(r,t-1)},Ge=Te.__acroform__.setBitForPdf=function(r,t){if(isNaN(r)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBitForPdf");return g2(r,t-1)},Ve=Te.__acroform__.clearBitForPdf=function(r,t){if(isNaN(r)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBitForPdf");return v2(r,t-1)},b2=Te.__acroform__.calculateCoordinates=function(r,t){var e=t.internal.getHorizontalCoordinate,n=t.internal.getVerticalCoordinate,a=r[0],i=r[1],f=r[2],l=r[3],u={};return u.lowerLeft_X=e(a)||0,u.lowerLeft_Y=n(i+l)||0,u.upperRight_X=e(a+f)||0,u.upperRight_Y=n(i)||0,[Number(Xt(u.lowerLeft_X)),Number(Xt(u.lowerLeft_Y)),Number(Xt(u.upperRight_X)),Number(Xt(u.upperRight_Y))]},w2=function(r){if(r.appearanceStreamContent)return r.appearanceStreamContent;if(r.V||r.DV){var t=[],e=r._V||r.DV,n=el(r,e),a=r.scope.internal.getFont(r.fontName,r.fontStyle).id;t.push("/Tx BMC"),t.push("q"),t.push("BT"),t.push(r.scope.__private__.encodeColorString(r.color)),t.push("/"+a+" "+Xt(n.fontSize)+" Tf"),t.push("1 0 0 1 0 0 Tm"),t.push(n.text),t.push("ET"),t.push("Q"),t.push("EMC");var i=cn(r);return i.scope=r.scope,i.stream=t.join(`
|
|
23
23
|
`),i}},el=function(r,t){var e=r.fontSize===0?r.maxFontSize:r.fontSize,n={text:"",fontSize:""},a=(t=(t=t.substr(0,1)=="("?t.substr(1):t).substr(t.length-1)==")"?t.substr(0,t.length-1):t).split(" ");a=r.multiline?a.map(function(L){return L.split(`
|
|
24
24
|
`)}):a.map(function(L){return[L]});var i=e,f=Ft.internal.getHeight(r)||0;f=f<0?-f:f;var l=Ft.internal.getWidth(r)||0;l=l<0?-l:l;var u=function(L,O,z){if(L+1<a.length){var U=O+" "+a[L+1][0];return Lo(U,r,z).width<=l-4}return!1};i++;t:for(;i>0;){t="",i--;var h,p,w=Lo("3",r,i).height,x=r.multiline?f-i:(f-w)/2,g=x+=2,P=0,C=0,B=0;if(i<=0){t=`(...) Tj
|
|
25
25
|
`,t+="% Width of Text: "+Lo(t,r,i=12).width+", FieldWidth:"+l+`
|
|
@@ -38,7 +38,7 @@ T* `):c.join(` Tj
|
|
|
38
38
|
`),t}},Cross:{createAppearanceStream:function(r){var t={D:{Off:Ft.RadioButton.Cross.OffPushDown},N:{}};return t.N[r]=Ft.RadioButton.Cross.YesNormal,t.D[r]=Ft.RadioButton.Cross.YesPushDown,t},getCA:function(){return"8"},YesNormal:function(r){var t=cn(r);t.scope=r.scope;var e=[],n=Ft.internal.calculateCross(r);return e.push("q"),e.push("1 1 "+Xt(Ft.internal.getWidth(r)-2)+" "+Xt(Ft.internal.getHeight(r)-2)+" re"),e.push("W"),e.push("n"),e.push(Xt(n.x1.x)+" "+Xt(n.x1.y)+" m"),e.push(Xt(n.x2.x)+" "+Xt(n.x2.y)+" l"),e.push(Xt(n.x4.x)+" "+Xt(n.x4.y)+" m"),e.push(Xt(n.x3.x)+" "+Xt(n.x3.y)+" l"),e.push("s"),e.push("Q"),t.stream=e.join(`
|
|
39
39
|
`),t},YesPushDown:function(r){var t=cn(r);t.scope=r.scope;var e=Ft.internal.calculateCross(r),n=[];return n.push("0.749023 g"),n.push("0 0 "+Xt(Ft.internal.getWidth(r))+" "+Xt(Ft.internal.getHeight(r))+" re"),n.push("f"),n.push("q"),n.push("1 1 "+Xt(Ft.internal.getWidth(r)-2)+" "+Xt(Ft.internal.getHeight(r)-2)+" re"),n.push("W"),n.push("n"),n.push(Xt(e.x1.x)+" "+Xt(e.x1.y)+" m"),n.push(Xt(e.x2.x)+" "+Xt(e.x2.y)+" l"),n.push(Xt(e.x4.x)+" "+Xt(e.x4.y)+" m"),n.push(Xt(e.x3.x)+" "+Xt(e.x3.y)+" l"),n.push("s"),n.push("Q"),t.stream=n.join(`
|
|
40
40
|
`),t},OffPushDown:function(r){var t=cn(r);t.scope=r.scope;var e=[];return e.push("0.749023 g"),e.push("0 0 "+Xt(Ft.internal.getWidth(r))+" "+Xt(Ft.internal.getHeight(r))+" re"),e.push("f"),t.stream=e.join(`
|
|
41
|
-
`),t}}},createDefaultAppearanceStream:function(r){var t=r.scope.internal.getFont(r.fontName,r.fontStyle).id,e=r.scope.__private__.encodeColorString(r.color);return"/"+t+" "+r.fontSize+" Tf "+e}};Ft.internal={Bezier_C:.551915024494,calculateCross:function(r){var t=Ft.internal.getWidth(r),e=Ft.internal.getHeight(r),n=Math.min(t,e);return{x1:{x:(t-n)/2,y:(e-n)/2+n},x2:{x:(t-n)/2+n,y:(e-n)/2},x3:{x:(t-n)/2,y:(e-n)/2},x4:{x:(t-n)/2+n,y:(e-n)/2+n}}}},Ft.internal.getWidth=function(r){var t=0;return ye(r)==="object"&&(t=Hu(r.Rect[2])),t},Ft.internal.getHeight=function(r){var t=0;return ye(r)==="object"&&(t=Hu(r.Rect[3])),t};var _2=Te.addField=function(r){if(A2(this,r),!(r instanceof Qr))throw new Error("Invalid argument passed to jsPDF.addField.");var t;return(t=r).scope.internal.acroformPlugin.printedOut&&(t.scope.internal.acroformPlugin.printedOut=!1,t.scope.internal.acroformPlugin.acroFormDictionaryRoot=null),t.scope.internal.acroformPlugin.acroFormDictionaryRoot.Fields.push(t),r.page=r.scope.internal.getCurrentPageInfo().pageNumber,this};Te.AcroFormChoiceField=Ji,Te.AcroFormListBox=Ki,Te.AcroFormComboBox=$i,Te.AcroFormEditBox=Fo,Te.AcroFormButton=nr,Te.AcroFormPushButton=Io,Te.AcroFormRadioButton=Xi,Te.AcroFormCheckBox=Eo,Te.AcroFormTextField=Ni,Te.AcroFormPasswordField=Oo,Te.AcroFormAppearance=Ft,Te.AcroForm={ChoiceField:Ji,ListBox:Ki,ComboBox:$i,EditBox:Fo,Button:nr,PushButton:Io,RadioButton:Xi,CheckBox:Eo,TextField:Ni,PasswordField:Oo,Appearance:Ft},Rt.AcroForm={ChoiceField:Ji,ListBox:Ki,ComboBox:$i,EditBox:Fo,Button:nr,PushButton:Io,RadioButton:Xi,CheckBox:Eo,TextField:Ni,PasswordField:Oo,Appearance:Ft};Rt.AcroForm;function th(r){return r.reduce(function(t,e,n){return t[e]=n,t},{})}(function(r){var t="addImage_";r.__addimage__={};var e="UNKNOWN",n={PNG:[[137,80,78,71]],TIFF:[[77,77,0,42],[73,73,42,0]],JPEG:[[255,216,255,224,void 0,void 0,74,70,73,70,0],[255,216,255,225,void 0,void 0,69,120,105,102,0,0],[255,216,255,219],[255,216,255,238]],JPEG2000:[[0,0,0,12,106,80,32,32]],GIF87a:[[71,73,70,56,55,97]],GIF89a:[[71,73,70,56,57,97]],WEBP:[[82,73,70,70,void 0,void 0,void 0,void 0,87,69,66,80]],BMP:[[66,77],[66,65],[67,73],[67,80],[73,67],[80,84]]},a=r.__addimage__.getImageFileTypeByImageData=function(L,O){var z,U,nt,st,ut,rt=e;if((O=O||e)==="RGBA"||L.data!==void 0&&L.data instanceof Uint8ClampedArray&&"height"in L&&"width"in L)return"RGBA";if(vt(L))for(ut in n)for(nt=n[ut],z=0;z<nt.length;z+=1){for(st=!0,U=0;U<nt[z].length;U+=1)if(nt[z][U]!==void 0&&nt[z][U]!==L[U]){st=!1;break}if(st===!0){rt=ut;break}}else for(ut in n)for(nt=n[ut],z=0;z<nt.length;z+=1){for(st=!0,U=0;U<nt[z].length;U+=1)if(nt[z][U]!==void 0&&nt[z][U]!==L.charCodeAt(U)){st=!1;break}if(st===!0){rt=ut;break}}return rt===e&&O!==e&&(rt=O),rt},i=function L(O){for(var z=this.internal.write,U=this.internal.putStream,nt=(0,this.internal.getFilters)();nt.indexOf("FlateEncode")!==-1;)nt.splice(nt.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===S.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===S.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 ut="",rt=0,ht=O.transparency.length;rt<ht;rt++)ut+=O.transparency[rt]+" "+O.transparency[rt]+" ";st.push({key:"Mask",value:"["+ut+"]"})}O.sMask!==void 0&&st.push({key:"SMask",value:O.objectId+1+" 0 R"});var _t=O.filter!==void 0?["/"+O.filter]:void 0;if(U({data:O.data,additionalKeyValues:st,alreadyAppliedFilters:_t,objectId:O.objectId}),z("endobj"),"sMask"in O&&O.sMask!==void 0){var wt,_=(wt=O.sMaskBitsPerComponent)!==null&&wt!==void 0?wt:O.bitsPerComponent,D={width:O.width,height:O.height,colorSpace:"DeviceGray",bitsPerComponent:_,data:O.sMask};"filter"in O&&(D.decodeParameters="/Predictor ".concat(O.predictor," /Colors 1 /BitsPerComponent ").concat(_," /Columns ").concat(O.width),D.filter=O.filter),L.call(this,D)}if(O.colorSpace===S.INDEXED){var T=this.internal.newObject();U({data:K(new Uint8Array(O.palette)),objectId:T}),z("endobj")}},f=function(){var L=this.internal.collections[t+"images"];for(var O in L)i.call(this,L[O])},l=function(){var L,O=this.internal.collections[t+"images"],z=this.internal.write;for(var U in O)z("/I"+(L=O[U]).index,L.objectId,"0","R")},u=function(){this.internal.collections[t+"images"]||(this.internal.collections[t+"images"]={},this.internal.events.subscribe("putResources",f),this.internal.events.subscribe("putXobjectDict",l))},h=function(){var L=this.internal.collections[t+"images"];return u.call(this),L},p=function(){return Object.keys(this.internal.collections[t+"images"]).length},w=function(L){return typeof r["process"+L.toUpperCase()]=="function"},x=function(L){return ye(L)==="object"&&L.nodeType===1},g=function(L,O){if(L.nodeName==="IMG"&&L.hasAttribute("src")){var z=""+L.getAttribute("src");if(z.indexOf("data:image/")===0)return Co(unescape(z).split("base64,").pop());var U=r.loadFile(z,!0);if(U!==void 0)return U}if(L.nodeName==="CANVAS"){if(L.width===0||L.height===0)throw new Error("Given canvas must have data. Canvas width: "+L.width+", height: "+L.height);var nt;switch(O){case"PNG":nt="image/png";break;case"WEBP":nt="image/webp";break;default:nt="image/jpeg"}return Co(L.toDataURL(nt,1).split("base64,").pop())}},P=function(L){var O=this.internal.collections[t+"images"];if(O){for(var z in O)if(L===O[z].alias)return O[z]}},C=function(L,O,z){return L||O||(L=-96,O=-96),L<0&&(L=-1*z.width*72/L/this.internal.scaleFactor),O<0&&(O=-1*z.height*72/O/this.internal.scaleFactor),L===0&&(L=O*z.width/z.height),O===0&&(O=L*z.height/z.width),[L,O]},B=function(L,O,z,U,nt,st){var ut=C.call(this,z,U,nt),rt=this.internal.getCoordinateString,ht=this.internal.getVerticalCoordinateString,_t=h.call(this);if(z=ut[0],U=ut[1],_t[nt.index]=nt,st){st*=Math.PI/180;var wt=Math.cos(st),_=Math.sin(st),D=function(H){return H.toFixed(4)},T=[D(wt),D(_),D(-1*_),D(wt),0,0,"cm"]}this.internal.write("q"),st?(this.internal.write([1,"0","0",1,rt(L),ht(O+U),"cm"].join(" ")),this.internal.write(T.join(" ")),this.internal.write([rt(z),"0","0",rt(U),"0","0","cm"].join(" "))):this.internal.write([rt(z),"0","0",rt(U),rt(L),ht(O+U),"cm"].join(" ")),this.isAdvancedAPI()&&this.internal.write([1,0,0,-1,0,0,"cm"].join(" ")),this.internal.write("/I"+nt.index+" Do"),this.internal.write("Q")},S=r.color_spaces={DEVICE_RGB:"DeviceRGB",DEVICE_GRAY:"DeviceGray",DEVICE_CMYK:"DeviceCMYK",CAL_GREY:"CalGray",CAL_RGB:"CalRGB",LAB:"Lab",ICC_BASED:"ICCBased",INDEXED:"Indexed",PATTERN:"Pattern",SEPARATION:"Separation",DEVICE_N:"DeviceN"};r.decode={DCT_DECODE:"DCTDecode",FLATE_DECODE:"FlateDecode",LZW_DECODE:"LZWDecode",JPX_DECODE:"JPXDecode",JBIG2_DECODE:"JBIG2Decode",ASCII85_DECODE:"ASCII85Decode",ASCII_HEX_DECODE:"ASCIIHexDecode",RUN_LENGTH_DECODE:"RunLengthDecode",CCITT_FAX_DECODE:"CCITTFaxDecode"};var G=r.image_compression={NONE:"NONE",FAST:"FAST",MEDIUM:"MEDIUM",SLOW:"SLOW"},V=r.__addimage__.sHashCode=function(L){var O,z,U=0;if(typeof L=="string")for(z=L.length,O=0;O<z;O++)U=(U<<5)-U+L.charCodeAt(O),U|=0;else if(vt(L))for(z=L.byteLength/2,O=0;O<z;O++)U=(U<<5)-U+L[O],U|=0;return U},M=r.__addimage__.validateStringAsBase64=function(L){(L=L||"").toString().trim();var O=!0;return L.length===0&&(O=!1),L.length%4!=0&&(O=!1),/^[A-Za-z0-9+/]+$/.test(L.substr(0,L.length-2))===!1&&(O=!1),/^[A-Za-z0-9/][A-Za-z0-9+/]|[A-Za-z0-9+/]=|==$/.test(L.substr(-2))===!1&&(O=!1),O},it=r.__addimage__.extractImageFromDataUrl=function(L){if(L==null||!(L=L.trim()).startsWith("data:"))return null;var O=L.indexOf(",");return O<0?null:L.substring(0,O).trim().endsWith("base64")?L.substring(O+1):null};r.__addimage__.isArrayBuffer=function(L){return L instanceof ArrayBuffer};var vt=r.__addimage__.isArrayBufferView=function(L){return L instanceof Int8Array||L instanceof Uint8Array||L instanceof Uint8ClampedArray||L instanceof Int16Array||L instanceof Uint16Array||L instanceof Int32Array||L instanceof Uint32Array||L instanceof Float32Array||L instanceof Float64Array},ct=r.__addimage__.binaryStringToUint8Array=function(L){for(var O=L.length,z=new Uint8Array(O),U=0;U<O;U++)z[U]=L.charCodeAt(U);return z},K=r.__addimage__.arrayBufferToBinaryString=function(L){for(var O="",z=vt(L)?L:new Uint8Array(L),U=0;U<z.length;U+=8192)O+=String.fromCharCode.apply(null,z.subarray(U,U+8192));return O};r.addImage=function(){var L,O,z,U,nt,st,ut,rt,ht;if(typeof arguments[1]=="number"?(O=e,z=arguments[1],U=arguments[2],nt=arguments[3],st=arguments[4],ut=arguments[5],rt=arguments[6],ht=arguments[7]):(O=arguments[1],z=arguments[2],U=arguments[3],nt=arguments[4],st=arguments[5],ut=arguments[6],rt=arguments[7],ht=arguments[8]),ye(L=arguments[0])==="object"&&!x(L)&&"imageData"in L){var _t=L;L=_t.imageData,O=_t.format||O||e,z=_t.x||z||0,U=_t.y||U||0,nt=_t.w||_t.width||nt,st=_t.h||_t.height||st,ut=_t.alias||ut,rt=_t.compression||rt,ht=_t.rotation||_t.angle||ht}var wt=this.internal.getFilters();if(rt===void 0&&wt.indexOf("FlateEncode")!==-1&&(rt="SLOW"),isNaN(z)||isNaN(U))throw new Error("Invalid coordinates passed to jsPDF.addImage");u.call(this);var _=R.call(this,L,O,ut,rt);return B.call(this,z,U,nt,st,_,ht),this};var R=function(L,O,z,U){var nt,st,ut;if(typeof L=="string"&&a(L)===e){L=unescape(L);var rt=tt(L,!1);(rt!==""||(rt=r.loadFile(L,!0))!==void 0)&&(L=rt)}if(x(L)&&(L=g(L,O)),O=a(L,O),!w(O))throw new Error("addImage does not support files of type '"+O+"', please ensure that a plugin for '"+O+"' support is added.");if(((ut=z)==null||ut.length===0)&&(z=(function(ht){return typeof ht=="string"||vt(ht)?V(ht):vt(ht.data)?V(ht.data):null})(L)),(nt=P.call(this,z))||(L instanceof Uint8Array||O==="RGBA"||(st=L,L=ct(L)),nt=this["process"+O.toUpperCase()](L,p.call(this),z,(function(ht){return ht&&typeof ht=="string"&&(ht=ht.toUpperCase()),ht in r.image_compression?ht:G.NONE})(U),st)),!nt)throw new Error("An unknown error occurred whilst processing the image.");return nt},tt=r.__addimage__.convertBase64ToBinaryString=function(L,O){O=typeof O!="boolean"||O;var z,U="";if(typeof L=="string"){var nt;z=(nt=it(L))!==null&&nt!==void 0?nt:L;try{U=Co(z)}catch(st){if(O)throw M(z)?new Error("atob-Error in jsPDF.convertBase64ToBinaryString "+st.message):new Error("Supplied Data is not a valid base64-String jsPDF.convertBase64ToBinaryString ")}}return U};r.getImageProperties=function(L){var O,z,U="";if(x(L)&&(L=g(L)),typeof L=="string"&&a(L)===e&&((U=tt(L,!1))===""&&(U=r.loadFile(L)||""),L=U),z=a(L),!w(z))throw new Error("addImage does not support files of type '"+z+"', please ensure that a plugin for '"+z+"' support is added.");if(L instanceof Uint8Array||(L=ct(L)),!(O=this["process"+z.toUpperCase()](L)))throw new Error("An unknown error occurred whilst processing the image");return O.fileType=z,O}})(Rt.API),(function(r){var t=function(e){if(e!==void 0&&e!="")return!0};Rt.API.events.push(["addPage",function(e){this.internal.getPageInfo(e.pageNumber).pageContext.annotations=[]}]),r.events.push(["putPage",function(e){for(var n,a,i,f=this.internal.getCoordinateString,l=this.internal.getVerticalCoordinateString,u=this.internal.getPageInfoByObjId(e.objId),h=e.pageContext.annotations,p=!1,w=0;w<h.length&&!p;w++)switch((n=h[w]).type){case"link":(t(n.options.url)||t(n.options.pageNumber))&&(p=!0);break;case"reference":case"text":case"freetext":p=!0}if(p!=0){this.internal.write("/Annots [");for(var x=0;x<h.length;x++){n=h[x];var g=this.internal.pdfEscape,P=this.internal.getEncryptor(e.objId);switch(n.type){case"reference":this.internal.write(" "+n.object.objId+" 0 R ");break;case"text":var C=this.internal.newAdditionalObject(),B=this.internal.newAdditionalObject(),S=this.internal.getEncryptor(C.objId),G=n.title||"Note";i="<</Type /Annot /Subtype /Text "+(a="/Rect ["+f(n.bounds.x)+" "+l(n.bounds.y+n.bounds.h)+" "+f(n.bounds.x+n.bounds.w)+" "+l(n.bounds.y)+"] ")+"/Contents ("+g(S(n.contents))+")",i+=" /Popup "+B.objId+" 0 R",i+=" /P "+u.objId+" 0 R",i+=" /T ("+g(S(G))+") >>",C.content=i;var V=C.objId+" 0 R";i="<</Type /Annot /Subtype /Popup "+(a="/Rect ["+f(n.bounds.x+30)+" "+l(n.bounds.y+n.bounds.h)+" "+f(n.bounds.x+n.bounds.w+30)+" "+l(n.bounds.y)+"] ")+" /Parent "+V,n.open&&(i+=" /Open true"),i+=" >>",B.content=i,this.internal.write(C.objId,"0 R",B.objId,"0 R");break;case"freetext":a="/Rect ["+f(n.bounds.x)+" "+l(n.bounds.y)+" "+f(n.bounds.x+n.bounds.w)+" "+l(n.bounds.y+n.bounds.h)+"] ";var M=n.color||"#000000";i="<</Type /Annot /Subtype /FreeText "+a+"/Contents ("+g(P(n.contents))+")",i+=" /DS(font: Helvetica,sans-serif 12.0pt; text-align:left; color:#"+M+")",i+=" /Border [0 0 0]",i+=" >>",this.internal.write(i);break;case"link":if(n.options.name){var it=this.annotations._nameMap[n.options.name];n.options.pageNumber=it.page,n.options.top=it.y}else n.options.top||(n.options.top=0);if(a="/Rect ["+n.finalBounds.x+" "+n.finalBounds.y+" "+n.finalBounds.w+" "+n.finalBounds.h+"] ",i="",n.options.url)i="<</Type /Annot /Subtype /Link "+a+"/Border [0 0 0] /A <</S /URI /URI ("+g(P(n.options.url))+") >>";else if(n.options.pageNumber)switch(i="<</Type /Annot /Subtype /Link "+a+"/Border [0 0 0] /Dest ["+this.internal.getPageInfo(n.options.pageNumber).objId+" 0 R",n.options.magFactor=n.options.magFactor||"XYZ",n.options.magFactor){case"Fit":i+=" /Fit]";break;case"FitH":i+=" /FitH "+n.options.top+"]";break;case"FitV":n.options.left=n.options.left||0,i+=" /FitV "+n.options.left+"]";break;default:var vt=l(n.options.top);n.options.left=n.options.left||0,n.options.zoom===void 0&&(n.options.zoom=0),i+=" /XYZ "+n.options.left+" "+vt+" "+n.options.zoom+"]"}i!=""&&(i+=" >>",this.internal.write(i))}}this.internal.write("]")}}]),r.createAnnotation=function(e){var n=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":n.pageContext.annotations.push(e)}},r.link=function(e,n,a,i,f){var l=this.internal.getCurrentPageInfo(),u=this.internal.getCoordinateString,h=this.internal.getVerticalCoordinateString;l.pageContext.annotations.push({finalBounds:{x:u(e),y:h(n),w:u(e+a),h:h(n+i)},options:f,type:"link"})},r.textWithLink=function(e,n,a,i){var f,l,u=this.getTextWidth(e),h=this.internal.getLineHeight()/this.internal.scaleFactor;if(i.maxWidth!==void 0){l=i.maxWidth;var p=this.splitTextToSize(e,l).length;f=Math.ceil(h*p)}else l=u,f=h;return this.text(e,n,a,i),a+=.2*h,i.align==="center"&&(n-=u/2),i.align==="right"&&(n-=u),this.link(n,a-h,l,f,i),u},r.getTextWidth=function(e){var n=this.internal.getFontSize();return this.getStringUnitWidth(e)*n/this.internal.scaleFactor}})(Rt.API),(function(r){var t={1569:[65152],1570:[65153,65154],1571:[65155,65156],1572:[65157,65158],1573:[65159,65160],1574:[65161,65162,65163,65164],1575:[65165,65166],1576:[65167,65168,65169,65170],1577:[65171,65172],1578:[65173,65174,65175,65176],1579:[65177,65178,65179,65180],1580:[65181,65182,65183,65184],1581:[65185,65186,65187,65188],1582:[65189,65190,65191,65192],1583:[65193,65194],1584:[65195,65196],1585:[65197,65198],1586:[65199,65200],1587:[65201,65202,65203,65204],1588:[65205,65206,65207,65208],1589:[65209,65210,65211,65212],1590:[65213,65214,65215,65216],1591:[65217,65218,65219,65220],1592:[65221,65222,65223,65224],1593:[65225,65226,65227,65228],1594:[65229,65230,65231,65232],1601:[65233,65234,65235,65236],1602:[65237,65238,65239,65240],1603:[65241,65242,65243,65244],1604:[65245,65246,65247,65248],1605:[65249,65250,65251,65252],1606:[65253,65254,65255,65256],1607:[65257,65258,65259,65260],1608:[65261,65262],1609:[65263,65264,64488,64489],1610:[65265,65266,65267,65268],1649:[64336,64337],1655:[64477],1657:[64358,64359,64360,64361],1658:[64350,64351,64352,64353],1659:[64338,64339,64340,64341],1662:[64342,64343,64344,64345],1663:[64354,64355,64356,64357],1664:[64346,64347,64348,64349],1667:[64374,64375,64376,64377],1668:[64370,64371,64372,64373],1670:[64378,64379,64380,64381],1671:[64382,64383,64384,64385],1672:[64392,64393],1676:[64388,64389],1677:[64386,64387],1678:[64390,64391],1681:[64396,64397],1688:[64394,64395],1700:[64362,64363,64364,64365],1702:[64366,64367,64368,64369],1705:[64398,64399,64400,64401],1709:[64467,64468,64469,64470],1711:[64402,64403,64404,64405],1713:[64410,64411,64412,64413],1715:[64406,64407,64408,64409],1722:[64414,64415],1723:[64416,64417,64418,64419],1726:[64426,64427,64428,64429],1728:[64420,64421],1729:[64422,64423,64424,64425],1733:[64480,64481],1734:[64473,64474],1735:[64471,64472],1736:[64475,64476],1737:[64482,64483],1739:[64478,64479],1740:[64508,64509,64510,64511],1744:[64484,64485,64486,64487],1746:[64430,64431],1747:[64432,64433]},e={65247:{65154:65269,65156:65271,65160:65273,65166:65275},65248:{65154:65270,65156:65272,65160:65274,65166:65276},65165:{65247:{65248:{65258:65010}}},1617:{1612:64606,1613:64607,1614:64608,1615:64609,1616:64610}},n={1612:64606,1613:64607,1614:64608,1615:64609,1616:64610},a=[1570,1571,1573,1575];r.__arabicParser__={};var i=r.__arabicParser__.isInArabicSubstitutionA=function(C){return t[C.charCodeAt(0)]!==void 0},f=r.__arabicParser__.isArabicLetter=function(C){return typeof C=="string"&&/^[\u0600-\u06FF\u0750-\u077F\u08A0-\u08FF\uFB50-\uFDFF\uFE70-\uFEFF]+$/.test(C)},l=r.__arabicParser__.isArabicEndLetter=function(C){return f(C)&&i(C)&&t[C.charCodeAt(0)].length<=2},u=r.__arabicParser__.isArabicAlfLetter=function(C){return f(C)&&a.indexOf(C.charCodeAt(0))>=0};r.__arabicParser__.arabicLetterHasIsolatedForm=function(C){return f(C)&&i(C)&&t[C.charCodeAt(0)].length>=1};var h=r.__arabicParser__.arabicLetterHasFinalForm=function(C){return f(C)&&i(C)&&t[C.charCodeAt(0)].length>=2};r.__arabicParser__.arabicLetterHasInitialForm=function(C){return f(C)&&i(C)&&t[C.charCodeAt(0)].length>=3};var p=r.__arabicParser__.arabicLetterHasMedialForm=function(C){return f(C)&&i(C)&&t[C.charCodeAt(0)].length==4},w=r.__arabicParser__.resolveLigatures=function(C){var B=0,S=e,G="",V=0;for(B=0;B<C.length;B+=1)S[C.charCodeAt(B)]!==void 0?(V++,typeof(S=S[C.charCodeAt(B)])=="number"&&(G+=String.fromCharCode(S),S=e,V=0),B===C.length-1&&(S=e,G+=C.charAt(B-(V-1)),B-=V-1,V=0)):(S=e,G+=C.charAt(B-V),B-=V,V=0);return G};r.__arabicParser__.isArabicDiacritic=function(C){return C!==void 0&&n[C.charCodeAt(0)]!==void 0};var x=r.__arabicParser__.getCorrectForm=function(C,B,S){return f(C)?i(C)===!1?-1:!h(C)||!f(B)&&!f(S)||!f(S)&&l(B)||l(C)&&!f(B)||l(C)&&u(B)||l(C)&&l(B)?0:p(C)&&f(B)&&!l(B)&&f(S)&&h(S)?3:l(C)||!f(S)?1:2:-1},g=function(C){var B=0,S=0,G=0,V="",M="",it="",vt=(C=C||"").split("\\s+"),ct=[];for(B=0;B<vt.length;B+=1){for(ct.push(""),S=0;S<vt[B].length;S+=1)V=vt[B][S],M=vt[B][S-1],it=vt[B][S+1],f(V)?(G=x(V,M,it),ct[B]+=G!==-1?String.fromCharCode(t[V.charCodeAt(0)][G]):V):ct[B]+=V;ct[B]=w(ct[B])}return ct.join(" ")},P=r.__arabicParser__.processArabic=r.processArabic=function(){var C,B=typeof arguments[0]=="string"?arguments[0]:arguments[0].text,S=[];if(Array.isArray(B)){var G=0;for(S=[],G=0;G<B.length;G+=1)Array.isArray(B[G])?S.push([g(B[G][0]),B[G][1],B[G][2]]):S.push([g(B[G])]);C=S}else C=g(B);return typeof arguments[0]=="string"?C:(arguments[0].text=C,arguments[0])};r.events.push(["preProcessText",P])})(Rt.API),Rt.API.autoPrint=function(r){var t;return(r=r||{}).variant=r.variant||"non-conform",r.variant==="javascript"?this.addJS("print({});"):(this.internal.events.subscribe("postPutResources",function(){t=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/S /Named"),this.internal.out("/Type /Action"),this.internal.out("/N /Print"),this.internal.out(">>"),this.internal.out("endobj")}),this.internal.events.subscribe("putCatalog",function(){this.internal.out("/OpenAction "+t+" 0 R")})),this},(function(r){var t=function(){var e=void 0;Object.defineProperty(this,"pdf",{get:function(){return e},set:function(l){e=l}});var n=150;Object.defineProperty(this,"width",{get:function(){return n},set:function(l){n=isNaN(l)||Number.isInteger(l)===!1||l<0?150:l,this.getContext("2d").pageWrapXEnabled&&(this.getContext("2d").pageWrapX=n+1)}});var a=300;Object.defineProperty(this,"height",{get:function(){return a},set:function(l){a=isNaN(l)||Number.isInteger(l)===!1||l<0?300:l,this.getContext("2d").pageWrapYEnabled&&(this.getContext("2d").pageWrapY=a+1)}});var i=[];Object.defineProperty(this,"childNodes",{get:function(){return i},set:function(l){i=l}});var f={};Object.defineProperty(this,"style",{get:function(){return f},set:function(l){f=l}}),Object.defineProperty(this,"parentNode",{})};t.prototype.getContext=function(e,n){var a;if((e=e||"2d")!=="2d")return null;for(a in n)this.pdf.context2d.hasOwnProperty(a)&&(this.pdf.context2d[a]=n[a]);return this.pdf.context2d._canvas=this,this.pdf.context2d},t.prototype.toDataURL=function(){throw new Error("toDataURL is not implemented.")},r.events.push(["initialized",function(){this.canvas=new t,this.canvas.pdf=this}])})(Rt.API),(function(r){var t={left:0,top:0,bottom:0,right:0},e=!1,n=function(){this.internal.__cell__===void 0&&(this.internal.__cell__={},this.internal.__cell__.padding=3,this.internal.__cell__.headerFunction=void 0,this.internal.__cell__.margins=Object.assign({},t),this.internal.__cell__.margins.width=this.getPageWidth(),a.call(this))},a=function(){this.internal.__cell__.lastCell=new i,this.internal.__cell__.pages=1},i=function(){var u=arguments[0];Object.defineProperty(this,"x",{enumerable:!0,get:function(){return u},set:function(C){u=C}});var h=arguments[1];Object.defineProperty(this,"y",{enumerable:!0,get:function(){return h},set:function(C){h=C}});var p=arguments[2];Object.defineProperty(this,"width",{enumerable:!0,get:function(){return p},set:function(C){p=C}});var w=arguments[3];Object.defineProperty(this,"height",{enumerable:!0,get:function(){return w},set:function(C){w=C}});var x=arguments[4];Object.defineProperty(this,"text",{enumerable:!0,get:function(){return x},set:function(C){x=C}});var g=arguments[5];Object.defineProperty(this,"lineNumber",{enumerable:!0,get:function(){return g},set:function(C){g=C}});var P=arguments[6];return Object.defineProperty(this,"align",{enumerable:!0,get:function(){return P},set:function(C){P=C}}),this};i.prototype.clone=function(){return new i(this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align)},i.prototype.toArray=function(){return[this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align]},r.setHeaderFunction=function(u){return n.call(this),this.internal.__cell__.headerFunction=typeof u=="function"?u:void 0,this},r.getTextDimensions=function(u,h){n.call(this);var p=(h=h||{}).fontSize||this.getFontSize(),w=h.font||this.getFont(),x=h.scaleFactor||this.internal.scaleFactor,g=0,P=0,C=0,B=this;if(!Array.isArray(u)&&typeof u!="string"){if(typeof u!="number")throw new Error("getTextDimensions expects text-parameter to be of type String or type Number or an Array of Strings.");u=String(u)}var S=h.maxWidth;S>0?typeof u=="string"?u=this.splitTextToSize(u,S):Object.prototype.toString.call(u)==="[object Array]"&&(u=u.reduce(function(V,M){return V.concat(B.splitTextToSize(M,S))},[])):u=Array.isArray(u)?u:[u];for(var G=0;G<u.length;G++)g<(C=this.getStringUnitWidth(u[G],{font:w})*p)&&(g=C);return g!==0&&(P=u.length),{w:g/=x,h:Math.max((P*p*this.getLineHeightFactor()-p*(this.getLineHeightFactor()-1))/x,0)}},r.cellAddPage=function(){n.call(this),this.addPage();var u=this.internal.__cell__.margins||t;return this.internal.__cell__.lastCell=new i(u.left,u.top,void 0,void 0),this.internal.__cell__.pages+=1,this};var f=r.cell=function(){var u;u=arguments[0]instanceof i?arguments[0]:new i(arguments[0],arguments[1],arguments[2],arguments[3],arguments[4],arguments[5],arguments[6]),n.call(this);var h=this.internal.__cell__.lastCell,p=this.internal.__cell__.padding,w=this.internal.__cell__.margins||t,x=this.internal.__cell__.tableHeaderRow,g=this.internal.__cell__.printHeaders;return h.lineNumber!==void 0&&(h.lineNumber===u.lineNumber?(u.x=(h.x||0)+(h.width||0),u.y=h.y||0):h.y+h.height+u.height+w.bottom>this.getPageHeight()?(this.cellAddPage(),u.y=w.top,g&&x&&(this.printHeaderRow(u.lineNumber,!0),u.y+=x[0].height)):u.y=h.y+h.height||u.y),u.text[0]!==void 0&&(this.rect(u.x,u.y,u.width,u.height,e===!0?"FD":void 0),u.align==="right"?this.text(u.text,u.x+u.width-p,u.y+p,{align:"right",baseline:"top"}):u.align==="center"?this.text(u.text,u.x+u.width/2,u.y+p,{align:"center",baseline:"top",maxWidth:u.width-p-p}):this.text(u.text,u.x+p,u.y+p,{align:"left",baseline:"top",maxWidth:u.width-p-p})),this.internal.__cell__.lastCell=u,this};r.table=function(u,h,p,w,x){if(n.call(this),!p)throw new Error("No data for PDF table.");var g,P,C,B,S=[],G=[],V=[],M={},it={},vt=[],ct=[],K=(x=x||{}).autoSize||!1,R=x.printHeaders!==!1,tt=x.css&&x.css["font-size"]!==void 0?16*x.css["font-size"]:x.fontSize||12,L=x.margins||Object.assign({width:this.getPageWidth()},t),O=typeof x.padding=="number"?x.padding:3,z=x.headerBackgroundColor||"#c8c8c8",U=x.headerTextColor||"#000";if(a.call(this),this.internal.__cell__.printHeaders=R,this.internal.__cell__.margins=L,this.internal.__cell__.table_font_size=tt,this.internal.__cell__.padding=O,this.internal.__cell__.headerBackgroundColor=z,this.internal.__cell__.headerTextColor=U,this.setFontSize(tt),w==null)G=S=Object.keys(p[0]),V=S.map(function(){return"left"});else if(Array.isArray(w)&&ye(w[0])==="object")for(S=w.map(function(_t){return _t.name}),G=w.map(function(_t){return _t.prompt||_t.name||""}),V=w.map(function(_t){return _t.align||"left"}),g=0;g<w.length;g+=1)it[w[g].name]=.7499990551181103*w[g].width;else Array.isArray(w)&&typeof w[0]=="string"&&(G=S=w,V=S.map(function(){return"left"}));if(K||Array.isArray(w)&&typeof w[0]=="string")for(g=0;g<S.length;g+=1){for(M[B=S[g]]=p.map(function(_t){return _t[B]}),this.setFont(void 0,"bold"),vt.push(this.getTextDimensions(G[g],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w),P=M[B],this.setFont(void 0,"normal"),C=0;C<P.length;C+=1)vt.push(this.getTextDimensions(P[C],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w);it[B]=Math.max.apply(null,vt)+O+O,vt=[]}if(R){var nt={};for(g=0;g<S.length;g+=1)nt[S[g]]={},nt[S[g]].text=G[g],nt[S[g]].align=V[g];var st=l.call(this,nt,it);ct=S.map(function(_t){return new i(u,h,it[_t],st,nt[_t].text,void 0,nt[_t].align)}),this.setTableHeaderRow(ct),this.printHeaderRow(1,!1)}var ut=w.reduce(function(_t,wt){return _t[wt.name]=wt.align,_t},{});for(g=0;g<p.length;g+=1){"rowStart"in x&&x.rowStart instanceof Function&&x.rowStart({row:g,data:p[g]},this);var rt=l.call(this,p[g],it);for(C=0;C<S.length;C+=1){var ht=p[g][S[C]];"cellStart"in x&&x.cellStart instanceof Function&&x.cellStart({row:g,col:C,data:ht},this),f.call(this,new i(u,h,it[S[C]],rt,ht,g+2,ut[S[C]]))}}return this.internal.__cell__.table_x=u,this.internal.__cell__.table_y=h,this};var l=function(u,h){var p=this.internal.__cell__.padding,w=this.internal.__cell__.table_font_size,x=this.internal.scaleFactor;return Object.keys(u).map(function(g){var P=u[g];return this.splitTextToSize(P.hasOwnProperty("text")?P.text:P,h[g]-p-p)},this).map(function(g){return this.getLineHeightFactor()*g.length*w/x+p+p},this).reduce(function(g,P){return Math.max(g,P)},0)};r.setTableHeaderRow=function(u){n.call(this),this.internal.__cell__.tableHeaderRow=u},r.printHeaderRow=function(u,h){if(n.call(this),!this.internal.__cell__.tableHeaderRow)throw new Error("Property tableHeaderRow does not exist.");var p;if(e=!0,typeof this.internal.__cell__.headerFunction=="function"){var w=this.internal.__cell__.headerFunction(this,this.internal.__cell__.pages);this.internal.__cell__.lastCell=new i(w[0],w[1],w[2],w[3],void 0,-1)}this.setFont(void 0,"bold");for(var x=[],g=0;g<this.internal.__cell__.tableHeaderRow.length;g+=1){p=this.internal.__cell__.tableHeaderRow[g].clone(),h&&(p.y=this.internal.__cell__.margins.top||0,x.push(p)),p.lineNumber=u;var P=this.getTextColor();this.setTextColor(this.internal.__cell__.headerTextColor),this.setFillColor(this.internal.__cell__.headerBackgroundColor),f.call(this,p),this.setTextColor(P)}x.length>0&&this.setTableHeaderRow(x),this.setFont(void 0,"normal"),e=!1}})(Rt.API);var eh={italic:["italic","oblique","normal"],oblique:["oblique","italic","normal"],normal:["normal","oblique","italic"]},rh=["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded"],rl=th(rh),nh=[100,200,300,400,500,600,700,800,900],N2=th(nh);function Ts(r){var t=r.family.replace(/"|'/g,"").toLowerCase(),e=(function(i){return eh[i=i||"normal"]?i:"normal"})(r.style),n=(function(i){return i?typeof i=="number"?i>=100&&i<=900&&i%100==0?i:400:/^\d00$/.test(i)?parseInt(i):i==="bold"?700:400:400})(r.weight),a=(function(i){return typeof rl[i=i||"normal"]=="number"?i:"normal"})(r.stretch);return{family:t,style:e,weight:n,stretch:a,src:r.src||[],ref:r.ref||{name:t,style:[a,e,n].join(" ")}}}function Wu(r,t,e,n){var a;for(a=e;a>=0&&a<t.length;a+=n)if(r[t[a]])return r[t[a]];for(a=e;a>=0&&a<t.length;a-=n)if(r[t[a]])return r[t[a]]}var L2={"sans-serif":"helvetica",fixed:"courier",monospace:"courier",terminal:"courier",cursive:"times",fantasy:"times",serif:"times"},Gu={caption:"times",icon:"times",menu:"times","message-box":"times","small-caption":"times","status-bar":"times"};function Vu(r){return[r.stretch,r.style,r.weight,r.family].join(" ")}function Yu(r){return r.trimLeft()}function S2(r,t){for(var e=0;e<r.length;){if(r.charAt(e)===t)return[r.substring(0,e),r.substring(e+1)];e+=1}return null}function k2(r){var t=r.match(/^(-[a-z_]|[a-z_])[a-z0-9_-]*/i);return t===null?null:[t[0],r.substring(t[0].length)]}var So,Ju,Ku,Wi,ko,$u,Xu,Zu,Ms=["times"];function Qu(r,t,e,n,a){var i=4,f=ef;switch(a){case Rt.API.image_compression.FAST:i=1,f=tf;break;case Rt.API.image_compression.MEDIUM:i=6,f=rf;break;case Rt.API.image_compression.SLOW:i=9,f=nf}r=(function(u,h,p,w){for(var x,g=u.length/h,P=new Uint8Array(u.length+g),C=[P2,tf,ef,rf,nf],B=0;B<g;B+=1){var S=B*h,G=u.subarray(S,S+h);if(w)P.set(w(G,p,x),S+B);else{for(var V=C.length,M=[],it=0;it<V;it+=1)M[it]=C[it](G,p,x);var vt=F2(M.concat());P.set(M[vt],S+B)}x=G}return P})(r,t,Math.ceil(e*n/8),f);var l=Ks(r,{level:i});return Rt.API.__addimage__.arrayBufferToBinaryString(l)}function P2(r){var t=Array.apply([],r);return t.unshift(0),t}function tf(r,t){var e=r.length,n=[];n[0]=1;for(var a=0;a<e;a+=1){var i=r[a-t]||0;n[a+1]=r[a]-i+256&255}return n}function ef(r,t,e){var n=r.length,a=[];a[0]=2;for(var i=0;i<n;i+=1){var f=e&&e[i]||0;a[i+1]=r[i]-f+256&255}return a}function rf(r,t,e){var n=r.length,a=[];a[0]=3;for(var i=0;i<n;i+=1){var f=r[i-t]||0,l=e&&e[i]||0;a[i+1]=r[i]+256-(f+l>>>1)&255}return a}function nf(r,t,e){var n=r.length,a=[];a[0]=4;for(var i=0;i<n;i+=1){var f=C2(r[i-t]||0,e&&e[i]||0,e&&e[i-t]||0);a[i+1]=r[i]-f+256&255}return a}function C2(r,t,e){if(r===t&&t===e)return r;var n=Math.abs(t-e),a=Math.abs(r-e),i=Math.abs(r+t-e-e);return n<=a&&n<=i?r:a<=i?t:e}function F2(r){var t=r.map(function(e){return e.reduce(function(n,a){return n+Math.abs(a)},0)});return t.indexOf(Math.min.apply(null,t))}function qs(r,t,e){var n=t*e,a=Math.floor(n/8),i=16-(n-8*a+e),f=(1<<e)-1;return ih(r,a)>>i&f}function af(r,t,e,n){var a=e*n,i=Math.floor(a/8),f=16-(a-8*i+n),l=(1<<n)-1,u=(t&l)<<f;(function(h,p,w){if(p+1<h.byteLength)h.setUint16(p,w,!1);else{var x=w>>8&255;h.setUint8(p,x)}})(r,i,ih(r,i)&~(l<<f)&65535|u)}function ih(r,t){return t+1<r.byteLength?r.getUint16(t,!1):r.getUint8(t)<<8}function I2(r){var t=0;if(r[t++]!==71||r[t++]!==73||r[t++]!==70||r[t++]!==56||(r[t++]+1&253)!=56||r[t++]!==97)throw new Error("Invalid GIF 87a/89a header.");var e=r[t++]|r[t++]<<8,n=r[t++]|r[t++]<<8,a=r[t++],i=a>>7,f=1<<1+(7&a);r[t++],r[t++];var l=null,u=null;i&&(l=t,u=f,t+=3*f);var h=!0,p=[],w=0,x=null,g=0,P=null;for(this.width=e,this.height=n;h&&t<r.length;)switch(r[t++]){case 33:switch(r[t++]){case 255:if(r[t]!==11||r[t+1]==78&&r[t+2]==69&&r[t+3]==84&&r[t+4]==83&&r[t+5]==67&&r[t+6]==65&&r[t+7]==80&&r[t+8]==69&&r[t+9]==50&&r[t+10]==46&&r[t+11]==48&&r[t+12]==3&&r[t+13]==1&&r[t+16]==0)t+=14,P=r[t++]|r[t++]<<8,t++;else for(t+=12;;){if(!((L=r[t++])>=0))throw Error("Invalid block size");if(L===0)break;t+=L}break;case 249:if(r[t++]!==4||r[t+4]!==0)throw new Error("Invalid graphics extension block.");var C=r[t++];w=r[t++]|r[t++]<<8,x=r[t++],1&C||(x=null),g=C>>2&7,t++;break;case 254:for(;;){if(!((L=r[t++])>=0))throw Error("Invalid block size");if(L===0)break;t+=L}break;default:throw new Error("Unknown graphic control label: 0x"+r[t-1].toString(16))}break;case 44:var B=r[t++]|r[t++]<<8,S=r[t++]|r[t++]<<8,G=r[t++]|r[t++]<<8,V=r[t++]|r[t++]<<8,M=r[t++],it=M>>6&1,vt=1<<1+(7&M),ct=l,K=u,R=!1;M>>7&&(R=!0,ct=t,K=vt,t+=3*vt);var tt=t;for(t++;;){var L;if(!((L=r[t++])>=0))throw Error("Invalid block size");if(L===0)break;t+=L}p.push({x:B,y:S,width:G,height:V,has_local_palette:R,palette_offset:ct,palette_size:K,data_offset:tt,data_length:t-tt,transparent_index:x,interlaced:!!it,delay:w,disposal:g});break;case 59:h=!1;break;default:throw new Error("Unknown gif block: 0x"+r[t-1].toString(16))}this.numFrames=function(){return p.length},this.loopCount=function(){return P},this.frameInfo=function(O){if(O<0||O>=p.length)throw new Error("Frame index out of range.");return p[O]},this.decodeAndBlitFrameBGRA=function(O,z){var U=this.frameInfo(O),nt=U.width*U.height,st=new Uint8Array(nt);of(r,U.data_offset,st,nt);var ut=U.palette_offset,rt=U.transparent_index;rt===null&&(rt=256);var ht=U.width,_t=e-ht,wt=ht,_=4*(U.y*e+U.x),D=4*((U.y+U.height)*e+U.x),T=_,H=4*_t;U.interlaced===!0&&(H+=4*e*7);for(var J=8,Z=0,at=st.length;Z<at;++Z){var ot=st[Z];if(wt===0&&(wt=ht,(T+=H)>=D&&(H=4*_t+4*e*(J-1),T=_+(ht+_t)*(J<<1),J>>=1)),ot===rt)T+=4;else{var gt=r[ut+3*ot],At=r[ut+3*ot+1],kt=r[ut+3*ot+2];z[T++]=kt,z[T++]=At,z[T++]=gt,z[T++]=255}--wt}},this.decodeAndBlitFrameRGBA=function(O,z){var U=this.frameInfo(O),nt=U.width*U.height,st=new Uint8Array(nt);of(r,U.data_offset,st,nt);var ut=U.palette_offset,rt=U.transparent_index;rt===null&&(rt=256);var ht=U.width,_t=e-ht,wt=ht,_=4*(U.y*e+U.x),D=4*((U.y+U.height)*e+U.x),T=_,H=4*_t;U.interlaced===!0&&(H+=4*e*7);for(var J=8,Z=0,at=st.length;Z<at;++Z){var ot=st[Z];if(wt===0&&(wt=ht,(T+=H)>=D&&(H=4*_t+4*e*(J-1),T=_+(ht+_t)*(J<<1),J>>=1)),ot===rt)T+=4;else{var gt=r[ut+3*ot],At=r[ut+3*ot+1],kt=r[ut+3*ot+2];z[T++]=gt,z[T++]=At,z[T++]=kt,z[T++]=255}--wt}}}function of(r,t,e,n){for(var a=r[t++],i=1<<a,f=i+1,l=f+1,u=a+1,h=(1<<u)-1,p=0,w=0,x=0,g=r[t++],P=new Int32Array(4096),C=null;;){for(;p<16&&g!==0;)w|=r[t++]<<p,p+=8,g===1?g=r[t++]:--g;if(p<u)break;var B=w&h;if(w>>=u,p-=u,B!==i){if(B===f)break;for(var S=B<l?B:C,G=0,V=S;V>i;)V=P[V]>>8,++G;var M=V;if(x+G+(S!==B?1:0)>n)return void Le.log("Warning, gif stream longer than expected.");e[x++]=M;var it=x+=G;for(S!==B&&(e[x++]=M),V=S;G--;)V=P[V],e[--it]=255&V,V>>=8;C!==null&&l<4096&&(P[l++]=C<<8|M,l>=h+1&&u<12&&(++u,h=h<<1|1)),C=B}else l=f+1,h=(1<<(u=a+1))-1,C=null}return x!==n&&Le.log("Warning, gif stream shorter than expected."),e}function Us(r){var t,e,n,a,i,f=Math.floor,l=new Array(64),u=new Array(64),h=new Array(64),p=new Array(64),w=new Array(65535),x=new Array(65535),g=new Array(64),P=new Array(64),C=[],B=0,S=7,G=new Array(64),V=new Array(64),M=new Array(64),it=new Array(256),vt=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],K=[0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0],R=[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],L=[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],z=[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],nt=[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(_,D){for(var T=0,H=0,J=new Array,Z=1;Z<=16;Z++){for(var at=1;at<=_[Z];at++)J[D[H]]=[],J[D[H]][0]=T,J[D[H]][1]=Z,H++,T++;T*=2}return J}function ut(_){for(var D=_[0],T=_[1]-1;T>=0;)D&1<<T&&(B|=1<<S),T--,--S<0&&(B==255?(rt(255),rt(0)):rt(B),S=7,B=0)}function rt(_){C.push(_)}function ht(_){rt(_>>8&255),rt(255&_)}function _t(_,D,T,H,J){for(var Z,at=J[0],ot=J[240],gt=(function(yt,Wt){var Ct,zt,qt,me,ue,Zt,he,fe,jt,ee,Tt=0;for(jt=0;jt<8;++jt){Ct=yt[Tt],zt=yt[Tt+1],qt=yt[Tt+2],me=yt[Tt+3],ue=yt[Tt+4],Zt=yt[Tt+5],he=yt[Tt+6];var Me=Ct+(fe=yt[Tt+7]),pe=Ct-fe,oe=zt+he,se=zt-he,Ie=qt+Zt,Ut=qt-Zt,Se=me+ue,Yt=me-ue,Qt=Me+Se,Ee=Me-Se,le=oe+Ie,Gt=oe-Ie;yt[Tt]=Qt+le,yt[Tt+4]=Qt-le;var be=.707106781*(Gt+Ee);yt[Tt+2]=Ee+be,yt[Tt+6]=Ee-be;var ii=.382683433*((Qt=Yt+Ut)-(Gt=se+pe)),fr=.5411961*Qt+ii,gn=1.306562965*Gt+ii,en=.707106781*(le=Ut+se),Vt=pe+en,vn=pe-en;yt[Tt+5]=vn+fr,yt[Tt+3]=vn-fr,yt[Tt+1]=Vt+gn,yt[Tt+7]=Vt-gn,Tt+=8}for(Tt=0,jt=0;jt<8;++jt){Ct=yt[Tt],zt=yt[Tt+8],qt=yt[Tt+16],me=yt[Tt+24],ue=yt[Tt+32],Zt=yt[Tt+40],he=yt[Tt+48];var mn=Ct+(fe=yt[Tt+56]),Or=Ct-fe,jr=zt+he,Be=zt-he,rr=qt+Zt,ir=qt-Zt,ai=me+ue,Tn=me-ue,Hr=mn+ai,rn=mn-ai,Wr=jr+rr,Gr=jr-rr;yt[Tt]=Hr+Wr,yt[Tt+32]=Hr-Wr;var Br=.707106781*(Gr+rn);yt[Tt+16]=rn+Br,yt[Tt+48]=rn-Br;var oi=.382683433*((Hr=Tn+ir)-(Gr=Be+Or)),nn=.5411961*Hr+oi,si=1.306562965*Gr+oi,Ci=.707106781*(Wr=ir+Be),Fi=Or+Ci,Ii=Or-Ci;yt[Tt+40]=Ii+nn,yt[Tt+24]=Ii-nn,yt[Tt+8]=Fi+si,yt[Tt+56]=Fi-si,Tt++}for(jt=0;jt<64;++jt)ee=yt[jt]*Wt[jt],g[jt]=ee>0?ee+.5|0:ee-.5|0;return g})(_,D),At=0;At<64;++At)P[ct[At]]=gt[At];var kt=P[0]-T;T=P[0],kt==0?ut(H[0]):(ut(H[x[Z=32767+kt]]),ut(w[Z]));for(var St=63;St>0&&P[St]==0;)St--;if(St==0)return ut(at),T;for(var Mt,F=1;F<=St;){for(var Lt=F;P[F]==0&&F<=St;)++F;var ae=F-Lt;if(ae>=16){Mt=ae>>4;for(var Ht=1;Ht<=Mt;++Ht)ut(ot);ae&=15}Z=32767+P[F],ut(J[(ae<<4)+x[Z]]),ut(w[Z]),F++}return St!=63&&ut(at),T}function wt(_){_=Math.min(Math.max(_,1),100),i!=_&&((function(D){for(var T=[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],H=0;H<64;H++){var J=f((T[H]*D+50)/100);J=Math.min(Math.max(J,1),255),l[ct[H]]=J}for(var Z=[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=f((Z[at]*D+50)/100);ot=Math.min(Math.max(ot,1),255),u[ct[at]]=ot}for(var gt=[1,1.387039845,1.306562965,1.175875602,1,.785694958,.5411961,.275899379],At=0,kt=0;kt<8;kt++)for(var St=0;St<8;St++)h[At]=1/(l[ct[At]]*gt[kt]*gt[St]*8),p[At]=1/(u[ct[At]]*gt[kt]*gt[St]*8),At++})(_<50?Math.floor(5e3/_):Math.floor(200-2*_)),i=_)}this.encode=function(_,D){D&&wt(D),C=new Array,B=0,S=7,ht(65496),ht(65504),ht(16),rt(74),rt(70),rt(73),rt(70),rt(0),rt(1),rt(1),rt(0),ht(1),ht(1),rt(0),rt(0),(function(){ht(65499),ht(132),rt(0);for(var zt=0;zt<64;zt++)rt(l[zt]);rt(1);for(var qt=0;qt<64;qt++)rt(u[qt])})(),(function(zt,qt){ht(65472),ht(17),rt(8),ht(qt),ht(zt),rt(3),rt(1),rt(17),rt(0),rt(2),rt(17),rt(1),rt(3),rt(17),rt(1)})(_.width,_.height),(function(){ht(65476),ht(418),rt(0);for(var zt=0;zt<16;zt++)rt(K[zt+1]);for(var qt=0;qt<=11;qt++)rt(R[qt]);rt(16);for(var me=0;me<16;me++)rt(tt[me+1]);for(var ue=0;ue<=161;ue++)rt(L[ue]);rt(1);for(var Zt=0;Zt<16;Zt++)rt(O[Zt+1]);for(var he=0;he<=11;he++)rt(z[he]);rt(17);for(var fe=0;fe<16;fe++)rt(U[fe+1]);for(var jt=0;jt<=161;jt++)rt(nt[jt])})(),ht(65498),ht(12),rt(3),rt(1),rt(0),rt(2),rt(17),rt(3),rt(17),rt(0),rt(63),rt(0);var T=0,H=0,J=0;B=0,S=7,this.encode.displayName="_encode_";for(var Z,at,ot,gt,At,kt,St,Mt,F,Lt=_.data,ae=_.width,Ht=_.height,yt=4*ae,Wt=0;Wt<Ht;){for(Z=0;Z<yt;){for(At=yt*Wt+Z,St=-1,Mt=0,F=0;F<64;F++)kt=At+(Mt=F>>3)*yt+(St=4*(7&F)),Wt+Mt>=Ht&&(kt-=yt*(Wt+1+Mt-Ht)),Z+St>=yt&&(kt-=Z+St-yt+4),at=Lt[kt++],ot=Lt[kt++],gt=Lt[kt++],G[F]=(vt[at]+vt[ot+256|0]+vt[gt+512|0]>>16)-128,V[F]=(vt[at+768|0]+vt[ot+1024|0]+vt[gt+1280|0]>>16)-128,M[F]=(vt[at+1280|0]+vt[ot+1536|0]+vt[gt+1792|0]>>16)-128;T=_t(G,h,T,t,n),H=_t(V,p,H,e,a),J=_t(M,p,J,e,a),Z+=32}Wt+=8}if(S>=0){var Ct=[];Ct[1]=S+1,Ct[0]=(1<<S+1)-1,ut(Ct)}return ht(65497),new Uint8Array(C)},r=r||50,(function(){for(var _=String.fromCharCode,D=0;D<256;D++)it[D]=_(D)})(),t=st(K,R),e=st(O,z),n=st(tt,L),a=st(U,nt),(function(){for(var _=1,D=2,T=1;T<=15;T++){for(var H=_;H<D;H++)x[32767+H]=T,w[32767+H]=[],w[32767+H][1]=T,w[32767+H][0]=H;for(var J=-(D-1);J<=-_;J++)x[32767+J]=T,w[32767+J]=[],w[32767+J][1]=T,w[32767+J][0]=D-1+J;_<<=1,D<<=1}})(),(function(){for(var _=0;_<256;_++)vt[_]=19595*_,vt[_+256|0]=38470*_,vt[_+512|0]=7471*_+32768,vt[_+768|0]=-11059*_,vt[_+1024|0]=-21709*_,vt[_+1280|0]=32768*_+8421375,vt[_+1536|0]=-27439*_,vt[_+1792|0]=-5329*_})(),wt(r)}function Xr(r,t){if(this.pos=0,this.buffer=r,this.datav=new DataView(r.buffer),this.is_with_alpha=!!t,this.bottom_up=!0,this.flag=String.fromCharCode(this.buffer[0])+String.fromCharCode(this.buffer[1]),this.pos+=2,["BM","BA","CI","CP","IC","PT"].indexOf(this.flag)===-1)throw new Error("Invalid BMP File");this.parseHeader(),this.parseBGR()}function sf(r){function t(R){if(!R)throw Error("assert :P")}function e(R,tt,L){for(var O=0;4>O;O++)if(R[tt+O]!=L.charCodeAt(O))return!0;return!1}function n(R,tt,L,O,z){for(var U=0;U<z;U++)R[tt+U]=L[O+U]}function a(R,tt,L,O){for(var z=0;z<O;z++)R[tt+z]=L}function i(R){return new Int32Array(R)}function f(R,tt){for(var L=[],O=0;O<R;O++)L.push(new tt);return L}function l(R,tt){var L=[];return(function O(z,U,nt){for(var st=nt[U],ut=0;ut<st&&(z.push(nt.length>U+1?[]:new tt),!(nt.length<U+1));ut++)O(z[ut],U+1,nt)})(L,0,R),L}var u=function(){var R=this;function tt(o,s){for(var d=1<<s-1>>>0;o&d;)d>>>=1;return d?(o&d-1)+d:o}function L(o,s,d,v,b){t(!(v%d));do o[s+(v-=d)]=b;while(0<v)}function O(o,s,d,v,b){if(t(2328>=b),512>=b)var y=i(512);else if((y=i(b))==null)return 0;return(function(A,N,k,I,W,et){var E,Y,X=N,lt=1<<k,Q=i(16),ft=i(16);for(t(W!=0),t(I!=null),t(A!=null),t(0<k),Y=0;Y<W;++Y){if(15<I[Y])return 0;++Q[I[Y]]}if(Q[0]==W)return 0;for(ft[1]=0,E=1;15>E;++E){if(Q[E]>1<<E)return 0;ft[E+1]=ft[E]+Q[E]}for(Y=0;Y<W;++Y)E=I[Y],0<I[Y]&&(et[ft[E]++]=Y);if(ft[15]==1)return(I=new z).g=0,I.value=et[0],L(A,X,1,lt,I),lt;var pt,xt=-1,bt=lt-1,Dt=0,Pt=1,ne=1,Et=1<<k;for(Y=0,E=1,W=2;E<=k;++E,W<<=1){if(Pt+=ne<<=1,0>(ne-=Q[E]))return 0;for(;0<Q[E];--Q[E])(I=new z).g=E,I.value=et[Y++],L(A,X+Dt,W,Et,I),Dt=tt(Dt,E)}for(E=k+1,W=2;15>=E;++E,W<<=1){if(Pt+=ne<<=1,0>(ne-=Q[E]))return 0;for(;0<Q[E];--Q[E]){if(I=new z,(Dt&bt)!=xt){for(X+=Et,pt=1<<(xt=E)-k;15>xt&&!(0>=(pt-=Q[xt]));)++xt,pt<<=1;lt+=Et=1<<(pt=xt-k),A[N+(xt=Dt&bt)].g=pt+k,A[N+xt].value=X-N-xt}I.g=E-k,I.value=et[Y++],L(A,X+(Dt>>k),W,Et,I),Dt=tt(Dt,E)}}return Pt!=2*ft[15]-1?0:lt})(o,s,d,v,b,y)}function z(){this.value=this.g=0}function U(){this.value=this.g=0}function nt(){this.G=f(5,z),this.H=i(5),this.jc=this.Qb=this.qb=this.nd=0,this.pd=f(bi,U)}function st(o,s,d,v){t(o!=null),t(s!=null),t(2147483648>v),o.Ca=254,o.I=0,o.b=-8,o.Ka=0,o.oa=s,o.pa=d,o.Jd=s,o.Yc=d+v,o.Zc=4<=v?d+v-4+1:d,at(o)}function ut(o,s){for(var d=0;0<s--;)d|=gt(o,128)<<s;return d}function rt(o,s){var d=ut(o,s);return ot(o)?-d:d}function ht(o,s,d,v){var b,y=0;for(t(o!=null),t(s!=null),t(4294967288>v),o.Sb=v,o.Ra=0,o.u=0,o.h=0,4<v&&(v=4),b=0;b<v;++b)y+=s[d+b]<<8*b;o.Ra=y,o.bb=v,o.oa=s,o.pa=d}function _t(o){for(;8<=o.u&&o.bb<o.Sb;)o.Ra>>>=8,o.Ra+=o.oa[o.pa+o.bb]<<zn-8>>>0,++o.bb,o.u-=8;H(o)&&(o.h=1,o.u=0)}function wt(o,s){if(t(0<=s),!o.h&&s<=Nr){var d=T(o)&_r[s];return o.u+=s,_t(o),d}return o.h=1,o.u=0}function _(){this.b=this.Ca=this.I=0,this.oa=[],this.pa=0,this.Jd=[],this.Yc=0,this.Zc=[],this.Ka=0}function D(){this.Ra=0,this.oa=[],this.h=this.u=this.bb=this.Sb=this.pa=0}function T(o){return o.Ra>>>(o.u&zn-1)>>>0}function H(o){return t(o.bb<=o.Sb),o.h||o.bb==o.Sb&&o.u>zn}function J(o,s){o.u=s,o.h=H(o)}function Z(o){o.u>=Pn&&(t(o.u>=Pn),_t(o))}function at(o){t(o!=null&&o.oa!=null),o.pa<o.Zc?(o.I=(o.oa[o.pa++]|o.I<<8)>>>0,o.b+=8):(t(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 ut(o,1)}function gt(o,s){var d=o.Ca;0>o.b&&at(o);var v=o.b,b=d*s>>>8,y=(o.I>>>v>b)+0;for(y?(d-=b,o.I-=b+1<<v>>>0):d=b+1,v=d,b=0;256<=v;)b+=8,v>>=8;return v=7^b+Hn[v],o.b-=v,o.Ca=(d<<v)-1,y}function At(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 Mt(o,s){return kt(o,s)|kt(o,s+2)<<16}function F(o,s){var d=1<<s;return t(o!=null),t(0<s),o.X=i(d),o.X==null?0:(o.Mb=32-s,o.Xa=s,1)}function Lt(o,s){t(o!=null),t(s!=null),t(o.Xa==s.Xa),n(s.X,0,o.X,0,1<<s.Xa)}function ae(){this.X=[],this.Xa=this.Mb=0}function Ht(o,s,d,v){t(d!=null),t(v!=null);var b=d[0],y=v[0];return b==0&&(b=(o*y+s/2)/s),y==0&&(y=(s*b+o/2)/o),0>=b||0>=y?0:(d[0]=b,v[0]=y,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 Ct(o,s){R[s]=function(d,v,b,y,A,N,k){var I;for(I=0;I<A;++I){var W=R[o](N[k+I-1],b,y+I);N[k+I]=Wt(d[v+I],W)}}}function zt(){this.ud=this.hd=this.jd=0}function qt(o,s){return((4278124286&(o^s))>>>1)+(o&s)>>>0}function me(o){return 0<=o&&256>o?o:0>o?0:255<o?255:void 0}function ue(o,s){return me(o+(o-s+.5>>1))}function Zt(o,s,d){return Math.abs(s-d)-Math.abs(o-d)}function he(o,s,d,v,b,y,A){for(v=y[A-1],d=0;d<b;++d)y[A+d]=v=Wt(o[s+d],v)}function fe(o,s,d,v,b){var y;for(y=0;y<d;++y){var A=o[s+y],N=A>>8&255,k=16711935&(k=(k=16711935&A)+((N<<16)+N));v[b+y]=(4278255360&A)+k>>>0}}function jt(o,s){s.jd=255&o,s.hd=o>>8&255,s.ud=o>>16&255}function ee(o,s,d,v,b,y){var A;for(A=0;A<v;++A){var N=s[d+A],k=N>>>8,I=N,W=255&(W=(W=N>>>16)+((o.jd<<24>>24)*(k<<24>>24)>>>5));I=255&(I=(I+=(o.hd<<24>>24)*(k<<24>>24)>>>5)+((o.ud<<24>>24)*(W<<24>>24)>>>5)),b[y+A]=(4278255360&N)+(W<<16)+I}}function Tt(o,s,d,v,b){R[s]=function(y,A,N,k,I,W,et,E,Y){for(k=et;k<E;++k)for(et=0;et<Y;++et)I[W++]=b(N[v(y[A++])])},R[o]=function(y,A,N,k,I,W,et){var E=8>>y.b,Y=y.Ea,X=y.K[0],lt=y.w;if(8>E)for(y=(1<<y.b)-1,lt=(1<<E)-1;A<N;++A){var Q,ft=0;for(Q=0;Q<Y;++Q)Q&y||(ft=v(k[I++])),W[et++]=b(X[ft<]),ft>>=E}else R["VP8LMapColor"+d](k,I,X,lt,W,et,A,N,Y)}}function Me(o,s,d,v,b){for(d=s+d;s<d;){var y=o[s++];v[b++]=y>>16&255,v[b++]=y>>8&255,v[b++]=255&y}}function pe(o,s,d,v,b){for(d=s+d;s<d;){var y=o[s++];v[b++]=y>>16&255,v[b++]=y>>8&255,v[b++]=255&y,v[b++]=y>>24&255}}function oe(o,s,d,v,b){for(d=s+d;s<d;){var y=(A=o[s++])>>16&240|A>>12&15,A=240&A|A>>28&15;v[b++]=y,v[b++]=A}}function se(o,s,d,v,b){for(d=s+d;s<d;){var y=(A=o[s++])>>16&248|A>>13&7,A=A>>5&224|A>>3&31;v[b++]=y,v[b++]=A}}function Ie(o,s,d,v,b){for(d=s+d;s<d;){var y=o[s++];v[b++]=255&y,v[b++]=y>>8&255,v[b++]=y>>16&255}}function Ut(o,s,d,v,b,y){if(y==0)for(d=s+d;s<d;)At(v,((y=o[s++])[0]>>24|y[1]>>8&65280|y[2]<<8&16711680|y[3]<<24)>>>0),b+=32;else n(v,b,o,s,d)}function Se(o,s){R[s][0]=R[o+"0"],R[s][1]=R[o+"1"],R[s][2]=R[o+"2"],R[s][3]=R[o+"3"],R[s][4]=R[o+"4"],R[s][5]=R[o+"5"],R[s][6]=R[o+"6"],R[s][7]=R[o+"7"],R[s][8]=R[o+"8"],R[s][9]=R[o+"9"],R[s][10]=R[o+"10"],R[s][11]=R[o+"11"],R[s][12]=R[o+"12"],R[s][13]=R[o+"13"],R[s][14]=R[o+"0"],R[s][15]=R[o+"0"]}function Yt(o){return o==ss||o==ls||o==so||o==us}function Qt(){this.eb=[],this.size=this.A=this.fb=0}function Ee(){this.y=[],this.f=[],this.ea=[],this.F=[],this.Tc=this.Ed=this.Cd=this.Fd=this.lb=this.Db=this.Ab=this.fa=this.J=this.W=this.N=this.O=0}function le(){this.Rd=this.height=this.width=this.S=0,this.f={},this.f.RGBA=new Qt,this.f.kb=new Ee,this.sd=null}function Gt(){this.width=[0],this.height=[0],this.Pd=[0],this.Qd=[0],this.format=[0]}function be(){this.Id=this.fd=this.Md=this.hb=this.ib=this.da=this.bd=this.cd=this.j=this.v=this.Da=this.Sd=this.ob=0}function ii(o){return alert("todo:WebPSamplerProcessPlane"),o.T}function fr(o,s){var d=o.T,v=s.ba.f.RGBA,b=v.eb,y=v.fb+o.ka*v.A,A=Ur[s.ba.S],N=o.y,k=o.O,I=o.f,W=o.N,et=o.ea,E=o.W,Y=s.cc,X=s.dc,lt=s.Mc,Q=s.Nc,ft=o.ka,pt=o.ka+o.T,xt=o.U,bt=xt+1>>1;for(ft==0?A(N,k,null,null,I,W,et,E,I,W,et,E,b,y,null,null,xt):(A(s.ec,s.fc,N,k,Y,X,lt,Q,I,W,et,E,b,y-v.A,b,y,xt),++d);ft+2<pt;ft+=2)Y=I,X=W,lt=et,Q=E,W+=o.Rc,E+=o.Rc,y+=2*v.A,A(N,(k+=2*o.fa)-o.fa,N,k,Y,X,lt,Q,I,W,et,E,b,y-v.A,b,y,xt);return k+=o.fa,o.j+pt<o.o?(n(s.ec,s.fc,N,k,xt),n(s.cc,s.dc,I,W,bt),n(s.Mc,s.Nc,et,E,bt),d--):1&pt||A(N,k,null,null,I,W,et,E,I,W,et,E,b,y+v.A,null,null,xt),d}function gn(o,s,d){var v=o.F,b=[o.J];if(v!=null){var y=o.U,A=s.ba.S,N=A==oo||A==so;s=s.ba.f.RGBA;var k=[0],I=o.ka;k[0]=o.T,o.Kb&&(I==0?--k[0]:(--I,b[0]-=o.width),o.j+o.ka+o.T==o.o&&(k[0]=o.o-o.j-I));var W=s.eb;I=s.fb+I*s.A,o=bl(v,b[0],o.width,y,k,W,I+(N?0:3),s.A),t(d==k),o&&Yt(A)&&Aa(W,I,N,y,k,s.A)}return 0}function en(o){var s=o.ma,d=s.ba.S,v=11>d,b=d==io||d==ao||d==oo||d==os||d==12||Yt(d);if(s.memory=null,s.Ib=null,s.Jb=null,s.Nd=null,!pa(s.Oa,o,b?11:12))return 0;if(b&&Yt(d)&&ha(),o.da)alert("todo:use_scaling");else{if(v){if(s.Ib=ii,o.Kb){if(d=o.U+1>>1,s.memory=i(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=fr,ha()}}else alert("todo:EmitYUV");b&&(s.Jb=gn,v&&Yr())}if(v&&!jl){for(o=0;256>o;++o)qh[o]=89858*(o-128)+uo>>lo,Hh[o]=-22014*(o-128)+uo,zh[o]=-45773*(o-128),Uh[o]=113618*(o-128)+uo>>lo;for(o=Na;o<cs;++o)s=76283*(o-16)+uo>>lo,Wh[o-Na]=an(s,255),Gh[o-Na]=an(s+8>>4,15);jl=1}return 1}function Vt(o){var s=o.ma,d=o.U,v=o.T;return t(!(1&o.ka)),0>=d||0>=v?0:(d=s.Ib(o,s),s.Jb!=null&&s.Jb(o,s,d),s.Dc+=d,1)}function vn(o){o.ma.memory=null}function mn(o,s,d,v){return wt(o,8)!=47?0:(s[0]=wt(o,14)+1,d[0]=wt(o,14)+1,v[0]=wt(o,1),wt(o,3)!=0?0:!o.h)}function Or(o,s){if(4>o)return o+1;var d=o-2>>1;return(2+(1&o)<<d)+wt(s,d)+1}function jr(o,s){return 120<s?s-120:1<=(d=((d=Sh[s-1])>>4)*o+(8-(15&d)))?d:1;var d}function Be(o,s,d){var v=T(d),b=o[s+=255&v].g-8;return 0<b&&(J(d,d.u+8),v=T(d),s+=o[s].value,s+=v&(1<<b)-1),J(d,d.u+o[s].g),o[s].value}function rr(o,s,d){return d.g+=o.g,d.value+=o.value<<s>>>0,t(8>=d.g),o.g}function ir(o,s,d){var v=o.xc;return t((s=v==0?0:o.vc[o.md*(d>>v)+(s>>v)])<o.Wb),o.Ya[s]}function ai(o,s,d,v){var b=o.ab,y=o.c*s,A=o.C;s=A+s;var N=d,k=v;for(v=o.Ta,d=o.Ua;0<b--;){var I=o.gc[b],W=A,et=s,E=N,Y=k,X=(k=v,N=d,I.Ea);switch(t(W<et),t(et<=I.nc),I.hc){case 2:qe(E,Y,(et-W)*X,k,N);break;case 0:var lt=W,Q=et,ft=k,pt=N,xt=(Et=I).Ea;lt==0&&(va(E,Y,null,null,1,ft,pt),he(E,Y+1,0,0,xt-1,ft,pt+1),Y+=xt,pt+=xt,++lt);for(var bt=1<<Et.b,Dt=bt-1,Pt=yt(xt,Et.b),ne=Et.K,Et=Et.w+(lt>>Et.b)*Pt;lt<Q;){var ce=ne,Qe=Et,ie=1;for(Mi(E,Y,ft,pt-xt,1,ft,pt);ie<xt;){var Ot=(ie&~Dt)+bt;Ot>xt&&(Ot=xt),(0,ba[ce[Qe++]>>8&15])(E,Y+ +ie,ft,pt+ie-xt,Ot-ie,ft,pt+ie),ie=Ot}Y+=xt,pt+=xt,++lt&Dt||(Et+=Pt)}et!=I.nc&&n(k,N-X,k,N+(et-W-1)*X,X);break;case 1:for(X=E,Q=Y,xt=(E=I.Ea)-(pt=E&~(ft=(Y=1<<I.b)-1)),lt=yt(E,I.b),bt=I.K,I=I.w+(W>>I.b)*lt;W<et;){for(Dt=bt,Pt=I,ne=new zt,Et=Q+pt,ce=Q+E;Q<Et;)jt(Dt[Pt++],ne),wa(ne,X,Q,Y,k,N),Q+=Y,N+=Y;Q<ce&&(jt(Dt[Pt++],ne),wa(ne,X,Q,xt,k,N),Q+=xt,N+=xt),++W&ft||(I+=lt)}break;case 3:if(E==k&&Y==N&&0<I.b){for(Q=k,E=X=N+(et-W)*X-(pt=(et-W)*yt(I.Ea,I.b)),Y=k,ft=N,lt=[],pt=(xt=pt)-1;0<=pt;--pt)lt[pt]=Y[ft+pt];for(pt=xt-1;0<=pt;--pt)Q[E+pt]=lt[pt];to(I,W,et,k,X,k,N)}else to(I,W,et,E,Y,k,N)}N=v,k=d}k!=d&&n(v,d,N,k,y)}function Tn(o,s){var d=o.V,v=o.Ba+o.c*o.C,b=s-o.C;if(t(s<=o.l.o),t(16>=b),0<b){var y=o.l,A=o.Ta,N=o.Ua,k=y.width;if(ai(o,b,d,v),b=N=[N],t((d=o.C)<(v=s)),t(y.v<y.va),v>y.o&&(v=y.o),d<y.j){var I=y.j-d;d=y.j,b[0]+=I*k}if(d>=v?d=0:(b[0]+=4*y.v,y.ka=d-y.j,y.U=y.va-y.v,y.T=v-d,d=1),d){if(N=N[0],11>(d=o.ca).S){var W=d.f.RGBA,et=(v=d.S,b=y.U,y=y.T,I=W.eb,W.A),E=y;for(W=W.fb+o.Ma*W.A;0<E--;){var Y=A,X=N,lt=b,Q=I,ft=W;switch(v){case no:ya(Y,X,lt,Q,ft);break;case io:Wn(Y,X,lt,Q,ft);break;case ss:Wn(Y,X,lt,Q,ft),Aa(Q,ft,0,lt,1,0);break;case Ll:wi(Y,X,lt,Q,ft);break;case ao:Ut(Y,X,lt,Q,ft,1);break;case ls:Ut(Y,X,lt,Q,ft,1),Aa(Q,ft,0,lt,1,0);break;case oo:Ut(Y,X,lt,Q,ft,0);break;case so:Ut(Y,X,lt,Q,ft,0),Aa(Q,ft,1,lt,1,0);break;case os:Gn(Y,X,lt,Q,ft);break;case us:Gn(Y,X,lt,Q,ft),ml(Q,ft,lt,1,0);break;case Sl:Vn(Y,X,lt,Q,ft);break;default:t(0)}N+=k,W+=et}o.Ma+=y}else alert("todo:EmitRescaledRowsYUVA");t(o.Ma<=d.height)}}o.C=s,t(o.C<=o.i)}function Hr(o){var s;if(0<o.ua)return 0;for(s=0;s<o.Wb;++s){var d=o.Ya[s].G,v=o.Ya[s].H;if(0<d[1][v[1]+0].g||0<d[2][v[2]+0].g||0<d[3][v[3]+0].g)return 0}return 1}function rn(o,s,d,v,b,y){if(o.Z!=0){var A=o.qd,N=o.rd;for(t(Kn[o.Z]!=null);s<d;++s)Kn[o.Z](A,N,v,b,v,b,y),A=v,N=b,b+=y;o.qd=A,o.rd=N}}function Wr(o,s){var d=o.l.ma,v=d.Z==0||d.Z==1?o.l.j:o.C;if(v=o.C<v?v:o.C,t(s<=o.l.o),s>v){var b=o.l.width,y=d.ca,A=d.tb+b*v,N=o.V,k=o.Ba+o.c*v,I=o.gc;t(o.ab==1),t(I[0].hc==3),un(I[0],v,s,N,k,y,A),rn(d,v,s,y,A,b)}o.C=o.Ma=s}function Gr(o,s,d,v,b,y,A){var N=o.$/v,k=o.$%v,I=o.m,W=o.s,et=d+o.$,E=et;b=d+v*b;var Y=d+v*y,X=280+W.ua,lt=o.Pb?N:16777216,Q=0<W.ua?W.Wa:null,ft=W.wc,pt=et<Y?ir(W,k,N):null;t(o.C<y),t(Y<=b);var xt=!1;t:for(;;){for(;xt||et<Y;){var bt=0;if(N>=lt){var Dt=et-d;t((lt=o).Pb),lt.wd=lt.m,lt.xd=Dt,0<lt.s.ua&&Lt(lt.s.Wa,lt.s.vb),lt=N+Ph}if(k&ft||(pt=ir(W,k,N)),t(pt!=null),pt.Qb&&(s[et]=pt.qb,xt=!0),!xt)if(Z(I),pt.jc){bt=I,Dt=s;var Pt=et,ne=pt.pd[T(bt)&bi-1];t(pt.jc),256>ne.g?(J(bt,bt.u+ne.g),Dt[Pt]=ne.value,bt=0):(J(bt,bt.u+ne.g-256),t(256<=ne.value),bt=ne.value),bt==0&&(xt=!0)}else bt=Be(pt.G[0],pt.H[0],I);if(I.h)break;if(xt||256>bt){if(!xt)if(pt.nd)s[et]=(pt.qb|bt<<8)>>>0;else{if(Z(I),xt=Be(pt.G[1],pt.H[1],I),Z(I),Dt=Be(pt.G[2],pt.H[2],I),Pt=Be(pt.G[3],pt.H[3],I),I.h)break;s[et]=(Pt<<24|xt<<16|bt<<8|Dt)>>>0}if(xt=!1,++et,++k>=v&&(k=0,++N,A!=null&&N<=y&&!(N%16)&&A(o,N),Q!=null))for(;E<et;)bt=s[E++],Q.X[(506832829*bt&4294967295)>>>Q.Mb]=bt}else if(280>bt){if(bt=Or(bt-256,I),Dt=Be(pt.G[4],pt.H[4],I),Z(I),Dt=jr(v,Dt=Or(Dt,I)),I.h)break;if(et-d<Dt||b-et<bt)break t;for(Pt=0;Pt<bt;++Pt)s[et+Pt]=s[et+Pt-Dt];for(et+=bt,k+=bt;k>=v;)k-=v,++N,A!=null&&N<=y&&!(N%16)&&A(o,N);if(t(et<=b),k&ft&&(pt=ir(W,k,N)),Q!=null)for(;E<et;)bt=s[E++],Q.X[(506832829*bt&4294967295)>>>Q.Mb]=bt}else{if(!(bt<X))break t;for(xt=bt-280,t(Q!=null);E<et;)bt=s[E++],Q.X[(506832829*bt&4294967295)>>>Q.Mb]=bt;bt=et,t(!(xt>>>(Dt=Q).Xa)),s[bt]=Dt.X[xt],xt=!0}xt||t(I.h==H(I))}if(o.Pb&&I.h&&et<b)t(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(I.h)break t;A?.(o,N>y?y:N),o.a=0,o.$=et-d}return 1}return o.a=3,0}function Br(o){t(o!=null),o.vc=null,o.yc=null,o.Ya=null;var s=o.Wa;s!=null&&(s.X=null),o.vb=null,t(o!=null)}function oi(){var o=new Kt;return o==null?null:(o.a=0,o.xb=Cl,Se("Predictor","VP8LPredictors"),Se("Predictor","VP8LPredictors_C"),Se("PredictorAdd","VP8LPredictorsAdd"),Se("PredictorAdd","VP8LPredictorsAdd_C"),qe=fe,wa=ee,ya=Me,Wn=pe,Gn=oe,Vn=se,wi=Ie,R.VP8LMapColor32b=ln,R.VP8LMapColor8b=ma,o)}function nn(o,s,d,v,b){var y=1,A=[o],N=[s],k=v.m,I=v.s,W=null,et=0;t:for(;;){if(d)for(;y&&wt(k,1);){var E=A,Y=N,X=v,lt=1,Q=X.m,ft=X.gc[X.ab],pt=wt(Q,2);if(X.Oc&1<<pt)y=0;else{switch(X.Oc|=1<<pt,ft.hc=pt,ft.Ea=E[0],ft.nc=Y[0],ft.K=[null],++X.ab,t(4>=X.ab),pt){case 0:case 1:ft.b=wt(Q,3)+2,lt=nn(yt(ft.Ea,ft.b),yt(ft.nc,ft.b),0,X,ft.K),ft.K=ft.K[0];break;case 3:var xt,bt=wt(Q,8)+1,Dt=16<bt?0:4<bt?1:2<bt?2:3;if(E[0]=yt(ft.Ea,Dt),ft.b=Dt,xt=lt=nn(bt,1,0,X,ft.K)){var Pt,ne=bt,Et=ft,ce=1<<(8>>Et.b),Qe=i(ce);if(Qe==null)xt=0;else{var ie=Et.K[0],Ot=Et.w;for(Qe[0]=Et.K[0][0],Pt=1;Pt<1*ne;++Pt)Qe[Pt]=Wt(ie[Ot+Pt],Qe[Pt-1]);for(;Pt<4*ce;++Pt)Qe[Pt]=0;Et.K[0]=null,Et.K[0]=Qe,xt=1}}lt=xt;break;case 2:break;default:t(0)}y=lt}}if(A=A[0],N=N[0],y&&wt(k,1)&&!(y=1<=(et=wt(k,4))&&11>=et)){v.a=3;break t}var Nt;if(Nt=y)e:{var ze,te,de,Ce=v,sr=A,mr=N,De=et,hr=d,br=Ce.m,tr=Ce.s,ve=[null],xe=1,Re=0,Ae=kh[De];r:for(;;){if(hr&&wt(br,1)){var lr=wt(br,3)+2,Kr=yt(sr,lr),He=yt(mr,lr),yr=Kr*He;if(!nn(Kr,He,0,Ce,ve))break r;for(ve=ve[0],tr.xc=lr,ze=0;ze<yr;++ze){var Ne=ve[ze]>>8&65535;ve[ze]=Ne,Ne>=xe&&(xe=Ne+1)}}if(br.h)break r;for(te=0;5>te;++te){var er=kl[te];!te&&0<De&&(er+=1<<De),Re<er&&(Re=er)}var Sr=f(xe*Ae,z),wr=xe,kr=f(wr,nt);if(kr==null)var Pr=null;else t(65536>=wr),Pr=kr;var xr=i(Re);if(Pr==null||xr==null||Sr==null){Ce.a=1;break r}var Cr=Sr;for(ze=de=0;ze<xe;++ze){var Pe=Pr[ze],Fr=Pe.G,$r=Pe.H,xi=0,In=1,ur=0;for(te=0;5>te;++te){er=kl[te],Fr[te]=Cr,$r[te]=de,!te&&0<De&&(er+=1<<De);i:{var ho,ds=er,co=Ce,La=xr,Jh=Cr,Kh=de,ps=0,$n=co.m,$h=wt($n,1);if(a(La,0,0,ds),$h){var Xh=wt($n,1)+1,Zh=wt($n,1),Rl=wt($n,Zh==0?1:8);La[Rl]=1,Xh==2&&(La[Rl=wt($n,8)]=1);var po=1}else{var Tl=i(19),Ml=wt($n,4)+4;if(19<Ml){co.a=3;var go=0;break i}for(ho=0;ho<Ml;++ho)Tl[Lh[ho]]=wt($n,3);var gs=void 0,Sa=void 0,ql=co,Qh=Tl,vo=ds,Ul=La,vs=0,Xn=ql.m,zl=8,Hl=f(128,z);n:for(;O(Hl,0,7,Qh,19);){if(wt(Xn,1)){var tc=2+2*wt(Xn,3);if((gs=2+wt(Xn,tc))>vo)break n}else gs=vo;for(Sa=0;Sa<vo&&gs--;){Z(Xn);var Wl=Hl[0+(127&T(Xn))];J(Xn,Xn.u+Wl.g);var Ui=Wl.value;if(16>Ui)Ul[Sa++]=Ui,Ui!=0&&(zl=Ui);else{var ec=Ui==16,Gl=Ui-16,rc=_h[Gl],Vl=wt(Xn,Ah[Gl])+rc;if(Sa+Vl>vo)break n;for(var nc=ec?zl:0;0<Vl--;)Ul[Sa++]=nc}}vs=1;break n}vs||(ql.a=3),po=vs}(po=po&&!$n.h)&&(ps=O(Jh,Kh,8,La,ds)),po&&ps!=0?go=ps:(co.a=3,go=0)}if(go==0)break r;if(In&&Nh[te]==1&&(In=Cr[de].g==0),xi+=Cr[de].g,de+=go,3>=te){var ka,ms=xr[0];for(ka=1;ka<er;++ka)xr[ka]>ms&&(ms=xr[ka]);ur+=ms}}if(Pe.nd=In,Pe.Qb=0,In&&(Pe.qb=(Fr[3][$r[3]+0].value<<24|Fr[1][$r[1]+0].value<<16|Fr[2][$r[2]+0].value)>>>0,xi==0&&256>Fr[0][$r[0]+0].value&&(Pe.Qb=1,Pe.qb+=Fr[0][$r[0]+0].value<<8)),Pe.jc=!Pe.Qb&&6>ur,Pe.jc){var mo,En=Pe;for(mo=0;mo<bi;++mo){var Zn=mo,Qn=En.pd[Zn],bo=En.G[0][En.H[0]+Zn];256<=bo.value?(Qn.g=bo.g+256,Qn.value=bo.value):(Qn.g=0,Qn.value=0,Zn>>=rr(bo,8,Qn),Zn>>=rr(En.G[1][En.H[1]+Zn],16,Qn),Zn>>=rr(En.G[2][En.H[2]+Zn],0,Qn),rr(En.G[3][En.H[3]+Zn],24,Qn))}}}tr.vc=ve,tr.Wb=xe,tr.Ya=Pr,tr.yc=Sr,Nt=1;break e}Nt=0}if(!(y=Nt)){v.a=3;break t}if(0<et){if(I.ua=1<<et,!F(I.Wa,et)){v.a=1,y=0;break t}}else I.ua=0;var bs=v,Yl=A,ic=N,ws=bs.s,ys=ws.xc;if(bs.c=Yl,bs.i=ic,ws.md=yt(Yl,ys),ws.wc=ys==0?-1:(1<<ys)-1,d){v.xb=Bh;break t}if((W=i(A*N))==null){v.a=1,y=0;break t}y=(y=Gr(v,W,0,A,N,N,null))&&!k.h;break t}return y?(b!=null?b[0]=W:(t(W==null),t(d)),v.$=0,d||Br(I)):Br(I),y}function si(o,s){var d=o.c*o.i,v=d+s+16*s;return t(o.c<=s),o.V=i(v),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 Ci(o,s){var d=o.C,v=s-d,b=o.V,y=o.Ba+o.c*d;for(t(s<=o.l.o);0<v;){var A=16<v?16:v,N=o.l.ma,k=o.l.width,I=k*A,W=N.ca,et=N.tb+k*d,E=o.Ta,Y=o.Ua;ai(o,A,b,y),wl(E,Y,W,et,I),rn(N,d,d+A,W,et,k),v-=A,b+=A*o.c,d+=A}t(d==s),o.C=o.Ma=s}function Fi(){this.ub=this.yd=this.td=this.Rb=0}function Ii(){this.Kd=this.Ld=this.Ud=this.Td=this.i=this.c=0}function Ho(){this.Fb=this.Bb=this.Cb=0,this.Zb=i(4),this.Lb=i(4)}function ta(){this.Yb=(function(){var o=[];return(function s(d,v,b){for(var y=b[v],A=0;A<y&&(d.push(b.length>v+1?[]:0),!(b.length<v+1));A++)s(d[A],v+1,b)})(o,0,[3,11]),o})()}function Da(){this.jb=i(3),this.Wc=l([4,8],ta),this.Xc=l([4,17],ta)}function Ra(){this.Pc=this.wb=this.Tb=this.zd=0,this.vd=new i(4),this.od=new i(4)}function Dr(){this.ld=this.La=this.dd=this.tc=0}function ea(){this.Na=this.la=0}function Ta(){this.Sc=[0,0],this.Eb=[0,0],this.Qc=[0,0],this.ia=this.lc=0}function ra(){this.ad=i(384),this.Za=0,this.Ob=i(16),this.$b=this.Ad=this.ia=this.Gc=this.Hc=this.Dd=0}function Ma(){this.uc=this.M=this.Nb=0,this.wa=Array(new Dr),this.Y=0,this.ya=Array(new ra),this.aa=0,this.l=new Ei}function qa(){this.y=i(16),this.f=i(8),this.ea=i(8)}function Ua(){this.cb=this.a=0,this.sc="",this.m=new _,this.Od=new Fi,this.Kc=new Ii,this.ed=new Ra,this.Qa=new Ho,this.Ic=this.$c=this.Aa=0,this.D=new Ma,this.Xb=this.Va=this.Hb=this.zb=this.yb=this.Ub=this.za=0,this.Jc=f(8,_),this.ia=0,this.pb=f(4,Ta),this.Pa=new Da,this.Bd=this.kc=0,this.Ac=[],this.Bc=0,this.zc=[0,0,0,0],this.Gd=Array(new qa),this.Hd=0,this.rb=Array(new ea),this.sb=0,this.wa=Array(new Dr),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 ra),this.L=this.aa=0,this.gd=l([4,2],Dr),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 an(o,s){return 0>o?0:o>s?s:o}function Ei(){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 Wo(){var o=new Ua;return o!=null&&(o.a=0,o.sc="OK",o.cb=0,o.Xb=0,_a||(_a=Oi)),o}function Ye(o,s,d){return o.a==0&&(o.a=s,o.sc=d,o.cb=0),0}function za(o,s,d){return 3<=d&&o[s+0]==157&&o[s+1]==1&&o[s+2]==42}function on(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,v=s.w,b=s.ha;if(4>b)return Ye(o,7,"Truncated header.");var y=d[v+0]|d[v+1]<<8|d[v+2]<<16,A=o.Od;if(A.Rb=!(1&y),A.td=y>>1&7,A.yd=y>>4&1,A.ub=y>>5,3<A.td)return Ye(o,3,"Incorrect keyframe parameters.");if(!A.yd)return Ye(o,4,"Frame not displayable.");v+=3,b-=3;var N=o.Kc;if(A.Rb){if(7>b)return Ye(o,7,"cannot parse picture header");if(!za(d,v,b))return Ye(o,3,"Bad code word");N.c=16383&(d[v+4]<<8|d[v+3]),N.Td=d[v+4]>>6,N.i=16383&(d[v+6]<<8|d[v+5]),N.Ud=d[v+6]>>6,v+=7,b-=7,o.za=N.c+15>>4,o.Ub=N.i+15>>4,s.width=N.c,s.height=N.i,s.Da=0,s.j=0,s.v=0,s.va=s.width,s.o=s.height,s.da=0,s.ib=s.width,s.hb=s.height,s.U=s.width,s.T=s.height,a((y=o.Pa).jb,0,255,y.jb.length),t((y=o.Qa)!=null),y.Cb=0,y.Bb=0,y.Fb=1,a(y.Zb,0,0,y.Zb.length),a(y.Lb,0,0,y.Lb)}if(A.ub>b)return Ye(o,7,"bad partition length");st(y=o.m,d,v,A.ub),v+=A.ub,b-=A.ub,A.Rb&&(N.Ld=ot(y),N.Kd=ot(y)),N=o.Qa;var k,I=o.Pa;if(t(y!=null),t(N!=null),N.Cb=ot(y),N.Cb){if(N.Bb=ot(y),ot(y)){for(N.Fb=ot(y),k=0;4>k;++k)N.Zb[k]=ot(y)?rt(y,7):0;for(k=0;4>k;++k)N.Lb[k]=ot(y)?rt(y,6):0}if(N.Bb)for(k=0;3>k;++k)I.jb[k]=ot(y)?ut(y,8):255}else N.Bb=0;if(y.Ka)return Ye(o,3,"cannot parse segment header");if((N=o.ed).zd=ot(y),N.Tb=ut(y,6),N.wb=ut(y,3),N.Pc=ot(y),N.Pc&&ot(y)){for(I=0;4>I;++I)ot(y)&&(N.vd[I]=rt(y,6));for(I=0;4>I;++I)ot(y)&&(N.od[I]=rt(y,6))}if(o.L=N.Tb==0?0:N.zd?1:2,y.Ka)return Ye(o,3,"cannot parse filter header");var W=b;if(b=k=v,v=k+W,N=W,o.Xb=(1<<ut(o.m,2))-1,W<3*(I=o.Xb))d=7;else{for(k+=3*I,N-=3*I,W=0;W<I;++W){var et=d[b+0]|d[b+1]<<8|d[b+2]<<16;et>N&&(et=N),st(o.Jc[+W],d,k,et),k+=et,N-=et,b+=3}st(o.Jc[+I],d,k,N),d=k<v?0:5}if(d!=0)return Ye(o,d,"cannot parse partitions");for(d=ut(k=o.m,7),b=ot(k)?rt(k,4):0,v=ot(k)?rt(k,4):0,N=ot(k)?rt(k,4):0,I=ot(k)?rt(k,4):0,k=ot(k)?rt(k,4):0,W=o.Qa,et=0;4>et;++et){if(W.Cb){var E=W.Zb[et];W.Fb||(E+=d)}else{if(0<et){o.pb[et]=o.pb[0];continue}E=d}var Y=o.pb[et];Y.Sc[0]=fs[an(E+b,127)],Y.Sc[1]=hs[an(E+0,127)],Y.Eb[0]=2*fs[an(E+v,127)],Y.Eb[1]=101581*hs[an(E+N,127)]>>16,8>Y.Eb[1]&&(Y.Eb[1]=8),Y.Qc[0]=fs[an(E+I,117)],Y.Qc[1]=hs[an(E+k,127)],Y.lc=E+k}if(!A.Rb)return Ye(o,4,"Not a key frame.");for(ot(y),A=o.Pa,d=0;4>d;++d){for(b=0;8>b;++b)for(v=0;3>v;++v)for(N=0;11>N;++N)I=gt(y,Oh[d][b][v][N])?ut(y,8):Ih[d][b][v][N],A.Wc[d][b].Yb[v][N]=I;for(b=0;17>b;++b)A.Xc[d][b]=A.Wc[d][jh[b]]}return o.kc=ot(y),o.kc&&(o.Bd=ut(y,8)),o.cb=1}function Oi(o,s,d,v,b,y,A){var N=s[b].Yb[d];for(d=0;16>b;++b){if(!gt(o,N[d+0]))return b;for(;!gt(o,N[d+1]);)if(N=s[++b].Yb[0],d=0,b==16)return 16;var k=s[b+1].Yb;if(gt(o,N[d+2])){var I=o,W=0;if(gt(I,(E=N)[(et=d)+3]))if(gt(I,E[et+6])){for(N=0,et=2*(W=gt(I,E[et+8]))+(E=gt(I,E[et+9+W])),W=0,E=Ch[et];E[N];++N)W+=W+gt(I,E[N]);W+=3+(8<<et)}else gt(I,E[et+7])?(W=7+2*gt(I,165),W+=gt(I,145)):W=5+gt(I,159);else W=gt(I,E[et+4])?3+gt(I,E[et+5]):2;N=k[2]}else W=1,N=k[1];k=A+Fh[b],0>(I=o).b&&at(I);var et,E=I.b,Y=(et=I.Ca>>1)-(I.I>>E)>>31;--I.b,I.Ca+=Y,I.Ca|=1,I.I-=(et+1&Y)<<E,y[k]=((W^Y)-Y)*v[(0<b)+0]}return 16}function Ha(o){var s=o.rb[o.sb-1];s.la=0,s.Na=0,a(o.zc,0,0,o.zc.length),o.ja=0}function Rr(o,s,d,v,b){b=o[s+d+32*v]+(b>>3),o[s+d+32*v]=-256&b?0>b?0:255:b}function $e(o,s,d,v,b,y){Rr(o,s,0,d,v+b),Rr(o,s,1,d,v+y),Rr(o,s,2,d,v-y),Rr(o,s,3,d,v-b)}function bn(o){return(20091*o>>16)+o}function Wa(o,s,d,v){var b,y=0,A=i(16);for(b=0;4>b;++b){var N=o[s+0]+o[s+8],k=o[s+0]-o[s+8],I=(35468*o[s+4]>>16)-bn(o[s+12]),W=bn(o[s+4])+(35468*o[s+12]>>16);A[y+0]=N+W,A[y+1]=k+I,A[y+2]=k-I,A[y+3]=N-W,y+=4,s++}for(b=y=0;4>b;++b)N=(o=A[y+0]+4)+A[y+8],k=o-A[y+8],I=(35468*A[y+4]>>16)-bn(A[y+12]),Rr(d,v,0,0,N+(W=bn(A[y+4])+(35468*A[y+12]>>16))),Rr(d,v,1,0,k+I),Rr(d,v,2,0,k-I),Rr(d,v,3,0,N-W),y++,v+=32}function Go(o,s,d,v){var b=o[s+0]+4,y=35468*o[s+4]>>16,A=bn(o[s+4]),N=35468*o[s+1]>>16;$e(d,v,0,b+A,o=bn(o[s+1]),N),$e(d,v,1,b+y,o,N),$e(d,v,2,b-y,o,N),$e(d,v,3,b-A,o,N)}function Vo(o,s,d,v,b){Wa(o,s,d,v),b&&Wa(o,s+16,d,v+4)}function sn(o,s,d,v){yi(o,s+0,d,v,1),yi(o,s+32,d,v+128,1)}function Ga(o,s,d,v){var b;for(o=o[s+0]+4,b=0;4>b;++b)for(s=0;4>s;++s)Rr(d,v,s,b,o)}function Va(o,s,d,v){o[s+0]&&we(o,s+0,d,v),o[s+16]&&we(o,s+16,d,v+4),o[s+32]&&we(o,s+32,d,v+128),o[s+48]&&we(o,s+48,d,v+128+4)}function ji(o,s,d,v){var b,y=i(16);for(b=0;4>b;++b){var A=o[s+0+b]+o[s+12+b],N=o[s+4+b]+o[s+8+b],k=o[s+4+b]-o[s+8+b],I=o[s+0+b]-o[s+12+b];y[0+b]=A+N,y[8+b]=A-N,y[4+b]=I+k,y[12+b]=I-k}for(b=0;4>b;++b)A=(o=y[0+4*b]+3)+y[3+4*b],N=y[1+4*b]+y[2+4*b],k=y[1+4*b]-y[2+4*b],I=o-y[3+4*b],d[v+0]=A+N>>3,d[v+16]=I+k>>3,d[v+32]=A-N>>3,d[v+48]=I-k>>3,v+=64}function li(o,s,d){var v,b=s-32,y=Lr,A=255-o[b-1];for(v=0;v<d;++v){var N,k=y,I=A+o[s-1];for(N=0;N<d;++N)o[s+N]=k[I+o[b+N]];s+=32}}function Yo(o,s){li(o,s,4)}function Jo(o,s){li(o,s,8)}function Ko(o,s){li(o,s,16)}function na(o,s){var d;for(d=0;16>d;++d)n(o,s+32*d,o,s-32,16)}function Ya(o,s){var d;for(d=16;0<d;--d)a(o,s,o[s-1],16),s+=32}function Vr(o,s,d){var v;for(v=0;16>v;++v)a(s,d+32*v,o,16)}function $o(o,s){var d,v=16;for(d=0;16>d;++d)v+=o[s-1+32*d]+o[s+d-32];Vr(v>>5,o,s)}function ui(o,s){var d,v=8;for(d=0;16>d;++d)v+=o[s-1+32*d];Vr(v>>4,o,s)}function ia(o,s){var d,v=8;for(d=0;16>d;++d)v+=o[s+d-32];Vr(v>>4,o,s)}function Xo(o,s){Vr(128,o,s)}function $t(o,s,d){return o+2*s+d+2>>2}function Zo(o,s){var d,v=s-32;for(v=new Uint8Array([$t(o[v-1],o[v+0],o[v+1]),$t(o[v+0],o[v+1],o[v+2]),$t(o[v+1],o[v+2],o[v+3]),$t(o[v+2],o[v+3],o[v+4])]),d=0;4>d;++d)n(o,s+32*d,v,0,v.length)}function Qo(o,s){var d=o[s-1],v=o[s-1+32],b=o[s-1+64],y=o[s-1+96];At(o,s+0,16843009*$t(o[s-1-32],d,v)),At(o,s+32,16843009*$t(d,v,b)),At(o,s+64,16843009*$t(v,b,y)),At(o,s+96,16843009*$t(b,y,y))}function ts(o,s){var d,v=4;for(d=0;4>d;++d)v+=o[s+d-32]+o[s-1+32*d];for(v>>=3,d=0;4>d;++d)a(o,s+32*d,v,4)}function wn(o,s){var d=o[s-1+0],v=o[s-1+32],b=o[s-1+64],y=o[s-1-32],A=o[s+0-32],N=o[s+1-32],k=o[s+2-32],I=o[s+3-32];o[s+0+96]=$t(v,b,o[s-1+96]),o[s+1+96]=o[s+0+64]=$t(d,v,b),o[s+2+96]=o[s+1+64]=o[s+0+32]=$t(y,d,v),o[s+3+96]=o[s+2+64]=o[s+1+32]=o[s+0+0]=$t(A,y,d),o[s+3+64]=o[s+2+32]=o[s+1+0]=$t(N,A,y),o[s+3+32]=o[s+2+0]=$t(k,N,A),o[s+3+0]=$t(I,k,N)}function yn(o,s){var d=o[s+1-32],v=o[s+2-32],b=o[s+3-32],y=o[s+4-32],A=o[s+5-32],N=o[s+6-32],k=o[s+7-32];o[s+0+0]=$t(o[s+0-32],d,v),o[s+1+0]=o[s+0+32]=$t(d,v,b),o[s+2+0]=o[s+1+32]=o[s+0+64]=$t(v,b,y),o[s+3+0]=o[s+2+32]=o[s+1+64]=o[s+0+96]=$t(b,y,A),o[s+3+32]=o[s+2+64]=o[s+1+96]=$t(y,A,N),o[s+3+64]=o[s+2+96]=$t(A,N,k),o[s+3+96]=$t(N,k,k)}function es(o,s){var d=o[s-1+0],v=o[s-1+32],b=o[s-1+64],y=o[s-1-32],A=o[s+0-32],N=o[s+1-32],k=o[s+2-32],I=o[s+3-32];o[s+0+0]=o[s+1+64]=y+A+1>>1,o[s+1+0]=o[s+2+64]=A+N+1>>1,o[s+2+0]=o[s+3+64]=N+k+1>>1,o[s+3+0]=k+I+1>>1,o[s+0+96]=$t(b,v,d),o[s+0+64]=$t(v,d,y),o[s+0+32]=o[s+1+96]=$t(d,y,A),o[s+1+32]=o[s+2+96]=$t(y,A,N),o[s+2+32]=o[s+3+96]=$t(A,N,k),o[s+3+32]=$t(N,k,I)}function rs(o,s){var d=o[s+0-32],v=o[s+1-32],b=o[s+2-32],y=o[s+3-32],A=o[s+4-32],N=o[s+5-32],k=o[s+6-32],I=o[s+7-32];o[s+0+0]=d+v+1>>1,o[s+1+0]=o[s+0+64]=v+b+1>>1,o[s+2+0]=o[s+1+64]=b+y+1>>1,o[s+3+0]=o[s+2+64]=y+A+1>>1,o[s+0+32]=$t(d,v,b),o[s+1+32]=o[s+0+96]=$t(v,b,y),o[s+2+32]=o[s+1+96]=$t(b,y,A),o[s+3+32]=o[s+2+96]=$t(y,A,N),o[s+3+64]=$t(A,N,k),o[s+3+96]=$t(N,k,I)}function Bi(o,s){var d=o[s-1+0],v=o[s-1+32],b=o[s-1+64],y=o[s-1+96];o[s+0+0]=d+v+1>>1,o[s+2+0]=o[s+0+32]=v+b+1>>1,o[s+2+32]=o[s+0+64]=b+y+1>>1,o[s+1+0]=$t(d,v,b),o[s+3+0]=o[s+1+32]=$t(v,b,y),o[s+3+32]=o[s+1+64]=$t(b,y,y),o[s+3+64]=o[s+2+64]=o[s+0+96]=o[s+1+96]=o[s+2+96]=o[s+3+96]=y}function aa(o,s){var d=o[s-1+0],v=o[s-1+32],b=o[s-1+64],y=o[s-1+96],A=o[s-1-32],N=o[s+0-32],k=o[s+1-32],I=o[s+2-32];o[s+0+0]=o[s+2+32]=d+A+1>>1,o[s+0+32]=o[s+2+64]=v+d+1>>1,o[s+0+64]=o[s+2+96]=b+v+1>>1,o[s+0+96]=y+b+1>>1,o[s+3+0]=$t(N,k,I),o[s+2+0]=$t(A,N,k),o[s+1+0]=o[s+3+32]=$t(d,A,N),o[s+1+32]=o[s+3+64]=$t(v,d,A),o[s+1+64]=o[s+3+96]=$t(b,v,d),o[s+1+96]=$t(y,b,v)}function fi(o,s){var d;for(d=0;8>d;++d)n(o,s+32*d,o,s-32,8)}function ns(o,s){var d;for(d=0;8>d;++d)a(o,s,o[s-1],8),s+=32}function xn(o,s,d){var v;for(v=0;8>v;++v)a(s,d+32*v,o,8)}function is(o,s){var d,v=8;for(d=0;8>d;++d)v+=o[s+d-32]+o[s-1+32*d];xn(v>>4,o,s)}function oa(o,s){var d,v=4;for(d=0;8>d;++d)v+=o[s+d-32];xn(v>>3,o,s)}function sa(o,s){var d,v=4;for(d=0;8>d;++d)v+=o[s-1+32*d];xn(v>>3,o,s)}function Ja(o,s){xn(128,o,s)}function An(o,s,d){var v=o[s-d],b=o[s+0],y=3*(b-v)+as[1020+o[s-2*d]-o[s+d]],A=ro[112+(y+4>>3)];o[s-d]=Lr[255+v+ro[112+(y+3>>3)]],o[s+0]=Lr[255+b-A]}function la(o,s,d,v){var b=o[s+0],y=o[s+d];return qr[255+o[s-2*d]-o[s-d]]>v||qr[255+y-b]>v}function Di(o,s,d,v){return 4*qr[255+o[s-d]-o[s+0]]+qr[255+o[s-2*d]-o[s+d]]<=v}function ua(o,s,d,v,b){var y=o[s-3*d],A=o[s-2*d],N=o[s-d],k=o[s+0],I=o[s+d],W=o[s+2*d],et=o[s+3*d];return 4*qr[255+N-k]+qr[255+A-I]>v?0:qr[255+o[s-4*d]-y]<=b&&qr[255+y-A]<=b&&qr[255+A-N]<=b&&qr[255+et-W]<=b&&qr[255+W-I]<=b&&qr[255+I-k]<=b}function hi(o,s,d,v){var b=2*v+1;for(v=0;16>v;++v)Di(o,s+v,d,b)&&An(o,s+v,d)}function fa(o,s,d,v){var b=2*v+1;for(v=0;16>v;++v)Di(o,s+v*d,1,b)&&An(o,s+v*d,1)}function Ka(o,s,d,v){var b;for(b=3;0<b;--b)hi(o,s+=4*d,d,v)}function $a(o,s,d,v){var b;for(b=3;0<b;--b)fa(o,s+=4,d,v)}function _n(o,s,d,v,b,y,A,N){for(y=2*y+1;0<b--;){if(ua(o,s,d,y,A))if(la(o,s,d,N))An(o,s,d);else{var k=o,I=s,W=d,et=k[I-2*W],E=k[I-W],Y=k[I+0],X=k[I+W],lt=k[I+2*W],Q=27*(pt=as[1020+3*(Y-E)+as[1020+et-X]])+63>>7,ft=18*pt+63>>7,pt=9*pt+63>>7;k[I-3*W]=Lr[255+k[I-3*W]+pt],k[I-2*W]=Lr[255+et+ft],k[I-W]=Lr[255+E+Q],k[I+0]=Lr[255+Y-Q],k[I+W]=Lr[255+X-ft],k[I+2*W]=Lr[255+lt-pt]}s+=v}}function Nn(o,s,d,v,b,y,A,N){for(y=2*y+1;0<b--;){if(ua(o,s,d,y,A))if(la(o,s,d,N))An(o,s,d);else{var k=o,I=s,W=d,et=k[I-W],E=k[I+0],Y=k[I+W],X=ro[112+(4+(lt=3*(E-et))>>3)],lt=ro[112+(lt+3>>3)],Q=X+1>>1;k[I-2*W]=Lr[255+k[I-2*W]+Q],k[I-W]=Lr[255+et+lt],k[I+0]=Lr[255+E-X],k[I+W]=Lr[255+Y-Q]}s+=v}}function Xa(o,s,d,v,b,y){_n(o,s,d,1,16,v,b,y)}function ci(o,s,d,v,b,y){_n(o,s,1,d,16,v,b,y)}function Za(o,s,d,v,b,y){var A;for(A=3;0<A;--A)Nn(o,s+=4*d,d,1,16,v,b,y)}function c(o,s,d,v,b,y){var A;for(A=3;0<A;--A)Nn(o,s+=4,1,d,16,v,b,y)}function m(o,s,d,v,b,y,A,N){_n(o,s,b,1,8,y,A,N),_n(d,v,b,1,8,y,A,N)}function j(o,s,d,v,b,y,A,N){_n(o,s,1,b,8,y,A,N),_n(d,v,1,b,8,y,A,N)}function q(o,s,d,v,b,y,A,N){Nn(o,s+4*b,b,1,8,y,A,N),Nn(d,v+4*b,b,1,8,y,A,N)}function $(o,s,d,v,b,y,A,N){Nn(o,s+4,1,b,8,y,A,N),Nn(d,v+4,1,b,8,y,A,N)}function dt(){this.ba=new le,this.ec=[],this.cc=[],this.Mc=[],this.Dc=this.Nc=this.dc=this.fc=0,this.Oa=new be,this.memory=0,this.Ib="OutputFunc",this.Jb="OutputAlphaFunc",this.Nd="OutputRowFunc"}function mt(){this.data=[],this.offset=this.kd=this.ha=this.w=0,this.na=[],this.xa=this.gb=this.Ja=this.Sa=this.P=0}function It(){this.nc=this.Ea=this.b=this.hc=0,this.K=[],this.w=0}function Bt(){this.ua=0,this.Wa=new ae,this.vb=new ae,this.md=this.xc=this.wc=0,this.vc=[],this.Wb=0,this.Ya=new nt,this.yc=new z}function Kt(){this.xb=this.a=0,this.l=new Ei,this.ca=new le,this.V=[],this.Ba=0,this.Ta=[],this.Ua=0,this.m=new D,this.Pb=0,this.wd=new D,this.Ma=this.$=this.C=this.i=this.c=this.xd=0,this.s=new Bt,this.ab=0,this.gc=f(4,It),this.Oc=0}function re(){this.Lc=this.Z=this.$a=this.i=this.c=0,this.l=new Ei,this.ic=0,this.ca=[],this.tb=0,this.qd=null,this.rd=0}function ge(o,s,d,v,b,y,A){for(o=o==null?0:o[s+0],s=0;s<A;++s)b[y+s]=o+d[v+s]&255,o=b[y+s]}function je(o,s,d,v,b,y,A){var N;if(o==null)ge(null,null,d,v,b,y,A);else for(N=0;N<A;++N)b[y+N]=o[s+N]+d[v+N]&255}function Je(o,s,d,v,b,y,A){if(o==null)ge(null,null,d,v,b,y,A);else{var N,k=o[s+0],I=k,W=k;for(N=0;N<A;++N)I=W+(k=o[s+N])-I,W=d[v+N]+(-256&I?0>I?0:255:I)&255,I=k,b[y+N]=W}}function ke(o,s,d,v){var b=s.width,y=s.o;if(t(o!=null&&s!=null),0>d||0>=v||d+v>y)return null;if(!o.Cc){if(o.ga==null){var A;if(o.ga=new re,(A=o.ga==null)||(A=s.width*s.o,t(o.Gb.length==0),o.Gb=i(A),o.Uc=0,o.Gb==null?A=0:(o.mb=o.Gb,o.nb=o.Uc,o.rc=null,A=1),A=!A),!A){A=o.ga;var N=o.Fa,k=o.P,I=o.qc,W=o.mb,et=o.nb,E=k+1,Y=I-1,X=A.l;if(t(N!=null&&W!=null&&s!=null),Kn[0]=null,Kn[1]=ge,Kn[2]=je,Kn[3]=Je,A.ca=W,A.tb=et,A.c=s.width,A.i=s.height,t(0<A.c&&0<A.i),1>=I)s=0;else if(A.$a=3&N[k+0],A.Z=N[k+0]>>2&3,A.Lc=N[k+0]>>4&3,k=N[k+0]>>6&3,0>A.$a||1<A.$a||4<=A.Z||1<A.Lc||k)s=0;else if(X.put=Vt,X.ac=en,X.bc=vn,X.ma=A,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.$a)t:{t(A.$a==1),s=oi();e:for(;;){if(s==null){s=0;break t}if(t(A!=null),A.mc=s,s.c=A.c,s.i=A.i,s.l=A.l,s.l.ma=A,s.l.width=A.c,s.l.height=A.i,s.a=0,ht(s.m,N,E,Y),!nn(A.c,A.i,1,s,null)||(s.ab==1&&s.gc[0].hc==3&&Hr(s.s)?(A.ic=1,N=s.c*s.i,s.Ta=null,s.Ua=0,s.V=i(N),s.Ba=0,s.V==null?(s.a=1,s=0):s=1):(A.ic=0,s=si(s,A.c)),!s))break e;s=1;break t}A.mc=null,s=0}else s=Y>=A.c*A.i;A=!s}if(A)return null;o.ga.Lc!=1?o.Ga=0:v=y-d}t(o.ga!=null),t(d+v<=y);t:{if(s=(N=o.ga).c,y=N.l.o,N.$a==0){if(E=o.rc,Y=o.Vc,X=o.Fa,k=o.P+1+d*s,I=o.mb,W=o.nb+d*s,t(k<=o.P+o.qc),N.Z!=0)for(t(Kn[N.Z]!=null),A=0;A<v;++A)Kn[N.Z](E,Y,X,k,I,W,s),E=I,Y=W,W+=s,k+=s;else for(A=0;A<v;++A)n(I,W,X,k,s),E=I,Y=W,W+=s,k+=s;o.rc=E,o.Vc=Y}else{if(t(N.mc!=null),s=d+v,t((A=N.mc)!=null),t(s<=A.i),A.C>=s)s=1;else if(N.ic||Yr(),N.ic){N=A.V,E=A.Ba,Y=A.c;var lt=A.i,Q=(X=1,k=A.$/Y,I=A.$%Y,W=A.m,et=A.s,A.$),ft=Y*lt,pt=Y*s,xt=et.wc,bt=Q<pt?ir(et,I,k):null;t(Q<=ft),t(s<=lt),t(Hr(et));e:for(;;){for(;!W.h&&Q<pt;){if(I&xt||(bt=ir(et,I,k)),t(bt!=null),Z(W),256>(lt=Be(bt.G[0],bt.H[0],W)))N[E+Q]=lt,++Q,++I>=Y&&(I=0,++k<=s&&!(k%16)&&Wr(A,k));else{if(!(280>lt)){X=0;break e}lt=Or(lt-256,W);var Dt,Pt=Be(bt.G[4],bt.H[4],W);if(Z(W),!(Q>=(Pt=jr(Y,Pt=Or(Pt,W)))&&ft-Q>=lt)){X=0;break e}for(Dt=0;Dt<lt;++Dt)N[E+Q+Dt]=N[E+Q+Dt-Pt];for(Q+=lt,I+=lt;I>=Y;)I-=Y,++k<=s&&!(k%16)&&Wr(A,k);Q<pt&&I&xt&&(bt=ir(et,I,k))}t(W.h==H(W))}Wr(A,k>s?s:k);break e}!X||W.h&&Q<ft?(X=0,A.a=W.h?5:3):A.$=Q,s=X}else s=Gr(A,A.V,A.Ba,A.c,A.i,s,Ci);if(!s){v=0;break t}}d+v>=y&&(o.Cc=1),v=1}if(!v)return null;if(o.Cc&&((v=o.ga)!=null&&(v.mc=null),o.ga=null,0<o.Ga))return alert("todo:WebPDequantizeLevels"),null}return o.nb+d*b}function Xe(o,s,d,v,b,y){for(;0<b--;){var A,N=o,k=s+(d?1:0),I=o,W=s+(d?0:3);for(A=0;A<v;++A){var et=I[W+4*A];et!=255&&(et*=32897,N[k+4*A+0]=N[k+4*A+0]*et>>23,N[k+4*A+1]=N[k+4*A+1]*et>>23,N[k+4*A+2]=N[k+4*A+2]*et>>23)}s+=y}}function Ke(o,s,d,v,b){for(;0<v--;){var y;for(y=0;y<d;++y){var A=o[s+2*y+0],N=15&(I=o[s+2*y+1]),k=4369*N,I=(240&I|I>>4)*k>>16;o[s+2*y+0]=(240&A|A>>4)*k>>16&240|(15&A|A<<4)*k>>16>>4&15,o[s+2*y+1]=240&I|N}s+=b}}function ar(o,s,d,v,b,y,A,N){var k,I,W=255;for(I=0;I<b;++I){for(k=0;k<v;++k){var et=o[s+k];y[A+4*k]=et,W&=et}s+=d,A+=N}return W!=255}function Ln(o,s,d,v,b){var y;for(y=0;y<b;++y)d[v+y]=o[s+y]>>8}function Yr(){Aa=Xe,ml=Ke,bl=ar,wl=Ln}function Sn(o,s,d){R[o]=function(v,b,y,A,N,k,I,W,et,E,Y,X,lt,Q,ft,pt,xt){var bt,Dt=xt-1>>1,Pt=N[k+0]|I[W+0]<<16,ne=et[E+0]|Y[X+0]<<16;t(v!=null);var Et=3*Pt+ne+131074>>2;for(s(v[b+0],255&Et,Et>>16,lt,Q),y!=null&&(Et=3*ne+Pt+131074>>2,s(y[A+0],255&Et,Et>>16,ft,pt)),bt=1;bt<=Dt;++bt){var ce=N[k+bt]|I[W+bt]<<16,Qe=et[E+bt]|Y[X+bt]<<16,ie=Pt+ce+ne+Qe+524296,Ot=ie+2*(ce+ne)>>3;Et=Ot+Pt>>1,Pt=(ie=ie+2*(Pt+Qe)>>3)+ce>>1,s(v[b+2*bt-1],255&Et,Et>>16,lt,Q+(2*bt-1)*d),s(v[b+2*bt-0],255&Pt,Pt>>16,lt,Q+(2*bt-0)*d),y!=null&&(Et=ie+ne>>1,Pt=Ot+Qe>>1,s(y[A+2*bt-1],255&Et,Et>>16,ft,pt+(2*bt-1)*d),s(y[A+2*bt+0],255&Pt,Pt>>16,ft,pt+(2*bt+0)*d)),Pt=ce,ne=Qe}1&xt||(Et=3*Pt+ne+131074>>2,s(v[b+xt-1],255&Et,Et>>16,lt,Q+(xt-1)*d),y!=null&&(Et=3*ne+Pt+131074>>2,s(y[A+xt-1],255&Et,Et>>16,ft,pt+(xt-1)*d)))}}function ha(){Ur[no]=Dh,Ur[io]=Fl,Ur[Ll]=Rh,Ur[ao]=Il,Ur[oo]=El,Ur[os]=Ol,Ur[Sl]=Th,Ur[ss]=Fl,Ur[ls]=Il,Ur[so]=El,Ur[us]=Ol}function Ri(o){return o&-16384?0>o?0:255:o>>Mh}function Mn(o,s){return Ri((19077*o>>8)+(26149*s>>8)-14234)}function di(o,s,d){return Ri((19077*o>>8)-(6419*s>>8)-(13320*d>>8)+8708)}function pi(o,s){return Ri((19077*o>>8)+(33050*s>>8)-17685)}function qn(o,s,d,v,b){v[b+0]=Mn(o,d),v[b+1]=di(o,s,d),v[b+2]=pi(o,s)}function or(o,s,d,v,b){v[b+0]=pi(o,s),v[b+1]=di(o,s,d),v[b+2]=Mn(o,d)}function gi(o,s,d,v,b){var y=di(o,s,d);s=y<<3&224|pi(o,s)>>3,v[b+0]=248&Mn(o,d)|y>>5,v[b+1]=s}function vi(o,s,d,v,b){var y=240&pi(o,s)|15;v[b+0]=240&Mn(o,d)|di(o,s,d)>>4,v[b+1]=y}function ca(o,s,d,v,b){v[b+0]=255,qn(o,s,d,v,b+1)}function da(o,s,d,v,b){or(o,s,d,v,b),v[b+3]=255}function vr(o,s,d,v,b){qn(o,s,d,v,b),v[b+3]=255}function kn(o,s,d){R[o]=function(v,b,y,A,N,k,I,W,et){for(var E=W+(-2&et)*d;W!=E;)s(v[b+0],y[A+0],N[k+0],I,W),s(v[b+1],y[A+0],N[k+0],I,W+d),b+=2,++A,++k,W+=2*d;1&et&&s(v[b+0],y[A+0],N[k+0],I,W)}}function Ti(o,s,d){return d==0?o==0?s==0?6:5:s==0?4:0:d}function Qa(o,s,d,v,b){switch(o>>>30){case 3:yi(s,d,v,b,0);break;case 2:Mr(s,d,v,b);break;case 1:we(s,d,v,b)}}function Tr(o,s){var d,v,b=s.M,y=s.Nb,A=o.oc,N=o.pc+40,k=o.oc,I=o.pc+584,W=o.oc,et=o.pc+600;for(d=0;16>d;++d)A[N+32*d-1]=129;for(d=0;8>d;++d)k[I+32*d-1]=129,W[et+32*d-1]=129;for(0<b?A[N-1-32]=k[I-1-32]=W[et-1-32]=129:(a(A,N-32-1,127,21),a(k,I-32-1,127,9),a(W,et-32-1,127,9)),v=0;v<o.za;++v){var E=s.ya[s.aa+v];if(0<v){for(d=-1;16>d;++d)n(A,N+32*d-4,A,N+32*d+12,4);for(d=-1;8>d;++d)n(k,I+32*d-4,k,I+32*d+4,4),n(W,et+32*d-4,W,et+32*d+4,4)}var Y=o.Gd,X=o.Hd+v,lt=E.ad,Q=E.Hc;if(0<b&&(n(A,N-32,Y[X].y,0,16),n(k,I-32,Y[X].f,0,8),n(W,et-32,Y[X].ea,0,8)),E.Za){var ft=A,pt=N-32+16;for(0<b&&(v>=o.za-1?a(ft,pt,Y[X].y[15],4):n(ft,pt,Y[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=A,pt=N+Bl[d],Jr[E.Ob[d]](ft,pt),Qa(Q,lt,16*+d,ft,pt)}else if(ft=Ti(v,b,E.Ob[0]),Jn[ft](A,N),Q!=0)for(d=0;16>d;++d,Q<<=2)Qa(Q,lt,16*+d,A,N+Bl[d]);for(d=E.Gc,ft=Ti(v,b,E.Dd),Fn[ft](k,I),Fn[ft](W,et),Q=lt,ft=k,pt=I,255&(E=0|d)&&(170&E?fn(Q,256,ft,pt):_e(Q,256,ft,pt)),E=W,Q=et,255&(d>>=8)&&(170&d?fn(lt,320,E,Q):_e(lt,320,E,Q)),b<o.Ub-1&&(n(Y[X].y,0,A,N+480,16),n(Y[X].f,0,k,I+224,8),n(Y[X].ea,0,W,et+224,8)),d=8*y*o.B,Y=o.sa,X=o.ta+16*v+16*y*o.R,lt=o.qa,E=o.ra+8*v+d,Q=o.Ha,ft=o.Ia+8*v+d,d=0;16>d;++d)n(Y,X+d*o.R,A,N+32*d,16);for(d=0;8>d;++d)n(lt,E+d*o.B,k,I+32*d,8),n(Q,ft+d*o.B,W,et+32*d,8)}}function mi(o,s,d,v,b,y,A,N,k){var I=[0],W=[0],et=0,E=k!=null?k.kd:0,Y=k??new mt;if(o==null||12>d)return 7;Y.data=o,Y.w=s,Y.ha=d,s=[s],d=[d],Y.gb=[Y.gb];t:{var X=s,lt=d,Q=Y.gb;if(t(o!=null),t(lt!=null),t(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=Mt(o,X[0]+4);if(12>ft||4294967286<ft){Q=3;break t}if(E&&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<Y.gb[0],d=d[0];;){t:{var pt=o;lt=s,Q=d;var xt=I,bt=W,Dt=X=[0];if((Et=et=[et])[0]=0,8>Q[0])Q=7;else{if(!e(pt,lt[0],"VP8X")){if(Mt(pt,lt[0]+4)!=10){Q=3;break t}if(18>Q[0]){Q=7;break t}var Pt=Mt(pt,lt[0]+8),ne=1+St(pt,lt[0]+12);if(2147483648<=ne*(pt=1+St(pt,lt[0]+15))){Q=3;break t}Dt!=null&&(Dt[0]=Pt),xt!=null&&(xt[0]=ne),bt!=null&&(bt[0]=pt),lt[0]+=18,Q[0]-=18,Et[0]=1}Q=0}}if(et=et[0],X=X[0],Q!=0)return Q;if(lt=!!(2&X),!ft&&et)return 3;if(y!=null&&(y[0]=!!(16&X)),A!=null&&(A[0]=lt),N!=null&&(N[0]=0),A=I[0],X=W[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],Y.na=[Y.na],Y.P=[Y.P],Y.Sa=[Y.Sa];t:{Pt=o,Q=s,ft=d;var Et=Y.gb;xt=Y.na,bt=Y.P,Dt=Y.Sa,ne=22,t(Pt!=null),t(ft!=null),pt=Q[0];var ce=ft[0];for(t(xt!=null),t(Dt!=null),xt[0]=null,bt[0]=null,Dt[0]=0;;){if(Q[0]=pt,ft[0]=ce,8>ce){Q=7;break t}var Qe=Mt(Pt,pt+4);if(4294967286<Qe){Q=3;break t}var ie=8+Qe+1&-2;if(ne+=ie,0<Et&&ne>Et){Q=3;break t}if(!e(Pt,pt,"VP8 ")||!e(Pt,pt,"VP8L")){Q=0;break t}if(ce[0]<ie){Q=7;break t}e(Pt,pt,"ALPH")||(xt[0]=Pt,bt[0]=pt+8,Dt[0]=Qe),pt+=ie,ce-=ie}}if(d=d[0],Y.na=Y.na[0],Y.P=Y.P[0],Y.Sa=Y.Sa[0],Q!=0)break}d=[d],Y.Ja=[Y.Ja],Y.xa=[Y.xa];t:if(Et=o,Q=s,ft=d,xt=Y.gb[0],bt=Y.Ja,Dt=Y.xa,Pt=Q[0],pt=!e(Et,Pt,"VP8 "),ne=!e(Et,Pt,"VP8L"),t(Et!=null),t(ft!=null),t(bt!=null),t(Dt!=null),8>ft[0])Q=7;else{if(pt||ne){if(Et=Mt(Et,Pt+4),12<=xt&&Et>xt-12){Q=3;break t}if(E&&Et>ft[0]-8){Q=7;break t}bt[0]=Et,Q[0]+=8,ft[0]-=8,Dt[0]=ne}else Dt[0]=5<=ft[0]&&Et[Pt+0]==47&&!(Et[Pt+4]>>5),bt[0]=ft[0];Q=0}if(d=d[0],Y.Ja=Y.Ja[0],Y.xa=Y.xa[0],s=s[0],Q!=0)break;if(4294967286<Y.Ja)return 3;if(N==null||lt||(N[0]=Y.xa?2:1),A=[A],X=[X],Y.xa){if(5>d){Q=7;break}N=A,E=X,lt=y,o==null||5>d?o=0:5<=d&&o[s+0]==47&&!(o[s+4]>>5)?(ft=[0],Et=[0],xt=[0],ht(bt=new D,o,s,d),mn(bt,ft,Et,xt)?(N!=null&&(N[0]=ft[0]),E!=null&&(E[0]=Et[0]),lt!=null&&(lt[0]=xt[0]),o=1):o=0):o=0}else{if(10>d){Q=7;break}N=X,o==null||10>d||!za(o,s+3,d-3)?o=0:(E=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&E||3<(E>>1&7)||!(E>>4&1)||E>>5>=Y.Ja||!lt||!o?o=0:(A&&(A[0]=lt),N&&(N[0]=o),o=1))}if(!o||(A=A[0],X=X[0],et&&(I[0]!=A||W[0]!=X)))return 3;k!=null&&(k[0]=Y,k.offset=s-k.w,t(4294967286>s-k.w),t(k.offset==k.ha-d));break}return Q==0||Q==7&&et&&k==null?(y!=null&&(y[0]|=Y.na!=null&&0<Y.na.length),v!=null&&(v[0]=A),b!=null&&(b[0]=X),0):Q}function pa(o,s,d){var v=s.width,b=s.height,y=0,A=0,N=v,k=b;if(s.Da=o!=null&&0<o.Da,s.Da&&(N=o.cd,k=o.bd,y=o.v,A=o.j,11>d||(y&=-2,A&=-2),0>y||0>A||0>=N||0>=k||y+N>v||A+k>b))return 0;if(s.v=y,s.j=A,s.va=y+N,s.o=A+k,s.U=N,s.T=k,s.da=o!=null&&0<o.da,s.da){if(!Ht(N,k,d=[o.ib],y=[o.hb]))return 0;s.ib=d[0],s.hb=y[0]}return s.ob=o!=null&&o.ob,s.Kb=o==null||!o.Sd,s.da&&(s.ob=s.ib<3*v/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 Un(o,s,d,v){if(v==null||0>=o||0>=s)return 2;if(d!=null){if(d.Da){var b=d.cd,y=d.bd,A=-2&d.v,N=-2&d.j;if(0>A||0>N||0>=b||0>=y||A+b>o||N+y>s)return 2;o=b,s=y}if(d.da){if(!Ht(o,s,b=[d.ib],y=[d.hb]))return 2;o=b[0],s=y[0]}}v.width=o,v.height=s;t:{var k=v.width,I=v.height;if(o=v.S,0>=k||0>=I||!(o>=no&&13>o))o=2;else{if(0>=v.Rd&&v.sd==null){A=y=b=s=0;var W=(N=k*Dl[o])*I;if(11>o||(y=(I+1)/2*(s=(k+1)/2),o==12&&(A=(b=k)*I)),(I=i(W+2*y+A))==null){o=1;break t}v.sd=I,11>o?((k=v.f.RGBA).eb=I,k.fb=0,k.A=N,k.size=W):((k=v.f.kb).y=I,k.O=0,k.fa=N,k.Fd=W,k.f=I,k.N=0+W,k.Ab=s,k.Cd=y,k.ea=I,k.W=0+W+y,k.Db=s,k.Ed=y,o==12&&(k.F=I,k.J=0+W+2*y),k.Tc=A,k.lb=b)}if(s=1,b=v.S,y=v.width,A=v.height,b>=no&&13>b)if(11>b)o=v.f.RGBA,s&=(N=Math.abs(o.A))*(A-1)+y<=o.size,s&=N>=y*Dl[b],s&=o.eb!=null;else{o=v.f.kb,N=(y+1)/2,W=(A+1)/2,k=Math.abs(o.fa),I=Math.abs(o.Ab);var et=Math.abs(o.Db),E=Math.abs(o.lb),Y=E*(A-1)+y;s&=k*(A-1)+y<=o.Fd,s&=I*(W-1)+N<=o.Cd,s=(s&=et*(W-1)+N<=o.Ed)&k>=y&I>=N&et>=N,s&=o.y!=null,s&=o.f!=null,s&=o.ea!=null,b==12&&(s&=E>=y,s&=Y<=o.Tc,s&=o.F!=null)}else s=0;o=s?0:2}}return o!=0||d!=null&&d.fd&&(o=ga(v)),o}var bi=64,_r=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535,131071,262143,524287,1048575,2097151,4194303,8388607,16777215],Nr=24,zn=32,Pn=8,Hn=[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];Ct("Predictor0","PredictorAdd0"),R.Predictor0=function(){return 4278190080},R.Predictor1=function(o){return o},R.Predictor2=function(o,s,d){return s[d+0]},R.Predictor3=function(o,s,d){return s[d+1]},R.Predictor4=function(o,s,d){return s[d-1]},R.Predictor5=function(o,s,d){return qt(qt(o,s[d+1]),s[d+0])},R.Predictor6=function(o,s,d){return qt(o,s[d-1])},R.Predictor7=function(o,s,d){return qt(o,s[d+0])},R.Predictor8=function(o,s,d){return qt(s[d-1],s[d+0])},R.Predictor9=function(o,s,d){return qt(s[d+0],s[d+1])},R.Predictor10=function(o,s,d){return qt(qt(o,s[d-1]),qt(s[d+0],s[d+1]))},R.Predictor11=function(o,s,d){var v=s[d+0];return 0>=Zt(v>>24&255,o>>24&255,(s=s[d-1])>>24&255)+Zt(v>>16&255,o>>16&255,s>>16&255)+Zt(v>>8&255,o>>8&255,s>>8&255)+Zt(255&v,255&o,255&s)?v:o},R.Predictor12=function(o,s,d){var v=s[d+0];return(me((o>>24&255)+(v>>24&255)-((s=s[d-1])>>24&255))<<24|me((o>>16&255)+(v>>16&255)-(s>>16&255))<<16|me((o>>8&255)+(v>>8&255)-(s>>8&255))<<8|me((255&o)+(255&v)-(255&s)))>>>0},R.Predictor13=function(o,s,d){var v=s[d-1];return(ue((o=qt(o,s[d+0]))>>24&255,v>>24&255)<<24|ue(o>>16&255,v>>16&255)<<16|ue(o>>8&255,v>>8&255)<<8|ue(255&o,255&v))>>>0};var va=R.PredictorAdd0;R.PredictorAdd1=he,Ct("Predictor2","PredictorAdd2"),Ct("Predictor3","PredictorAdd3"),Ct("Predictor4","PredictorAdd4"),Ct("Predictor5","PredictorAdd5"),Ct("Predictor6","PredictorAdd6"),Ct("Predictor7","PredictorAdd7"),Ct("Predictor8","PredictorAdd8"),Ct("Predictor9","PredictorAdd9"),Ct("Predictor10","PredictorAdd10"),Ct("Predictor11","PredictorAdd11"),Ct("Predictor12","PredictorAdd12"),Ct("Predictor13","PredictorAdd13");var Mi=R.PredictorAdd2;Tt("ColorIndexInverseTransform","MapARGB","32b",function(o){return o>>8&255},function(o){return o}),Tt("VP8LColorIndexInverseTransformAlpha","MapAlpha","8b",function(o){return o},function(o){return o>>8&255});var qe,to=R.ColorIndexInverseTransform,ln=R.MapARGB,un=R.VP8LColorIndexInverseTransformAlpha,ma=R.MapAlpha,ba=R.VP8LPredictorsAdd=[];ba.length=16,(R.VP8LPredictors=[]).length=16,(R.VP8LPredictorsAdd_C=[]).length=16,(R.VP8LPredictors_C=[]).length=16;var wa,ya,Wn,Gn,Vn,wi,Yn,yi,Mr,fn,we,_e,Ue,Ze,Cn,xa,qi,eo,hl,cl,dl,pl,gl,vl,Aa,ml,bl,wl,yl=i(511),xl=i(2041),Al=i(225),_l=i(767),Nl=0,as=xl,ro=Al,Lr=_l,qr=yl,no=0,io=1,Ll=2,ao=3,oo=4,os=5,Sl=6,ss=7,ls=8,so=9,us=10,Ah=[2,3,7],_h=[3,3,11],kl=[280,256,256,256,40],Nh=[0,1,1,1,0],Lh=[17,18,0,1,2,3,4,5,16,6,7,8,9,10,11,12,13,14,15],Sh=[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],kh=[2954,2956,2958,2962,2970,2986,3018,3082,3212,3468,3980,5004],Ph=8,fs=[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],hs=[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],_a=null,Ch=[[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]],Fh=[0,1,4,8,5,2,3,6,9,12,13,10,7,11,14,15],Pl=[-0,1,-1,2,-2,3,4,6,-3,5,-4,-5,-6,7,-7,8,-8,-9],Ih=[[[[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]]]],Eh=[[[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]]],Oh=[[[[255,255,255,255,255,255,255,255,255,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]]]],jh=[0,1,2,3,6,4,5,6,6,6,6,6,6,6,6,7,0],Jn=[],Jr=[],Fn=[],Bh=1,Cl=2,Kn=[],Ur=[];Sn("UpsampleRgbLinePair",qn,3),Sn("UpsampleBgrLinePair",or,3),Sn("UpsampleRgbaLinePair",vr,4),Sn("UpsampleBgraLinePair",da,4),Sn("UpsampleArgbLinePair",ca,4),Sn("UpsampleRgba4444LinePair",vi,2),Sn("UpsampleRgb565LinePair",gi,2);var Dh=R.UpsampleRgbLinePair,Rh=R.UpsampleBgrLinePair,Fl=R.UpsampleRgbaLinePair,Il=R.UpsampleBgraLinePair,El=R.UpsampleArgbLinePair,Ol=R.UpsampleRgba4444LinePair,Th=R.UpsampleRgb565LinePair,lo=16,uo=1<<lo-1,Na=-227,cs=482,Mh=6,jl=0,qh=i(256),Uh=i(256),zh=i(256),Hh=i(256),Wh=i(cs-Na),Gh=i(cs-Na);kn("YuvToRgbRow",qn,3),kn("YuvToBgrRow",or,3),kn("YuvToRgbaRow",vr,4),kn("YuvToBgraRow",da,4),kn("YuvToArgbRow",ca,4),kn("YuvToRgba4444Row",vi,2),kn("YuvToRgb565Row",gi,2);var Bl=[0,4,8,12,128,132,136,140,256,260,264,268,384,388,392,396],fo=[0,2,8],Vh=[8,7,6,4,4,2,2,2,1,1,1,1],Yh=1;this.WebPDecodeRGBA=function(o,s,d,v,b){var y=io,A=new dt,N=new le;A.ba=N,N.S=y,N.width=[N.width],N.height=[N.height];var k=N.width,I=N.height,W=new Gt;if(W==null||o==null)var et=2;else t(W!=null),et=mi(o,s,d,W.width,W.height,W.Pd,W.Qd,W.format,null);if(et!=0?k=0:(k!=null&&(k[0]=W.width[0]),I!=null&&(I[0]=W.height[0]),k=1),k){N.width=N.width[0],N.height=N.height[0],v!=null&&(v[0]=N.width),b!=null&&(b[0]=N.height);t:{if(v=new Ei,(b=new mt).data=o,b.w=s,b.ha=d,b.kd=1,s=[0],t(b!=null),((o=mi(b.data,b.w,b.ha,null,null,null,s,null,b))==0||o==7)&&s[0]&&(o=4),(s=o)==0){if(t(A!=null),v.data=b.data,v.w=b.w+b.offset,v.ha=b.ha-b.offset,v.put=Vt,v.ac=en,v.bc=vn,v.ma=A,b.xa){if((o=oi())==null){A=1;break t}if((function(E,Y){var X=[0],lt=[0],Q=[0];e:for(;;){if(E==null)return 0;if(Y==null)return E.a=2,0;if(E.l=Y,E.a=0,ht(E.m,Y.data,Y.w,Y.ha),!mn(E.m,X,lt,Q)){E.a=3;break e}if(E.xb=Cl,Y.width=X[0],Y.height=lt[0],!nn(X[0],lt[0],1,E,null))break e;return 1}return t(E.a!=0),0})(o,v)){if(v=(s=Un(v.width,v.height,A.Oa,A.ba))==0){e:{v=o;r:for(;;){if(v==null){v=0;break e}if(t(v.s.yc!=null),t(v.s.Ya!=null),t(0<v.s.Wb),t((d=v.l)!=null),t((b=d.ma)!=null),v.xb!=0){if(v.ca=b.ba,v.tb=b.tb,t(v.ca!=null),!pa(b.Oa,d,ao)){v.a=2;break r}if(!si(v,d.width)||d.da)break r;if((d.da||Yt(v.ca.S))&&Yr(),11>v.ca.S||(alert("todo:WebPInitConvertARGBToYUV"),v.ca.f.kb.F!=null&&Yr()),v.Pb&&0<v.s.ua&&v.s.vb.X==null&&!F(v.s.vb,v.s.Wa.Xa)){v.a=1;break r}v.xb=0}if(!Gr(v,v.V,v.Ba,v.c,v.i,d.o,Tn))break r;b.Dc=v.Ma,v=1;break e}t(v.a!=0),v=0}v=!v}v&&(s=o.a)}else s=o.a}else{if((o=new Wo)==null){A=1;break t}if(o.Fa=b.na,o.P=b.P,o.qc=b.Sa,on(o,v)){if((s=Un(v.width,v.height,A.Oa,A.ba))==0){if(o.Aa=0,d=A.Oa,t((b=o)!=null),d!=null){if(0<(k=0>(k=d.Md)?0:100<k?255:255*k/100)){for(I=W=0;4>I;++I)12>(et=b.pb[I]).lc&&(et.ia=k*Vh[0>et.lc?0:et.lc]>>3),W|=et.ia;W&&(alert("todo:VP8InitRandom"),b.ia=1)}b.Ga=d.Id,100<b.Ga?b.Ga=100:0>b.Ga&&(b.Ga=0)}(function(E,Y){if(E==null)return 0;if(Y==null)return Ye(E,2,"NULL VP8Io parameter in VP8Decode().");if(!E.cb&&!on(E,Y))return 0;if(t(E.cb),Y.ac==null||Y.ac(Y)){Y.ob&&(E.L=0);var X=fo[E.L];if(E.L==2?(E.yb=0,E.zb=0):(E.yb=Y.v-X>>4,E.zb=Y.j-X>>4,0>E.yb&&(E.yb=0),0>E.zb&&(E.zb=0)),E.Va=Y.o+15+X>>4,E.Hb=Y.va+15+X>>4,E.Hb>E.za&&(E.Hb=E.za),E.Va>E.Ub&&(E.Va=E.Ub),0<E.L){var lt=E.ed;for(X=0;4>X;++X){var Q;if(E.Qa.Cb){var ft=E.Qa.Lb[X];E.Qa.Fb||(ft+=lt.Tb)}else ft=lt.Tb;for(Q=0;1>=Q;++Q){var pt=E.gd[X][Q],xt=ft;if(lt.Pc&&(xt+=lt.vd[0],Q&&(xt+=lt.od[0])),0<(xt=0>xt?0:63<xt?63:xt)){var bt=xt;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*xt+bt,pt.ld=40<=xt?2:15<=xt?1:0}else pt.tc=0;pt.La=Q}}}X=0}else Ye(E,6,"Frame setup failed"),X=E.a;if(X=X==0){if(X){E.$c=0,0<E.Aa||(E.Ic=Yh);e:{X=E.Ic,lt=4*(bt=E.za);var Dt=32*bt,Pt=bt+1,ne=0<E.L?bt*(0<E.Aa?2:1):0,Et=(E.Aa==2?2:1)*bt;if((pt=lt+832+(Q=3*(16*X+fo[E.L])/2*Dt)+(ft=E.Fa!=null&&0<E.Fa.length?E.Kc.c*E.Kc.i:0))!=pt)X=0;else{if(pt>E.Vb){if(E.Vb=0,E.Ec=i(pt),E.Fc=0,E.Ec==null){X=Ye(E,1,"no memory during frame initialization.");break e}E.Vb=pt}pt=E.Ec,xt=E.Fc,E.Ac=pt,E.Bc=xt,xt+=lt,E.Gd=f(Dt,qa),E.Hd=0,E.rb=f(Pt+1,ea),E.sb=1,E.wa=ne?f(ne,Dr):null,E.Y=0,E.D.Nb=0,E.D.wa=E.wa,E.D.Y=E.Y,0<E.Aa&&(E.D.Y+=bt),t(!0),E.oc=pt,E.pc=xt,xt+=832,E.ya=f(Et,ra),E.aa=0,E.D.ya=E.ya,E.D.aa=E.aa,E.Aa==2&&(E.D.aa+=bt),E.R=16*bt,E.B=8*bt,bt=(Dt=fo[E.L])*E.R,Dt=Dt/2*E.B,E.sa=pt,E.ta=xt+bt,E.qa=E.sa,E.ra=E.ta+16*X*E.R+Dt,E.Ha=E.qa,E.Ia=E.ra+8*X*E.B+Dt,E.$c=0,xt+=Q,E.mb=ft?pt:null,E.nb=ft?xt:null,t(xt+ft<=E.Fc+E.Vb),Ha(E),a(E.Ac,E.Bc,0,lt),X=1}}if(X){if(Y.ka=0,Y.y=E.sa,Y.O=E.ta,Y.f=E.qa,Y.N=E.ra,Y.ea=E.Ha,Y.Vd=E.Ia,Y.fa=E.R,Y.Rc=E.B,Y.F=null,Y.J=0,!Nl){for(X=-255;255>=X;++X)yl[255+X]=0>X?-X:X;for(X=-1020;1020>=X;++X)xl[1020+X]=-128>X?-128:127<X?127:X;for(X=-112;112>=X;++X)Al[112+X]=-16>X?-16:15<X?15:X;for(X=-255;510>=X;++X)_l[255+X]=0>X?0:255<X?255:X;Nl=1}Yn=ji,yi=Vo,fn=sn,we=Ga,_e=Va,Mr=Go,Ue=Xa,Ze=ci,Cn=m,xa=j,qi=Za,eo=c,hl=q,cl=$,dl=hi,pl=fa,gl=Ka,vl=$a,Jr[0]=ts,Jr[1]=Yo,Jr[2]=Zo,Jr[3]=Qo,Jr[4]=wn,Jr[5]=es,Jr[6]=yn,Jr[7]=rs,Jr[8]=aa,Jr[9]=Bi,Jn[0]=$o,Jn[1]=Ko,Jn[2]=na,Jn[3]=Ya,Jn[4]=ui,Jn[5]=ia,Jn[6]=Xo,Fn[0]=is,Fn[1]=Jo,Fn[2]=fi,Fn[3]=ns,Fn[4]=sa,Fn[5]=oa,Fn[6]=Ja,X=1}else X=0}X&&(X=(function(ce,Qe){for(ce.M=0;ce.M<ce.Va;++ce.M){var ie,Ot=ce.Jc[ce.M&ce.Xb],Nt=ce.m,ze=ce;for(ie=0;ie<ze.za;++ie){var te=Nt,de=ze,Ce=de.Ac,sr=de.Bc+4*ie,mr=de.zc,De=de.ya[de.aa+ie];if(de.Qa.Bb?De.$b=gt(te,de.Pa.jb[0])?2+gt(te,de.Pa.jb[2]):gt(te,de.Pa.jb[1]):De.$b=0,de.kc&&(De.Ad=gt(te,de.Bd)),De.Za=!gt(te,145)+0,De.Za){var hr=De.Ob,br=0;for(de=0;4>de;++de){var tr,ve=mr[0+de];for(tr=0;4>tr;++tr){ve=Eh[Ce[sr+tr]][ve];for(var xe=Pl[gt(te,ve[0])];0<xe;)xe=Pl[2*xe+gt(te,ve[xe])];ve=-xe,Ce[sr+tr]=ve}n(hr,br,Ce,sr,4),br+=4,mr[0+de]=ve}}else ve=gt(te,156)?gt(te,128)?1:3:gt(te,163)?2:0,De.Ob[0]=ve,a(Ce,sr,ve,4),a(mr,0,ve,4);De.Dd=gt(te,142)?gt(te,114)?gt(te,183)?1:3:2:0}if(ze.m.Ka)return Ye(ce,7,"Premature end-of-partition0 encountered.");for(;ce.ja<ce.za;++ce.ja){if(ze=Ot,te=(Nt=ce).rb[Nt.sb-1],Ce=Nt.rb[Nt.sb+Nt.ja],ie=Nt.ya[Nt.aa+Nt.ja],sr=Nt.kc?ie.Ad:0)te.la=Ce.la=0,ie.Za||(te.Na=Ce.Na=0),ie.Hc=0,ie.Gc=0,ie.ia=0;else{var Re,Ae;if(te=Ce,Ce=ze,sr=Nt.Pa.Xc,mr=Nt.ya[Nt.aa+Nt.ja],De=Nt.pb[mr.$b],de=mr.ad,hr=0,br=Nt.rb[Nt.sb-1],ve=tr=0,a(de,hr,0,384),mr.Za)var lr=0,Kr=sr[3];else{xe=i(16);var He=te.Na+br.Na;if(He=_a(Ce,sr[1],He,De.Eb,0,xe,0),te.Na=br.Na=(0<He)+0,1<He)Yn(xe,0,de,hr);else{var yr=xe[0]+3>>3;for(xe=0;256>xe;xe+=16)de[hr+xe]=yr}lr=1,Kr=sr[0]}var Ne=15&te.la,er=15&br.la;for(xe=0;4>xe;++xe){var Sr=1&er;for(yr=Ae=0;4>yr;++yr)Ne=Ne>>1|(Sr=(He=_a(Ce,Kr,He=Sr+(1&Ne),De.Sc,lr,de,hr))>lr)<<7,Ae=Ae<<2|(3<He?3:1<He?2:de[hr+0]!=0),hr+=16;Ne>>=4,er=er>>1|Sr<<7,tr=(tr<<8|Ae)>>>0}for(Kr=Ne,lr=er>>4,Re=0;4>Re;Re+=2){for(Ae=0,Ne=te.la>>4+Re,er=br.la>>4+Re,xe=0;2>xe;++xe){for(Sr=1&er,yr=0;2>yr;++yr)He=Sr+(1&Ne),Ne=Ne>>1|(Sr=0<(He=_a(Ce,sr[2],He,De.Qc,0,de,hr)))<<3,Ae=Ae<<2|(3<He?3:1<He?2:de[hr+0]!=0),hr+=16;Ne>>=2,er=er>>1|Sr<<5}ve|=Ae<<4*Re,Kr|=Ne<<4<<Re,lr|=(240&er)<<Re}te.la=Kr,br.la=lr,mr.Hc=tr,mr.Gc=ve,mr.ia=43690&ve?0:De.ia,sr=!(tr|ve)}if(0<Nt.L&&(Nt.wa[Nt.Y+Nt.ja]=Nt.gd[ie.$b][ie.Za],Nt.wa[Nt.Y+Nt.ja].La|=!sr),ze.Ka)return Ye(ce,7,"Premature end-of-file encountered.")}if(Ha(ce),Nt=Qe,ze=1,ie=(Ot=ce).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,Tr(Ot,ie),ze=1,ie=(Ae=Ot.D).Nb,te=(ve=fo[Ot.L])*Ot.R,Ce=ve/2*Ot.B,xe=16*ie*Ot.R,yr=8*ie*Ot.B,sr=Ot.sa,mr=Ot.ta-te+xe,De=Ot.qa,de=Ot.ra-Ce+yr,hr=Ot.Ha,br=Ot.Ia-Ce+yr,er=(Ne=Ae.M)==0,tr=Ne>=Ot.Va-1,Ot.Aa==2&&Tr(Ot,Ae),Ae.uc)for(Sr=(He=Ot).D.M,t(He.D.uc),Ae=He.yb;Ae<He.Hb;++Ae){lr=Ae,Kr=Sr;var wr=(kr=(ur=He).D).Nb;Re=ur.R;var kr=kr.wa[kr.Y+lr],Pr=ur.sa,xr=ur.ta+16*wr*Re+16*lr,Cr=kr.dd,Pe=kr.tc;if(Pe!=0)if(t(3<=Pe),ur.L==1)0<lr&&pl(Pr,xr,Re,Pe+4),kr.La&&vl(Pr,xr,Re,Pe),0<Kr&&dl(Pr,xr,Re,Pe+4),kr.La&&gl(Pr,xr,Re,Pe);else{var Fr=ur.B,$r=ur.qa,xi=ur.ra+8*wr*Fr+8*lr,In=ur.Ha,ur=ur.Ia+8*wr*Fr+8*lr;wr=kr.ld,0<lr&&(Ze(Pr,xr,Re,Pe+4,Cr,wr),xa($r,xi,In,ur,Fr,Pe+4,Cr,wr)),kr.La&&(eo(Pr,xr,Re,Pe,Cr,wr),cl($r,xi,In,ur,Fr,Pe,Cr,wr)),0<Kr&&(Ue(Pr,xr,Re,Pe+4,Cr,wr),Cn($r,xi,In,ur,Fr,Pe+4,Cr,wr)),kr.La&&(qi(Pr,xr,Re,Pe,Cr,wr),hl($r,xi,In,ur,Fr,Pe,Cr,wr))}}if(Ot.ia&&alert("todo:DitherRow"),Nt.put!=null){if(Ae=16*Ne,Ne=16*(Ne+1),er?(Nt.y=Ot.sa,Nt.O=Ot.ta+xe,Nt.f=Ot.qa,Nt.N=Ot.ra+yr,Nt.ea=Ot.Ha,Nt.W=Ot.Ia+yr):(Ae-=ve,Nt.y=sr,Nt.O=mr,Nt.f=De,Nt.N=de,Nt.ea=hr,Nt.W=br),tr||(Ne-=ve),Ne>Nt.o&&(Ne=Nt.o),Nt.F=null,Nt.J=null,Ot.Fa!=null&&0<Ot.Fa.length&&Ae<Ne&&(Nt.J=ke(Ot,Nt,Ae,Ne-Ae),Nt.F=Ot.mb,Nt.F==null&&Nt.F.length==0)){ze=Ye(Ot,3,"Could not decode alpha data.");break e}Ae<Nt.j&&(ve=Nt.j-Ae,Ae=Nt.j,t(!(1&ve)),Nt.O+=Ot.R*ve,Nt.N+=Ot.B*(ve>>1),Nt.W+=Ot.B*(ve>>1),Nt.F!=null&&(Nt.J+=Nt.width*ve)),Ae<Ne&&(Nt.O+=Nt.v,Nt.N+=Nt.v>>1,Nt.W+=Nt.v>>1,Nt.F!=null&&(Nt.J+=Nt.v),Nt.ka=Ae-Nt.j,Nt.U=Nt.va-Nt.v,Nt.T=Ne-Ae,ze=Nt.put(Nt))}ie+1!=Ot.Ic||tr||(n(Ot.sa,Ot.ta-te,sr,mr+16*Ot.R,te),n(Ot.qa,Ot.ra-Ce,De,de+8*Ot.B,Ce),n(Ot.Ha,Ot.Ia-Ce,hr,br+8*Ot.B,Ce))}if(!ze)return Ye(ce,6,"Output aborted.")}return 1})(E,Y)),Y.bc!=null&&Y.bc(Y),X&=1}return X?(E.cb=0,X):0})(o,v)||(s=o.a)}}else s=o.a}s==0&&A.Oa!=null&&A.Oa.fd&&(s=ga(A.ba))}A=s}y=A!=0?null:11>y?N.f.RGBA.eb:N.f.kb.y}else y=null;return y};var Dl=[3,4,3,4,4,2,2,4,4,4,2,1,1]};function h(R,tt){for(var L="",O=0;O<4;O++)L+=String.fromCharCode(R[tt++]);return L}function p(R,tt){return R[tt+0]|R[tt+1]<<8}function w(R,tt){return(R[tt+0]|R[tt+1]<<8|R[tt+2]<<16)>>>0}function x(R,tt){return(R[tt+0]|R[tt+1]<<8|R[tt+2]<<16|R[tt+3]<<24)>>>0}new u;var g=[0],P=[0],C=[],B=new u,S=r,G=(function(R,tt){var L={},O=0,z=!1,U=0,nt=0;if(L.frames=[],!(function(_,D){for(var T=0;T<4;T++)if(_[D+T]!="RIFF".charCodeAt(T))return!0;return!1})(R,tt)){for(x(R,tt+=4),tt+=8;tt<R.length;){var st=h(R,tt),ut=x(R,tt+=4);tt+=4;var rt=ut+(1&ut);switch(st){case"VP8 ":case"VP8L":L.frames[O]===void 0&&(L.frames[O]={}),(wt=L.frames[O]).src_off=z?nt:tt-8,wt.src_size=U+ut+8,O++,z&&(z=!1,U=0,nt=0);break;case"VP8X":(wt=L.header={}).feature_flags=R[tt];var ht=tt+4;wt.canvas_width=1+w(R,ht),ht+=3,wt.canvas_height=1+w(R,ht),ht+=3;break;case"ALPH":z=!0,U=rt+8,nt=tt-8;break;case"ANIM":(wt=L.header).bgcolor=x(R,tt),ht=tt+4,wt.loop_count=p(R,ht),ht+=2;break;case"ANMF":var _t,wt;(wt=L.frames[O]={}).offset_x=2*w(R,tt),tt+=3,wt.offset_y=2*w(R,tt),tt+=3,wt.width=1+w(R,tt),tt+=3,wt.height=1+w(R,tt),tt+=3,wt.duration=w(R,tt),tt+=3,_t=R[tt++],wt.dispose=1&_t,wt.blend=_t>>1&1}st!="ANMF"&&(tt+=rt)}return L}})(S,0);G.response=S,G.rgbaoutput=!0,G.dataurl=!1;var V=G.header?G.header:null,M=G.frames?G.frames:null;if(V){V.loop_counter=V.loop_count,g=[V.canvas_height],P=[V.canvas_width];for(var it=0;it<M.length&&M[it].blend!=0;it++);}var vt=M[0],ct=B.WebPDecodeRGBA(S,vt.src_off,vt.src_size,P,g);vt.rgba=ct,vt.imgwidth=P[0],vt.imgheight=g[0];for(var K=0;K<P[0]*g[0]*4;K++)C[K]=ct[K];return this.width=P,this.height=g,this.data=C,this}(function(r){var t,e,n,a,i,f,l,u,h,p=function(_){return _=_||{},this.isStrokeTransparent=_.isStrokeTransparent||!1,this.strokeOpacity=_.strokeOpacity||1,this.strokeStyle=_.strokeStyle||"#000000",this.fillStyle=_.fillStyle||"#000000",this.isFillTransparent=_.isFillTransparent||!1,this.fillOpacity=_.fillOpacity||1,this.font=_.font||"10px sans-serif",this.textBaseline=_.textBaseline||"alphabetic",this.textAlign=_.textAlign||"left",this.lineWidth=_.lineWidth||1,this.lineJoin=_.lineJoin||"miter",this.lineCap=_.lineCap||"butt",this.path=_.path||[],this.transform=_.transform!==void 0?_.transform.clone():new u,this.globalCompositeOperation=_.globalCompositeOperation||"normal",this.globalAlpha=_.globalAlpha||1,this.clip_path=_.clip_path||[],this.currentPoint=_.currentPoint||new f,this.miterLimit=_.miterLimit||10,this.lastPoint=_.lastPoint||new f,this.lineDashOffset=_.lineDashOffset||0,this.lineDash=_.lineDash||[],this.margin=_.margin||[0,0,0,0],this.prevPageLastElemOffset=_.prevPageLastElemOffset||0,this.ignoreClearRect=typeof _.ignoreClearRect!="boolean"||_.ignoreClearRect,this};r.events.push(["initialized",function(){this.context2d=new w(this),t=this.internal.f2,e=this.internal.getCoordinateString,n=this.internal.getVerticalCoordinateString,a=this.internal.getHorizontalCoordinate,i=this.internal.getVerticalCoordinate,f=this.internal.Point,l=this.internal.Rectangle,u=this.internal.Matrix,h=new p}]);var w=function(_){Object.defineProperty(this,"canvas",{get:function(){return{parentNode:!1,style:!1}}});var D=_;Object.defineProperty(this,"pdf",{get:function(){return D}});var T=!1;Object.defineProperty(this,"pageWrapXEnabled",{get:function(){return T},set:function(F){T=!!F}});var H=!1;Object.defineProperty(this,"pageWrapYEnabled",{get:function(){return H},set:function(F){H=!!F}});var J=0;Object.defineProperty(this,"posX",{get:function(){return J},set:function(F){isNaN(F)||(J=F)}});var Z=0;Object.defineProperty(this,"posY",{get:function(){return Z},set:function(F){isNaN(F)||(Z=F)}}),Object.defineProperty(this,"margin",{get:function(){return h.margin},set:function(F){var Lt;typeof F=="number"?Lt=[F,F,F,F]:((Lt=new Array(4))[0]=F[0],Lt[1]=F.length>=2?F[1]:Lt[0],Lt[2]=F.length>=3?F[2]:Lt[0],Lt[3]=F.length>=4?F[3]:Lt[1]),h.margin=Lt}});var at=!1;Object.defineProperty(this,"autoPaging",{get:function(){return at},set:function(F){at=F}});var ot=0;Object.defineProperty(this,"lastBreak",{get:function(){return ot},set:function(F){ot=F}});var gt=[];Object.defineProperty(this,"pageBreaks",{get:function(){return gt},set:function(F){gt=F}}),Object.defineProperty(this,"ctx",{get:function(){return h},set:function(F){F instanceof p&&(h=F)}}),Object.defineProperty(this,"path",{get:function(){return h.path},set:function(F){h.path=F}});var At=[];Object.defineProperty(this,"ctxStack",{get:function(){return At},set:function(F){At=F}}),Object.defineProperty(this,"fillStyle",{get:function(){return this.ctx.fillStyle},set:function(F){var Lt;Lt=x(F),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(F){var Lt=x(F);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(F){["butt","round","square"].indexOf(F)!==-1&&(this.ctx.lineCap=F,this.pdf.setLineCap(F))}}),Object.defineProperty(this,"lineWidth",{get:function(){return this.ctx.lineWidth},set:function(F){isNaN(F)||(this.ctx.lineWidth=F,this.pdf.setLineWidth(F))}}),Object.defineProperty(this,"lineJoin",{get:function(){return this.ctx.lineJoin},set:function(F){["bevel","round","miter"].indexOf(F)!==-1&&(this.ctx.lineJoin=F,this.pdf.setLineJoin(F))}}),Object.defineProperty(this,"miterLimit",{get:function(){return this.ctx.miterLimit},set:function(F){isNaN(F)||(this.ctx.miterLimit=F,this.pdf.setMiterLimit(F))}}),Object.defineProperty(this,"textBaseline",{get:function(){return this.ctx.textBaseline},set:function(F){this.ctx.textBaseline=F}}),Object.defineProperty(this,"textAlign",{get:function(){return this.ctx.textAlign},set:function(F){["right","end","center","left","start"].indexOf(F)!==-1&&(this.ctx.textAlign=F)}});var kt=null,St=null,Mt=null;Object.defineProperty(this,"fontFaces",{get:function(){return Mt},set:function(F){kt=null,St=null,Mt=F}}),Object.defineProperty(this,"font",{get:function(){return this.ctx.font},set:function(F){var Lt;if(this.ctx.font=F,(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(F))!==null){var ae=Lt[1];Lt[2];var Ht=Lt[3],yt=Lt[4];Lt[5];var Wt=Lt[6],Ct=/^([.\d]+)((?:%|in|[cem]m|ex|p[ctx]))$/i.exec(yt)[2];yt=Math.floor(Ct==="px"?parseFloat(yt)*this.pdf.internal.scaleFactor:Ct==="em"?parseFloat(yt)*this.pdf.getFontSize():parseFloat(yt)*this.pdf.internal.scaleFactor),this.pdf.setFontSize(yt);var zt=(function(Tt){var Me,pe,oe=[],se=Tt.trim();if(se==="")return Ms;if(se in Gu)return[Gu[se]];for(;se!=="";){switch(pe=null,Me=(se=Yu(se)).charAt(0)){case'"':case"'":pe=S2(se.substring(1),Me);break;default:pe=k2(se)}if(pe===null||(oe.push(pe[0]),(se=Yu(pe[1]))!==""&&se.charAt(0)!==","))return Ms;se=se.replace(/^,/,"")}return oe})(Wt);if(this.fontFaces){var qt=(function(Tt,Me){var pe=Tt.getFontList(),oe=JSON.stringify(pe);if(kt===null||St!==oe){var se=(function(Ie){var Ut=[];return Object.keys(Ie).forEach(function(Se){Ie[Se].forEach(function(Yt){var Qt=null;switch(Yt){case"bold":Qt={family:Se,weight:"bold"};break;case"italic":Qt={family:Se,style:"italic"};break;case"bolditalic":Qt={family:Se,weight:"bold",style:"italic"};break;case"":case"normal":Qt={family:Se}}Qt!==null&&(Qt.ref={name:Se,style:Yt},Ut.push(Qt))})}),Ut})(pe);kt=(function(Ie){for(var Ut={},Se=0;Se<Ie.length;++Se){var Yt=Ts(Ie[Se]),Qt=Yt.family,Ee=Yt.stretch,le=Yt.style,Gt=Yt.weight;Ut[Qt]=Ut[Qt]||{},Ut[Qt][Ee]=Ut[Qt][Ee]||{},Ut[Qt][Ee][le]=Ut[Qt][Ee][le]||{},Ut[Qt][Ee][le][Gt]=Yt}return Ut})(se.concat(Me)),St=oe}return kt})(this.pdf,this.fontFaces),me=zt.map(function(Tt){return{family:Tt,stretch:"normal",weight:Ht,style:ae}}),ue=(function(Tt,Me,pe){for(var oe=(pe=pe||{}).defaultFontFamily||"times",se=Object.assign({},L2,pe.genericFontFamilies||{}),Ie=null,Ut=null,Se=0;Se<Me.length;++Se)if(se[(Ie=Ts(Me[Se])).family]&&(Ie.family=se[Ie.family]),Tt.hasOwnProperty(Ie.family)){Ut=Tt[Ie.family];break}if(!(Ut=Ut||Tt[oe]))throw new Error("Could not find a font-family for the rule '"+Vu(Ie)+"' and default family '"+oe+"'.");if(Ut=(function(Yt,Qt){if(Qt[Yt])return Qt[Yt];var Ee=rl[Yt],le=Ee<=rl.normal?-1:1,Gt=Wu(Qt,rh,Ee,le);if(!Gt)throw new Error("Could not find a matching font-stretch value for "+Yt);return Gt})(Ie.stretch,Ut),Ut=(function(Yt,Qt){if(Qt[Yt])return Qt[Yt];for(var Ee=eh[Yt],le=0;le<Ee.length;++le)if(Qt[Ee[le]])return Qt[Ee[le]];throw new Error("Could not find a matching font-style for "+Yt)})(Ie.style,Ut),!(Ut=(function(Yt,Qt){if(Qt[Yt])return Qt[Yt];if(Yt===400&&Qt[500])return Qt[500];if(Yt===500&&Qt[400])return Qt[400];var Ee=N2[Yt],le=Wu(Qt,nh,Ee,Yt<400?-1:1);if(!le)throw new Error("Could not find a matching font-weight for value "+Yt);return le})(Ie.weight,Ut)))throw new Error("Failed to resolve a font for the rule '"+Vu(Ie)+"'.");return Ut})(qt,me);this.pdf.setFont(ue.ref.name,ue.ref.style)}else{var Zt="";(Ht==="bold"||parseInt(Ht,10)>=700||ae==="bold")&&(Zt="bold"),ae==="italic"&&(Zt+="italic"),Zt.length===0&&(Zt="normal");for(var he="",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"},jt=0;jt<zt.length;jt++){if(this.pdf.internal.getFont(zt[jt],Zt,{noFallback:!0,disableWarning:!0})!==void 0){he=zt[jt];break}if(Zt==="bolditalic"&&this.pdf.internal.getFont(zt[jt],"bold",{noFallback:!0,disableWarning:!0})!==void 0)he=zt[jt],Zt="bold";else if(this.pdf.internal.getFont(zt[jt],"normal",{noFallback:!0,disableWarning:!0})!==void 0){he=zt[jt],Zt="normal";break}}if(he===""){for(var ee=0;ee<zt.length;ee++)if(fe[zt[ee]]){he=fe[zt[ee]];break}}he=he===""?"Times":he,this.pdf.setFont(he,Zt)}}}}),Object.defineProperty(this,"globalCompositeOperation",{get:function(){return this.ctx.globalCompositeOperation},set:function(F){this.ctx.globalCompositeOperation=F}}),Object.defineProperty(this,"globalAlpha",{get:function(){return this.ctx.globalAlpha},set:function(F){this.ctx.globalAlpha=F}}),Object.defineProperty(this,"lineDashOffset",{get:function(){return this.ctx.lineDashOffset},set:function(F){this.ctx.lineDashOffset=F,wt.call(this)}}),Object.defineProperty(this,"lineDash",{get:function(){return this.ctx.lineDash},set:function(F){this.ctx.lineDash=F,wt.call(this)}}),Object.defineProperty(this,"ignoreClearRect",{get:function(){return this.ctx.ignoreClearRect},set:function(F){this.ctx.ignoreClearRect=!!F}})};w.prototype.setLineDash=function(_){this.lineDash=_},w.prototype.getLineDash=function(){return this.lineDash.length%2?this.lineDash.concat(this.lineDash):this.lineDash.slice()},w.prototype.fill=function(){M.call(this,"fill",!1)},w.prototype.stroke=function(){M.call(this,"stroke",!1)},w.prototype.beginPath=function(){this.path=[{type:"begin"}]},w.prototype.moveTo=function(_,D){if(isNaN(_)||isNaN(D))throw Le.error("jsPDF.context2d.moveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.moveTo");var T=this.ctx.transform.applyToPoint(new f(_,D));this.path.push({type:"mt",x:T.x,y:T.y}),this.ctx.lastPoint=new f(_,D)},w.prototype.closePath=function(){var _=new f(0,0),D=0;for(D=this.path.length-1;D!==-1;D--)if(this.path[D].type==="begin"&&ye(this.path[D+1])==="object"&&typeof this.path[D+1].x=="number"){_=new f(this.path[D+1].x,this.path[D+1].y);break}this.path.push({type:"close"}),this.ctx.lastPoint=new f(_.x,_.y)},w.prototype.lineTo=function(_,D){if(isNaN(_)||isNaN(D))throw Le.error("jsPDF.context2d.lineTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.lineTo");var T=this.ctx.transform.applyToPoint(new f(_,D));this.path.push({type:"lt",x:T.x,y:T.y}),this.ctx.lastPoint=new f(T.x,T.y)},w.prototype.clip=function(){this.ctx.clip_path=JSON.parse(JSON.stringify(this.path)),M.call(this,null,!0)},w.prototype.quadraticCurveTo=function(_,D,T,H){if(isNaN(T)||isNaN(H)||isNaN(_)||isNaN(D))throw Le.error("jsPDF.context2d.quadraticCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.quadraticCurveTo");var J=this.ctx.transform.applyToPoint(new f(T,H)),Z=this.ctx.transform.applyToPoint(new f(_,D));this.path.push({type:"qct",x1:Z.x,y1:Z.y,x:J.x,y:J.y}),this.ctx.lastPoint=new f(J.x,J.y)},w.prototype.bezierCurveTo=function(_,D,T,H,J,Z){if(isNaN(J)||isNaN(Z)||isNaN(_)||isNaN(D)||isNaN(T)||isNaN(H))throw Le.error("jsPDF.context2d.bezierCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.bezierCurveTo");var at=this.ctx.transform.applyToPoint(new f(J,Z)),ot=this.ctx.transform.applyToPoint(new f(_,D)),gt=this.ctx.transform.applyToPoint(new f(T,H));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 f(at.x,at.y)},w.prototype.arc=function(_,D,T,H,J,Z){if(isNaN(_)||isNaN(D)||isNaN(T)||isNaN(H)||isNaN(J))throw Le.error("jsPDF.context2d.arc: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.arc");if(Z=!!Z,!this.ctx.transform.isIdentity){var at=this.ctx.transform.applyToPoint(new f(_,D));_=at.x,D=at.y;var ot=this.ctx.transform.applyToPoint(new f(0,T)),gt=this.ctx.transform.applyToPoint(new f(0,0));T=Math.sqrt(Math.pow(ot.x-gt.x,2)+Math.pow(ot.y-gt.y,2))}Math.abs(J-H)>=2*Math.PI&&(H=0,J=2*Math.PI),this.path.push({type:"arc",x:_,y:D,radius:T,startAngle:H,endAngle:J,counterclockwise:Z})},w.prototype.arcTo=function(_,D,T,H,J){throw new Error("arcTo not implemented.")},w.prototype.rect=function(_,D,T,H){if(isNaN(_)||isNaN(D)||isNaN(T)||isNaN(H))throw Le.error("jsPDF.context2d.rect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rect");this.moveTo(_,D),this.lineTo(_+T,D),this.lineTo(_+T,D+H),this.lineTo(_,D+H),this.lineTo(_,D),this.lineTo(_+T,D),this.lineTo(_,D)},w.prototype.fillRect=function(_,D,T,H){if(isNaN(_)||isNaN(D)||isNaN(T)||isNaN(H))throw Le.error("jsPDF.context2d.fillRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillRect");if(!g.call(this)){var J={};this.lineCap!=="butt"&&(J.lineCap=this.lineCap,this.lineCap="butt"),this.lineJoin!=="miter"&&(J.lineJoin=this.lineJoin,this.lineJoin="miter"),this.beginPath(),this.rect(_,D,T,H),this.fill(),J.hasOwnProperty("lineCap")&&(this.lineCap=J.lineCap),J.hasOwnProperty("lineJoin")&&(this.lineJoin=J.lineJoin)}},w.prototype.strokeRect=function(_,D,T,H){if(isNaN(_)||isNaN(D)||isNaN(T)||isNaN(H))throw Le.error("jsPDF.context2d.strokeRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeRect");P.call(this)||(this.beginPath(),this.rect(_,D,T,H),this.stroke())},w.prototype.clearRect=function(_,D,T,H){if(isNaN(_)||isNaN(D)||isNaN(T)||isNaN(H))throw Le.error("jsPDF.context2d.clearRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.clearRect");this.ignoreClearRect||(this.fillStyle="#ffffff",this.fillRect(_,D,T,H))},w.prototype.save=function(_){_=typeof _!="boolean"||_;for(var D=this.pdf.internal.getCurrentPageInfo().pageNumber,T=0;T<this.pdf.internal.getNumberOfPages();T++)this.pdf.setPage(T+1),this.pdf.internal.out("q");if(this.pdf.setPage(D),_){this.ctx.fontSize=this.pdf.internal.getFontSize();var H=new p(this.ctx);this.ctxStack.push(this.ctx),this.ctx=H}},w.prototype.restore=function(_){_=typeof _!="boolean"||_;for(var D=this.pdf.internal.getCurrentPageInfo().pageNumber,T=0;T<this.pdf.internal.getNumberOfPages();T++)this.pdf.setPage(T+1),this.pdf.internal.out("Q");this.pdf.setPage(D),_&&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)},w.prototype.toDataURL=function(){throw new Error("toDataUrl not implemented.")};var x=function(_){var D,T,H,J;if(_.isCanvasGradient===!0&&(_=_.getColor()),!_)return{r:0,g:0,b:0,a:0,style:_};if(/transparent|rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*0+\s*\)/.test(_))D=0,T=0,H=0,J=0;else{var Z=/rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/.exec(_);if(Z!==null)D=parseInt(Z[1]),T=parseInt(Z[2]),H=parseInt(Z[3]),J=1;else if((Z=/rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)/.exec(_))!==null)D=parseInt(Z[1]),T=parseInt(Z[2]),H=parseInt(Z[3]),J=parseFloat(Z[4]);else{if(J=1,typeof _=="string"&&_.charAt(0)!=="#"){var at=new Jf(_);_=at.ok?at.toHex():"#000000"}_.length===4?(D=_.substring(1,2),D+=D,T=_.substring(2,3),T+=T,H=_.substring(3,4),H+=H):(D=_.substring(1,3),T=_.substring(3,5),H=_.substring(5,7)),D=parseInt(D,16),T=parseInt(T,16),H=parseInt(H,16)}}return{r:D,g:T,b:H,a:J,style:_}},g=function(){return this.ctx.isFillTransparent||this.globalAlpha==0},P=function(){return!!(this.ctx.isStrokeTransparent||this.globalAlpha==0)};w.prototype.fillText=function(_,D,T,H){if(isNaN(D)||isNaN(T)||typeof _!="string")throw Le.error("jsPDF.context2d.fillText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillText");if(H=isNaN(H)?void 0:H,!g.call(this)){var J=rt(this.ctx.transform.rotation),Z=this.ctx.transform.scaleX;O.call(this,{text:_,x:D,y:T,scale:Z,angle:J,align:this.textAlign,maxWidth:H})}},w.prototype.strokeText=function(_,D,T,H){if(isNaN(D)||isNaN(T)||typeof _!="string")throw Le.error("jsPDF.context2d.strokeText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeText");if(!P.call(this)){H=isNaN(H)?void 0:H;var J=rt(this.ctx.transform.rotation),Z=this.ctx.transform.scaleX;O.call(this,{text:_,x:D,y:T,scale:Z,renderingMode:"stroke",angle:J,align:this.textAlign,maxWidth:H})}},w.prototype.measureText=function(_){if(typeof _!="string")throw Le.error("jsPDF.context2d.measureText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.measureText");var D=this.pdf,T=this.pdf.internal.scaleFactor,H=D.internal.getFontSize(),J=D.getStringUnitWidth(_)*H/D.internal.scaleFactor;return new function(Z){var at=(Z=Z||{}).width||0;return Object.defineProperty(this,"width",{get:function(){return at}}),this}({width:J*=Math.round(96*T/72*1e4)/1e4})},w.prototype.scale=function(_,D){if(isNaN(_)||isNaN(D))throw Le.error("jsPDF.context2d.scale: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.scale");var T=new u(_,0,0,D,0,0);this.ctx.transform=this.ctx.transform.multiply(T)},w.prototype.rotate=function(_){if(isNaN(_))throw Le.error("jsPDF.context2d.rotate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rotate");var D=new u(Math.cos(_),Math.sin(_),-Math.sin(_),Math.cos(_),0,0);this.ctx.transform=this.ctx.transform.multiply(D)},w.prototype.translate=function(_,D){if(isNaN(_)||isNaN(D))throw Le.error("jsPDF.context2d.translate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.translate");var T=new u(1,0,0,1,_,D);this.ctx.transform=this.ctx.transform.multiply(T)},w.prototype.transform=function(_,D,T,H,J,Z){if(isNaN(_)||isNaN(D)||isNaN(T)||isNaN(H)||isNaN(J)||isNaN(Z))throw Le.error("jsPDF.context2d.transform: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.transform");var at=new u(_,D,T,H,J,Z);this.ctx.transform=this.ctx.transform.multiply(at)},w.prototype.setTransform=function(_,D,T,H,J,Z){_=isNaN(_)?1:_,D=isNaN(D)?0:D,T=isNaN(T)?0:T,H=isNaN(H)?1:H,J=isNaN(J)?0:J,Z=isNaN(Z)?0:Z,this.ctx.transform=new u(_,D,T,H,J,Z)};var C=function(){return this.margin[0]>0||this.margin[1]>0||this.margin[2]>0||this.margin[3]>0};w.prototype.drawImage=function(_,D,T,H,J,Z,at,ot,gt){var At=this.pdf.getImageProperties(_),kt=1,St=1,Mt=1,F=1;H!==void 0&&ot!==void 0&&(Mt=ot/H,F=gt/J,kt=At.width/H*ot/H,St=At.height/J*gt/J),Z===void 0&&(Z=D,at=T,D=0,T=0),H!==void 0&&ot===void 0&&(ot=H,gt=J),H===void 0&&ot===void 0&&(ot=At.width,gt=At.height);var Lt=this.ctx.transform.decompose(),ae=rt(Lt.rotate.shx),Ht=new u,yt=(Ht=(Ht=(Ht=Ht.multiply(Lt.translate)).multiply(Lt.skew)).multiply(Lt.scale)).applyToRectangle(new l(Z-D*Mt,at-T*F,H*kt,J*St));if(this.autoPaging){for(var Wt,Ct=B.call(this,yt),zt=[],qt=0;qt<Ct.length;qt+=1)zt.indexOf(Ct[qt])===-1&&zt.push(Ct[qt]);V(zt);for(var me=zt[0],ue=zt[zt.length-1],Zt=me;Zt<ue+1;Zt++){this.pdf.setPage(Zt);var he=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],fe=Zt===1?this.posY+this.margin[0]:this.margin[0],jt=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],ee=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],Tt=Zt===1?0:jt+(Zt-2)*ee;if(this.ctx.clip_path.length!==0){var Me=this.path;Wt=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=G(Wt,this.posX+this.margin[3],-Tt+fe+this.ctx.prevPageLastElemOffset),it.call(this,"fill",!0),this.path=Me}var pe=JSON.parse(JSON.stringify(yt));pe=G([pe],this.posX+this.margin[3],-Tt+fe+this.ctx.prevPageLastElemOffset)[0];var oe=(Zt>me||Zt<ue)&&C.call(this);oe&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],he,ee,null).clip().discardPath()),this.pdf.addImage(_,"JPEG",pe.x,pe.y,pe.w,pe.h,null,null,ae),oe&&this.pdf.restoreGraphicsState()}}else this.pdf.addImage(_,"JPEG",yt.x,yt.y,yt.w,yt.h,null,null,ae)};var B=function(_,D,T){var H=[];D=D||this.pdf.internal.pageSize.width,T=T||this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2];var J=this.posY+this.ctx.prevPageLastElemOffset;switch(_.type){default:case"mt":case"lt":H.push(Math.floor((_.y+J)/T)+1);break;case"arc":H.push(Math.floor((_.y+J-_.radius)/T)+1),H.push(Math.floor((_.y+J+_.radius)/T)+1);break;case"qct":var Z=ht(this.ctx.lastPoint.x,this.ctx.lastPoint.y,_.x1,_.y1,_.x,_.y);H.push(Math.floor((Z.y+J)/T)+1),H.push(Math.floor((Z.y+Z.h+J)/T)+1);break;case"bct":var at=_t(this.ctx.lastPoint.x,this.ctx.lastPoint.y,_.x1,_.y1,_.x2,_.y2,_.x,_.y);H.push(Math.floor((at.y+J)/T)+1),H.push(Math.floor((at.y+at.h+J)/T)+1);break;case"rect":H.push(Math.floor((_.y+J)/T)+1),H.push(Math.floor((_.y+_.h+J)/T)+1)}for(var ot=0;ot<H.length;ot+=1)for(;this.pdf.internal.getNumberOfPages()<H[ot];)S.call(this);return H},S=function(){var _=this.fillStyle,D=this.strokeStyle,T=this.font,H=this.lineCap,J=this.lineWidth,Z=this.lineJoin;this.pdf.addPage(),this.fillStyle=_,this.strokeStyle=D,this.font=T,this.lineCap=H,this.lineWidth=J,this.lineJoin=Z},G=function(_,D,T){for(var H=0;H<_.length;H++)switch(_[H].type){case"bct":_[H].x2+=D,_[H].y2+=T;case"qct":_[H].x1+=D,_[H].y1+=T;default:_[H].x+=D,_[H].y+=T}return _},V=function(_){return _.sort(function(D,T){return D-T})},M=function(_,D){var T=this.fillStyle,H=this.strokeStyle,J=this.lineCap,Z=this.lineWidth,at=Math.abs(Z*this.ctx.transform.scaleX),ot=this.lineJoin;if(this.autoPaging){for(var gt,At,kt=JSON.parse(JSON.stringify(this.path)),St=JSON.parse(JSON.stringify(this.path)),Mt=[],F=0;F<St.length;F++)if(St[F].x!==void 0)for(var Lt=B.call(this,St[F]),ae=0;ae<Lt.length;ae+=1)Mt.indexOf(Lt[ae])===-1&&Mt.push(Lt[ae]);for(var Ht=0;Ht<Mt.length;Ht++)for(;this.pdf.internal.getNumberOfPages()<Mt[Ht];)S.call(this);V(Mt);for(var yt=Mt[0],Wt=Mt[Mt.length-1],Ct=yt;Ct<Wt+1;Ct++){this.pdf.setPage(Ct),this.fillStyle=T,this.strokeStyle=H,this.lineCap=J,this.lineWidth=at,this.lineJoin=ot;var zt=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],qt=Ct===1?this.posY+this.margin[0]:this.margin[0],me=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],ue=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],Zt=Ct===1?0:me+(Ct-2)*ue;if(this.ctx.clip_path.length!==0){var he=this.path;gt=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=G(gt,this.posX+this.margin[3],-Zt+qt+this.ctx.prevPageLastElemOffset),it.call(this,_,!0),this.path=he}if(At=JSON.parse(JSON.stringify(kt)),this.path=G(At,this.posX+this.margin[3],-Zt+qt+this.ctx.prevPageLastElemOffset),D===!1||Ct===0){var fe=(Ct>yt||Ct<Wt)&&C.call(this);fe&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],zt,ue,null).clip().discardPath()),it.call(this,_,D),fe&&this.pdf.restoreGraphicsState()}this.lineWidth=Z}this.path=kt}else this.lineWidth=at,it.call(this,_,D),this.lineWidth=Z},it=function(_,D){if((_!=="stroke"||D||!P.call(this))&&(_==="stroke"||D||!g.call(this))){for(var T,H,J=[],Z=this.path,at=0;at<Z.length;at++){var ot=Z[at];switch(ot.type){case"begin":J.push({begin:!0});break;case"close":J.push({close:!0});break;case"mt":J.push({start:ot,deltas:[],abs:[]});break;case"lt":var gt=J.length;if(Z[at-1]&&!isNaN(Z[at-1].x)&&(T=[ot.x-Z[at-1].x,ot.y-Z[at-1].y],gt>0)){for(;gt>=0;gt--)if(J[gt-1].close!==!0&&J[gt-1].begin!==!0){J[gt-1].deltas.push(T),J[gt-1].abs.push(ot);break}}break;case"bct":T=[ot.x1-Z[at-1].x,ot.y1-Z[at-1].y,ot.x2-Z[at-1].x,ot.y2-Z[at-1].y,ot.x-Z[at-1].x,ot.y-Z[at-1].y],J[J.length-1].deltas.push(T);break;case"qct":var At=Z[at-1].x+2/3*(ot.x1-Z[at-1].x),kt=Z[at-1].y+2/3*(ot.y1-Z[at-1].y),St=ot.x+2/3*(ot.x1-ot.x),Mt=ot.y+2/3*(ot.y1-ot.y),F=ot.x,Lt=ot.y;T=[At-Z[at-1].x,kt-Z[at-1].y,St-Z[at-1].x,Mt-Z[at-1].y,F-Z[at-1].x,Lt-Z[at-1].y],J[J.length-1].deltas.push(T);break;case"arc":J.push({deltas:[],abs:[],arc:!0}),Array.isArray(J[J.length-1].abs)&&J[J.length-1].abs.push(ot)}}H=D?null:_==="stroke"?"stroke":"fill";for(var ae=!1,Ht=0;Ht<J.length;Ht++)if(J[Ht].arc)for(var yt=J[Ht].abs,Wt=0;Wt<yt.length;Wt++){var Ct=yt[Wt];Ct.type==="arc"?K.call(this,Ct.x,Ct.y,Ct.radius,Ct.startAngle,Ct.endAngle,Ct.counterclockwise,void 0,D,!ae):z.call(this,Ct.x,Ct.y),ae=!0}else if(J[Ht].close===!0)this.pdf.internal.out("h"),ae=!1;else if(J[Ht].begin!==!0){var zt=J[Ht].start.x,qt=J[Ht].start.y;U.call(this,J[Ht].deltas,zt,qt),ae=!0}H&&R.call(this,H),D&&tt.call(this)}},vt=function(_){var D=this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor,T=D*(this.pdf.internal.getLineHeightFactor()-1);switch(this.ctx.textBaseline){case"bottom":return _-T;case"top":return _+D-T;case"hanging":return _+D-2*T;case"middle":return _+D/2-T;default:return _}},ct=function(_){return _+this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor*(this.pdf.internal.getLineHeightFactor()-1)};w.prototype.createLinearGradient=function(){var _=function(){};return _.colorStops=[],_.addColorStop=function(D,T){this.colorStops.push([D,T])},_.getColor=function(){return this.colorStops.length===0?"#000000":this.colorStops[0][1]},_.isCanvasGradient=!0,_},w.prototype.createPattern=function(){return this.createLinearGradient()},w.prototype.createRadialGradient=function(){return this.createLinearGradient()};var K=function(_,D,T,H,J,Z,at,ot,gt){for(var At=st.call(this,T,H,J,Z),kt=0;kt<At.length;kt++){var St=At[kt];kt===0&&(gt?L.call(this,St.x1+_,St.y1+D):z.call(this,St.x1+_,St.y1+D)),nt.call(this,_,D,St.x2,St.y2,St.x3,St.y3,St.x4,St.y4)}ot?tt.call(this):R.call(this,at)},R=function(_){switch(_){case"stroke":this.pdf.internal.out("S");break;case"fill":this.pdf.internal.out("f")}},tt=function(){this.pdf.clip(),this.pdf.discardPath()},L=function(_,D){this.pdf.internal.out(e(_)+" "+n(D)+" m")},O=function(_){var D;switch(_.align){case"right":case"end":D="right";break;case"center":D="center";break;default:D="left"}var T,H,J,Z=this.pdf.getTextDimensions(_.text),at=vt.call(this,_.y),ot=ct.call(this,at)-Z.h,gt=this.ctx.transform.applyToPoint(new f(_.x,at));if(this.autoPaging){var At=this.ctx.transform.decompose(),kt=new u;kt=(kt=(kt=kt.multiply(At.translate)).multiply(At.skew)).multiply(At.scale);for(var St=this.ctx.transform.applyToRectangle(new l(_.x,at,Z.w,Z.h)),Mt=kt.applyToRectangle(new l(_.x,ot,Z.w,Z.h)),F=B.call(this,Mt),Lt=[],ae=0;ae<F.length;ae+=1)Lt.indexOf(F[ae])===-1&&Lt.push(F[ae]);V(Lt);for(var Ht=Lt[0],yt=Lt[Lt.length-1],Wt=Ht;Wt<yt+1;Wt++){this.pdf.setPage(Wt);var Ct=Wt===1?this.posY+this.margin[0]:this.margin[0],zt=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],qt=this.pdf.internal.pageSize.height-this.margin[2],me=qt-this.margin[0],ue=this.pdf.internal.pageSize.width-this.margin[1],Zt=ue-this.margin[3],he=Wt===1?0:zt+(Wt-2)*me;if(this.ctx.clip_path.length!==0){var fe=this.path;T=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=G(T,this.posX+this.margin[3],-1*he+Ct),it.call(this,"fill",!0),this.path=fe}var jt=G([JSON.parse(JSON.stringify(Mt))],this.posX+this.margin[3],-he+Ct+this.ctx.prevPageLastElemOffset)[0];_.scale>=.01&&(H=this.pdf.internal.getFontSize(),this.pdf.setFontSize(H*_.scale),J=this.lineWidth,this.lineWidth=J*_.scale);var ee=this.autoPaging!=="text";if(ee||jt.y+jt.h<=qt){if(ee||jt.y>=Ct&&jt.x<=ue){var Tt=ee?_.text:this.pdf.splitTextToSize(_.text,_.maxWidth||ue-jt.x)[0],Me=G([JSON.parse(JSON.stringify(St))],this.posX+this.margin[3],-he+Ct+this.ctx.prevPageLastElemOffset)[0],pe=ee&&(Wt>Ht||Wt<yt)&&C.call(this);pe&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],Zt,me,null).clip().discardPath()),this.pdf.text(Tt,Me.x,Me.y,{angle:_.angle,align:D,renderingMode:_.renderingMode}),pe&&this.pdf.restoreGraphicsState()}}else jt.y<qt&&(this.ctx.prevPageLastElemOffset+=qt-jt.y);_.scale>=.01&&(this.pdf.setFontSize(H),this.lineWidth=J)}}else _.scale>=.01&&(H=this.pdf.internal.getFontSize(),this.pdf.setFontSize(H*_.scale),J=this.lineWidth,this.lineWidth=J*_.scale),this.pdf.text(_.text,gt.x+this.posX,gt.y+this.posY,{angle:_.angle,align:D,renderingMode:_.renderingMode,maxWidth:_.maxWidth}),_.scale>=.01&&(this.pdf.setFontSize(H),this.lineWidth=J)},z=function(_,D,T,H){T=T||0,H=H||0,this.pdf.internal.out(e(_+T)+" "+n(D+H)+" l")},U=function(_,D,T){return this.pdf.lines(_,D,T,null,null)},nt=function(_,D,T,H,J,Z,at,ot){this.pdf.internal.out([t(a(T+_)),t(i(H+D)),t(a(J+_)),t(i(Z+D)),t(a(at+_)),t(i(ot+D)),"c"].join(" "))},st=function(_,D,T,H){for(var J=2*Math.PI,Z=Math.PI/2;D>T;)D-=J;var at=Math.abs(T-D);at<J&&H&&(at=J-at);for(var ot=[],gt=H?-1:1,At=D;at>1e-5;){var kt=At+gt*Math.min(at,Z);ot.push(ut.call(this,_,At,kt)),at-=Math.abs(kt-At),At=kt}return ot},ut=function(_,D,T){var H=(T-D)/2,J=_*Math.cos(H),Z=_*Math.sin(H),at=J,ot=-Z,gt=at*at+ot*ot,At=gt+at*J+ot*Z,kt=4/3*(Math.sqrt(2*gt*At)-At)/(at*Z-ot*J),St=at-kt*ot,Mt=ot+kt*at,F=St,Lt=-Mt,ae=H+D,Ht=Math.cos(ae),yt=Math.sin(ae);return{x1:_*Math.cos(D),y1:_*Math.sin(D),x2:St*Ht-Mt*yt,y2:St*yt+Mt*Ht,x3:F*Ht-Lt*yt,y3:F*yt+Lt*Ht,x4:_*Math.cos(T),y4:_*Math.sin(T)}},rt=function(_){return 180*_/Math.PI},ht=function(_,D,T,H,J,Z){var at=_+.5*(T-_),ot=D+.5*(H-D),gt=J+.5*(T-J),At=Z+.5*(H-Z),kt=Math.min(_,J,at,gt),St=Math.max(_,J,at,gt),Mt=Math.min(D,Z,ot,At),F=Math.max(D,Z,ot,At);return new l(kt,Mt,St-kt,F-Mt)},_t=function(_,D,T,H,J,Z,at,ot){var gt,At,kt,St,Mt,F,Lt,ae,Ht,yt,Wt,Ct,zt,qt,me=T-_,ue=H-D,Zt=J-T,he=Z-H,fe=at-J,jt=ot-Z;for(At=0;At<41;At++)Ht=(Lt=(kt=_+(gt=At/40)*me)+gt*((Mt=T+gt*Zt)-kt))+gt*(Mt+gt*(J+gt*fe-Mt)-Lt),yt=(ae=(St=D+gt*ue)+gt*((F=H+gt*he)-St))+gt*(F+gt*(Z+gt*jt-F)-ae),At==0?(Wt=Ht,Ct=yt,zt=Ht,qt=yt):(Wt=Math.min(Wt,Ht),Ct=Math.min(Ct,yt),zt=Math.max(zt,Ht),qt=Math.max(qt,yt));return new l(Math.round(Wt),Math.round(Ct),Math.round(zt-Wt),Math.round(qt-Ct))},wt=function(){if(this.prevLineDash||this.ctx.lineDash.length||this.ctx.lineDashOffset){var _,D,T=(_=this.ctx.lineDash,D=this.ctx.lineDashOffset,JSON.stringify({lineDash:_,lineDashOffset:D}));this.prevLineDash!==T&&(this.pdf.setLineDash(this.ctx.lineDash,this.ctx.lineDashOffset),this.prevLineDash=T)}}})(Rt.API),(function(r){var t=function(f){var l,u,h,p,w,x,g,P,C,B;for(u=[],h=0,p=(f+=l="\0\0\0\0".slice(f.length%4||4)).length;p>h;h+=4)(w=(f.charCodeAt(h)<<24)+(f.charCodeAt(h+1)<<16)+(f.charCodeAt(h+2)<<8)+f.charCodeAt(h+3))!==0?(x=(w=((w=((w=((w=(w-(B=w%85))/85)-(C=w%85))/85)-(P=w%85))/85)-(g=w%85))/85)%85,u.push(x+33,g+33,P+33,C+33,B+33)):u.push(122);return(function(S,G){for(var V=G;V>0;V--)S.pop()})(u,l.length),String.fromCharCode.apply(String,u)+"~>"},e=function(f){var l,u,h,p,w,x=String,g="length",P=255,C="charCodeAt",B="slice",S="replace";for(f[B](-2),f=f[B](0,-2)[S](/\s/g,"")[S]("z","!!!!!"),h=[],p=0,w=(f+=l="uuuuu"[B](f[g]%5||5))[g];w>p;p+=5)u=52200625*(f[C](p)-33)+614125*(f[C](p+1)-33)+7225*(f[C](p+2)-33)+85*(f[C](p+3)-33)+(f[C](p+4)-33),h.push(P&u>>24,P&u>>16,P&u>>8,P&u);return(function(G,V){for(var M=V;M>0;M--)G.pop()})(h,l[g]),x.fromCharCode.apply(x,h)},n=function(f){return f.split("").map(function(l){return("0"+l.charCodeAt().toString(16)).slice(-2)}).join("")+">"},a=function(f){var l=new RegExp(/^([0-9A-Fa-f]{2})+$/);if((f=f.replace(/\s/g,"")).indexOf(">")!==-1&&(f=f.substr(0,f.indexOf(">"))),f.length%2&&(f+="0"),l.test(f)===!1)return"";for(var u="",h=0;h<f.length;h+=2)u+=String.fromCharCode("0x"+(f[h]+f[h+1]));return u},i=function(f){for(var l=new Uint8Array(f.length),u=f.length;u--;)l[u]=f.charCodeAt(u);return(l=Ks(l)).reduce(function(h,p){return h+String.fromCharCode(p)},"")};r.processDataByFilters=function(f,l){var u=0,h=f||"",p=[];for(typeof(l=l||[])=="string"&&(l=[l]),u=0;u<l.length;u+=1)switch(l[u]){case"ASCII85Decode":case"/ASCII85Decode":h=e(h),p.push("/ASCII85Encode");break;case"ASCII85Encode":case"/ASCII85Encode":h=t(h),p.push("/ASCII85Decode");break;case"ASCIIHexDecode":case"/ASCIIHexDecode":h=a(h),p.push("/ASCIIHexEncode");break;case"ASCIIHexEncode":case"/ASCIIHexEncode":h=n(h),p.push("/ASCIIHexDecode");break;case"FlateEncode":case"/FlateEncode":h=i(h),p.push("/FlateDecode");break;default:throw new Error('The filter: "'+l[u]+'" is not implemented')}return{data:h,reverseChain:p.reverse().join(" ")}}})(Rt.API),(function(r){r.loadFile=function(t,e,n){return(function(a,i,f){i=i!==!1,f=typeof f=="function"?f:function(){};var l=void 0;try{l=(function(u,h,p){var w=new XMLHttpRequest,x=0,g=function(P){var C=P.length,B=[],S=String.fromCharCode;for(x=0;x<C;x+=1)B.push(S(255&P.charCodeAt(x)));return B.join("")};if(w.open("GET",u,!h),w.overrideMimeType("text/plain; charset=x-user-defined"),h===!1&&(w.onload=function(){w.status===200?p(g(this.responseText)):p(void 0)}),w.send(null),h&&w.status===200)return g(w.responseText)})(a,i,f)}catch{}return l})(t,e,n)},r.loadImageFile=r.loadFile})(Rt.API),(function(r){function t(){return(Jt.html2canvas?Promise.resolve(Jt.html2canvas):Promise.resolve().then(()=>require("./html2canvas.esm-B5qzocYs.cjs"))).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(Jt.DOMPurify?Promise.resolve(Jt.DOMPurify):Promise.resolve().then(()=>require("./purify.es-B-_4ubwQ.cjs"))).catch(function(l){return Promise.reject(new Error("Could not load dompurify: "+l))}).then(function(l){return l.default?l.default:l})}var n=function(l){var u=ye(l);return u==="undefined"?"undefined":u==="string"||l instanceof String?"string":u==="number"||l instanceof Number?"number":u==="function"||l instanceof Function?"function":l&&l.constructor===Array?"array":l&&l.nodeType===1?"element":u==="object"?"object":"unknown"},a=function(l,u){var h=document.createElement(l);for(var p in u.className&&(h.className=u.className),u.innerHTML&&u.dompurify&&(h.innerHTML=u.dompurify.sanitize(u.innerHTML)),u.style)h.style[p]=u.style[p];return h},i=function l(u,h){for(var p=u.nodeType===3?document.createTextNode(u.nodeValue):u.cloneNode(!1),w=u.firstChild;w;w=w.nextSibling)h!==!0&&w.nodeType===1&&w.nodeName==="SCRIPT"||p.appendChild(l(w,h));return u.nodeType===1&&(u.nodeName==="CANVAS"?(p.width=u.width,p.height=u.height,p.getContext("2d").drawImage(u,0,0)):u.nodeName!=="TEXTAREA"&&u.nodeName!=="SELECT"||(p.value=u.value),p.addEventListener("load",function(){p.scrollTop=u.scrollTop,p.scrollLeft=u.scrollLeft},!0)),p},f=function l(u){var h=Object.assign(l.convert(Promise.resolve()),JSON.parse(JSON.stringify(l.template))),p=l.convert(Promise.resolve(),h);return(p=p.setProgress(1,l,1,[l])).set(u)};(f.prototype=Object.create(Promise.prototype)).constructor=f,f.convert=function(l,u){return l.__proto__=u||f.prototype,l},f.template={prop:{src:null,container:null,overlay:null,canvas:null,img:null,pdf:null,pageSize:null,callback:function(){}},progress:{val:0,state:null,n:0,stack:[]},opt:{filename:"file.pdf",margin:[0,0,0,0],enableLinks:!0,x:0,y:0,html2canvas:{},jsPDF:{},backgroundColor:"transparent"}},f.prototype.from=function(l,u){return this.then(function(){switch(u=u||(function(h){switch(n(h)){case"string":return"string";case"element":return h.nodeName.toLowerCase()==="canvas"?"canvas":"element";default:return"unknown"}})(l),u){case"string":return this.then(e).then(function(h){return this.set({src:a("div",{innerHTML:l,dompurify:h})})});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.")}})},f.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.")}},f.prototype.toContainer=function(){return this.thenList([function(){return this.prop.src||this.error("Cannot duplicate - no source HTML.")},function(){return this.prop.pageSize||this.setPageSize()}]).then(function(){var 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},u=i(this.prop.src,this.opt.html2canvas.javascriptEnabled);u.tagName==="BODY"&&(l.height=Math.max(document.body.scrollHeight,document.body.offsetHeight,document.documentElement.clientHeight,document.documentElement.scrollHeight,document.documentElement.offsetHeight)+"px"),this.prop.overlay=a("div",{className:"html2pdf__overlay",style:{position:"fixed",overflow:"hidden",zIndex:1e3,left:"-100000px",right:0,bottom:0,top:0}}),this.prop.container=a("div",{className:"html2pdf__container",style:l}),this.prop.container.appendChild(u),this.prop.container.firstChild.appendChild(a("div",{style:{clear:"both",border:"0 none transparent",margin:0,padding:0,height:0}})),this.prop.container.style.float="none",this.prop.overlay.appendChild(this.prop.container),document.body.appendChild(this.prop.overlay),this.prop.container.firstChild.style.position="relative",this.prop.container.height=Math.max(this.prop.container.firstChild.clientHeight,this.prop.container.firstChild.scrollHeight,this.prop.container.firstChild.offsetHeight)+"px"})},f.prototype.toCanvas=function(){var l=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(l).then(t).then(function(u){var h=Object.assign({},this.opt.html2canvas);return delete h.onrendered,u(this.prop.container,h)}).then(function(u){(this.opt.html2canvas.onrendered||function(){})(u),this.prop.canvas=u,document.body.removeChild(this.prop.overlay)})},f.prototype.toContext2d=function(){var l=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(l).then(t).then(function(u){var h=this.opt.jsPDF,p=this.opt.fontFaces,w=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:w,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,h.context2d.autoPaging=this.opt.autoPaging===void 0||this.opt.autoPaging,h.context2d.posX=this.opt.x,h.context2d.posY=this.opt.y,h.context2d.margin=this.opt.margin,h.context2d.fontFaces=p,p)for(var g=0;g<p.length;++g){var P=p[g],C=P.src.find(function(B){return B.format==="truetype"});C&&h.addFont(C.url,P.ref.name,P.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,h.context2d.save(!0),u(this.prop.container,x)}).then(function(u){this.opt.jsPDF.context2d.restore(!0),(this.opt.html2canvas.onrendered||function(){})(u),this.prop.canvas=u,document.body.removeChild(this.prop.overlay)})},f.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})},f.prototype.toPdf=function(){return this.thenList([function(){return this.toContext2d()}]).then(function(){this.prop.pdf=this.prop.pdf||this.opt.jsPDF})},f.prototype.output=function(l,u,h){return(h=h||"pdf").toLowerCase()==="img"||h.toLowerCase()==="image"?this.outputImg(l,u):this.outputPdf(l,u)},f.prototype.outputPdf=function(l,u){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then(function(){return this.prop.pdf.output(l,u)})},f.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.'}})},f.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)})},f.prototype.doCallback=function(){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then(function(){this.prop.callback(this.prop.pdf)})},f.prototype.set=function(l){if(n(l)!=="object")return this;var u=Object.keys(l||{}).map(function(h){if(h in f.template.prop)return function(){this.prop[h]=l[h]};switch(h){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[h]=l[h]}}},this);return this.then(function(){return this.thenList(u)})},f.prototype.get=function(l,u){return this.then(function(){var h=l in f.template.prop?this.prop[l]:this.opt[l];return u?u(h):h})},f.prototype.setMargin=function(l){return this.then(function(){switch(n(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)},f.prototype.setPageSize=function(l){function u(h,p){return Math.floor(h*p/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:u(l.inner.width,l.k),height:u(l.inner.height,l.k)},l.inner.ratio=l.inner.height/l.inner.width),this.prop.pageSize=l})},f.prototype.setProgress=function(l,u,h,p){return l!=null&&(this.progress.val=l),u!=null&&(this.progress.state=u),h!=null&&(this.progress.n=h),p!=null&&(this.progress.stack=p),this.progress.ratio=this.progress.val/this.progress.state,this},f.prototype.updateProgress=function(l,u,h,p){return this.setProgress(l?this.progress.val+l:null,u||null,h?this.progress.n+h:null,p?this.progress.stack.concat(p):null)},f.prototype.then=function(l,u){var h=this;return this.thenCore(l,u,function(p,w){return h.updateProgress(null,null,1,[p]),Promise.prototype.then.call(this,function(x){return h.updateProgress(null,p),x}).then(p,w).then(function(x){return h.updateProgress(1),x})})},f.prototype.thenCore=function(l,u,h){h=h||Promise.prototype.then;var p=this;l&&(l=l.bind(p)),u&&(u=u.bind(p));var w=Promise.toString().indexOf("[native code]")!==-1&&Promise.name==="Promise"?p:f.convert(Object.assign({},p),Promise.prototype),x=h.call(w,l,u);return f.convert(x,p.__proto__)},f.prototype.thenExternal=function(l,u){return Promise.prototype.then.call(this,l,u)},f.prototype.thenList=function(l){var u=this;return l.forEach(function(h){u=u.thenCore(h)}),u},f.prototype.catch=function(l){l&&(l=l.bind(this));var u=Promise.prototype.catch.call(this,l);return f.convert(u,this)},f.prototype.catchExternal=function(l){return Promise.prototype.catch.call(this,l)},f.prototype.error=function(l){return this.then(function(){throw new Error(l)})},f.prototype.using=f.prototype.set,f.prototype.saveAs=f.prototype.save,f.prototype.export=f.prototype.output,f.prototype.run=f.prototype.then,Rt.getPageSize=function(l,u,h){if(ye(l)==="object"){var p=l;l=p.orientation,u=p.unit||u,h=p.format||h}u=u||"mm",h=h||"a4",l=(""+(l||"P")).toLowerCase();var w,x=(""+h).toLowerCase(),g={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(u){case"pt":w=1;break;case"mm":w=72/25.4;break;case"cm":w=72/2.54;break;case"in":w=72;break;case"px":w=.75;break;case"pc":case"em":w=12;break;case"ex":w=6;break;default:throw"Invalid unit: "+u}var P,C=0,B=0;if(g.hasOwnProperty(x))C=g[x][1]/w,B=g[x][0]/w;else try{C=h[1],B=h[0]}catch{throw new Error("Invalid format: "+h)}if(l==="p"||l==="portrait")l="p",B>C&&(P=B,B=C,C=P);else{if(l!=="l"&&l!=="landscape")throw"Invalid orientation: "+l;l="l",C>B&&(P=B,B=C,C=P)}return{width:B,height:C,unit:u,k:w,orientation:l}},r.html=function(l,u){(u=u||{}).callback=u.callback||function(){},u.html2canvas=u.html2canvas||{},u.html2canvas.canvas=u.html2canvas.canvas||this.canvas,u.jsPDF=u.jsPDF||this,u.fontFaces=u.fontFaces?u.fontFaces.map(Ts):null;var h=new f(u);return u.worker?h:h.from(l).doCallback()}})(Rt.API),Rt.API.addJS=function(r){return Ku=r,this.internal.events.subscribe("postPutResources",function(){So=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/Names [(EmbeddedJS) "+(So+1)+" 0 R]"),this.internal.out(">>"),this.internal.out("endobj"),Ju=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/S /JavaScript"),this.internal.out("/JS ("+Ku+")"),this.internal.out(">>"),this.internal.out("endobj")}),this.internal.events.subscribe("putCatalog",function(){So!==void 0&&Ju!==void 0&&this.internal.out("/Names <</JavaScript "+So+" 0 R>>")}),this},(function(r){var t;r.events.push(["postPutResources",function(){var e=this,n=/^(\d+) 0 obj$/;if(this.outline.root.children.length>0)for(var a=e.outline.render().split(/\r\n/),i=0;i<a.length;i++){var f=a[i],l=n.exec(f);if(l!=null){var u=l[1];e.internal.newObjectDeferredBegin(u,!1)}e.internal.write(f)}if(this.outline.createNamedDestinations){var h=this.internal.pages.length,p=[];for(i=0;i<h;i++){var w=e.internal.newObject();p.push(w);var x=e.internal.getPageInfo(i+1);e.internal.write("<< /D["+x.objId+" 0 R /XYZ null null null]>> endobj")}var g=e.internal.newObject();for(e.internal.write("<< /Names [ "),i=0;i<p.length;i++)e.internal.write("(page_"+(i+1)+")"+p[i]+" 0 R");e.internal.write(" ] >>","endobj"),t=e.internal.newObject(),e.internal.write("<< /Dests "+g+" 0 R"),e.internal.write(">>","endobj")}}]),r.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 "+t+" 0 R"))}]),r.events.push(["initialized",function(){var e=this;e.outline={createNamedDestinations:!1,root:{children:[]}},e.outline.add=function(n,a,i){var f={title:a,options:i,children:[]};return n==null&&(n=this.root),n.children.push(f),f},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(n){n.id=e.internal.newObjectDeferred();for(var a=0;a<n.children.length;a++)this.genIds_r(n.children[a])},e.outline.renderRoot=function(n){this.objStart(n),this.line("/Type /Outlines"),n.children.length>0&&(this.line("/First "+this.makeRef(n.children[0])),this.line("/Last "+this.makeRef(n.children[n.children.length-1]))),this.line("/Count "+this.count_r({count:0},n)),this.objEnd()},e.outline.renderItems=function(n){for(var a=this.ctx.pdf.internal.getVerticalCoordinateString,i=0;i<n.children.length;i++){var f=n.children[i];this.objStart(f),this.line("/Title "+this.makeString(f.title)),this.line("/Parent "+this.makeRef(n)),i>0&&this.line("/Prev "+this.makeRef(n.children[i-1])),i<n.children.length-1&&this.line("/Next "+this.makeRef(n.children[i+1])),f.children.length>0&&(this.line("/First "+this.makeRef(f.children[0])),this.line("/Last "+this.makeRef(f.children[f.children.length-1])));var l=this.count=this.count_r({count:0},f);if(l>0&&this.line("/Count "+l),f.options&&f.options.pageNumber){var u=e.internal.getPageInfo(f.options.pageNumber);this.line("/Dest ["+u.objId+" 0 R /XYZ 0 "+a(0)+" 0]")}this.objEnd()}for(var h=0;h<n.children.length;h++)this.renderItems(n.children[h])},e.outline.line=function(n){this.ctx.val+=n+`\r
|
|
41
|
+
`),t}}},createDefaultAppearanceStream:function(r){var t=r.scope.internal.getFont(r.fontName,r.fontStyle).id,e=r.scope.__private__.encodeColorString(r.color);return"/"+t+" "+r.fontSize+" Tf "+e}};Ft.internal={Bezier_C:.551915024494,calculateCross:function(r){var t=Ft.internal.getWidth(r),e=Ft.internal.getHeight(r),n=Math.min(t,e);return{x1:{x:(t-n)/2,y:(e-n)/2+n},x2:{x:(t-n)/2+n,y:(e-n)/2},x3:{x:(t-n)/2,y:(e-n)/2},x4:{x:(t-n)/2+n,y:(e-n)/2+n}}}},Ft.internal.getWidth=function(r){var t=0;return ye(r)==="object"&&(t=Hu(r.Rect[2])),t},Ft.internal.getHeight=function(r){var t=0;return ye(r)==="object"&&(t=Hu(r.Rect[3])),t};var _2=Te.addField=function(r){if(A2(this,r),!(r instanceof Qr))throw new Error("Invalid argument passed to jsPDF.addField.");var t;return(t=r).scope.internal.acroformPlugin.printedOut&&(t.scope.internal.acroformPlugin.printedOut=!1,t.scope.internal.acroformPlugin.acroFormDictionaryRoot=null),t.scope.internal.acroformPlugin.acroFormDictionaryRoot.Fields.push(t),r.page=r.scope.internal.getCurrentPageInfo().pageNumber,this};Te.AcroFormChoiceField=Ji,Te.AcroFormListBox=Ki,Te.AcroFormComboBox=$i,Te.AcroFormEditBox=Fo,Te.AcroFormButton=nr,Te.AcroFormPushButton=Io,Te.AcroFormRadioButton=Xi,Te.AcroFormCheckBox=Eo,Te.AcroFormTextField=Ni,Te.AcroFormPasswordField=Oo,Te.AcroFormAppearance=Ft,Te.AcroForm={ChoiceField:Ji,ListBox:Ki,ComboBox:$i,EditBox:Fo,Button:nr,PushButton:Io,RadioButton:Xi,CheckBox:Eo,TextField:Ni,PasswordField:Oo,Appearance:Ft},Rt.AcroForm={ChoiceField:Ji,ListBox:Ki,ComboBox:$i,EditBox:Fo,Button:nr,PushButton:Io,RadioButton:Xi,CheckBox:Eo,TextField:Ni,PasswordField:Oo,Appearance:Ft};Rt.AcroForm;function th(r){return r.reduce(function(t,e,n){return t[e]=n,t},{})}(function(r){var t="addImage_";r.__addimage__={};var e="UNKNOWN",n={PNG:[[137,80,78,71]],TIFF:[[77,77,0,42],[73,73,42,0]],JPEG:[[255,216,255,224,void 0,void 0,74,70,73,70,0],[255,216,255,225,void 0,void 0,69,120,105,102,0,0],[255,216,255,219],[255,216,255,238]],JPEG2000:[[0,0,0,12,106,80,32,32]],GIF87a:[[71,73,70,56,55,97]],GIF89a:[[71,73,70,56,57,97]],WEBP:[[82,73,70,70,void 0,void 0,void 0,void 0,87,69,66,80]],BMP:[[66,77],[66,65],[67,73],[67,80],[73,67],[80,84]]},a=r.__addimage__.getImageFileTypeByImageData=function(L,O){var z,U,nt,st,ut,rt=e;if((O=O||e)==="RGBA"||L.data!==void 0&&L.data instanceof Uint8ClampedArray&&"height"in L&&"width"in L)return"RGBA";if(vt(L))for(ut in n)for(nt=n[ut],z=0;z<nt.length;z+=1){for(st=!0,U=0;U<nt[z].length;U+=1)if(nt[z][U]!==void 0&&nt[z][U]!==L[U]){st=!1;break}if(st===!0){rt=ut;break}}else for(ut in n)for(nt=n[ut],z=0;z<nt.length;z+=1){for(st=!0,U=0;U<nt[z].length;U+=1)if(nt[z][U]!==void 0&&nt[z][U]!==L.charCodeAt(U)){st=!1;break}if(st===!0){rt=ut;break}}return rt===e&&O!==e&&(rt=O),rt},i=function L(O){for(var z=this.internal.write,U=this.internal.putStream,nt=(0,this.internal.getFilters)();nt.indexOf("FlateEncode")!==-1;)nt.splice(nt.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===S.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===S.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 ut="",rt=0,ht=O.transparency.length;rt<ht;rt++)ut+=O.transparency[rt]+" "+O.transparency[rt]+" ";st.push({key:"Mask",value:"["+ut+"]"})}O.sMask!==void 0&&st.push({key:"SMask",value:O.objectId+1+" 0 R"});var _t=O.filter!==void 0?["/"+O.filter]:void 0;if(U({data:O.data,additionalKeyValues:st,alreadyAppliedFilters:_t,objectId:O.objectId}),z("endobj"),"sMask"in O&&O.sMask!==void 0){var wt,_=(wt=O.sMaskBitsPerComponent)!==null&&wt!==void 0?wt:O.bitsPerComponent,D={width:O.width,height:O.height,colorSpace:"DeviceGray",bitsPerComponent:_,data:O.sMask};"filter"in O&&(D.decodeParameters="/Predictor ".concat(O.predictor," /Colors 1 /BitsPerComponent ").concat(_," /Columns ").concat(O.width),D.filter=O.filter),L.call(this,D)}if(O.colorSpace===S.INDEXED){var T=this.internal.newObject();U({data:K(new Uint8Array(O.palette)),objectId:T}),z("endobj")}},f=function(){var L=this.internal.collections[t+"images"];for(var O in L)i.call(this,L[O])},l=function(){var L,O=this.internal.collections[t+"images"],z=this.internal.write;for(var U in O)z("/I"+(L=O[U]).index,L.objectId,"0","R")},u=function(){this.internal.collections[t+"images"]||(this.internal.collections[t+"images"]={},this.internal.events.subscribe("putResources",f),this.internal.events.subscribe("putXobjectDict",l))},h=function(){var L=this.internal.collections[t+"images"];return u.call(this),L},p=function(){return Object.keys(this.internal.collections[t+"images"]).length},w=function(L){return typeof r["process"+L.toUpperCase()]=="function"},x=function(L){return ye(L)==="object"&&L.nodeType===1},g=function(L,O){if(L.nodeName==="IMG"&&L.hasAttribute("src")){var z=""+L.getAttribute("src");if(z.indexOf("data:image/")===0)return Co(unescape(z).split("base64,").pop());var U=r.loadFile(z,!0);if(U!==void 0)return U}if(L.nodeName==="CANVAS"){if(L.width===0||L.height===0)throw new Error("Given canvas must have data. Canvas width: "+L.width+", height: "+L.height);var nt;switch(O){case"PNG":nt="image/png";break;case"WEBP":nt="image/webp";break;default:nt="image/jpeg"}return Co(L.toDataURL(nt,1).split("base64,").pop())}},P=function(L){var O=this.internal.collections[t+"images"];if(O){for(var z in O)if(L===O[z].alias)return O[z]}},C=function(L,O,z){return L||O||(L=-96,O=-96),L<0&&(L=-1*z.width*72/L/this.internal.scaleFactor),O<0&&(O=-1*z.height*72/O/this.internal.scaleFactor),L===0&&(L=O*z.width/z.height),O===0&&(O=L*z.height/z.width),[L,O]},B=function(L,O,z,U,nt,st){var ut=C.call(this,z,U,nt),rt=this.internal.getCoordinateString,ht=this.internal.getVerticalCoordinateString,_t=h.call(this);if(z=ut[0],U=ut[1],_t[nt.index]=nt,st){st*=Math.PI/180;var wt=Math.cos(st),_=Math.sin(st),D=function(H){return H.toFixed(4)},T=[D(wt),D(_),D(-1*_),D(wt),0,0,"cm"]}this.internal.write("q"),st?(this.internal.write([1,"0","0",1,rt(L),ht(O+U),"cm"].join(" ")),this.internal.write(T.join(" ")),this.internal.write([rt(z),"0","0",rt(U),"0","0","cm"].join(" "))):this.internal.write([rt(z),"0","0",rt(U),rt(L),ht(O+U),"cm"].join(" ")),this.isAdvancedAPI()&&this.internal.write([1,0,0,-1,0,0,"cm"].join(" ")),this.internal.write("/I"+nt.index+" Do"),this.internal.write("Q")},S=r.color_spaces={DEVICE_RGB:"DeviceRGB",DEVICE_GRAY:"DeviceGray",DEVICE_CMYK:"DeviceCMYK",CAL_GREY:"CalGray",CAL_RGB:"CalRGB",LAB:"Lab",ICC_BASED:"ICCBased",INDEXED:"Indexed",PATTERN:"Pattern",SEPARATION:"Separation",DEVICE_N:"DeviceN"};r.decode={DCT_DECODE:"DCTDecode",FLATE_DECODE:"FlateDecode",LZW_DECODE:"LZWDecode",JPX_DECODE:"JPXDecode",JBIG2_DECODE:"JBIG2Decode",ASCII85_DECODE:"ASCII85Decode",ASCII_HEX_DECODE:"ASCIIHexDecode",RUN_LENGTH_DECODE:"RunLengthDecode",CCITT_FAX_DECODE:"CCITTFaxDecode"};var G=r.image_compression={NONE:"NONE",FAST:"FAST",MEDIUM:"MEDIUM",SLOW:"SLOW"},V=r.__addimage__.sHashCode=function(L){var O,z,U=0;if(typeof L=="string")for(z=L.length,O=0;O<z;O++)U=(U<<5)-U+L.charCodeAt(O),U|=0;else if(vt(L))for(z=L.byteLength/2,O=0;O<z;O++)U=(U<<5)-U+L[O],U|=0;return U},M=r.__addimage__.validateStringAsBase64=function(L){(L=L||"").toString().trim();var O=!0;return L.length===0&&(O=!1),L.length%4!=0&&(O=!1),/^[A-Za-z0-9+/]+$/.test(L.substr(0,L.length-2))===!1&&(O=!1),/^[A-Za-z0-9/][A-Za-z0-9+/]|[A-Za-z0-9+/]=|==$/.test(L.substr(-2))===!1&&(O=!1),O},it=r.__addimage__.extractImageFromDataUrl=function(L){if(L==null||!(L=L.trim()).startsWith("data:"))return null;var O=L.indexOf(",");return O<0?null:L.substring(0,O).trim().endsWith("base64")?L.substring(O+1):null};r.__addimage__.isArrayBuffer=function(L){return L instanceof ArrayBuffer};var vt=r.__addimage__.isArrayBufferView=function(L){return L instanceof Int8Array||L instanceof Uint8Array||L instanceof Uint8ClampedArray||L instanceof Int16Array||L instanceof Uint16Array||L instanceof Int32Array||L instanceof Uint32Array||L instanceof Float32Array||L instanceof Float64Array},ct=r.__addimage__.binaryStringToUint8Array=function(L){for(var O=L.length,z=new Uint8Array(O),U=0;U<O;U++)z[U]=L.charCodeAt(U);return z},K=r.__addimage__.arrayBufferToBinaryString=function(L){for(var O="",z=vt(L)?L:new Uint8Array(L),U=0;U<z.length;U+=8192)O+=String.fromCharCode.apply(null,z.subarray(U,U+8192));return O};r.addImage=function(){var L,O,z,U,nt,st,ut,rt,ht;if(typeof arguments[1]=="number"?(O=e,z=arguments[1],U=arguments[2],nt=arguments[3],st=arguments[4],ut=arguments[5],rt=arguments[6],ht=arguments[7]):(O=arguments[1],z=arguments[2],U=arguments[3],nt=arguments[4],st=arguments[5],ut=arguments[6],rt=arguments[7],ht=arguments[8]),ye(L=arguments[0])==="object"&&!x(L)&&"imageData"in L){var _t=L;L=_t.imageData,O=_t.format||O||e,z=_t.x||z||0,U=_t.y||U||0,nt=_t.w||_t.width||nt,st=_t.h||_t.height||st,ut=_t.alias||ut,rt=_t.compression||rt,ht=_t.rotation||_t.angle||ht}var wt=this.internal.getFilters();if(rt===void 0&&wt.indexOf("FlateEncode")!==-1&&(rt="SLOW"),isNaN(z)||isNaN(U))throw new Error("Invalid coordinates passed to jsPDF.addImage");u.call(this);var _=R.call(this,L,O,ut,rt);return B.call(this,z,U,nt,st,_,ht),this};var R=function(L,O,z,U){var nt,st,ut;if(typeof L=="string"&&a(L)===e){L=unescape(L);var rt=tt(L,!1);(rt!==""||(rt=r.loadFile(L,!0))!==void 0)&&(L=rt)}if(x(L)&&(L=g(L,O)),O=a(L,O),!w(O))throw new Error("addImage does not support files of type '"+O+"', please ensure that a plugin for '"+O+"' support is added.");if(((ut=z)==null||ut.length===0)&&(z=(function(ht){return typeof ht=="string"||vt(ht)?V(ht):vt(ht.data)?V(ht.data):null})(L)),(nt=P.call(this,z))||(L instanceof Uint8Array||O==="RGBA"||(st=L,L=ct(L)),nt=this["process"+O.toUpperCase()](L,p.call(this),z,(function(ht){return ht&&typeof ht=="string"&&(ht=ht.toUpperCase()),ht in r.image_compression?ht:G.NONE})(U),st)),!nt)throw new Error("An unknown error occurred whilst processing the image.");return nt},tt=r.__addimage__.convertBase64ToBinaryString=function(L,O){O=typeof O!="boolean"||O;var z,U="";if(typeof L=="string"){var nt;z=(nt=it(L))!==null&&nt!==void 0?nt:L;try{U=Co(z)}catch(st){if(O)throw M(z)?new Error("atob-Error in jsPDF.convertBase64ToBinaryString "+st.message):new Error("Supplied Data is not a valid base64-String jsPDF.convertBase64ToBinaryString ")}}return U};r.getImageProperties=function(L){var O,z,U="";if(x(L)&&(L=g(L)),typeof L=="string"&&a(L)===e&&((U=tt(L,!1))===""&&(U=r.loadFile(L)||""),L=U),z=a(L),!w(z))throw new Error("addImage does not support files of type '"+z+"', please ensure that a plugin for '"+z+"' support is added.");if(L instanceof Uint8Array||(L=ct(L)),!(O=this["process"+z.toUpperCase()](L)))throw new Error("An unknown error occurred whilst processing the image");return O.fileType=z,O}})(Rt.API),(function(r){var t=function(e){if(e!==void 0&&e!="")return!0};Rt.API.events.push(["addPage",function(e){this.internal.getPageInfo(e.pageNumber).pageContext.annotations=[]}]),r.events.push(["putPage",function(e){for(var n,a,i,f=this.internal.getCoordinateString,l=this.internal.getVerticalCoordinateString,u=this.internal.getPageInfoByObjId(e.objId),h=e.pageContext.annotations,p=!1,w=0;w<h.length&&!p;w++)switch((n=h[w]).type){case"link":(t(n.options.url)||t(n.options.pageNumber))&&(p=!0);break;case"reference":case"text":case"freetext":p=!0}if(p!=0){this.internal.write("/Annots [");for(var x=0;x<h.length;x++){n=h[x];var g=this.internal.pdfEscape,P=this.internal.getEncryptor(e.objId);switch(n.type){case"reference":this.internal.write(" "+n.object.objId+" 0 R ");break;case"text":var C=this.internal.newAdditionalObject(),B=this.internal.newAdditionalObject(),S=this.internal.getEncryptor(C.objId),G=n.title||"Note";i="<</Type /Annot /Subtype /Text "+(a="/Rect ["+f(n.bounds.x)+" "+l(n.bounds.y+n.bounds.h)+" "+f(n.bounds.x+n.bounds.w)+" "+l(n.bounds.y)+"] ")+"/Contents ("+g(S(n.contents))+")",i+=" /Popup "+B.objId+" 0 R",i+=" /P "+u.objId+" 0 R",i+=" /T ("+g(S(G))+") >>",C.content=i;var V=C.objId+" 0 R";i="<</Type /Annot /Subtype /Popup "+(a="/Rect ["+f(n.bounds.x+30)+" "+l(n.bounds.y+n.bounds.h)+" "+f(n.bounds.x+n.bounds.w+30)+" "+l(n.bounds.y)+"] ")+" /Parent "+V,n.open&&(i+=" /Open true"),i+=" >>",B.content=i,this.internal.write(C.objId,"0 R",B.objId,"0 R");break;case"freetext":a="/Rect ["+f(n.bounds.x)+" "+l(n.bounds.y)+" "+f(n.bounds.x+n.bounds.w)+" "+l(n.bounds.y+n.bounds.h)+"] ";var M=n.color||"#000000";i="<</Type /Annot /Subtype /FreeText "+a+"/Contents ("+g(P(n.contents))+")",i+=" /DS(font: Helvetica,sans-serif 12.0pt; text-align:left; color:#"+M+")",i+=" /Border [0 0 0]",i+=" >>",this.internal.write(i);break;case"link":if(n.options.name){var it=this.annotations._nameMap[n.options.name];n.options.pageNumber=it.page,n.options.top=it.y}else n.options.top||(n.options.top=0);if(a="/Rect ["+n.finalBounds.x+" "+n.finalBounds.y+" "+n.finalBounds.w+" "+n.finalBounds.h+"] ",i="",n.options.url)i="<</Type /Annot /Subtype /Link "+a+"/Border [0 0 0] /A <</S /URI /URI ("+g(P(n.options.url))+") >>";else if(n.options.pageNumber)switch(i="<</Type /Annot /Subtype /Link "+a+"/Border [0 0 0] /Dest ["+this.internal.getPageInfo(n.options.pageNumber).objId+" 0 R",n.options.magFactor=n.options.magFactor||"XYZ",n.options.magFactor){case"Fit":i+=" /Fit]";break;case"FitH":i+=" /FitH "+n.options.top+"]";break;case"FitV":n.options.left=n.options.left||0,i+=" /FitV "+n.options.left+"]";break;default:var vt=l(n.options.top);n.options.left=n.options.left||0,n.options.zoom===void 0&&(n.options.zoom=0),i+=" /XYZ "+n.options.left+" "+vt+" "+n.options.zoom+"]"}i!=""&&(i+=" >>",this.internal.write(i))}}this.internal.write("]")}}]),r.createAnnotation=function(e){var n=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":n.pageContext.annotations.push(e)}},r.link=function(e,n,a,i,f){var l=this.internal.getCurrentPageInfo(),u=this.internal.getCoordinateString,h=this.internal.getVerticalCoordinateString;l.pageContext.annotations.push({finalBounds:{x:u(e),y:h(n),w:u(e+a),h:h(n+i)},options:f,type:"link"})},r.textWithLink=function(e,n,a,i){var f,l,u=this.getTextWidth(e),h=this.internal.getLineHeight()/this.internal.scaleFactor;if(i.maxWidth!==void 0){l=i.maxWidth;var p=this.splitTextToSize(e,l).length;f=Math.ceil(h*p)}else l=u,f=h;return this.text(e,n,a,i),a+=.2*h,i.align==="center"&&(n-=u/2),i.align==="right"&&(n-=u),this.link(n,a-h,l,f,i),u},r.getTextWidth=function(e){var n=this.internal.getFontSize();return this.getStringUnitWidth(e)*n/this.internal.scaleFactor}})(Rt.API),(function(r){var t={1569:[65152],1570:[65153,65154],1571:[65155,65156],1572:[65157,65158],1573:[65159,65160],1574:[65161,65162,65163,65164],1575:[65165,65166],1576:[65167,65168,65169,65170],1577:[65171,65172],1578:[65173,65174,65175,65176],1579:[65177,65178,65179,65180],1580:[65181,65182,65183,65184],1581:[65185,65186,65187,65188],1582:[65189,65190,65191,65192],1583:[65193,65194],1584:[65195,65196],1585:[65197,65198],1586:[65199,65200],1587:[65201,65202,65203,65204],1588:[65205,65206,65207,65208],1589:[65209,65210,65211,65212],1590:[65213,65214,65215,65216],1591:[65217,65218,65219,65220],1592:[65221,65222,65223,65224],1593:[65225,65226,65227,65228],1594:[65229,65230,65231,65232],1601:[65233,65234,65235,65236],1602:[65237,65238,65239,65240],1603:[65241,65242,65243,65244],1604:[65245,65246,65247,65248],1605:[65249,65250,65251,65252],1606:[65253,65254,65255,65256],1607:[65257,65258,65259,65260],1608:[65261,65262],1609:[65263,65264,64488,64489],1610:[65265,65266,65267,65268],1649:[64336,64337],1655:[64477],1657:[64358,64359,64360,64361],1658:[64350,64351,64352,64353],1659:[64338,64339,64340,64341],1662:[64342,64343,64344,64345],1663:[64354,64355,64356,64357],1664:[64346,64347,64348,64349],1667:[64374,64375,64376,64377],1668:[64370,64371,64372,64373],1670:[64378,64379,64380,64381],1671:[64382,64383,64384,64385],1672:[64392,64393],1676:[64388,64389],1677:[64386,64387],1678:[64390,64391],1681:[64396,64397],1688:[64394,64395],1700:[64362,64363,64364,64365],1702:[64366,64367,64368,64369],1705:[64398,64399,64400,64401],1709:[64467,64468,64469,64470],1711:[64402,64403,64404,64405],1713:[64410,64411,64412,64413],1715:[64406,64407,64408,64409],1722:[64414,64415],1723:[64416,64417,64418,64419],1726:[64426,64427,64428,64429],1728:[64420,64421],1729:[64422,64423,64424,64425],1733:[64480,64481],1734:[64473,64474],1735:[64471,64472],1736:[64475,64476],1737:[64482,64483],1739:[64478,64479],1740:[64508,64509,64510,64511],1744:[64484,64485,64486,64487],1746:[64430,64431],1747:[64432,64433]},e={65247:{65154:65269,65156:65271,65160:65273,65166:65275},65248:{65154:65270,65156:65272,65160:65274,65166:65276},65165:{65247:{65248:{65258:65010}}},1617:{1612:64606,1613:64607,1614:64608,1615:64609,1616:64610}},n={1612:64606,1613:64607,1614:64608,1615:64609,1616:64610},a=[1570,1571,1573,1575];r.__arabicParser__={};var i=r.__arabicParser__.isInArabicSubstitutionA=function(C){return t[C.charCodeAt(0)]!==void 0},f=r.__arabicParser__.isArabicLetter=function(C){return typeof C=="string"&&/^[\u0600-\u06FF\u0750-\u077F\u08A0-\u08FF\uFB50-\uFDFF\uFE70-\uFEFF]+$/.test(C)},l=r.__arabicParser__.isArabicEndLetter=function(C){return f(C)&&i(C)&&t[C.charCodeAt(0)].length<=2},u=r.__arabicParser__.isArabicAlfLetter=function(C){return f(C)&&a.indexOf(C.charCodeAt(0))>=0};r.__arabicParser__.arabicLetterHasIsolatedForm=function(C){return f(C)&&i(C)&&t[C.charCodeAt(0)].length>=1};var h=r.__arabicParser__.arabicLetterHasFinalForm=function(C){return f(C)&&i(C)&&t[C.charCodeAt(0)].length>=2};r.__arabicParser__.arabicLetterHasInitialForm=function(C){return f(C)&&i(C)&&t[C.charCodeAt(0)].length>=3};var p=r.__arabicParser__.arabicLetterHasMedialForm=function(C){return f(C)&&i(C)&&t[C.charCodeAt(0)].length==4},w=r.__arabicParser__.resolveLigatures=function(C){var B=0,S=e,G="",V=0;for(B=0;B<C.length;B+=1)S[C.charCodeAt(B)]!==void 0?(V++,typeof(S=S[C.charCodeAt(B)])=="number"&&(G+=String.fromCharCode(S),S=e,V=0),B===C.length-1&&(S=e,G+=C.charAt(B-(V-1)),B-=V-1,V=0)):(S=e,G+=C.charAt(B-V),B-=V,V=0);return G};r.__arabicParser__.isArabicDiacritic=function(C){return C!==void 0&&n[C.charCodeAt(0)]!==void 0};var x=r.__arabicParser__.getCorrectForm=function(C,B,S){return f(C)?i(C)===!1?-1:!h(C)||!f(B)&&!f(S)||!f(S)&&l(B)||l(C)&&!f(B)||l(C)&&u(B)||l(C)&&l(B)?0:p(C)&&f(B)&&!l(B)&&f(S)&&h(S)?3:l(C)||!f(S)?1:2:-1},g=function(C){var B=0,S=0,G=0,V="",M="",it="",vt=(C=C||"").split("\\s+"),ct=[];for(B=0;B<vt.length;B+=1){for(ct.push(""),S=0;S<vt[B].length;S+=1)V=vt[B][S],M=vt[B][S-1],it=vt[B][S+1],f(V)?(G=x(V,M,it),ct[B]+=G!==-1?String.fromCharCode(t[V.charCodeAt(0)][G]):V):ct[B]+=V;ct[B]=w(ct[B])}return ct.join(" ")},P=r.__arabicParser__.processArabic=r.processArabic=function(){var C,B=typeof arguments[0]=="string"?arguments[0]:arguments[0].text,S=[];if(Array.isArray(B)){var G=0;for(S=[],G=0;G<B.length;G+=1)Array.isArray(B[G])?S.push([g(B[G][0]),B[G][1],B[G][2]]):S.push([g(B[G])]);C=S}else C=g(B);return typeof arguments[0]=="string"?C:(arguments[0].text=C,arguments[0])};r.events.push(["preProcessText",P])})(Rt.API),Rt.API.autoPrint=function(r){var t;return(r=r||{}).variant=r.variant||"non-conform",r.variant==="javascript"?this.addJS("print({});"):(this.internal.events.subscribe("postPutResources",function(){t=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/S /Named"),this.internal.out("/Type /Action"),this.internal.out("/N /Print"),this.internal.out(">>"),this.internal.out("endobj")}),this.internal.events.subscribe("putCatalog",function(){this.internal.out("/OpenAction "+t+" 0 R")})),this},(function(r){var t=function(){var e=void 0;Object.defineProperty(this,"pdf",{get:function(){return e},set:function(l){e=l}});var n=150;Object.defineProperty(this,"width",{get:function(){return n},set:function(l){n=isNaN(l)||Number.isInteger(l)===!1||l<0?150:l,this.getContext("2d").pageWrapXEnabled&&(this.getContext("2d").pageWrapX=n+1)}});var a=300;Object.defineProperty(this,"height",{get:function(){return a},set:function(l){a=isNaN(l)||Number.isInteger(l)===!1||l<0?300:l,this.getContext("2d").pageWrapYEnabled&&(this.getContext("2d").pageWrapY=a+1)}});var i=[];Object.defineProperty(this,"childNodes",{get:function(){return i},set:function(l){i=l}});var f={};Object.defineProperty(this,"style",{get:function(){return f},set:function(l){f=l}}),Object.defineProperty(this,"parentNode",{})};t.prototype.getContext=function(e,n){var a;if((e=e||"2d")!=="2d")return null;for(a in n)this.pdf.context2d.hasOwnProperty(a)&&(this.pdf.context2d[a]=n[a]);return this.pdf.context2d._canvas=this,this.pdf.context2d},t.prototype.toDataURL=function(){throw new Error("toDataURL is not implemented.")},r.events.push(["initialized",function(){this.canvas=new t,this.canvas.pdf=this}])})(Rt.API),(function(r){var t={left:0,top:0,bottom:0,right:0},e=!1,n=function(){this.internal.__cell__===void 0&&(this.internal.__cell__={},this.internal.__cell__.padding=3,this.internal.__cell__.headerFunction=void 0,this.internal.__cell__.margins=Object.assign({},t),this.internal.__cell__.margins.width=this.getPageWidth(),a.call(this))},a=function(){this.internal.__cell__.lastCell=new i,this.internal.__cell__.pages=1},i=function(){var u=arguments[0];Object.defineProperty(this,"x",{enumerable:!0,get:function(){return u},set:function(C){u=C}});var h=arguments[1];Object.defineProperty(this,"y",{enumerable:!0,get:function(){return h},set:function(C){h=C}});var p=arguments[2];Object.defineProperty(this,"width",{enumerable:!0,get:function(){return p},set:function(C){p=C}});var w=arguments[3];Object.defineProperty(this,"height",{enumerable:!0,get:function(){return w},set:function(C){w=C}});var x=arguments[4];Object.defineProperty(this,"text",{enumerable:!0,get:function(){return x},set:function(C){x=C}});var g=arguments[5];Object.defineProperty(this,"lineNumber",{enumerable:!0,get:function(){return g},set:function(C){g=C}});var P=arguments[6];return Object.defineProperty(this,"align",{enumerable:!0,get:function(){return P},set:function(C){P=C}}),this};i.prototype.clone=function(){return new i(this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align)},i.prototype.toArray=function(){return[this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align]},r.setHeaderFunction=function(u){return n.call(this),this.internal.__cell__.headerFunction=typeof u=="function"?u:void 0,this},r.getTextDimensions=function(u,h){n.call(this);var p=(h=h||{}).fontSize||this.getFontSize(),w=h.font||this.getFont(),x=h.scaleFactor||this.internal.scaleFactor,g=0,P=0,C=0,B=this;if(!Array.isArray(u)&&typeof u!="string"){if(typeof u!="number")throw new Error("getTextDimensions expects text-parameter to be of type String or type Number or an Array of Strings.");u=String(u)}var S=h.maxWidth;S>0?typeof u=="string"?u=this.splitTextToSize(u,S):Object.prototype.toString.call(u)==="[object Array]"&&(u=u.reduce(function(V,M){return V.concat(B.splitTextToSize(M,S))},[])):u=Array.isArray(u)?u:[u];for(var G=0;G<u.length;G++)g<(C=this.getStringUnitWidth(u[G],{font:w})*p)&&(g=C);return g!==0&&(P=u.length),{w:g/=x,h:Math.max((P*p*this.getLineHeightFactor()-p*(this.getLineHeightFactor()-1))/x,0)}},r.cellAddPage=function(){n.call(this),this.addPage();var u=this.internal.__cell__.margins||t;return this.internal.__cell__.lastCell=new i(u.left,u.top,void 0,void 0),this.internal.__cell__.pages+=1,this};var f=r.cell=function(){var u;u=arguments[0]instanceof i?arguments[0]:new i(arguments[0],arguments[1],arguments[2],arguments[3],arguments[4],arguments[5],arguments[6]),n.call(this);var h=this.internal.__cell__.lastCell,p=this.internal.__cell__.padding,w=this.internal.__cell__.margins||t,x=this.internal.__cell__.tableHeaderRow,g=this.internal.__cell__.printHeaders;return h.lineNumber!==void 0&&(h.lineNumber===u.lineNumber?(u.x=(h.x||0)+(h.width||0),u.y=h.y||0):h.y+h.height+u.height+w.bottom>this.getPageHeight()?(this.cellAddPage(),u.y=w.top,g&&x&&(this.printHeaderRow(u.lineNumber,!0),u.y+=x[0].height)):u.y=h.y+h.height||u.y),u.text[0]!==void 0&&(this.rect(u.x,u.y,u.width,u.height,e===!0?"FD":void 0),u.align==="right"?this.text(u.text,u.x+u.width-p,u.y+p,{align:"right",baseline:"top"}):u.align==="center"?this.text(u.text,u.x+u.width/2,u.y+p,{align:"center",baseline:"top",maxWidth:u.width-p-p}):this.text(u.text,u.x+p,u.y+p,{align:"left",baseline:"top",maxWidth:u.width-p-p})),this.internal.__cell__.lastCell=u,this};r.table=function(u,h,p,w,x){if(n.call(this),!p)throw new Error("No data for PDF table.");var g,P,C,B,S=[],G=[],V=[],M={},it={},vt=[],ct=[],K=(x=x||{}).autoSize||!1,R=x.printHeaders!==!1,tt=x.css&&x.css["font-size"]!==void 0?16*x.css["font-size"]:x.fontSize||12,L=x.margins||Object.assign({width:this.getPageWidth()},t),O=typeof x.padding=="number"?x.padding:3,z=x.headerBackgroundColor||"#c8c8c8",U=x.headerTextColor||"#000";if(a.call(this),this.internal.__cell__.printHeaders=R,this.internal.__cell__.margins=L,this.internal.__cell__.table_font_size=tt,this.internal.__cell__.padding=O,this.internal.__cell__.headerBackgroundColor=z,this.internal.__cell__.headerTextColor=U,this.setFontSize(tt),w==null)G=S=Object.keys(p[0]),V=S.map(function(){return"left"});else if(Array.isArray(w)&&ye(w[0])==="object")for(S=w.map(function(_t){return _t.name}),G=w.map(function(_t){return _t.prompt||_t.name||""}),V=w.map(function(_t){return _t.align||"left"}),g=0;g<w.length;g+=1)it[w[g].name]=.7499990551181103*w[g].width;else Array.isArray(w)&&typeof w[0]=="string"&&(G=S=w,V=S.map(function(){return"left"}));if(K||Array.isArray(w)&&typeof w[0]=="string")for(g=0;g<S.length;g+=1){for(M[B=S[g]]=p.map(function(_t){return _t[B]}),this.setFont(void 0,"bold"),vt.push(this.getTextDimensions(G[g],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w),P=M[B],this.setFont(void 0,"normal"),C=0;C<P.length;C+=1)vt.push(this.getTextDimensions(P[C],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w);it[B]=Math.max.apply(null,vt)+O+O,vt=[]}if(R){var nt={};for(g=0;g<S.length;g+=1)nt[S[g]]={},nt[S[g]].text=G[g],nt[S[g]].align=V[g];var st=l.call(this,nt,it);ct=S.map(function(_t){return new i(u,h,it[_t],st,nt[_t].text,void 0,nt[_t].align)}),this.setTableHeaderRow(ct),this.printHeaderRow(1,!1)}var ut=w.reduce(function(_t,wt){return _t[wt.name]=wt.align,_t},{});for(g=0;g<p.length;g+=1){"rowStart"in x&&x.rowStart instanceof Function&&x.rowStart({row:g,data:p[g]},this);var rt=l.call(this,p[g],it);for(C=0;C<S.length;C+=1){var ht=p[g][S[C]];"cellStart"in x&&x.cellStart instanceof Function&&x.cellStart({row:g,col:C,data:ht},this),f.call(this,new i(u,h,it[S[C]],rt,ht,g+2,ut[S[C]]))}}return this.internal.__cell__.table_x=u,this.internal.__cell__.table_y=h,this};var l=function(u,h){var p=this.internal.__cell__.padding,w=this.internal.__cell__.table_font_size,x=this.internal.scaleFactor;return Object.keys(u).map(function(g){var P=u[g];return this.splitTextToSize(P.hasOwnProperty("text")?P.text:P,h[g]-p-p)},this).map(function(g){return this.getLineHeightFactor()*g.length*w/x+p+p},this).reduce(function(g,P){return Math.max(g,P)},0)};r.setTableHeaderRow=function(u){n.call(this),this.internal.__cell__.tableHeaderRow=u},r.printHeaderRow=function(u,h){if(n.call(this),!this.internal.__cell__.tableHeaderRow)throw new Error("Property tableHeaderRow does not exist.");var p;if(e=!0,typeof this.internal.__cell__.headerFunction=="function"){var w=this.internal.__cell__.headerFunction(this,this.internal.__cell__.pages);this.internal.__cell__.lastCell=new i(w[0],w[1],w[2],w[3],void 0,-1)}this.setFont(void 0,"bold");for(var x=[],g=0;g<this.internal.__cell__.tableHeaderRow.length;g+=1){p=this.internal.__cell__.tableHeaderRow[g].clone(),h&&(p.y=this.internal.__cell__.margins.top||0,x.push(p)),p.lineNumber=u;var P=this.getTextColor();this.setTextColor(this.internal.__cell__.headerTextColor),this.setFillColor(this.internal.__cell__.headerBackgroundColor),f.call(this,p),this.setTextColor(P)}x.length>0&&this.setTableHeaderRow(x),this.setFont(void 0,"normal"),e=!1}})(Rt.API);var eh={italic:["italic","oblique","normal"],oblique:["oblique","italic","normal"],normal:["normal","oblique","italic"]},rh=["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded"],rl=th(rh),nh=[100,200,300,400,500,600,700,800,900],N2=th(nh);function Ts(r){var t=r.family.replace(/"|'/g,"").toLowerCase(),e=(function(i){return eh[i=i||"normal"]?i:"normal"})(r.style),n=(function(i){return i?typeof i=="number"?i>=100&&i<=900&&i%100==0?i:400:/^\d00$/.test(i)?parseInt(i):i==="bold"?700:400:400})(r.weight),a=(function(i){return typeof rl[i=i||"normal"]=="number"?i:"normal"})(r.stretch);return{family:t,style:e,weight:n,stretch:a,src:r.src||[],ref:r.ref||{name:t,style:[a,e,n].join(" ")}}}function Wu(r,t,e,n){var a;for(a=e;a>=0&&a<t.length;a+=n)if(r[t[a]])return r[t[a]];for(a=e;a>=0&&a<t.length;a-=n)if(r[t[a]])return r[t[a]]}var L2={"sans-serif":"helvetica",fixed:"courier",monospace:"courier",terminal:"courier",cursive:"times",fantasy:"times",serif:"times"},Gu={caption:"times",icon:"times",menu:"times","message-box":"times","small-caption":"times","status-bar":"times"};function Vu(r){return[r.stretch,r.style,r.weight,r.family].join(" ")}function Yu(r){return r.trimLeft()}function S2(r,t){for(var e=0;e<r.length;){if(r.charAt(e)===t)return[r.substring(0,e),r.substring(e+1)];e+=1}return null}function k2(r){var t=r.match(/^(-[a-z_]|[a-z_])[a-z0-9_-]*/i);return t===null?null:[t[0],r.substring(t[0].length)]}var So,Ju,Ku,Wi,ko,$u,Xu,Zu,Ms=["times"];function Qu(r,t,e,n,a){var i=4,f=ef;switch(a){case Rt.API.image_compression.FAST:i=1,f=tf;break;case Rt.API.image_compression.MEDIUM:i=6,f=rf;break;case Rt.API.image_compression.SLOW:i=9,f=nf}r=(function(u,h,p,w){for(var x,g=u.length/h,P=new Uint8Array(u.length+g),C=[P2,tf,ef,rf,nf],B=0;B<g;B+=1){var S=B*h,G=u.subarray(S,S+h);if(w)P.set(w(G,p,x),S+B);else{for(var V=C.length,M=[],it=0;it<V;it+=1)M[it]=C[it](G,p,x);var vt=F2(M.concat());P.set(M[vt],S+B)}x=G}return P})(r,t,Math.ceil(e*n/8),f);var l=Ks(r,{level:i});return Rt.API.__addimage__.arrayBufferToBinaryString(l)}function P2(r){var t=Array.apply([],r);return t.unshift(0),t}function tf(r,t){var e=r.length,n=[];n[0]=1;for(var a=0;a<e;a+=1){var i=r[a-t]||0;n[a+1]=r[a]-i+256&255}return n}function ef(r,t,e){var n=r.length,a=[];a[0]=2;for(var i=0;i<n;i+=1){var f=e&&e[i]||0;a[i+1]=r[i]-f+256&255}return a}function rf(r,t,e){var n=r.length,a=[];a[0]=3;for(var i=0;i<n;i+=1){var f=r[i-t]||0,l=e&&e[i]||0;a[i+1]=r[i]+256-(f+l>>>1)&255}return a}function nf(r,t,e){var n=r.length,a=[];a[0]=4;for(var i=0;i<n;i+=1){var f=C2(r[i-t]||0,e&&e[i]||0,e&&e[i-t]||0);a[i+1]=r[i]-f+256&255}return a}function C2(r,t,e){if(r===t&&t===e)return r;var n=Math.abs(t-e),a=Math.abs(r-e),i=Math.abs(r+t-e-e);return n<=a&&n<=i?r:a<=i?t:e}function F2(r){var t=r.map(function(e){return e.reduce(function(n,a){return n+Math.abs(a)},0)});return t.indexOf(Math.min.apply(null,t))}function qs(r,t,e){var n=t*e,a=Math.floor(n/8),i=16-(n-8*a+e),f=(1<<e)-1;return ih(r,a)>>i&f}function af(r,t,e,n){var a=e*n,i=Math.floor(a/8),f=16-(a-8*i+n),l=(1<<n)-1,u=(t&l)<<f;(function(h,p,w){if(p+1<h.byteLength)h.setUint16(p,w,!1);else{var x=w>>8&255;h.setUint8(p,x)}})(r,i,ih(r,i)&~(l<<f)&65535|u)}function ih(r,t){return t+1<r.byteLength?r.getUint16(t,!1):r.getUint8(t)<<8}function I2(r){var t=0;if(r[t++]!==71||r[t++]!==73||r[t++]!==70||r[t++]!==56||(r[t++]+1&253)!=56||r[t++]!==97)throw new Error("Invalid GIF 87a/89a header.");var e=r[t++]|r[t++]<<8,n=r[t++]|r[t++]<<8,a=r[t++],i=a>>7,f=1<<1+(7&a);r[t++],r[t++];var l=null,u=null;i&&(l=t,u=f,t+=3*f);var h=!0,p=[],w=0,x=null,g=0,P=null;for(this.width=e,this.height=n;h&&t<r.length;)switch(r[t++]){case 33:switch(r[t++]){case 255:if(r[t]!==11||r[t+1]==78&&r[t+2]==69&&r[t+3]==84&&r[t+4]==83&&r[t+5]==67&&r[t+6]==65&&r[t+7]==80&&r[t+8]==69&&r[t+9]==50&&r[t+10]==46&&r[t+11]==48&&r[t+12]==3&&r[t+13]==1&&r[t+16]==0)t+=14,P=r[t++]|r[t++]<<8,t++;else for(t+=12;;){if(!((L=r[t++])>=0))throw Error("Invalid block size");if(L===0)break;t+=L}break;case 249:if(r[t++]!==4||r[t+4]!==0)throw new Error("Invalid graphics extension block.");var C=r[t++];w=r[t++]|r[t++]<<8,x=r[t++],1&C||(x=null),g=C>>2&7,t++;break;case 254:for(;;){if(!((L=r[t++])>=0))throw Error("Invalid block size");if(L===0)break;t+=L}break;default:throw new Error("Unknown graphic control label: 0x"+r[t-1].toString(16))}break;case 44:var B=r[t++]|r[t++]<<8,S=r[t++]|r[t++]<<8,G=r[t++]|r[t++]<<8,V=r[t++]|r[t++]<<8,M=r[t++],it=M>>6&1,vt=1<<1+(7&M),ct=l,K=u,R=!1;M>>7&&(R=!0,ct=t,K=vt,t+=3*vt);var tt=t;for(t++;;){var L;if(!((L=r[t++])>=0))throw Error("Invalid block size");if(L===0)break;t+=L}p.push({x:B,y:S,width:G,height:V,has_local_palette:R,palette_offset:ct,palette_size:K,data_offset:tt,data_length:t-tt,transparent_index:x,interlaced:!!it,delay:w,disposal:g});break;case 59:h=!1;break;default:throw new Error("Unknown gif block: 0x"+r[t-1].toString(16))}this.numFrames=function(){return p.length},this.loopCount=function(){return P},this.frameInfo=function(O){if(O<0||O>=p.length)throw new Error("Frame index out of range.");return p[O]},this.decodeAndBlitFrameBGRA=function(O,z){var U=this.frameInfo(O),nt=U.width*U.height,st=new Uint8Array(nt);of(r,U.data_offset,st,nt);var ut=U.palette_offset,rt=U.transparent_index;rt===null&&(rt=256);var ht=U.width,_t=e-ht,wt=ht,_=4*(U.y*e+U.x),D=4*((U.y+U.height)*e+U.x),T=_,H=4*_t;U.interlaced===!0&&(H+=4*e*7);for(var J=8,Z=0,at=st.length;Z<at;++Z){var ot=st[Z];if(wt===0&&(wt=ht,(T+=H)>=D&&(H=4*_t+4*e*(J-1),T=_+(ht+_t)*(J<<1),J>>=1)),ot===rt)T+=4;else{var gt=r[ut+3*ot],At=r[ut+3*ot+1],kt=r[ut+3*ot+2];z[T++]=kt,z[T++]=At,z[T++]=gt,z[T++]=255}--wt}},this.decodeAndBlitFrameRGBA=function(O,z){var U=this.frameInfo(O),nt=U.width*U.height,st=new Uint8Array(nt);of(r,U.data_offset,st,nt);var ut=U.palette_offset,rt=U.transparent_index;rt===null&&(rt=256);var ht=U.width,_t=e-ht,wt=ht,_=4*(U.y*e+U.x),D=4*((U.y+U.height)*e+U.x),T=_,H=4*_t;U.interlaced===!0&&(H+=4*e*7);for(var J=8,Z=0,at=st.length;Z<at;++Z){var ot=st[Z];if(wt===0&&(wt=ht,(T+=H)>=D&&(H=4*_t+4*e*(J-1),T=_+(ht+_t)*(J<<1),J>>=1)),ot===rt)T+=4;else{var gt=r[ut+3*ot],At=r[ut+3*ot+1],kt=r[ut+3*ot+2];z[T++]=gt,z[T++]=At,z[T++]=kt,z[T++]=255}--wt}}}function of(r,t,e,n){for(var a=r[t++],i=1<<a,f=i+1,l=f+1,u=a+1,h=(1<<u)-1,p=0,w=0,x=0,g=r[t++],P=new Int32Array(4096),C=null;;){for(;p<16&&g!==0;)w|=r[t++]<<p,p+=8,g===1?g=r[t++]:--g;if(p<u)break;var B=w&h;if(w>>=u,p-=u,B!==i){if(B===f)break;for(var S=B<l?B:C,G=0,V=S;V>i;)V=P[V]>>8,++G;var M=V;if(x+G+(S!==B?1:0)>n)return void Le.log("Warning, gif stream longer than expected.");e[x++]=M;var it=x+=G;for(S!==B&&(e[x++]=M),V=S;G--;)V=P[V],e[--it]=255&V,V>>=8;C!==null&&l<4096&&(P[l++]=C<<8|M,l>=h+1&&u<12&&(++u,h=h<<1|1)),C=B}else l=f+1,h=(1<<(u=a+1))-1,C=null}return x!==n&&Le.log("Warning, gif stream shorter than expected."),e}function Us(r){var t,e,n,a,i,f=Math.floor,l=new Array(64),u=new Array(64),h=new Array(64),p=new Array(64),w=new Array(65535),x=new Array(65535),g=new Array(64),P=new Array(64),C=[],B=0,S=7,G=new Array(64),V=new Array(64),M=new Array(64),it=new Array(256),vt=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],K=[0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0],R=[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],L=[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],z=[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],nt=[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(_,D){for(var T=0,H=0,J=new Array,Z=1;Z<=16;Z++){for(var at=1;at<=_[Z];at++)J[D[H]]=[],J[D[H]][0]=T,J[D[H]][1]=Z,H++,T++;T*=2}return J}function ut(_){for(var D=_[0],T=_[1]-1;T>=0;)D&1<<T&&(B|=1<<S),T--,--S<0&&(B==255?(rt(255),rt(0)):rt(B),S=7,B=0)}function rt(_){C.push(_)}function ht(_){rt(_>>8&255),rt(255&_)}function _t(_,D,T,H,J){for(var Z,at=J[0],ot=J[240],gt=(function(yt,Wt){var Ct,zt,qt,me,ue,Zt,he,fe,jt,ee,Tt=0;for(jt=0;jt<8;++jt){Ct=yt[Tt],zt=yt[Tt+1],qt=yt[Tt+2],me=yt[Tt+3],ue=yt[Tt+4],Zt=yt[Tt+5],he=yt[Tt+6];var Me=Ct+(fe=yt[Tt+7]),pe=Ct-fe,oe=zt+he,se=zt-he,Ie=qt+Zt,Ut=qt-Zt,Se=me+ue,Yt=me-ue,Qt=Me+Se,Ee=Me-Se,le=oe+Ie,Gt=oe-Ie;yt[Tt]=Qt+le,yt[Tt+4]=Qt-le;var be=.707106781*(Gt+Ee);yt[Tt+2]=Ee+be,yt[Tt+6]=Ee-be;var ii=.382683433*((Qt=Yt+Ut)-(Gt=se+pe)),fr=.5411961*Qt+ii,gn=1.306562965*Gt+ii,en=.707106781*(le=Ut+se),Vt=pe+en,vn=pe-en;yt[Tt+5]=vn+fr,yt[Tt+3]=vn-fr,yt[Tt+1]=Vt+gn,yt[Tt+7]=Vt-gn,Tt+=8}for(Tt=0,jt=0;jt<8;++jt){Ct=yt[Tt],zt=yt[Tt+8],qt=yt[Tt+16],me=yt[Tt+24],ue=yt[Tt+32],Zt=yt[Tt+40],he=yt[Tt+48];var mn=Ct+(fe=yt[Tt+56]),Or=Ct-fe,jr=zt+he,Be=zt-he,rr=qt+Zt,ir=qt-Zt,ai=me+ue,Tn=me-ue,Hr=mn+ai,rn=mn-ai,Wr=jr+rr,Gr=jr-rr;yt[Tt]=Hr+Wr,yt[Tt+32]=Hr-Wr;var Br=.707106781*(Gr+rn);yt[Tt+16]=rn+Br,yt[Tt+48]=rn-Br;var oi=.382683433*((Hr=Tn+ir)-(Gr=Be+Or)),nn=.5411961*Hr+oi,si=1.306562965*Gr+oi,Ci=.707106781*(Wr=ir+Be),Fi=Or+Ci,Ii=Or-Ci;yt[Tt+40]=Ii+nn,yt[Tt+24]=Ii-nn,yt[Tt+8]=Fi+si,yt[Tt+56]=Fi-si,Tt++}for(jt=0;jt<64;++jt)ee=yt[jt]*Wt[jt],g[jt]=ee>0?ee+.5|0:ee-.5|0;return g})(_,D),At=0;At<64;++At)P[ct[At]]=gt[At];var kt=P[0]-T;T=P[0],kt==0?ut(H[0]):(ut(H[x[Z=32767+kt]]),ut(w[Z]));for(var St=63;St>0&&P[St]==0;)St--;if(St==0)return ut(at),T;for(var Mt,F=1;F<=St;){for(var Lt=F;P[F]==0&&F<=St;)++F;var ae=F-Lt;if(ae>=16){Mt=ae>>4;for(var Ht=1;Ht<=Mt;++Ht)ut(ot);ae&=15}Z=32767+P[F],ut(J[(ae<<4)+x[Z]]),ut(w[Z]),F++}return St!=63&&ut(at),T}function wt(_){_=Math.min(Math.max(_,1),100),i!=_&&((function(D){for(var T=[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],H=0;H<64;H++){var J=f((T[H]*D+50)/100);J=Math.min(Math.max(J,1),255),l[ct[H]]=J}for(var Z=[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=f((Z[at]*D+50)/100);ot=Math.min(Math.max(ot,1),255),u[ct[at]]=ot}for(var gt=[1,1.387039845,1.306562965,1.175875602,1,.785694958,.5411961,.275899379],At=0,kt=0;kt<8;kt++)for(var St=0;St<8;St++)h[At]=1/(l[ct[At]]*gt[kt]*gt[St]*8),p[At]=1/(u[ct[At]]*gt[kt]*gt[St]*8),At++})(_<50?Math.floor(5e3/_):Math.floor(200-2*_)),i=_)}this.encode=function(_,D){D&&wt(D),C=new Array,B=0,S=7,ht(65496),ht(65504),ht(16),rt(74),rt(70),rt(73),rt(70),rt(0),rt(1),rt(1),rt(0),ht(1),ht(1),rt(0),rt(0),(function(){ht(65499),ht(132),rt(0);for(var zt=0;zt<64;zt++)rt(l[zt]);rt(1);for(var qt=0;qt<64;qt++)rt(u[qt])})(),(function(zt,qt){ht(65472),ht(17),rt(8),ht(qt),ht(zt),rt(3),rt(1),rt(17),rt(0),rt(2),rt(17),rt(1),rt(3),rt(17),rt(1)})(_.width,_.height),(function(){ht(65476),ht(418),rt(0);for(var zt=0;zt<16;zt++)rt(K[zt+1]);for(var qt=0;qt<=11;qt++)rt(R[qt]);rt(16);for(var me=0;me<16;me++)rt(tt[me+1]);for(var ue=0;ue<=161;ue++)rt(L[ue]);rt(1);for(var Zt=0;Zt<16;Zt++)rt(O[Zt+1]);for(var he=0;he<=11;he++)rt(z[he]);rt(17);for(var fe=0;fe<16;fe++)rt(U[fe+1]);for(var jt=0;jt<=161;jt++)rt(nt[jt])})(),ht(65498),ht(12),rt(3),rt(1),rt(0),rt(2),rt(17),rt(3),rt(17),rt(0),rt(63),rt(0);var T=0,H=0,J=0;B=0,S=7,this.encode.displayName="_encode_";for(var Z,at,ot,gt,At,kt,St,Mt,F,Lt=_.data,ae=_.width,Ht=_.height,yt=4*ae,Wt=0;Wt<Ht;){for(Z=0;Z<yt;){for(At=yt*Wt+Z,St=-1,Mt=0,F=0;F<64;F++)kt=At+(Mt=F>>3)*yt+(St=4*(7&F)),Wt+Mt>=Ht&&(kt-=yt*(Wt+1+Mt-Ht)),Z+St>=yt&&(kt-=Z+St-yt+4),at=Lt[kt++],ot=Lt[kt++],gt=Lt[kt++],G[F]=(vt[at]+vt[ot+256|0]+vt[gt+512|0]>>16)-128,V[F]=(vt[at+768|0]+vt[ot+1024|0]+vt[gt+1280|0]>>16)-128,M[F]=(vt[at+1280|0]+vt[ot+1536|0]+vt[gt+1792|0]>>16)-128;T=_t(G,h,T,t,n),H=_t(V,p,H,e,a),J=_t(M,p,J,e,a),Z+=32}Wt+=8}if(S>=0){var Ct=[];Ct[1]=S+1,Ct[0]=(1<<S+1)-1,ut(Ct)}return ht(65497),new Uint8Array(C)},r=r||50,(function(){for(var _=String.fromCharCode,D=0;D<256;D++)it[D]=_(D)})(),t=st(K,R),e=st(O,z),n=st(tt,L),a=st(U,nt),(function(){for(var _=1,D=2,T=1;T<=15;T++){for(var H=_;H<D;H++)x[32767+H]=T,w[32767+H]=[],w[32767+H][1]=T,w[32767+H][0]=H;for(var J=-(D-1);J<=-_;J++)x[32767+J]=T,w[32767+J]=[],w[32767+J][1]=T,w[32767+J][0]=D-1+J;_<<=1,D<<=1}})(),(function(){for(var _=0;_<256;_++)vt[_]=19595*_,vt[_+256|0]=38470*_,vt[_+512|0]=7471*_+32768,vt[_+768|0]=-11059*_,vt[_+1024|0]=-21709*_,vt[_+1280|0]=32768*_+8421375,vt[_+1536|0]=-27439*_,vt[_+1792|0]=-5329*_})(),wt(r)}function Xr(r,t){if(this.pos=0,this.buffer=r,this.datav=new DataView(r.buffer),this.is_with_alpha=!!t,this.bottom_up=!0,this.flag=String.fromCharCode(this.buffer[0])+String.fromCharCode(this.buffer[1]),this.pos+=2,["BM","BA","CI","CP","IC","PT"].indexOf(this.flag)===-1)throw new Error("Invalid BMP File");this.parseHeader(),this.parseBGR()}function sf(r){function t(R){if(!R)throw Error("assert :P")}function e(R,tt,L){for(var O=0;4>O;O++)if(R[tt+O]!=L.charCodeAt(O))return!0;return!1}function n(R,tt,L,O,z){for(var U=0;U<z;U++)R[tt+U]=L[O+U]}function a(R,tt,L,O){for(var z=0;z<O;z++)R[tt+z]=L}function i(R){return new Int32Array(R)}function f(R,tt){for(var L=[],O=0;O<R;O++)L.push(new tt);return L}function l(R,tt){var L=[];return(function O(z,U,nt){for(var st=nt[U],ut=0;ut<st&&(z.push(nt.length>U+1?[]:new tt),!(nt.length<U+1));ut++)O(z[ut],U+1,nt)})(L,0,R),L}var u=function(){var R=this;function tt(o,s){for(var d=1<<s-1>>>0;o&d;)d>>>=1;return d?(o&d-1)+d:o}function L(o,s,d,v,b){t(!(v%d));do o[s+(v-=d)]=b;while(0<v)}function O(o,s,d,v,b){if(t(2328>=b),512>=b)var y=i(512);else if((y=i(b))==null)return 0;return(function(A,N,k,I,W,et){var E,Y,X=N,lt=1<<k,Q=i(16),ft=i(16);for(t(W!=0),t(I!=null),t(A!=null),t(0<k),Y=0;Y<W;++Y){if(15<I[Y])return 0;++Q[I[Y]]}if(Q[0]==W)return 0;for(ft[1]=0,E=1;15>E;++E){if(Q[E]>1<<E)return 0;ft[E+1]=ft[E]+Q[E]}for(Y=0;Y<W;++Y)E=I[Y],0<I[Y]&&(et[ft[E]++]=Y);if(ft[15]==1)return(I=new z).g=0,I.value=et[0],L(A,X,1,lt,I),lt;var pt,xt=-1,bt=lt-1,Dt=0,Pt=1,ne=1,Et=1<<k;for(Y=0,E=1,W=2;E<=k;++E,W<<=1){if(Pt+=ne<<=1,0>(ne-=Q[E]))return 0;for(;0<Q[E];--Q[E])(I=new z).g=E,I.value=et[Y++],L(A,X+Dt,W,Et,I),Dt=tt(Dt,E)}for(E=k+1,W=2;15>=E;++E,W<<=1){if(Pt+=ne<<=1,0>(ne-=Q[E]))return 0;for(;0<Q[E];--Q[E]){if(I=new z,(Dt&bt)!=xt){for(X+=Et,pt=1<<(xt=E)-k;15>xt&&!(0>=(pt-=Q[xt]));)++xt,pt<<=1;lt+=Et=1<<(pt=xt-k),A[N+(xt=Dt&bt)].g=pt+k,A[N+xt].value=X-N-xt}I.g=E-k,I.value=et[Y++],L(A,X+(Dt>>k),W,Et,I),Dt=tt(Dt,E)}}return Pt!=2*ft[15]-1?0:lt})(o,s,d,v,b,y)}function z(){this.value=this.g=0}function U(){this.value=this.g=0}function nt(){this.G=f(5,z),this.H=i(5),this.jc=this.Qb=this.qb=this.nd=0,this.pd=f(bi,U)}function st(o,s,d,v){t(o!=null),t(s!=null),t(2147483648>v),o.Ca=254,o.I=0,o.b=-8,o.Ka=0,o.oa=s,o.pa=d,o.Jd=s,o.Yc=d+v,o.Zc=4<=v?d+v-4+1:d,at(o)}function ut(o,s){for(var d=0;0<s--;)d|=gt(o,128)<<s;return d}function rt(o,s){var d=ut(o,s);return ot(o)?-d:d}function ht(o,s,d,v){var b,y=0;for(t(o!=null),t(s!=null),t(4294967288>v),o.Sb=v,o.Ra=0,o.u=0,o.h=0,4<v&&(v=4),b=0;b<v;++b)y+=s[d+b]<<8*b;o.Ra=y,o.bb=v,o.oa=s,o.pa=d}function _t(o){for(;8<=o.u&&o.bb<o.Sb;)o.Ra>>>=8,o.Ra+=o.oa[o.pa+o.bb]<<zn-8>>>0,++o.bb,o.u-=8;H(o)&&(o.h=1,o.u=0)}function wt(o,s){if(t(0<=s),!o.h&&s<=Nr){var d=T(o)&_r[s];return o.u+=s,_t(o),d}return o.h=1,o.u=0}function _(){this.b=this.Ca=this.I=0,this.oa=[],this.pa=0,this.Jd=[],this.Yc=0,this.Zc=[],this.Ka=0}function D(){this.Ra=0,this.oa=[],this.h=this.u=this.bb=this.Sb=this.pa=0}function T(o){return o.Ra>>>(o.u&zn-1)>>>0}function H(o){return t(o.bb<=o.Sb),o.h||o.bb==o.Sb&&o.u>zn}function J(o,s){o.u=s,o.h=H(o)}function Z(o){o.u>=Pn&&(t(o.u>=Pn),_t(o))}function at(o){t(o!=null&&o.oa!=null),o.pa<o.Zc?(o.I=(o.oa[o.pa++]|o.I<<8)>>>0,o.b+=8):(t(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 ut(o,1)}function gt(o,s){var d=o.Ca;0>o.b&&at(o);var v=o.b,b=d*s>>>8,y=(o.I>>>v>b)+0;for(y?(d-=b,o.I-=b+1<<v>>>0):d=b+1,v=d,b=0;256<=v;)b+=8,v>>=8;return v=7^b+Hn[v],o.b-=v,o.Ca=(d<<v)-1,y}function At(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 Mt(o,s){return kt(o,s)|kt(o,s+2)<<16}function F(o,s){var d=1<<s;return t(o!=null),t(0<s),o.X=i(d),o.X==null?0:(o.Mb=32-s,o.Xa=s,1)}function Lt(o,s){t(o!=null),t(s!=null),t(o.Xa==s.Xa),n(s.X,0,o.X,0,1<<s.Xa)}function ae(){this.X=[],this.Xa=this.Mb=0}function Ht(o,s,d,v){t(d!=null),t(v!=null);var b=d[0],y=v[0];return b==0&&(b=(o*y+s/2)/s),y==0&&(y=(s*b+o/2)/o),0>=b||0>=y?0:(d[0]=b,v[0]=y,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 Ct(o,s){R[s]=function(d,v,b,y,A,N,k){var I;for(I=0;I<A;++I){var W=R[o](N[k+I-1],b,y+I);N[k+I]=Wt(d[v+I],W)}}}function zt(){this.ud=this.hd=this.jd=0}function qt(o,s){return((4278124286&(o^s))>>>1)+(o&s)>>>0}function me(o){return 0<=o&&256>o?o:0>o?0:255<o?255:void 0}function ue(o,s){return me(o+(o-s+.5>>1))}function Zt(o,s,d){return Math.abs(s-d)-Math.abs(o-d)}function he(o,s,d,v,b,y,A){for(v=y[A-1],d=0;d<b;++d)y[A+d]=v=Wt(o[s+d],v)}function fe(o,s,d,v,b){var y;for(y=0;y<d;++y){var A=o[s+y],N=A>>8&255,k=16711935&(k=(k=16711935&A)+((N<<16)+N));v[b+y]=(4278255360&A)+k>>>0}}function jt(o,s){s.jd=255&o,s.hd=o>>8&255,s.ud=o>>16&255}function ee(o,s,d,v,b,y){var A;for(A=0;A<v;++A){var N=s[d+A],k=N>>>8,I=N,W=255&(W=(W=N>>>16)+((o.jd<<24>>24)*(k<<24>>24)>>>5));I=255&(I=(I+=(o.hd<<24>>24)*(k<<24>>24)>>>5)+((o.ud<<24>>24)*(W<<24>>24)>>>5)),b[y+A]=(4278255360&N)+(W<<16)+I}}function Tt(o,s,d,v,b){R[s]=function(y,A,N,k,I,W,et,E,Y){for(k=et;k<E;++k)for(et=0;et<Y;++et)I[W++]=b(N[v(y[A++])])},R[o]=function(y,A,N,k,I,W,et){var E=8>>y.b,Y=y.Ea,X=y.K[0],lt=y.w;if(8>E)for(y=(1<<y.b)-1,lt=(1<<E)-1;A<N;++A){var Q,ft=0;for(Q=0;Q<Y;++Q)Q&y||(ft=v(k[I++])),W[et++]=b(X[ft<]),ft>>=E}else R["VP8LMapColor"+d](k,I,X,lt,W,et,A,N,Y)}}function Me(o,s,d,v,b){for(d=s+d;s<d;){var y=o[s++];v[b++]=y>>16&255,v[b++]=y>>8&255,v[b++]=255&y}}function pe(o,s,d,v,b){for(d=s+d;s<d;){var y=o[s++];v[b++]=y>>16&255,v[b++]=y>>8&255,v[b++]=255&y,v[b++]=y>>24&255}}function oe(o,s,d,v,b){for(d=s+d;s<d;){var y=(A=o[s++])>>16&240|A>>12&15,A=240&A|A>>28&15;v[b++]=y,v[b++]=A}}function se(o,s,d,v,b){for(d=s+d;s<d;){var y=(A=o[s++])>>16&248|A>>13&7,A=A>>5&224|A>>3&31;v[b++]=y,v[b++]=A}}function Ie(o,s,d,v,b){for(d=s+d;s<d;){var y=o[s++];v[b++]=255&y,v[b++]=y>>8&255,v[b++]=y>>16&255}}function Ut(o,s,d,v,b,y){if(y==0)for(d=s+d;s<d;)At(v,((y=o[s++])[0]>>24|y[1]>>8&65280|y[2]<<8&16711680|y[3]<<24)>>>0),b+=32;else n(v,b,o,s,d)}function Se(o,s){R[s][0]=R[o+"0"],R[s][1]=R[o+"1"],R[s][2]=R[o+"2"],R[s][3]=R[o+"3"],R[s][4]=R[o+"4"],R[s][5]=R[o+"5"],R[s][6]=R[o+"6"],R[s][7]=R[o+"7"],R[s][8]=R[o+"8"],R[s][9]=R[o+"9"],R[s][10]=R[o+"10"],R[s][11]=R[o+"11"],R[s][12]=R[o+"12"],R[s][13]=R[o+"13"],R[s][14]=R[o+"0"],R[s][15]=R[o+"0"]}function Yt(o){return o==ss||o==ls||o==so||o==us}function Qt(){this.eb=[],this.size=this.A=this.fb=0}function Ee(){this.y=[],this.f=[],this.ea=[],this.F=[],this.Tc=this.Ed=this.Cd=this.Fd=this.lb=this.Db=this.Ab=this.fa=this.J=this.W=this.N=this.O=0}function le(){this.Rd=this.height=this.width=this.S=0,this.f={},this.f.RGBA=new Qt,this.f.kb=new Ee,this.sd=null}function Gt(){this.width=[0],this.height=[0],this.Pd=[0],this.Qd=[0],this.format=[0]}function be(){this.Id=this.fd=this.Md=this.hb=this.ib=this.da=this.bd=this.cd=this.j=this.v=this.Da=this.Sd=this.ob=0}function ii(o){return alert("todo:WebPSamplerProcessPlane"),o.T}function fr(o,s){var d=o.T,v=s.ba.f.RGBA,b=v.eb,y=v.fb+o.ka*v.A,A=Ur[s.ba.S],N=o.y,k=o.O,I=o.f,W=o.N,et=o.ea,E=o.W,Y=s.cc,X=s.dc,lt=s.Mc,Q=s.Nc,ft=o.ka,pt=o.ka+o.T,xt=o.U,bt=xt+1>>1;for(ft==0?A(N,k,null,null,I,W,et,E,I,W,et,E,b,y,null,null,xt):(A(s.ec,s.fc,N,k,Y,X,lt,Q,I,W,et,E,b,y-v.A,b,y,xt),++d);ft+2<pt;ft+=2)Y=I,X=W,lt=et,Q=E,W+=o.Rc,E+=o.Rc,y+=2*v.A,A(N,(k+=2*o.fa)-o.fa,N,k,Y,X,lt,Q,I,W,et,E,b,y-v.A,b,y,xt);return k+=o.fa,o.j+pt<o.o?(n(s.ec,s.fc,N,k,xt),n(s.cc,s.dc,I,W,bt),n(s.Mc,s.Nc,et,E,bt),d--):1&pt||A(N,k,null,null,I,W,et,E,I,W,et,E,b,y+v.A,null,null,xt),d}function gn(o,s,d){var v=o.F,b=[o.J];if(v!=null){var y=o.U,A=s.ba.S,N=A==oo||A==so;s=s.ba.f.RGBA;var k=[0],I=o.ka;k[0]=o.T,o.Kb&&(I==0?--k[0]:(--I,b[0]-=o.width),o.j+o.ka+o.T==o.o&&(k[0]=o.o-o.j-I));var W=s.eb;I=s.fb+I*s.A,o=bl(v,b[0],o.width,y,k,W,I+(N?0:3),s.A),t(d==k),o&&Yt(A)&&Aa(W,I,N,y,k,s.A)}return 0}function en(o){var s=o.ma,d=s.ba.S,v=11>d,b=d==io||d==ao||d==oo||d==os||d==12||Yt(d);if(s.memory=null,s.Ib=null,s.Jb=null,s.Nd=null,!pa(s.Oa,o,b?11:12))return 0;if(b&&Yt(d)&&ha(),o.da)alert("todo:use_scaling");else{if(v){if(s.Ib=ii,o.Kb){if(d=o.U+1>>1,s.memory=i(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=fr,ha()}}else alert("todo:EmitYUV");b&&(s.Jb=gn,v&&Yr())}if(v&&!jl){for(o=0;256>o;++o)qh[o]=89858*(o-128)+uo>>lo,Hh[o]=-22014*(o-128)+uo,zh[o]=-45773*(o-128),Uh[o]=113618*(o-128)+uo>>lo;for(o=Na;o<cs;++o)s=76283*(o-16)+uo>>lo,Wh[o-Na]=an(s,255),Gh[o-Na]=an(s+8>>4,15);jl=1}return 1}function Vt(o){var s=o.ma,d=o.U,v=o.T;return t(!(1&o.ka)),0>=d||0>=v?0:(d=s.Ib(o,s),s.Jb!=null&&s.Jb(o,s,d),s.Dc+=d,1)}function vn(o){o.ma.memory=null}function mn(o,s,d,v){return wt(o,8)!=47?0:(s[0]=wt(o,14)+1,d[0]=wt(o,14)+1,v[0]=wt(o,1),wt(o,3)!=0?0:!o.h)}function Or(o,s){if(4>o)return o+1;var d=o-2>>1;return(2+(1&o)<<d)+wt(s,d)+1}function jr(o,s){return 120<s?s-120:1<=(d=((d=Sh[s-1])>>4)*o+(8-(15&d)))?d:1;var d}function Be(o,s,d){var v=T(d),b=o[s+=255&v].g-8;return 0<b&&(J(d,d.u+8),v=T(d),s+=o[s].value,s+=v&(1<<b)-1),J(d,d.u+o[s].g),o[s].value}function rr(o,s,d){return d.g+=o.g,d.value+=o.value<<s>>>0,t(8>=d.g),o.g}function ir(o,s,d){var v=o.xc;return t((s=v==0?0:o.vc[o.md*(d>>v)+(s>>v)])<o.Wb),o.Ya[s]}function ai(o,s,d,v){var b=o.ab,y=o.c*s,A=o.C;s=A+s;var N=d,k=v;for(v=o.Ta,d=o.Ua;0<b--;){var I=o.gc[b],W=A,et=s,E=N,Y=k,X=(k=v,N=d,I.Ea);switch(t(W<et),t(et<=I.nc),I.hc){case 2:qe(E,Y,(et-W)*X,k,N);break;case 0:var lt=W,Q=et,ft=k,pt=N,xt=(Et=I).Ea;lt==0&&(va(E,Y,null,null,1,ft,pt),he(E,Y+1,0,0,xt-1,ft,pt+1),Y+=xt,pt+=xt,++lt);for(var bt=1<<Et.b,Dt=bt-1,Pt=yt(xt,Et.b),ne=Et.K,Et=Et.w+(lt>>Et.b)*Pt;lt<Q;){var ce=ne,Qe=Et,ie=1;for(Mi(E,Y,ft,pt-xt,1,ft,pt);ie<xt;){var Ot=(ie&~Dt)+bt;Ot>xt&&(Ot=xt),(0,ba[ce[Qe++]>>8&15])(E,Y+ +ie,ft,pt+ie-xt,Ot-ie,ft,pt+ie),ie=Ot}Y+=xt,pt+=xt,++lt&Dt||(Et+=Pt)}et!=I.nc&&n(k,N-X,k,N+(et-W-1)*X,X);break;case 1:for(X=E,Q=Y,xt=(E=I.Ea)-(pt=E&~(ft=(Y=1<<I.b)-1)),lt=yt(E,I.b),bt=I.K,I=I.w+(W>>I.b)*lt;W<et;){for(Dt=bt,Pt=I,ne=new zt,Et=Q+pt,ce=Q+E;Q<Et;)jt(Dt[Pt++],ne),wa(ne,X,Q,Y,k,N),Q+=Y,N+=Y;Q<ce&&(jt(Dt[Pt++],ne),wa(ne,X,Q,xt,k,N),Q+=xt,N+=xt),++W&ft||(I+=lt)}break;case 3:if(E==k&&Y==N&&0<I.b){for(Q=k,E=X=N+(et-W)*X-(pt=(et-W)*yt(I.Ea,I.b)),Y=k,ft=N,lt=[],pt=(xt=pt)-1;0<=pt;--pt)lt[pt]=Y[ft+pt];for(pt=xt-1;0<=pt;--pt)Q[E+pt]=lt[pt];to(I,W,et,k,X,k,N)}else to(I,W,et,E,Y,k,N)}N=v,k=d}k!=d&&n(v,d,N,k,y)}function Tn(o,s){var d=o.V,v=o.Ba+o.c*o.C,b=s-o.C;if(t(s<=o.l.o),t(16>=b),0<b){var y=o.l,A=o.Ta,N=o.Ua,k=y.width;if(ai(o,b,d,v),b=N=[N],t((d=o.C)<(v=s)),t(y.v<y.va),v>y.o&&(v=y.o),d<y.j){var I=y.j-d;d=y.j,b[0]+=I*k}if(d>=v?d=0:(b[0]+=4*y.v,y.ka=d-y.j,y.U=y.va-y.v,y.T=v-d,d=1),d){if(N=N[0],11>(d=o.ca).S){var W=d.f.RGBA,et=(v=d.S,b=y.U,y=y.T,I=W.eb,W.A),E=y;for(W=W.fb+o.Ma*W.A;0<E--;){var Y=A,X=N,lt=b,Q=I,ft=W;switch(v){case no:ya(Y,X,lt,Q,ft);break;case io:Wn(Y,X,lt,Q,ft);break;case ss:Wn(Y,X,lt,Q,ft),Aa(Q,ft,0,lt,1,0);break;case Ll:wi(Y,X,lt,Q,ft);break;case ao:Ut(Y,X,lt,Q,ft,1);break;case ls:Ut(Y,X,lt,Q,ft,1),Aa(Q,ft,0,lt,1,0);break;case oo:Ut(Y,X,lt,Q,ft,0);break;case so:Ut(Y,X,lt,Q,ft,0),Aa(Q,ft,1,lt,1,0);break;case os:Gn(Y,X,lt,Q,ft);break;case us:Gn(Y,X,lt,Q,ft),ml(Q,ft,lt,1,0);break;case Sl:Vn(Y,X,lt,Q,ft);break;default:t(0)}N+=k,W+=et}o.Ma+=y}else alert("todo:EmitRescaledRowsYUVA");t(o.Ma<=d.height)}}o.C=s,t(o.C<=o.i)}function Hr(o){var s;if(0<o.ua)return 0;for(s=0;s<o.Wb;++s){var d=o.Ya[s].G,v=o.Ya[s].H;if(0<d[1][v[1]+0].g||0<d[2][v[2]+0].g||0<d[3][v[3]+0].g)return 0}return 1}function rn(o,s,d,v,b,y){if(o.Z!=0){var A=o.qd,N=o.rd;for(t(Kn[o.Z]!=null);s<d;++s)Kn[o.Z](A,N,v,b,v,b,y),A=v,N=b,b+=y;o.qd=A,o.rd=N}}function Wr(o,s){var d=o.l.ma,v=d.Z==0||d.Z==1?o.l.j:o.C;if(v=o.C<v?v:o.C,t(s<=o.l.o),s>v){var b=o.l.width,y=d.ca,A=d.tb+b*v,N=o.V,k=o.Ba+o.c*v,I=o.gc;t(o.ab==1),t(I[0].hc==3),un(I[0],v,s,N,k,y,A),rn(d,v,s,y,A,b)}o.C=o.Ma=s}function Gr(o,s,d,v,b,y,A){var N=o.$/v,k=o.$%v,I=o.m,W=o.s,et=d+o.$,E=et;b=d+v*b;var Y=d+v*y,X=280+W.ua,lt=o.Pb?N:16777216,Q=0<W.ua?W.Wa:null,ft=W.wc,pt=et<Y?ir(W,k,N):null;t(o.C<y),t(Y<=b);var xt=!1;t:for(;;){for(;xt||et<Y;){var bt=0;if(N>=lt){var Dt=et-d;t((lt=o).Pb),lt.wd=lt.m,lt.xd=Dt,0<lt.s.ua&&Lt(lt.s.Wa,lt.s.vb),lt=N+Ph}if(k&ft||(pt=ir(W,k,N)),t(pt!=null),pt.Qb&&(s[et]=pt.qb,xt=!0),!xt)if(Z(I),pt.jc){bt=I,Dt=s;var Pt=et,ne=pt.pd[T(bt)&bi-1];t(pt.jc),256>ne.g?(J(bt,bt.u+ne.g),Dt[Pt]=ne.value,bt=0):(J(bt,bt.u+ne.g-256),t(256<=ne.value),bt=ne.value),bt==0&&(xt=!0)}else bt=Be(pt.G[0],pt.H[0],I);if(I.h)break;if(xt||256>bt){if(!xt)if(pt.nd)s[et]=(pt.qb|bt<<8)>>>0;else{if(Z(I),xt=Be(pt.G[1],pt.H[1],I),Z(I),Dt=Be(pt.G[2],pt.H[2],I),Pt=Be(pt.G[3],pt.H[3],I),I.h)break;s[et]=(Pt<<24|xt<<16|bt<<8|Dt)>>>0}if(xt=!1,++et,++k>=v&&(k=0,++N,A!=null&&N<=y&&!(N%16)&&A(o,N),Q!=null))for(;E<et;)bt=s[E++],Q.X[(506832829*bt&4294967295)>>>Q.Mb]=bt}else if(280>bt){if(bt=Or(bt-256,I),Dt=Be(pt.G[4],pt.H[4],I),Z(I),Dt=jr(v,Dt=Or(Dt,I)),I.h)break;if(et-d<Dt||b-et<bt)break t;for(Pt=0;Pt<bt;++Pt)s[et+Pt]=s[et+Pt-Dt];for(et+=bt,k+=bt;k>=v;)k-=v,++N,A!=null&&N<=y&&!(N%16)&&A(o,N);if(t(et<=b),k&ft&&(pt=ir(W,k,N)),Q!=null)for(;E<et;)bt=s[E++],Q.X[(506832829*bt&4294967295)>>>Q.Mb]=bt}else{if(!(bt<X))break t;for(xt=bt-280,t(Q!=null);E<et;)bt=s[E++],Q.X[(506832829*bt&4294967295)>>>Q.Mb]=bt;bt=et,t(!(xt>>>(Dt=Q).Xa)),s[bt]=Dt.X[xt],xt=!0}xt||t(I.h==H(I))}if(o.Pb&&I.h&&et<b)t(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(I.h)break t;A?.(o,N>y?y:N),o.a=0,o.$=et-d}return 1}return o.a=3,0}function Br(o){t(o!=null),o.vc=null,o.yc=null,o.Ya=null;var s=o.Wa;s!=null&&(s.X=null),o.vb=null,t(o!=null)}function oi(){var o=new Kt;return o==null?null:(o.a=0,o.xb=Cl,Se("Predictor","VP8LPredictors"),Se("Predictor","VP8LPredictors_C"),Se("PredictorAdd","VP8LPredictorsAdd"),Se("PredictorAdd","VP8LPredictorsAdd_C"),qe=fe,wa=ee,ya=Me,Wn=pe,Gn=oe,Vn=se,wi=Ie,R.VP8LMapColor32b=ln,R.VP8LMapColor8b=ma,o)}function nn(o,s,d,v,b){var y=1,A=[o],N=[s],k=v.m,I=v.s,W=null,et=0;t:for(;;){if(d)for(;y&&wt(k,1);){var E=A,Y=N,X=v,lt=1,Q=X.m,ft=X.gc[X.ab],pt=wt(Q,2);if(X.Oc&1<<pt)y=0;else{switch(X.Oc|=1<<pt,ft.hc=pt,ft.Ea=E[0],ft.nc=Y[0],ft.K=[null],++X.ab,t(4>=X.ab),pt){case 0:case 1:ft.b=wt(Q,3)+2,lt=nn(yt(ft.Ea,ft.b),yt(ft.nc,ft.b),0,X,ft.K),ft.K=ft.K[0];break;case 3:var xt,bt=wt(Q,8)+1,Dt=16<bt?0:4<bt?1:2<bt?2:3;if(E[0]=yt(ft.Ea,Dt),ft.b=Dt,xt=lt=nn(bt,1,0,X,ft.K)){var Pt,ne=bt,Et=ft,ce=1<<(8>>Et.b),Qe=i(ce);if(Qe==null)xt=0;else{var ie=Et.K[0],Ot=Et.w;for(Qe[0]=Et.K[0][0],Pt=1;Pt<1*ne;++Pt)Qe[Pt]=Wt(ie[Ot+Pt],Qe[Pt-1]);for(;Pt<4*ce;++Pt)Qe[Pt]=0;Et.K[0]=null,Et.K[0]=Qe,xt=1}}lt=xt;break;case 2:break;default:t(0)}y=lt}}if(A=A[0],N=N[0],y&&wt(k,1)&&!(y=1<=(et=wt(k,4))&&11>=et)){v.a=3;break t}var Nt;if(Nt=y)e:{var ze,te,de,Ce=v,sr=A,mr=N,De=et,hr=d,br=Ce.m,tr=Ce.s,ve=[null],xe=1,Re=0,Ae=kh[De];r:for(;;){if(hr&&wt(br,1)){var lr=wt(br,3)+2,Kr=yt(sr,lr),He=yt(mr,lr),yr=Kr*He;if(!nn(Kr,He,0,Ce,ve))break r;for(ve=ve[0],tr.xc=lr,ze=0;ze<yr;++ze){var Ne=ve[ze]>>8&65535;ve[ze]=Ne,Ne>=xe&&(xe=Ne+1)}}if(br.h)break r;for(te=0;5>te;++te){var er=kl[te];!te&&0<De&&(er+=1<<De),Re<er&&(Re=er)}var Sr=f(xe*Ae,z),wr=xe,kr=f(wr,nt);if(kr==null)var Pr=null;else t(65536>=wr),Pr=kr;var xr=i(Re);if(Pr==null||xr==null||Sr==null){Ce.a=1;break r}var Cr=Sr;for(ze=de=0;ze<xe;++ze){var Pe=Pr[ze],Fr=Pe.G,$r=Pe.H,xi=0,In=1,ur=0;for(te=0;5>te;++te){er=kl[te],Fr[te]=Cr,$r[te]=de,!te&&0<De&&(er+=1<<De);i:{var ho,ds=er,co=Ce,La=xr,Jh=Cr,Kh=de,ps=0,$n=co.m,$h=wt($n,1);if(a(La,0,0,ds),$h){var Xh=wt($n,1)+1,Zh=wt($n,1),Rl=wt($n,Zh==0?1:8);La[Rl]=1,Xh==2&&(La[Rl=wt($n,8)]=1);var po=1}else{var Tl=i(19),Ml=wt($n,4)+4;if(19<Ml){co.a=3;var go=0;break i}for(ho=0;ho<Ml;++ho)Tl[Lh[ho]]=wt($n,3);var gs=void 0,Sa=void 0,ql=co,Qh=Tl,vo=ds,Ul=La,vs=0,Xn=ql.m,zl=8,Hl=f(128,z);n:for(;O(Hl,0,7,Qh,19);){if(wt(Xn,1)){var tc=2+2*wt(Xn,3);if((gs=2+wt(Xn,tc))>vo)break n}else gs=vo;for(Sa=0;Sa<vo&&gs--;){Z(Xn);var Wl=Hl[0+(127&T(Xn))];J(Xn,Xn.u+Wl.g);var Ui=Wl.value;if(16>Ui)Ul[Sa++]=Ui,Ui!=0&&(zl=Ui);else{var ec=Ui==16,Gl=Ui-16,rc=_h[Gl],Vl=wt(Xn,Ah[Gl])+rc;if(Sa+Vl>vo)break n;for(var nc=ec?zl:0;0<Vl--;)Ul[Sa++]=nc}}vs=1;break n}vs||(ql.a=3),po=vs}(po=po&&!$n.h)&&(ps=O(Jh,Kh,8,La,ds)),po&&ps!=0?go=ps:(co.a=3,go=0)}if(go==0)break r;if(In&&Nh[te]==1&&(In=Cr[de].g==0),xi+=Cr[de].g,de+=go,3>=te){var ka,ms=xr[0];for(ka=1;ka<er;++ka)xr[ka]>ms&&(ms=xr[ka]);ur+=ms}}if(Pe.nd=In,Pe.Qb=0,In&&(Pe.qb=(Fr[3][$r[3]+0].value<<24|Fr[1][$r[1]+0].value<<16|Fr[2][$r[2]+0].value)>>>0,xi==0&&256>Fr[0][$r[0]+0].value&&(Pe.Qb=1,Pe.qb+=Fr[0][$r[0]+0].value<<8)),Pe.jc=!Pe.Qb&&6>ur,Pe.jc){var mo,En=Pe;for(mo=0;mo<bi;++mo){var Zn=mo,Qn=En.pd[Zn],bo=En.G[0][En.H[0]+Zn];256<=bo.value?(Qn.g=bo.g+256,Qn.value=bo.value):(Qn.g=0,Qn.value=0,Zn>>=rr(bo,8,Qn),Zn>>=rr(En.G[1][En.H[1]+Zn],16,Qn),Zn>>=rr(En.G[2][En.H[2]+Zn],0,Qn),rr(En.G[3][En.H[3]+Zn],24,Qn))}}}tr.vc=ve,tr.Wb=xe,tr.Ya=Pr,tr.yc=Sr,Nt=1;break e}Nt=0}if(!(y=Nt)){v.a=3;break t}if(0<et){if(I.ua=1<<et,!F(I.Wa,et)){v.a=1,y=0;break t}}else I.ua=0;var bs=v,Yl=A,ic=N,ws=bs.s,ys=ws.xc;if(bs.c=Yl,bs.i=ic,ws.md=yt(Yl,ys),ws.wc=ys==0?-1:(1<<ys)-1,d){v.xb=Bh;break t}if((W=i(A*N))==null){v.a=1,y=0;break t}y=(y=Gr(v,W,0,A,N,N,null))&&!k.h;break t}return y?(b!=null?b[0]=W:(t(W==null),t(d)),v.$=0,d||Br(I)):Br(I),y}function si(o,s){var d=o.c*o.i,v=d+s+16*s;return t(o.c<=s),o.V=i(v),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 Ci(o,s){var d=o.C,v=s-d,b=o.V,y=o.Ba+o.c*d;for(t(s<=o.l.o);0<v;){var A=16<v?16:v,N=o.l.ma,k=o.l.width,I=k*A,W=N.ca,et=N.tb+k*d,E=o.Ta,Y=o.Ua;ai(o,A,b,y),wl(E,Y,W,et,I),rn(N,d,d+A,W,et,k),v-=A,b+=A*o.c,d+=A}t(d==s),o.C=o.Ma=s}function Fi(){this.ub=this.yd=this.td=this.Rb=0}function Ii(){this.Kd=this.Ld=this.Ud=this.Td=this.i=this.c=0}function Ho(){this.Fb=this.Bb=this.Cb=0,this.Zb=i(4),this.Lb=i(4)}function ta(){this.Yb=(function(){var o=[];return(function s(d,v,b){for(var y=b[v],A=0;A<y&&(d.push(b.length>v+1?[]:0),!(b.length<v+1));A++)s(d[A],v+1,b)})(o,0,[3,11]),o})()}function Da(){this.jb=i(3),this.Wc=l([4,8],ta),this.Xc=l([4,17],ta)}function Ra(){this.Pc=this.wb=this.Tb=this.zd=0,this.vd=new i(4),this.od=new i(4)}function Dr(){this.ld=this.La=this.dd=this.tc=0}function ea(){this.Na=this.la=0}function Ta(){this.Sc=[0,0],this.Eb=[0,0],this.Qc=[0,0],this.ia=this.lc=0}function ra(){this.ad=i(384),this.Za=0,this.Ob=i(16),this.$b=this.Ad=this.ia=this.Gc=this.Hc=this.Dd=0}function Ma(){this.uc=this.M=this.Nb=0,this.wa=Array(new Dr),this.Y=0,this.ya=Array(new ra),this.aa=0,this.l=new Ei}function qa(){this.y=i(16),this.f=i(8),this.ea=i(8)}function Ua(){this.cb=this.a=0,this.sc="",this.m=new _,this.Od=new Fi,this.Kc=new Ii,this.ed=new Ra,this.Qa=new Ho,this.Ic=this.$c=this.Aa=0,this.D=new Ma,this.Xb=this.Va=this.Hb=this.zb=this.yb=this.Ub=this.za=0,this.Jc=f(8,_),this.ia=0,this.pb=f(4,Ta),this.Pa=new Da,this.Bd=this.kc=0,this.Ac=[],this.Bc=0,this.zc=[0,0,0,0],this.Gd=Array(new qa),this.Hd=0,this.rb=Array(new ea),this.sb=0,this.wa=Array(new Dr),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 ra),this.L=this.aa=0,this.gd=l([4,2],Dr),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 an(o,s){return 0>o?0:o>s?s:o}function Ei(){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 Wo(){var o=new Ua;return o!=null&&(o.a=0,o.sc="OK",o.cb=0,o.Xb=0,_a||(_a=Oi)),o}function Ye(o,s,d){return o.a==0&&(o.a=s,o.sc=d,o.cb=0),0}function za(o,s,d){return 3<=d&&o[s+0]==157&&o[s+1]==1&&o[s+2]==42}function on(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,v=s.w,b=s.ha;if(4>b)return Ye(o,7,"Truncated header.");var y=d[v+0]|d[v+1]<<8|d[v+2]<<16,A=o.Od;if(A.Rb=!(1&y),A.td=y>>1&7,A.yd=y>>4&1,A.ub=y>>5,3<A.td)return Ye(o,3,"Incorrect keyframe parameters.");if(!A.yd)return Ye(o,4,"Frame not displayable.");v+=3,b-=3;var N=o.Kc;if(A.Rb){if(7>b)return Ye(o,7,"cannot parse picture header");if(!za(d,v,b))return Ye(o,3,"Bad code word");N.c=16383&(d[v+4]<<8|d[v+3]),N.Td=d[v+4]>>6,N.i=16383&(d[v+6]<<8|d[v+5]),N.Ud=d[v+6]>>6,v+=7,b-=7,o.za=N.c+15>>4,o.Ub=N.i+15>>4,s.width=N.c,s.height=N.i,s.Da=0,s.j=0,s.v=0,s.va=s.width,s.o=s.height,s.da=0,s.ib=s.width,s.hb=s.height,s.U=s.width,s.T=s.height,a((y=o.Pa).jb,0,255,y.jb.length),t((y=o.Qa)!=null),y.Cb=0,y.Bb=0,y.Fb=1,a(y.Zb,0,0,y.Zb.length),a(y.Lb,0,0,y.Lb)}if(A.ub>b)return Ye(o,7,"bad partition length");st(y=o.m,d,v,A.ub),v+=A.ub,b-=A.ub,A.Rb&&(N.Ld=ot(y),N.Kd=ot(y)),N=o.Qa;var k,I=o.Pa;if(t(y!=null),t(N!=null),N.Cb=ot(y),N.Cb){if(N.Bb=ot(y),ot(y)){for(N.Fb=ot(y),k=0;4>k;++k)N.Zb[k]=ot(y)?rt(y,7):0;for(k=0;4>k;++k)N.Lb[k]=ot(y)?rt(y,6):0}if(N.Bb)for(k=0;3>k;++k)I.jb[k]=ot(y)?ut(y,8):255}else N.Bb=0;if(y.Ka)return Ye(o,3,"cannot parse segment header");if((N=o.ed).zd=ot(y),N.Tb=ut(y,6),N.wb=ut(y,3),N.Pc=ot(y),N.Pc&&ot(y)){for(I=0;4>I;++I)ot(y)&&(N.vd[I]=rt(y,6));for(I=0;4>I;++I)ot(y)&&(N.od[I]=rt(y,6))}if(o.L=N.Tb==0?0:N.zd?1:2,y.Ka)return Ye(o,3,"cannot parse filter header");var W=b;if(b=k=v,v=k+W,N=W,o.Xb=(1<<ut(o.m,2))-1,W<3*(I=o.Xb))d=7;else{for(k+=3*I,N-=3*I,W=0;W<I;++W){var et=d[b+0]|d[b+1]<<8|d[b+2]<<16;et>N&&(et=N),st(o.Jc[+W],d,k,et),k+=et,N-=et,b+=3}st(o.Jc[+I],d,k,N),d=k<v?0:5}if(d!=0)return Ye(o,d,"cannot parse partitions");for(d=ut(k=o.m,7),b=ot(k)?rt(k,4):0,v=ot(k)?rt(k,4):0,N=ot(k)?rt(k,4):0,I=ot(k)?rt(k,4):0,k=ot(k)?rt(k,4):0,W=o.Qa,et=0;4>et;++et){if(W.Cb){var E=W.Zb[et];W.Fb||(E+=d)}else{if(0<et){o.pb[et]=o.pb[0];continue}E=d}var Y=o.pb[et];Y.Sc[0]=fs[an(E+b,127)],Y.Sc[1]=hs[an(E+0,127)],Y.Eb[0]=2*fs[an(E+v,127)],Y.Eb[1]=101581*hs[an(E+N,127)]>>16,8>Y.Eb[1]&&(Y.Eb[1]=8),Y.Qc[0]=fs[an(E+I,117)],Y.Qc[1]=hs[an(E+k,127)],Y.lc=E+k}if(!A.Rb)return Ye(o,4,"Not a key frame.");for(ot(y),A=o.Pa,d=0;4>d;++d){for(b=0;8>b;++b)for(v=0;3>v;++v)for(N=0;11>N;++N)I=gt(y,Oh[d][b][v][N])?ut(y,8):Ih[d][b][v][N],A.Wc[d][b].Yb[v][N]=I;for(b=0;17>b;++b)A.Xc[d][b]=A.Wc[d][jh[b]]}return o.kc=ot(y),o.kc&&(o.Bd=ut(y,8)),o.cb=1}function Oi(o,s,d,v,b,y,A){var N=s[b].Yb[d];for(d=0;16>b;++b){if(!gt(o,N[d+0]))return b;for(;!gt(o,N[d+1]);)if(N=s[++b].Yb[0],d=0,b==16)return 16;var k=s[b+1].Yb;if(gt(o,N[d+2])){var I=o,W=0;if(gt(I,(E=N)[(et=d)+3]))if(gt(I,E[et+6])){for(N=0,et=2*(W=gt(I,E[et+8]))+(E=gt(I,E[et+9+W])),W=0,E=Ch[et];E[N];++N)W+=W+gt(I,E[N]);W+=3+(8<<et)}else gt(I,E[et+7])?(W=7+2*gt(I,165),W+=gt(I,145)):W=5+gt(I,159);else W=gt(I,E[et+4])?3+gt(I,E[et+5]):2;N=k[2]}else W=1,N=k[1];k=A+Fh[b],0>(I=o).b&&at(I);var et,E=I.b,Y=(et=I.Ca>>1)-(I.I>>E)>>31;--I.b,I.Ca+=Y,I.Ca|=1,I.I-=(et+1&Y)<<E,y[k]=((W^Y)-Y)*v[(0<b)+0]}return 16}function Ha(o){var s=o.rb[o.sb-1];s.la=0,s.Na=0,a(o.zc,0,0,o.zc.length),o.ja=0}function Rr(o,s,d,v,b){b=o[s+d+32*v]+(b>>3),o[s+d+32*v]=-256&b?0>b?0:255:b}function $e(o,s,d,v,b,y){Rr(o,s,0,d,v+b),Rr(o,s,1,d,v+y),Rr(o,s,2,d,v-y),Rr(o,s,3,d,v-b)}function bn(o){return(20091*o>>16)+o}function Wa(o,s,d,v){var b,y=0,A=i(16);for(b=0;4>b;++b){var N=o[s+0]+o[s+8],k=o[s+0]-o[s+8],I=(35468*o[s+4]>>16)-bn(o[s+12]),W=bn(o[s+4])+(35468*o[s+12]>>16);A[y+0]=N+W,A[y+1]=k+I,A[y+2]=k-I,A[y+3]=N-W,y+=4,s++}for(b=y=0;4>b;++b)N=(o=A[y+0]+4)+A[y+8],k=o-A[y+8],I=(35468*A[y+4]>>16)-bn(A[y+12]),Rr(d,v,0,0,N+(W=bn(A[y+4])+(35468*A[y+12]>>16))),Rr(d,v,1,0,k+I),Rr(d,v,2,0,k-I),Rr(d,v,3,0,N-W),y++,v+=32}function Go(o,s,d,v){var b=o[s+0]+4,y=35468*o[s+4]>>16,A=bn(o[s+4]),N=35468*o[s+1]>>16;$e(d,v,0,b+A,o=bn(o[s+1]),N),$e(d,v,1,b+y,o,N),$e(d,v,2,b-y,o,N),$e(d,v,3,b-A,o,N)}function Vo(o,s,d,v,b){Wa(o,s,d,v),b&&Wa(o,s+16,d,v+4)}function sn(o,s,d,v){yi(o,s+0,d,v,1),yi(o,s+32,d,v+128,1)}function Ga(o,s,d,v){var b;for(o=o[s+0]+4,b=0;4>b;++b)for(s=0;4>s;++s)Rr(d,v,s,b,o)}function Va(o,s,d,v){o[s+0]&&we(o,s+0,d,v),o[s+16]&&we(o,s+16,d,v+4),o[s+32]&&we(o,s+32,d,v+128),o[s+48]&&we(o,s+48,d,v+128+4)}function ji(o,s,d,v){var b,y=i(16);for(b=0;4>b;++b){var A=o[s+0+b]+o[s+12+b],N=o[s+4+b]+o[s+8+b],k=o[s+4+b]-o[s+8+b],I=o[s+0+b]-o[s+12+b];y[0+b]=A+N,y[8+b]=A-N,y[4+b]=I+k,y[12+b]=I-k}for(b=0;4>b;++b)A=(o=y[0+4*b]+3)+y[3+4*b],N=y[1+4*b]+y[2+4*b],k=y[1+4*b]-y[2+4*b],I=o-y[3+4*b],d[v+0]=A+N>>3,d[v+16]=I+k>>3,d[v+32]=A-N>>3,d[v+48]=I-k>>3,v+=64}function li(o,s,d){var v,b=s-32,y=Lr,A=255-o[b-1];for(v=0;v<d;++v){var N,k=y,I=A+o[s-1];for(N=0;N<d;++N)o[s+N]=k[I+o[b+N]];s+=32}}function Yo(o,s){li(o,s,4)}function Jo(o,s){li(o,s,8)}function Ko(o,s){li(o,s,16)}function na(o,s){var d;for(d=0;16>d;++d)n(o,s+32*d,o,s-32,16)}function Ya(o,s){var d;for(d=16;0<d;--d)a(o,s,o[s-1],16),s+=32}function Vr(o,s,d){var v;for(v=0;16>v;++v)a(s,d+32*v,o,16)}function $o(o,s){var d,v=16;for(d=0;16>d;++d)v+=o[s-1+32*d]+o[s+d-32];Vr(v>>5,o,s)}function ui(o,s){var d,v=8;for(d=0;16>d;++d)v+=o[s-1+32*d];Vr(v>>4,o,s)}function ia(o,s){var d,v=8;for(d=0;16>d;++d)v+=o[s+d-32];Vr(v>>4,o,s)}function Xo(o,s){Vr(128,o,s)}function $t(o,s,d){return o+2*s+d+2>>2}function Zo(o,s){var d,v=s-32;for(v=new Uint8Array([$t(o[v-1],o[v+0],o[v+1]),$t(o[v+0],o[v+1],o[v+2]),$t(o[v+1],o[v+2],o[v+3]),$t(o[v+2],o[v+3],o[v+4])]),d=0;4>d;++d)n(o,s+32*d,v,0,v.length)}function Qo(o,s){var d=o[s-1],v=o[s-1+32],b=o[s-1+64],y=o[s-1+96];At(o,s+0,16843009*$t(o[s-1-32],d,v)),At(o,s+32,16843009*$t(d,v,b)),At(o,s+64,16843009*$t(v,b,y)),At(o,s+96,16843009*$t(b,y,y))}function ts(o,s){var d,v=4;for(d=0;4>d;++d)v+=o[s+d-32]+o[s-1+32*d];for(v>>=3,d=0;4>d;++d)a(o,s+32*d,v,4)}function wn(o,s){var d=o[s-1+0],v=o[s-1+32],b=o[s-1+64],y=o[s-1-32],A=o[s+0-32],N=o[s+1-32],k=o[s+2-32],I=o[s+3-32];o[s+0+96]=$t(v,b,o[s-1+96]),o[s+1+96]=o[s+0+64]=$t(d,v,b),o[s+2+96]=o[s+1+64]=o[s+0+32]=$t(y,d,v),o[s+3+96]=o[s+2+64]=o[s+1+32]=o[s+0+0]=$t(A,y,d),o[s+3+64]=o[s+2+32]=o[s+1+0]=$t(N,A,y),o[s+3+32]=o[s+2+0]=$t(k,N,A),o[s+3+0]=$t(I,k,N)}function yn(o,s){var d=o[s+1-32],v=o[s+2-32],b=o[s+3-32],y=o[s+4-32],A=o[s+5-32],N=o[s+6-32],k=o[s+7-32];o[s+0+0]=$t(o[s+0-32],d,v),o[s+1+0]=o[s+0+32]=$t(d,v,b),o[s+2+0]=o[s+1+32]=o[s+0+64]=$t(v,b,y),o[s+3+0]=o[s+2+32]=o[s+1+64]=o[s+0+96]=$t(b,y,A),o[s+3+32]=o[s+2+64]=o[s+1+96]=$t(y,A,N),o[s+3+64]=o[s+2+96]=$t(A,N,k),o[s+3+96]=$t(N,k,k)}function es(o,s){var d=o[s-1+0],v=o[s-1+32],b=o[s-1+64],y=o[s-1-32],A=o[s+0-32],N=o[s+1-32],k=o[s+2-32],I=o[s+3-32];o[s+0+0]=o[s+1+64]=y+A+1>>1,o[s+1+0]=o[s+2+64]=A+N+1>>1,o[s+2+0]=o[s+3+64]=N+k+1>>1,o[s+3+0]=k+I+1>>1,o[s+0+96]=$t(b,v,d),o[s+0+64]=$t(v,d,y),o[s+0+32]=o[s+1+96]=$t(d,y,A),o[s+1+32]=o[s+2+96]=$t(y,A,N),o[s+2+32]=o[s+3+96]=$t(A,N,k),o[s+3+32]=$t(N,k,I)}function rs(o,s){var d=o[s+0-32],v=o[s+1-32],b=o[s+2-32],y=o[s+3-32],A=o[s+4-32],N=o[s+5-32],k=o[s+6-32],I=o[s+7-32];o[s+0+0]=d+v+1>>1,o[s+1+0]=o[s+0+64]=v+b+1>>1,o[s+2+0]=o[s+1+64]=b+y+1>>1,o[s+3+0]=o[s+2+64]=y+A+1>>1,o[s+0+32]=$t(d,v,b),o[s+1+32]=o[s+0+96]=$t(v,b,y),o[s+2+32]=o[s+1+96]=$t(b,y,A),o[s+3+32]=o[s+2+96]=$t(y,A,N),o[s+3+64]=$t(A,N,k),o[s+3+96]=$t(N,k,I)}function Bi(o,s){var d=o[s-1+0],v=o[s-1+32],b=o[s-1+64],y=o[s-1+96];o[s+0+0]=d+v+1>>1,o[s+2+0]=o[s+0+32]=v+b+1>>1,o[s+2+32]=o[s+0+64]=b+y+1>>1,o[s+1+0]=$t(d,v,b),o[s+3+0]=o[s+1+32]=$t(v,b,y),o[s+3+32]=o[s+1+64]=$t(b,y,y),o[s+3+64]=o[s+2+64]=o[s+0+96]=o[s+1+96]=o[s+2+96]=o[s+3+96]=y}function aa(o,s){var d=o[s-1+0],v=o[s-1+32],b=o[s-1+64],y=o[s-1+96],A=o[s-1-32],N=o[s+0-32],k=o[s+1-32],I=o[s+2-32];o[s+0+0]=o[s+2+32]=d+A+1>>1,o[s+0+32]=o[s+2+64]=v+d+1>>1,o[s+0+64]=o[s+2+96]=b+v+1>>1,o[s+0+96]=y+b+1>>1,o[s+3+0]=$t(N,k,I),o[s+2+0]=$t(A,N,k),o[s+1+0]=o[s+3+32]=$t(d,A,N),o[s+1+32]=o[s+3+64]=$t(v,d,A),o[s+1+64]=o[s+3+96]=$t(b,v,d),o[s+1+96]=$t(y,b,v)}function fi(o,s){var d;for(d=0;8>d;++d)n(o,s+32*d,o,s-32,8)}function ns(o,s){var d;for(d=0;8>d;++d)a(o,s,o[s-1],8),s+=32}function xn(o,s,d){var v;for(v=0;8>v;++v)a(s,d+32*v,o,8)}function is(o,s){var d,v=8;for(d=0;8>d;++d)v+=o[s+d-32]+o[s-1+32*d];xn(v>>4,o,s)}function oa(o,s){var d,v=4;for(d=0;8>d;++d)v+=o[s+d-32];xn(v>>3,o,s)}function sa(o,s){var d,v=4;for(d=0;8>d;++d)v+=o[s-1+32*d];xn(v>>3,o,s)}function Ja(o,s){xn(128,o,s)}function An(o,s,d){var v=o[s-d],b=o[s+0],y=3*(b-v)+as[1020+o[s-2*d]-o[s+d]],A=ro[112+(y+4>>3)];o[s-d]=Lr[255+v+ro[112+(y+3>>3)]],o[s+0]=Lr[255+b-A]}function la(o,s,d,v){var b=o[s+0],y=o[s+d];return qr[255+o[s-2*d]-o[s-d]]>v||qr[255+y-b]>v}function Di(o,s,d,v){return 4*qr[255+o[s-d]-o[s+0]]+qr[255+o[s-2*d]-o[s+d]]<=v}function ua(o,s,d,v,b){var y=o[s-3*d],A=o[s-2*d],N=o[s-d],k=o[s+0],I=o[s+d],W=o[s+2*d],et=o[s+3*d];return 4*qr[255+N-k]+qr[255+A-I]>v?0:qr[255+o[s-4*d]-y]<=b&&qr[255+y-A]<=b&&qr[255+A-N]<=b&&qr[255+et-W]<=b&&qr[255+W-I]<=b&&qr[255+I-k]<=b}function hi(o,s,d,v){var b=2*v+1;for(v=0;16>v;++v)Di(o,s+v,d,b)&&An(o,s+v,d)}function fa(o,s,d,v){var b=2*v+1;for(v=0;16>v;++v)Di(o,s+v*d,1,b)&&An(o,s+v*d,1)}function Ka(o,s,d,v){var b;for(b=3;0<b;--b)hi(o,s+=4*d,d,v)}function $a(o,s,d,v){var b;for(b=3;0<b;--b)fa(o,s+=4,d,v)}function _n(o,s,d,v,b,y,A,N){for(y=2*y+1;0<b--;){if(ua(o,s,d,y,A))if(la(o,s,d,N))An(o,s,d);else{var k=o,I=s,W=d,et=k[I-2*W],E=k[I-W],Y=k[I+0],X=k[I+W],lt=k[I+2*W],Q=27*(pt=as[1020+3*(Y-E)+as[1020+et-X]])+63>>7,ft=18*pt+63>>7,pt=9*pt+63>>7;k[I-3*W]=Lr[255+k[I-3*W]+pt],k[I-2*W]=Lr[255+et+ft],k[I-W]=Lr[255+E+Q],k[I+0]=Lr[255+Y-Q],k[I+W]=Lr[255+X-ft],k[I+2*W]=Lr[255+lt-pt]}s+=v}}function Nn(o,s,d,v,b,y,A,N){for(y=2*y+1;0<b--;){if(ua(o,s,d,y,A))if(la(o,s,d,N))An(o,s,d);else{var k=o,I=s,W=d,et=k[I-W],E=k[I+0],Y=k[I+W],X=ro[112+(4+(lt=3*(E-et))>>3)],lt=ro[112+(lt+3>>3)],Q=X+1>>1;k[I-2*W]=Lr[255+k[I-2*W]+Q],k[I-W]=Lr[255+et+lt],k[I+0]=Lr[255+E-X],k[I+W]=Lr[255+Y-Q]}s+=v}}function Xa(o,s,d,v,b,y){_n(o,s,d,1,16,v,b,y)}function ci(o,s,d,v,b,y){_n(o,s,1,d,16,v,b,y)}function Za(o,s,d,v,b,y){var A;for(A=3;0<A;--A)Nn(o,s+=4*d,d,1,16,v,b,y)}function c(o,s,d,v,b,y){var A;for(A=3;0<A;--A)Nn(o,s+=4,1,d,16,v,b,y)}function m(o,s,d,v,b,y,A,N){_n(o,s,b,1,8,y,A,N),_n(d,v,b,1,8,y,A,N)}function j(o,s,d,v,b,y,A,N){_n(o,s,1,b,8,y,A,N),_n(d,v,1,b,8,y,A,N)}function q(o,s,d,v,b,y,A,N){Nn(o,s+4*b,b,1,8,y,A,N),Nn(d,v+4*b,b,1,8,y,A,N)}function $(o,s,d,v,b,y,A,N){Nn(o,s+4,1,b,8,y,A,N),Nn(d,v+4,1,b,8,y,A,N)}function dt(){this.ba=new le,this.ec=[],this.cc=[],this.Mc=[],this.Dc=this.Nc=this.dc=this.fc=0,this.Oa=new be,this.memory=0,this.Ib="OutputFunc",this.Jb="OutputAlphaFunc",this.Nd="OutputRowFunc"}function mt(){this.data=[],this.offset=this.kd=this.ha=this.w=0,this.na=[],this.xa=this.gb=this.Ja=this.Sa=this.P=0}function It(){this.nc=this.Ea=this.b=this.hc=0,this.K=[],this.w=0}function Bt(){this.ua=0,this.Wa=new ae,this.vb=new ae,this.md=this.xc=this.wc=0,this.vc=[],this.Wb=0,this.Ya=new nt,this.yc=new z}function Kt(){this.xb=this.a=0,this.l=new Ei,this.ca=new le,this.V=[],this.Ba=0,this.Ta=[],this.Ua=0,this.m=new D,this.Pb=0,this.wd=new D,this.Ma=this.$=this.C=this.i=this.c=this.xd=0,this.s=new Bt,this.ab=0,this.gc=f(4,It),this.Oc=0}function re(){this.Lc=this.Z=this.$a=this.i=this.c=0,this.l=new Ei,this.ic=0,this.ca=[],this.tb=0,this.qd=null,this.rd=0}function ge(o,s,d,v,b,y,A){for(o=o==null?0:o[s+0],s=0;s<A;++s)b[y+s]=o+d[v+s]&255,o=b[y+s]}function je(o,s,d,v,b,y,A){var N;if(o==null)ge(null,null,d,v,b,y,A);else for(N=0;N<A;++N)b[y+N]=o[s+N]+d[v+N]&255}function Je(o,s,d,v,b,y,A){if(o==null)ge(null,null,d,v,b,y,A);else{var N,k=o[s+0],I=k,W=k;for(N=0;N<A;++N)I=W+(k=o[s+N])-I,W=d[v+N]+(-256&I?0>I?0:255:I)&255,I=k,b[y+N]=W}}function ke(o,s,d,v){var b=s.width,y=s.o;if(t(o!=null&&s!=null),0>d||0>=v||d+v>y)return null;if(!o.Cc){if(o.ga==null){var A;if(o.ga=new re,(A=o.ga==null)||(A=s.width*s.o,t(o.Gb.length==0),o.Gb=i(A),o.Uc=0,o.Gb==null?A=0:(o.mb=o.Gb,o.nb=o.Uc,o.rc=null,A=1),A=!A),!A){A=o.ga;var N=o.Fa,k=o.P,I=o.qc,W=o.mb,et=o.nb,E=k+1,Y=I-1,X=A.l;if(t(N!=null&&W!=null&&s!=null),Kn[0]=null,Kn[1]=ge,Kn[2]=je,Kn[3]=Je,A.ca=W,A.tb=et,A.c=s.width,A.i=s.height,t(0<A.c&&0<A.i),1>=I)s=0;else if(A.$a=3&N[k+0],A.Z=N[k+0]>>2&3,A.Lc=N[k+0]>>4&3,k=N[k+0]>>6&3,0>A.$a||1<A.$a||4<=A.Z||1<A.Lc||k)s=0;else if(X.put=Vt,X.ac=en,X.bc=vn,X.ma=A,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.$a)t:{t(A.$a==1),s=oi();e:for(;;){if(s==null){s=0;break t}if(t(A!=null),A.mc=s,s.c=A.c,s.i=A.i,s.l=A.l,s.l.ma=A,s.l.width=A.c,s.l.height=A.i,s.a=0,ht(s.m,N,E,Y),!nn(A.c,A.i,1,s,null)||(s.ab==1&&s.gc[0].hc==3&&Hr(s.s)?(A.ic=1,N=s.c*s.i,s.Ta=null,s.Ua=0,s.V=i(N),s.Ba=0,s.V==null?(s.a=1,s=0):s=1):(A.ic=0,s=si(s,A.c)),!s))break e;s=1;break t}A.mc=null,s=0}else s=Y>=A.c*A.i;A=!s}if(A)return null;o.ga.Lc!=1?o.Ga=0:v=y-d}t(o.ga!=null),t(d+v<=y);t:{if(s=(N=o.ga).c,y=N.l.o,N.$a==0){if(E=o.rc,Y=o.Vc,X=o.Fa,k=o.P+1+d*s,I=o.mb,W=o.nb+d*s,t(k<=o.P+o.qc),N.Z!=0)for(t(Kn[N.Z]!=null),A=0;A<v;++A)Kn[N.Z](E,Y,X,k,I,W,s),E=I,Y=W,W+=s,k+=s;else for(A=0;A<v;++A)n(I,W,X,k,s),E=I,Y=W,W+=s,k+=s;o.rc=E,o.Vc=Y}else{if(t(N.mc!=null),s=d+v,t((A=N.mc)!=null),t(s<=A.i),A.C>=s)s=1;else if(N.ic||Yr(),N.ic){N=A.V,E=A.Ba,Y=A.c;var lt=A.i,Q=(X=1,k=A.$/Y,I=A.$%Y,W=A.m,et=A.s,A.$),ft=Y*lt,pt=Y*s,xt=et.wc,bt=Q<pt?ir(et,I,k):null;t(Q<=ft),t(s<=lt),t(Hr(et));e:for(;;){for(;!W.h&&Q<pt;){if(I&xt||(bt=ir(et,I,k)),t(bt!=null),Z(W),256>(lt=Be(bt.G[0],bt.H[0],W)))N[E+Q]=lt,++Q,++I>=Y&&(I=0,++k<=s&&!(k%16)&&Wr(A,k));else{if(!(280>lt)){X=0;break e}lt=Or(lt-256,W);var Dt,Pt=Be(bt.G[4],bt.H[4],W);if(Z(W),!(Q>=(Pt=jr(Y,Pt=Or(Pt,W)))&&ft-Q>=lt)){X=0;break e}for(Dt=0;Dt<lt;++Dt)N[E+Q+Dt]=N[E+Q+Dt-Pt];for(Q+=lt,I+=lt;I>=Y;)I-=Y,++k<=s&&!(k%16)&&Wr(A,k);Q<pt&&I&xt&&(bt=ir(et,I,k))}t(W.h==H(W))}Wr(A,k>s?s:k);break e}!X||W.h&&Q<ft?(X=0,A.a=W.h?5:3):A.$=Q,s=X}else s=Gr(A,A.V,A.Ba,A.c,A.i,s,Ci);if(!s){v=0;break t}}d+v>=y&&(o.Cc=1),v=1}if(!v)return null;if(o.Cc&&((v=o.ga)!=null&&(v.mc=null),o.ga=null,0<o.Ga))return alert("todo:WebPDequantizeLevels"),null}return o.nb+d*b}function Xe(o,s,d,v,b,y){for(;0<b--;){var A,N=o,k=s+(d?1:0),I=o,W=s+(d?0:3);for(A=0;A<v;++A){var et=I[W+4*A];et!=255&&(et*=32897,N[k+4*A+0]=N[k+4*A+0]*et>>23,N[k+4*A+1]=N[k+4*A+1]*et>>23,N[k+4*A+2]=N[k+4*A+2]*et>>23)}s+=y}}function Ke(o,s,d,v,b){for(;0<v--;){var y;for(y=0;y<d;++y){var A=o[s+2*y+0],N=15&(I=o[s+2*y+1]),k=4369*N,I=(240&I|I>>4)*k>>16;o[s+2*y+0]=(240&A|A>>4)*k>>16&240|(15&A|A<<4)*k>>16>>4&15,o[s+2*y+1]=240&I|N}s+=b}}function ar(o,s,d,v,b,y,A,N){var k,I,W=255;for(I=0;I<b;++I){for(k=0;k<v;++k){var et=o[s+k];y[A+4*k]=et,W&=et}s+=d,A+=N}return W!=255}function Ln(o,s,d,v,b){var y;for(y=0;y<b;++y)d[v+y]=o[s+y]>>8}function Yr(){Aa=Xe,ml=Ke,bl=ar,wl=Ln}function Sn(o,s,d){R[o]=function(v,b,y,A,N,k,I,W,et,E,Y,X,lt,Q,ft,pt,xt){var bt,Dt=xt-1>>1,Pt=N[k+0]|I[W+0]<<16,ne=et[E+0]|Y[X+0]<<16;t(v!=null);var Et=3*Pt+ne+131074>>2;for(s(v[b+0],255&Et,Et>>16,lt,Q),y!=null&&(Et=3*ne+Pt+131074>>2,s(y[A+0],255&Et,Et>>16,ft,pt)),bt=1;bt<=Dt;++bt){var ce=N[k+bt]|I[W+bt]<<16,Qe=et[E+bt]|Y[X+bt]<<16,ie=Pt+ce+ne+Qe+524296,Ot=ie+2*(ce+ne)>>3;Et=Ot+Pt>>1,Pt=(ie=ie+2*(Pt+Qe)>>3)+ce>>1,s(v[b+2*bt-1],255&Et,Et>>16,lt,Q+(2*bt-1)*d),s(v[b+2*bt-0],255&Pt,Pt>>16,lt,Q+(2*bt-0)*d),y!=null&&(Et=ie+ne>>1,Pt=Ot+Qe>>1,s(y[A+2*bt-1],255&Et,Et>>16,ft,pt+(2*bt-1)*d),s(y[A+2*bt+0],255&Pt,Pt>>16,ft,pt+(2*bt+0)*d)),Pt=ce,ne=Qe}1&xt||(Et=3*Pt+ne+131074>>2,s(v[b+xt-1],255&Et,Et>>16,lt,Q+(xt-1)*d),y!=null&&(Et=3*ne+Pt+131074>>2,s(y[A+xt-1],255&Et,Et>>16,ft,pt+(xt-1)*d)))}}function ha(){Ur[no]=Dh,Ur[io]=Fl,Ur[Ll]=Rh,Ur[ao]=Il,Ur[oo]=El,Ur[os]=Ol,Ur[Sl]=Th,Ur[ss]=Fl,Ur[ls]=Il,Ur[so]=El,Ur[us]=Ol}function Ri(o){return o&-16384?0>o?0:255:o>>Mh}function Mn(o,s){return Ri((19077*o>>8)+(26149*s>>8)-14234)}function di(o,s,d){return Ri((19077*o>>8)-(6419*s>>8)-(13320*d>>8)+8708)}function pi(o,s){return Ri((19077*o>>8)+(33050*s>>8)-17685)}function qn(o,s,d,v,b){v[b+0]=Mn(o,d),v[b+1]=di(o,s,d),v[b+2]=pi(o,s)}function or(o,s,d,v,b){v[b+0]=pi(o,s),v[b+1]=di(o,s,d),v[b+2]=Mn(o,d)}function gi(o,s,d,v,b){var y=di(o,s,d);s=y<<3&224|pi(o,s)>>3,v[b+0]=248&Mn(o,d)|y>>5,v[b+1]=s}function vi(o,s,d,v,b){var y=240&pi(o,s)|15;v[b+0]=240&Mn(o,d)|di(o,s,d)>>4,v[b+1]=y}function ca(o,s,d,v,b){v[b+0]=255,qn(o,s,d,v,b+1)}function da(o,s,d,v,b){or(o,s,d,v,b),v[b+3]=255}function vr(o,s,d,v,b){qn(o,s,d,v,b),v[b+3]=255}function kn(o,s,d){R[o]=function(v,b,y,A,N,k,I,W,et){for(var E=W+(-2&et)*d;W!=E;)s(v[b+0],y[A+0],N[k+0],I,W),s(v[b+1],y[A+0],N[k+0],I,W+d),b+=2,++A,++k,W+=2*d;1&et&&s(v[b+0],y[A+0],N[k+0],I,W)}}function Ti(o,s,d){return d==0?o==0?s==0?6:5:s==0?4:0:d}function Qa(o,s,d,v,b){switch(o>>>30){case 3:yi(s,d,v,b,0);break;case 2:Mr(s,d,v,b);break;case 1:we(s,d,v,b)}}function Tr(o,s){var d,v,b=s.M,y=s.Nb,A=o.oc,N=o.pc+40,k=o.oc,I=o.pc+584,W=o.oc,et=o.pc+600;for(d=0;16>d;++d)A[N+32*d-1]=129;for(d=0;8>d;++d)k[I+32*d-1]=129,W[et+32*d-1]=129;for(0<b?A[N-1-32]=k[I-1-32]=W[et-1-32]=129:(a(A,N-32-1,127,21),a(k,I-32-1,127,9),a(W,et-32-1,127,9)),v=0;v<o.za;++v){var E=s.ya[s.aa+v];if(0<v){for(d=-1;16>d;++d)n(A,N+32*d-4,A,N+32*d+12,4);for(d=-1;8>d;++d)n(k,I+32*d-4,k,I+32*d+4,4),n(W,et+32*d-4,W,et+32*d+4,4)}var Y=o.Gd,X=o.Hd+v,lt=E.ad,Q=E.Hc;if(0<b&&(n(A,N-32,Y[X].y,0,16),n(k,I-32,Y[X].f,0,8),n(W,et-32,Y[X].ea,0,8)),E.Za){var ft=A,pt=N-32+16;for(0<b&&(v>=o.za-1?a(ft,pt,Y[X].y[15],4):n(ft,pt,Y[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=A,pt=N+Bl[d],Jr[E.Ob[d]](ft,pt),Qa(Q,lt,16*+d,ft,pt)}else if(ft=Ti(v,b,E.Ob[0]),Jn[ft](A,N),Q!=0)for(d=0;16>d;++d,Q<<=2)Qa(Q,lt,16*+d,A,N+Bl[d]);for(d=E.Gc,ft=Ti(v,b,E.Dd),Fn[ft](k,I),Fn[ft](W,et),Q=lt,ft=k,pt=I,255&(E=0|d)&&(170&E?fn(Q,256,ft,pt):_e(Q,256,ft,pt)),E=W,Q=et,255&(d>>=8)&&(170&d?fn(lt,320,E,Q):_e(lt,320,E,Q)),b<o.Ub-1&&(n(Y[X].y,0,A,N+480,16),n(Y[X].f,0,k,I+224,8),n(Y[X].ea,0,W,et+224,8)),d=8*y*o.B,Y=o.sa,X=o.ta+16*v+16*y*o.R,lt=o.qa,E=o.ra+8*v+d,Q=o.Ha,ft=o.Ia+8*v+d,d=0;16>d;++d)n(Y,X+d*o.R,A,N+32*d,16);for(d=0;8>d;++d)n(lt,E+d*o.B,k,I+32*d,8),n(Q,ft+d*o.B,W,et+32*d,8)}}function mi(o,s,d,v,b,y,A,N,k){var I=[0],W=[0],et=0,E=k!=null?k.kd:0,Y=k??new mt;if(o==null||12>d)return 7;Y.data=o,Y.w=s,Y.ha=d,s=[s],d=[d],Y.gb=[Y.gb];t:{var X=s,lt=d,Q=Y.gb;if(t(o!=null),t(lt!=null),t(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=Mt(o,X[0]+4);if(12>ft||4294967286<ft){Q=3;break t}if(E&&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<Y.gb[0],d=d[0];;){t:{var pt=o;lt=s,Q=d;var xt=I,bt=W,Dt=X=[0];if((Et=et=[et])[0]=0,8>Q[0])Q=7;else{if(!e(pt,lt[0],"VP8X")){if(Mt(pt,lt[0]+4)!=10){Q=3;break t}if(18>Q[0]){Q=7;break t}var Pt=Mt(pt,lt[0]+8),ne=1+St(pt,lt[0]+12);if(2147483648<=ne*(pt=1+St(pt,lt[0]+15))){Q=3;break t}Dt!=null&&(Dt[0]=Pt),xt!=null&&(xt[0]=ne),bt!=null&&(bt[0]=pt),lt[0]+=18,Q[0]-=18,Et[0]=1}Q=0}}if(et=et[0],X=X[0],Q!=0)return Q;if(lt=!!(2&X),!ft&&et)return 3;if(y!=null&&(y[0]=!!(16&X)),A!=null&&(A[0]=lt),N!=null&&(N[0]=0),A=I[0],X=W[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],Y.na=[Y.na],Y.P=[Y.P],Y.Sa=[Y.Sa];t:{Pt=o,Q=s,ft=d;var Et=Y.gb;xt=Y.na,bt=Y.P,Dt=Y.Sa,ne=22,t(Pt!=null),t(ft!=null),pt=Q[0];var ce=ft[0];for(t(xt!=null),t(Dt!=null),xt[0]=null,bt[0]=null,Dt[0]=0;;){if(Q[0]=pt,ft[0]=ce,8>ce){Q=7;break t}var Qe=Mt(Pt,pt+4);if(4294967286<Qe){Q=3;break t}var ie=8+Qe+1&-2;if(ne+=ie,0<Et&&ne>Et){Q=3;break t}if(!e(Pt,pt,"VP8 ")||!e(Pt,pt,"VP8L")){Q=0;break t}if(ce[0]<ie){Q=7;break t}e(Pt,pt,"ALPH")||(xt[0]=Pt,bt[0]=pt+8,Dt[0]=Qe),pt+=ie,ce-=ie}}if(d=d[0],Y.na=Y.na[0],Y.P=Y.P[0],Y.Sa=Y.Sa[0],Q!=0)break}d=[d],Y.Ja=[Y.Ja],Y.xa=[Y.xa];t:if(Et=o,Q=s,ft=d,xt=Y.gb[0],bt=Y.Ja,Dt=Y.xa,Pt=Q[0],pt=!e(Et,Pt,"VP8 "),ne=!e(Et,Pt,"VP8L"),t(Et!=null),t(ft!=null),t(bt!=null),t(Dt!=null),8>ft[0])Q=7;else{if(pt||ne){if(Et=Mt(Et,Pt+4),12<=xt&&Et>xt-12){Q=3;break t}if(E&&Et>ft[0]-8){Q=7;break t}bt[0]=Et,Q[0]+=8,ft[0]-=8,Dt[0]=ne}else Dt[0]=5<=ft[0]&&Et[Pt+0]==47&&!(Et[Pt+4]>>5),bt[0]=ft[0];Q=0}if(d=d[0],Y.Ja=Y.Ja[0],Y.xa=Y.xa[0],s=s[0],Q!=0)break;if(4294967286<Y.Ja)return 3;if(N==null||lt||(N[0]=Y.xa?2:1),A=[A],X=[X],Y.xa){if(5>d){Q=7;break}N=A,E=X,lt=y,o==null||5>d?o=0:5<=d&&o[s+0]==47&&!(o[s+4]>>5)?(ft=[0],Et=[0],xt=[0],ht(bt=new D,o,s,d),mn(bt,ft,Et,xt)?(N!=null&&(N[0]=ft[0]),E!=null&&(E[0]=Et[0]),lt!=null&&(lt[0]=xt[0]),o=1):o=0):o=0}else{if(10>d){Q=7;break}N=X,o==null||10>d||!za(o,s+3,d-3)?o=0:(E=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&E||3<(E>>1&7)||!(E>>4&1)||E>>5>=Y.Ja||!lt||!o?o=0:(A&&(A[0]=lt),N&&(N[0]=o),o=1))}if(!o||(A=A[0],X=X[0],et&&(I[0]!=A||W[0]!=X)))return 3;k!=null&&(k[0]=Y,k.offset=s-k.w,t(4294967286>s-k.w),t(k.offset==k.ha-d));break}return Q==0||Q==7&&et&&k==null?(y!=null&&(y[0]|=Y.na!=null&&0<Y.na.length),v!=null&&(v[0]=A),b!=null&&(b[0]=X),0):Q}function pa(o,s,d){var v=s.width,b=s.height,y=0,A=0,N=v,k=b;if(s.Da=o!=null&&0<o.Da,s.Da&&(N=o.cd,k=o.bd,y=o.v,A=o.j,11>d||(y&=-2,A&=-2),0>y||0>A||0>=N||0>=k||y+N>v||A+k>b))return 0;if(s.v=y,s.j=A,s.va=y+N,s.o=A+k,s.U=N,s.T=k,s.da=o!=null&&0<o.da,s.da){if(!Ht(N,k,d=[o.ib],y=[o.hb]))return 0;s.ib=d[0],s.hb=y[0]}return s.ob=o!=null&&o.ob,s.Kb=o==null||!o.Sd,s.da&&(s.ob=s.ib<3*v/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 Un(o,s,d,v){if(v==null||0>=o||0>=s)return 2;if(d!=null){if(d.Da){var b=d.cd,y=d.bd,A=-2&d.v,N=-2&d.j;if(0>A||0>N||0>=b||0>=y||A+b>o||N+y>s)return 2;o=b,s=y}if(d.da){if(!Ht(o,s,b=[d.ib],y=[d.hb]))return 2;o=b[0],s=y[0]}}v.width=o,v.height=s;t:{var k=v.width,I=v.height;if(o=v.S,0>=k||0>=I||!(o>=no&&13>o))o=2;else{if(0>=v.Rd&&v.sd==null){A=y=b=s=0;var W=(N=k*Dl[o])*I;if(11>o||(y=(I+1)/2*(s=(k+1)/2),o==12&&(A=(b=k)*I)),(I=i(W+2*y+A))==null){o=1;break t}v.sd=I,11>o?((k=v.f.RGBA).eb=I,k.fb=0,k.A=N,k.size=W):((k=v.f.kb).y=I,k.O=0,k.fa=N,k.Fd=W,k.f=I,k.N=0+W,k.Ab=s,k.Cd=y,k.ea=I,k.W=0+W+y,k.Db=s,k.Ed=y,o==12&&(k.F=I,k.J=0+W+2*y),k.Tc=A,k.lb=b)}if(s=1,b=v.S,y=v.width,A=v.height,b>=no&&13>b)if(11>b)o=v.f.RGBA,s&=(N=Math.abs(o.A))*(A-1)+y<=o.size,s&=N>=y*Dl[b],s&=o.eb!=null;else{o=v.f.kb,N=(y+1)/2,W=(A+1)/2,k=Math.abs(o.fa),I=Math.abs(o.Ab);var et=Math.abs(o.Db),E=Math.abs(o.lb),Y=E*(A-1)+y;s&=k*(A-1)+y<=o.Fd,s&=I*(W-1)+N<=o.Cd,s=(s&=et*(W-1)+N<=o.Ed)&k>=y&I>=N&et>=N,s&=o.y!=null,s&=o.f!=null,s&=o.ea!=null,b==12&&(s&=E>=y,s&=Y<=o.Tc,s&=o.F!=null)}else s=0;o=s?0:2}}return o!=0||d!=null&&d.fd&&(o=ga(v)),o}var bi=64,_r=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535,131071,262143,524287,1048575,2097151,4194303,8388607,16777215],Nr=24,zn=32,Pn=8,Hn=[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];Ct("Predictor0","PredictorAdd0"),R.Predictor0=function(){return 4278190080},R.Predictor1=function(o){return o},R.Predictor2=function(o,s,d){return s[d+0]},R.Predictor3=function(o,s,d){return s[d+1]},R.Predictor4=function(o,s,d){return s[d-1]},R.Predictor5=function(o,s,d){return qt(qt(o,s[d+1]),s[d+0])},R.Predictor6=function(o,s,d){return qt(o,s[d-1])},R.Predictor7=function(o,s,d){return qt(o,s[d+0])},R.Predictor8=function(o,s,d){return qt(s[d-1],s[d+0])},R.Predictor9=function(o,s,d){return qt(s[d+0],s[d+1])},R.Predictor10=function(o,s,d){return qt(qt(o,s[d-1]),qt(s[d+0],s[d+1]))},R.Predictor11=function(o,s,d){var v=s[d+0];return 0>=Zt(v>>24&255,o>>24&255,(s=s[d-1])>>24&255)+Zt(v>>16&255,o>>16&255,s>>16&255)+Zt(v>>8&255,o>>8&255,s>>8&255)+Zt(255&v,255&o,255&s)?v:o},R.Predictor12=function(o,s,d){var v=s[d+0];return(me((o>>24&255)+(v>>24&255)-((s=s[d-1])>>24&255))<<24|me((o>>16&255)+(v>>16&255)-(s>>16&255))<<16|me((o>>8&255)+(v>>8&255)-(s>>8&255))<<8|me((255&o)+(255&v)-(255&s)))>>>0},R.Predictor13=function(o,s,d){var v=s[d-1];return(ue((o=qt(o,s[d+0]))>>24&255,v>>24&255)<<24|ue(o>>16&255,v>>16&255)<<16|ue(o>>8&255,v>>8&255)<<8|ue(255&o,255&v))>>>0};var va=R.PredictorAdd0;R.PredictorAdd1=he,Ct("Predictor2","PredictorAdd2"),Ct("Predictor3","PredictorAdd3"),Ct("Predictor4","PredictorAdd4"),Ct("Predictor5","PredictorAdd5"),Ct("Predictor6","PredictorAdd6"),Ct("Predictor7","PredictorAdd7"),Ct("Predictor8","PredictorAdd8"),Ct("Predictor9","PredictorAdd9"),Ct("Predictor10","PredictorAdd10"),Ct("Predictor11","PredictorAdd11"),Ct("Predictor12","PredictorAdd12"),Ct("Predictor13","PredictorAdd13");var Mi=R.PredictorAdd2;Tt("ColorIndexInverseTransform","MapARGB","32b",function(o){return o>>8&255},function(o){return o}),Tt("VP8LColorIndexInverseTransformAlpha","MapAlpha","8b",function(o){return o},function(o){return o>>8&255});var qe,to=R.ColorIndexInverseTransform,ln=R.MapARGB,un=R.VP8LColorIndexInverseTransformAlpha,ma=R.MapAlpha,ba=R.VP8LPredictorsAdd=[];ba.length=16,(R.VP8LPredictors=[]).length=16,(R.VP8LPredictorsAdd_C=[]).length=16,(R.VP8LPredictors_C=[]).length=16;var wa,ya,Wn,Gn,Vn,wi,Yn,yi,Mr,fn,we,_e,Ue,Ze,Cn,xa,qi,eo,hl,cl,dl,pl,gl,vl,Aa,ml,bl,wl,yl=i(511),xl=i(2041),Al=i(225),_l=i(767),Nl=0,as=xl,ro=Al,Lr=_l,qr=yl,no=0,io=1,Ll=2,ao=3,oo=4,os=5,Sl=6,ss=7,ls=8,so=9,us=10,Ah=[2,3,7],_h=[3,3,11],kl=[280,256,256,256,40],Nh=[0,1,1,1,0],Lh=[17,18,0,1,2,3,4,5,16,6,7,8,9,10,11,12,13,14,15],Sh=[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],kh=[2954,2956,2958,2962,2970,2986,3018,3082,3212,3468,3980,5004],Ph=8,fs=[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],hs=[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],_a=null,Ch=[[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]],Fh=[0,1,4,8,5,2,3,6,9,12,13,10,7,11,14,15],Pl=[-0,1,-1,2,-2,3,4,6,-3,5,-4,-5,-6,7,-7,8,-8,-9],Ih=[[[[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]]]],Eh=[[[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]]],Oh=[[[[255,255,255,255,255,255,255,255,255,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]]]],jh=[0,1,2,3,6,4,5,6,6,6,6,6,6,6,6,7,0],Jn=[],Jr=[],Fn=[],Bh=1,Cl=2,Kn=[],Ur=[];Sn("UpsampleRgbLinePair",qn,3),Sn("UpsampleBgrLinePair",or,3),Sn("UpsampleRgbaLinePair",vr,4),Sn("UpsampleBgraLinePair",da,4),Sn("UpsampleArgbLinePair",ca,4),Sn("UpsampleRgba4444LinePair",vi,2),Sn("UpsampleRgb565LinePair",gi,2);var Dh=R.UpsampleRgbLinePair,Rh=R.UpsampleBgrLinePair,Fl=R.UpsampleRgbaLinePair,Il=R.UpsampleBgraLinePair,El=R.UpsampleArgbLinePair,Ol=R.UpsampleRgba4444LinePair,Th=R.UpsampleRgb565LinePair,lo=16,uo=1<<lo-1,Na=-227,cs=482,Mh=6,jl=0,qh=i(256),Uh=i(256),zh=i(256),Hh=i(256),Wh=i(cs-Na),Gh=i(cs-Na);kn("YuvToRgbRow",qn,3),kn("YuvToBgrRow",or,3),kn("YuvToRgbaRow",vr,4),kn("YuvToBgraRow",da,4),kn("YuvToArgbRow",ca,4),kn("YuvToRgba4444Row",vi,2),kn("YuvToRgb565Row",gi,2);var Bl=[0,4,8,12,128,132,136,140,256,260,264,268,384,388,392,396],fo=[0,2,8],Vh=[8,7,6,4,4,2,2,2,1,1,1,1],Yh=1;this.WebPDecodeRGBA=function(o,s,d,v,b){var y=io,A=new dt,N=new le;A.ba=N,N.S=y,N.width=[N.width],N.height=[N.height];var k=N.width,I=N.height,W=new Gt;if(W==null||o==null)var et=2;else t(W!=null),et=mi(o,s,d,W.width,W.height,W.Pd,W.Qd,W.format,null);if(et!=0?k=0:(k!=null&&(k[0]=W.width[0]),I!=null&&(I[0]=W.height[0]),k=1),k){N.width=N.width[0],N.height=N.height[0],v!=null&&(v[0]=N.width),b!=null&&(b[0]=N.height);t:{if(v=new Ei,(b=new mt).data=o,b.w=s,b.ha=d,b.kd=1,s=[0],t(b!=null),((o=mi(b.data,b.w,b.ha,null,null,null,s,null,b))==0||o==7)&&s[0]&&(o=4),(s=o)==0){if(t(A!=null),v.data=b.data,v.w=b.w+b.offset,v.ha=b.ha-b.offset,v.put=Vt,v.ac=en,v.bc=vn,v.ma=A,b.xa){if((o=oi())==null){A=1;break t}if((function(E,Y){var X=[0],lt=[0],Q=[0];e:for(;;){if(E==null)return 0;if(Y==null)return E.a=2,0;if(E.l=Y,E.a=0,ht(E.m,Y.data,Y.w,Y.ha),!mn(E.m,X,lt,Q)){E.a=3;break e}if(E.xb=Cl,Y.width=X[0],Y.height=lt[0],!nn(X[0],lt[0],1,E,null))break e;return 1}return t(E.a!=0),0})(o,v)){if(v=(s=Un(v.width,v.height,A.Oa,A.ba))==0){e:{v=o;r:for(;;){if(v==null){v=0;break e}if(t(v.s.yc!=null),t(v.s.Ya!=null),t(0<v.s.Wb),t((d=v.l)!=null),t((b=d.ma)!=null),v.xb!=0){if(v.ca=b.ba,v.tb=b.tb,t(v.ca!=null),!pa(b.Oa,d,ao)){v.a=2;break r}if(!si(v,d.width)||d.da)break r;if((d.da||Yt(v.ca.S))&&Yr(),11>v.ca.S||(alert("todo:WebPInitConvertARGBToYUV"),v.ca.f.kb.F!=null&&Yr()),v.Pb&&0<v.s.ua&&v.s.vb.X==null&&!F(v.s.vb,v.s.Wa.Xa)){v.a=1;break r}v.xb=0}if(!Gr(v,v.V,v.Ba,v.c,v.i,d.o,Tn))break r;b.Dc=v.Ma,v=1;break e}t(v.a!=0),v=0}v=!v}v&&(s=o.a)}else s=o.a}else{if((o=new Wo)==null){A=1;break t}if(o.Fa=b.na,o.P=b.P,o.qc=b.Sa,on(o,v)){if((s=Un(v.width,v.height,A.Oa,A.ba))==0){if(o.Aa=0,d=A.Oa,t((b=o)!=null),d!=null){if(0<(k=0>(k=d.Md)?0:100<k?255:255*k/100)){for(I=W=0;4>I;++I)12>(et=b.pb[I]).lc&&(et.ia=k*Vh[0>et.lc?0:et.lc]>>3),W|=et.ia;W&&(alert("todo:VP8InitRandom"),b.ia=1)}b.Ga=d.Id,100<b.Ga?b.Ga=100:0>b.Ga&&(b.Ga=0)}(function(E,Y){if(E==null)return 0;if(Y==null)return Ye(E,2,"NULL VP8Io parameter in VP8Decode().");if(!E.cb&&!on(E,Y))return 0;if(t(E.cb),Y.ac==null||Y.ac(Y)){Y.ob&&(E.L=0);var X=fo[E.L];if(E.L==2?(E.yb=0,E.zb=0):(E.yb=Y.v-X>>4,E.zb=Y.j-X>>4,0>E.yb&&(E.yb=0),0>E.zb&&(E.zb=0)),E.Va=Y.o+15+X>>4,E.Hb=Y.va+15+X>>4,E.Hb>E.za&&(E.Hb=E.za),E.Va>E.Ub&&(E.Va=E.Ub),0<E.L){var lt=E.ed;for(X=0;4>X;++X){var Q;if(E.Qa.Cb){var ft=E.Qa.Lb[X];E.Qa.Fb||(ft+=lt.Tb)}else ft=lt.Tb;for(Q=0;1>=Q;++Q){var pt=E.gd[X][Q],xt=ft;if(lt.Pc&&(xt+=lt.vd[0],Q&&(xt+=lt.od[0])),0<(xt=0>xt?0:63<xt?63:xt)){var bt=xt;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*xt+bt,pt.ld=40<=xt?2:15<=xt?1:0}else pt.tc=0;pt.La=Q}}}X=0}else Ye(E,6,"Frame setup failed"),X=E.a;if(X=X==0){if(X){E.$c=0,0<E.Aa||(E.Ic=Yh);e:{X=E.Ic,lt=4*(bt=E.za);var Dt=32*bt,Pt=bt+1,ne=0<E.L?bt*(0<E.Aa?2:1):0,Et=(E.Aa==2?2:1)*bt;if((pt=lt+832+(Q=3*(16*X+fo[E.L])/2*Dt)+(ft=E.Fa!=null&&0<E.Fa.length?E.Kc.c*E.Kc.i:0))!=pt)X=0;else{if(pt>E.Vb){if(E.Vb=0,E.Ec=i(pt),E.Fc=0,E.Ec==null){X=Ye(E,1,"no memory during frame initialization.");break e}E.Vb=pt}pt=E.Ec,xt=E.Fc,E.Ac=pt,E.Bc=xt,xt+=lt,E.Gd=f(Dt,qa),E.Hd=0,E.rb=f(Pt+1,ea),E.sb=1,E.wa=ne?f(ne,Dr):null,E.Y=0,E.D.Nb=0,E.D.wa=E.wa,E.D.Y=E.Y,0<E.Aa&&(E.D.Y+=bt),t(!0),E.oc=pt,E.pc=xt,xt+=832,E.ya=f(Et,ra),E.aa=0,E.D.ya=E.ya,E.D.aa=E.aa,E.Aa==2&&(E.D.aa+=bt),E.R=16*bt,E.B=8*bt,bt=(Dt=fo[E.L])*E.R,Dt=Dt/2*E.B,E.sa=pt,E.ta=xt+bt,E.qa=E.sa,E.ra=E.ta+16*X*E.R+Dt,E.Ha=E.qa,E.Ia=E.ra+8*X*E.B+Dt,E.$c=0,xt+=Q,E.mb=ft?pt:null,E.nb=ft?xt:null,t(xt+ft<=E.Fc+E.Vb),Ha(E),a(E.Ac,E.Bc,0,lt),X=1}}if(X){if(Y.ka=0,Y.y=E.sa,Y.O=E.ta,Y.f=E.qa,Y.N=E.ra,Y.ea=E.Ha,Y.Vd=E.Ia,Y.fa=E.R,Y.Rc=E.B,Y.F=null,Y.J=0,!Nl){for(X=-255;255>=X;++X)yl[255+X]=0>X?-X:X;for(X=-1020;1020>=X;++X)xl[1020+X]=-128>X?-128:127<X?127:X;for(X=-112;112>=X;++X)Al[112+X]=-16>X?-16:15<X?15:X;for(X=-255;510>=X;++X)_l[255+X]=0>X?0:255<X?255:X;Nl=1}Yn=ji,yi=Vo,fn=sn,we=Ga,_e=Va,Mr=Go,Ue=Xa,Ze=ci,Cn=m,xa=j,qi=Za,eo=c,hl=q,cl=$,dl=hi,pl=fa,gl=Ka,vl=$a,Jr[0]=ts,Jr[1]=Yo,Jr[2]=Zo,Jr[3]=Qo,Jr[4]=wn,Jr[5]=es,Jr[6]=yn,Jr[7]=rs,Jr[8]=aa,Jr[9]=Bi,Jn[0]=$o,Jn[1]=Ko,Jn[2]=na,Jn[3]=Ya,Jn[4]=ui,Jn[5]=ia,Jn[6]=Xo,Fn[0]=is,Fn[1]=Jo,Fn[2]=fi,Fn[3]=ns,Fn[4]=sa,Fn[5]=oa,Fn[6]=Ja,X=1}else X=0}X&&(X=(function(ce,Qe){for(ce.M=0;ce.M<ce.Va;++ce.M){var ie,Ot=ce.Jc[ce.M&ce.Xb],Nt=ce.m,ze=ce;for(ie=0;ie<ze.za;++ie){var te=Nt,de=ze,Ce=de.Ac,sr=de.Bc+4*ie,mr=de.zc,De=de.ya[de.aa+ie];if(de.Qa.Bb?De.$b=gt(te,de.Pa.jb[0])?2+gt(te,de.Pa.jb[2]):gt(te,de.Pa.jb[1]):De.$b=0,de.kc&&(De.Ad=gt(te,de.Bd)),De.Za=!gt(te,145)+0,De.Za){var hr=De.Ob,br=0;for(de=0;4>de;++de){var tr,ve=mr[0+de];for(tr=0;4>tr;++tr){ve=Eh[Ce[sr+tr]][ve];for(var xe=Pl[gt(te,ve[0])];0<xe;)xe=Pl[2*xe+gt(te,ve[xe])];ve=-xe,Ce[sr+tr]=ve}n(hr,br,Ce,sr,4),br+=4,mr[0+de]=ve}}else ve=gt(te,156)?gt(te,128)?1:3:gt(te,163)?2:0,De.Ob[0]=ve,a(Ce,sr,ve,4),a(mr,0,ve,4);De.Dd=gt(te,142)?gt(te,114)?gt(te,183)?1:3:2:0}if(ze.m.Ka)return Ye(ce,7,"Premature end-of-partition0 encountered.");for(;ce.ja<ce.za;++ce.ja){if(ze=Ot,te=(Nt=ce).rb[Nt.sb-1],Ce=Nt.rb[Nt.sb+Nt.ja],ie=Nt.ya[Nt.aa+Nt.ja],sr=Nt.kc?ie.Ad:0)te.la=Ce.la=0,ie.Za||(te.Na=Ce.Na=0),ie.Hc=0,ie.Gc=0,ie.ia=0;else{var Re,Ae;if(te=Ce,Ce=ze,sr=Nt.Pa.Xc,mr=Nt.ya[Nt.aa+Nt.ja],De=Nt.pb[mr.$b],de=mr.ad,hr=0,br=Nt.rb[Nt.sb-1],ve=tr=0,a(de,hr,0,384),mr.Za)var lr=0,Kr=sr[3];else{xe=i(16);var He=te.Na+br.Na;if(He=_a(Ce,sr[1],He,De.Eb,0,xe,0),te.Na=br.Na=(0<He)+0,1<He)Yn(xe,0,de,hr);else{var yr=xe[0]+3>>3;for(xe=0;256>xe;xe+=16)de[hr+xe]=yr}lr=1,Kr=sr[0]}var Ne=15&te.la,er=15&br.la;for(xe=0;4>xe;++xe){var Sr=1&er;for(yr=Ae=0;4>yr;++yr)Ne=Ne>>1|(Sr=(He=_a(Ce,Kr,He=Sr+(1&Ne),De.Sc,lr,de,hr))>lr)<<7,Ae=Ae<<2|(3<He?3:1<He?2:de[hr+0]!=0),hr+=16;Ne>>=4,er=er>>1|Sr<<7,tr=(tr<<8|Ae)>>>0}for(Kr=Ne,lr=er>>4,Re=0;4>Re;Re+=2){for(Ae=0,Ne=te.la>>4+Re,er=br.la>>4+Re,xe=0;2>xe;++xe){for(Sr=1&er,yr=0;2>yr;++yr)He=Sr+(1&Ne),Ne=Ne>>1|(Sr=0<(He=_a(Ce,sr[2],He,De.Qc,0,de,hr)))<<3,Ae=Ae<<2|(3<He?3:1<He?2:de[hr+0]!=0),hr+=16;Ne>>=2,er=er>>1|Sr<<5}ve|=Ae<<4*Re,Kr|=Ne<<4<<Re,lr|=(240&er)<<Re}te.la=Kr,br.la=lr,mr.Hc=tr,mr.Gc=ve,mr.ia=43690&ve?0:De.ia,sr=!(tr|ve)}if(0<Nt.L&&(Nt.wa[Nt.Y+Nt.ja]=Nt.gd[ie.$b][ie.Za],Nt.wa[Nt.Y+Nt.ja].La|=!sr),ze.Ka)return Ye(ce,7,"Premature end-of-file encountered.")}if(Ha(ce),Nt=Qe,ze=1,ie=(Ot=ce).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,Tr(Ot,ie),ze=1,ie=(Ae=Ot.D).Nb,te=(ve=fo[Ot.L])*Ot.R,Ce=ve/2*Ot.B,xe=16*ie*Ot.R,yr=8*ie*Ot.B,sr=Ot.sa,mr=Ot.ta-te+xe,De=Ot.qa,de=Ot.ra-Ce+yr,hr=Ot.Ha,br=Ot.Ia-Ce+yr,er=(Ne=Ae.M)==0,tr=Ne>=Ot.Va-1,Ot.Aa==2&&Tr(Ot,Ae),Ae.uc)for(Sr=(He=Ot).D.M,t(He.D.uc),Ae=He.yb;Ae<He.Hb;++Ae){lr=Ae,Kr=Sr;var wr=(kr=(ur=He).D).Nb;Re=ur.R;var kr=kr.wa[kr.Y+lr],Pr=ur.sa,xr=ur.ta+16*wr*Re+16*lr,Cr=kr.dd,Pe=kr.tc;if(Pe!=0)if(t(3<=Pe),ur.L==1)0<lr&&pl(Pr,xr,Re,Pe+4),kr.La&&vl(Pr,xr,Re,Pe),0<Kr&&dl(Pr,xr,Re,Pe+4),kr.La&&gl(Pr,xr,Re,Pe);else{var Fr=ur.B,$r=ur.qa,xi=ur.ra+8*wr*Fr+8*lr,In=ur.Ha,ur=ur.Ia+8*wr*Fr+8*lr;wr=kr.ld,0<lr&&(Ze(Pr,xr,Re,Pe+4,Cr,wr),xa($r,xi,In,ur,Fr,Pe+4,Cr,wr)),kr.La&&(eo(Pr,xr,Re,Pe,Cr,wr),cl($r,xi,In,ur,Fr,Pe,Cr,wr)),0<Kr&&(Ue(Pr,xr,Re,Pe+4,Cr,wr),Cn($r,xi,In,ur,Fr,Pe+4,Cr,wr)),kr.La&&(qi(Pr,xr,Re,Pe,Cr,wr),hl($r,xi,In,ur,Fr,Pe,Cr,wr))}}if(Ot.ia&&alert("todo:DitherRow"),Nt.put!=null){if(Ae=16*Ne,Ne=16*(Ne+1),er?(Nt.y=Ot.sa,Nt.O=Ot.ta+xe,Nt.f=Ot.qa,Nt.N=Ot.ra+yr,Nt.ea=Ot.Ha,Nt.W=Ot.Ia+yr):(Ae-=ve,Nt.y=sr,Nt.O=mr,Nt.f=De,Nt.N=de,Nt.ea=hr,Nt.W=br),tr||(Ne-=ve),Ne>Nt.o&&(Ne=Nt.o),Nt.F=null,Nt.J=null,Ot.Fa!=null&&0<Ot.Fa.length&&Ae<Ne&&(Nt.J=ke(Ot,Nt,Ae,Ne-Ae),Nt.F=Ot.mb,Nt.F==null&&Nt.F.length==0)){ze=Ye(Ot,3,"Could not decode alpha data.");break e}Ae<Nt.j&&(ve=Nt.j-Ae,Ae=Nt.j,t(!(1&ve)),Nt.O+=Ot.R*ve,Nt.N+=Ot.B*(ve>>1),Nt.W+=Ot.B*(ve>>1),Nt.F!=null&&(Nt.J+=Nt.width*ve)),Ae<Ne&&(Nt.O+=Nt.v,Nt.N+=Nt.v>>1,Nt.W+=Nt.v>>1,Nt.F!=null&&(Nt.J+=Nt.v),Nt.ka=Ae-Nt.j,Nt.U=Nt.va-Nt.v,Nt.T=Ne-Ae,ze=Nt.put(Nt))}ie+1!=Ot.Ic||tr||(n(Ot.sa,Ot.ta-te,sr,mr+16*Ot.R,te),n(Ot.qa,Ot.ra-Ce,De,de+8*Ot.B,Ce),n(Ot.Ha,Ot.Ia-Ce,hr,br+8*Ot.B,Ce))}if(!ze)return Ye(ce,6,"Output aborted.")}return 1})(E,Y)),Y.bc!=null&&Y.bc(Y),X&=1}return X?(E.cb=0,X):0})(o,v)||(s=o.a)}}else s=o.a}s==0&&A.Oa!=null&&A.Oa.fd&&(s=ga(A.ba))}A=s}y=A!=0?null:11>y?N.f.RGBA.eb:N.f.kb.y}else y=null;return y};var Dl=[3,4,3,4,4,2,2,4,4,4,2,1,1]};function h(R,tt){for(var L="",O=0;O<4;O++)L+=String.fromCharCode(R[tt++]);return L}function p(R,tt){return R[tt+0]|R[tt+1]<<8}function w(R,tt){return(R[tt+0]|R[tt+1]<<8|R[tt+2]<<16)>>>0}function x(R,tt){return(R[tt+0]|R[tt+1]<<8|R[tt+2]<<16|R[tt+3]<<24)>>>0}new u;var g=[0],P=[0],C=[],B=new u,S=r,G=(function(R,tt){var L={},O=0,z=!1,U=0,nt=0;if(L.frames=[],!(function(_,D){for(var T=0;T<4;T++)if(_[D+T]!="RIFF".charCodeAt(T))return!0;return!1})(R,tt)){for(x(R,tt+=4),tt+=8;tt<R.length;){var st=h(R,tt),ut=x(R,tt+=4);tt+=4;var rt=ut+(1&ut);switch(st){case"VP8 ":case"VP8L":L.frames[O]===void 0&&(L.frames[O]={}),(wt=L.frames[O]).src_off=z?nt:tt-8,wt.src_size=U+ut+8,O++,z&&(z=!1,U=0,nt=0);break;case"VP8X":(wt=L.header={}).feature_flags=R[tt];var ht=tt+4;wt.canvas_width=1+w(R,ht),ht+=3,wt.canvas_height=1+w(R,ht),ht+=3;break;case"ALPH":z=!0,U=rt+8,nt=tt-8;break;case"ANIM":(wt=L.header).bgcolor=x(R,tt),ht=tt+4,wt.loop_count=p(R,ht),ht+=2;break;case"ANMF":var _t,wt;(wt=L.frames[O]={}).offset_x=2*w(R,tt),tt+=3,wt.offset_y=2*w(R,tt),tt+=3,wt.width=1+w(R,tt),tt+=3,wt.height=1+w(R,tt),tt+=3,wt.duration=w(R,tt),tt+=3,_t=R[tt++],wt.dispose=1&_t,wt.blend=_t>>1&1}st!="ANMF"&&(tt+=rt)}return L}})(S,0);G.response=S,G.rgbaoutput=!0,G.dataurl=!1;var V=G.header?G.header:null,M=G.frames?G.frames:null;if(V){V.loop_counter=V.loop_count,g=[V.canvas_height],P=[V.canvas_width];for(var it=0;it<M.length&&M[it].blend!=0;it++);}var vt=M[0],ct=B.WebPDecodeRGBA(S,vt.src_off,vt.src_size,P,g);vt.rgba=ct,vt.imgwidth=P[0],vt.imgheight=g[0];for(var K=0;K<P[0]*g[0]*4;K++)C[K]=ct[K];return this.width=P,this.height=g,this.data=C,this}(function(r){var t,e,n,a,i,f,l,u,h,p=function(_){return _=_||{},this.isStrokeTransparent=_.isStrokeTransparent||!1,this.strokeOpacity=_.strokeOpacity||1,this.strokeStyle=_.strokeStyle||"#000000",this.fillStyle=_.fillStyle||"#000000",this.isFillTransparent=_.isFillTransparent||!1,this.fillOpacity=_.fillOpacity||1,this.font=_.font||"10px sans-serif",this.textBaseline=_.textBaseline||"alphabetic",this.textAlign=_.textAlign||"left",this.lineWidth=_.lineWidth||1,this.lineJoin=_.lineJoin||"miter",this.lineCap=_.lineCap||"butt",this.path=_.path||[],this.transform=_.transform!==void 0?_.transform.clone():new u,this.globalCompositeOperation=_.globalCompositeOperation||"normal",this.globalAlpha=_.globalAlpha||1,this.clip_path=_.clip_path||[],this.currentPoint=_.currentPoint||new f,this.miterLimit=_.miterLimit||10,this.lastPoint=_.lastPoint||new f,this.lineDashOffset=_.lineDashOffset||0,this.lineDash=_.lineDash||[],this.margin=_.margin||[0,0,0,0],this.prevPageLastElemOffset=_.prevPageLastElemOffset||0,this.ignoreClearRect=typeof _.ignoreClearRect!="boolean"||_.ignoreClearRect,this};r.events.push(["initialized",function(){this.context2d=new w(this),t=this.internal.f2,e=this.internal.getCoordinateString,n=this.internal.getVerticalCoordinateString,a=this.internal.getHorizontalCoordinate,i=this.internal.getVerticalCoordinate,f=this.internal.Point,l=this.internal.Rectangle,u=this.internal.Matrix,h=new p}]);var w=function(_){Object.defineProperty(this,"canvas",{get:function(){return{parentNode:!1,style:!1}}});var D=_;Object.defineProperty(this,"pdf",{get:function(){return D}});var T=!1;Object.defineProperty(this,"pageWrapXEnabled",{get:function(){return T},set:function(F){T=!!F}});var H=!1;Object.defineProperty(this,"pageWrapYEnabled",{get:function(){return H},set:function(F){H=!!F}});var J=0;Object.defineProperty(this,"posX",{get:function(){return J},set:function(F){isNaN(F)||(J=F)}});var Z=0;Object.defineProperty(this,"posY",{get:function(){return Z},set:function(F){isNaN(F)||(Z=F)}}),Object.defineProperty(this,"margin",{get:function(){return h.margin},set:function(F){var Lt;typeof F=="number"?Lt=[F,F,F,F]:((Lt=new Array(4))[0]=F[0],Lt[1]=F.length>=2?F[1]:Lt[0],Lt[2]=F.length>=3?F[2]:Lt[0],Lt[3]=F.length>=4?F[3]:Lt[1]),h.margin=Lt}});var at=!1;Object.defineProperty(this,"autoPaging",{get:function(){return at},set:function(F){at=F}});var ot=0;Object.defineProperty(this,"lastBreak",{get:function(){return ot},set:function(F){ot=F}});var gt=[];Object.defineProperty(this,"pageBreaks",{get:function(){return gt},set:function(F){gt=F}}),Object.defineProperty(this,"ctx",{get:function(){return h},set:function(F){F instanceof p&&(h=F)}}),Object.defineProperty(this,"path",{get:function(){return h.path},set:function(F){h.path=F}});var At=[];Object.defineProperty(this,"ctxStack",{get:function(){return At},set:function(F){At=F}}),Object.defineProperty(this,"fillStyle",{get:function(){return this.ctx.fillStyle},set:function(F){var Lt;Lt=x(F),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(F){var Lt=x(F);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(F){["butt","round","square"].indexOf(F)!==-1&&(this.ctx.lineCap=F,this.pdf.setLineCap(F))}}),Object.defineProperty(this,"lineWidth",{get:function(){return this.ctx.lineWidth},set:function(F){isNaN(F)||(this.ctx.lineWidth=F,this.pdf.setLineWidth(F))}}),Object.defineProperty(this,"lineJoin",{get:function(){return this.ctx.lineJoin},set:function(F){["bevel","round","miter"].indexOf(F)!==-1&&(this.ctx.lineJoin=F,this.pdf.setLineJoin(F))}}),Object.defineProperty(this,"miterLimit",{get:function(){return this.ctx.miterLimit},set:function(F){isNaN(F)||(this.ctx.miterLimit=F,this.pdf.setMiterLimit(F))}}),Object.defineProperty(this,"textBaseline",{get:function(){return this.ctx.textBaseline},set:function(F){this.ctx.textBaseline=F}}),Object.defineProperty(this,"textAlign",{get:function(){return this.ctx.textAlign},set:function(F){["right","end","center","left","start"].indexOf(F)!==-1&&(this.ctx.textAlign=F)}});var kt=null,St=null,Mt=null;Object.defineProperty(this,"fontFaces",{get:function(){return Mt},set:function(F){kt=null,St=null,Mt=F}}),Object.defineProperty(this,"font",{get:function(){return this.ctx.font},set:function(F){var Lt;if(this.ctx.font=F,(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(F))!==null){var ae=Lt[1];Lt[2];var Ht=Lt[3],yt=Lt[4];Lt[5];var Wt=Lt[6],Ct=/^([.\d]+)((?:%|in|[cem]m|ex|p[ctx]))$/i.exec(yt)[2];yt=Math.floor(Ct==="px"?parseFloat(yt)*this.pdf.internal.scaleFactor:Ct==="em"?parseFloat(yt)*this.pdf.getFontSize():parseFloat(yt)*this.pdf.internal.scaleFactor),this.pdf.setFontSize(yt);var zt=(function(Tt){var Me,pe,oe=[],se=Tt.trim();if(se==="")return Ms;if(se in Gu)return[Gu[se]];for(;se!=="";){switch(pe=null,Me=(se=Yu(se)).charAt(0)){case'"':case"'":pe=S2(se.substring(1),Me);break;default:pe=k2(se)}if(pe===null||(oe.push(pe[0]),(se=Yu(pe[1]))!==""&&se.charAt(0)!==","))return Ms;se=se.replace(/^,/,"")}return oe})(Wt);if(this.fontFaces){var qt=(function(Tt,Me){var pe=Tt.getFontList(),oe=JSON.stringify(pe);if(kt===null||St!==oe){var se=(function(Ie){var Ut=[];return Object.keys(Ie).forEach(function(Se){Ie[Se].forEach(function(Yt){var Qt=null;switch(Yt){case"bold":Qt={family:Se,weight:"bold"};break;case"italic":Qt={family:Se,style:"italic"};break;case"bolditalic":Qt={family:Se,weight:"bold",style:"italic"};break;case"":case"normal":Qt={family:Se}}Qt!==null&&(Qt.ref={name:Se,style:Yt},Ut.push(Qt))})}),Ut})(pe);kt=(function(Ie){for(var Ut={},Se=0;Se<Ie.length;++Se){var Yt=Ts(Ie[Se]),Qt=Yt.family,Ee=Yt.stretch,le=Yt.style,Gt=Yt.weight;Ut[Qt]=Ut[Qt]||{},Ut[Qt][Ee]=Ut[Qt][Ee]||{},Ut[Qt][Ee][le]=Ut[Qt][Ee][le]||{},Ut[Qt][Ee][le][Gt]=Yt}return Ut})(se.concat(Me)),St=oe}return kt})(this.pdf,this.fontFaces),me=zt.map(function(Tt){return{family:Tt,stretch:"normal",weight:Ht,style:ae}}),ue=(function(Tt,Me,pe){for(var oe=(pe=pe||{}).defaultFontFamily||"times",se=Object.assign({},L2,pe.genericFontFamilies||{}),Ie=null,Ut=null,Se=0;Se<Me.length;++Se)if(se[(Ie=Ts(Me[Se])).family]&&(Ie.family=se[Ie.family]),Tt.hasOwnProperty(Ie.family)){Ut=Tt[Ie.family];break}if(!(Ut=Ut||Tt[oe]))throw new Error("Could not find a font-family for the rule '"+Vu(Ie)+"' and default family '"+oe+"'.");if(Ut=(function(Yt,Qt){if(Qt[Yt])return Qt[Yt];var Ee=rl[Yt],le=Ee<=rl.normal?-1:1,Gt=Wu(Qt,rh,Ee,le);if(!Gt)throw new Error("Could not find a matching font-stretch value for "+Yt);return Gt})(Ie.stretch,Ut),Ut=(function(Yt,Qt){if(Qt[Yt])return Qt[Yt];for(var Ee=eh[Yt],le=0;le<Ee.length;++le)if(Qt[Ee[le]])return Qt[Ee[le]];throw new Error("Could not find a matching font-style for "+Yt)})(Ie.style,Ut),!(Ut=(function(Yt,Qt){if(Qt[Yt])return Qt[Yt];if(Yt===400&&Qt[500])return Qt[500];if(Yt===500&&Qt[400])return Qt[400];var Ee=N2[Yt],le=Wu(Qt,nh,Ee,Yt<400?-1:1);if(!le)throw new Error("Could not find a matching font-weight for value "+Yt);return le})(Ie.weight,Ut)))throw new Error("Failed to resolve a font for the rule '"+Vu(Ie)+"'.");return Ut})(qt,me);this.pdf.setFont(ue.ref.name,ue.ref.style)}else{var Zt="";(Ht==="bold"||parseInt(Ht,10)>=700||ae==="bold")&&(Zt="bold"),ae==="italic"&&(Zt+="italic"),Zt.length===0&&(Zt="normal");for(var he="",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"},jt=0;jt<zt.length;jt++){if(this.pdf.internal.getFont(zt[jt],Zt,{noFallback:!0,disableWarning:!0})!==void 0){he=zt[jt];break}if(Zt==="bolditalic"&&this.pdf.internal.getFont(zt[jt],"bold",{noFallback:!0,disableWarning:!0})!==void 0)he=zt[jt],Zt="bold";else if(this.pdf.internal.getFont(zt[jt],"normal",{noFallback:!0,disableWarning:!0})!==void 0){he=zt[jt],Zt="normal";break}}if(he===""){for(var ee=0;ee<zt.length;ee++)if(fe[zt[ee]]){he=fe[zt[ee]];break}}he=he===""?"Times":he,this.pdf.setFont(he,Zt)}}}}),Object.defineProperty(this,"globalCompositeOperation",{get:function(){return this.ctx.globalCompositeOperation},set:function(F){this.ctx.globalCompositeOperation=F}}),Object.defineProperty(this,"globalAlpha",{get:function(){return this.ctx.globalAlpha},set:function(F){this.ctx.globalAlpha=F}}),Object.defineProperty(this,"lineDashOffset",{get:function(){return this.ctx.lineDashOffset},set:function(F){this.ctx.lineDashOffset=F,wt.call(this)}}),Object.defineProperty(this,"lineDash",{get:function(){return this.ctx.lineDash},set:function(F){this.ctx.lineDash=F,wt.call(this)}}),Object.defineProperty(this,"ignoreClearRect",{get:function(){return this.ctx.ignoreClearRect},set:function(F){this.ctx.ignoreClearRect=!!F}})};w.prototype.setLineDash=function(_){this.lineDash=_},w.prototype.getLineDash=function(){return this.lineDash.length%2?this.lineDash.concat(this.lineDash):this.lineDash.slice()},w.prototype.fill=function(){M.call(this,"fill",!1)},w.prototype.stroke=function(){M.call(this,"stroke",!1)},w.prototype.beginPath=function(){this.path=[{type:"begin"}]},w.prototype.moveTo=function(_,D){if(isNaN(_)||isNaN(D))throw Le.error("jsPDF.context2d.moveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.moveTo");var T=this.ctx.transform.applyToPoint(new f(_,D));this.path.push({type:"mt",x:T.x,y:T.y}),this.ctx.lastPoint=new f(_,D)},w.prototype.closePath=function(){var _=new f(0,0),D=0;for(D=this.path.length-1;D!==-1;D--)if(this.path[D].type==="begin"&&ye(this.path[D+1])==="object"&&typeof this.path[D+1].x=="number"){_=new f(this.path[D+1].x,this.path[D+1].y);break}this.path.push({type:"close"}),this.ctx.lastPoint=new f(_.x,_.y)},w.prototype.lineTo=function(_,D){if(isNaN(_)||isNaN(D))throw Le.error("jsPDF.context2d.lineTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.lineTo");var T=this.ctx.transform.applyToPoint(new f(_,D));this.path.push({type:"lt",x:T.x,y:T.y}),this.ctx.lastPoint=new f(T.x,T.y)},w.prototype.clip=function(){this.ctx.clip_path=JSON.parse(JSON.stringify(this.path)),M.call(this,null,!0)},w.prototype.quadraticCurveTo=function(_,D,T,H){if(isNaN(T)||isNaN(H)||isNaN(_)||isNaN(D))throw Le.error("jsPDF.context2d.quadraticCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.quadraticCurveTo");var J=this.ctx.transform.applyToPoint(new f(T,H)),Z=this.ctx.transform.applyToPoint(new f(_,D));this.path.push({type:"qct",x1:Z.x,y1:Z.y,x:J.x,y:J.y}),this.ctx.lastPoint=new f(J.x,J.y)},w.prototype.bezierCurveTo=function(_,D,T,H,J,Z){if(isNaN(J)||isNaN(Z)||isNaN(_)||isNaN(D)||isNaN(T)||isNaN(H))throw Le.error("jsPDF.context2d.bezierCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.bezierCurveTo");var at=this.ctx.transform.applyToPoint(new f(J,Z)),ot=this.ctx.transform.applyToPoint(new f(_,D)),gt=this.ctx.transform.applyToPoint(new f(T,H));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 f(at.x,at.y)},w.prototype.arc=function(_,D,T,H,J,Z){if(isNaN(_)||isNaN(D)||isNaN(T)||isNaN(H)||isNaN(J))throw Le.error("jsPDF.context2d.arc: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.arc");if(Z=!!Z,!this.ctx.transform.isIdentity){var at=this.ctx.transform.applyToPoint(new f(_,D));_=at.x,D=at.y;var ot=this.ctx.transform.applyToPoint(new f(0,T)),gt=this.ctx.transform.applyToPoint(new f(0,0));T=Math.sqrt(Math.pow(ot.x-gt.x,2)+Math.pow(ot.y-gt.y,2))}Math.abs(J-H)>=2*Math.PI&&(H=0,J=2*Math.PI),this.path.push({type:"arc",x:_,y:D,radius:T,startAngle:H,endAngle:J,counterclockwise:Z})},w.prototype.arcTo=function(_,D,T,H,J){throw new Error("arcTo not implemented.")},w.prototype.rect=function(_,D,T,H){if(isNaN(_)||isNaN(D)||isNaN(T)||isNaN(H))throw Le.error("jsPDF.context2d.rect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rect");this.moveTo(_,D),this.lineTo(_+T,D),this.lineTo(_+T,D+H),this.lineTo(_,D+H),this.lineTo(_,D),this.lineTo(_+T,D),this.lineTo(_,D)},w.prototype.fillRect=function(_,D,T,H){if(isNaN(_)||isNaN(D)||isNaN(T)||isNaN(H))throw Le.error("jsPDF.context2d.fillRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillRect");if(!g.call(this)){var J={};this.lineCap!=="butt"&&(J.lineCap=this.lineCap,this.lineCap="butt"),this.lineJoin!=="miter"&&(J.lineJoin=this.lineJoin,this.lineJoin="miter"),this.beginPath(),this.rect(_,D,T,H),this.fill(),J.hasOwnProperty("lineCap")&&(this.lineCap=J.lineCap),J.hasOwnProperty("lineJoin")&&(this.lineJoin=J.lineJoin)}},w.prototype.strokeRect=function(_,D,T,H){if(isNaN(_)||isNaN(D)||isNaN(T)||isNaN(H))throw Le.error("jsPDF.context2d.strokeRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeRect");P.call(this)||(this.beginPath(),this.rect(_,D,T,H),this.stroke())},w.prototype.clearRect=function(_,D,T,H){if(isNaN(_)||isNaN(D)||isNaN(T)||isNaN(H))throw Le.error("jsPDF.context2d.clearRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.clearRect");this.ignoreClearRect||(this.fillStyle="#ffffff",this.fillRect(_,D,T,H))},w.prototype.save=function(_){_=typeof _!="boolean"||_;for(var D=this.pdf.internal.getCurrentPageInfo().pageNumber,T=0;T<this.pdf.internal.getNumberOfPages();T++)this.pdf.setPage(T+1),this.pdf.internal.out("q");if(this.pdf.setPage(D),_){this.ctx.fontSize=this.pdf.internal.getFontSize();var H=new p(this.ctx);this.ctxStack.push(this.ctx),this.ctx=H}},w.prototype.restore=function(_){_=typeof _!="boolean"||_;for(var D=this.pdf.internal.getCurrentPageInfo().pageNumber,T=0;T<this.pdf.internal.getNumberOfPages();T++)this.pdf.setPage(T+1),this.pdf.internal.out("Q");this.pdf.setPage(D),_&&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)},w.prototype.toDataURL=function(){throw new Error("toDataUrl not implemented.")};var x=function(_){var D,T,H,J;if(_.isCanvasGradient===!0&&(_=_.getColor()),!_)return{r:0,g:0,b:0,a:0,style:_};if(/transparent|rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*0+\s*\)/.test(_))D=0,T=0,H=0,J=0;else{var Z=/rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/.exec(_);if(Z!==null)D=parseInt(Z[1]),T=parseInt(Z[2]),H=parseInt(Z[3]),J=1;else if((Z=/rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)/.exec(_))!==null)D=parseInt(Z[1]),T=parseInt(Z[2]),H=parseInt(Z[3]),J=parseFloat(Z[4]);else{if(J=1,typeof _=="string"&&_.charAt(0)!=="#"){var at=new Jf(_);_=at.ok?at.toHex():"#000000"}_.length===4?(D=_.substring(1,2),D+=D,T=_.substring(2,3),T+=T,H=_.substring(3,4),H+=H):(D=_.substring(1,3),T=_.substring(3,5),H=_.substring(5,7)),D=parseInt(D,16),T=parseInt(T,16),H=parseInt(H,16)}}return{r:D,g:T,b:H,a:J,style:_}},g=function(){return this.ctx.isFillTransparent||this.globalAlpha==0},P=function(){return!!(this.ctx.isStrokeTransparent||this.globalAlpha==0)};w.prototype.fillText=function(_,D,T,H){if(isNaN(D)||isNaN(T)||typeof _!="string")throw Le.error("jsPDF.context2d.fillText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillText");if(H=isNaN(H)?void 0:H,!g.call(this)){var J=rt(this.ctx.transform.rotation),Z=this.ctx.transform.scaleX;O.call(this,{text:_,x:D,y:T,scale:Z,angle:J,align:this.textAlign,maxWidth:H})}},w.prototype.strokeText=function(_,D,T,H){if(isNaN(D)||isNaN(T)||typeof _!="string")throw Le.error("jsPDF.context2d.strokeText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeText");if(!P.call(this)){H=isNaN(H)?void 0:H;var J=rt(this.ctx.transform.rotation),Z=this.ctx.transform.scaleX;O.call(this,{text:_,x:D,y:T,scale:Z,renderingMode:"stroke",angle:J,align:this.textAlign,maxWidth:H})}},w.prototype.measureText=function(_){if(typeof _!="string")throw Le.error("jsPDF.context2d.measureText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.measureText");var D=this.pdf,T=this.pdf.internal.scaleFactor,H=D.internal.getFontSize(),J=D.getStringUnitWidth(_)*H/D.internal.scaleFactor;return new function(Z){var at=(Z=Z||{}).width||0;return Object.defineProperty(this,"width",{get:function(){return at}}),this}({width:J*=Math.round(96*T/72*1e4)/1e4})},w.prototype.scale=function(_,D){if(isNaN(_)||isNaN(D))throw Le.error("jsPDF.context2d.scale: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.scale");var T=new u(_,0,0,D,0,0);this.ctx.transform=this.ctx.transform.multiply(T)},w.prototype.rotate=function(_){if(isNaN(_))throw Le.error("jsPDF.context2d.rotate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rotate");var D=new u(Math.cos(_),Math.sin(_),-Math.sin(_),Math.cos(_),0,0);this.ctx.transform=this.ctx.transform.multiply(D)},w.prototype.translate=function(_,D){if(isNaN(_)||isNaN(D))throw Le.error("jsPDF.context2d.translate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.translate");var T=new u(1,0,0,1,_,D);this.ctx.transform=this.ctx.transform.multiply(T)},w.prototype.transform=function(_,D,T,H,J,Z){if(isNaN(_)||isNaN(D)||isNaN(T)||isNaN(H)||isNaN(J)||isNaN(Z))throw Le.error("jsPDF.context2d.transform: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.transform");var at=new u(_,D,T,H,J,Z);this.ctx.transform=this.ctx.transform.multiply(at)},w.prototype.setTransform=function(_,D,T,H,J,Z){_=isNaN(_)?1:_,D=isNaN(D)?0:D,T=isNaN(T)?0:T,H=isNaN(H)?1:H,J=isNaN(J)?0:J,Z=isNaN(Z)?0:Z,this.ctx.transform=new u(_,D,T,H,J,Z)};var C=function(){return this.margin[0]>0||this.margin[1]>0||this.margin[2]>0||this.margin[3]>0};w.prototype.drawImage=function(_,D,T,H,J,Z,at,ot,gt){var At=this.pdf.getImageProperties(_),kt=1,St=1,Mt=1,F=1;H!==void 0&&ot!==void 0&&(Mt=ot/H,F=gt/J,kt=At.width/H*ot/H,St=At.height/J*gt/J),Z===void 0&&(Z=D,at=T,D=0,T=0),H!==void 0&&ot===void 0&&(ot=H,gt=J),H===void 0&&ot===void 0&&(ot=At.width,gt=At.height);var Lt=this.ctx.transform.decompose(),ae=rt(Lt.rotate.shx),Ht=new u,yt=(Ht=(Ht=(Ht=Ht.multiply(Lt.translate)).multiply(Lt.skew)).multiply(Lt.scale)).applyToRectangle(new l(Z-D*Mt,at-T*F,H*kt,J*St));if(this.autoPaging){for(var Wt,Ct=B.call(this,yt),zt=[],qt=0;qt<Ct.length;qt+=1)zt.indexOf(Ct[qt])===-1&&zt.push(Ct[qt]);V(zt);for(var me=zt[0],ue=zt[zt.length-1],Zt=me;Zt<ue+1;Zt++){this.pdf.setPage(Zt);var he=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],fe=Zt===1?this.posY+this.margin[0]:this.margin[0],jt=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],ee=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],Tt=Zt===1?0:jt+(Zt-2)*ee;if(this.ctx.clip_path.length!==0){var Me=this.path;Wt=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=G(Wt,this.posX+this.margin[3],-Tt+fe+this.ctx.prevPageLastElemOffset),it.call(this,"fill",!0),this.path=Me}var pe=JSON.parse(JSON.stringify(yt));pe=G([pe],this.posX+this.margin[3],-Tt+fe+this.ctx.prevPageLastElemOffset)[0];var oe=(Zt>me||Zt<ue)&&C.call(this);oe&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],he,ee,null).clip().discardPath()),this.pdf.addImage(_,"JPEG",pe.x,pe.y,pe.w,pe.h,null,null,ae),oe&&this.pdf.restoreGraphicsState()}}else this.pdf.addImage(_,"JPEG",yt.x,yt.y,yt.w,yt.h,null,null,ae)};var B=function(_,D,T){var H=[];D=D||this.pdf.internal.pageSize.width,T=T||this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2];var J=this.posY+this.ctx.prevPageLastElemOffset;switch(_.type){default:case"mt":case"lt":H.push(Math.floor((_.y+J)/T)+1);break;case"arc":H.push(Math.floor((_.y+J-_.radius)/T)+1),H.push(Math.floor((_.y+J+_.radius)/T)+1);break;case"qct":var Z=ht(this.ctx.lastPoint.x,this.ctx.lastPoint.y,_.x1,_.y1,_.x,_.y);H.push(Math.floor((Z.y+J)/T)+1),H.push(Math.floor((Z.y+Z.h+J)/T)+1);break;case"bct":var at=_t(this.ctx.lastPoint.x,this.ctx.lastPoint.y,_.x1,_.y1,_.x2,_.y2,_.x,_.y);H.push(Math.floor((at.y+J)/T)+1),H.push(Math.floor((at.y+at.h+J)/T)+1);break;case"rect":H.push(Math.floor((_.y+J)/T)+1),H.push(Math.floor((_.y+_.h+J)/T)+1)}for(var ot=0;ot<H.length;ot+=1)for(;this.pdf.internal.getNumberOfPages()<H[ot];)S.call(this);return H},S=function(){var _=this.fillStyle,D=this.strokeStyle,T=this.font,H=this.lineCap,J=this.lineWidth,Z=this.lineJoin;this.pdf.addPage(),this.fillStyle=_,this.strokeStyle=D,this.font=T,this.lineCap=H,this.lineWidth=J,this.lineJoin=Z},G=function(_,D,T){for(var H=0;H<_.length;H++)switch(_[H].type){case"bct":_[H].x2+=D,_[H].y2+=T;case"qct":_[H].x1+=D,_[H].y1+=T;default:_[H].x+=D,_[H].y+=T}return _},V=function(_){return _.sort(function(D,T){return D-T})},M=function(_,D){var T=this.fillStyle,H=this.strokeStyle,J=this.lineCap,Z=this.lineWidth,at=Math.abs(Z*this.ctx.transform.scaleX),ot=this.lineJoin;if(this.autoPaging){for(var gt,At,kt=JSON.parse(JSON.stringify(this.path)),St=JSON.parse(JSON.stringify(this.path)),Mt=[],F=0;F<St.length;F++)if(St[F].x!==void 0)for(var Lt=B.call(this,St[F]),ae=0;ae<Lt.length;ae+=1)Mt.indexOf(Lt[ae])===-1&&Mt.push(Lt[ae]);for(var Ht=0;Ht<Mt.length;Ht++)for(;this.pdf.internal.getNumberOfPages()<Mt[Ht];)S.call(this);V(Mt);for(var yt=Mt[0],Wt=Mt[Mt.length-1],Ct=yt;Ct<Wt+1;Ct++){this.pdf.setPage(Ct),this.fillStyle=T,this.strokeStyle=H,this.lineCap=J,this.lineWidth=at,this.lineJoin=ot;var zt=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],qt=Ct===1?this.posY+this.margin[0]:this.margin[0],me=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],ue=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],Zt=Ct===1?0:me+(Ct-2)*ue;if(this.ctx.clip_path.length!==0){var he=this.path;gt=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=G(gt,this.posX+this.margin[3],-Zt+qt+this.ctx.prevPageLastElemOffset),it.call(this,_,!0),this.path=he}if(At=JSON.parse(JSON.stringify(kt)),this.path=G(At,this.posX+this.margin[3],-Zt+qt+this.ctx.prevPageLastElemOffset),D===!1||Ct===0){var fe=(Ct>yt||Ct<Wt)&&C.call(this);fe&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],zt,ue,null).clip().discardPath()),it.call(this,_,D),fe&&this.pdf.restoreGraphicsState()}this.lineWidth=Z}this.path=kt}else this.lineWidth=at,it.call(this,_,D),this.lineWidth=Z},it=function(_,D){if((_!=="stroke"||D||!P.call(this))&&(_==="stroke"||D||!g.call(this))){for(var T,H,J=[],Z=this.path,at=0;at<Z.length;at++){var ot=Z[at];switch(ot.type){case"begin":J.push({begin:!0});break;case"close":J.push({close:!0});break;case"mt":J.push({start:ot,deltas:[],abs:[]});break;case"lt":var gt=J.length;if(Z[at-1]&&!isNaN(Z[at-1].x)&&(T=[ot.x-Z[at-1].x,ot.y-Z[at-1].y],gt>0)){for(;gt>=0;gt--)if(J[gt-1].close!==!0&&J[gt-1].begin!==!0){J[gt-1].deltas.push(T),J[gt-1].abs.push(ot);break}}break;case"bct":T=[ot.x1-Z[at-1].x,ot.y1-Z[at-1].y,ot.x2-Z[at-1].x,ot.y2-Z[at-1].y,ot.x-Z[at-1].x,ot.y-Z[at-1].y],J[J.length-1].deltas.push(T);break;case"qct":var At=Z[at-1].x+2/3*(ot.x1-Z[at-1].x),kt=Z[at-1].y+2/3*(ot.y1-Z[at-1].y),St=ot.x+2/3*(ot.x1-ot.x),Mt=ot.y+2/3*(ot.y1-ot.y),F=ot.x,Lt=ot.y;T=[At-Z[at-1].x,kt-Z[at-1].y,St-Z[at-1].x,Mt-Z[at-1].y,F-Z[at-1].x,Lt-Z[at-1].y],J[J.length-1].deltas.push(T);break;case"arc":J.push({deltas:[],abs:[],arc:!0}),Array.isArray(J[J.length-1].abs)&&J[J.length-1].abs.push(ot)}}H=D?null:_==="stroke"?"stroke":"fill";for(var ae=!1,Ht=0;Ht<J.length;Ht++)if(J[Ht].arc)for(var yt=J[Ht].abs,Wt=0;Wt<yt.length;Wt++){var Ct=yt[Wt];Ct.type==="arc"?K.call(this,Ct.x,Ct.y,Ct.radius,Ct.startAngle,Ct.endAngle,Ct.counterclockwise,void 0,D,!ae):z.call(this,Ct.x,Ct.y),ae=!0}else if(J[Ht].close===!0)this.pdf.internal.out("h"),ae=!1;else if(J[Ht].begin!==!0){var zt=J[Ht].start.x,qt=J[Ht].start.y;U.call(this,J[Ht].deltas,zt,qt),ae=!0}H&&R.call(this,H),D&&tt.call(this)}},vt=function(_){var D=this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor,T=D*(this.pdf.internal.getLineHeightFactor()-1);switch(this.ctx.textBaseline){case"bottom":return _-T;case"top":return _+D-T;case"hanging":return _+D-2*T;case"middle":return _+D/2-T;default:return _}},ct=function(_){return _+this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor*(this.pdf.internal.getLineHeightFactor()-1)};w.prototype.createLinearGradient=function(){var _=function(){};return _.colorStops=[],_.addColorStop=function(D,T){this.colorStops.push([D,T])},_.getColor=function(){return this.colorStops.length===0?"#000000":this.colorStops[0][1]},_.isCanvasGradient=!0,_},w.prototype.createPattern=function(){return this.createLinearGradient()},w.prototype.createRadialGradient=function(){return this.createLinearGradient()};var K=function(_,D,T,H,J,Z,at,ot,gt){for(var At=st.call(this,T,H,J,Z),kt=0;kt<At.length;kt++){var St=At[kt];kt===0&&(gt?L.call(this,St.x1+_,St.y1+D):z.call(this,St.x1+_,St.y1+D)),nt.call(this,_,D,St.x2,St.y2,St.x3,St.y3,St.x4,St.y4)}ot?tt.call(this):R.call(this,at)},R=function(_){switch(_){case"stroke":this.pdf.internal.out("S");break;case"fill":this.pdf.internal.out("f")}},tt=function(){this.pdf.clip(),this.pdf.discardPath()},L=function(_,D){this.pdf.internal.out(e(_)+" "+n(D)+" m")},O=function(_){var D;switch(_.align){case"right":case"end":D="right";break;case"center":D="center";break;default:D="left"}var T,H,J,Z=this.pdf.getTextDimensions(_.text),at=vt.call(this,_.y),ot=ct.call(this,at)-Z.h,gt=this.ctx.transform.applyToPoint(new f(_.x,at));if(this.autoPaging){var At=this.ctx.transform.decompose(),kt=new u;kt=(kt=(kt=kt.multiply(At.translate)).multiply(At.skew)).multiply(At.scale);for(var St=this.ctx.transform.applyToRectangle(new l(_.x,at,Z.w,Z.h)),Mt=kt.applyToRectangle(new l(_.x,ot,Z.w,Z.h)),F=B.call(this,Mt),Lt=[],ae=0;ae<F.length;ae+=1)Lt.indexOf(F[ae])===-1&&Lt.push(F[ae]);V(Lt);for(var Ht=Lt[0],yt=Lt[Lt.length-1],Wt=Ht;Wt<yt+1;Wt++){this.pdf.setPage(Wt);var Ct=Wt===1?this.posY+this.margin[0]:this.margin[0],zt=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],qt=this.pdf.internal.pageSize.height-this.margin[2],me=qt-this.margin[0],ue=this.pdf.internal.pageSize.width-this.margin[1],Zt=ue-this.margin[3],he=Wt===1?0:zt+(Wt-2)*me;if(this.ctx.clip_path.length!==0){var fe=this.path;T=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=G(T,this.posX+this.margin[3],-1*he+Ct),it.call(this,"fill",!0),this.path=fe}var jt=G([JSON.parse(JSON.stringify(Mt))],this.posX+this.margin[3],-he+Ct+this.ctx.prevPageLastElemOffset)[0];_.scale>=.01&&(H=this.pdf.internal.getFontSize(),this.pdf.setFontSize(H*_.scale),J=this.lineWidth,this.lineWidth=J*_.scale);var ee=this.autoPaging!=="text";if(ee||jt.y+jt.h<=qt){if(ee||jt.y>=Ct&&jt.x<=ue){var Tt=ee?_.text:this.pdf.splitTextToSize(_.text,_.maxWidth||ue-jt.x)[0],Me=G([JSON.parse(JSON.stringify(St))],this.posX+this.margin[3],-he+Ct+this.ctx.prevPageLastElemOffset)[0],pe=ee&&(Wt>Ht||Wt<yt)&&C.call(this);pe&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],Zt,me,null).clip().discardPath()),this.pdf.text(Tt,Me.x,Me.y,{angle:_.angle,align:D,renderingMode:_.renderingMode}),pe&&this.pdf.restoreGraphicsState()}}else jt.y<qt&&(this.ctx.prevPageLastElemOffset+=qt-jt.y);_.scale>=.01&&(this.pdf.setFontSize(H),this.lineWidth=J)}}else _.scale>=.01&&(H=this.pdf.internal.getFontSize(),this.pdf.setFontSize(H*_.scale),J=this.lineWidth,this.lineWidth=J*_.scale),this.pdf.text(_.text,gt.x+this.posX,gt.y+this.posY,{angle:_.angle,align:D,renderingMode:_.renderingMode,maxWidth:_.maxWidth}),_.scale>=.01&&(this.pdf.setFontSize(H),this.lineWidth=J)},z=function(_,D,T,H){T=T||0,H=H||0,this.pdf.internal.out(e(_+T)+" "+n(D+H)+" l")},U=function(_,D,T){return this.pdf.lines(_,D,T,null,null)},nt=function(_,D,T,H,J,Z,at,ot){this.pdf.internal.out([t(a(T+_)),t(i(H+D)),t(a(J+_)),t(i(Z+D)),t(a(at+_)),t(i(ot+D)),"c"].join(" "))},st=function(_,D,T,H){for(var J=2*Math.PI,Z=Math.PI/2;D>T;)D-=J;var at=Math.abs(T-D);at<J&&H&&(at=J-at);for(var ot=[],gt=H?-1:1,At=D;at>1e-5;){var kt=At+gt*Math.min(at,Z);ot.push(ut.call(this,_,At,kt)),at-=Math.abs(kt-At),At=kt}return ot},ut=function(_,D,T){var H=(T-D)/2,J=_*Math.cos(H),Z=_*Math.sin(H),at=J,ot=-Z,gt=at*at+ot*ot,At=gt+at*J+ot*Z,kt=4/3*(Math.sqrt(2*gt*At)-At)/(at*Z-ot*J),St=at-kt*ot,Mt=ot+kt*at,F=St,Lt=-Mt,ae=H+D,Ht=Math.cos(ae),yt=Math.sin(ae);return{x1:_*Math.cos(D),y1:_*Math.sin(D),x2:St*Ht-Mt*yt,y2:St*yt+Mt*Ht,x3:F*Ht-Lt*yt,y3:F*yt+Lt*Ht,x4:_*Math.cos(T),y4:_*Math.sin(T)}},rt=function(_){return 180*_/Math.PI},ht=function(_,D,T,H,J,Z){var at=_+.5*(T-_),ot=D+.5*(H-D),gt=J+.5*(T-J),At=Z+.5*(H-Z),kt=Math.min(_,J,at,gt),St=Math.max(_,J,at,gt),Mt=Math.min(D,Z,ot,At),F=Math.max(D,Z,ot,At);return new l(kt,Mt,St-kt,F-Mt)},_t=function(_,D,T,H,J,Z,at,ot){var gt,At,kt,St,Mt,F,Lt,ae,Ht,yt,Wt,Ct,zt,qt,me=T-_,ue=H-D,Zt=J-T,he=Z-H,fe=at-J,jt=ot-Z;for(At=0;At<41;At++)Ht=(Lt=(kt=_+(gt=At/40)*me)+gt*((Mt=T+gt*Zt)-kt))+gt*(Mt+gt*(J+gt*fe-Mt)-Lt),yt=(ae=(St=D+gt*ue)+gt*((F=H+gt*he)-St))+gt*(F+gt*(Z+gt*jt-F)-ae),At==0?(Wt=Ht,Ct=yt,zt=Ht,qt=yt):(Wt=Math.min(Wt,Ht),Ct=Math.min(Ct,yt),zt=Math.max(zt,Ht),qt=Math.max(qt,yt));return new l(Math.round(Wt),Math.round(Ct),Math.round(zt-Wt),Math.round(qt-Ct))},wt=function(){if(this.prevLineDash||this.ctx.lineDash.length||this.ctx.lineDashOffset){var _,D,T=(_=this.ctx.lineDash,D=this.ctx.lineDashOffset,JSON.stringify({lineDash:_,lineDashOffset:D}));this.prevLineDash!==T&&(this.pdf.setLineDash(this.ctx.lineDash,this.ctx.lineDashOffset),this.prevLineDash=T)}}})(Rt.API),(function(r){var t=function(f){var l,u,h,p,w,x,g,P,C,B;for(u=[],h=0,p=(f+=l="\0\0\0\0".slice(f.length%4||4)).length;p>h;h+=4)(w=(f.charCodeAt(h)<<24)+(f.charCodeAt(h+1)<<16)+(f.charCodeAt(h+2)<<8)+f.charCodeAt(h+3))!==0?(x=(w=((w=((w=((w=(w-(B=w%85))/85)-(C=w%85))/85)-(P=w%85))/85)-(g=w%85))/85)%85,u.push(x+33,g+33,P+33,C+33,B+33)):u.push(122);return(function(S,G){for(var V=G;V>0;V--)S.pop()})(u,l.length),String.fromCharCode.apply(String,u)+"~>"},e=function(f){var l,u,h,p,w,x=String,g="length",P=255,C="charCodeAt",B="slice",S="replace";for(f[B](-2),f=f[B](0,-2)[S](/\s/g,"")[S]("z","!!!!!"),h=[],p=0,w=(f+=l="uuuuu"[B](f[g]%5||5))[g];w>p;p+=5)u=52200625*(f[C](p)-33)+614125*(f[C](p+1)-33)+7225*(f[C](p+2)-33)+85*(f[C](p+3)-33)+(f[C](p+4)-33),h.push(P&u>>24,P&u>>16,P&u>>8,P&u);return(function(G,V){for(var M=V;M>0;M--)G.pop()})(h,l[g]),x.fromCharCode.apply(x,h)},n=function(f){return f.split("").map(function(l){return("0"+l.charCodeAt().toString(16)).slice(-2)}).join("")+">"},a=function(f){var l=new RegExp(/^([0-9A-Fa-f]{2})+$/);if((f=f.replace(/\s/g,"")).indexOf(">")!==-1&&(f=f.substr(0,f.indexOf(">"))),f.length%2&&(f+="0"),l.test(f)===!1)return"";for(var u="",h=0;h<f.length;h+=2)u+=String.fromCharCode("0x"+(f[h]+f[h+1]));return u},i=function(f){for(var l=new Uint8Array(f.length),u=f.length;u--;)l[u]=f.charCodeAt(u);return(l=Ks(l)).reduce(function(h,p){return h+String.fromCharCode(p)},"")};r.processDataByFilters=function(f,l){var u=0,h=f||"",p=[];for(typeof(l=l||[])=="string"&&(l=[l]),u=0;u<l.length;u+=1)switch(l[u]){case"ASCII85Decode":case"/ASCII85Decode":h=e(h),p.push("/ASCII85Encode");break;case"ASCII85Encode":case"/ASCII85Encode":h=t(h),p.push("/ASCII85Decode");break;case"ASCIIHexDecode":case"/ASCIIHexDecode":h=a(h),p.push("/ASCIIHexEncode");break;case"ASCIIHexEncode":case"/ASCIIHexEncode":h=n(h),p.push("/ASCIIHexDecode");break;case"FlateEncode":case"/FlateEncode":h=i(h),p.push("/FlateDecode");break;default:throw new Error('The filter: "'+l[u]+'" is not implemented')}return{data:h,reverseChain:p.reverse().join(" ")}}})(Rt.API),(function(r){r.loadFile=function(t,e,n){return(function(a,i,f){i=i!==!1,f=typeof f=="function"?f:function(){};var l=void 0;try{l=(function(u,h,p){var w=new XMLHttpRequest,x=0,g=function(P){var C=P.length,B=[],S=String.fromCharCode;for(x=0;x<C;x+=1)B.push(S(255&P.charCodeAt(x)));return B.join("")};if(w.open("GET",u,!h),w.overrideMimeType("text/plain; charset=x-user-defined"),h===!1&&(w.onload=function(){w.status===200?p(g(this.responseText)):p(void 0)}),w.send(null),h&&w.status===200)return g(w.responseText)})(a,i,f)}catch{}return l})(t,e,n)},r.allowFsRead=void 0,r.loadImageFile=r.loadFile})(Rt.API),(function(r){function t(){return(Jt.html2canvas?Promise.resolve(Jt.html2canvas):Promise.resolve().then(()=>require("./html2canvas.esm-B5qzocYs.cjs"))).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(Jt.DOMPurify?Promise.resolve(Jt.DOMPurify):Promise.resolve().then(()=>require("./purify.es-B-_4ubwQ.cjs"))).catch(function(l){return Promise.reject(new Error("Could not load dompurify: "+l))}).then(function(l){return l.default?l.default:l})}var n=function(l){var u=ye(l);return u==="undefined"?"undefined":u==="string"||l instanceof String?"string":u==="number"||l instanceof Number?"number":u==="function"||l instanceof Function?"function":l&&l.constructor===Array?"array":l&&l.nodeType===1?"element":u==="object"?"object":"unknown"},a=function(l,u){var h=document.createElement(l);for(var p in u.className&&(h.className=u.className),u.innerHTML&&u.dompurify&&(h.innerHTML=u.dompurify.sanitize(u.innerHTML)),u.style)h.style[p]=u.style[p];return h},i=function l(u,h){for(var p=u.nodeType===3?document.createTextNode(u.nodeValue):u.cloneNode(!1),w=u.firstChild;w;w=w.nextSibling)h!==!0&&w.nodeType===1&&w.nodeName==="SCRIPT"||p.appendChild(l(w,h));return u.nodeType===1&&(u.nodeName==="CANVAS"?(p.width=u.width,p.height=u.height,p.getContext("2d").drawImage(u,0,0)):u.nodeName!=="TEXTAREA"&&u.nodeName!=="SELECT"||(p.value=u.value),p.addEventListener("load",function(){p.scrollTop=u.scrollTop,p.scrollLeft=u.scrollLeft},!0)),p},f=function l(u){var h=Object.assign(l.convert(Promise.resolve()),JSON.parse(JSON.stringify(l.template))),p=l.convert(Promise.resolve(),h);return(p=p.setProgress(1,l,1,[l])).set(u)};(f.prototype=Object.create(Promise.prototype)).constructor=f,f.convert=function(l,u){return l.__proto__=u||f.prototype,l},f.template={prop:{src:null,container:null,overlay:null,canvas:null,img:null,pdf:null,pageSize:null,callback:function(){}},progress:{val:0,state:null,n:0,stack:[]},opt:{filename:"file.pdf",margin:[0,0,0,0],enableLinks:!0,x:0,y:0,html2canvas:{},jsPDF:{},backgroundColor:"transparent"}},f.prototype.from=function(l,u){return this.then(function(){switch(u=u||(function(h){switch(n(h)){case"string":return"string";case"element":return h.nodeName.toLowerCase()==="canvas"?"canvas":"element";default:return"unknown"}})(l),u){case"string":return this.then(e).then(function(h){return this.set({src:a("div",{innerHTML:l,dompurify:h})})});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.")}})},f.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.")}},f.prototype.toContainer=function(){return this.thenList([function(){return this.prop.src||this.error("Cannot duplicate - no source HTML.")},function(){return this.prop.pageSize||this.setPageSize()}]).then(function(){var 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},u=i(this.prop.src,this.opt.html2canvas.javascriptEnabled);u.tagName==="BODY"&&(l.height=Math.max(document.body.scrollHeight,document.body.offsetHeight,document.documentElement.clientHeight,document.documentElement.scrollHeight,document.documentElement.offsetHeight)+"px"),this.prop.overlay=a("div",{className:"html2pdf__overlay",style:{position:"fixed",overflow:"hidden",zIndex:1e3,left:"-100000px",right:0,bottom:0,top:0}}),this.prop.container=a("div",{className:"html2pdf__container",style:l}),this.prop.container.appendChild(u),this.prop.container.firstChild.appendChild(a("div",{style:{clear:"both",border:"0 none transparent",margin:0,padding:0,height:0}})),this.prop.container.style.float="none",this.prop.overlay.appendChild(this.prop.container),document.body.appendChild(this.prop.overlay),this.prop.container.firstChild.style.position="relative",this.prop.container.height=Math.max(this.prop.container.firstChild.clientHeight,this.prop.container.firstChild.scrollHeight,this.prop.container.firstChild.offsetHeight)+"px"})},f.prototype.toCanvas=function(){var l=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(l).then(t).then(function(u){var h=Object.assign({},this.opt.html2canvas);return delete h.onrendered,u(this.prop.container,h)}).then(function(u){(this.opt.html2canvas.onrendered||function(){})(u),this.prop.canvas=u,document.body.removeChild(this.prop.overlay)})},f.prototype.toContext2d=function(){var l=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(l).then(t).then(function(u){var h=this.opt.jsPDF,p=this.opt.fontFaces,w=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:w,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,h.context2d.autoPaging=this.opt.autoPaging===void 0||this.opt.autoPaging,h.context2d.posX=this.opt.x,h.context2d.posY=this.opt.y,h.context2d.margin=this.opt.margin,h.context2d.fontFaces=p,p)for(var g=0;g<p.length;++g){var P=p[g],C=P.src.find(function(B){return B.format==="truetype"});C&&h.addFont(C.url,P.ref.name,P.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,h.context2d.save(!0),u(this.prop.container,x)}).then(function(u){this.opt.jsPDF.context2d.restore(!0),(this.opt.html2canvas.onrendered||function(){})(u),this.prop.canvas=u,document.body.removeChild(this.prop.overlay)})},f.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})},f.prototype.toPdf=function(){return this.thenList([function(){return this.toContext2d()}]).then(function(){this.prop.pdf=this.prop.pdf||this.opt.jsPDF})},f.prototype.output=function(l,u,h){return(h=h||"pdf").toLowerCase()==="img"||h.toLowerCase()==="image"?this.outputImg(l,u):this.outputPdf(l,u)},f.prototype.outputPdf=function(l,u){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then(function(){return this.prop.pdf.output(l,u)})},f.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.'}})},f.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)})},f.prototype.doCallback=function(){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then(function(){this.prop.callback(this.prop.pdf)})},f.prototype.set=function(l){if(n(l)!=="object")return this;var u=Object.keys(l||{}).map(function(h){if(h in f.template.prop)return function(){this.prop[h]=l[h]};switch(h){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[h]=l[h]}}},this);return this.then(function(){return this.thenList(u)})},f.prototype.get=function(l,u){return this.then(function(){var h=l in f.template.prop?this.prop[l]:this.opt[l];return u?u(h):h})},f.prototype.setMargin=function(l){return this.then(function(){switch(n(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)},f.prototype.setPageSize=function(l){function u(h,p){return Math.floor(h*p/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:u(l.inner.width,l.k),height:u(l.inner.height,l.k)},l.inner.ratio=l.inner.height/l.inner.width),this.prop.pageSize=l})},f.prototype.setProgress=function(l,u,h,p){return l!=null&&(this.progress.val=l),u!=null&&(this.progress.state=u),h!=null&&(this.progress.n=h),p!=null&&(this.progress.stack=p),this.progress.ratio=this.progress.val/this.progress.state,this},f.prototype.updateProgress=function(l,u,h,p){return this.setProgress(l?this.progress.val+l:null,u||null,h?this.progress.n+h:null,p?this.progress.stack.concat(p):null)},f.prototype.then=function(l,u){var h=this;return this.thenCore(l,u,function(p,w){return h.updateProgress(null,null,1,[p]),Promise.prototype.then.call(this,function(x){return h.updateProgress(null,p),x}).then(p,w).then(function(x){return h.updateProgress(1),x})})},f.prototype.thenCore=function(l,u,h){h=h||Promise.prototype.then;var p=this;l&&(l=l.bind(p)),u&&(u=u.bind(p));var w=Promise.toString().indexOf("[native code]")!==-1&&Promise.name==="Promise"?p:f.convert(Object.assign({},p),Promise.prototype),x=h.call(w,l,u);return f.convert(x,p.__proto__)},f.prototype.thenExternal=function(l,u){return Promise.prototype.then.call(this,l,u)},f.prototype.thenList=function(l){var u=this;return l.forEach(function(h){u=u.thenCore(h)}),u},f.prototype.catch=function(l){l&&(l=l.bind(this));var u=Promise.prototype.catch.call(this,l);return f.convert(u,this)},f.prototype.catchExternal=function(l){return Promise.prototype.catch.call(this,l)},f.prototype.error=function(l){return this.then(function(){throw new Error(l)})},f.prototype.using=f.prototype.set,f.prototype.saveAs=f.prototype.save,f.prototype.export=f.prototype.output,f.prototype.run=f.prototype.then,Rt.getPageSize=function(l,u,h){if(ye(l)==="object"){var p=l;l=p.orientation,u=p.unit||u,h=p.format||h}u=u||"mm",h=h||"a4",l=(""+(l||"P")).toLowerCase();var w,x=(""+h).toLowerCase(),g={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(u){case"pt":w=1;break;case"mm":w=72/25.4;break;case"cm":w=72/2.54;break;case"in":w=72;break;case"px":w=.75;break;case"pc":case"em":w=12;break;case"ex":w=6;break;default:throw"Invalid unit: "+u}var P,C=0,B=0;if(g.hasOwnProperty(x))C=g[x][1]/w,B=g[x][0]/w;else try{C=h[1],B=h[0]}catch{throw new Error("Invalid format: "+h)}if(l==="p"||l==="portrait")l="p",B>C&&(P=B,B=C,C=P);else{if(l!=="l"&&l!=="landscape")throw"Invalid orientation: "+l;l="l",C>B&&(P=B,B=C,C=P)}return{width:B,height:C,unit:u,k:w,orientation:l}},r.html=function(l,u){(u=u||{}).callback=u.callback||function(){},u.html2canvas=u.html2canvas||{},u.html2canvas.canvas=u.html2canvas.canvas||this.canvas,u.jsPDF=u.jsPDF||this,u.fontFaces=u.fontFaces?u.fontFaces.map(Ts):null;var h=new f(u);return u.worker?h:h.from(l).doCallback()}})(Rt.API),Rt.API.addJS=function(r){return Ku=r,this.internal.events.subscribe("postPutResources",function(){So=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/Names [(EmbeddedJS) "+(So+1)+" 0 R]"),this.internal.out(">>"),this.internal.out("endobj"),Ju=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/S /JavaScript"),this.internal.out("/JS ("+Ku+")"),this.internal.out(">>"),this.internal.out("endobj")}),this.internal.events.subscribe("putCatalog",function(){So!==void 0&&Ju!==void 0&&this.internal.out("/Names <</JavaScript "+So+" 0 R>>")}),this},(function(r){var t;r.events.push(["postPutResources",function(){var e=this,n=/^(\d+) 0 obj$/;if(this.outline.root.children.length>0)for(var a=e.outline.render().split(/\r\n/),i=0;i<a.length;i++){var f=a[i],l=n.exec(f);if(l!=null){var u=l[1];e.internal.newObjectDeferredBegin(u,!1)}e.internal.write(f)}if(this.outline.createNamedDestinations){var h=this.internal.pages.length,p=[];for(i=0;i<h;i++){var w=e.internal.newObject();p.push(w);var x=e.internal.getPageInfo(i+1);e.internal.write("<< /D["+x.objId+" 0 R /XYZ null null null]>> endobj")}var g=e.internal.newObject();for(e.internal.write("<< /Names [ "),i=0;i<p.length;i++)e.internal.write("(page_"+(i+1)+")"+p[i]+" 0 R");e.internal.write(" ] >>","endobj"),t=e.internal.newObject(),e.internal.write("<< /Dests "+g+" 0 R"),e.internal.write(">>","endobj")}}]),r.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 "+t+" 0 R"))}]),r.events.push(["initialized",function(){var e=this;e.outline={createNamedDestinations:!1,root:{children:[]}},e.outline.add=function(n,a,i){var f={title:a,options:i,children:[]};return n==null&&(n=this.root),n.children.push(f),f},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(n){n.id=e.internal.newObjectDeferred();for(var a=0;a<n.children.length;a++)this.genIds_r(n.children[a])},e.outline.renderRoot=function(n){this.objStart(n),this.line("/Type /Outlines"),n.children.length>0&&(this.line("/First "+this.makeRef(n.children[0])),this.line("/Last "+this.makeRef(n.children[n.children.length-1]))),this.line("/Count "+this.count_r({count:0},n)),this.objEnd()},e.outline.renderItems=function(n){for(var a=this.ctx.pdf.internal.getVerticalCoordinateString,i=0;i<n.children.length;i++){var f=n.children[i];this.objStart(f),this.line("/Title "+this.makeString(f.title)),this.line("/Parent "+this.makeRef(n)),i>0&&this.line("/Prev "+this.makeRef(n.children[i-1])),i<n.children.length-1&&this.line("/Next "+this.makeRef(n.children[i+1])),f.children.length>0&&(this.line("/First "+this.makeRef(f.children[0])),this.line("/Last "+this.makeRef(f.children[f.children.length-1])));var l=this.count=this.count_r({count:0},f);if(l>0&&this.line("/Count "+l),f.options&&f.options.pageNumber){var u=e.internal.getPageInfo(f.options.pageNumber);this.line("/Dest ["+u.objId+" 0 R /XYZ 0 "+a(0)+" 0]")}this.objEnd()}for(var h=0;h<n.children.length;h++)this.renderItems(n.children[h])},e.outline.line=function(n){this.ctx.val+=n+`\r
|
|
42
42
|
`},e.outline.makeRef=function(n){return n.id+" 0 R"},e.outline.makeString=function(n){return"("+e.internal.pdfEscape(n)+")"},e.outline.objStart=function(n){this.ctx.val+=`\r
|
|
43
43
|
`+n.id+` 0 obj\r
|
|
44
44
|
<<\r
|
|
@@ -46,7 +46,7 @@ T* `):c.join(` Tj
|
|
|
46
46
|
endobj\r
|
|
47
47
|
`},e.outline.count_r=function(n,a){for(var i=0;i<a.children.length;i++)n.count++,this.count_r(n,a.children[i]);return n.count}}])})(Rt.API),(function(r){var t=[192,193,194,195,196,197,198,199];r.processJPEG=function(e,n,a,i,f,l){var u,h=this.decode.DCT_DECODE,p=null;if(typeof e=="string"||this.__addimage__.isArrayBuffer(e)||this.__addimage__.isArrayBufferView(e)){switch(e=f||e,e=this.__addimage__.isArrayBuffer(e)?new Uint8Array(e):e,u=(function(w){for(var x,g=256*w.charCodeAt(4)+w.charCodeAt(5),P=w.length,C={width:0,height:0,numcomponents:1},B=4;B<P;B+=2){if(B+=g,t.indexOf(w.charCodeAt(B+1))!==-1){x=256*w.charCodeAt(B+5)+w.charCodeAt(B+6),C={width:256*w.charCodeAt(B+7)+w.charCodeAt(B+8),height:x,numcomponents:w.charCodeAt(B+9)};break}g=256*w.charCodeAt(B+2)+w.charCodeAt(B+3)}return C})(e=this.__addimage__.isArrayBufferView(e)?this.__addimage__.arrayBufferToBinaryString(e):e),u.numcomponents){case 1:l=this.color_spaces.DEVICE_GRAY;break;case 4:l=this.color_spaces.DEVICE_CMYK;break;case 3:l=this.color_spaces.DEVICE_RGB}p={data:e,width:u.width,height:u.height,colorSpace:l,bitsPerComponent:8,filter:h,index:n,alias:a}}return p}})(Rt.API),Rt.API.processPNG=function(r,t,e,n){if(this.__addimage__.isArrayBuffer(r)&&(r=new Uint8Array(r)),this.__addimage__.isArrayBufferView(r)){var a,i=f2(r,{checkCrc:!0}),f=i.width,l=i.height,u=i.channels,h=i.palette,p=i.depth;a=h&&u===1?(function(K){for(var R=K.width,tt=K.height,L=K.data,O=K.palette,z=K.depth,U=!1,nt=[],st=[],ut=void 0,rt=!1,ht=0,_t=0;_t<O.length;_t++){var wt=Ql(O[_t],4),_=wt[0],D=wt[1],T=wt[2],H=wt[3];nt.push(_,D,T),H!=null&&(H===0?(ht++,st.length<1&&st.push(_t)):H<255&&(rt=!0))}if(rt||ht>1){U=!0,st=void 0;var J=R*tt;ut=new Uint8Array(J);for(var Z=new DataView(L.buffer),at=0;at<J;at++){var ot=qs(Z,at,z),gt=Ql(O[ot],4)[3];ut[at]=gt}}else ht===0&&(st=void 0);return{colorSpace:"Indexed",colorsPerPixel:1,sMaskBitsPerComponent:U?8:void 0,colorBytes:L,alphaBytes:ut,needSMask:U,palette:nt,mask:st}})(i):u===2||u===4?(function(K){for(var R=K.data,tt=K.width,L=K.height,O=K.channels,z=K.depth,U=O===2?"DeviceGray":"DeviceRGB",nt=O-1,st=tt*L,ut=nt,rt=st*ut,ht=1*st,_t=Math.ceil(rt*z/8),wt=Math.ceil(ht*z/8),_=new Uint8Array(_t),D=new Uint8Array(wt),T=new DataView(R.buffer),H=new DataView(_.buffer),J=new DataView(D.buffer),Z=!1,at=0;at<st;at++){for(var ot=at*O,gt=0;gt<ut;gt++)af(H,qs(T,ot+gt,z),at*ut+gt,z);var At=qs(T,ot+ut,z);At<(1<<z)-1&&(Z=!0),af(J,At,1*at,z)}return{colorSpace:U,colorsPerPixel:nt,sMaskBitsPerComponent:Z?z:void 0,colorBytes:_,alphaBytes:D,needSMask:Z}})(i):(function(K){var R=K.data,tt=K.channels===1?"DeviceGray":"DeviceRGB";return{colorSpace:tt,colorsPerPixel:tt==="DeviceGray"?1:3,colorBytes:R instanceof Uint16Array?(function(L){for(var O=L.length,z=new Uint8Array(2*O),U=new DataView(z.buffer,z.byteOffset,z.byteLength),nt=0;nt<O;nt++)U.setUint16(2*nt,L[nt],!1);return z})(R):R,needSMask:!1}})(i);var w,x,g,P=a,C=P.colorSpace,B=P.colorsPerPixel,S=P.sMaskBitsPerComponent,G=P.colorBytes,V=P.alphaBytes,M=P.needSMask,it=P.palette,vt=P.mask,ct=null;return n!==Rt.API.image_compression.NONE&&typeof Ks=="function"?(ct=(function(K){var R;switch(K){case Rt.API.image_compression.FAST:R=11;break;case Rt.API.image_compression.MEDIUM:R=13;break;case Rt.API.image_compression.SLOW:R=14;break;default:R=12}return R})(n),w=this.decode.FLATE_DECODE,x="/Predictor ".concat(ct," /Colors ").concat(B," /BitsPerComponent ").concat(p," /Columns ").concat(f),r=Qu(G,Math.ceil(f*B*p/8),B,p,n),M&&(g=Qu(V,Math.ceil(f*S/8),1,S,n))):(w=void 0,x=void 0,r=G,M&&(g=V)),(this.__addimage__.isArrayBuffer(r)||this.__addimage__.isArrayBufferView(r))&&(r=this.__addimage__.arrayBufferToBinaryString(r)),(g&&this.__addimage__.isArrayBuffer(g)||this.__addimage__.isArrayBufferView(g))&&(g=this.__addimage__.arrayBufferToBinaryString(g)),{alias:e,data:r,index:t,filter:w,decodeParameters:x,transparency:vt,palette:it,sMask:g,predictor:ct,width:f,height:l,bitsPerComponent:p,sMaskBitsPerComponent:S,colorSpace:C}}},(function(r){r.processGIF89A=function(t,e,n,a){var i=new I2(t),f=i.width,l=i.height,u=[];i.decodeAndBlitFrameRGBA(0,u);var h={data:u,width:f,height:l},p=new Us(100).encode(h,100);return r.processJPEG.call(this,p,e,n,a)},r.processGIF87A=r.processGIF89A})(Rt.API),Xr.prototype.parseHeader=function(){if(this.fileSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.reserved=this.datav.getUint32(this.pos,!0),this.pos+=4,this.offset=this.datav.getUint32(this.pos,!0),this.pos+=4,this.headerSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.width=this.datav.getUint32(this.pos,!0),this.pos+=4,this.height=this.datav.getInt32(this.pos,!0),this.pos+=4,this.planes=this.datav.getUint16(this.pos,!0),this.pos+=2,this.bitPP=this.datav.getUint16(this.pos,!0),this.pos+=2,this.compress=this.datav.getUint32(this.pos,!0),this.pos+=4,this.rawSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.hr=this.datav.getUint32(this.pos,!0),this.pos+=4,this.vr=this.datav.getUint32(this.pos,!0),this.pos+=4,this.colors=this.datav.getUint32(this.pos,!0),this.pos+=4,this.importantColors=this.datav.getUint32(this.pos,!0),this.pos+=4,this.bitPP===16&&this.is_with_alpha&&(this.bitPP=15),this.bitPP<15){var r=this.colors===0?1<<this.bitPP:this.colors;this.palette=new Array(r);for(var t=0;t<r;t++){var e=this.datav.getUint8(this.pos++,!0),n=this.datav.getUint8(this.pos++,!0),a=this.datav.getUint8(this.pos++,!0),i=this.datav.getUint8(this.pos++,!0);this.palette[t]={red:a,green:n,blue:e,quad:i}}}this.height<0&&(this.height*=-1,this.bottom_up=!1)},Xr.prototype.parseBGR=function(){this.pos=this.offset;try{var r="bit"+this.bitPP,t=this.width*this.height*4;this.data=new Uint8Array(t),this[r]()}catch(e){Le.log("bit decode error:"+e)}},Xr.prototype.bit1=function(){var r,t=Math.ceil(this.width/8),e=t%4;for(r=this.height-1;r>=0;r--){for(var n=this.bottom_up?r:this.height-1-r,a=0;a<t;a++)for(var i=this.datav.getUint8(this.pos++,!0),f=n*this.width*4+8*a*4,l=0;l<8&&8*a+l<this.width;l++){var u=this.palette[i>>7-l&1];this.data[f+4*l]=u.blue,this.data[f+4*l+1]=u.green,this.data[f+4*l+2]=u.red,this.data[f+4*l+3]=255}e!==0&&(this.pos+=4-e)}},Xr.prototype.bit4=function(){for(var r=Math.ceil(this.width/2),t=r%4,e=this.height-1;e>=0;e--){for(var n=this.bottom_up?e:this.height-1-e,a=0;a<r;a++){var i=this.datav.getUint8(this.pos++,!0),f=n*this.width*4+2*a*4,l=i>>4,u=15&i,h=this.palette[l];if(this.data[f]=h.blue,this.data[f+1]=h.green,this.data[f+2]=h.red,this.data[f+3]=255,2*a+1>=this.width)break;h=this.palette[u],this.data[f+4]=h.blue,this.data[f+4+1]=h.green,this.data[f+4+2]=h.red,this.data[f+4+3]=255}t!==0&&(this.pos+=4-t)}},Xr.prototype.bit8=function(){for(var r=this.width%4,t=this.height-1;t>=0;t--){for(var e=this.bottom_up?t:this.height-1-t,n=0;n<this.width;n++){var a=this.datav.getUint8(this.pos++,!0),i=e*this.width*4+4*n;if(a<this.palette.length){var f=this.palette[a];this.data[i]=f.red,this.data[i+1]=f.green,this.data[i+2]=f.blue,this.data[i+3]=255}else this.data[i]=255,this.data[i+1]=255,this.data[i+2]=255,this.data[i+3]=255}r!==0&&(this.pos+=4-r)}},Xr.prototype.bit15=function(){for(var r=this.width%3,t=parseInt("11111",2),e=this.height-1;e>=0;e--){for(var n=this.bottom_up?e:this.height-1-e,a=0;a<this.width;a++){var i=this.datav.getUint16(this.pos,!0);this.pos+=2;var f=(i&t)/t*255|0,l=(i>>5&t)/t*255|0,u=(i>>10&t)/t*255|0,h=i>>15?255:0,p=n*this.width*4+4*a;this.data[p]=u,this.data[p+1]=l,this.data[p+2]=f,this.data[p+3]=h}this.pos+=r}},Xr.prototype.bit16=function(){for(var r=this.width%3,t=parseInt("11111",2),e=parseInt("111111",2),n=this.height-1;n>=0;n--){for(var a=this.bottom_up?n:this.height-1-n,i=0;i<this.width;i++){var f=this.datav.getUint16(this.pos,!0);this.pos+=2;var l=(f&t)/t*255|0,u=(f>>5&e)/e*255|0,h=(f>>11)/t*255|0,p=a*this.width*4+4*i;this.data[p]=h,this.data[p+1]=u,this.data[p+2]=l,this.data[p+3]=255}this.pos+=r}},Xr.prototype.bit24=function(){for(var r=this.height-1;r>=0;r--){for(var t=this.bottom_up?r:this.height-1-r,e=0;e<this.width;e++){var n=this.datav.getUint8(this.pos++,!0),a=this.datav.getUint8(this.pos++,!0),i=this.datav.getUint8(this.pos++,!0),f=t*this.width*4+4*e;this.data[f]=i,this.data[f+1]=a,this.data[f+2]=n,this.data[f+3]=255}this.pos+=this.width%4}},Xr.prototype.bit32=function(){for(var r=this.height-1;r>=0;r--)for(var t=this.bottom_up?r:this.height-1-r,e=0;e<this.width;e++){var n=this.datav.getUint8(this.pos++,!0),a=this.datav.getUint8(this.pos++,!0),i=this.datav.getUint8(this.pos++,!0),f=this.datav.getUint8(this.pos++,!0),l=t*this.width*4+4*e;this.data[l]=i,this.data[l+1]=a,this.data[l+2]=n,this.data[l+3]=f}},Xr.prototype.getData=function(){return this.data},(function(r){r.processBMP=function(t,e,n,a){var i=new Xr(t,!1),f=i.width,l=i.height,u={data:i.getData(),width:f,height:l},h=new Us(100).encode(u,100);return r.processJPEG.call(this,h,e,n,a)}})(Rt.API),sf.prototype.getData=function(){return this.data},(function(r){r.processWEBP=function(t,e,n,a){var i=new sf(t),f=i.width,l=i.height,u={data:i.getData(),width:f,height:l},h=new Us(100).encode(u,100);return r.processJPEG.call(this,h,e,n,a)}})(Rt.API),Rt.API.processRGBA=function(r,t,e){for(var n=r.data,a=n.length,i=new Uint8Array(a/4*3),f=new Uint8Array(a/4),l=0,u=0,h=0;h<a;h+=4){var p=n[h],w=n[h+1],x=n[h+2],g=n[h+3];i[l++]=p,i[l++]=w,i[l++]=x,f[u++]=g}var P=this.__addimage__.arrayBufferToBinaryString(i);return{alpha:this.__addimage__.arrayBufferToBinaryString(f),data:P,index:t,alias:e,colorSpace:"DeviceRGB",bitsPerComponent:8,width:r.width,height:r.height}},Rt.API.setLanguage=function(r){return this.internal.languageSettings===void 0&&(this.internal.languageSettings={},this.internal.languageSettings.isSubscribed=!1),{af:"Afrikaans",sq:"Albanian",ar:"Arabic (Standard)","ar-DZ":"Arabic (Algeria)","ar-BH":"Arabic (Bahrain)","ar-EG":"Arabic (Egypt)","ar-IQ":"Arabic (Iraq)","ar-JO":"Arabic (Jordan)","ar-KW":"Arabic (Kuwait)","ar-LB":"Arabic (Lebanon)","ar-LY":"Arabic (Libya)","ar-MA":"Arabic (Morocco)","ar-OM":"Arabic (Oman)","ar-QA":"Arabic (Qatar)","ar-SA":"Arabic (Saudi Arabia)","ar-SY":"Arabic (Syria)","ar-TN":"Arabic (Tunisia)","ar-AE":"Arabic (U.A.E.)","ar-YE":"Arabic (Yemen)",an:"Aragonese",hy:"Armenian",as:"Assamese",ast:"Asturian",az:"Azerbaijani",eu:"Basque",be:"Belarusian",bn:"Bengali",bs:"Bosnian",br:"Breton",bg:"Bulgarian",my:"Burmese",ca:"Catalan",ch:"Chamorro",ce:"Chechen",zh:"Chinese","zh-HK":"Chinese (Hong Kong)","zh-CN":"Chinese (PRC)","zh-SG":"Chinese (Singapore)","zh-TW":"Chinese (Taiwan)",cv:"Chuvash",co:"Corsican",cr:"Cree",hr:"Croatian",cs:"Czech",da:"Danish",nl:"Dutch (Standard)","nl-BE":"Dutch (Belgian)",en:"English","en-AU":"English (Australia)","en-BZ":"English (Belize)","en-CA":"English (Canada)","en-IE":"English (Ireland)","en-JM":"English (Jamaica)","en-NZ":"English (New Zealand)","en-PH":"English (Philippines)","en-ZA":"English (South Africa)","en-TT":"English (Trinidad & Tobago)","en-GB":"English (United Kingdom)","en-US":"English (United States)","en-ZW":"English (Zimbabwe)",eo:"Esperanto",et:"Estonian",fo:"Faeroese",fj:"Fijian",fi:"Finnish",fr:"French (Standard)","fr-BE":"French (Belgium)","fr-CA":"French (Canada)","fr-FR":"French (France)","fr-LU":"French (Luxembourg)","fr-MC":"French (Monaco)","fr-CH":"French (Switzerland)",fy:"Frisian",fur:"Friulian",gd:"Gaelic (Scots)","gd-IE":"Gaelic (Irish)",gl:"Galacian",ka:"Georgian",de:"German (Standard)","de-AT":"German (Austria)","de-DE":"German (Germany)","de-LI":"German (Liechtenstein)","de-LU":"German (Luxembourg)","de-CH":"German (Switzerland)",el:"Greek",gu:"Gujurati",ht:"Haitian",he:"Hebrew",hi:"Hindi",hu:"Hungarian",is:"Icelandic",id:"Indonesian",iu:"Inuktitut",ga:"Irish",it:"Italian (Standard)","it-CH":"Italian (Switzerland)",ja:"Japanese",kn:"Kannada",ks:"Kashmiri",kk:"Kazakh",km:"Khmer",ky:"Kirghiz",tlh:"Klingon",ko:"Korean","ko-KP":"Korean (North Korea)","ko-KR":"Korean (South Korea)",la:"Latin",lv:"Latvian",lt:"Lithuanian",lb:"Luxembourgish",mk:"North Macedonia",ms:"Malay",ml:"Malayalam",mt:"Maltese",mi:"Maori",mr:"Marathi",mo:"Moldavian",nv:"Navajo",ng:"Ndonga",ne:"Nepali",no:"Norwegian",nb:"Norwegian (Bokmal)",nn:"Norwegian (Nynorsk)",oc:"Occitan",or:"Oriya",om:"Oromo",fa:"Persian","fa-IR":"Persian/Iran",pl:"Polish",pt:"Portuguese","pt-BR":"Portuguese (Brazil)",pa:"Punjabi","pa-IN":"Punjabi (India)","pa-PK":"Punjabi (Pakistan)",qu:"Quechua",rm:"Rhaeto-Romanic",ro:"Romanian","ro-MO":"Romanian (Moldavia)",ru:"Russian","ru-MO":"Russian (Moldavia)",sz:"Sami (Lappish)",sg:"Sango",sa:"Sanskrit",sc:"Sardinian",sd:"Sindhi",si:"Singhalese",sr:"Serbian",sk:"Slovak",sl:"Slovenian",so:"Somani",sb:"Sorbian",es:"Spanish","es-AR":"Spanish (Argentina)","es-BO":"Spanish (Bolivia)","es-CL":"Spanish (Chile)","es-CO":"Spanish (Colombia)","es-CR":"Spanish (Costa Rica)","es-DO":"Spanish (Dominican Republic)","es-EC":"Spanish (Ecuador)","es-SV":"Spanish (El Salvador)","es-GT":"Spanish (Guatemala)","es-HN":"Spanish (Honduras)","es-MX":"Spanish (Mexico)","es-NI":"Spanish (Nicaragua)","es-PA":"Spanish (Panama)","es-PY":"Spanish (Paraguay)","es-PE":"Spanish (Peru)","es-PR":"Spanish (Puerto Rico)","es-ES":"Spanish (Spain)","es-UY":"Spanish (Uruguay)","es-VE":"Spanish (Venezuela)",sx:"Sutu",sw:"Swahili",sv:"Swedish","sv-FI":"Swedish (Finland)","sv-SV":"Swedish (Sweden)",ta:"Tamil",tt:"Tatar",te:"Teluga",th:"Thai",tig:"Tigre",ts:"Tsonga",tn:"Tswana",tr:"Turkish",tk:"Turkmen",uk:"Ukrainian",hsb:"Upper Sorbian",ur:"Urdu",ve:"Venda",vi:"Vietnamese",vo:"Volapuk",wa:"Walloon",cy:"Welsh",xh:"Xhosa",ji:"Yiddish",zu:"Zulu"}[r]!==void 0&&(this.internal.languageSettings.languageCode=r,this.internal.languageSettings.isSubscribed===!1&&(this.internal.events.subscribe("putCatalog",function(){this.internal.write("/Lang ("+this.internal.languageSettings.languageCode+")")}),this.internal.languageSettings.isSubscribed=!0)),this},Wi=Rt.API,ko=Wi.getCharWidthsArray=function(r,t){var e,n,a=(t=t||{}).font||this.internal.getFont(),i=t.fontSize||this.internal.getFontSize(),f=t.charSpace||this.internal.getCharSpace(),l=t.widths?t.widths:a.metadata.Unicode.widths,u=l.fof?l.fof:1,h=t.kerning?t.kerning:a.metadata.Unicode.kerning,p=h.fof?h.fof:1,w=t.doKerning!==!1,x=0,g=r.length,P=0,C=l[0]||u,B=[];for(e=0;e<g;e++)n=r.charCodeAt(e),typeof a.metadata.widthOfString=="function"?B.push((a.metadata.widthOfGlyph(a.metadata.characterToGlyph(n))+f*(1e3/i)||0)/1e3):(x=w&&ye(h[n])==="object"&&!isNaN(parseInt(h[n][P],10))?h[n][P]/p:0,B.push((l[n]||C)/u+x)),P=n;return B},$u=Wi.getStringUnitWidth=function(r,t){var e=(t=t||{}).fontSize||this.internal.getFontSize(),n=t.font||this.internal.getFont(),a=t.charSpace||this.internal.getCharSpace();return Wi.processArabic&&(r=Wi.processArabic(r)),typeof n.metadata.widthOfString=="function"?n.metadata.widthOfString(r,e,a)/e:ko.apply(this,arguments).reduce(function(i,f){return i+f},0)},Xu=function(r,t,e,n){for(var a=[],i=0,f=r.length,l=0;i!==f&&l+t[i]<e;)l+=t[i],i++;a.push(r.slice(0,i));var u=i;for(l=0;i!==f;)l+t[i]>n&&(a.push(r.slice(u,i)),l=0,u=i),l+=t[i],i++;return u!==i&&a.push(r.slice(u,i)),a},Zu=function(r,t,e){e||(e={});var n,a,i,f,l,u,h,p=[],w=[p],x=e.textIndent||0,g=0,P=0,C=r.split(" "),B=ko.apply(this,[" ",e])[0];if(u=e.lineIndent===-1?C[0].length+2:e.lineIndent||0){var S=Array(u).join(" "),G=[];C.map(function(M){(M=M.split(/\s*\n/)).length>1?G=G.concat(M.map(function(it,vt){return(vt&&it.length?`
|
|
48
48
|
`:"")+it})):G.push(M[0])}),C=G,u=$u.apply(this,[S,e])}for(i=0,f=C.length;i<f;i++){var V=0;if(n=C[i],u&&n[0]==`
|
|
49
|
-
`&&(n=n.substr(1),V=1),x+g+(P=(a=ko.apply(this,[n,e])).reduce(function(M,it){return M+it},0))>t||V){if(P>t){for(l=Xu.apply(this,[n,a,t-(x+g),t]),p.push(l.shift()),p=[l.pop()];l.length;)w.push([l.shift()]);P=a.slice(n.length-(p[0]?p[0].length:0)).reduce(function(M,it){return M+it},0)}else p=[n];w.push(p),x=P+u,g=B}else p.push(n),x+=g+P,g=B}return h=u?function(M,it){return(it?S:"")+M.join(" ")}:function(M){return M.join(" ")},w.map(h)},Wi.splitTextToSize=function(r,t,e){var n,a=(e=e||{}).fontSize||this.internal.getFontSize(),i=(function(p){if(p.widths&&p.kerning)return{widths:p.widths,kerning:p.kerning};var w=this.internal.getFont(p.fontName,p.fontStyle),x="Unicode";return w.metadata[x]?{widths:w.metadata[x].widths||{0:1},kerning:w.metadata[x].kerning||{}}:{font:w.metadata,fontSize:this.internal.getFontSize(),charSpace:this.internal.getCharSpace()}}).call(this,e);n=Array.isArray(r)?r:String(r).split(/\r?\n/);var f=1*this.internal.scaleFactor*t/a;i.textIndent=e.textIndent?1*e.textIndent*this.internal.scaleFactor/a:0,i.lineIndent=e.lineIndent;var l,u,h=[];for(l=0,u=n.length;l<u;l++)h=h.concat(Zu.apply(this,[n[l],f,i]));return h},(function(r){r.__fontmetrics__=r.__fontmetrics__||{};for(var t="0123456789abcdef",e="klmnopqrstuvwxyz",n={},a={},i=0;i<16;i++)n[e[i]]=t[i],a[t[i]]=e[i];var f=function(x){return"0x"+parseInt(x,10).toString(16)},l=r.__fontmetrics__.compress=function(x){var g,P,C,B,S=["{"];for(var G in x){if(g=x[G],isNaN(parseInt(G,10))?P="'"+G+"'":(G=parseInt(G,10),P=(P=f(G).slice(2)).slice(0,-1)+a[P.slice(-1)]),typeof g=="number")g<0?(C=f(g).slice(3),B="-"):(C=f(g).slice(2),B=""),C=B+C.slice(0,-1)+a[C.slice(-1)];else{if(ye(g)!=="object")throw new Error("Don't know what to do with value type "+ye(g)+".");C=l(g)}S.push(P+C)}return S.push("}"),S.join("")},u=r.__fontmetrics__.uncompress=function(x){if(typeof x!="string")throw new Error("Invalid argument passed to uncompress.");for(var g,P,C,B,S={},G=1,V=S,M=[],it="",vt="",ct=x.length-1,K=1;K<ct;K+=1)(B=x[K])=="'"?g?(C=g.join(""),g=void 0):g=[]:g?g.push(B):B=="{"?(M.push([V,C]),V={},C=void 0):B=="}"?((P=M.pop())[0][P[1]]=V,C=void 0,V=P[0]):B=="-"?G=-1:C===void 0?n.hasOwnProperty(B)?(it+=n[B],C=parseInt(it,16)*G,G=1,it=""):it+=B:n.hasOwnProperty(B)?(vt+=n[B],V[C]=parseInt(vt,16)*G,G=1,C=void 0,vt=""):vt+=B;return S},h={codePages:["WinAnsiEncoding"],WinAnsiEncoding:u("{19m8n201n9q201o9r201s9l201t9m201u8m201w9n201x9o201y8o202k8q202l8r202m9p202q8p20aw8k203k8t203t8v203u9v2cq8s212m9t15m8w15n9w2dw9s16k8u16l9u17s9z17x8y17y9y}")},p={Unicode:{Courier:h,"Courier-Bold":h,"Courier-BoldOblique":h,"Courier-Oblique":h,Helvetica:h,"Helvetica-Bold":h,"Helvetica-BoldOblique":h,"Helvetica-Oblique":h,"Times-Roman":h,"Times-Bold":h,"Times-BoldItalic":h,"Times-Italic":h}},w={Unicode:{"Courier-Oblique":u("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-BoldItalic":u("{'widths'{k3o2q4ycx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2r202m2n2n3m2o3m2p5n202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5n4l4m4m4m4n4m4o4s4p4m4q4m4r4s4s4y4t2r4u3m4v4m4w3x4x5t4y4s4z4s5k3x5l4s5m4m5n3r5o3x5p4s5q4m5r5t5s4m5t3x5u3x5v2l5w1w5x2l5y3t5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q2l6r3m6s3r6t1w6u1w6v3m6w1w6x4y6y3r6z3m7k3m7l3m7m2r7n2r7o1w7p3r7q2w7r4m7s3m7t2w7u2r7v2n7w1q7x2n7y3t202l3mcl4mal2ram3man3mao3map3mar3mas2lat4uau1uav3maw3way4uaz2lbk2sbl3t'fof'6obo2lbp3tbq3mbr1tbs2lbu1ybv3mbz3mck4m202k3mcm4mcn4mco4mcp4mcq5ycr4mcs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz2w203k6o212m6o2dw2l2cq2l3t3m3u2l17s3x19m3m}'kerning'{cl{4qu5kt5qt5rs17ss5ts}201s{201ss}201t{cks4lscmscnscoscpscls2wu2yu201ts}201x{2wu2yu}2k{201ts}2w{4qx5kx5ou5qx5rs17su5tu}2x{17su5tu5ou}2y{4qx5kx5ou5qx5rs17ss5ts}'fof'-6ofn{17sw5tw5ou5qw5rs}7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qs}3v{17su5tu5os5qs}7p{17su5tu}ck{4qu5kt5qt5rs17ss5ts}4l{4qu5kt5qt5rs17ss5ts}cm{4qu5kt5qt5rs17ss5ts}cn{4qu5kt5qt5rs17ss5ts}co{4qu5kt5qt5rs17ss5ts}cp{4qu5kt5qt5rs17ss5ts}6l{4qu5ou5qw5rt17su5tu}5q{ckuclucmucnucoucpu4lu}5r{ckuclucmucnucoucpu4lu}7q{cksclscmscnscoscps4ls}6p{4qu5ou5qw5rt17sw5tw}ek{4qu5ou5qw5rt17su5tu}el{4qu5ou5qw5rt17su5tu}em{4qu5ou5qw5rt17su5tu}en{4qu5ou5qw5rt17su5tu}eo{4qu5ou5qw5rt17su5tu}ep{4qu5ou5qw5rt17su5tu}es{17ss5ts5qs4qu}et{4qu5ou5qw5rt17sw5tw}eu{4qu5ou5qw5rt17ss5ts}ev{17ss5ts5qs4qu}6z{17sw5tw5ou5qw5rs}fm{17sw5tw5ou5qw5rs}7n{201ts}fo{17sw5tw5ou5qw5rs}fp{17sw5tw5ou5qw5rs}fq{17sw5tw5ou5qw5rs}7r{cksclscmscnscoscps4ls}fs{17sw5tw5ou5qw5rs}ft{17su5tu}fu{17su5tu}fv{17su5tu}fw{17su5tu}fz{cksclscmscnscoscps4ls}}}"),"Helvetica-Bold":u("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"),Courier:u("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-BoldOblique":u("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Bold":u("{'widths'{k3q2q5ncx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2l202m2n2n3m2o3m2p6o202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5x4l4s4m4m4n4s4o4s4p4m4q3x4r4y4s4y4t2r4u3m4v4y4w4m4x5y4y4s4z4y5k3x5l4y5m4s5n3r5o4m5p4s5q4s5r6o5s4s5t4s5u4m5v2l5w1w5x2l5y3u5z3m6k2l6l3m6m3r6n2w6o3r6p2w6q2l6r3m6s3r6t1w6u2l6v3r6w1w6x5n6y3r6z3m7k3r7l3r7m2w7n2r7o2l7p3r7q3m7r4s7s3m7t3m7u2w7v2r7w1q7x2r7y3o202l3mcl4sal2lam3man3mao3map3mar3mas2lat4uau1yav3maw3tay4uaz2lbk2sbl3t'fof'6obo2lbp3rbr1tbs2lbu2lbv3mbz3mck4s202k3mcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3rek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3m3u2l17s4s19m3m}'kerning'{cl{4qt5ks5ot5qy5rw17sv5tv}201t{cks4lscmscnscoscpscls4wv}2k{201ts}2w{4qu5ku7mu5os5qx5ru17su5tu}2x{17su5tu5ou5qs}2y{4qv5kv7mu5ot5qz5ru17su5tu}'fof'-6o7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qu}3v{17su5tu5os5qu}fu{17su5tu5ou5qu}7p{17su5tu5ou5qu}ck{4qt5ks5ot5qy5rw17sv5tv}4l{4qt5ks5ot5qy5rw17sv5tv}cm{4qt5ks5ot5qy5rw17sv5tv}cn{4qt5ks5ot5qy5rw17sv5tv}co{4qt5ks5ot5qy5rw17sv5tv}cp{4qt5ks5ot5qy5rw17sv5tv}6l{17st5tt5ou5qu}17s{ckuclucmucnucoucpu4lu4wu}5o{ckuclucmucnucoucpu4lu4wu}5q{ckzclzcmzcnzcozcpz4lz4wu}5r{ckxclxcmxcnxcoxcpx4lx4wu}5t{ckuclucmucnucoucpu4lu4wu}7q{ckuclucmucnucoucpu4lu}6p{17sw5tw5ou5qu}ek{17st5tt5qu}el{17st5tt5ou5qu}em{17st5tt5qu}en{17st5tt5qu}eo{17st5tt5qu}ep{17st5tt5ou5qu}es{17ss5ts5qu}et{17sw5tw5ou5qu}eu{17sw5tw5ou5qu}ev{17ss5ts5qu}6z{17sw5tw5ou5qu5rs}fm{17sw5tw5ou5qu5rs}fn{17sw5tw5ou5qu5rs}fo{17sw5tw5ou5qu5rs}fp{17sw5tw5ou5qu5rs}fq{17sw5tw5ou5qu5rs}7r{cktcltcmtcntcotcpt4lt5os}fs{17sw5tw5ou5qu5rs}ft{17su5tu5ou5qu}7m{5os}fv{17su5tu5ou5qu}fw{17su5tu5ou5qu}fz{cksclscmscnscoscps4ls}}}"),Symbol:u("{'widths'{k3uaw4r19m3m2k1t2l2l202m2y2n3m2p5n202q6o3k3m2s2l2t2l2v3r2w1t3m3m2y1t2z1wbk2sbl3r'fof'6o3n3m3o3m3p3m3q3m3r3m3s3m3t3m3u1w3v1w3w3r3x3r3y3r3z2wbp3t3l3m5v2l5x2l5z3m2q4yfr3r7v3k7w1o7x3k}'kerning'{'fof'-6o}}"),Helvetica:u("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}"),"Helvetica-BoldOblique":u("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"),ZapfDingbats:u("{'widths'{k4u2k1w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-Bold":u("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Italic":u("{'widths'{k3n2q4ycx2l201n3m201o5t201s2l201t2l201u2l201w3r201x3r201y3r2k1t2l2l202m2n2n3m2o3m2p5n202q5t2r1p2s2l2t2l2u3m2v4n2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w4n3x4n3y4n3z3m4k5w4l3x4m3x4n4m4o4s4p3x4q3x4r4s4s4s4t2l4u2w4v4m4w3r4x5n4y4m4z4s5k3x5l4s5m3x5n3m5o3r5p4s5q3x5r5n5s3x5t3r5u3r5v2r5w1w5x2r5y2u5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q1w6r3m6s3m6t1w6u1w6v2w6w1w6x4s6y3m6z3m7k3m7l3m7m2r7n2r7o1w7p3m7q2w7r4m7s2w7t2w7u2r7v2s7w1v7x2s7y3q202l3mcl3xal2ram3man3mao3map3mar3mas2lat4wau1vav3maw4nay4waz2lbk2sbl4n'fof'6obo2lbp3mbq3obr1tbs2lbu1zbv3mbz3mck3x202k3mcm3xcn3xco3xcp3xcq5tcr4mcs3xct3xcu3xcv3xcw2l2m2ucy2lcz2ldl4mdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr4nfs3mft3mfu3mfv3mfw3mfz2w203k6o212m6m2dw2l2cq2l3t3m3u2l17s3r19m3m}'kerning'{cl{5kt4qw}201s{201sw}201t{201tw2wy2yy6q-t}201x{2wy2yy}2k{201tw}2w{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}2x{17ss5ts5os}2y{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}'fof'-6o6t{17ss5ts5qs}7t{5os}3v{5qs}7p{17su5tu5qs}ck{5kt4qw}4l{5kt4qw}cm{5kt4qw}cn{5kt4qw}co{5kt4qw}cp{5kt4qw}6l{4qs5ks5ou5qw5ru17su5tu}17s{2ks}5q{ckvclvcmvcnvcovcpv4lv}5r{ckuclucmucnucoucpu4lu}5t{2ks}6p{4qs5ks5ou5qw5ru17su5tu}ek{4qs5ks5ou5qw5ru17su5tu}el{4qs5ks5ou5qw5ru17su5tu}em{4qs5ks5ou5qw5ru17su5tu}en{4qs5ks5ou5qw5ru17su5tu}eo{4qs5ks5ou5qw5ru17su5tu}ep{4qs5ks5ou5qw5ru17su5tu}es{5ks5qs4qs}et{4qs5ks5ou5qw5ru17su5tu}eu{4qs5ks5qw5ru17su5tu}ev{5ks5qs4qs}ex{17ss5ts5qs}6z{4qv5ks5ou5qw5ru17su5tu}fm{4qv5ks5ou5qw5ru17su5tu}fn{4qv5ks5ou5qw5ru17su5tu}fo{4qv5ks5ou5qw5ru17su5tu}fp{4qv5ks5ou5qw5ru17su5tu}fq{4qv5ks5ou5qw5ru17su5tu}7r{5os}fs{4qv5ks5ou5qw5ru17su5tu}ft{17su5tu5qs}fu{17su5tu5qs}fv{17su5tu5qs}fw{17su5tu5qs}}}"),"Times-Roman":u("{'widths'{k3n2q4ycx2l201n3m201o6o201s2l201t2l201u2l201w2w201x2w201y2w2k1t2l2l202m2n2n3m2o3m2p5n202q6o2r1m2s2l2t2l2u3m2v3s2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v1w3w3s3x3s3y3s3z2w4k5w4l4s4m4m4n4m4o4s4p3x4q3r4r4s4s4s4t2l4u2r4v4s4w3x4x5t4y4s4z4s5k3r5l4s5m4m5n3r5o3x5p4s5q4s5r5y5s4s5t4s5u3x5v2l5w1w5x2l5y2z5z3m6k2l6l2w6m3m6n2w6o3m6p2w6q2l6r3m6s3m6t1w6u1w6v3m6w1w6x4y6y3m6z3m7k3m7l3m7m2l7n2r7o1w7p3m7q3m7r4s7s3m7t3m7u2w7v3k7w1o7x3k7y3q202l3mcl4sal2lam3man3mao3map3mar3mas2lat4wau1vav3maw3say4waz2lbk2sbl3s'fof'6obo2lbp3mbq2xbr1tbs2lbu1zbv3mbz2wck4s202k3mcm4scn4sco4scp4scq5tcr4mcs3xct3xcu3xcv3xcw2l2m2tcy2lcz2ldl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek2wel2wem2wen2weo2wep2weq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr3sfs3mft3mfu3mfv3mfw3mfz3m203k6o212m6m2dw2l2cq2l3t3m3u1w17s4s19m3m}'kerning'{cl{4qs5ku17sw5ou5qy5rw201ss5tw201ws}201s{201ss}201t{ckw4lwcmwcnwcowcpwclw4wu201ts}2k{201ts}2w{4qs5kw5os5qx5ru17sx5tx}2x{17sw5tw5ou5qu}2y{4qs5kw5os5qx5ru17sx5tx}'fof'-6o7t{ckuclucmucnucoucpu4lu5os5rs}3u{17su5tu5qs}3v{17su5tu5qs}7p{17sw5tw5qs}ck{4qs5ku17sw5ou5qy5rw201ss5tw201ws}4l{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cm{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cn{4qs5ku17sw5ou5qy5rw201ss5tw201ws}co{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cp{4qs5ku17sw5ou5qy5rw201ss5tw201ws}6l{17su5tu5os5qw5rs}17s{2ktclvcmvcnvcovcpv4lv4wuckv}5o{ckwclwcmwcnwcowcpw4lw4wu}5q{ckyclycmycnycoycpy4ly4wu5ms}5r{cktcltcmtcntcotcpt4lt4ws}5t{2ktclvcmvcnvcovcpv4lv4wuckv}7q{cksclscmscnscoscps4ls}6p{17su5tu5qw5rs}ek{5qs5rs}el{17su5tu5os5qw5rs}em{17su5tu5os5qs5rs}en{17su5qs5rs}eo{5qs5rs}ep{17su5tu5os5qw5rs}es{5qs}et{17su5tu5qw5rs}eu{17su5tu5qs5rs}ev{5qs}6z{17sv5tv5os5qx5rs}fm{5os5qt5rs}fn{17sv5tv5os5qx5rs}fo{17sv5tv5os5qx5rs}fp{5os5qt5rs}fq{5os5qt5rs}7r{ckuclucmucnucoucpu4lu5os}fs{17sv5tv5os5qx5rs}ft{17ss5ts5qs}fu{17sw5tw5qs}fv{17sw5tw5qs}fw{17ss5ts5qs}fz{ckuclucmucnucoucpu4lu5os5rs}}}"),"Helvetica-Oblique":u("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}")}};r.events.push(["addFont",function(x){var g=x.font,P=w.Unicode[g.postScriptName];P&&(g.metadata.Unicode={},g.metadata.Unicode.widths=P.widths,g.metadata.Unicode.kerning=P.kerning);var C=p.Unicode[g.postScriptName];C&&(g.metadata.Unicode.encoding=C,g.encoding=C.codePages[0])}])})(Rt.API),(function(r){var t=function(e){for(var n=e.length,a=new Uint8Array(n),i=0;i<n;i++)a[i]=e.charCodeAt(i);return a};r.API.events.push(["addFont",function(e){var n=void 0,a=e.font,i=e.instance;if(!a.isStandardFont){if(i===void 0)throw new Error("Font does not exist in vFS, import fonts or remove declaration doc.addFont('"+a.postScriptName+"').");if(typeof(n=i.existsFileInVFS(a.postScriptName)===!1?i.loadFile(a.postScriptName):i.getFileFromVFS(a.postScriptName))!="string")throw new Error("Font is not stored as string-data in vFS, import fonts or remove declaration doc.addFont('"+a.postScriptName+"').");(function(f,l){l=/^\x00\x01\x00\x00/.test(l)?t(l):t(Co(l)),f.metadata=r.API.TTFFont.open(l),f.metadata.Unicode=f.metadata.Unicode||{encoding:{},kerning:{},widths:[]},f.metadata.glyIdsUsed=[0]})(a,n)}}])})(Rt),Rt.API.addSvgAsImage=function(r,t,e,n,a,i,f,l){if(isNaN(t)||isNaN(e))throw Le.error("jsPDF.addSvgAsImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addSvgAsImage");if(isNaN(n)||isNaN(a))throw Le.error("jsPDF.addSvgAsImage: Invalid measurements",arguments),new Error("Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage");var u=document.createElement("canvas");u.width=n,u.height=a;var h=u.getContext("2d");h.fillStyle="#fff",h.fillRect(0,0,u.width,u.height);var p={ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0},w=this;return(Jt.canvg?Promise.resolve(Jt.canvg):Promise.resolve().then(()=>require("./index.es-BtDW7HTQ.cjs"))).catch(function(x){return Promise.reject(new Error("Could not load canvg: "+x))}).then(function(x){return x.default?x.default:x}).then(function(x){return x.fromString(h,r,p)},function(){return Promise.reject(new Error("Could not load canvg."))}).then(function(x){return x.render(p)}).then(function(){w.addImage(u.toDataURL("image/jpeg",1),t,e,n,a,f,l)})},Rt.API.putTotalPages=function(r){var t,e=0;parseInt(this.internal.getFont().id.substr(1),10)<15?(t=new RegExp(r,"g"),e=this.internal.getNumberOfPages()):(t=new RegExp(this.pdfEscape16(r,this.internal.getFont()),"g"),e=this.pdfEscape16(this.internal.getNumberOfPages()+"",this.internal.getFont()));for(var n=1;n<=this.internal.getNumberOfPages();n++)for(var a=0;a<this.internal.pages[n].length;a++)this.internal.pages[n][a]=this.internal.pages[n][a].replace(t,e);return this},Rt.API.viewerPreferences=function(r,t){var e;r=r||{},t=t||!1;var n,a,i,f={HideToolbar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideMenubar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideWindowUI:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},FitWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},CenterWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},DisplayDocTitle:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.4},NonFullScreenPageMode:{defaultValue:"UseNone",value:"UseNone",type:"name",explicitSet:!1,valueSet:["UseNone","UseOutlines","UseThumbs","UseOC"],pdfVersion:1.3},Direction:{defaultValue:"L2R",value:"L2R",type:"name",explicitSet:!1,valueSet:["L2R","R2L"],pdfVersion:1.3},ViewArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},ViewClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintScaling:{defaultValue:"AppDefault",value:"AppDefault",type:"name",explicitSet:!1,valueSet:["AppDefault","None"],pdfVersion:1.6},Duplex:{defaultValue:"",value:"none",type:"name",explicitSet:!1,valueSet:["Simplex","DuplexFlipShortEdge","DuplexFlipLongEdge","none"],pdfVersion:1.7},PickTrayByPDFSize:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.7},PrintPageRange:{defaultValue:"",value:"",type:"array",explicitSet:!1,valueSet:null,pdfVersion:1.7},NumCopies:{defaultValue:1,value:1,type:"integer",explicitSet:!1,valueSet:null,pdfVersion:1.7}},l=Object.keys(f),u=[],h=0,p=0,w=0;function x(P,C){var B,S=!1;for(B=0;B<P.length;B+=1)P[B]===C&&(S=!0);return S}if(this.internal.viewerpreferences===void 0&&(this.internal.viewerpreferences={},this.internal.viewerpreferences.configuration=JSON.parse(JSON.stringify(f)),this.internal.viewerpreferences.isSubscribed=!1),e=this.internal.viewerpreferences.configuration,r==="reset"||t===!0){var g=l.length;for(w=0;w<g;w+=1)e[l[w]].value=e[l[w]].defaultValue,e[l[w]].explicitSet=!1}if(ye(r)==="object"){for(a in r)if(i=r[a],x(l,a)&&i!==void 0){if(e[a].type==="boolean"&&typeof i=="boolean")e[a].value=i;else if(e[a].type==="name"&&x(e[a].valueSet,i))e[a].value=i;else if(e[a].type==="integer"&&Number.isInteger(i))e[a].value=i;else if(e[a].type==="array"){for(h=0;h<i.length;h+=1)if(n=!0,i[h].length===1&&typeof i[h][0]=="number")u.push(String(i[h]-1));else if(i[h].length>1){for(p=0;p<i[h].length;p+=1)typeof i[h][p]!="number"&&(n=!1);n===!0&&u.push([i[h][0]-1,i[h][1]-1].join(" "))}e[a].value="["+u.join(" ")+"]"}else e[a].value=e[a].defaultValue;e[a].explicitSet=!0}}return this.internal.viewerpreferences.isSubscribed===!1&&(this.internal.events.subscribe("putCatalog",function(){var P,C=[];for(P in e)e[P].explicitSet===!0&&(e[P].type==="name"?C.push("/"+P+" /"+e[P].value):C.push("/"+P+" "+e[P].value));C.length!==0&&this.internal.write(`/ViewerPreferences
|
|
49
|
+
`&&(n=n.substr(1),V=1),x+g+(P=(a=ko.apply(this,[n,e])).reduce(function(M,it){return M+it},0))>t||V){if(P>t){for(l=Xu.apply(this,[n,a,t-(x+g),t]),p.push(l.shift()),p=[l.pop()];l.length;)w.push([l.shift()]);P=a.slice(n.length-(p[0]?p[0].length:0)).reduce(function(M,it){return M+it},0)}else p=[n];w.push(p),x=P+u,g=B}else p.push(n),x+=g+P,g=B}return h=u?function(M,it){return(it?S:"")+M.join(" ")}:function(M){return M.join(" ")},w.map(h)},Wi.splitTextToSize=function(r,t,e){var n,a=(e=e||{}).fontSize||this.internal.getFontSize(),i=(function(p){if(p.widths&&p.kerning)return{widths:p.widths,kerning:p.kerning};var w=this.internal.getFont(p.fontName,p.fontStyle),x="Unicode";return w.metadata[x]?{widths:w.metadata[x].widths||{0:1},kerning:w.metadata[x].kerning||{}}:{font:w.metadata,fontSize:this.internal.getFontSize(),charSpace:this.internal.getCharSpace()}}).call(this,e);n=Array.isArray(r)?r:String(r).split(/\r?\n/);var f=1*this.internal.scaleFactor*t/a;i.textIndent=e.textIndent?1*e.textIndent*this.internal.scaleFactor/a:0,i.lineIndent=e.lineIndent;var l,u,h=[];for(l=0,u=n.length;l<u;l++)h=h.concat(Zu.apply(this,[n[l],f,i]));return h},(function(r){r.__fontmetrics__=r.__fontmetrics__||{};for(var t="0123456789abcdef",e="klmnopqrstuvwxyz",n={},a={},i=0;i<16;i++)n[e[i]]=t[i],a[t[i]]=e[i];var f=function(x){return"0x"+parseInt(x,10).toString(16)},l=r.__fontmetrics__.compress=function(x){var g,P,C,B,S=["{"];for(var G in x){if(g=x[G],isNaN(parseInt(G,10))?P="'"+G+"'":(G=parseInt(G,10),P=(P=f(G).slice(2)).slice(0,-1)+a[P.slice(-1)]),typeof g=="number")g<0?(C=f(g).slice(3),B="-"):(C=f(g).slice(2),B=""),C=B+C.slice(0,-1)+a[C.slice(-1)];else{if(ye(g)!=="object")throw new Error("Don't know what to do with value type "+ye(g)+".");C=l(g)}S.push(P+C)}return S.push("}"),S.join("")},u=r.__fontmetrics__.uncompress=function(x){if(typeof x!="string")throw new Error("Invalid argument passed to uncompress.");for(var g,P,C,B,S={},G=1,V=S,M=[],it="",vt="",ct=x.length-1,K=1;K<ct;K+=1)(B=x[K])=="'"?g?(C=g.join(""),g=void 0):g=[]:g?g.push(B):B=="{"?(M.push([V,C]),V={},C=void 0):B=="}"?((P=M.pop())[0][P[1]]=V,C=void 0,V=P[0]):B=="-"?G=-1:C===void 0?n.hasOwnProperty(B)?(it+=n[B],C=parseInt(it,16)*G,G=1,it=""):it+=B:n.hasOwnProperty(B)?(vt+=n[B],V[C]=parseInt(vt,16)*G,G=1,C=void 0,vt=""):vt+=B;return S},h={codePages:["WinAnsiEncoding"],WinAnsiEncoding:u("{19m8n201n9q201o9r201s9l201t9m201u8m201w9n201x9o201y8o202k8q202l8r202m9p202q8p20aw8k203k8t203t8v203u9v2cq8s212m9t15m8w15n9w2dw9s16k8u16l9u17s9z17x8y17y9y}")},p={Unicode:{Courier:h,"Courier-Bold":h,"Courier-BoldOblique":h,"Courier-Oblique":h,Helvetica:h,"Helvetica-Bold":h,"Helvetica-BoldOblique":h,"Helvetica-Oblique":h,"Times-Roman":h,"Times-Bold":h,"Times-BoldItalic":h,"Times-Italic":h}},w={Unicode:{"Courier-Oblique":u("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-BoldItalic":u("{'widths'{k3o2q4ycx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2r202m2n2n3m2o3m2p5n202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5n4l4m4m4m4n4m4o4s4p4m4q4m4r4s4s4y4t2r4u3m4v4m4w3x4x5t4y4s4z4s5k3x5l4s5m4m5n3r5o3x5p4s5q4m5r5t5s4m5t3x5u3x5v2l5w1w5x2l5y3t5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q2l6r3m6s3r6t1w6u1w6v3m6w1w6x4y6y3r6z3m7k3m7l3m7m2r7n2r7o1w7p3r7q2w7r4m7s3m7t2w7u2r7v2n7w1q7x2n7y3t202l3mcl4mal2ram3man3mao3map3mar3mas2lat4uau1uav3maw3way4uaz2lbk2sbl3t'fof'6obo2lbp3tbq3mbr1tbs2lbu1ybv3mbz3mck4m202k3mcm4mcn4mco4mcp4mcq5ycr4mcs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz2w203k6o212m6o2dw2l2cq2l3t3m3u2l17s3x19m3m}'kerning'{cl{4qu5kt5qt5rs17ss5ts}201s{201ss}201t{cks4lscmscnscoscpscls2wu2yu201ts}201x{2wu2yu}2k{201ts}2w{4qx5kx5ou5qx5rs17su5tu}2x{17su5tu5ou}2y{4qx5kx5ou5qx5rs17ss5ts}'fof'-6ofn{17sw5tw5ou5qw5rs}7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qs}3v{17su5tu5os5qs}7p{17su5tu}ck{4qu5kt5qt5rs17ss5ts}4l{4qu5kt5qt5rs17ss5ts}cm{4qu5kt5qt5rs17ss5ts}cn{4qu5kt5qt5rs17ss5ts}co{4qu5kt5qt5rs17ss5ts}cp{4qu5kt5qt5rs17ss5ts}6l{4qu5ou5qw5rt17su5tu}5q{ckuclucmucnucoucpu4lu}5r{ckuclucmucnucoucpu4lu}7q{cksclscmscnscoscps4ls}6p{4qu5ou5qw5rt17sw5tw}ek{4qu5ou5qw5rt17su5tu}el{4qu5ou5qw5rt17su5tu}em{4qu5ou5qw5rt17su5tu}en{4qu5ou5qw5rt17su5tu}eo{4qu5ou5qw5rt17su5tu}ep{4qu5ou5qw5rt17su5tu}es{17ss5ts5qs4qu}et{4qu5ou5qw5rt17sw5tw}eu{4qu5ou5qw5rt17ss5ts}ev{17ss5ts5qs4qu}6z{17sw5tw5ou5qw5rs}fm{17sw5tw5ou5qw5rs}7n{201ts}fo{17sw5tw5ou5qw5rs}fp{17sw5tw5ou5qw5rs}fq{17sw5tw5ou5qw5rs}7r{cksclscmscnscoscps4ls}fs{17sw5tw5ou5qw5rs}ft{17su5tu}fu{17su5tu}fv{17su5tu}fw{17su5tu}fz{cksclscmscnscoscps4ls}}}"),"Helvetica-Bold":u("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"),Courier:u("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-BoldOblique":u("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Bold":u("{'widths'{k3q2q5ncx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2l202m2n2n3m2o3m2p6o202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5x4l4s4m4m4n4s4o4s4p4m4q3x4r4y4s4y4t2r4u3m4v4y4w4m4x5y4y4s4z4y5k3x5l4y5m4s5n3r5o4m5p4s5q4s5r6o5s4s5t4s5u4m5v2l5w1w5x2l5y3u5z3m6k2l6l3m6m3r6n2w6o3r6p2w6q2l6r3m6s3r6t1w6u2l6v3r6w1w6x5n6y3r6z3m7k3r7l3r7m2w7n2r7o2l7p3r7q3m7r4s7s3m7t3m7u2w7v2r7w1q7x2r7y3o202l3mcl4sal2lam3man3mao3map3mar3mas2lat4uau1yav3maw3tay4uaz2lbk2sbl3t'fof'6obo2lbp3rbr1tbs2lbu2lbv3mbz3mck4s202k3mcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3rek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3m3u2l17s4s19m3m}'kerning'{cl{4qt5ks5ot5qy5rw17sv5tv}201t{cks4lscmscnscoscpscls4wv}2k{201ts}2w{4qu5ku7mu5os5qx5ru17su5tu}2x{17su5tu5ou5qs}2y{4qv5kv7mu5ot5qz5ru17su5tu}'fof'-6o7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qu}3v{17su5tu5os5qu}fu{17su5tu5ou5qu}7p{17su5tu5ou5qu}ck{4qt5ks5ot5qy5rw17sv5tv}4l{4qt5ks5ot5qy5rw17sv5tv}cm{4qt5ks5ot5qy5rw17sv5tv}cn{4qt5ks5ot5qy5rw17sv5tv}co{4qt5ks5ot5qy5rw17sv5tv}cp{4qt5ks5ot5qy5rw17sv5tv}6l{17st5tt5ou5qu}17s{ckuclucmucnucoucpu4lu4wu}5o{ckuclucmucnucoucpu4lu4wu}5q{ckzclzcmzcnzcozcpz4lz4wu}5r{ckxclxcmxcnxcoxcpx4lx4wu}5t{ckuclucmucnucoucpu4lu4wu}7q{ckuclucmucnucoucpu4lu}6p{17sw5tw5ou5qu}ek{17st5tt5qu}el{17st5tt5ou5qu}em{17st5tt5qu}en{17st5tt5qu}eo{17st5tt5qu}ep{17st5tt5ou5qu}es{17ss5ts5qu}et{17sw5tw5ou5qu}eu{17sw5tw5ou5qu}ev{17ss5ts5qu}6z{17sw5tw5ou5qu5rs}fm{17sw5tw5ou5qu5rs}fn{17sw5tw5ou5qu5rs}fo{17sw5tw5ou5qu5rs}fp{17sw5tw5ou5qu5rs}fq{17sw5tw5ou5qu5rs}7r{cktcltcmtcntcotcpt4lt5os}fs{17sw5tw5ou5qu5rs}ft{17su5tu5ou5qu}7m{5os}fv{17su5tu5ou5qu}fw{17su5tu5ou5qu}fz{cksclscmscnscoscps4ls}}}"),Symbol:u("{'widths'{k3uaw4r19m3m2k1t2l2l202m2y2n3m2p5n202q6o3k3m2s2l2t2l2v3r2w1t3m3m2y1t2z1wbk2sbl3r'fof'6o3n3m3o3m3p3m3q3m3r3m3s3m3t3m3u1w3v1w3w3r3x3r3y3r3z2wbp3t3l3m5v2l5x2l5z3m2q4yfr3r7v3k7w1o7x3k}'kerning'{'fof'-6o}}"),Helvetica:u("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}"),"Helvetica-BoldOblique":u("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"),ZapfDingbats:u("{'widths'{k4u2k1w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-Bold":u("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Italic":u("{'widths'{k3n2q4ycx2l201n3m201o5t201s2l201t2l201u2l201w3r201x3r201y3r2k1t2l2l202m2n2n3m2o3m2p5n202q5t2r1p2s2l2t2l2u3m2v4n2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w4n3x4n3y4n3z3m4k5w4l3x4m3x4n4m4o4s4p3x4q3x4r4s4s4s4t2l4u2w4v4m4w3r4x5n4y4m4z4s5k3x5l4s5m3x5n3m5o3r5p4s5q3x5r5n5s3x5t3r5u3r5v2r5w1w5x2r5y2u5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q1w6r3m6s3m6t1w6u1w6v2w6w1w6x4s6y3m6z3m7k3m7l3m7m2r7n2r7o1w7p3m7q2w7r4m7s2w7t2w7u2r7v2s7w1v7x2s7y3q202l3mcl3xal2ram3man3mao3map3mar3mas2lat4wau1vav3maw4nay4waz2lbk2sbl4n'fof'6obo2lbp3mbq3obr1tbs2lbu1zbv3mbz3mck3x202k3mcm3xcn3xco3xcp3xcq5tcr4mcs3xct3xcu3xcv3xcw2l2m2ucy2lcz2ldl4mdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr4nfs3mft3mfu3mfv3mfw3mfz2w203k6o212m6m2dw2l2cq2l3t3m3u2l17s3r19m3m}'kerning'{cl{5kt4qw}201s{201sw}201t{201tw2wy2yy6q-t}201x{2wy2yy}2k{201tw}2w{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}2x{17ss5ts5os}2y{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}'fof'-6o6t{17ss5ts5qs}7t{5os}3v{5qs}7p{17su5tu5qs}ck{5kt4qw}4l{5kt4qw}cm{5kt4qw}cn{5kt4qw}co{5kt4qw}cp{5kt4qw}6l{4qs5ks5ou5qw5ru17su5tu}17s{2ks}5q{ckvclvcmvcnvcovcpv4lv}5r{ckuclucmucnucoucpu4lu}5t{2ks}6p{4qs5ks5ou5qw5ru17su5tu}ek{4qs5ks5ou5qw5ru17su5tu}el{4qs5ks5ou5qw5ru17su5tu}em{4qs5ks5ou5qw5ru17su5tu}en{4qs5ks5ou5qw5ru17su5tu}eo{4qs5ks5ou5qw5ru17su5tu}ep{4qs5ks5ou5qw5ru17su5tu}es{5ks5qs4qs}et{4qs5ks5ou5qw5ru17su5tu}eu{4qs5ks5qw5ru17su5tu}ev{5ks5qs4qs}ex{17ss5ts5qs}6z{4qv5ks5ou5qw5ru17su5tu}fm{4qv5ks5ou5qw5ru17su5tu}fn{4qv5ks5ou5qw5ru17su5tu}fo{4qv5ks5ou5qw5ru17su5tu}fp{4qv5ks5ou5qw5ru17su5tu}fq{4qv5ks5ou5qw5ru17su5tu}7r{5os}fs{4qv5ks5ou5qw5ru17su5tu}ft{17su5tu5qs}fu{17su5tu5qs}fv{17su5tu5qs}fw{17su5tu5qs}}}"),"Times-Roman":u("{'widths'{k3n2q4ycx2l201n3m201o6o201s2l201t2l201u2l201w2w201x2w201y2w2k1t2l2l202m2n2n3m2o3m2p5n202q6o2r1m2s2l2t2l2u3m2v3s2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v1w3w3s3x3s3y3s3z2w4k5w4l4s4m4m4n4m4o4s4p3x4q3r4r4s4s4s4t2l4u2r4v4s4w3x4x5t4y4s4z4s5k3r5l4s5m4m5n3r5o3x5p4s5q4s5r5y5s4s5t4s5u3x5v2l5w1w5x2l5y2z5z3m6k2l6l2w6m3m6n2w6o3m6p2w6q2l6r3m6s3m6t1w6u1w6v3m6w1w6x4y6y3m6z3m7k3m7l3m7m2l7n2r7o1w7p3m7q3m7r4s7s3m7t3m7u2w7v3k7w1o7x3k7y3q202l3mcl4sal2lam3man3mao3map3mar3mas2lat4wau1vav3maw3say4waz2lbk2sbl3s'fof'6obo2lbp3mbq2xbr1tbs2lbu1zbv3mbz2wck4s202k3mcm4scn4sco4scp4scq5tcr4mcs3xct3xcu3xcv3xcw2l2m2tcy2lcz2ldl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek2wel2wem2wen2weo2wep2weq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr3sfs3mft3mfu3mfv3mfw3mfz3m203k6o212m6m2dw2l2cq2l3t3m3u1w17s4s19m3m}'kerning'{cl{4qs5ku17sw5ou5qy5rw201ss5tw201ws}201s{201ss}201t{ckw4lwcmwcnwcowcpwclw4wu201ts}2k{201ts}2w{4qs5kw5os5qx5ru17sx5tx}2x{17sw5tw5ou5qu}2y{4qs5kw5os5qx5ru17sx5tx}'fof'-6o7t{ckuclucmucnucoucpu4lu5os5rs}3u{17su5tu5qs}3v{17su5tu5qs}7p{17sw5tw5qs}ck{4qs5ku17sw5ou5qy5rw201ss5tw201ws}4l{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cm{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cn{4qs5ku17sw5ou5qy5rw201ss5tw201ws}co{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cp{4qs5ku17sw5ou5qy5rw201ss5tw201ws}6l{17su5tu5os5qw5rs}17s{2ktclvcmvcnvcovcpv4lv4wuckv}5o{ckwclwcmwcnwcowcpw4lw4wu}5q{ckyclycmycnycoycpy4ly4wu5ms}5r{cktcltcmtcntcotcpt4lt4ws}5t{2ktclvcmvcnvcovcpv4lv4wuckv}7q{cksclscmscnscoscps4ls}6p{17su5tu5qw5rs}ek{5qs5rs}el{17su5tu5os5qw5rs}em{17su5tu5os5qs5rs}en{17su5qs5rs}eo{5qs5rs}ep{17su5tu5os5qw5rs}es{5qs}et{17su5tu5qw5rs}eu{17su5tu5qs5rs}ev{5qs}6z{17sv5tv5os5qx5rs}fm{5os5qt5rs}fn{17sv5tv5os5qx5rs}fo{17sv5tv5os5qx5rs}fp{5os5qt5rs}fq{5os5qt5rs}7r{ckuclucmucnucoucpu4lu5os}fs{17sv5tv5os5qx5rs}ft{17ss5ts5qs}fu{17sw5tw5qs}fv{17sw5tw5qs}fw{17ss5ts5qs}fz{ckuclucmucnucoucpu4lu5os5rs}}}"),"Helvetica-Oblique":u("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}")}};r.events.push(["addFont",function(x){var g=x.font,P=w.Unicode[g.postScriptName];P&&(g.metadata.Unicode={},g.metadata.Unicode.widths=P.widths,g.metadata.Unicode.kerning=P.kerning);var C=p.Unicode[g.postScriptName];C&&(g.metadata.Unicode.encoding=C,g.encoding=C.codePages[0])}])})(Rt.API),(function(r){var t=function(e){for(var n=e.length,a=new Uint8Array(n),i=0;i<n;i++)a[i]=e.charCodeAt(i);return a};r.API.events.push(["addFont",function(e){var n=void 0,a=e.font,i=e.instance;if(!a.isStandardFont){if(i===void 0)throw new Error("Font does not exist in vFS, import fonts or remove declaration doc.addFont('"+a.postScriptName+"').");if(typeof(n=i.existsFileInVFS(a.postScriptName)===!1?i.loadFile(a.postScriptName):i.getFileFromVFS(a.postScriptName))!="string")throw new Error("Font is not stored as string-data in vFS, import fonts or remove declaration doc.addFont('"+a.postScriptName+"').");(function(f,l){l=/^\x00\x01\x00\x00/.test(l)?t(l):t(Co(l)),f.metadata=r.API.TTFFont.open(l),f.metadata.Unicode=f.metadata.Unicode||{encoding:{},kerning:{},widths:[]},f.metadata.glyIdsUsed=[0]})(a,n)}}])})(Rt),Rt.API.addSvgAsImage=function(r,t,e,n,a,i,f,l){if(isNaN(t)||isNaN(e))throw Le.error("jsPDF.addSvgAsImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addSvgAsImage");if(isNaN(n)||isNaN(a))throw Le.error("jsPDF.addSvgAsImage: Invalid measurements",arguments),new Error("Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage");var u=document.createElement("canvas");u.width=n,u.height=a;var h=u.getContext("2d");h.fillStyle="#fff",h.fillRect(0,0,u.width,u.height);var p={ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0},w=this;return(Jt.canvg?Promise.resolve(Jt.canvg):Promise.resolve().then(()=>require("./index.es-BCJd8pS0.cjs"))).catch(function(x){return Promise.reject(new Error("Could not load canvg: "+x))}).then(function(x){return x.default?x.default:x}).then(function(x){return x.fromString(h,r,p)},function(){return Promise.reject(new Error("Could not load canvg."))}).then(function(x){return x.render(p)}).then(function(){w.addImage(u.toDataURL("image/jpeg",1),t,e,n,a,f,l)})},Rt.API.putTotalPages=function(r){var t,e=0;parseInt(this.internal.getFont().id.substr(1),10)<15?(t=new RegExp(r,"g"),e=this.internal.getNumberOfPages()):(t=new RegExp(this.pdfEscape16(r,this.internal.getFont()),"g"),e=this.pdfEscape16(this.internal.getNumberOfPages()+"",this.internal.getFont()));for(var n=1;n<=this.internal.getNumberOfPages();n++)for(var a=0;a<this.internal.pages[n].length;a++)this.internal.pages[n][a]=this.internal.pages[n][a].replace(t,e);return this},Rt.API.viewerPreferences=function(r,t){var e;r=r||{},t=t||!1;var n,a,i,f={HideToolbar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideMenubar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideWindowUI:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},FitWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},CenterWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},DisplayDocTitle:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.4},NonFullScreenPageMode:{defaultValue:"UseNone",value:"UseNone",type:"name",explicitSet:!1,valueSet:["UseNone","UseOutlines","UseThumbs","UseOC"],pdfVersion:1.3},Direction:{defaultValue:"L2R",value:"L2R",type:"name",explicitSet:!1,valueSet:["L2R","R2L"],pdfVersion:1.3},ViewArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},ViewClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintScaling:{defaultValue:"AppDefault",value:"AppDefault",type:"name",explicitSet:!1,valueSet:["AppDefault","None"],pdfVersion:1.6},Duplex:{defaultValue:"",value:"none",type:"name",explicitSet:!1,valueSet:["Simplex","DuplexFlipShortEdge","DuplexFlipLongEdge","none"],pdfVersion:1.7},PickTrayByPDFSize:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.7},PrintPageRange:{defaultValue:"",value:"",type:"array",explicitSet:!1,valueSet:null,pdfVersion:1.7},NumCopies:{defaultValue:1,value:1,type:"integer",explicitSet:!1,valueSet:null,pdfVersion:1.7}},l=Object.keys(f),u=[],h=0,p=0,w=0;function x(P,C){var B,S=!1;for(B=0;B<P.length;B+=1)P[B]===C&&(S=!0);return S}if(this.internal.viewerpreferences===void 0&&(this.internal.viewerpreferences={},this.internal.viewerpreferences.configuration=JSON.parse(JSON.stringify(f)),this.internal.viewerpreferences.isSubscribed=!1),e=this.internal.viewerpreferences.configuration,r==="reset"||t===!0){var g=l.length;for(w=0;w<g;w+=1)e[l[w]].value=e[l[w]].defaultValue,e[l[w]].explicitSet=!1}if(ye(r)==="object"){for(a in r)if(i=r[a],x(l,a)&&i!==void 0){if(e[a].type==="boolean"&&typeof i=="boolean")e[a].value=i;else if(e[a].type==="name"&&x(e[a].valueSet,i))e[a].value=i;else if(e[a].type==="integer"&&Number.isInteger(i))e[a].value=i;else if(e[a].type==="array"){for(h=0;h<i.length;h+=1)if(n=!0,i[h].length===1&&typeof i[h][0]=="number")u.push(String(i[h]-1));else if(i[h].length>1){for(p=0;p<i[h].length;p+=1)typeof i[h][p]!="number"&&(n=!1);n===!0&&u.push([i[h][0]-1,i[h][1]-1].join(" "))}e[a].value="["+u.join(" ")+"]"}else e[a].value=e[a].defaultValue;e[a].explicitSet=!0}}return this.internal.viewerpreferences.isSubscribed===!1&&(this.internal.events.subscribe("putCatalog",function(){var P,C=[];for(P in e)e[P].explicitSet===!0&&(e[P].type==="name"?C.push("/"+P+" /"+e[P].value):C.push("/"+P+" "+e[P].value));C.length!==0&&this.internal.write(`/ViewerPreferences
|
|
50
50
|
<<
|
|
51
51
|
`+C.join(`
|
|
52
52
|
`)+`
|
|
@@ -76,4 +76,4 @@ CMapName currentdict /CMap defineresource pop
|
|
|
76
76
|
end
|
|
77
77
|
end`};t.events.push(["putFont",function(i){(function(f){var l=f.font,u=f.out,h=f.newObject,p=f.putStream;if(l.metadata instanceof r.API.TTFFont&&l.encoding==="Identity-H"){for(var w=l.metadata.Unicode.widths,x=l.metadata.subset.encode(l.metadata.glyIdsUsed,1),g="",P=0;P<x.length;P++)g+=String.fromCharCode(x[P]);var C=h();p({data:g,addLength1:!0,objectId:C}),u("endobj");var B=h();p({data:n(l.metadata.toUnicode),addLength1:!0,objectId:B}),u("endobj");var S=h();u("<<"),u("/Type /FontDescriptor"),u("/FontName /"+Vi(l.fontName)),u("/FontFile2 "+C+" 0 R"),u("/FontBBox "+r.API.PDFObject.convert(l.metadata.bbox)),u("/Flags "+l.metadata.flags),u("/StemV "+l.metadata.stemV),u("/ItalicAngle "+l.metadata.italicAngle),u("/Ascent "+l.metadata.ascender),u("/Descent "+l.metadata.decender),u("/CapHeight "+l.metadata.capHeight),u(">>"),u("endobj");var G=h();u("<<"),u("/Type /Font"),u("/BaseFont /"+Vi(l.fontName)),u("/FontDescriptor "+S+" 0 R"),u("/W "+r.API.PDFObject.convert(w)),u("/CIDToGIDMap /Identity"),u("/DW 1000"),u("/Subtype /CIDFontType2"),u("/CIDSystemInfo"),u("<<"),u("/Supplement 0"),u("/Registry (Adobe)"),u("/Ordering ("+l.encoding+")"),u(">>"),u(">>"),u("endobj"),l.objectNumber=h(),u("<<"),u("/Type /Font"),u("/Subtype /Type0"),u("/ToUnicode "+B+" 0 R"),u("/BaseFont /"+Vi(l.fontName)),u("/Encoding /"+l.encoding),u("/DescendantFonts ["+G+" 0 R]"),u(">>"),u("endobj"),l.isAlreadyPutted=!0}})(i)}]),t.events.push(["putFont",function(i){(function(f){var l=f.font,u=f.out,h=f.newObject,p=f.putStream;if(l.metadata instanceof r.API.TTFFont&&l.encoding==="WinAnsiEncoding"){for(var w=l.metadata.rawData,x="",g=0;g<w.length;g++)x+=String.fromCharCode(w[g]);var P=h();p({data:x,addLength1:!0,objectId:P}),u("endobj");var C=h();p({data:n(l.metadata.toUnicode),addLength1:!0,objectId:C}),u("endobj");var B=h();u("<<"),u("/Descent "+l.metadata.decender),u("/CapHeight "+l.metadata.capHeight),u("/StemV "+l.metadata.stemV),u("/Type /FontDescriptor"),u("/FontFile2 "+P+" 0 R"),u("/Flags 96"),u("/FontBBox "+r.API.PDFObject.convert(l.metadata.bbox)),u("/FontName /"+Vi(l.fontName)),u("/ItalicAngle "+l.metadata.italicAngle),u("/Ascent "+l.metadata.ascender),u(">>"),u("endobj"),l.objectNumber=h();for(var S=0;S<l.metadata.hmtx.widths.length;S++)l.metadata.hmtx.widths[S]=parseInt(l.metadata.hmtx.widths[S]*(1e3/l.metadata.head.unitsPerEm));u("<</Subtype/TrueType/Type/Font/ToUnicode "+C+" 0 R/BaseFont/"+Vi(l.fontName)+"/FontDescriptor "+B+" 0 R/Encoding/"+l.encoding+" /FirstChar 29 /LastChar 255 /Widths "+r.API.PDFObject.convert(l.metadata.hmtx.widths)+">>"),u("endobj"),l.isAlreadyPutted=!0}})(i)}]);var a=function(i){var f,l=i.text||"",u=i.x,h=i.y,p=i.options||{},w=i.mutex||{},x=w.pdfEscape,g=w.activeFontKey,P=w.fonts,C=g,B="",S=0,G="",V=P[C].encoding;if(P[C].encoding!=="Identity-H")return{text:l,x:u,y:h,options:p,mutex:w};for(G=l,C=g,Array.isArray(l)&&(G=l[0]),S=0;S<G.length;S+=1)P[C].metadata.hasOwnProperty("cmap")&&(f=P[C].metadata.cmap.unicode.codeMap[G[S].charCodeAt(0)]),f||G[S].charCodeAt(0)<256&&P[C].metadata.hasOwnProperty("Unicode")?B+=G[S]:B+="";var M="";return parseInt(C.slice(1))<14||V==="WinAnsiEncoding"?M=x(B,C).split("").map(function(it){return it.charCodeAt(0).toString(16)}).join(""):V==="Identity-H"&&(M=e(B,P[C])),w.isHex=!0,{text:M,x:u,y:h,options:p,mutex:w}};t.events.push(["postProcessText",function(i){var f=i.text||"",l=[],u={text:f,x:i.x,y:i.y,options:i.options,mutex:i.mutex};if(Array.isArray(f)){var h=0;for(h=0;h<f.length;h+=1)Array.isArray(f[h])&&f[h].length===3?l.push([a(Object.assign({},u,{text:f[h][0]})).text,f[h][1],f[h][2]]):l.push(a(Object.assign({},u,{text:f[h]})).text);i.text=l}else i.text=a(Object.assign({},u,{text:f})).text}])})(Rt),(function(r){var t=function(){return this.internal.vFS===void 0&&(this.internal.vFS={}),!0};r.existsFileInVFS=function(e){return t.call(this),this.internal.vFS[e]!==void 0},r.addFileToVFS=function(e,n){return t.call(this),this.internal.vFS[e]=n,this},r.getFileFromVFS=function(e){return t.call(this),this.internal.vFS[e]!==void 0?this.internal.vFS[e]:null}})(Rt.API),(function(r){r.__bidiEngine__=r.prototype.__bidiEngine__=function(n){var a,i,f,l,u,h,p,w=t,x=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],g=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],P={L:0,R:1,EN:2,AN:3,N:4,B:5,S:6},C={0:0,5:1,6:2,7:3,32:4,251:5,254:6,255:7},B=["(",")","(","<",">","<","[","]","[","{","}","{","«","»","«","‹","›","‹","⁅","⁆","⁅","⁽","⁾","⁽","₍","₎","₍","≤","≥","≤","〈","〉","〈","﹙","﹚","﹙","﹛","﹜","﹛","﹝","﹞","﹝","﹤","﹥","﹤"],S=new RegExp(/^([1-4|9]|1[0-9]|2[0-9]|3[0168]|4[04589]|5[012]|7[78]|159|16[0-9]|17[0-2]|21[569]|22[03489]|250)$/),G=!1,V=0;this.__bidiEngine__={};var M=function(L){var O=L.charCodeAt(),z=O>>8,U=C[z];return U!==void 0?w[256*U+(255&O)]:z===252||z===253?"AL":S.test(z)?"L":z===8?"R":"N"},it=function(L){for(var O,z=0;z<L.length;z++){if((O=M(L.charAt(z)))==="L")return!1;if(O==="R")return!0}return!1},vt=function(L,O,z,U){var nt,st,ut,rt,ht=O[U];switch(ht){case"L":case"R":case"LRE":case"RLE":case"LRO":case"RLO":case"PDF":G=!1;break;case"N":case"AN":break;case"EN":G&&(ht="AN");break;case"AL":G=!0,ht="R";break;case"WS":case"BN":ht="N";break;case"CS":U<1||U+1>=O.length||(nt=z[U-1])!=="EN"&&nt!=="AN"||(st=O[U+1])!=="EN"&&st!=="AN"?ht="N":G&&(st="AN"),ht=st===nt?st:"N";break;case"ES":ht=(nt=U>0?z[U-1]:"B")==="EN"&&U+1<O.length&&O[U+1]==="EN"?"EN":"N";break;case"ET":if(U>0&&z[U-1]==="EN"){ht="EN";break}if(G){ht="N";break}for(ut=U+1,rt=O.length;ut<rt&&O[ut]==="ET";)ut++;ht=ut<rt&&O[ut]==="EN"?"EN":"N";break;case"NSM":if(f&&!l){for(rt=O.length,ut=U+1;ut<rt&&O[ut]==="NSM";)ut++;if(ut<rt){var _t=L[U],wt=_t>=1425&&_t<=2303||_t===64286;if(nt=O[ut],wt&&(nt==="R"||nt==="AL")){ht="R";break}}}ht=U<1||(nt=O[U-1])==="B"?"N":z[U-1];break;case"B":G=!1,a=!0,ht=V;break;case"S":i=!0,ht="N"}return ht},ct=function(L,O,z){var U=L.split("");return z&&K(U,z,{hiLevel:V}),U.reverse(),O&&O.reverse(),U.join("")},K=function(L,O,z){var U,nt,st,ut,rt,ht=-1,_t=L.length,wt=0,_=[],D=V?g:x,T=[];for(G=!1,a=!1,i=!1,nt=0;nt<_t;nt++)T[nt]=M(L[nt]);for(st=0;st<_t;st++){if(rt=wt,_[st]=vt(L,T,_,st),U=240&(wt=D[rt][P[_[st]]]),wt&=15,O[st]=ut=D[wt][5],U>0)if(U===16){for(nt=ht;nt<st;nt++)O[nt]=1;ht=-1}else ht=-1;if(D[wt][6])ht===-1&&(ht=st);else if(ht>-1){for(nt=ht;nt<st;nt++)O[nt]=ut;ht=-1}T[st]==="B"&&(O[st]=0),z.hiLevel|=ut}i&&(function(H,J,Z){for(var at=0;at<Z;at++)if(H[at]==="S"){J[at]=V;for(var ot=at-1;ot>=0&&H[ot]==="WS";ot--)J[ot]=V}})(T,O,_t)},R=function(L,O,z,U,nt){if(!(nt.hiLevel<L)){if(L===1&&V===1&&!a)return O.reverse(),void(z&&z.reverse());for(var st,ut,rt,ht,_t=O.length,wt=0;wt<_t;){if(U[wt]>=L){for(rt=wt+1;rt<_t&&U[rt]>=L;)rt++;for(ht=wt,ut=rt-1;ht<ut;ht++,ut--)st=O[ht],O[ht]=O[ut],O[ut]=st,z&&(st=z[ht],z[ht]=z[ut],z[ut]=st);wt=rt}wt++}}},tt=function(L,O,z){var U=L.split(""),nt={hiLevel:V};return z||(z=[]),K(U,z,nt),(function(st,ut,rt){if(rt.hiLevel!==0&&p)for(var ht,_t=0;_t<st.length;_t++)ut[_t]===1&&(ht=B.indexOf(st[_t]))>=0&&(st[_t]=B[ht+1])})(U,z,nt),R(2,U,O,z,nt),R(1,U,O,z,nt),U.join("")};return this.__bidiEngine__.doBidiReorder=function(L,O,z){if((function(nt,st){if(st)for(var ut=0;ut<nt.length;ut++)st[ut]=ut;l===void 0&&(l=it(nt)),h===void 0&&(h=it(nt))})(L,O),f||!u||h)if(f&&u&&l^h)V=l?1:0,L=ct(L,O,z);else if(!f&&u&&h)V=l?1:0,L=tt(L,O,z),L=ct(L,O);else if(!f||l||u||h){if(f&&!u&&l^h)L=ct(L,O),l?(V=0,L=tt(L,O,z)):(V=1,L=tt(L,O,z),L=ct(L,O));else if(f&&l&&!u&&h)V=1,L=tt(L,O,z),L=ct(L,O);else if(!f&&!u&&l^h){var U=p;l?(V=1,L=tt(L,O,z),V=0,p=!1,L=tt(L,O,z),p=U):(V=0,L=tt(L,O,z),L=ct(L,O),V=1,p=!1,L=tt(L,O,z),p=U,L=ct(L,O))}}else V=0,L=tt(L,O,z);else V=l?1:0,L=tt(L,O,z);return L},this.__bidiEngine__.setOptions=function(L){L&&(f=L.isInputVisual,u=L.isOutputVisual,l=L.isInputRtl,h=L.isOutputRtl,p=L.isSymmetricSwapping)},this.__bidiEngine__.setOptions(n),this.__bidiEngine__};var t=["BN","BN","BN","BN","BN","BN","BN","BN","BN","S","B","S","WS","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","B","B","B","S","WS","N","N","ET","ET","ET","N","N","N","N","N","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","BN","BN","BN","BN","BN","BN","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","CS","N","ET","ET","ET","ET","N","N","N","N","L","N","N","BN","N","N","ET","ET","EN","EN","N","L","N","N","N","EN","L","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","N","N","N","N","N","ET","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","R","NSM","R","NSM","NSM","R","NSM","NSM","R","NSM","N","N","N","N","N","N","N","N","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","N","N","N","N","N","R","R","R","R","R","N","N","N","N","N","N","N","N","N","N","N","AN","AN","AN","AN","AN","AN","N","N","AL","ET","ET","AL","CS","AL","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AN","AN","AN","AN","AN","AN","AN","AN","AN","AN","ET","AN","AN","AL","AL","AL","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AN","N","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","NSM","NSM","N","NSM","NSM","NSM","NSM","AL","AL","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","AL","AL","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AL","N","N","N","N","N","N","N","N","N","N","N","N","N","N","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","R","R","N","N","N","N","R","N","N","N","N","N","WS","WS","WS","WS","WS","WS","WS","WS","WS","WS","WS","BN","BN","BN","L","R","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","WS","B","LRE","RLE","PDF","LRO","RLO","CS","ET","ET","ET","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","CS","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","WS","BN","BN","BN","BN","BN","N","LRI","RLI","FSI","PDI","BN","BN","BN","BN","BN","BN","EN","L","N","N","EN","EN","EN","EN","EN","EN","ES","ES","N","N","N","L","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","ES","ES","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","L","L","N","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","N","N","N","N","N","R","NSM","R","R","R","R","R","R","R","R","R","R","ES","R","R","R","R","R","R","R","R","R","R","R","R","R","N","R","R","R","R","R","N","R","N","R","R","N","R","R","N","R","R","R","R","R","R","R","R","R","R","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","CS","N","CS","N","N","CS","N","N","N","N","N","N","N","N","N","ET","N","N","ES","ES","N","N","N","N","N","ET","ET","N","N","N","N","N","AL","AL","AL","AL","AL","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","N","BN","N","N","N","ET","ET","ET","N","N","N","N","N","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","L","L","L","L","L","L","N","N","L","L","L","L","L","L","N","N","L","L","L","L","L","L","N","N","L","L","L","N","N","N","ET","ET","N","N","N","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N"],e=new r.__bidiEngine__({isInputVisual:!0});r.API.events.push(["postProcessText",function(n){var a=n.text;n.x,n.y;var i=n.options||{};n.mutex,i.lang;var f=[];if(i.isInputVisual=typeof i.isInputVisual!="boolean"||i.isInputVisual,e.setOptions(i),Object.prototype.toString.call(a)==="[object Array]"){var l=0;for(f=[],l=0;l<a.length;l+=1)Object.prototype.toString.call(a[l])==="[object Array]"?f.push([e.doBidiReorder(a[l][0]),a[l][1],a[l][2]]):f.push([e.doBidiReorder(a[l])]);n.text=f}else n.text=e.doBidiReorder(a);e.setOptions({isInputVisual:!0})}])})(Rt),Rt.API.TTFFont=(function(){function r(t){var e;if(this.rawData=t,e=this.contents=new ni(t),this.contents.pos=4,e.readString(4)==="ttcf")throw new Error("TTCF not supported.");e.pos=0,this.parse(),this.subset=new V2(this),this.registerTTF()}return r.open=function(t){return new r(t)},r.prototype.parse=function(){return this.directory=new E2(this.contents),this.head=new j2(this),this.name=new M2(this),this.cmap=new ah(this),this.toUnicode={},this.hhea=new B2(this),this.maxp=new q2(this),this.hmtx=new U2(this),this.post=new R2(this),this.os2=new D2(this),this.loca=new G2(this),this.glyf=new z2(this),this.ascender=this.os2.exists&&this.os2.ascender||this.hhea.ascender,this.decender=this.os2.exists&&this.os2.decender||this.hhea.decender,this.lineGap=this.os2.exists&&this.os2.lineGap||this.hhea.lineGap,this.bbox=[this.head.xMin,this.head.yMin,this.head.xMax,this.head.yMax]},r.prototype.registerTTF=function(){var t,e,n,a,i;if(this.scaleFactor=1e3/this.head.unitsPerEm,this.bbox=(function(){var f,l,u,h;for(h=[],f=0,l=(u=this.bbox).length;f<l;f++)t=u[f],h.push(Math.round(t*this.scaleFactor));return h}).call(this),this.stemV=0,this.post.exists?(n=255&(a=this.post.italic_angle),32768&(e=a>>16)&&(e=-(1+(65535^e))),this.italicAngle=+(e+"."+n)):this.italicAngle=0,this.ascender=Math.round(this.ascender*this.scaleFactor),this.decender=Math.round(this.decender*this.scaleFactor),this.lineGap=Math.round(this.lineGap*this.scaleFactor),this.capHeight=this.os2.exists&&this.os2.capHeight||this.ascender,this.xHeight=this.os2.exists&&this.os2.xHeight||0,this.familyClass=(this.os2.exists&&this.os2.familyClass||0)>>8,this.isSerif=(i=this.familyClass)===1||i===2||i===3||i===4||i===5||i===7,this.isScript=this.familyClass===10,this.flags=0,this.post.isFixedPitch&&(this.flags|=1),this.isSerif&&(this.flags|=2),this.isScript&&(this.flags|=8),this.italicAngle!==0&&(this.flags|=64),this.flags|=32,!this.cmap.unicode)throw new Error("No unicode cmap for font")},r.prototype.characterToGlyph=function(t){var e;return((e=this.cmap.unicode)!=null?e.codeMap[t]:void 0)||0},r.prototype.widthOfGlyph=function(t){var e;return e=1e3/this.head.unitsPerEm,this.hmtx.forGlyph(t).advance*e},r.prototype.widthOfString=function(t,e,n){var a,i,f,l;for(f=0,i=0,l=(t=""+t).length;0<=l?i<l:i>l;i=0<=l?++i:--i)a=t.charCodeAt(i),f+=this.widthOfGlyph(this.characterToGlyph(a))+n*(1e3/e)||0;return f*(e/1e3)},r.prototype.lineHeight=function(t,e){var n;return e==null&&(e=!1),n=e?this.lineGap:0,(this.ascender+n-this.decender)/1e3*t},r})();var tn,ni=(function(){function r(t){this.data=t??[],this.pos=0,this.length=this.data.length}return r.prototype.readByte=function(){return this.data[this.pos++]},r.prototype.writeByte=function(t){return this.data[this.pos++]=t},r.prototype.readUInt32=function(){return 16777216*this.readByte()+(this.readByte()<<16)+(this.readByte()<<8)+this.readByte()},r.prototype.writeUInt32=function(t){return this.writeByte(t>>>24&255),this.writeByte(t>>16&255),this.writeByte(t>>8&255),this.writeByte(255&t)},r.prototype.readInt32=function(){var t;return(t=this.readUInt32())>=2147483648?t-4294967296:t},r.prototype.writeInt32=function(t){return t<0&&(t+=4294967296),this.writeUInt32(t)},r.prototype.readUInt16=function(){return this.readByte()<<8|this.readByte()},r.prototype.writeUInt16=function(t){return this.writeByte(t>>8&255),this.writeByte(255&t)},r.prototype.readInt16=function(){var t;return(t=this.readUInt16())>=32768?t-65536:t},r.prototype.writeInt16=function(t){return t<0&&(t+=65536),this.writeUInt16(t)},r.prototype.readString=function(t){var e,n;for(n=[],e=0;0<=t?e<t:e>t;e=0<=t?++e:--e)n[e]=String.fromCharCode(this.readByte());return n.join("")},r.prototype.writeString=function(t){var e,n,a;for(a=[],e=0,n=t.length;0<=n?e<n:e>n;e=0<=n?++e:--e)a.push(this.writeByte(t.charCodeAt(e)));return a},r.prototype.readShort=function(){return this.readInt16()},r.prototype.writeShort=function(t){return this.writeInt16(t)},r.prototype.readLongLong=function(){var t,e,n,a,i,f,l,u;return t=this.readByte(),e=this.readByte(),n=this.readByte(),a=this.readByte(),i=this.readByte(),f=this.readByte(),l=this.readByte(),u=this.readByte(),128&t?-1*(72057594037927940*(255^t)+281474976710656*(255^e)+1099511627776*(255^n)+4294967296*(255^a)+16777216*(255^i)+65536*(255^f)+256*(255^l)+(255^u)+1):72057594037927940*t+281474976710656*e+1099511627776*n+4294967296*a+16777216*i+65536*f+256*l+u},r.prototype.writeLongLong=function(t){var e,n;return e=Math.floor(t/4294967296),n=4294967295&t,this.writeByte(e>>24&255),this.writeByte(e>>16&255),this.writeByte(e>>8&255),this.writeByte(255&e),this.writeByte(n>>24&255),this.writeByte(n>>16&255),this.writeByte(n>>8&255),this.writeByte(255&n)},r.prototype.readInt=function(){return this.readInt32()},r.prototype.writeInt=function(t){return this.writeInt32(t)},r.prototype.read=function(t){var e,n;for(e=[],n=0;0<=t?n<t:n>t;n=0<=t?++n:--n)e.push(this.readByte());return e},r.prototype.write=function(t){var e,n,a,i;for(i=[],n=0,a=t.length;n<a;n++)e=t[n],i.push(this.writeByte(e));return i},r})(),E2=(function(){var r;function t(e){var n,a,i;for(this.scalarType=e.readInt(),this.tableCount=e.readShort(),this.searchRange=e.readShort(),this.entrySelector=e.readShort(),this.rangeShift=e.readShort(),this.tables={},a=0,i=this.tableCount;0<=i?a<i:a>i;a=0<=i?++a:--a)n={tag:e.readString(4),checksum:e.readInt(),offset:e.readInt(),length:e.readInt()},this.tables[n.tag]=n}return t.prototype.encode=function(e){var n,a,i,f,l,u,h,p,w,x,g,P,C;for(C in g=Object.keys(e).length,u=Math.log(2),w=16*Math.floor(Math.log(g)/u),f=Math.floor(w/u),p=16*g-w,(a=new ni).writeInt(this.scalarType),a.writeShort(g),a.writeShort(w),a.writeShort(f),a.writeShort(p),i=16*g,h=a.pos+i,l=null,P=[],e)for(x=e[C],a.writeString(C),a.writeInt(r(x)),a.writeInt(h),a.writeInt(x.length),P=P.concat(x),C==="head"&&(l=h),h+=x.length;h%4;)P.push(0),h++;return a.write(P),n=2981146554-r(a.data),a.pos=l+8,a.writeUInt32(n),a.data},r=function(e){var n,a,i,f;for(e=oh.call(e);e.length%4;)e.push(0);for(i=new ni(e),a=0,n=0,f=e.length;n<f;n=n+=4)a+=i.readUInt32();return 4294967295&a},t})(),O2={}.hasOwnProperty,pn=function(r,t){for(var e in t)O2.call(t,e)&&(r[e]=t[e]);function n(){this.constructor=r}return n.prototype=t.prototype,r.prototype=new n,r.__super__=t.prototype,r};tn=(function(){function r(t){var e;this.file=t,e=this.file.directory.tables[this.tag],this.exists=!!e,e&&(this.offset=e.offset,this.length=e.length,this.parse(this.file.contents))}return r.prototype.parse=function(){},r.prototype.encode=function(){},r.prototype.raw=function(){return this.exists?(this.file.contents.pos=this.offset,this.file.contents.read(this.length)):null},r})();var j2=(function(){function r(){return r.__super__.constructor.apply(this,arguments)}return pn(r,tn),r.prototype.tag="head",r.prototype.parse=function(t){return t.pos=this.offset,this.version=t.readInt(),this.revision=t.readInt(),this.checkSumAdjustment=t.readInt(),this.magicNumber=t.readInt(),this.flags=t.readShort(),this.unitsPerEm=t.readShort(),this.created=t.readLongLong(),this.modified=t.readLongLong(),this.xMin=t.readShort(),this.yMin=t.readShort(),this.xMax=t.readShort(),this.yMax=t.readShort(),this.macStyle=t.readShort(),this.lowestRecPPEM=t.readShort(),this.fontDirectionHint=t.readShort(),this.indexToLocFormat=t.readShort(),this.glyphDataFormat=t.readShort()},r.prototype.encode=function(t){var e;return(e=new ni).writeInt(this.version),e.writeInt(this.revision),e.writeInt(this.checkSumAdjustment),e.writeInt(this.magicNumber),e.writeShort(this.flags),e.writeShort(this.unitsPerEm),e.writeLongLong(this.created),e.writeLongLong(this.modified),e.writeShort(this.xMin),e.writeShort(this.yMin),e.writeShort(this.xMax),e.writeShort(this.yMax),e.writeShort(this.macStyle),e.writeShort(this.lowestRecPPEM),e.writeShort(this.fontDirectionHint),e.writeShort(t),e.writeShort(this.glyphDataFormat),e.data},r})(),lf=(function(){function r(t,e){var n,a,i,f,l,u,h,p,w,x,g,P,C,B,S,G,V;switch(this.platformID=t.readUInt16(),this.encodingID=t.readShort(),this.offset=e+t.readInt(),w=t.pos,t.pos=this.offset,this.format=t.readUInt16(),this.length=t.readUInt16(),this.language=t.readUInt16(),this.isUnicode=this.platformID===3&&this.encodingID===1&&this.format===4||this.platformID===0&&this.format===4,this.codeMap={},this.format){case 0:for(u=0;u<256;++u)this.codeMap[u]=t.readByte();break;case 4:for(g=t.readUInt16(),x=g/2,t.pos+=6,i=(function(){var M,it;for(it=[],u=M=0;0<=x?M<x:M>x;u=0<=x?++M:--M)it.push(t.readUInt16());return it})(),t.pos+=2,C=(function(){var M,it;for(it=[],u=M=0;0<=x?M<x:M>x;u=0<=x?++M:--M)it.push(t.readUInt16());return it})(),h=(function(){var M,it;for(it=[],u=M=0;0<=x?M<x:M>x;u=0<=x?++M:--M)it.push(t.readUInt16());return it})(),p=(function(){var M,it;for(it=[],u=M=0;0<=x?M<x:M>x;u=0<=x?++M:--M)it.push(t.readUInt16());return it})(),a=(this.length-t.pos+this.offset)/2,l=(function(){var M,it;for(it=[],u=M=0;0<=a?M<a:M>a;u=0<=a?++M:--M)it.push(t.readUInt16());return it})(),u=S=0,V=i.length;S<V;u=++S)for(B=i[u],n=G=P=C[u];P<=B?G<=B:G>=B;n=P<=B?++G:--G)p[u]===0?f=n+h[u]:(f=l[p[u]/2+(n-P)-(x-u)]||0)!==0&&(f+=h[u]),this.codeMap[n]=65535&f}t.pos=w}return r.encode=function(t,e){var n,a,i,f,l,u,h,p,w,x,g,P,C,B,S,G,V,M,it,vt,ct,K,R,tt,L,O,z,U,nt,st,ut,rt,ht,_t,wt,_,D,T,H,J,Z,at,ot,gt,At,kt;switch(U=new ni,f=Object.keys(t).sort(function(St,Mt){return St-Mt}),e){case"macroman":for(C=0,B=(function(){var St=[];for(P=0;P<256;++P)St.push(0);return St})(),G={0:0},i={},nt=0,ht=f.length;nt<ht;nt++)G[ot=t[a=f[nt]]]==null&&(G[ot]=++C),i[a]={old:t[a],new:G[t[a]]},B[a]=G[t[a]];return U.writeUInt16(1),U.writeUInt16(0),U.writeUInt32(12),U.writeUInt16(0),U.writeUInt16(262),U.writeUInt16(0),U.write(B),{charMap:i,subtable:U.data,maxGlyphID:C+1};case"unicode":for(O=[],w=[],V=0,G={},n={},S=h=null,st=0,_t=f.length;st<_t;st++)G[it=t[a=f[st]]]==null&&(G[it]=++V),n[a]={old:it,new:G[it]},l=G[it]-a,S!=null&&l===h||(S&&w.push(S),O.push(a),h=l),S=a;for(S&&w.push(S),w.push(65535),O.push(65535),tt=2*(R=O.length),K=2*Math.pow(Math.log(R)/Math.LN2,2),x=Math.log(K/2)/Math.LN2,ct=2*R-K,u=[],vt=[],g=[],P=ut=0,wt=O.length;ut<wt;P=++ut){if(L=O[P],p=w[P],L===65535){u.push(0),vt.push(0);break}if(L-(z=n[L].new)>=32768)for(u.push(0),vt.push(2*(g.length+R-P)),a=rt=L;L<=p?rt<=p:rt>=p;a=L<=p?++rt:--rt)g.push(n[a].new);else u.push(z-L),vt.push(0)}for(U.writeUInt16(3),U.writeUInt16(1),U.writeUInt32(12),U.writeUInt16(4),U.writeUInt16(16+8*R+2*g.length),U.writeUInt16(0),U.writeUInt16(tt),U.writeUInt16(K),U.writeUInt16(x),U.writeUInt16(ct),Z=0,_=w.length;Z<_;Z++)a=w[Z],U.writeUInt16(a);for(U.writeUInt16(0),at=0,D=O.length;at<D;at++)a=O[at],U.writeUInt16(a);for(gt=0,T=u.length;gt<T;gt++)l=u[gt],U.writeUInt16(l);for(At=0,H=vt.length;At<H;At++)M=vt[At],U.writeUInt16(M);for(kt=0,J=g.length;kt<J;kt++)C=g[kt],U.writeUInt16(C);return{charMap:n,subtable:U.data,maxGlyphID:V+1}}},r})(),ah=(function(){function r(){return r.__super__.constructor.apply(this,arguments)}return pn(r,tn),r.prototype.tag="cmap",r.prototype.parse=function(t){var e,n,a;for(t.pos=this.offset,this.version=t.readUInt16(),a=t.readUInt16(),this.tables=[],this.unicode=null,n=0;0<=a?n<a:n>a;n=0<=a?++n:--n)e=new lf(t,this.offset),this.tables.push(e),e.isUnicode&&this.unicode==null&&(this.unicode=e);return!0},r.encode=function(t,e){var n,a;return e==null&&(e="macroman"),n=lf.encode(t,e),(a=new ni).writeUInt16(0),a.writeUInt16(1),n.table=a.data.concat(n.subtable),n},r})(),B2=(function(){function r(){return r.__super__.constructor.apply(this,arguments)}return pn(r,tn),r.prototype.tag="hhea",r.prototype.parse=function(t){return t.pos=this.offset,this.version=t.readInt(),this.ascender=t.readShort(),this.decender=t.readShort(),this.lineGap=t.readShort(),this.advanceWidthMax=t.readShort(),this.minLeftSideBearing=t.readShort(),this.minRightSideBearing=t.readShort(),this.xMaxExtent=t.readShort(),this.caretSlopeRise=t.readShort(),this.caretSlopeRun=t.readShort(),this.caretOffset=t.readShort(),t.pos+=8,this.metricDataFormat=t.readShort(),this.numberOfMetrics=t.readUInt16()},r})(),D2=(function(){function r(){return r.__super__.constructor.apply(this,arguments)}return pn(r,tn),r.prototype.tag="OS/2",r.prototype.parse=function(t){if(t.pos=this.offset,this.version=t.readUInt16(),this.averageCharWidth=t.readShort(),this.weightClass=t.readUInt16(),this.widthClass=t.readUInt16(),this.type=t.readShort(),this.ySubscriptXSize=t.readShort(),this.ySubscriptYSize=t.readShort(),this.ySubscriptXOffset=t.readShort(),this.ySubscriptYOffset=t.readShort(),this.ySuperscriptXSize=t.readShort(),this.ySuperscriptYSize=t.readShort(),this.ySuperscriptXOffset=t.readShort(),this.ySuperscriptYOffset=t.readShort(),this.yStrikeoutSize=t.readShort(),this.yStrikeoutPosition=t.readShort(),this.familyClass=t.readShort(),this.panose=(function(){var e,n;for(n=[],e=0;e<10;++e)n.push(t.readByte());return n})(),this.charRange=(function(){var e,n;for(n=[],e=0;e<4;++e)n.push(t.readInt());return n})(),this.vendorID=t.readString(4),this.selection=t.readShort(),this.firstCharIndex=t.readShort(),this.lastCharIndex=t.readShort(),this.version>0&&(this.ascent=t.readShort(),this.descent=t.readShort(),this.lineGap=t.readShort(),this.winAscent=t.readShort(),this.winDescent=t.readShort(),this.codePageRange=(function(){var e,n;for(n=[],e=0;e<2;e=++e)n.push(t.readInt());return n})(),this.version>1))return this.xHeight=t.readShort(),this.capHeight=t.readShort(),this.defaultChar=t.readShort(),this.breakChar=t.readShort(),this.maxContext=t.readShort()},r})(),R2=(function(){function r(){return r.__super__.constructor.apply(this,arguments)}return pn(r,tn),r.prototype.tag="post",r.prototype.parse=function(t){var e,n,a;switch(t.pos=this.offset,this.format=t.readInt(),this.italicAngle=t.readInt(),this.underlinePosition=t.readShort(),this.underlineThickness=t.readShort(),this.isFixedPitch=t.readInt(),this.minMemType42=t.readInt(),this.maxMemType42=t.readInt(),this.minMemType1=t.readInt(),this.maxMemType1=t.readInt(),this.format){case 65536:case 196608:break;case 131072:var i;for(n=t.readUInt16(),this.glyphNameIndex=[],i=0;0<=n?i<n:i>n;i=0<=n?++i:--i)this.glyphNameIndex.push(t.readUInt16());for(this.names=[],a=[];t.pos<this.offset+this.length;)e=t.readByte(),a.push(this.names.push(t.readString(e)));return a;case 151552:return n=t.readUInt16(),this.offsets=t.read(n);case 262144:return this.map=(function(){var f,l,u;for(u=[],i=f=0,l=this.file.maxp.numGlyphs;0<=l?f<l:f>l;i=0<=l?++f:--f)u.push(t.readUInt32());return u}).call(this)}},r})(),T2=function(r,t){this.raw=r,this.length=r.length,this.platformID=t.platformID,this.encodingID=t.encodingID,this.languageID=t.languageID},M2=(function(){function r(){return r.__super__.constructor.apply(this,arguments)}return pn(r,tn),r.prototype.tag="name",r.prototype.parse=function(t){var e,n,a,i,f,l,u,h,p,w,x;for(t.pos=this.offset,t.readShort(),e=t.readShort(),l=t.readShort(),n=[],i=0;0<=e?i<e:i>e;i=0<=e?++i:--i)n.push({platformID:t.readShort(),encodingID:t.readShort(),languageID:t.readShort(),nameID:t.readShort(),length:t.readShort(),offset:this.offset+l+t.readShort()});for(u={},i=p=0,w=n.length;p<w;i=++p)a=n[i],t.pos=a.offset,h=t.readString(a.length),f=new T2(h,a),u[x=a.nameID]==null&&(u[x]=[]),u[a.nameID].push(f);this.strings=u,this.copyright=u[0],this.fontFamily=u[1],this.fontSubfamily=u[2],this.uniqueSubfamily=u[3],this.fontName=u[4],this.version=u[5];try{this.postscriptName=u[6][0].raw.replace(/[\x00-\x19\x80-\xff]/g,"")}catch{this.postscriptName=u[4][0].raw.replace(/[\x00-\x19\x80-\xff]/g,"")}return this.trademark=u[7],this.manufacturer=u[8],this.designer=u[9],this.description=u[10],this.vendorUrl=u[11],this.designerUrl=u[12],this.license=u[13],this.licenseUrl=u[14],this.preferredFamily=u[15],this.preferredSubfamily=u[17],this.compatibleFull=u[18],this.sampleText=u[19]},r})(),q2=(function(){function r(){return r.__super__.constructor.apply(this,arguments)}return pn(r,tn),r.prototype.tag="maxp",r.prototype.parse=function(t){return t.pos=this.offset,this.version=t.readInt(),this.numGlyphs=t.readUInt16(),this.maxPoints=t.readUInt16(),this.maxContours=t.readUInt16(),this.maxCompositePoints=t.readUInt16(),this.maxComponentContours=t.readUInt16(),this.maxZones=t.readUInt16(),this.maxTwilightPoints=t.readUInt16(),this.maxStorage=t.readUInt16(),this.maxFunctionDefs=t.readUInt16(),this.maxInstructionDefs=t.readUInt16(),this.maxStackElements=t.readUInt16(),this.maxSizeOfInstructions=t.readUInt16(),this.maxComponentElements=t.readUInt16(),this.maxComponentDepth=t.readUInt16()},r})(),U2=(function(){function r(){return r.__super__.constructor.apply(this,arguments)}return pn(r,tn),r.prototype.tag="hmtx",r.prototype.parse=function(t){var e,n,a,i,f,l,u;for(t.pos=this.offset,this.metrics=[],e=0,l=this.file.hhea.numberOfMetrics;0<=l?e<l:e>l;e=0<=l?++e:--e)this.metrics.push({advance:t.readUInt16(),lsb:t.readInt16()});for(a=this.file.maxp.numGlyphs-this.file.hhea.numberOfMetrics,this.leftSideBearings=(function(){var h,p;for(p=[],e=h=0;0<=a?h<a:h>a;e=0<=a?++h:--h)p.push(t.readInt16());return p})(),this.widths=(function(){var h,p,w,x;for(x=[],h=0,p=(w=this.metrics).length;h<p;h++)i=w[h],x.push(i.advance);return x}).call(this),n=this.widths[this.widths.length-1],u=[],e=f=0;0<=a?f<a:f>a;e=0<=a?++f:--f)u.push(this.widths.push(n));return u},r.prototype.forGlyph=function(t){return t in this.metrics?this.metrics[t]:{advance:this.metrics[this.metrics.length-1].advance,lsb:this.leftSideBearings[t-this.metrics.length]}},r})(),oh=[].slice,z2=(function(){function r(){return r.__super__.constructor.apply(this,arguments)}return pn(r,tn),r.prototype.tag="glyf",r.prototype.parse=function(){return this.cache={}},r.prototype.glyphFor=function(t){var e,n,a,i,f,l,u,h,p,w;return t in this.cache?this.cache[t]:(i=this.file.loca,e=this.file.contents,n=i.indexOf(t),(a=i.lengthOf(t))===0?this.cache[t]=null:(e.pos=this.offset+n,f=(l=new ni(e.read(a))).readShort(),h=l.readShort(),w=l.readShort(),u=l.readShort(),p=l.readShort(),this.cache[t]=f===-1?new W2(l,h,w,u,p):new H2(l,f,h,w,u,p),this.cache[t]))},r.prototype.encode=function(t,e,n){var a,i,f,l,u;for(f=[],i=[],l=0,u=e.length;l<u;l++)a=t[e[l]],i.push(f.length),a&&(f=f.concat(a.encode(n)));return i.push(f.length),{table:f,offsets:i}},r})(),H2=(function(){function r(t,e,n,a,i,f){this.raw=t,this.numberOfContours=e,this.xMin=n,this.yMin=a,this.xMax=i,this.yMax=f,this.compound=!1}return r.prototype.encode=function(){return this.raw.data},r})(),W2=(function(){function r(t,e,n,a,i){var f,l;for(this.raw=t,this.xMin=e,this.yMin=n,this.xMax=a,this.yMax=i,this.compound=!0,this.glyphIDs=[],this.glyphOffsets=[],f=this.raw;l=f.readShort(),this.glyphOffsets.push(f.pos),this.glyphIDs.push(f.readUInt16()),32&l;)f.pos+=1&l?4:2,128&l?f.pos+=8:64&l?f.pos+=4:8&l&&(f.pos+=2)}return r.prototype.encode=function(){var t,e,n;for(e=new ni(oh.call(this.raw.data)),t=0,n=this.glyphIDs.length;t<n;++t)e.pos=this.glyphOffsets[t];return e.data},r})(),G2=(function(){function r(){return r.__super__.constructor.apply(this,arguments)}return pn(r,tn),r.prototype.tag="loca",r.prototype.parse=function(t){var e,n;return t.pos=this.offset,e=this.file.head.indexToLocFormat,this.offsets=e===0?(function(){var a,i;for(i=[],n=0,a=this.length;n<a;n+=2)i.push(2*t.readUInt16());return i}).call(this):(function(){var a,i;for(i=[],n=0,a=this.length;n<a;n+=4)i.push(t.readUInt32());return i}).call(this)},r.prototype.indexOf=function(t){return this.offsets[t]},r.prototype.lengthOf=function(t){return this.offsets[t+1]-this.offsets[t]},r.prototype.encode=function(t,e){for(var n=new Uint32Array(this.offsets.length),a=0,i=0,f=0;f<n.length;++f)if(n[f]=a,i<e.length&&e[i]==f){++i,n[f]=a;var l=this.offsets[f],u=this.offsets[f+1]-l;u>0&&(a+=u)}for(var h=new Array(4*n.length),p=0;p<n.length;++p)h[4*p+3]=255&n[p],h[4*p+2]=(65280&n[p])>>8,h[4*p+1]=(16711680&n[p])>>16,h[4*p]=(4278190080&n[p])>>24;return h},r})(),V2=(function(){function r(t){this.font=t,this.subset={},this.unicodes={},this.next=33}return r.prototype.generateCmap=function(){var t,e,n,a,i;for(e in a=this.font.cmap.tables[0].codeMap,t={},i=this.subset)n=i[e],t[e]=a[n];return t},r.prototype.glyphsFor=function(t){var e,n,a,i,f,l,u;for(a={},f=0,l=t.length;f<l;f++)a[i=t[f]]=this.font.glyf.glyphFor(i);for(i in e=[],a)(n=a[i])!=null&&n.compound&&e.push.apply(e,n.glyphIDs);if(e.length>0)for(i in u=this.glyphsFor(e))n=u[i],a[i]=n;return a},r.prototype.encode=function(t,e){var n,a,i,f,l,u,h,p,w,x,g,P,C,B,S;for(a in n=ah.encode(this.generateCmap(),"unicode"),f=this.glyphsFor(t),g={0:0},S=n.charMap)g[(u=S[a]).old]=u.new;for(P in x=n.maxGlyphID,f)P in g||(g[P]=x++);return p=(function(G){var V,M;for(V in M={},G)M[G[V]]=V;return M})(g),w=Object.keys(p).sort(function(G,V){return G-V}),C=(function(){var G,V,M;for(M=[],G=0,V=w.length;G<V;G++)l=w[G],M.push(p[l]);return M})(),i=this.font.glyf.encode(f,C,g),h=this.font.loca.encode(i.offsets,C),B={cmap:this.font.cmap.raw(),glyf:i.table,loca:h,hmtx:this.font.hmtx.raw(),hhea:this.font.hhea.raw(),maxp:this.font.maxp.raw(),post:this.font.post.raw(),name:this.font.name.raw(),head:this.font.head.encode(e)},this.font.os2.exists&&(B["OS/2"]=this.font.os2.raw()),this.font.directory.encode(B)},r})();Rt.API.PDFObject=(function(){var r;function t(){}return r=function(e,n){return(Array(n+1).join("0")+e).slice(-n)},t.convert=function(e){var n,a,i,f;if(Array.isArray(e))return"["+(function(){var l,u,h;for(h=[],l=0,u=e.length;l<u;l++)n=e[l],h.push(t.convert(n));return h})().join(" ")+"]";if(typeof e=="string")return"/"+e;if(e?.isString)return"("+e+")";if(e instanceof Date)return"(D:"+r(e.getUTCFullYear(),4)+r(e.getUTCMonth(),2)+r(e.getUTCDate(),2)+r(e.getUTCHours(),2)+r(e.getUTCMinutes(),2)+r(e.getUTCSeconds(),2)+"Z)";if({}.toString.call(e)==="[object Object]"){for(a in i=["<<"],e)f=e[a],i.push("/"+a+" "+t.convert(f));return i.push(">>"),i.join(`
|
|
78
78
|
`)}return""+e},t})();function sh(r,t,e,n,a){n=n||{};var i=1.15,f=a.internal.scaleFactor,l=a.internal.getFontSize()/f,u=a.getLineHeightFactor?a.getLineHeightFactor():i,h=l*u,p=/\r\n|\r|\n/g,w="",x=1;if((n.valign==="middle"||n.valign==="bottom"||n.halign==="center"||n.halign==="right")&&(w=typeof r=="string"?r.split(p):r,x=w.length||1),e+=l*(2-i),n.valign==="middle"?e-=x/2*h:n.valign==="bottom"&&(e-=x*h),n.halign==="center"||n.halign==="right"){var g=l;if(n.halign==="center"&&(g*=.5),w&&x>=1){for(var P=0;P<w.length;P++)a.text(w[P],t-a.getStringUnitWidth(w[P])*g,e),e+=h;return a}t-=a.getStringUnitWidth(r)*g}return n.halign==="justify"?a.text(r,t,e,{maxWidth:n.maxWidth||100,align:"justify"}):a.text(r,t,e),a}var uf={},Zi=(function(){function r(t){this.jsPDFDocument=t,this.userStyles={textColor:t.getTextColor?this.jsPDFDocument.getTextColor():0,fontSize:t.internal.getFontSize(),fontStyle:t.internal.getFont().fontStyle,font:t.internal.getFont().fontName,lineWidth:t.getLineWidth?this.jsPDFDocument.getLineWidth():0,lineColor:t.getDrawColor?this.jsPDFDocument.getDrawColor():0}}return r.setDefaults=function(t,e){e===void 0&&(e=null),e?e.__autoTableDocumentDefaults=t:uf=t},r.unifyColor=function(t){return Array.isArray(t)?t:typeof t=="number"?[t,t,t]:typeof t=="string"?[t]:null},r.prototype.applyStyles=function(t,e){var n,a,i;e===void 0&&(e=!1),t.fontStyle&&this.jsPDFDocument.setFontStyle&&this.jsPDFDocument.setFontStyle(t.fontStyle);var f=this.jsPDFDocument.internal.getFont(),l=f.fontStyle,u=f.fontName;if(t.font&&(u=t.font),t.fontStyle){l=t.fontStyle;var h=this.getFontList()[u];h&&h.indexOf(l)===-1&&this.jsPDFDocument.setFontStyle&&(this.jsPDFDocument.setFontStyle(h[0]),l=h[0])}if(this.jsPDFDocument.setFont(u,l),t.fontSize&&this.jsPDFDocument.setFontSize(t.fontSize),!e){var p=r.unifyColor(t.fillColor);p&&(n=this.jsPDFDocument).setFillColor.apply(n,p),p=r.unifyColor(t.textColor),p&&(a=this.jsPDFDocument).setTextColor.apply(a,p),p=r.unifyColor(t.lineColor),p&&(i=this.jsPDFDocument).setDrawColor.apply(i,p),typeof t.lineWidth=="number"&&this.jsPDFDocument.setLineWidth(t.lineWidth)}},r.prototype.splitTextToSize=function(t,e,n){return this.jsPDFDocument.splitTextToSize(t,e,n)},r.prototype.rect=function(t,e,n,a,i){return this.jsPDFDocument.rect(t,e,n,a,i)},r.prototype.getLastAutoTable=function(){return this.jsPDFDocument.lastAutoTable||null},r.prototype.getTextWidth=function(t){return this.jsPDFDocument.getTextWidth(t)},r.prototype.getDocument=function(){return this.jsPDFDocument},r.prototype.setPage=function(t){this.jsPDFDocument.setPage(t)},r.prototype.addPage=function(){return this.jsPDFDocument.addPage()},r.prototype.getFontList=function(){return this.jsPDFDocument.getFontList()},r.prototype.getGlobalOptions=function(){return uf||{}},r.prototype.getDocumentOptions=function(){return this.jsPDFDocument.__autoTableDocumentDefaults||{}},r.prototype.pageSize=function(){var t=this.jsPDFDocument.internal.pageSize;return t.width==null&&(t={width:t.getWidth(),height:t.getHeight()}),t},r.prototype.scaleFactor=function(){return this.jsPDFDocument.internal.scaleFactor},r.prototype.getLineHeightFactor=function(){var t=this.jsPDFDocument;return t.getLineHeightFactor?t.getLineHeightFactor():1.15},r.prototype.getLineHeight=function(t){return t/this.scaleFactor()*this.getLineHeightFactor()},r.prototype.pageNumber=function(){var t=this.jsPDFDocument.internal.getCurrentPageInfo();return t?t.pageNumber:this.jsPDFDocument.internal.getNumberOfPages()},r})(),nl=function(r,t){return nl=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])},nl(r,t)};function lh(r,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");nl(r,t);function e(){this.constructor=r}r.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}var uh=(function(r){lh(t,r);function t(e){var n=r.call(this)||this;return n._element=e,n}return t})(Array);function Y2(r){return{font:"helvetica",fontStyle:"normal",overflow:"linebreak",fillColor:!1,textColor:20,halign:"left",valign:"top",fontSize:10,cellPadding:5/r,lineColor:200,lineWidth:0,cellWidth:"auto",minCellHeight:0,minCellWidth:0}}function J2(r){var t={striped:{table:{fillColor:255,textColor:80,fontStyle:"normal"},head:{textColor:255,fillColor:[41,128,185],fontStyle:"bold"},body:{},foot:{textColor:255,fillColor:[41,128,185],fontStyle:"bold"},alternateRow:{fillColor:245}},grid:{table:{fillColor:255,textColor:80,fontStyle:"normal",lineWidth:.1},head:{textColor:255,fillColor:[26,188,156],fontStyle:"bold",lineWidth:0},body:{},foot:{textColor:255,fillColor:[26,188,156],fontStyle:"bold",lineWidth:0},alternateRow:{}},plain:{head:{fontStyle:"bold"},foot:{fontStyle:"bold"}}};return t[r]}function To(r,t,e){e.applyStyles(t,!0);var n=Array.isArray(r)?r:[r],a=n.map(function(i){return e.getTextWidth(i)}).reduce(function(i,f){return Math.max(i,f)},0);return a}function fh(r,t,e,n){var a=t.settings.tableLineWidth,i=t.settings.tableLineColor;r.applyStyles({lineWidth:a,lineColor:i});var f=hh(a,!1);f&&r.rect(e.x,e.y,t.getWidth(r.pageSize().width),n.y-e.y,f)}function hh(r,t){var e=r>0,n=t||t===0;return e&&n?"DF":e?"S":n?"F":null}function zo(r,t){var e,n,a,i;if(r=r||t,Array.isArray(r)){if(r.length>=4)return{top:r[0],right:r[1],bottom:r[2],left:r[3]};if(r.length===3)return{top:r[0],right:r[1],bottom:r[2],left:r[1]};if(r.length===2)return{top:r[0],right:r[1],bottom:r[0],left:r[1]};r.length===1?r=r[0]:r=t}return typeof r=="object"?(typeof r.vertical=="number"&&(r.top=r.vertical,r.bottom=r.vertical),typeof r.horizontal=="number"&&(r.right=r.horizontal,r.left=r.horizontal),{left:(e=r.left)!==null&&e!==void 0?e:t,top:(n=r.top)!==null&&n!==void 0?n:t,right:(a=r.right)!==null&&a!==void 0?a:t,bottom:(i=r.bottom)!==null&&i!==void 0?i:t}):(typeof r!="number"&&(r=t),{top:r,right:r,bottom:r,left:r})}function ch(r,t){var e=zo(t.settings.margin,0);return r.pageSize().width-(e.left+e.right)}function K2(r,t,e,n,a){var i={},f=1.3333333333333333,l=zs(t,function(V){return a.getComputedStyle(V).backgroundColor});l!=null&&(i.fillColor=l);var u=zs(t,function(V){return a.getComputedStyle(V).color});u!=null&&(i.textColor=u);var h=X2(n,e);h&&(i.cellPadding=h);var p="borderTopColor",w=f*e,x=n.borderTopWidth;if(n.borderBottomWidth===x&&n.borderRightWidth===x&&n.borderLeftWidth===x){var g=(parseFloat(x)||0)/w;g&&(i.lineWidth=g)}else i.lineWidth={top:(parseFloat(n.borderTopWidth)||0)/w,right:(parseFloat(n.borderRightWidth)||0)/w,bottom:(parseFloat(n.borderBottomWidth)||0)/w,left:(parseFloat(n.borderLeftWidth)||0)/w},i.lineWidth.top||(i.lineWidth.right?p="borderRightColor":i.lineWidth.bottom?p="borderBottomColor":i.lineWidth.left&&(p="borderLeftColor"));var P=zs(t,function(V){return a.getComputedStyle(V)[p]});P!=null&&(i.lineColor=P);var C=["left","right","center","justify"];C.indexOf(n.textAlign)!==-1&&(i.halign=n.textAlign),C=["middle","bottom","top"],C.indexOf(n.verticalAlign)!==-1&&(i.valign=n.verticalAlign);var B=parseInt(n.fontSize||"");isNaN(B)||(i.fontSize=B/f);var S=$2(n);S&&(i.fontStyle=S);var G=(n.fontFamily||"").toLowerCase();return r.indexOf(G)!==-1&&(i.font=G),i}function $2(r){var t="";return(r.fontWeight==="bold"||r.fontWeight==="bolder"||parseInt(r.fontWeight)>=700)&&(t="bold"),(r.fontStyle==="italic"||r.fontStyle==="oblique")&&(t+="italic"),t}function zs(r,t){var e=dh(r,t);if(!e)return null;var n=e.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d*\.?\d*))?\)$/);if(!n||!Array.isArray(n))return null;var a=[parseInt(n[1]),parseInt(n[2]),parseInt(n[3])],i=parseInt(n[4]);return i===0||isNaN(a[0])||isNaN(a[1])||isNaN(a[2])?null:a}function dh(r,t){var e=t(r);return e==="rgba(0, 0, 0, 0)"||e==="transparent"||e==="initial"||e==="inherit"?r.parentElement==null?null:dh(r.parentElement,t):e}function X2(r,t){var e=[r.paddingTop,r.paddingRight,r.paddingBottom,r.paddingLeft],n=96/(72/t),a=(parseInt(r.lineHeight)-parseInt(r.fontSize))/t/2,i=e.map(function(l){return parseInt(l||"0")/n}),f=zo(i,0);return a>f.top&&(f.top=a),a>f.bottom&&(f.bottom=a),f}function ph(r,t,e,n,a){var i,f;n===void 0&&(n=!1),a===void 0&&(a=!1);var l;typeof t=="string"?l=e.document.querySelector(t):l=t;var u=Object.keys(r.getFontList()),h=r.scaleFactor(),p=[],w=[],x=[];if(!l)return console.error("Html table could not be found with input: ",t),{head:p,body:w,foot:x};for(var g=0;g<l.rows.length;g++){var P=l.rows[g],C=(f=(i=P?.parentElement)===null||i===void 0?void 0:i.tagName)===null||f===void 0?void 0:f.toLowerCase(),B=Z2(u,h,e,P,n,a);B&&(C==="thead"?p.push(B):C==="tfoot"?x.push(B):w.push(B))}return{head:p,body:w,foot:x}}function Z2(r,t,e,n,a,i){for(var f=new uh(n),l=0;l<n.cells.length;l++){var u=n.cells[l],h=e.getComputedStyle(u);if(a||h.display!=="none"){var p=void 0;i&&(p=K2(r,u,t,h,e)),f.push({rowSpan:u.rowSpan,colSpan:u.colSpan,styles:p,_element:u,content:Q2(u)})}}var w=e.getComputedStyle(n);if(f.length>0&&(a||w.display!=="none"))return f}function Q2(r){var t=r.cloneNode(!0);return t.innerHTML=t.innerHTML.replace(/\n/g,"").replace(/ +/g," "),t.innerHTML=t.innerHTML.split(/<br.*?>/).map(function(e){return e.trim()}).join(`
|
|
79
|
-
`),t.innerText||t.textContent||""}function t5(r,t,e){for(var n=0,a=[r,t,e];n<a.length;n++){var i=a[n];i&&typeof i!="object"&&console.error("The options parameter should be of type object, is: "+typeof i),i.startY&&typeof i.startY!="number"&&(console.error("Invalid value for startY option",i.startY),delete i.startY)}}function Dn(r,t,e,n,a){if(r==null)throw new TypeError("Cannot convert undefined or null to object");for(var i=Object(r),f=1;f<arguments.length;f++){var l=arguments[f];if(l!=null)for(var u in l)Object.prototype.hasOwnProperty.call(l,u)&&(i[u]=l[u])}return i}function gh(r,t){var e=new Zi(r),n=e.getDocumentOptions(),a=e.getGlobalOptions();t5(a,n,t);var i=Dn({},a,n,t),f;typeof window<"u"&&(f=window);var l=e5(a,n,t),u=r5(a,n,t),h=n5(e,i),p=a5(e,i,f);return{id:t.tableId,content:p,hooks:u,styles:l,settings:h}}function e5(r,t,e){for(var n={styles:{},headStyles:{},bodyStyles:{},footStyles:{},alternateRowStyles:{},columnStyles:{}},a=function(u){if(u==="columnStyles"){var h=r[u],p=t[u],w=e[u];n.columnStyles=Dn({},h,p,w)}else{var x=[r,t,e],g=x.map(function(P){return P[u]||{}});n[u]=Dn({},g[0],g[1],g[2])}},i=0,f=Object.keys(n);i<f.length;i++){var l=f[i];a(l)}return n}function r5(r,t,e){for(var n=[r,t,e],a={didParseCell:[],willDrawCell:[],didDrawCell:[],willDrawPage:[],didDrawPage:[]},i=0,f=n;i<f.length;i++){var l=f[i];l.didParseCell&&a.didParseCell.push(l.didParseCell),l.willDrawCell&&a.willDrawCell.push(l.willDrawCell),l.didDrawCell&&a.didDrawCell.push(l.didDrawCell),l.willDrawPage&&a.willDrawPage.push(l.willDrawPage),l.didDrawPage&&a.didDrawPage.push(l.didDrawPage)}return a}function n5(r,t){var e,n,a,i,f,l,u,h,p,w,x,g,P=zo(t.margin,40/r.scaleFactor()),C=(e=i5(r,t.startY))!==null&&e!==void 0?e:P.top,B;t.showFoot===!0?B="everyPage":t.showFoot===!1?B="never":B=(n=t.showFoot)!==null&&n!==void 0?n:"everyPage";var S;t.showHead===!0?S="everyPage":t.showHead===!1?S="never":S=(a=t.showHead)!==null&&a!==void 0?a:"everyPage";var G=(i=t.useCss)!==null&&i!==void 0?i:!1,V=t.theme||(G?"plain":"striped"),M=!!t.horizontalPageBreak,it=(f=t.horizontalPageBreakRepeat)!==null&&f!==void 0?f:null;return{includeHiddenHtml:(l=t.includeHiddenHtml)!==null&&l!==void 0?l:!1,useCss:G,theme:V,startY:C,margin:P,pageBreak:(u=t.pageBreak)!==null&&u!==void 0?u:"auto",rowPageBreak:(h=t.rowPageBreak)!==null&&h!==void 0?h:"auto",tableWidth:(p=t.tableWidth)!==null&&p!==void 0?p:"auto",showHead:S,showFoot:B,tableLineWidth:(w=t.tableLineWidth)!==null&&w!==void 0?w:0,tableLineColor:(x=t.tableLineColor)!==null&&x!==void 0?x:200,horizontalPageBreak:M,horizontalPageBreakRepeat:it,horizontalPageBreakBehaviour:(g=t.horizontalPageBreakBehaviour)!==null&&g!==void 0?g:"afterAllRows"}}function i5(r,t){var e=r.getLastAutoTable(),n=r.scaleFactor(),a=r.pageNumber(),i=!1;if(e&&e.startPageNumber){var f=e.startPageNumber+e.pageNumber-1;i=f===a}return typeof t=="number"?t:(t==null||t===!1)&&i&&e?.finalY!=null?e.finalY+20/n:null}function a5(r,t,e){var n=t.head||[],a=t.body||[],i=t.foot||[];if(t.html){var f=t.includeHiddenHtml;if(e){var l=ph(r,t.html,e,f,t.useCss)||{};n=l.head||n,a=l.body||n,i=l.foot||n}else console.error("Cannot parse html in non browser environment")}var u=t.columns||o5(n,a,i);return{columns:u,head:n,body:a,foot:i}}function o5(r,t,e){var n=r[0]||t[0]||e[0]||[],a=[];return Object.keys(n).filter(function(i){return i!=="_element"}).forEach(function(i){var f=1,l;Array.isArray(n)?l=n[parseInt(i)]:l=n[i],typeof l=="object"&&!Array.isArray(l)&&(f=l?.colSpan||1);for(var u=0;u<f;u++){var h=void 0;Array.isArray(n)?h=a.length:h=i+(u>0?"_".concat(u):"");var p={dataKey:h};a.push(p)}}),a}var il=(function(){function r(t,e,n){this.table=e,this.pageNumber=e.pageNumber,this.settings=e.settings,this.cursor=n,this.doc=t.getDocument()}return r})(),s5=(function(r){lh(t,r);function t(e,n,a,i,f,l){var u=r.call(this,e,n,l)||this;return u.cell=a,u.row=i,u.column=f,u.section=i.section,u}return t})(il),l5=(function(){function r(t,e){this.pageNumber=1,this.id=t.id,this.settings=t.settings,this.styles=t.styles,this.hooks=t.hooks,this.columns=e.columns,this.head=e.head,this.body=e.body,this.foot=e.foot}return r.prototype.getHeadHeight=function(t){return this.head.reduce(function(e,n){return e+n.getMaxCellHeight(t)},0)},r.prototype.getFootHeight=function(t){return this.foot.reduce(function(e,n){return e+n.getMaxCellHeight(t)},0)},r.prototype.allRows=function(){return this.head.concat(this.body).concat(this.foot)},r.prototype.callCellHooks=function(t,e,n,a,i,f){for(var l=0,u=e;l<u.length;l++){var h=u[l],p=new s5(t,this,n,a,i,f),w=h(p)===!1;if(n.text=Array.isArray(n.text)?n.text:[n.text],w)return!1}return!0},r.prototype.callEndPageHooks=function(t,e){t.applyStyles(t.userStyles);for(var n=0,a=this.hooks.didDrawPage;n<a.length;n++){var i=a[n];i(new il(t,this,e))}},r.prototype.callWillDrawPageHooks=function(t,e){for(var n=0,a=this.hooks.willDrawPage;n<a.length;n++){var i=a[n];i(new il(t,this,e))}},r.prototype.getWidth=function(t){if(typeof this.settings.tableWidth=="number")return this.settings.tableWidth;if(this.settings.tableWidth==="wrap"){var e=this.columns.reduce(function(a,i){return a+i.wrappedWidth},0);return e}else{var n=this.settings.margin;return t-n.left-n.right}},r})(),vh=(function(){function r(t,e,n,a,i){i===void 0&&(i=!1),this.height=0,this.raw=t,t instanceof uh&&(this.raw=t._element,this.element=t._element),this.index=e,this.section=n,this.cells=a,this.spansMultiplePages=i}return r.prototype.getMaxCellHeight=function(t){var e=this;return t.reduce(function(n,a){var i;return Math.max(n,((i=e.cells[a.index])===null||i===void 0?void 0:i.height)||0)},0)},r.prototype.hasRowSpan=function(t){var e=this;return t.filter(function(n){var a=e.cells[n.index];return a?a.rowSpan>1:!1}).length>0},r.prototype.canEntireRowFit=function(t,e){return this.getMaxCellHeight(e)<=t},r.prototype.getMinimumRowHeight=function(t,e){var n=this;return t.reduce(function(a,i){var f=n.cells[i.index];if(!f)return 0;var l=e.getLineHeight(f.styles.fontSize),u=f.padding("vertical"),h=u+l;return h>a?h:a},0)},r})(),mh=(function(){function r(t,e,n){var a;this.contentHeight=0,this.contentWidth=0,this.wrappedWidth=0,this.minReadableWidth=0,this.minWidth=0,this.width=0,this.height=0,this.x=0,this.y=0,this.styles=e,this.section=n,this.raw=t;var i=t;t!=null&&typeof t=="object"&&!Array.isArray(t)?(this.rowSpan=t.rowSpan||1,this.colSpan=t.colSpan||1,i=(a=t.content)!==null&&a!==void 0?a:t,t._element&&(this.raw=t._element)):(this.rowSpan=1,this.colSpan=1);var f=i!=null?""+i:"",l=/\r\n|\r|\n/g;this.text=f.split(l)}return r.prototype.getTextPos=function(){var t;if(this.styles.valign==="top")t=this.y+this.padding("top");else if(this.styles.valign==="bottom")t=this.y+this.height-this.padding("bottom");else{var e=this.height-this.padding("vertical");t=this.y+e/2+this.padding("top")}var n;if(this.styles.halign==="right")n=this.x+this.width-this.padding("right");else if(this.styles.halign==="center"){var a=this.width-this.padding("horizontal");n=this.x+a/2+this.padding("left")}else n=this.x+this.padding("left");return{x:n,y:t}},r.prototype.getContentHeight=function(t,e){e===void 0&&(e=1.15);var n=Array.isArray(this.text)?this.text.length:1,a=this.styles.fontSize/t*e,i=n*a+this.padding("vertical");return Math.max(i,this.styles.minCellHeight)},r.prototype.padding=function(t){var e=zo(this.styles.cellPadding,0);return t==="vertical"?e.top+e.bottom:t==="horizontal"?e.left+e.right:e[t]},r})(),u5=(function(){function r(t,e,n){this.wrappedWidth=0,this.minReadableWidth=0,this.minWidth=0,this.width=0,this.dataKey=t,this.raw=e,this.index=n}return r.prototype.getMaxCustomCellWidth=function(t){for(var e=0,n=0,a=t.allRows();n<a.length;n++){var i=a[n],f=i.cells[this.index];f&&typeof f.styles.cellWidth=="number"&&(e=Math.max(e,f.styles.cellWidth))}return e},r})();function f5(r,t){h5(r,t);var e=[],n=0;t.columns.forEach(function(i){var f=i.getMaxCustomCellWidth(t);f?i.width=f:(i.width=i.wrappedWidth,e.push(i)),n+=i.width});var a=t.getWidth(r.pageSize().width)-n;a&&(a=al(e,a,function(i){return Math.max(i.minReadableWidth,i.minWidth)})),a&&(a=al(e,a,function(i){return i.minWidth})),a=Math.abs(a),!t.settings.horizontalPageBreak&&a>.1/r.scaleFactor()&&(a=a<1?a:Math.round(a),console.warn("Of the table content, ".concat(a," units width could not fit page"))),d5(t),p5(t,r),c5(t)}function h5(r,t){var e=r.scaleFactor(),n=t.settings.horizontalPageBreak,a=ch(r,t);t.allRows().forEach(function(i){for(var f=0,l=t.columns;f<l.length;f++){var u=l[f],h=i.cells[u.index];if(h){var p=t.hooks.didParseCell;t.callCellHooks(r,p,h,i,u,null);var w=h.padding("horizontal");h.contentWidth=To(h.text,h.styles,r)+w;var x=To(h.text.join(" ").split(/[^\S\u00A0]+/),h.styles,r);if(h.minReadableWidth=x+h.padding("horizontal"),typeof h.styles.cellWidth=="number")h.minWidth=h.styles.cellWidth,h.wrappedWidth=h.styles.cellWidth;else if(h.styles.cellWidth==="wrap"||n===!0)h.contentWidth>a?(h.minWidth=a,h.wrappedWidth=a):(h.minWidth=h.contentWidth,h.wrappedWidth=h.contentWidth);else{var g=10/e;h.minWidth=h.styles.minCellWidth||g,h.wrappedWidth=h.contentWidth,h.minWidth>h.wrappedWidth&&(h.wrappedWidth=h.minWidth)}}}}),t.allRows().forEach(function(i){for(var f=0,l=t.columns;f<l.length;f++){var u=l[f],h=i.cells[u.index];if(h&&h.colSpan===1)u.wrappedWidth=Math.max(u.wrappedWidth,h.wrappedWidth),u.minWidth=Math.max(u.minWidth,h.minWidth),u.minReadableWidth=Math.max(u.minReadableWidth,h.minReadableWidth);else{var p=t.styles.columnStyles[u.dataKey]||t.styles.columnStyles[u.index]||{},w=p.cellWidth||p.minCellWidth;w&&typeof w=="number"&&(u.minWidth=w,u.wrappedWidth=w)}h&&(h.colSpan>1&&!u.minWidth&&(u.minWidth=h.minWidth),h.colSpan>1&&!u.wrappedWidth&&(u.wrappedWidth=h.minWidth))}})}function al(r,t,e){for(var n=t,a=r.reduce(function(g,P){return g+P.wrappedWidth},0),i=0;i<r.length;i++){var f=r[i],l=f.wrappedWidth/a,u=n*l,h=f.width+u,p=e(f),w=h<p?p:h;t-=w-f.width,f.width=w}if(t=Math.round(t*1e10)/1e10,t){var x=r.filter(function(g){return t<0?g.width>e(g):!0});x.length&&(t=al(x,t,e))}return t}function c5(r){for(var t={},e=1,n=r.allRows(),a=0;a<n.length;a++)for(var i=n[a],f=0,l=r.columns;f<l.length;f++){var u=l[f],h=t[u.index];if(e>1)e--,delete i.cells[u.index];else if(h)h.cell.height+=i.height,e=h.cell.colSpan,delete i.cells[u.index],h.left--,h.left<=1&&delete t[u.index];else{var p=i.cells[u.index];if(!p)continue;if(p.height=i.height,p.rowSpan>1){var w=n.length-a,x=p.rowSpan>w?w:p.rowSpan;t[u.index]={cell:p,left:x,row:i}}}}}function d5(r){for(var t=r.allRows(),e=0;e<t.length;e++)for(var n=t[e],a=null,i=0,f=0,l=0;l<r.columns.length;l++){var u=r.columns[l];if(f-=1,f>1&&r.columns[l+1])i+=u.width,delete n.cells[u.index];else if(a){var h=a;delete n.cells[u.index],a=null,h.width=u.width+i}else{var h=n.cells[u.index];if(!h)continue;if(f=h.colSpan,i=0,h.colSpan>1){a=h,i+=u.width;continue}h.width=u.width+i}}}function p5(r,t){for(var e={count:0,height:0},n=0,a=r.allRows();n<a.length;n++){for(var i=a[n],f=0,l=r.columns;f<l.length;f++){var u=l[f],h=i.cells[u.index];if(h){t.applyStyles(h.styles,!0);var p=h.width-h.padding("horizontal");if(h.styles.overflow==="linebreak")h.text=t.splitTextToSize(h.text,p+1/t.scaleFactor(),{fontSize:h.styles.fontSize});else if(h.styles.overflow==="ellipsize")h.text=ff(h.text,p,h.styles,t,"...");else if(h.styles.overflow==="hidden")h.text=ff(h.text,p,h.styles,t,"");else if(typeof h.styles.overflow=="function"){var w=h.styles.overflow(h.text,p);typeof w=="string"?h.text=[w]:h.text=w}h.contentHeight=h.getContentHeight(t.scaleFactor(),t.getLineHeightFactor());var x=h.contentHeight/h.rowSpan;h.rowSpan>1&&e.count*e.height<x*h.rowSpan?e={height:x,count:h.rowSpan}:e&&e.count>0&&e.height>x&&(x=e.height),x>i.height&&(i.height=x)}}e.count--}}function ff(r,t,e,n,a){return r.map(function(i){return g5(i,t,e,n,a)})}function g5(r,t,e,n,a){var i=1e4*n.scaleFactor();if(t=Math.ceil(t*i)/i,t>=To(r,e,n))return r;for(;t<To(r+a,e,n)&&!(r.length<=1);)r=r.substring(0,r.length-1);return r.trim()+a}function bh(r,t){var e=new Zi(r),n=v5(t,e.scaleFactor()),a=new l5(t,n);return f5(e,a),e.applyStyles(e.userStyles),a}function v5(r,t){var e=r.content,n=b5(e.columns);if(e.head.length===0){var a=hf(n,"head");a&&e.head.push(a)}if(e.foot.length===0){var a=hf(n,"foot");a&&e.foot.push(a)}var i=r.settings.theme,f=r.styles;return{columns:n,head:Hs("head",e.head,n,f,i,t),body:Hs("body",e.body,n,f,i,t),foot:Hs("foot",e.foot,n,f,i,t)}}function Hs(r,t,e,n,a,i){var f={},l=t.map(function(u,h){for(var p=0,w={},x=0,g=0,P=0,C=e;P<C.length;P++){var B=C[P];if(f[B.index]==null||f[B.index].left===0)if(g===0){var S=void 0;Array.isArray(u)?S=u[B.index-x-p]:S=u[B.dataKey];var G={};typeof S=="object"&&!Array.isArray(S)&&(G=S?.styles||{});var V=w5(r,B,h,a,n,i,G),M=new mh(S,V,r);w[B.dataKey]=M,w[B.index]=M,g=M.colSpan-1,f[B.index]={left:M.rowSpan-1,times:g}}else g--,x++;else f[B.index].left--,g=f[B.index].times,p++}return new vh(u,h,r,w)});return l}function hf(r,t){var e={};return r.forEach(function(n){if(n.raw!=null){var a=m5(t,n.raw);a!=null&&(e[n.dataKey]=a)}}),Object.keys(e).length>0?e:null}function m5(r,t){if(r==="head"){if(typeof t=="object")return t.header||null;if(typeof t=="string"||typeof t=="number")return t}else if(r==="foot"&&typeof t=="object")return t.footer;return null}function b5(r){return r.map(function(t,e){var n,a;return typeof t=="object"?a=(n=t.dataKey)!==null&&n!==void 0?n:e:a=e,new u5(a,t,e)})}function w5(r,t,e,n,a,i,f){var l=J2(n),u;r==="head"?u=a.headStyles:r==="body"?u=a.bodyStyles:r==="foot"&&(u=a.footStyles);var h=Dn({},l.table,l[r],a.styles,u),p=a.columnStyles[t.dataKey]||a.columnStyles[t.index]||{},w=r==="body"?p:{},x=r==="body"&&e%2===0?Dn({},l.alternateRow,a.alternateRowStyles):{},g=Y2(i),P=Dn({},g,h,x,w);return Dn(P,f)}function y5(r,t,e){var n;e===void 0&&(e={});var a=ch(r,t),i=new Map,f=[],l=[],u=[];Array.isArray(t.settings.horizontalPageBreakRepeat)?u=t.settings.horizontalPageBreakRepeat:(typeof t.settings.horizontalPageBreakRepeat=="string"||typeof t.settings.horizontalPageBreakRepeat=="number")&&(u=[t.settings.horizontalPageBreakRepeat]),u.forEach(function(x){var g=t.columns.find(function(P){return P.dataKey===x||P.index===x});g&&!i.has(g.index)&&(i.set(g.index,!0),f.push(g.index),l.push(t.columns[g.index]),a-=g.wrappedWidth)});for(var h=!0,p=(n=e?.start)!==null&&n!==void 0?n:0;p<t.columns.length;){if(i.has(p)){p++;continue}var w=t.columns[p].wrappedWidth;if(h||a>=w)h=!1,f.push(p),l.push(t.columns[p]),a-=w;else break;p++}return{colIndexes:f,columns:l,lastIndex:p-1}}function x5(r,t){for(var e=[],n=0;n<t.columns.length;n++){var a=y5(r,t,{start:n});a.columns.length&&(e.push(a),n=a.lastIndex)}return e}function wh(r,t){var e=t.settings,n=e.startY,a=e.margin,i={x:a.left,y:n},f=t.getHeadHeight(t.columns)+t.getFootHeight(t.columns),l=n+a.bottom+f;if(e.pageBreak==="avoid"){var u=t.body,h=u.reduce(function(x,g){return x+g.height},0);l+=h}var p=new Zi(r);(e.pageBreak==="always"||e.startY!=null&&l>p.pageSize().height)&&(xh(p),i.y=a.top),t.callWillDrawPageHooks(p,i);var w=Dn({},i);t.startPageNumber=p.pageNumber(),e.horizontalPageBreak?A5(p,t,w,i):(p.applyStyles(p.userStyles),(e.showHead==="firstPage"||e.showHead==="everyPage")&&t.head.forEach(function(x){return Rn(p,t,x,i,t.columns)}),p.applyStyles(p.userStyles),t.body.forEach(function(x,g){var P=g===t.body.length-1;Mo(p,t,x,P,w,i,t.columns)}),p.applyStyles(p.userStyles),(e.showFoot==="lastPage"||e.showFoot==="everyPage")&&t.foot.forEach(function(x){return Rn(p,t,x,i,t.columns)})),fh(p,t,w,i),t.callEndPageHooks(p,i),t.finalY=i.y,r.lastAutoTable=t,p.applyStyles(p.userStyles)}function A5(r,t,e,n){var a=x5(r,t),i=t.settings;if(i.horizontalPageBreakBehaviour==="afterAllRows")a.forEach(function(h,p){r.applyStyles(r.userStyles),p>0?Ea(r,t,e,n,h.columns,!0):cf(r,t,n,h.columns),_5(r,t,e,n,h.columns),Ws(r,t,n,h.columns)});else for(var f=-1,l=a[0],u=function(){var h=f;if(l){r.applyStyles(r.userStyles);var p=l.columns;f>=0?Ea(r,t,e,n,p,!0):cf(r,t,n,p),h=df(r,t,f+1,n,p),Ws(r,t,n,p)}var w=h-f;a.slice(1).forEach(function(x){r.applyStyles(r.userStyles),Ea(r,t,e,n,x.columns,!0),df(r,t,f+1,n,x.columns,w),Ws(r,t,n,x.columns)}),f=h};f<t.body.length-1;)u()}function cf(r,t,e,n){var a=t.settings;r.applyStyles(r.userStyles),(a.showHead==="firstPage"||a.showHead==="everyPage")&&t.head.forEach(function(i){return Rn(r,t,i,e,n)})}function _5(r,t,e,n,a){r.applyStyles(r.userStyles),t.body.forEach(function(i,f){var l=f===t.body.length-1;Mo(r,t,i,l,e,n,a)})}function df(r,t,e,n,a,i){r.applyStyles(r.userStyles),i=i??t.body.length;var f=Math.min(e+i,t.body.length),l=-1;return t.body.slice(e,f).forEach(function(u,h){var p=e+h===t.body.length-1,w=yh(r,t,p,n);u.canEntireRowFit(w,a)&&(Rn(r,t,u,n,a),l=e+h)}),l}function Ws(r,t,e,n){var a=t.settings;r.applyStyles(r.userStyles),(a.showFoot==="lastPage"||a.showFoot==="everyPage")&&t.foot.forEach(function(i){return Rn(r,t,i,e,n)})}function N5(r,t,e){var n=e.getLineHeight(r.styles.fontSize),a=r.padding("vertical"),i=Math.floor((t-a)/n);return Math.max(0,i)}function L5(r,t,e,n){var a={};r.spansMultiplePages=!0,r.height=0;for(var i=0,f=0,l=e.columns;f<l.length;f++){var u=l[f],h=r.cells[u.index];if(h){Array.isArray(h.text)||(h.text=[h.text]);var p=new mh(h.raw,h.styles,h.section);p=Dn(p,h),p.text=[];var w=N5(h,t,n);h.text.length>w&&(p.text=h.text.splice(w,h.text.length));var x=n.scaleFactor(),g=n.getLineHeightFactor();h.contentHeight=h.getContentHeight(x,g),h.contentHeight>=t&&(h.contentHeight=t,p.styles.minCellHeight-=t),h.contentHeight>r.height&&(r.height=h.contentHeight),p.contentHeight=p.getContentHeight(x,g),p.contentHeight>i&&(i=p.contentHeight),a[u.index]=p}}var P=new vh(r.raw,-1,r.section,a,!0);P.height=i;for(var C=0,B=e.columns;C<B.length;C++){var u=B[C],p=P.cells[u.index];p&&(p.height=P.height);var h=r.cells[u.index];h&&(h.height=r.height)}return P}function S5(r,t,e,n){var a=r.pageSize().height,i=n.settings.margin,f=i.top+i.bottom,l=a-f;t.section==="body"&&(l-=n.getHeadHeight(n.columns)+n.getFootHeight(n.columns));var u=t.getMinimumRowHeight(n.columns,r),h=u<e;if(u>l)return console.error("Will not be able to print row ".concat(t.index," correctly since it's minimum height is larger than page height")),!0;if(!h)return!1;var p=t.hasRowSpan(n.columns),w=t.getMaxCellHeight(n.columns)>l;return w?(p&&console.error("The content of row ".concat(t.index," will not be drawn correctly since drawing rows with a height larger than the page height and has cells with rowspans is not supported.")),!0):!(p||n.settings.rowPageBreak==="avoid")}function Mo(r,t,e,n,a,i,f){var l=yh(r,t,n,i);if(e.canEntireRowFit(l,f))Rn(r,t,e,i,f);else if(S5(r,e,l,t)){var u=L5(e,l,t,r);Rn(r,t,e,i,f),Ea(r,t,a,i,f),Mo(r,t,u,n,a,i,f)}else Ea(r,t,a,i,f),Mo(r,t,e,n,a,i,f)}function Rn(r,t,e,n,a){n.x=t.settings.margin.left;for(var i=0,f=a;i<f.length;i++){var l=f[i],u=e.cells[l.index];if(!u){n.x+=l.width;continue}r.applyStyles(u.styles),u.x=n.x,u.y=n.y;var h=t.callCellHooks(r,t.hooks.willDrawCell,u,e,l,n);if(h===!1){n.x+=l.width;continue}k5(r,u,n);var p=u.getTextPos();sh(u.text,p.x,p.y,{halign:u.styles.halign,valign:u.styles.valign,maxWidth:Math.ceil(u.width-u.padding("left")-u.padding("right"))},r.getDocument()),t.callCellHooks(r,t.hooks.didDrawCell,u,e,l,n),n.x+=l.width}n.y+=e.height}function k5(r,t,e){var n=t.styles;if(r.getDocument().setFillColor(r.getDocument().getFillColor()),typeof n.lineWidth=="number"){var a=hh(n.lineWidth,n.fillColor);a&&r.rect(t.x,e.y,t.width,t.height,a)}else typeof n.lineWidth=="object"&&(n.fillColor&&r.rect(t.x,e.y,t.width,t.height,"F"),P5(r,t,e,n.lineWidth))}function P5(r,t,e,n){var a,i,f,l;n.top&&(a=e.x,i=e.y,f=e.x+t.width,l=e.y,n.right&&(f+=.5*n.right),n.left&&(a-=.5*n.left),u(n.top,a,i,f,l)),n.bottom&&(a=e.x,i=e.y+t.height,f=e.x+t.width,l=e.y+t.height,n.right&&(f+=.5*n.right),n.left&&(a-=.5*n.left),u(n.bottom,a,i,f,l)),n.left&&(a=e.x,i=e.y,f=e.x,l=e.y+t.height,n.top&&(i-=.5*n.top),n.bottom&&(l+=.5*n.bottom),u(n.left,a,i,f,l)),n.right&&(a=e.x+t.width,i=e.y,f=e.x+t.width,l=e.y+t.height,n.top&&(i-=.5*n.top),n.bottom&&(l+=.5*n.bottom),u(n.right,a,i,f,l));function u(h,p,w,x,g){r.getDocument().setLineWidth(h),r.getDocument().line(p,w,x,g,"S")}}function yh(r,t,e,n){var a=t.settings.margin.bottom,i=t.settings.showFoot;return(i==="everyPage"||i==="lastPage"&&e)&&(a+=t.getFootHeight(t.columns)),r.pageSize().height-n.y-a}function Ea(r,t,e,n,a,i){a===void 0&&(a=[]),i===void 0&&(i=!1),r.applyStyles(r.userStyles),t.settings.showFoot==="everyPage"&&!i&&t.foot.forEach(function(l){return Rn(r,t,l,n,a)}),t.callEndPageHooks(r,n);var f=t.settings.margin;fh(r,t,e,n),xh(r),t.pageNumber++,n.x=f.left,n.y=f.top,e.y=f.top,t.callWillDrawPageHooks(r,n),t.settings.showHead==="everyPage"&&(t.head.forEach(function(l){return Rn(r,t,l,n,a)}),r.applyStyles(r.userStyles))}function xh(r){var t=r.pageNumber();r.setPage(t+1);var e=r.pageNumber();return e===t?(r.addPage(),!0):!1}function C5(r){r.API.autoTable=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t[0],a=gh(this,n),i=bh(this,a);return wh(this,i),this},r.API.lastAutoTable=!1,r.API.autoTableText=function(t,e,n,a){sh(t,e,n,a,this)},r.API.autoTableSetDefaults=function(t){return Zi.setDefaults(t,this),this},r.autoTableSetDefaults=function(t,e){Zi.setDefaults(t,e)},r.API.autoTableHtmlToJson=function(t,e){var n;if(e===void 0&&(e=!1),typeof window>"u")return console.error("Cannot run autoTableHtmlToJson in non browser environment"),null;var a=new Zi(this),i=ph(a,t,window,e,!1),f=i.head,l=i.body,u=((n=f[0])===null||n===void 0?void 0:n.map(function(h){return h.content}))||[];return{columns:u,rows:l,data:l}}}var Gs;function F5(r,t){var e=gh(r,t),n=bh(r,e);wh(r,n)}try{if(typeof window<"u"&&window){var pf=window,gf=pf.jsPDF||((Gs=pf.jspdf)===null||Gs===void 0?void 0:Gs.jsPDF);gf&&C5(gf)}}catch(r){console.error("Could not apply autoTable plugin",r)}exports.E=Rt;exports._typeof=ye;exports.autoTable=F5;
|
|
79
|
+
`),t.innerText||t.textContent||""}function t5(r,t,e){for(var n=0,a=[r,t,e];n<a.length;n++){var i=a[n];i&&typeof i!="object"&&console.error("The options parameter should be of type object, is: "+typeof i),i.startY&&typeof i.startY!="number"&&(console.error("Invalid value for startY option",i.startY),delete i.startY)}}function Dn(r,t,e,n,a){if(r==null)throw new TypeError("Cannot convert undefined or null to object");for(var i=Object(r),f=1;f<arguments.length;f++){var l=arguments[f];if(l!=null)for(var u in l)Object.prototype.hasOwnProperty.call(l,u)&&(i[u]=l[u])}return i}function gh(r,t){var e=new Zi(r),n=e.getDocumentOptions(),a=e.getGlobalOptions();t5(a,n,t);var i=Dn({},a,n,t),f;typeof window<"u"&&(f=window);var l=e5(a,n,t),u=r5(a,n,t),h=n5(e,i),p=a5(e,i,f);return{id:t.tableId,content:p,hooks:u,styles:l,settings:h}}function e5(r,t,e){for(var n={styles:{},headStyles:{},bodyStyles:{},footStyles:{},alternateRowStyles:{},columnStyles:{}},a=function(u){if(u==="columnStyles"){var h=r[u],p=t[u],w=e[u];n.columnStyles=Dn({},h,p,w)}else{var x=[r,t,e],g=x.map(function(P){return P[u]||{}});n[u]=Dn({},g[0],g[1],g[2])}},i=0,f=Object.keys(n);i<f.length;i++){var l=f[i];a(l)}return n}function r5(r,t,e){for(var n=[r,t,e],a={didParseCell:[],willDrawCell:[],didDrawCell:[],willDrawPage:[],didDrawPage:[]},i=0,f=n;i<f.length;i++){var l=f[i];l.didParseCell&&a.didParseCell.push(l.didParseCell),l.willDrawCell&&a.willDrawCell.push(l.willDrawCell),l.didDrawCell&&a.didDrawCell.push(l.didDrawCell),l.willDrawPage&&a.willDrawPage.push(l.willDrawPage),l.didDrawPage&&a.didDrawPage.push(l.didDrawPage)}return a}function n5(r,t){var e,n,a,i,f,l,u,h,p,w,x,g,P=zo(t.margin,40/r.scaleFactor()),C=(e=i5(r,t.startY))!==null&&e!==void 0?e:P.top,B;t.showFoot===!0?B="everyPage":t.showFoot===!1?B="never":B=(n=t.showFoot)!==null&&n!==void 0?n:"everyPage";var S;t.showHead===!0?S="everyPage":t.showHead===!1?S="never":S=(a=t.showHead)!==null&&a!==void 0?a:"everyPage";var G=(i=t.useCss)!==null&&i!==void 0?i:!1,V=t.theme||(G?"plain":"striped"),M=!!t.horizontalPageBreak,it=(f=t.horizontalPageBreakRepeat)!==null&&f!==void 0?f:null;return{includeHiddenHtml:(l=t.includeHiddenHtml)!==null&&l!==void 0?l:!1,useCss:G,theme:V,startY:C,margin:P,pageBreak:(u=t.pageBreak)!==null&&u!==void 0?u:"auto",rowPageBreak:(h=t.rowPageBreak)!==null&&h!==void 0?h:"auto",tableWidth:(p=t.tableWidth)!==null&&p!==void 0?p:"auto",showHead:S,showFoot:B,tableLineWidth:(w=t.tableLineWidth)!==null&&w!==void 0?w:0,tableLineColor:(x=t.tableLineColor)!==null&&x!==void 0?x:200,horizontalPageBreak:M,horizontalPageBreakRepeat:it,horizontalPageBreakBehaviour:(g=t.horizontalPageBreakBehaviour)!==null&&g!==void 0?g:"afterAllRows"}}function i5(r,t){var e=r.getLastAutoTable(),n=r.scaleFactor(),a=r.pageNumber(),i=!1;if(e&&e.startPageNumber){var f=e.startPageNumber+e.pageNumber-1;i=f===a}return typeof t=="number"?t:(t==null||t===!1)&&i&&e?.finalY!=null?e.finalY+20/n:null}function a5(r,t,e){var n=t.head||[],a=t.body||[],i=t.foot||[];if(t.html){var f=t.includeHiddenHtml;if(e){var l=ph(r,t.html,e,f,t.useCss)||{};n=l.head||n,a=l.body||n,i=l.foot||n}else console.error("Cannot parse html in non browser environment")}var u=t.columns||o5(n,a,i);return{columns:u,head:n,body:a,foot:i}}function o5(r,t,e){var n=r[0]||t[0]||e[0]||[],a=[];return Object.keys(n).filter(function(i){return i!=="_element"}).forEach(function(i){var f=1,l;Array.isArray(n)?l=n[parseInt(i)]:l=n[i],typeof l=="object"&&!Array.isArray(l)&&(f=l?.colSpan||1);for(var u=0;u<f;u++){var h=void 0;Array.isArray(n)?h=a.length:h=i+(u>0?"_".concat(u):"");var p={dataKey:h};a.push(p)}}),a}var il=(function(){function r(t,e,n){this.table=e,this.pageNumber=e.pageNumber,this.settings=e.settings,this.cursor=n,this.doc=t.getDocument()}return r})(),s5=(function(r){lh(t,r);function t(e,n,a,i,f,l){var u=r.call(this,e,n,l)||this;return u.cell=a,u.row=i,u.column=f,u.section=i.section,u}return t})(il),l5=(function(){function r(t,e){this.pageNumber=1,this.id=t.id,this.settings=t.settings,this.styles=t.styles,this.hooks=t.hooks,this.columns=e.columns,this.head=e.head,this.body=e.body,this.foot=e.foot}return r.prototype.getHeadHeight=function(t){return this.head.reduce(function(e,n){return e+n.getMaxCellHeight(t)},0)},r.prototype.getFootHeight=function(t){return this.foot.reduce(function(e,n){return e+n.getMaxCellHeight(t)},0)},r.prototype.allRows=function(){return this.head.concat(this.body).concat(this.foot)},r.prototype.callCellHooks=function(t,e,n,a,i,f){for(var l=0,u=e;l<u.length;l++){var h=u[l],p=new s5(t,this,n,a,i,f),w=h(p)===!1;if(n.text=Array.isArray(n.text)?n.text:[n.text],w)return!1}return!0},r.prototype.callEndPageHooks=function(t,e){t.applyStyles(t.userStyles);for(var n=0,a=this.hooks.didDrawPage;n<a.length;n++){var i=a[n];i(new il(t,this,e))}},r.prototype.callWillDrawPageHooks=function(t,e){for(var n=0,a=this.hooks.willDrawPage;n<a.length;n++){var i=a[n];i(new il(t,this,e))}},r.prototype.getWidth=function(t){if(typeof this.settings.tableWidth=="number")return this.settings.tableWidth;if(this.settings.tableWidth==="wrap"){var e=this.columns.reduce(function(a,i){return a+i.wrappedWidth},0);return e}else{var n=this.settings.margin;return t-n.left-n.right}},r})(),vh=(function(){function r(t,e,n,a,i){i===void 0&&(i=!1),this.height=0,this.raw=t,t instanceof uh&&(this.raw=t._element,this.element=t._element),this.index=e,this.section=n,this.cells=a,this.spansMultiplePages=i}return r.prototype.getMaxCellHeight=function(t){var e=this;return t.reduce(function(n,a){var i;return Math.max(n,((i=e.cells[a.index])===null||i===void 0?void 0:i.height)||0)},0)},r.prototype.hasRowSpan=function(t){var e=this;return t.filter(function(n){var a=e.cells[n.index];return a?a.rowSpan>1:!1}).length>0},r.prototype.canEntireRowFit=function(t,e){return this.getMaxCellHeight(e)<=t},r.prototype.getMinimumRowHeight=function(t,e){var n=this;return t.reduce(function(a,i){var f=n.cells[i.index];if(!f)return 0;var l=e.getLineHeight(f.styles.fontSize),u=f.padding("vertical"),h=u+l;return h>a?h:a},0)},r})(),mh=(function(){function r(t,e,n){var a;this.contentHeight=0,this.contentWidth=0,this.wrappedWidth=0,this.minReadableWidth=0,this.minWidth=0,this.width=0,this.height=0,this.x=0,this.y=0,this.styles=e,this.section=n,this.raw=t;var i=t;t!=null&&typeof t=="object"&&!Array.isArray(t)?(this.rowSpan=t.rowSpan||1,this.colSpan=t.colSpan||1,i=(a=t.content)!==null&&a!==void 0?a:t,t._element&&(this.raw=t._element)):(this.rowSpan=1,this.colSpan=1);var f=i!=null?""+i:"",l=/\r\n|\r|\n/g;this.text=f.split(l)}return r.prototype.getTextPos=function(){var t;if(this.styles.valign==="top")t=this.y+this.padding("top");else if(this.styles.valign==="bottom")t=this.y+this.height-this.padding("bottom");else{var e=this.height-this.padding("vertical");t=this.y+e/2+this.padding("top")}var n;if(this.styles.halign==="right")n=this.x+this.width-this.padding("right");else if(this.styles.halign==="center"){var a=this.width-this.padding("horizontal");n=this.x+a/2+this.padding("left")}else n=this.x+this.padding("left");return{x:n,y:t}},r.prototype.getContentHeight=function(t,e){e===void 0&&(e=1.15);var n=Array.isArray(this.text)?this.text.length:1,a=this.styles.fontSize/t*e,i=n*a+this.padding("vertical");return Math.max(i,this.styles.minCellHeight)},r.prototype.padding=function(t){var e=zo(this.styles.cellPadding,0);return t==="vertical"?e.top+e.bottom:t==="horizontal"?e.left+e.right:e[t]},r})(),u5=(function(){function r(t,e,n){this.wrappedWidth=0,this.minReadableWidth=0,this.minWidth=0,this.width=0,this.dataKey=t,this.raw=e,this.index=n}return r.prototype.getMaxCustomCellWidth=function(t){for(var e=0,n=0,a=t.allRows();n<a.length;n++){var i=a[n],f=i.cells[this.index];f&&typeof f.styles.cellWidth=="number"&&(e=Math.max(e,f.styles.cellWidth))}return e},r})();function f5(r,t){h5(r,t);var e=[],n=0;t.columns.forEach(function(i){var f=i.getMaxCustomCellWidth(t);f?i.width=f:(i.width=i.wrappedWidth,e.push(i)),n+=i.width});var a=t.getWidth(r.pageSize().width)-n;a&&(a=al(e,a,function(i){return Math.max(i.minReadableWidth,i.minWidth)})),a&&(a=al(e,a,function(i){return i.minWidth})),a=Math.abs(a),!t.settings.horizontalPageBreak&&a>.1/r.scaleFactor()&&(a=a<1?a:Math.round(a),console.log("Of the table content, ".concat(a," units width could not fit page"))),d5(t),p5(t,r),c5(t)}function h5(r,t){var e=r.scaleFactor(),n=t.settings.horizontalPageBreak,a=ch(r,t);t.allRows().forEach(function(i){for(var f=0,l=t.columns;f<l.length;f++){var u=l[f],h=i.cells[u.index];if(h){var p=t.hooks.didParseCell;t.callCellHooks(r,p,h,i,u,null);var w=h.padding("horizontal");h.contentWidth=To(h.text,h.styles,r)+w;var x=To(h.text.join(" ").split(/[^\S\u00A0]+/),h.styles,r);if(h.minReadableWidth=x+h.padding("horizontal"),typeof h.styles.cellWidth=="number")h.minWidth=h.styles.cellWidth,h.wrappedWidth=h.styles.cellWidth;else if(h.styles.cellWidth==="wrap"||n===!0)h.contentWidth>a?(h.minWidth=a,h.wrappedWidth=a):(h.minWidth=h.contentWidth,h.wrappedWidth=h.contentWidth);else{var g=10/e;h.minWidth=h.styles.minCellWidth||g,h.wrappedWidth=h.contentWidth,h.minWidth>h.wrappedWidth&&(h.wrappedWidth=h.minWidth)}}}}),t.allRows().forEach(function(i){for(var f=0,l=t.columns;f<l.length;f++){var u=l[f],h=i.cells[u.index];if(h&&h.colSpan===1)u.wrappedWidth=Math.max(u.wrappedWidth,h.wrappedWidth),u.minWidth=Math.max(u.minWidth,h.minWidth),u.minReadableWidth=Math.max(u.minReadableWidth,h.minReadableWidth);else{var p=t.styles.columnStyles[u.dataKey]||t.styles.columnStyles[u.index]||{},w=p.cellWidth||p.minCellWidth;w&&typeof w=="number"&&(u.minWidth=w,u.wrappedWidth=w)}h&&(h.colSpan>1&&!u.minWidth&&(u.minWidth=h.minWidth),h.colSpan>1&&!u.wrappedWidth&&(u.wrappedWidth=h.minWidth))}})}function al(r,t,e){for(var n=t,a=r.reduce(function(g,P){return g+P.wrappedWidth},0),i=0;i<r.length;i++){var f=r[i],l=f.wrappedWidth/a,u=n*l,h=f.width+u,p=e(f),w=h<p?p:h;t-=w-f.width,f.width=w}if(t=Math.round(t*1e10)/1e10,t){var x=r.filter(function(g){return t<0?g.width>e(g):!0});x.length&&(t=al(x,t,e))}return t}function c5(r){for(var t={},e=1,n=r.allRows(),a=0;a<n.length;a++)for(var i=n[a],f=0,l=r.columns;f<l.length;f++){var u=l[f],h=t[u.index];if(e>1)e--,delete i.cells[u.index];else if(h)h.cell.height+=i.height,e=h.cell.colSpan,delete i.cells[u.index],h.left--,h.left<=1&&delete t[u.index];else{var p=i.cells[u.index];if(!p)continue;if(p.height=i.height,p.rowSpan>1){var w=n.length-a,x=p.rowSpan>w?w:p.rowSpan;t[u.index]={cell:p,left:x,row:i}}}}}function d5(r){for(var t=r.allRows(),e=0;e<t.length;e++)for(var n=t[e],a=null,i=0,f=0,l=0;l<r.columns.length;l++){var u=r.columns[l];if(f-=1,f>1&&r.columns[l+1])i+=u.width,delete n.cells[u.index];else if(a){var h=a;delete n.cells[u.index],a=null,h.width=u.width+i}else{var h=n.cells[u.index];if(!h)continue;if(f=h.colSpan,i=0,h.colSpan>1){a=h,i+=u.width;continue}h.width=u.width+i}}}function p5(r,t){for(var e={count:0,height:0},n=0,a=r.allRows();n<a.length;n++){for(var i=a[n],f=0,l=r.columns;f<l.length;f++){var u=l[f],h=i.cells[u.index];if(h){t.applyStyles(h.styles,!0);var p=h.width-h.padding("horizontal");if(h.styles.overflow==="linebreak")h.text=t.splitTextToSize(h.text,p+1/t.scaleFactor(),{fontSize:h.styles.fontSize});else if(h.styles.overflow==="ellipsize")h.text=ff(h.text,p,h.styles,t,"...");else if(h.styles.overflow==="hidden")h.text=ff(h.text,p,h.styles,t,"");else if(typeof h.styles.overflow=="function"){var w=h.styles.overflow(h.text,p);typeof w=="string"?h.text=[w]:h.text=w}h.contentHeight=h.getContentHeight(t.scaleFactor(),t.getLineHeightFactor());var x=h.contentHeight/h.rowSpan;h.rowSpan>1&&e.count*e.height<x*h.rowSpan?e={height:x,count:h.rowSpan}:e&&e.count>0&&e.height>x&&(x=e.height),x>i.height&&(i.height=x)}}e.count--}}function ff(r,t,e,n,a){return r.map(function(i){return g5(i,t,e,n,a)})}function g5(r,t,e,n,a){var i=1e4*n.scaleFactor();if(t=Math.ceil(t*i)/i,t>=To(r,e,n))return r;for(;t<To(r+a,e,n)&&!(r.length<=1);)r=r.substring(0,r.length-1);return r.trim()+a}function bh(r,t){var e=new Zi(r),n=v5(t,e.scaleFactor()),a=new l5(t,n);return f5(e,a),e.applyStyles(e.userStyles),a}function v5(r,t){var e=r.content,n=b5(e.columns);if(e.head.length===0){var a=hf(n,"head");a&&e.head.push(a)}if(e.foot.length===0){var a=hf(n,"foot");a&&e.foot.push(a)}var i=r.settings.theme,f=r.styles;return{columns:n,head:Hs("head",e.head,n,f,i,t),body:Hs("body",e.body,n,f,i,t),foot:Hs("foot",e.foot,n,f,i,t)}}function Hs(r,t,e,n,a,i){var f={},l=t.map(function(u,h){for(var p=0,w={},x=0,g=0,P=0,C=e;P<C.length;P++){var B=C[P];if(f[B.index]==null||f[B.index].left===0)if(g===0){var S=void 0;Array.isArray(u)?S=u[B.index-x-p]:S=u[B.dataKey];var G={};typeof S=="object"&&!Array.isArray(S)&&(G=S?.styles||{});var V=w5(r,B,h,a,n,i,G),M=new mh(S,V,r);w[B.dataKey]=M,w[B.index]=M,g=M.colSpan-1,f[B.index]={left:M.rowSpan-1,times:g}}else g--,x++;else f[B.index].left--,g=f[B.index].times,p++}return new vh(u,h,r,w)});return l}function hf(r,t){var e={};return r.forEach(function(n){if(n.raw!=null){var a=m5(t,n.raw);a!=null&&(e[n.dataKey]=a)}}),Object.keys(e).length>0?e:null}function m5(r,t){if(r==="head"){if(typeof t=="object")return t.header||null;if(typeof t=="string"||typeof t=="number")return t}else if(r==="foot"&&typeof t=="object")return t.footer;return null}function b5(r){return r.map(function(t,e){var n,a;return typeof t=="object"?a=(n=t.dataKey)!==null&&n!==void 0?n:e:a=e,new u5(a,t,e)})}function w5(r,t,e,n,a,i,f){var l=J2(n),u;r==="head"?u=a.headStyles:r==="body"?u=a.bodyStyles:r==="foot"&&(u=a.footStyles);var h=Dn({},l.table,l[r],a.styles,u),p=a.columnStyles[t.dataKey]||a.columnStyles[t.index]||{},w=r==="body"?p:{},x=r==="body"&&e%2===0?Dn({},l.alternateRow,a.alternateRowStyles):{},g=Y2(i),P=Dn({},g,h,x,w);return Dn(P,f)}function y5(r,t,e){var n;e===void 0&&(e={});var a=ch(r,t),i=new Map,f=[],l=[],u=[];Array.isArray(t.settings.horizontalPageBreakRepeat)?u=t.settings.horizontalPageBreakRepeat:(typeof t.settings.horizontalPageBreakRepeat=="string"||typeof t.settings.horizontalPageBreakRepeat=="number")&&(u=[t.settings.horizontalPageBreakRepeat]),u.forEach(function(x){var g=t.columns.find(function(P){return P.dataKey===x||P.index===x});g&&!i.has(g.index)&&(i.set(g.index,!0),f.push(g.index),l.push(t.columns[g.index]),a-=g.wrappedWidth)});for(var h=!0,p=(n=e?.start)!==null&&n!==void 0?n:0;p<t.columns.length;){if(i.has(p)){p++;continue}var w=t.columns[p].wrappedWidth;if(h||a>=w)h=!1,f.push(p),l.push(t.columns[p]),a-=w;else break;p++}return{colIndexes:f,columns:l,lastIndex:p-1}}function x5(r,t){for(var e=[],n=0;n<t.columns.length;n++){var a=y5(r,t,{start:n});a.columns.length&&(e.push(a),n=a.lastIndex)}return e}function wh(r,t){var e=t.settings,n=e.startY,a=e.margin,i={x:a.left,y:n},f=t.getHeadHeight(t.columns)+t.getFootHeight(t.columns),l=n+a.bottom+f;if(e.pageBreak==="avoid"){var u=t.body,h=u.reduce(function(x,g){return x+g.height},0);l+=h}var p=new Zi(r);(e.pageBreak==="always"||e.startY!=null&&l>p.pageSize().height)&&(xh(p),i.y=a.top),t.callWillDrawPageHooks(p,i);var w=Dn({},i);t.startPageNumber=p.pageNumber(),e.horizontalPageBreak?A5(p,t,w,i):(p.applyStyles(p.userStyles),(e.showHead==="firstPage"||e.showHead==="everyPage")&&t.head.forEach(function(x){return Rn(p,t,x,i,t.columns)}),p.applyStyles(p.userStyles),t.body.forEach(function(x,g){var P=g===t.body.length-1;Mo(p,t,x,P,w,i,t.columns)}),p.applyStyles(p.userStyles),(e.showFoot==="lastPage"||e.showFoot==="everyPage")&&t.foot.forEach(function(x){return Rn(p,t,x,i,t.columns)})),fh(p,t,w,i),t.callEndPageHooks(p,i),t.finalY=i.y,r.lastAutoTable=t,p.applyStyles(p.userStyles)}function A5(r,t,e,n){var a=x5(r,t),i=t.settings;if(i.horizontalPageBreakBehaviour==="afterAllRows")a.forEach(function(h,p){r.applyStyles(r.userStyles),p>0?Ea(r,t,e,n,h.columns,!0):cf(r,t,n,h.columns),_5(r,t,e,n,h.columns),Ws(r,t,n,h.columns)});else for(var f=-1,l=a[0],u=function(){var h=f;if(l){r.applyStyles(r.userStyles);var p=l.columns;f>=0?Ea(r,t,e,n,p,!0):cf(r,t,n,p),h=df(r,t,f+1,n,p),Ws(r,t,n,p)}var w=h-f;a.slice(1).forEach(function(x){r.applyStyles(r.userStyles),Ea(r,t,e,n,x.columns,!0),df(r,t,f+1,n,x.columns,w),Ws(r,t,n,x.columns)}),f=h};f<t.body.length-1;)u()}function cf(r,t,e,n){var a=t.settings;r.applyStyles(r.userStyles),(a.showHead==="firstPage"||a.showHead==="everyPage")&&t.head.forEach(function(i){return Rn(r,t,i,e,n)})}function _5(r,t,e,n,a){r.applyStyles(r.userStyles),t.body.forEach(function(i,f){var l=f===t.body.length-1;Mo(r,t,i,l,e,n,a)})}function df(r,t,e,n,a,i){r.applyStyles(r.userStyles),i=i??t.body.length;var f=Math.min(e+i,t.body.length),l=-1;return t.body.slice(e,f).forEach(function(u,h){var p=e+h===t.body.length-1,w=yh(r,t,p,n);u.canEntireRowFit(w,a)&&(Rn(r,t,u,n,a),l=e+h)}),l}function Ws(r,t,e,n){var a=t.settings;r.applyStyles(r.userStyles),(a.showFoot==="lastPage"||a.showFoot==="everyPage")&&t.foot.forEach(function(i){return Rn(r,t,i,e,n)})}function N5(r,t,e){var n=e.getLineHeight(r.styles.fontSize),a=r.padding("vertical"),i=Math.floor((t-a)/n);return Math.max(0,i)}function L5(r,t,e,n){var a={};r.spansMultiplePages=!0,r.height=0;for(var i=0,f=0,l=e.columns;f<l.length;f++){var u=l[f],h=r.cells[u.index];if(h){Array.isArray(h.text)||(h.text=[h.text]);var p=new mh(h.raw,h.styles,h.section);p=Dn(p,h),p.text=[];var w=N5(h,t,n);h.text.length>w&&(p.text=h.text.splice(w,h.text.length));var x=n.scaleFactor(),g=n.getLineHeightFactor();h.contentHeight=h.getContentHeight(x,g),h.contentHeight>=t&&(h.contentHeight=t,p.styles.minCellHeight-=t),h.contentHeight>r.height&&(r.height=h.contentHeight),p.contentHeight=p.getContentHeight(x,g),p.contentHeight>i&&(i=p.contentHeight),a[u.index]=p}}var P=new vh(r.raw,-1,r.section,a,!0);P.height=i;for(var C=0,B=e.columns;C<B.length;C++){var u=B[C],p=P.cells[u.index];p&&(p.height=P.height);var h=r.cells[u.index];h&&(h.height=r.height)}return P}function S5(r,t,e,n){var a=r.pageSize().height,i=n.settings.margin,f=i.top+i.bottom,l=a-f;t.section==="body"&&(l-=n.getHeadHeight(n.columns)+n.getFootHeight(n.columns));var u=t.getMinimumRowHeight(n.columns,r),h=u<e;if(u>l)return console.log("Will not be able to print row ".concat(t.index," correctly since it's minimum height is larger than page height")),!0;if(!h)return!1;var p=t.hasRowSpan(n.columns),w=t.getMaxCellHeight(n.columns)>l;return w?(p&&console.log("The content of row ".concat(t.index," will not be drawn correctly since drawing rows with a height larger than the page height and has cells with rowspans is not supported.")),!0):!(p||n.settings.rowPageBreak==="avoid")}function Mo(r,t,e,n,a,i,f){var l=yh(r,t,n,i);if(e.canEntireRowFit(l,f))Rn(r,t,e,i,f);else if(S5(r,e,l,t)){var u=L5(e,l,t,r);Rn(r,t,e,i,f),Ea(r,t,a,i,f),Mo(r,t,u,n,a,i,f)}else Ea(r,t,a,i,f),Mo(r,t,e,n,a,i,f)}function Rn(r,t,e,n,a){n.x=t.settings.margin.left;for(var i=0,f=a;i<f.length;i++){var l=f[i],u=e.cells[l.index];if(!u){n.x+=l.width;continue}r.applyStyles(u.styles),u.x=n.x,u.y=n.y;var h=t.callCellHooks(r,t.hooks.willDrawCell,u,e,l,n);if(h===!1){n.x+=l.width;continue}k5(r,u,n);var p=u.getTextPos();sh(u.text,p.x,p.y,{halign:u.styles.halign,valign:u.styles.valign,maxWidth:Math.ceil(u.width-u.padding("left")-u.padding("right"))},r.getDocument()),t.callCellHooks(r,t.hooks.didDrawCell,u,e,l,n),n.x+=l.width}n.y+=e.height}function k5(r,t,e){var n=t.styles;if(r.getDocument().setFillColor(r.getDocument().getFillColor()),typeof n.lineWidth=="number"){var a=hh(n.lineWidth,n.fillColor);a&&r.rect(t.x,e.y,t.width,t.height,a)}else typeof n.lineWidth=="object"&&(n.fillColor&&r.rect(t.x,e.y,t.width,t.height,"F"),P5(r,t,e,n.lineWidth))}function P5(r,t,e,n){var a,i,f,l;n.top&&(a=e.x,i=e.y,f=e.x+t.width,l=e.y,n.right&&(f+=.5*n.right),n.left&&(a-=.5*n.left),u(n.top,a,i,f,l)),n.bottom&&(a=e.x,i=e.y+t.height,f=e.x+t.width,l=e.y+t.height,n.right&&(f+=.5*n.right),n.left&&(a-=.5*n.left),u(n.bottom,a,i,f,l)),n.left&&(a=e.x,i=e.y,f=e.x,l=e.y+t.height,n.top&&(i-=.5*n.top),n.bottom&&(l+=.5*n.bottom),u(n.left,a,i,f,l)),n.right&&(a=e.x+t.width,i=e.y,f=e.x+t.width,l=e.y+t.height,n.top&&(i-=.5*n.top),n.bottom&&(l+=.5*n.bottom),u(n.right,a,i,f,l));function u(h,p,w,x,g){r.getDocument().setLineWidth(h),r.getDocument().line(p,w,x,g,"S")}}function yh(r,t,e,n){var a=t.settings.margin.bottom,i=t.settings.showFoot;return(i==="everyPage"||i==="lastPage"&&e)&&(a+=t.getFootHeight(t.columns)),r.pageSize().height-n.y-a}function Ea(r,t,e,n,a,i){a===void 0&&(a=[]),i===void 0&&(i=!1),r.applyStyles(r.userStyles),t.settings.showFoot==="everyPage"&&!i&&t.foot.forEach(function(l){return Rn(r,t,l,n,a)}),t.callEndPageHooks(r,n);var f=t.settings.margin;fh(r,t,e,n),xh(r),t.pageNumber++,n.x=f.left,n.y=f.top,e.y=f.top,t.callWillDrawPageHooks(r,n),t.settings.showHead==="everyPage"&&(t.head.forEach(function(l){return Rn(r,t,l,n,a)}),r.applyStyles(r.userStyles))}function xh(r){var t=r.pageNumber();r.setPage(t+1);var e=r.pageNumber();return e===t?(r.addPage(),!0):!1}function C5(r){r.API.autoTable=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t[0],a=gh(this,n),i=bh(this,a);return wh(this,i),this},r.API.lastAutoTable=!1,r.API.autoTableText=function(t,e,n,a){sh(t,e,n,a,this)},r.API.autoTableSetDefaults=function(t){return Zi.setDefaults(t,this),this},r.autoTableSetDefaults=function(t,e){Zi.setDefaults(t,e)},r.API.autoTableHtmlToJson=function(t,e){var n;if(e===void 0&&(e=!1),typeof window>"u")return console.error("Cannot run autoTableHtmlToJson in non browser environment"),null;var a=new Zi(this),i=ph(a,t,window,e,!1),f=i.head,l=i.body,u=((n=f[0])===null||n===void 0?void 0:n.map(function(h){return h.content}))||[];return{columns:u,rows:l,data:l}}}var Gs;function F5(r,t){var e=gh(r,t),n=bh(r,e);wh(r,n)}try{if(typeof window<"u"&&window){var pf=window,gf=pf.jsPDF||((Gs=pf.jspdf)===null||Gs===void 0?void 0:Gs.jsPDF);gf&&C5(gf)}}catch(r){console.error("Could not apply autoTable plugin",r)}exports.E=Rt;exports._typeof=ye;exports.autoTable=F5;
|