1 | var jsPDF=function(a){"use strict";function b(d,e,f,g){var h={};"object"==typeof d&&(h=d,d=h.orientation,e=h.unit||e,f=h.format||f,g=h.compress||h.compressPdf||g),d="undefined"==typeof d?"p":d.toString().toLowerCase(),"undefined"==typeof e&&(e="mm"),"undefined"==typeof f&&(f="a4"),"undefined"==typeof g&&"undefined"==typeof zpipe&&(g=!1);var i,j,k,l,m,n,o,p,q,r=f.toString().toLowerCase(),s=[],t=0,u=g,v="1.3",w={a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89],a5:[419.53,595.28],a6:[297.64,419.53],a7:[209.76,297.64],a8:[147.4,209.76],a9:[104.88,147.4],a10:[73.7,104.88],b0:[2834.65,4008.19],b1:[2004.09,2834.65],b2:[1417.32,2004.09],b3:[1000.63,1417.32],b4:[708.66,1000.63],b5:[498.9,708.66],b6:[354.33,498.9],b7:[249.45,354.33],b8:[175.75,249.45],b9:[124.72,175.75],b10:[87.87,124.72],c0:[2599.37,3676.54],c1:[1836.85,2599.37],c2:[1298.27,1836.85],c3:[918.43,1298.27],c4:[649.13,918.43],c5:[459.21,649.13],c6:[323.15,459.21],c7:[229.61,323.15],c8:[161.57,229.61],c9:[113.39,161.57],c10:[79.37,113.39],letter:[612,792],"government-letter":[576,756],legal:[612,1008],"junior-legal":[576,360],ledger:[1224,792],tabloid:[792,1224]},x=h.textColor||"0 g",y=h.drawColor||"0 G",z=0,A=[],B=2,C=!!h.outToPages,D=[],E={},F={},G=h.fontSize||16,H=h.lineWidth||.200025,I=h.lineHeight||1.15,J={title:"",subject:"",author:"",keywords:"",creator:""},K=0,L=0,M={},N=new PubSub(M),O=function(a){return a.toFixed(2)},P=function(a){return a.toFixed(3)},Q=function(a){var b=a.toFixed(0);return a<10?"0"+b:b},R=function(a){var b=a.toFixed(0);return b.length<10?new Array(11-b.length).join("0")+b:b},S=function(a){C?A[z].push(a):(s.push(a),t+=a.length+1)},T=function(){return B++,D[B]=t,S(B+" 0 obj"),B},U=function(a){S("stream"),S(a),S("endstream")},V=function(){o=k*l,p=j*l;var a,b,c,d,e,f;for(a=1;a<=z;a++){if(T(),S("<</Type /Page"),S("/Parent 1 0 R"),S("/Resources 2 0 R"),S("/Contents "+(B+1)+" 0 R>>"),S("endobj"),b=A[a].join("\n"),T(),u){for(c=[],d=0;d<b.length;++d)c[d]=b.charCodeAt(d);f=adler32cs.from(b),e=new Deflater(6),e.append(new Uint8Array(c)),b=e.flush(),c=[new Uint8Array([120,156]),new Uint8Array(b),new Uint8Array([255&f,f>>8&255,f>>16&255,f>>24&255])],b="";for(d in c)c.hasOwnProperty(d)&&(b+=String.fromCharCode.apply(null,c[d]));S("<</Length "+b.length+" /Filter [/FlateDecode]>>")}else S("<</Length "+b.length+">>");U(b),S("endobj")}for(D[1]=t,S("1 0 obj"),S("<</Type /Pages"),q="/Kids [",d=0;d<z;d++)q+=3+2*d+" 0 R ";S(q+"]"),S("/Count "+z),S("/MediaBox [0 0 "+O(o)+" "+O(p)+"]"),S(">>"),S("endobj")},W=function(a){a.objectNumber=T(),S("<</BaseFont/"+a.PostScriptName+"/Type/Font"),"string"==typeof a.encoding&&S("/Encoding/"+a.encoding),S("/Subtype/Type1>>"),S("endobj")},X=function(){var a;for(a in E)E.hasOwnProperty(a)&&W(E[a])},Y=function(){N.publish("putXobjectDict")},Z=function(){S("/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]"),S("/Font <<");var a;for(a in E)E.hasOwnProperty(a)&&S("/"+a+" "+E[a].objectNumber+" 0 R");S(">>"),S("/XObject <<"),Y(),S(">>")},$=function(){X(),N.publish("putResources"),D[2]=t,S("2 0 obj"),S("<<"),Z(),S(">>"),S("endobj"),N.publish("postPutResources")},_=function(a,b,c){var d;F[b]===d&&(F[b]={}),F[b][c]=a},aa=function(a,b,d,e){var f="F"+(c(E)+1).toString(10),g=E[f]={id:f,PostScriptName:a,fontName:b,fontStyle:d,encoding:e,metadata:{}};return _(f,b,d),N.publish("addFont",g),f},ba=function(){var a,b,c,d,e="helvetica",f="times",g="courier",h="normal",i="bold",j="italic",k="bolditalic",l="StandardEncoding",m=[["Helvetica",e,h],["Helvetica-Bold",e,i],["Helvetica-Oblique",e,j],["Helvetica-BoldOblique",e,k],["Courier",g,h],["Courier-Bold",g,i],["Courier-Oblique",g,j],["Courier-BoldOblique",g,k],["Times-Roman",f,h],["Times-Bold",f,i],["Times-Italic",f,j],["Times-BoldItalic",f,k]];for(a=0,b=m.length;a<b;a++)c=aa(m[a][0],m[a][1],m[a][2],l),d=m[a][0].split("-"),_(c,d[0],d[1]||"");N.publish("addFonts",{fonts:E,dictionary:F})},ca=function(a,b){var c,d,e,f,g,h,j,k,l,m;if(b===e&&(b={}),f=b.sourceEncoding?f:"Unicode",h=b.outputEncoding,(b.autoencode||h)&&E[i].metadata&&E[i].metadata[f]&&E[i].metadata[f].encoding&&(g=E[i].metadata[f].encoding,!h&&E[i].encoding&&(h=E[i].encoding),!h&&g.codePages&&(h=g.codePages[0]),"string"==typeof h&&(h=g[h]),h)){for(k=!1,j=[],c=0,d=a.length;c<d;c++)l=h[a.charCodeAt(c)],l?j.push(String.fromCharCode(l)):j.push(a[c]),j[c].charCodeAt(0)>>8&&(k=!0);a=j.join("")}for(c=a.length;k===e&&0!==c;)a.charCodeAt(c-1)>>8&&(k=!0),c--;if(k){for(j=b.noBOM?[]:[254,255],c=0,d=a.length;c<d;c++){if(l=a.charCodeAt(c),m=l>>8,m>>8)throw new Error("Character at position "+c.toString(10)+" of string '"+a+"' exceeds 16bits. Cannot be encoded into UCS-2 BE");j.push(m),j.push(l-(m<<8))}return String.fromCharCode.apply(e,j)}return a},da=function(a,b){return ca(a,b).replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},ea=function(){S("/Producer (jsPDF "+b.version+")"),J.title&&S("/Title ("+da(J.title)+")"),J.subject&&S("/Subject ("+da(J.subject)+")"),J.author&&S("/Author ("+da(J.author)+")"),J.keywords&&S("/Keywords ("+da(J.keywords)+")"),J.creator&&S("/Creator ("+da(J.creator)+")");var a=new Date;S("/CreationDate (D:"+[a.getFullYear(),Q(a.getMonth()+1),Q(a.getDate()),Q(a.getHours()),Q(a.getMinutes()),Q(a.getSeconds())].join("")+")")},fa=function(){S("/Type /Catalog"),S("/Pages 1 0 R"),S("/OpenAction [3 0 R /FitH null]"),S("/PageLayout /OneColumn"),N.publish("putCatalog")},ga=function(){S("/Size "+(B+1)),S("/Root "+B+" 0 R"),S("/Info "+(B-1)+" 0 R")},ha=function(){z++,C=!0,A[z]=[]},ia=function(){ha(),S(O(H*l)+" w"),S(y),0!==K&&S(K.toString(10)+" J"),0!==L&&S(L.toString(10)+" j"),N.publish("addPage",{pageNumber:z})},ja=function(a,b){var c,d;a===d&&(a=E[i].fontName),b===d&&(b=E[i].fontStyle);try{c=F[a][b]}catch(a){c=d}if(!c)throw new Error("Unable to look up font label for font '"+a+"', '"+b+"'. Refer to getFontList() for available fonts.");return c},ka=function(){C=!1,B=2,s=[],D=[],S("%PDF-"+v),V(),$(),T(),S("<<"),ea(),S(">>"),S("endobj"),T(),S("<<"),fa(),S(">>"),S("endobj");var a,b=t;for(S("xref"),S("0 "+(B+1)),S("0000000000 65535 f "),a=1;a<=B;a++)S(R(D[a])+" 00000 n ");return S("trailer"),S("<<"),ga(),S(">>"),S("startxref"),S(b),S("%%EOF"),C=!0,s.join("\n")},la=function(a){var b="S";return"F"===a?b="f":"FD"!==a&&"DF"!==a||(b="B"),b},ma=function(){var a,b,c,d,e;for(a=ka(),b=a.length,c=new Uint8Array(new ArrayBuffer(b)),d=0;d<b;d++)c[d]=a.charCodeAt(d);return e=new Blob([c],{type:"application/pdf"})},na=function(b,c){var d;switch(b){case d:return ka();case"save":if(navigator.getUserMedia){if(void 0===a.URL)return M.output("dataurlnewwindow");if(void 0===a.URL.createObjectURL)return M.output("dataurlnewwindow")}saveAs(ma(),c);break;case"blob":return ma();case"datauristring":case"dataurlstring":return"data:application/pdf;base64,"+btoa(ka());case"datauri":case"dataurl":document.location.href="data:application/pdf;base64,"+btoa(ka());break;case"dataurlnewwindow":a.open("data:application/pdf;base64,"+btoa(ka()));break;default:throw new Error('Output type "'+b+'" is not supported.')}};if("pt"===e)l=1;else if("mm"===e)l=72/25.4;else if("cm"===e)l=72/2.54;else{if("in"!==e)throw"Invalid unit: "+e;l=72}if(w.hasOwnProperty(r))j=w[r][1]/l,k=w[r][0]/l;else try{j=f[1],k=f[0]}catch(a){throw"Invalid format: "+f}if("p"===d||"portrait"===d)d="p",k>j&&(m=k,k=j,j=m);else{if("l"!==d&&"landscape"!==d)throw"Invalid orientation: "+d;d="l",j>k&&(m=k,k=j,j=m)}M.internal={pdfEscape:da,getStyle:la,getFont:function(){return E[ja.apply(M,arguments)]},getFontSize:function(){return G},getLineHeight:function(){return G*I},btoa:btoa,write:function(a,b,c,d){S(1===arguments.length?a:Array.prototype.join.call(arguments," "))},getCoordinateString:function(a){return O(a*l)},getVerticalCoordinateString:function(a){return O((j-a)*l)},collections:{},newObject:T,putStream:U,events:N,scaleFactor:l,pageSize:{width:k,height:j},output:function(a,b){return na(a,b)},getNumberOfPages:function(){return A.length-1},pages:A},M.addPage=function(){return ia(),this},M.text=function(a,b,c,d,e){if("number"==typeof a){var f=c;c=b,b=a,a=f}"string"==typeof a&&a.match(/[\n\r]/)&&(a=a.split(/\r\n|\r|\n/g)),"number"==typeof d&&(e=d,d=null);var g="",h="Td";if(e){e*=Math.PI/180;var k=Math.cos(e),m=Math.sin(e);g=[O(k),O(m),O(m*-1),O(k),""].join(" "),h="Tm"}if(d=d||{},"noBOM"in d||(d.noBOM=!0),"autoencode"in d||(d.autoencode=!0),"string"==typeof a)a=da(a,d);else{if(!(a instanceof Array))throw new Error('Type of text must be string or Array. "'+a+'" is not recognized.');for(var n=a.concat(),o=[],p=n.length;p--;)o.push(da(n.shift(),d));a=o.join(") Tj\nT* (")}return S("BT\n/"+i+" "+G+" Tf\n"+G*I+" TL\n"+x+"\n"+g+O(b*l)+" "+O((j-c)*l)+" "+h+"\n("+a+") Tj\nET"),this},M.line=function(a,b,c,d){return S(O(a*l)+" "+O((j-b)*l)+" m "+O(c*l)+" "+O((j-d)*l)+" l S"),this},M.lines=function(a,b,c,d,e,f){var g,h,i,k,m,n,o,p,q,r,s,t,u,v,w;for("number"==typeof a&&(h=c,i=a,k=b,a=h,b=i,c=k),e=la(e),d=d===g?[1,1]:d,S(P(b*l)+" "+P((j-c)*l)+" m "),m=d[0],n=d[1],p=a.length,v=b,w=c,o=0;o<p;o++)q=a[o],2===q.length?(v=q[0]*m+v,w=q[1]*n+w,S(P(v*l)+" "+P((j-w)*l)+" l")):(r=q[0]*m+v,s=q[1]*n+w,t=q[2]*m+v,u=q[3]*n+w,v=q[4]*m+v,w=q[5]*n+w,S(P(r*l)+" "+P((j-s)*l)+" "+P(t*l)+" "+P((j-u)*l)+" "+P(v*l)+" "+P((j-w)*l)+" c"));return 1==f&&S(" h"),S(e),this},M.rect=function(a,b,c,d,e){var f=la(e);return S([O(a*l),O((j-b)*l),O(c*l),O(-d*l),"re",f].join(" ")),this},M.triangle=function(a,b,c,d,e,f,g){return this.lines([[c-a,d-b],[e-c,f-d],[a-e,b-f]],a,b,[1,1],g,!0),this},M.roundedRect=function(a,b,c,d,e,f,g){var h=4/3*(Math.SQRT2-1);return this.lines([[c-2*e,0],[e*h,0,e,f-f*h,e,f],[0,d-2*f],[0,f*h,-(e*h),f,-e,f],[-c+2*e,0],[-(e*h),0,-e,-(f*h),-e,-f],[0,-d+2*f],[0,-(f*h),e*h,-f,e,-f]],a+e,b,[1,1],g),this},M.ellipse=function(a,b,c,d,e){var f=la(e),g=4/3*(Math.SQRT2-1)*c,h=4/3*(Math.SQRT2-1)*d;return S([O((a+c)*l),O((j-b)*l),"m",O((a+c)*l),O((j-(b-h))*l),O((a+g)*l),O((j-(b-d))*l),O(a*l),O((j-(b-d))*l),"c"].join(" ")),S([O((a-g)*l),O((j-(b-d))*l),O((a-c)*l),O((j-(b-h))*l),O((a-c)*l),O((j-b)*l),"c"].join(" ")),S([O((a-c)*l),O((j-(b+h))*l),O((a-g)*l),O((j-(b+d))*l),O(a*l),O((j-(b+d))*l),"c"].join(" ")),S([O((a+g)*l),O((j-(b+d))*l),O((a+c)*l),O((j-(b+h))*l),O((a+c)*l),O((j-b)*l),"c",f].join(" ")),this},M.circle=function(a,b,c,d){return this.ellipse(a,b,c,c,d)},M.setProperties=function(a){var b;for(b in J)J.hasOwnProperty(b)&&a[b]&&(J[b]=a[b]);return this},M.setFontSize=function(a){return G=a,this},M.setFont=function(a,b){return i=ja(a,b),this},M.setFontStyle=M.setFontType=function(a){var b;return i=ja(b,a),this},M.getFontList=function(){var a,b,c,d={};for(a in F)if(F.hasOwnProperty(a)){d[a]=c=[];for(b in F[a])F[a].hasOwnProperty(b)&&c.push(b)}return d},M.setLineWidth=function(a){return S((a*l).toFixed(2)+" w"),this},M.setDrawColor=function(a,b,c,d){var e;return e=void 0===b||void 0===d&&a===b===c?"string"==typeof a?a+" G":O(a/255)+" G":void 0===d?"string"==typeof a?[a,b,c,"RG"].join(" "):[O(a/255),O(b/255),O(c/255),"RG"].join(" "):"string"==typeof a?[a,b,c,d,"K"].join(" "):[O(a),O(b),O(c),O(d),"K"].join(" "),S(e),this},M.setFillColor=function(a,b,c,d){var e;return e=void 0===b||void 0===d&&a===b===c?"string"==typeof a?a+" g":O(a/255)+" g":void 0===d?"string"==typeof a?[a,b,c,"rg"].join(" "):[O(a/255),O(b/255),O(c/255),"rg"].join(" "):"string"==typeof a?[a,b,c,d,"k"].join(" "):[O(a),O(b),O(c),O(d),"k"].join(" "),S(e),this},M.setTextColor=function(a,b,c){var d=/#[0-9A-Fa-f]{6}/;if("string"==typeof a&&d.test(a)){var e=a.replace("#",""),f=parseInt(e,16);a=f>>16&255,b=f>>8&255,c=255&f}return x=0===a&&0===b&&0===c||"undefined"==typeof b?P(a/255)+" g":[P(a/255),P(b/255),P(c/255),"rg"].join(" "),this},M.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},M.setLineCap=function(a){var b=this.CapJoinStyles[a];if(void 0===b)throw new Error("Line cap style of '"+a+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return K=b,S(b.toString(10)+" J"),this},M.setLineJoin=function(a){var b=this.CapJoinStyles[a];if(void 0===b)throw new Error("Line join style of '"+a+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return L=b,S(b.toString(10)+" j"),this},M.output=na,M.save=function(a){M.output("save",a)};for(n in b.API)b.API.hasOwnProperty(n)&&("events"===n&&b.API.events.length?!function(a,b){var c,d,e;for(e=b.length-1;e!==-1;e--)c=b[e][0],d=b[e][1],a.subscribe.apply(a,[c].concat("function"==typeof d?[d]:d))}(N,b.API.events):M[n]=b.API[n]);return ba(),i="F1",ia(),N.publish("initialized"),M}"undefined"==typeof btoa&&(a.btoa=function(a){var b,c,d,e,f,g,h,i,j,k="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",l=k.split(""),m=0,n=0,o="",p=[];do b=a.charCodeAt(m++),c=a.charCodeAt(m++),d=a.charCodeAt(m++),i=b<<16|c<<8|d,e=i>>18&63,f=i>>12&63,g=i>>6&63,h=63&i,p[n++]=l[e]+l[f]+l[g]+l[h];while(m<a.length);return o=p.join(""),j=a.length%3,(j?o.slice(0,j-3):o)+"===".slice(j||3)}),"undefined"==typeof atob&&(a.atob=function(a){var b,c,d,e,f,g,h,i,j="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",k=0,l=0,m="",n=[];if(!a)return a;a+="";do e=j.indexOf(a.charAt(k++)),f=j.indexOf(a.charAt(k++)),g=j.indexOf(a.charAt(k++)),h=j.indexOf(a.charAt(k++)),i=e<<18|f<<12|g<<6|h,b=i>>16&255,c=i>>8&255,d=255&i,64===g?n[l++]=String.fromCharCode(b):64===h?n[l++]=String.fromCharCode(b,c):n[l++]=String.fromCharCode(b,c,d);while(k<a.length);return m=n.join("")});var c="function"==typeof Object.keys?function(a){return Object.keys(a).length}:function(a){var b,c=0;for(b in a)a.hasOwnProperty(b)&&c++;return c};return a.PubSub=function(a){this.topics={},this.context=a,this.publish=function(a,b){if(this.topics[a]){var c,d,e,f,g=this.topics[a],h=[],i=function(){};for(b=Array.prototype.slice.call(arguments,1),d=0,e=g.length;d<e;d++)f=g[d],c=f[0],f[1]&&(f[0]=i,h.push(d)),c.apply(this.context,b);for(d=0,e=h.length;d<e;d++)g.splice(h[d],1)}},this.subscribe=function(a,b,c){return this.topics[a]?this.topics[a].push([b,c]):this.topics[a]=[[b,c]],{topic:a,callback:b}},this.unsubscribe=function(a){if(this.topics[a.topic]){var b,c,d=this.topics[a.topic];for(b=0,c=d.length;b<c;b++)d[b][0]===a.callback&&d.splice(b,1)}}},b.API={events:[]},b.version="1.0.0-trunk","function"==typeof define?define(function(){return b}):a.jsPDF=b,b}(self);!function(a){"use strict";var b=a.getCharWidthsArray=function(a,b){b||(b={});var c,d,e,f=b.widths?b.widths:this.internal.getFont().metadata.Unicode.widths,g=f.fof?f.fof:1,h=b.kerning?b.kerning:this.internal.getFont().metadata.Unicode.kerning,i=h.fof?h.fof:1,j=0,k=f[0]||g,l=[];for(c=0,d=a.length;c<d;c++)e=a.charCodeAt(c),l.push((f[e]||k)/g+(h[e]&&h[e][j]||0)/i),j=e;return l},c=function(a){for(var b=a.length,c=0;b;)b--,c+=a[b];return c},d=(a.getStringUnitWidth=function(a,d){return c(b.call(this,a,d))},function(a,b,c,d){for(var e=[],f=0,g=a.length,h=0;f!==g&&h+b[f]<c;)h+=b[f],f++;e.push(a.slice(0,f));var i=f;for(h=0;f!==g;)h+b[f]>d&&(e.push(a.slice(i,f)),h=0,i=f),h+=b[f],f++;return i!==f&&e.push(a.slice(i,f)),e}),e=function(a,e,f){f||(f={});var g,h,i,j,k,l=b(" ",f)[0],m=a.split(" "),n=[],o=[n],p=f.textIndent||0,q=0,r=0;for(i=0,j=m.length;i<j;i++)if(g=m[i],h=b(g,f),r=c(h),p+q+r>e){if(r>e){for(k=d(g,h,e-(p+q),e),n.push(k.shift()),n=[k.pop()];k.length;)o.push([k.shift()]);r=c(h.slice(g.length-n[0].length))}else n=[g];o.push(n),p=r,q=l}else n.push(g),p+=q+r,q=l;var s=[];for(i=0,j=o.length;i<j;i++)s.push(o[i].join(" "));return s};a.splitTextToSize=function(a,b,c){c||(c={});var d,f=c.fontSize||this.internal.getFontSize(),g=function(a){var b={0:1},c={};if(a.widths&&a.kerning)return{widths:a.widths,kerning:a.kerning};var d=this.internal.getFont(a.fontName,a.fontStyle),e="Unicode";return d.metadata[e]?{widths:d.metadata[e].widths||b,kerning:d.metadata[e].kerning||c}:{widths:b,kerning:c}}.call(this,c);d=a.match(/[\n\r]/)?a.split(/\r\n|\r|\n/g):[a];var h=1*this.internal.scaleFactor*b/f;g.textIndent=c.textIndent?1*c.textIndent*this.internal.scaleFactor/f:0;var i,j,k=[];for(i=0,j=d.length;i<j;i++)k=k.concat(e(d[i],h,g));return k}}(jsPDF.API),function(a){"use strict";var b="addImage_",c=["jpeg","jpg","png"],d=function(a){var b=this.internal.newObject(),c=this.internal.write,e=this.internal.putStream;if(a.n=b,c("<</Type /XObject"),c("/Subtype /Image"),c("/Width "+a.w),c("/Height "+a.h),a.cs===this.color_spaces.INDEXED?c("/ColorSpace [/Indexed /DeviceRGB "+(a.pal.length/3-1)+" "+("smask"in a?b+2:b+1)+" 0 R]"):(c("/ColorSpace /"+a.cs),a.cs===this.color_spaces.DEVICE_CMYK&&c("/Decode [1 0 1 0 1 0 1 0]")),c("/BitsPerComponent "+a.bpc),"f"in a&&c("/Filter /"+a.f),"dp"in a&&c("/DecodeParms <<"+a.dp+">>"),"trns"in a&&a.trns.constructor==Array){for(var f="",g=0,h=a.trns.length;g<h;g++)f+=a.trns[g]+" "+a.trns[g]+" ";c("/Mask ["+f+"]")}if("smask"in a&&c("/SMask "+(b+1)+" 0 R"),c("/Length "+a.data.length+">>"),e(a.data),c("endobj"),"smask"in a){var i="/Predictor 15 /Colors 1 /BitsPerComponent "+a.bpc+" /Columns "+a.w,j={w:a.w,h:a.h,cs:"DeviceGray",bpc:a.bpc,dp:i,data:a.smask};"f"in a&&(j.f=a.f),d.call(this,j)}a.cs===this.color_spaces.INDEXED&&(this.internal.newObject(),c("<< /Length "+a.pal.length+">>"),e(this.arrayBufferToBinaryString(new Uint8Array(a.pal))),c("endobj"))},e=function(){var a=this.internal.collections[b+"images"];for(var c in a)d.call(this,a[c])},f=function(){var a,c=this.internal.collections[b+"images"],d=this.internal.write;for(var e in c)a=c[e],d("/I"+a.i,a.n,"0","R")},g=function(b){return b&&"string"==typeof b&&(b=b.toUpperCase()),b in a.image_compression?b:a.image_compression.NONE},h=function(){var a=this.internal.collections[b+"images"];return a||(this.internal.collections[b+"images"]=a={},this.internal.events.subscribe("putResources",e),this.internal.events.subscribe("putXobjectDict",f)),a},i=function(a){var b=0;return a&&(b=Object.keys?Object.keys(a).length:function(a){var b=0;for(var c in a)a.hasOwnProperty(c)&&b++;return b}(a)),b},j=function(a){return"undefined"==typeof a||null===a},k=function(a){},l=function(a){return c.indexOf(a)===-1},m=function(b){return"function"!=typeof a["process"+b.toUpperCase()]},n=function(a){return"object"==typeof a&&1===a.nodeType},o=function(a,b){var c=document.createElement("canvas");c.width=a.clientWidth||a.width,c.height=a.clientHeight||a.height;var d=c.getContext("2d");if(!d)throw"addImage requires canvas to be supported by browser.";return d.drawImage(a,0,0,c.width,c.height),c.toDataURL("png"==b?"image/png":"image/jpeg")},p=function(a,b){var c;if(b)for(var d in b)if(a===b[d].alias){c=b[d];break}return c},q=function(a,b){return a||b||(a=-96,b=-96),a<0&&(a=-1*info.w*72/a/this.internal.scaleFactor),b<0&&(b=-1*info.h*72/b/this.internal.scaleFactor),0===a&&(a=b*info.w/info.h),0===b&&(b=a*info.h/info.w),[a,b]},r=function(a,b,c,d,e,f,g){var h=q(c,d),i=this.internal.getCoordinateString,j=this.internal.getVerticalCoordinateString;c=h[0],d=h[1],g[f]=e,this.internal.write("q",i(c),"0 0",i(d),i(a),j(b+d),"cm /I"+e.i,"Do Q")};a.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",SEPERATION:"Seperation",DEVICE_N:"DeviceN"},a.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"},a.image_compression={NONE:"NONE",FAST:"FAST",MEDIUM:"MEDIUM",SLOW:"SLOW"},a.isString=function(a){return"string"==typeof a},a.extractInfoFromBase64DataURI=function(a){return/^data:([\w]+?\/([\w]+?));base64,(.+?)$/g.exec(a)},a.supportsArrayBuffer=function(){return"function"==typeof ArrayBuffer},a.isArrayBuffer=function(a){return!!this.supportsArrayBuffer()&&a instanceof ArrayBuffer},a.isArrayBufferView=function(a){return!!this.supportsArrayBuffer()&&(a instanceof Int8Array||a instanceof Uint8Array||a instanceof Uint8ClampedArray||a instanceof Int16Array||a instanceof Uint16Array||a instanceof Int32Array||a instanceof Uint32Array||a instanceof Float32Array||a instanceof Float64Array)},a.binaryStringToUint8Array=function(a){for(var b=a.length,c=new Uint8Array(b),d=0;d<b;d++)c[d]=a.charCodeAt(d);return c},a.arrayBufferToBinaryString=function(a){this.isArrayBuffer(a)&&(a=new Uint8Array(a));for(var b="",c=a.byteLength,d=0;d<c;d++)b+=String.fromCharCode(a[d]);return b},a.arrayBufferToBase64=function(a){for(var b,c,d,e,f,g="",h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=new Uint8Array(a),j=i.byteLength,k=j%3,l=j-k,m=0;m<l;m+=3)f=i[m]<<16|i[m+1]<<8|i[m+2],b=(16515072&f)>>18,c=(258048&f)>>12,d=(4032&f)>>6,e=63&f,g+=h[b]+h[c]+h[d]+h[e];return 1==k?(f=i[l],b=(252&f)>>2,c=(3&f)<<4,g+=h[b]+h[c]+"=="):2==k&&(f=i[l]<<8|i[l+1],b=(64512&f)>>10,c=(1008&f)>>4,d=(15&f)<<2,g+=h[b]+h[c]+h[d]+"="),g},a.createImageInfo=function(a,b,c,d,e,f,g,h,i,j,k,l){var m={alias:h,w:b,h:c,cs:d,bpc:e,i:g,data:a};return f&&(m.f=f),i&&(m.dp=i),j&&(m.trns=j),k&&(m.pal=k),l&&(m.smask=l),m},a.addImage=function(a,b,d,e,f,q,s,t){if("number"==typeof b){var u=q;q=f,f=e,e=d,d=b,b=u||"jpeg"}var v,w,x=h.call(this);if(t=g(t),b=b.toLowerCase(),j(s)&&(s=k(a)),n(a)&&(a=o(a,b)),this.isString(a)){var y=this.extractInfoFromBase64DataURI(a);y?(b=y[2],a=atob(y[3]),this.supportsArrayBuffer()&&(w=a,a=this.binaryStringToUint8Array(a))):255!==a.charCodeAt(0)&&(v=p(a,x))}if(l(b))throw new Error("addImage currently only supports formats "+c+", not '"+b+"'");if(m(b))throw new Error("please ensure that the plugin for '"+b+"' support is added");var z=i(x),A=v;if(A||(A=this["process"+b.toUpperCase()](a,z,s,t,w)),!A)throw new Error("An unkwown error occurred whilst processing the image");return r.call(this,d,e,f,q,A,z,x),this};var s=function(a){var b,c;if(255===!a.charCodeAt(0)||216===!a.charCodeAt(1)||255===!a.charCodeAt(2)||224===!a.charCodeAt(3)||!a.charCodeAt(6)==="J".charCodeAt(0)||!a.charCodeAt(7)==="F".charCodeAt(0)||!a.charCodeAt(8)==="I".charCodeAt(0)||!a.charCodeAt(9)==="F".charCodeAt(0)||0===!a.charCodeAt(10))throw new Error("getJpegSize requires a binary string jpeg file");for(var d=256*a.charCodeAt(4)+a.charCodeAt(5),e=4,f=a.length;e<f;){if(e+=d,255!==a.charCodeAt(e))throw new Error("getJpegSize could not find the size of the image");if(192===a.charCodeAt(e+1)||193===a.charCodeAt(e+1)||194===a.charCodeAt(e+1)||195===a.charCodeAt(e+1)||196===a.charCodeAt(e+1)||197===a.charCodeAt(e+1)||198===a.charCodeAt(e+1)||199===a.charCodeAt(e+1))return c=256*a.charCodeAt(e+5)+a.charCodeAt(e+6),b=256*a.charCodeAt(e+7)+a.charCodeAt(e+8),[b,c];e+=2,d=256*a.charCodeAt(e)+a.charCodeAt(e+1)}},t=function(a){var b=a[0]<<8|a[1];if(65496!==b)throw new Error("Supplied data is not a JPEG");for(var c,d,e,f=a.length,g=(a[4]<<8)+a[5],h=4;h<f;){if(h+=g,c=u(a,h),g=(c[2]<<8)+c[3],(192===c[1]||194===c[1])&&255===c[0]&&g>7)return c=u(a,h+5),d=(c[2]<<8)+c[3],e=(c[0]<<8)+c[1],{width:d,height:e};h+=2}throw new Error("getJpegSizeFromBytes could not find the size of the image")},u=function(a,b){return a.subarray(b,b+4)};a.processJPEG=function(a,b,c,d,e){var f,g=this.color_spaces.DEVICE_RGB,h=this.decode.DCT_DECODE,i=8;return this.isString(a)?(f=s(a),this.createImageInfo(a,f[0],f[1],g,i,h,b,c)):(this.isArrayBuffer(a)&&(a=new Uint8Array(a)),this.isArrayBufferView(a)?(f=t(a),a=e||this.arrayBufferToBinaryString(a),this.createImageInfo(a,f.width,f.height,g,i,h,b,c)):null)},a.processJPG=function(a,b,c,d,e){return this.processJPEG(a,b,c,d,e)}}(jsPDF.API);var saveAs=saveAs||navigator.msSaveBlob&&navigator.msSaveBlob.bind(navigator)||function(a){"use strict";var b=a.document,c=function(){return a.URL||a.webkitURL||a},d=a.URL||a.webkitURL||a,e=b.createElementNS("http://www.w3.org/1999/xhtml","a"),f="download"in e,g=function(c){var d=b.createEvent("MouseEvents");return d.initMouseEvent("click",!0,!1,a,0,0,0,0,0,!1,!1,!1,!1,0,null),c.dispatchEvent(d)},h=a.webkitRequestFileSystem,i=a.requestFileSystem||h||a.mozRequestFileSystem,j=function(b){(a.setImmediate||a.setTimeout)(function(){throw b},0)},k="application/octet-stream",l=0,m=[],n=function(){for(var a=m.length;a--;){var b=m[a];"string"==typeof b?d.revokeObjectURL(b):b.remove()}m.length=0},o=function(a,b,c){b=[].concat(b);for(var d=b.length;d--;){var e=a["on"+b[d]];if("function"==typeof e)try{e.call(a,c||a)}catch(a){j(a)}}},p=function(b,d){var j,n,p,q=this,r=b.type,s=!1,t=function(){var a=c().createObjectURL(b);return m.push(a),a},u=function(){o(q,"writestart progress write writeend".split(" "))},v=function(){!s&&j||(j=t(b)),n&&(n.location.href=j),q.readyState=q.DONE,u()},w=function(a){return function(){if(q.readyState!==q.DONE)return a.apply(this,arguments)}},x={create:!0,exclusive:!1};return q.readyState=q.INIT,d||(d="download"),f&&(j=t(b),e.href=j,e.download=d,g(e))?(q.readyState=q.DONE,void u()):(a.chrome&&r&&r!==k&&(p=b.slice||b.webkitSlice,b=p.call(b,0,b.size,k),s=!0),h&&"download"!==d&&(d+=".download"),n=r===k||h?a:a.open(),i?(l+=b.size,void i(a.TEMPORARY,l,w(function(a){a.root.getDirectory("saved",x,w(function(a){var c=function(){a.getFile(d,x,w(function(a){a.createWriter(w(function(c){c.onwriteend=function(b){n.location.href=a.toURL(),m.push(a),q.readyState=q.DONE,o(q,"writeend",b)},c.onerror=function(){var a=c.error;a.code!==a.ABORT_ERR&&v()},"writestart progress write abort".split(" ").forEach(function(a){c["on"+a]=q["on"+a]}),c.write(b),q.abort=function(){c.abort(),q.readyState=q.DONE},q.readyState=q.WRITING}),v)}),v)};a.getFile(d,{create:!1},w(function(a){a.remove(),c()}),w(function(a){a.code===a.NOT_FOUND_ERR?c():v()}))}),v)}),v)):void v())},q=p.prototype,r=function(a,b){return new p(a,b)};return q.abort=function(){var a=this;a.readyState=a.DONE,o(a,"abort")},q.readyState=q.INIT=0,q.WRITING=1,q.DONE=2,q.error=q.onwritestart=q.onprogress=q.onwrite=q.onabort=q.onerror=q.onwriteend=null,a.addEventListener("unload",n,!1),r}(self);!function(a){"use strict";var b=function(){return"function"!=typeof PNG||"function"!=typeof FlateStream},c=function(b){return b!==a.image_compression.NONE&&d()},d=function(){var a="function"==typeof Deflater;if(!a)throw new Error("requires deflate.js for compression");return a},e=function(b,c,d,e){var i=5,n=k;switch(e){case a.image_compression.FAST:i=3,n=j;break;case a.image_compression.MEDIUM:i=6,n=l;break;case a.image_compression.SLOW:i=9,n=m}b=h(b,c,d,n);var o=new Uint8Array(f(i)),p=g(b),q=new Deflater(i),r=q.append(b),s=q.flush(),t=o.length+r.length+s.length,u=new Uint8Array(t+4);return u.set(o),u.set(r,o.length),u.set(s,o.length+r.length),u[t++]=p>>>24&255,u[t++]=p>>>16&255,u[t++]=p>>>8&255,u[t++]=255&p,a.arrayBufferToBinaryString(u)},f=function(a,b){var c=8,d=Math.LOG2E*Math.log(32768)-8,e=d<<4|c,f=e<<8,g=Math.min(3,(b-1&255)>>1);return f|=g<<6,f|=0,f+=31-f%31,[e,255&f&255]},g=function(a,b){for(var c,d=1,e=65535&d,f=d>>>16&65535,g=a.length,h=0;g>0;){c=g>b?b:g,g-=c;do e+=a[h++],f+=e;while(--c);e%=65521,f%=65521}return(f<<16|e)>>>0},h=function(a,b,c,d){for(var e,f,g,h=a.length/b,i=new Uint8Array(a.length+h),j=o(),k=0;k<h;k++){if(g=k*b,e=a.subarray(g,g+b),d)i.set(d(e,c,f),g+k);else{for(var l=0,m=j.length,n=[];l<m;l++)n[l]=j[l](e,c,f);var q=p(n.concat());i.set(n[q],g+k)}f=e}return i},i=function(a,b,c){var d=Array.apply([],a);return d.unshift(0),d},j=function(a,b,c){var d,e=[],f=0,g=a.length;for(e[0]=1;f<g;f++)d=a[f-b]||0,e[f+1]=a[f]-d+256&255;return e},k=function(a,b,c){var d,e=[],f=0,g=a.length;for(e[0]=2;f<g;f++)d=c&&c[f]||0,e[f+1]=a[f]-d+256&255;return e},l=function(a,b,c){var d,e,f=[],g=0,h=a.length;for(f[0]=3;g<h;g++)d=a[g-b]||0,e=c&&c[g]||0,f[g+1]=a[g]+256-(d+e>>>1)&255;return f},m=function(a,b,c){var d,e,f,g,h=[],i=0,j=a.length;for(h[0]=4;i<j;i++)d=a[i-b]||0,e=c&&c[i]||0,f=c&&c[i-b]||0,g=n(d,e,f),h[i+1]=a[i]-g+256&255;return h},n=function(a,b,c){var d=a+b-c,e=Math.abs(d-a),f=Math.abs(d-b),g=Math.abs(d-c);return e<=f&&e<=g?a:f<=g?b:c},o=function(){return[i,j,k,l,m]},p=function(a){for(var b,c,d,e=0,f=a.length;e<f;)b=q(a[e].slice(1)),(b<c||!c)&&(c=b,d=e),e++;return d},q=function(a){for(var b=0,c=a.length,d=0;b<c;)d+=Math.abs(a[b++]);return d};a.processPNG=function(a,d,f,g,h){var i,j,k,l,m,n,o=this.color_spaces.DEVICE_RGB,p=this.decode.FLATE_DECODE,q=8;if(this.isString(a),this.isArrayBuffer(a)&&(a=new Uint8Array(a)),this.isArrayBufferView(a)){if(b())throw new Error("PNG support requires png.js and zlib.js");if(i=new PNG(a),a=i.imgData,q=i.bits,o=i.colorSpace,l=i.colors,[4,6].indexOf(i.colorType)!==-1){if(8===i.bits)for(var r,s,t=window["Uint"+i.pixelBitlength+"Array"],u=new t(i.decodePixels().buffer),v=u.length,w=new Uint8Array(v*i.colors),x=new Uint8Array(v),y=i.pixelBitlength-i.bits,z=0,A=0;z<v;z++){for(r=u[z],s=0;s<y;)w[A++]=r>>>s&255,s+=i.bits;x[z]=r>>>s&255}if(16===i.bits){for(var r,u=new Uint32Array(i.decodePixels().buffer),v=u.length,w=new Uint8Array(v*(32/i.pixelBitlength)*i.colors),x=new Uint8Array(v*(32/i.pixelBitlength)),B=i.colors>1,z=0,A=0,C=0;z<v;)r=u[z++],w[A++]=r>>>0&255,B&&(w[A++]=r>>>16&255,r=u[z++],w[A++]=r>>>0&255),x[C++]=r>>>16&255;q=8}c(g)?(a=e(w,i.width*i.colors,i.colors,g),n=e(x,i.width,1,g)):(a=w,n=x,p=null)}if(3===i.colorType&&(o=this.color_spaces.INDEXED,m=i.palette,i.transparency.indexed)){for(var D=i.transparency.indexed,E=0,z=0,v=D.length;z<v;++z)E+=D[z];if(E/=255,E===v-1&&D.indexOf(0)!==-1)k=[D.indexOf(0)];else if(E!==v){for(var u=i.decodePixels(),x=new Uint8Array(u.length),z=0,v=u.length;z<v;z++)x[z]=D[u[z]];n=e(x,i.width,1)}}return j=p===this.decode.FLATE_DECODE?"/Predictor 15 /Colors "+l+" /BitsPerComponent "+q+" /Columns "+i.width:"/Colors "+l+" /BitsPerComponent "+q+" /Columns "+i.width,(this.isArrayBuffer(a)||this.isArrayBufferView(a))&&(a=this.arrayBufferToBinaryString(a)),(n&&this.isArrayBuffer(n)||this.isArrayBufferView(n))&&(n=this.arrayBufferToBinaryString(n)),this.createImageInfo(a,i.width,i.height,o,q,p,d,f,j,k,m,n)}return info}}(jsPDF.API);var DecodeStream=function(){function a(){this.pos=0,this.bufferLength=0,this.eof=!1,this.buffer=null}return a.prototype={ensureBuffer:function(a){var b=this.buffer,c=b?b.byteLength:0;if(a<c)return b;for(var d=512;d<a;)d<<=1;for(var e=new Uint8Array(d),f=0;f<c;++f)e[f]=b[f];return this.buffer=e},getByte:function(){for(var a=this.pos;this.bufferLength<=a;){if(this.eof)return null;this.readBlock()}return this.buffer[this.pos++]},getBytes:function(a){var b=this.pos;if(a){this.ensureBuffer(b+a);for(var c=b+a;!this.eof&&this.bufferLength<c;)this.readBlock();var d=this.bufferLength;c>d&&(c=d)}else{for(;!this.eof;)this.readBlock();var c=this.bufferLength}return this.pos=c,this.buffer.subarray(b,c)},lookChar:function(){for(var a=this.pos;this.bufferLength<=a;){if(this.eof)return null;this.readBlock()}return String.fromCharCode(this.buffer[this.pos])},getChar:function(){for(var a=this.pos;this.bufferLength<=a;){if(this.eof)return null;this.readBlock()}return String.fromCharCode(this.buffer[this.pos++])},makeSubStream:function(a,b,c){for(var d=a+b;this.bufferLength<=d&&!this.eof;)this.readBlock();return new Stream(this.buffer,a,b,c)},skip:function(a){a||(a=1),this.pos+=a},reset:function(){this.pos=0}},a}(),FlateStream=function(){function a(a){throw new Error(a)}function b(b){var c=0,d=b[c++],e=b[c++];d!=-1&&e!=-1||a("Invalid header in flate stream"),8!=(15&d)&&a("Unknown compression method in flate stream"),((d<<8)+e)%31!=0&&a("Bad FCHECK in flate stream"),32&e&&a("FDICT bit set in flate stream"),this.bytes=b,this.bytesPos=c,this.codeSize=0,this.codeBuf=0,DecodeStream.call(this)}var c=new Uint32Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),d=new Uint32Array([3,4,5,6,7,8,9,10,65547,65549,65551,65553,131091,131095,131099,131103,196643,196651,196659,196667,262211,262227,262243,262259,327811,327843,327875,327907,258,258,258]),e=new Uint32Array([1,2,3,4,65541,65543,131081,131085,196625,196633,262177,262193,327745,327777,393345,393409,459009,459137,524801,525057,590849,591361,657409,658433,724993,727041,794625,798721,868353,876545]),f=[new Uint32Array([459008,524368,524304,524568,459024,524400,524336,590016,459016,524384,524320,589984,524288,524416,524352,590048,459012,524376,524312,589968,459028,524408,524344,590032,459020,524392,524328,59e4,524296,524424,524360,590064,459010,524372,524308,524572,459026,524404,524340,590024,459018,524388,524324,589992,524292,524420,524356,590056,459014,524380,524316,589976,459030,524412,524348,590040,459022,524396,524332,590008,524300,524428,524364,590072,459009,524370,524306,524570,459025,524402,524338,590020,459017,524386,524322,589988,524290,524418,524354,590052,459013,524378,524314,589972,459029,524410,524346,590036,459021,524394,524330,590004,524298,524426,524362,590068,459011,524374,524310,524574,459027,524406,524342,590028,459019,524390,524326,589996,524294,524422,524358,590060,459015,524382,524318,589980,459031,524414,524350,590044,459023,524398,524334,590012,524302,524430,524366,590076,459008,524369,524305,524569,459024,524401,524337,590018,459016,524385,524321,589986,524289,524417,524353,590050,459012,524377,524313,589970,459028,524409,524345,590034,459020,524393,524329,590002,524297,524425,524361,590066,459010,524373,524309,524573,459026,524405,524341,590026,459018,524389,524325,589994,524293,524421,524357,590058,459014,524381,524317,589978,459030,524413,524349,590042,459022,524397,524333,590010,524301,524429,524365,590074,459009,524371,524307,524571,459025,524403,524339,590022,459017,524387,524323,589990,524291,524419,524355,590054,459013,524379,524315,589974,459029,524411,524347,590038,459021,524395,524331,590006,524299,524427,524363,590070,459011,524375,524311,524575,459027,524407,524343,590030,459019,524391,524327,589998,524295,524423,524359,590062,459015,524383,524319,589982,459031,524415,524351,590046,459023,524399,524335,590014,524303,524431,524367,590078,459008,524368,524304,524568,459024,524400,524336,590017,459016,524384,524320,589985,524288,524416,524352,590049,459012,524376,524312,589969,459028,524408,524344,590033,459020,524392,524328,590001,524296,524424,524360,590065,459010,524372,524308,524572,459026,524404,524340,590025,459018,524388,524324,589993,524292,524420,524356,590057,459014,524380,524316,589977,459030,524412,524348,590041,459022,524396,524332,590009,524300,524428,524364,590073,459009,524370,524306,524570,459025,524402,524338,590021,459017,524386,524322,589989,524290,524418,524354,590053,459013,524378,524314,589973,459029,524410,524346,590037,459021,524394,524330,590005,524298,524426,524362,590069,459011,524374,524310,524574,459027,524406,524342,590029,459019,524390,524326,589997,524294,524422,524358,590061,459015,524382,524318,589981,459031,524414,524350,590045,459023,524398,524334,590013,524302,524430,524366,590077,459008,524369,524305,524569,459024,524401,524337,590019,459016,524385,524321,589987,524289,524417,524353,590051,459012,524377,524313,589971,459028,524409,524345,590035,459020,524393,524329,590003,524297,524425,524361,590067,459010,524373,524309,524573,459026,524405,524341,590027,459018,524389,524325,589995,524293,524421,524357,590059,459014,524381,524317,589979,459030,524413,524349,590043,459022,524397,524333,590011,524301,524429,524365,590075,459009,524371,524307,524571,459025,524403,524339,590023,459017,524387,524323,589991,524291,524419,524355,590055,459013,524379,524315,589975,459029,524411,524347,590039,459021,524395,524331,590007,524299,524427,524363,590071,459011,524375,524311,524575,459027,524407,524343,590031,459019,524391,524327,589999,524295,524423,524359,590063,459015,524383,524319,589983,459031,524415,524351,590047,459023,524399,524335,590015,524303,524431,524367,590079]),9],g=[new Uint32Array([327680,327696,327688,327704,327684,327700,327692,327708,327682,327698,327690,327706,327686,327702,327694,0,327681,327697,327689,327705,327685,327701,327693,327709,327683,327699,327691,327707,327687,327703,327695,0]),5]; |
||
0 ignored issues
–
show
Comprehensibility
Naming
Best Practice
introduced
by
The variable
u already seems to be declared on line 1 . Consider using another variable name or omitting the var keyword.
This check looks for variables that are declared in multiple lines. There may be several reasons for this. In the simplest case the variable name was reused by mistake. This may lead to very hard to locate bugs. If you want to reuse a variable for another purpose, consider declaring it at or near the top of your function and just assigning to it subsequently so it is always declared. ![]() Curly braces around statements make for more readable code and help prevent bugs when you add further statements.
Consider adding curly braces around all statements when they are executed conditionally. This is optional if there is only one statement, but leaving them out can lead to unexpected behaviour if another statement is added later. Consider: if (a > 0)
b = 42;
If you or someone else later decides to put another statement in, only the first statement will be executed. if (a > 0)
console.log("a > 0");
b = 42;
In this case the statement if (a > 0) {
console.log("a > 0");
b = 42;
}
ensures that the proper code will be executed conditionally no matter how many statements are added or removed. ![]() Comprehensibility
Naming
Best Practice
introduced
by
The variable
z already seems to be declared on line 1 . Consider using another variable name or omitting the var keyword.
This check looks for variables that are declared in multiple lines. There may be several reasons for this. In the simplest case the variable name was reused by mistake. This may lead to very hard to locate bugs. If you want to reuse a variable for another purpose, consider declaring it at or near the top of your function and just assigning to it subsequently so it is always declared. ![]() Comprehensibility
Naming
Best Practice
introduced
by
The variable
w already seems to be declared on line 1 . Consider using another variable name or omitting the var keyword.
This check looks for variables that are declared in multiple lines. There may be several reasons for this. In the simplest case the variable name was reused by mistake. This may lead to very hard to locate bugs. If you want to reuse a variable for another purpose, consider declaring it at or near the top of your function and just assigning to it subsequently so it is always declared. ![]() Comprehensibility
Naming
Best Practice
introduced
by
The variable
A already seems to be declared on line 1 . Consider using another variable name or omitting the var keyword.
This check looks for variables that are declared in multiple lines. There may be several reasons for this. In the simplest case the variable name was reused by mistake. This may lead to very hard to locate bugs. If you want to reuse a variable for another purpose, consider declaring it at or near the top of your function and just assigning to it subsequently so it is always declared. ![]() Comprehensibility
Naming
Best Practice
introduced
by
The variable
c already seems to be declared on line 1 . Consider using another variable name or omitting the var keyword.
This check looks for variables that are declared in multiple lines. There may be several reasons for this. In the simplest case the variable name was reused by mistake. This may lead to very hard to locate bugs. If you want to reuse a variable for another purpose, consider declaring it at or near the top of your function and just assigning to it subsequently so it is always declared. ![]() Comprehensibility
Naming
Best Practice
introduced
by
The variable
v already seems to be declared on line 1 . Consider using another variable name or omitting the var keyword.
This check looks for variables that are declared in multiple lines. There may be several reasons for this. In the simplest case the variable name was reused by mistake. This may lead to very hard to locate bugs. If you want to reuse a variable for another purpose, consider declaring it at or near the top of your function and just assigning to it subsequently so it is always declared. ![]() Comprehensibility
Naming
Best Practice
introduced
by
The variable
r already seems to be declared on line 1 . Consider using another variable name or omitting the var keyword.
This check looks for variables that are declared in multiple lines. There may be several reasons for this. In the simplest case the variable name was reused by mistake. This may lead to very hard to locate bugs. If you want to reuse a variable for another purpose, consider declaring it at or near the top of your function and just assigning to it subsequently so it is always declared. ![]() There is no return statement if
q.readyState !== q.DONE is false . Are you sure this is correct? If so, consider adding return; explicitly.
This check looks for functions where a Consider this little piece of code function isBig(a) {
if (a > 5000) {
return "yes";
}
}
console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined
The function This behaviour may not be what you had intended. In any case, you can add a
![]() |
|||
2 | return b.prototype=Object.create(DecodeStream.prototype),b.prototype.getBits=function(b){for(var c,d=this.codeSize,e=this.codeBuf,f=this.bytes,g=this.bytesPos;d<b;)"undefined"==typeof(c=f[g++])&&a("Bad encoding in flate stream"),e|=c<<d,d+=8;return c=e&(1<<b)-1,this.codeBuf=e>>b,this.codeSize=d-=b,this.bytesPos=g,c},b.prototype.getCode=function(b){for(var c=b[0],d=b[1],e=this.codeSize,f=this.codeBuf,g=this.bytes,h=this.bytesPos;e<d;){var i;"undefined"==typeof(i=g[h++])&&a("Bad encoding in flate stream"),f|=i<<e,e+=8}var j=c[f&(1<<d)-1],k=j>>16,l=65535&j;return(0==e||e<k||0==k)&&a("Bad encoding in flate stream"),this.codeBuf=f>>k,this.codeSize=e-k,this.bytesPos=h,l},b.prototype.generateHuffmanTable=function(a){for(var b=a.length,c=0,d=0;d<b;++d)a[d]>c&&(c=a[d]);for(var e=1<<c,f=new Uint32Array(e),g=1,h=0,i=2;g<=c;++g,h<<=1,i<<=1)for(var j=0;j<b;++j)if(a[j]==g){for(var k=0,l=h,d=0;d<g;++d)k=k<<1|1&l,l>>=1;for(var d=k;d<e;d+=i)f[d]=g<<16|j;++h}return[f,c]},b.prototype.readBlock=function(){function b(a,b,c,d,e){for(var f=a.getBits(c)+d;f-- >0;)b[x++]=e}var h=this.getBits(3);if(1&h&&(this.eof=!0),h>>=1,0==h){var i,j=this.bytes,k=this.bytesPos;"undefined"==typeof(i=j[k++])&&a("Bad block header in flate stream");var l=i;"undefined"==typeof(i=j[k++])&&a("Bad block header in flate stream"),l|=i<<8,"undefined"==typeof(i=j[k++])&&a("Bad block header in flate stream");var m=i;"undefined"==typeof(i=j[k++])&&a("Bad block header in flate stream"),m|=i<<8,m!=(65535&~l)&&a("Bad uncompressed block length in flate stream"),this.codeBuf=0,this.codeSize=0;var n=this.bufferLength,o=this.ensureBuffer(n+l),p=n+l;this.bufferLength=p;for(var q=n;q<p;++q){if("undefined"==typeof(i=j[k++])){this.eof=!0;break}o[q]=i}return void(this.bytesPos=k)}var r,s;if(1==h)r=f,s=g;else if(2==h){for(var t=this.getBits(5)+257,u=this.getBits(5)+1,v=this.getBits(4)+4,w=Array(c.length),x=0;x<v;)w[c[x++]]=this.getBits(3);for(var y=this.generateHuffmanTable(w),z=0,x=0,A=t+u,B=new Array(A);x<A;){var C=this.getCode(y);16==C?b(this,B,2,3,z):17==C?b(this,B,3,3,z=0):18==C?b(this,B,7,11,z=0):B[x++]=z=C}r=this.generateHuffmanTable(B.slice(0,t)),s=this.generateHuffmanTable(B.slice(t,A))}else a("Unknown block type in flate stream");for(var o=this.buffer,D=o?o.length:0,E=this.bufferLength;;){var F=this.getCode(r);if(F<256)E+1>=D&&(o=this.ensureBuffer(E+1),D=o.length),o[E++]=F;else{if(256==F)return void(this.bufferLength=E);F-=257,F=d[F];var G=F>>16;G>0&&(G=this.getBits(G));var z=(65535&F)+G;F=this.getCode(s),F=e[F],G=F>>16,G>0&&(G=this.getBits(G));var H=(65535&F)+G;E+z>=D&&(o=this.ensureBuffer(E+z),D=o.length);for(var I=0;I<z;++I,++E)o[E]=o[E-H]}}},b}();(function(){var a;a=function(){function a(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p;for(this.data=a,this.pos=8,this.palette=[],this.imgData=[],this.transparency={},this.animation=null,this.text={},g=null;;){switch(b=this.readUInt32(),k=function(){var a,b;for(b=[],h=a=0;a<4;h=++a)b.push(String.fromCharCode(this.data[this.pos++]));return b}.call(this).join("")){case"IHDR":this.width=this.readUInt32(),this.height=this.readUInt32(),this.bits=this.data[this.pos++],this.colorType=this.data[this.pos++],this.compressionMethod=this.data[this.pos++],this.filterMethod=this.data[this.pos++],this.interlaceMethod=this.data[this.pos++];break;case"acTL":this.animation={numFrames:this.readUInt32(),numPlays:this.readUInt32()||1/0,frames:[]};break;case"PLTE":this.palette=this.read(b);break;case"fcTL":g&&this.animation.frames.push(g),this.pos+=4,g={width:this.readUInt32(),height:this.readUInt32(),xOffset:this.readUInt32(),yOffset:this.readUInt32()},f=this.readUInt16(),e=this.readUInt16()||100,g.delay=1e3*f/e,g.disposeOp=this.data[this.pos++],g.blendOp=this.data[this.pos++],g.data=[];break;case"IDAT":case"fdAT":for("fdAT"===k&&(this.pos+=4,b-=4),a=(null!=g?g.data:void 0)||this.imgData,h=n=0;0<=b?n<b:n>b;h=0<=b?++n:--n)a.push(this.data[this.pos++]);break;case"tRNS":switch(this.transparency={},this.colorType){case 3:if(d=this.palette.length/3,this.transparency.indexed=this.read(b),this.transparency.indexed.length>d)throw new Error("More transparent colors than palette size");if(l=d-this.transparency.indexed.length,l>0)for(h=o=0;0<=l?o<l:o>l;h=0<=l?++o:--o)this.transparency.indexed.push(255);break;case 0:this.transparency.grayscale=this.read(b)[0];break;case 2:this.transparency.rgb=this.read(b)}break;case"tEXt":m=this.read(b),i=m.indexOf(0),j=String.fromCharCode.apply(String,m.slice(0,i)),this.text[j]=String.fromCharCode.apply(String,m.slice(i+1));break;case"IEND":return g&&this.animation.frames.push(g),this.colors=function(){switch(this.colorType){case 0:case 3:case 4:return 1;case 2:case 6:return 3}}.call(this),this.hasAlphaChannel=4===(p=this.colorType)||6===p,c=this.colors+(this.hasAlphaChannel?1:0),this.pixelBitlength=this.bits*c,this.colorSpace=function(){switch(this.colors){case 1:return"DeviceGray";case 3:return"DeviceRGB"}}.call(this),void(this.imgData=new Uint8Array(this.imgData));default:this.pos+=b}if(this.pos+=4,this.pos>this.data.length)throw new Error("Incomplete or corrupt PNG file")}}var b,c,d,e,f,g,h,i;return a.load=function(b,c,d){var e;return"function"==typeof c&&(d=c),e=new XMLHttpRequest,e.open("GET",b,!0),e.responseType="arraybuffer",e.onload=function(){var b,f;return b=new Uint8Array(e.response||e.mozResponseArrayBuffer),f=new a(b),"function"==typeof(null!=c?c.getContext:void 0)&&f.render(c),"function"==typeof d?d(f):void 0},e.send(null)},e=0,d=1,f=2,c=0,b=1,a.prototype.read=function(a){var b,c,d;for(d=[],b=c=0;0<=a?c<a:c>a;b=0<=a?++c:--c)d.push(this.data[this.pos++]);return d},a.prototype.readUInt32=function(){var a,b,c,d;return a=this.data[this.pos++]<<24,b=this.data[this.pos++]<<16,c=this.data[this.pos++]<<8,d=this.data[this.pos++],a|b|c|d},a.prototype.readUInt16=function(){var a,b;return a=this.data[this.pos++]<<8,b=this.data[this.pos++],a|b},a.prototype.decodePixels=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x;if(null==a&&(a=this.imgData),0===a.length)return new Uint8Array(0);for(a=new FlateStream(a),a=a.getBytes(),m=this.pixelBitlength/8,q=m*this.width,n=new Uint8Array(q*this.height),g=a.length,p=0,o=0,c=0;o<g;){switch(a[o++]){case 0:for(e=t=0;t<q;e=t+=1)n[c++]=a[o++];break;case 1:for(e=u=0;u<q;e=u+=1)b=a[o++],f=e<m?0:n[c-m],n[c++]=(b+f)%256;break;case 2:for(e=v=0;v<q;e=v+=1)b=a[o++],d=(e-e%m)/m,r=p&&n[(p-1)*q+d*m+e%m],n[c++]=(r+b)%256;break;case 3:for(e=w=0;w<q;e=w+=1)b=a[o++],d=(e-e%m)/m,f=e<m?0:n[c-m],r=p&&n[(p-1)*q+d*m+e%m],n[c++]=(b+Math.floor((f+r)/2))%256;break;case 4:for(e=x=0;x<q;e=x+=1)b=a[o++],d=(e-e%m)/m,f=e<m?0:n[c-m],0===p?r=s=0:(r=n[(p-1)*q+d*m+e%m],s=d&&n[(p-1)*q+(d-1)*m+e%m]),h=f+r-s,i=Math.abs(h-f),k=Math.abs(h-r),l=Math.abs(h-s),j=i<=k&&i<=l?f:k<=l?r:s,n[c++]=(b+j)%256;break;default:throw new Error("Invalid filter algorithm: "+a[o-1])}p++}return n},a.prototype.decodePalette=function(){var a,b,c,d,e,f,g,h,i,j;for(d=this.palette,g=this.transparency.indexed||[],f=new Uint8Array((g.length||0)+d.length),e=0,c=d.length,a=0,b=h=0,i=d.length;h<i;b=h+=3)f[e++]=d[b],f[e++]=d[b+1],f[e++]=d[b+2],f[e++]=null!=(j=g[a++])?j:255;return f},a.prototype.copyToImageData=function(a,b){var c,d,e,f,g,h,i,j,k,l,m;if(d=this.colors,k=null,c=this.hasAlphaChannel,this.palette.length&&(k=null!=(m=this._decodedPalette)?m:this._decodedPalette=this.decodePalette(),d=4,c=!0),e=a.data||a,j=e.length,g=k||b,f=h=0,1===d)for(;f<j;)i=k?4*b[f/4]:h,l=g[i++],e[f++]=l,e[f++]=l,e[f++]=l,e[f++]=c?g[i++]:255,h=i;else for(;f<j;)i=k?4*b[f/4]:h,e[f++]=g[i++],e[f++]=g[i++],e[f++]=g[i++],e[f++]=c?g[i++]:255,h=i},a.prototype.decode=function(){var a;return a=new Uint8Array(this.width*this.height*4),this.copyToImageData(a,this.decodePixels()),a},h=document.createElement("canvas"),i=h.getContext("2d"),g=function(a){var b;return i.width=a.width,i.height=a.height,i.clearRect(0,0,a.width,a.height),i.putImageData(a,0,0),b=new Image,b.src=h.toDataURL(),b},a.prototype.decodeFrames=function(a){var b,c,d,e,f,h,i,j;if(this.animation){for(i=this.animation.frames,j=[],c=f=0,h=i.length;f<h;c=++f)b=i[c],d=a.createImageData(b.width,b.height),e=this.decodePixels(new Uint8Array(b.data)),this.copyToImageData(d,e),b.imageData=d,j.push(b.image=g(d));return j}},a.prototype.renderFrame=function(a,b){var e,g,h;return g=this.animation.frames,e=g[b],h=g[b-1],0===b&&a.clearRect(0,0,this.width,this.height),(null!=h?h.disposeOp:void 0)===d?a.clearRect(h.xOffset,h.yOffset,h.width,h.height):(null!=h?h.disposeOp:void 0)===f&&a.putImageData(h.imageData,h.xOffset,h.yOffset),e.blendOp===c&&a.clearRect(e.xOffset,e.yOffset,e.width,e.height),a.drawImage(e.image,e.xOffset,e.yOffset)},a.prototype.animate=function(a){var b,c,d,e,f,g,h=this;return c=0,g=this.animation,e=g.numFrames,d=g.frames,f=g.numPlays,(b=function(){var g,i;if(g=c++%e,i=d[g],h.renderFrame(a,g),e>1&&c/e<f)return h.animation._timeout=setTimeout(b,i.delay)})()},a.prototype.stopAnimation=function(){var a;return clearTimeout(null!=(a=this.animation)?a._timeout:void 0)},a.prototype.render=function(a){var b,c;return a._png&&a._png.stopAnimation(),a._png=this,a.width=this.width,a.height=this.height,b=a.getContext("2d"),this.animation?(this.decodeFrames(b),this.animate(b)):(c=b.createImageData(this.width,this.height),this.copyToImageData(c,this.decodePixels()),b.putImageData(c,0,0))},a}(),window.PNG=a}).call(this); |
||
0 ignored issues
–
show
Comprehensibility
Naming
Best Practice
introduced
by
The variable
x already seems to be declared on line 2 . Consider using another variable name or omitting the var keyword.
This check looks for variables that are declared in multiple lines. There may be several reasons for this. In the simplest case the variable name was reused by mistake. This may lead to very hard to locate bugs. If you want to reuse a variable for another purpose, consider declaring it at or near the top of your function and just assigning to it subsequently so it is always declared. ![]() Comprehensibility
Naming
Best Practice
introduced
by
The variable
o already seems to be declared on line 2 . Consider using another variable name or omitting the var keyword.
This check looks for variables that are declared in multiple lines. There may be several reasons for this. In the simplest case the variable name was reused by mistake. This may lead to very hard to locate bugs. If you want to reuse a variable for another purpose, consider declaring it at or near the top of your function and just assigning to it subsequently so it is always declared. ![]() Comprehensibility
Naming
Best Practice
introduced
by
The variable
z already seems to be declared on line 2 . Consider using another variable name or omitting the var keyword.
This check looks for variables that are declared in multiple lines. There may be several reasons for this. In the simplest case the variable name was reused by mistake. This may lead to very hard to locate bugs. If you want to reuse a variable for another purpose, consider declaring it at or near the top of your function and just assigning to it subsequently so it is always declared. ![]() Curly braces around statements make for more readable code and help prevent bugs when you add further statements.
Consider adding curly braces around all statements when they are executed conditionally. This is optional if there is only one statement, but leaving them out can lead to unexpected behaviour if another statement is added later. Consider: if (a > 0)
b = 42;
If you or someone else later decides to put another statement in, only the first statement will be executed. if (a > 0)
console.log("a > 0");
b = 42;
In this case the statement if (a > 0) {
console.log("a > 0");
b = 42;
}
ensures that the proper code will be executed conditionally no matter how many statements are added or removed. ![]() There is no return statement if
this.animation is false . Are you sure this is correct? If so, consider adding return; explicitly.
This check looks for functions where a Consider this little piece of code function isBig(a) {
if (a > 5000) {
return "yes";
}
}
console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined
The function This behaviour may not be what you had intended. In any case, you can add a
![]() Comprehensibility
Naming
Best Practice
introduced
by
The variable
d already seems to be declared on line 2 . Consider using another variable name or omitting the var keyword.
This check looks for variables that are declared in multiple lines. There may be several reasons for this. In the simplest case the variable name was reused by mistake. This may lead to very hard to locate bugs. If you want to reuse a variable for another purpose, consider declaring it at or near the top of your function and just assigning to it subsequently so it is always declared. ![]() There is no return statement if
g = c++ % e, i = d.g, h.... g), e > 1 && c / e < f is false . Are you sure this is correct? If so, consider adding return; explicitly.
This check looks for functions where a Consider this little piece of code function isBig(a) {
if (a > 5000) {
return "yes";
}
}
console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined
The function This behaviour may not be what you had intended. In any case, you can add a
![]() |
This check looks for variables that are declared in multiple lines. There may be several reasons for this.
In the simplest case the variable name was reused by mistake. This may lead to very hard to locate bugs.
If you want to reuse a variable for another purpose, consider declaring it at or near the top of your function and just assigning to it subsequently so it is always declared.