home/aissorg/public_html/admin/assets/js/jspdf.min.js000064400000671552151162562600016725 0ustar00!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.jspdf=e()}(this,function(){"use strict";var t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},e=function(e){var n="1.3",r={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]};function i(t){var n={};this.subscribe=function(t,e,r){if("function"!=typeof e)return!1;n.hasOwnProperty(t)||(n[t]={});var i=Math.random().toString(35);return n[t][i]=[e,!!r],i},this.unsubscribe=function(t){for(var e in n)if(n[e][t])return delete n[e][t],!0;return!1},this.publish=function(r){if(n.hasOwnProperty(r)){var i=Array.prototype.slice.call(arguments,1),o=[];for(var s in n[r]){var a=n[r][s];try{a[0].apply(t,i)}catch(t){e.console&&console.error("jsPDF PubSub Error",t.message,t)}a[1]&&o.push(s)}o.length&&o.forEach(this.unsubscribe)}}}function o(s,a,c,l){var u={};"object"===(void 0===s?"undefined":t(s))&&(s=(u=s).orientation,a=u.unit||a,c=u.format||c,l=u.compress||u.compressPdf||l),a=a||"mm",c=c||"a4",s=(""+(s||"P")).toLowerCase();(""+c).toLowerCase();var h,f,d,p,g,m,w,y,v,b,x=!!l&&"function"==typeof Uint8Array,k=u.textColor||"0 g",_=u.drawColor||"0 G",C=u.fontSize||16,S=u.lineHeight||1.15,T=u.lineWidth||.200025,I=2,P=!1,E=[],O={},F={},R=0,B=[],D=[],j=[],N=[],z=[],L=0,M=0,U=0,H={title:"",subject:"",author:"",keywords:"",creator:""},W={},X=new i(W),V=function(t){return t.toFixed(2)},Y=function(t){return t.toFixed(3)},G=function(t){return("0"+parseInt(t)).slice(-2)},J=function(t){P?B[p].push(t):(U+=t.length+1,N.push(t))},Q=function(){return E[++I]=U,J(I+" 0 obj"),I},K=function(t){J("stream"),J(t),J("endstream")},$=function(){for(var t in J("/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]"),J("/Font <<"),O)O.hasOwnProperty(t)&&J("/"+t+" "+O[t].objectNumber+" 0 R");J(">>"),J("/XObject <<"),X.publish("putXobjectDict"),J(">>")},Z=function(){!function(){for(var t in O)O.hasOwnProperty(t)&&((e=O[t]).objectNumber=Q(),J("<>"),J("endobj"));var e}(),X.publish("putResources"),E[2]=U,J("2 0 obj"),J("<<"),$(),J(">>"),J("endobj"),X.publish("postPutResources")},tt=function(t,e,n){F.hasOwnProperty(e)||(F[e]={}),F[e][n]=t},et=function(t,e,n,r){var i="F"+(Object.keys(O).length+1).toString(10),o=O[i]={id:i,PostScriptName:t,fontName:e,fontStyle:n,encoding:r,metadata:{}};return tt(i,e,n),X.publish("addFont",o),i},nt=function(t,e){return function(t,e){var n,r,i,o,s,a,c,l,u;if(i=(e=e||{}).sourceEncoding||"Unicode",s=e.outputEncoding,(e.autoencode||s)&&O[h].metadata&&O[h].metadata[i]&&O[h].metadata[i].encoding&&(o=O[h].metadata[i].encoding,!s&&O[h].encoding&&(s=O[h].encoding),!s&&o.codePages&&(s=o.codePages[0]),"string"==typeof s&&(s=o[s]),s)){for(c=!1,a=[],n=0,r=t.length;n>8&&(c=!0);t=a.join("")}for(n=t.length;void 0===c&&0!==n;)t.charCodeAt(n-1)>>8&&(c=!0),n--;if(!c)return t;for(a=e.noBOM?[]:[254,255],n=0,r=t.length;n>8)>>8)throw new Error("Character at position "+n+" of string '"+t+"' exceeds 16bits. Cannot be encoded into Utm_2 BE");a.push(u),a.push(l-(u<<8))}return String.fromCharCode.apply(void 0,a)}(t,e).replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},rt=function(){(function(t,e){var n="string"==typeof e&&e.toLowerCase();if("string"==typeof t){var i=t.toLowerCase();r.hasOwnProperty(i)&&(t=r[i][0]/f,e=r[i][1]/f)}if(Array.isArray(t)&&(e=t[1],t=t[0]),n){switch(n.substr(0,1)){case"l":e>t&&(n="s");break;case"p":t>e&&(n="s")}"s"===n&&(d=t,t=e,e=d)}P=!0,B[++R]=[],j[R]={width:Number(t)||g,height:Number(e)||m},D[R]={},it(R)}).apply(this,arguments),J(V(T*f)+" w"),J(_),0!==L&&J(L+" J"),0!==M&&J(M+" j"),X.publish("addPage",{pageNumber:R})},it=function(t){t>0&&t<=R&&(p=t,g=j[t].width,m=j[t].height)},ot=function(t,e){var n;switch(t=void 0!==t?t:O[h].fontName,e=void 0!==e?e:O[h].fontStyle,void 0!==t&&(t=t.toLowerCase()),t){case"sans-serif":case"verdana":case"arial":case"helvetica":t="helvetica";break;case"fixed":case"monospace":case"terminal":case"courier":t="courier";break;case"serif":case"cursive":case"fantasy":default:t="times"}try{n=F[t][e]}catch(t){}return n||null==(n=F.times[e])&&(n=F.times.normal),n},st=function(){P=!1,I=2,U=0,N=[],E=[],z=[],X.publish("buildDocument"),J("%PDF-"+n),function(){var t,n,r,i,s,a,c,l,u,h=[];for(c=e.adler32cs||o.adler32cs,x&&void 0===c&&(x=!1),t=1;t<=R;t++){if(h.push(Q()),l=(g=j[t].width)*f,u=(m=j[t].height)*f,J("<>"),J("endobj"),n=B[t].join("\n"),Q(),x){for(r=[],i=n.length;i--;)r[i]=n.charCodeAt(i);a=c.from(n),(s=new q(6)).append(new Uint8Array(r)),n=s.flush(),(r=new Uint8Array(n.length+6)).set(new Uint8Array([120,156])),r.set(n,2),r.set(new Uint8Array([255&a,a>>8&255,a>>16&255,a>>24&255]),n.length+2),n=String.fromCharCode.apply(null,r),J("<>")}else J("<>");K(n),J("endobj")}E[1]=U,J("1 0 obj"),J("<>"),J("endobj"),X.publish("postPutPages")}(),function(){X.publish("putAdditionalObjects");for(var t=0;t>"),J("endobj"),Q(),J("<<"),function(){switch(J("/Type /Catalog"),J("/Pages 1 0 R"),y||(y="fullwidth"),y){case"fullwidth":J("/OpenAction [3 0 R /FitH null]");break;case"fullheight":J("/OpenAction [3 0 R /FitV null]");break;case"fullpage":J("/OpenAction [3 0 R /Fit]");break;case"original":J("/OpenAction [3 0 R /XYZ null null 1]");break;default:var t=""+y;"%"===t.substr(t.length-1)&&(y=parseInt(y)/100),"number"==typeof y&&J("/OpenAction [3 0 R /XYZ null null "+V(y)+"]")}switch(v||(v="continuous"),v){case"continuous":J("/PageLayout /OneColumn");break;case"single":J("/PageLayout /SinglePage");break;case"two":case"twoleft":J("/PageLayout /TwoColumnLeft");break;case"tworight":J("/PageLayout /TwoColumnRight")}w&&J("/PageMode /"+w),X.publish("putCatalog")}(),J(">>"),J("endobj");var t,r=U,i="0000000000";for(J("xref"),J("0 "+(I+1)),J(i+" 65535 f "),t=1;t<=I;t++){var s=E[t];J("function"==typeof s?(i+E[t]()).slice(-10)+" 00000 n ":(i+E[t]).slice(-10)+" 00000 n ")}return J("trailer"),J("<<"),J("/Size "+(I+1)),J("/Root "+I+" 0 R"),J("/Info "+(I-1)+" 0 R"),J(">>"),J("startxref"),J(""+r),J("%%EOF"),P=!0,N.join("\n")},at=function(t){var e="S";return"F"===t?e="f":"FD"===t||"DF"===t?e="B":"f"!==t&&"f*"!==t&&"B"!==t&&"B*"!==t||(e=t),e},ct=function(){for(var t=st(),e=t.length,n=new ArrayBuffer(e),r=new Uint8Array(n);e--;)r[e]=t.charCodeAt(e);return n},lt=function(){return new Blob([ct()],{type:"application/pdf"})},ut=((b=function(t,n){var r="dataur"===(""+t).substr(0,6)?"data:application/pdf;base64,"+btoa(st()):0;switch(t){case void 0:return st();case"save":if(navigator.getUserMedia&&(void 0===e.URL||void 0===e.URL.createObjectURL))return W.output("dataurlnewwindow");A(lt(),n),"function"==typeof A.unload&&e.setTimeout&&setTimeout(A.unload,911);break;case"arraybuffer":return ct();case"blob":return lt();case"bloburi":case"bloburl":return e.URL&&e.URL.createObjectURL(lt())||void 0;case"datauristring":case"dataurlstring":return r;case"dataurlnewwindow":var i=e.open(r);if(i||"undefined"==typeof safari)return i;case"datauri":case"dataurl":return e.document.location.href=r;default:throw new Error('Output type "'+t+'" is not supported.')}}).foo=function(){try{return b.apply(this,arguments)}catch(r){var t=r.stack||"";~t.indexOf(" at ")&&(t=t.split(" at ")[1]);var n="Error in function "+t.split("\n")[0].split("<")[0]+": "+r.message;if(!e.console)throw new Error(n);e.console.error(n,r),e.alert&&alert(n)}},b.foo.bar=b,b.foo);switch(a){case"pt":f=1;break;case"mm":f=72/25.4000508;break;case"cm":f=72/2.54000508;break;case"in":f=72;break;case"px":f=96/72;break;case"pc":case"em":f=12;break;case"ex":f=6;break;default:throw"Invalid unit: "+a}for(var ht in W.internal={pdfEscape:nt,getStyle:at,getFont:function(){return O[ot.apply(W,arguments)]},getFontSize:function(){return C},getLineHeight:function(){return C*S},write:function(t){J(1===arguments.length?t:Array.prototype.join.call(arguments," "))},getCoordinateString:function(t){return V(t*f)},getVerticalCoordinateString:function(t){return V((m-t)*f)},collections:{},newObject:Q,newAdditionalObject:function(){var t=2*B.length+1,e={objId:t+=z.length,content:""};return z.push(e),e},newObjectDeferred:function(){return E[++I]=function(){return U},I},newObjectDeferredBegin:function(t){E[t]=U},putStream:K,events:X,scaleFactor:f,pageSize:{get width(){return g},get height(){return m}},output:function(t,e){return ut(t,e)},getNumberOfPages:function(){return B.length-1},pages:B,out:J,f2:V,getPageInfo:function(t){return{objId:2*(t-1)+3,pageNumber:t,pageContext:D[t]}},getCurrentPageInfo:function(){return{objId:2*(p-1)+3,pageNumber:p,pageContext:D[p]}},getPDFVersion:function(){return n}},W.addPage=function(){return rt.apply(this,arguments),this},W.setPage=function(){return it.apply(this,arguments),this},W.insertPage=function(t){return this.addPage(),this.movePage(p,t),this},W.movePage=function(t,e){if(t>e){for(var n=B[t],r=j[t],i=D[t],o=t;o>e;o--)B[o]=B[o-1],j[o]=j[o-1],D[o]=D[o-1];B[e]=n,j[e]=r,D[e]=i,this.setPage(e)}else if(t0&&t<=R&&(B.splice(t,1),j.splice(t,1),p>--R&&(p=R),this.setPage(p))}.apply(this,arguments),this},W.setDisplayMode=function(t,e,n){return y=t,v=e,w=n,this},W.text=function(t,e,n,r,i,o){function s(t){return t=t.split("\t").join(Array(u.TabLen||9).join(" ")),nt(t,r)}"number"==typeof t&&(d=n,n=e,e=t,t=d),"string"==typeof t&&(t=t.match(/[\n\r]/)?t.split(/\r\n|\r|\n/g):[t]),"string"==typeof i&&(o=i,i=null),"string"==typeof r&&(o=r,r=null),"number"==typeof r&&(i=r,r=null);var a="",c="Td";if(i){i*=Math.PI/180;var l=Math.cos(i),p=Math.sin(i);a=[V(l),V(p),V(-1*p),V(l),""].join(" "),c="Tm"}"noBOM"in(r=r||{})||(r.noBOM=!0),"autoencode"in r||(r.autoencode=!0);var g,w="",y=this.internal.getCurrentPageInfo().pageContext;if(!0===r.stroke?!0!==y.lastTextWasStroke&&(w="1 Tr\n",y.lastTextWasStroke=!0):(y.lastTextWasStroke&&(w="0 Tr\n"),y.lastTextWasStroke=!1),void 0===this._runningPageHeight&&(this._runningPageHeight=0),"string"==typeof t)t=s(t);else{if("[object Array]"!==Object.prototype.toString.call(t))throw new Error('Type of text must be string or Array. "'+t+'" is not recognized.');for(var v=t.concat(),b=[],x=v.length;x--;)b.push(s(v.shift()));var _=Math.ceil((m-n-this._runningPageHeight)*f/(C*S));if(0<=_&&b.length,o){var A,q,T,I=C*S,P=t.map(function(t){return this.getStringUnitWidth(t)*C/f},this);if(T=Math.max.apply(Math,P),"center"===o)A=e-T/2,e-=P[0]/2;else{if("right"!==o)throw new Error('Unrecognized alignment option, use "center" or "right".');A=e-T,e-=P[0]}q=e,t=b[0];var E=1;for(x=b.length;E>16&255,e=r>>8&255,n=255&r}return k=0===t&&0===e&&0===n||void 0===e?Y(t/255)+" g":[Y(t/255),Y(e/255),Y(n/255),"rg"].join(" "),this},W.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},W.setLineCap=function(t){var e=this.CapJoinStyles[t];if(void 0===e)throw new Error("Line cap style of '"+t+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return L=e,J(e+" J"),this},W.setLineJoin=function(t){var e=this.CapJoinStyles[t];if(void 0===e)throw new Error("Line join style of '"+t+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return M=e,J(e+" j"),this},W.output=ut,W.save=function(t){W.output("save",t)},o.API)o.API.hasOwnProperty(ht)&&("events"===ht&&o.API.events.length?function(t,e){var n,r,i;for(i=e.length-1;-1!==i;i--)n=e[i][0],r=e[i][1],t.subscribe.apply(t,[n].concat("function"==typeof r?[r]:r))}(X,o.API.events):W[ht]=o.API[ht]);return function(){for(var t=[["Helvetica","helvetica","normal"],["Helvetica-Bold","helvetica","bold"],["Helvetica-Oblique","helvetica","italic"],["Helvetica-BoldOblique","helvetica","bolditalic"],["Courier","courier","normal"],["Courier-Bold","courier","bold"],["Courier-Oblique","courier","italic"],["Courier-BoldOblique","courier","bolditalic"],["Times-Roman","times","normal"],["Times-Bold","times","bold"],["Times-Italic","times","italic"],["Times-BoldItalic","times","bolditalic"],["ZapfDingbats","zapfdingbats"]],e=0,n=t.length;e>\n",this.acroformPlugin.xForms.push(a)}if(i.appearanceStreamContent){for(var c in s+="/AP << ",i.appearanceStreamContent){var l=i.appearanceStreamContent[c];if(s+="/"+c+" ",s+="<< ",Object.keys(l).length>=1||Array.isArray(l))for(var r in l){var h;"function"==typeof(h=l[r])&&(h=h.call(this,i)),s+="/"+r+" "+h+" ",this.acroformPlugin.xForms.indexOf(h)>=0||this.acroformPlugin.xForms.push(h)}else"function"==typeof(h=l)&&(h=h.call(this,i)),s+="/"+r+" "+h+" \n",this.acroformPlugin.xForms.indexOf(h)>=0||this.acroformPlugin.xForms.push(h);s+=" >>\n"}s+=">>\n"}s+=">>\nendobj\n",this.internal.out(s)}e&&u.call(this,this.acroformPlugin.xForms)},u=function(t){for(var e in t){var n=e,r=t[e];this.internal.newObjectDeferredBegin(r&&r.objId);var i="";i+=r?r.getString():"",this.internal.out(i),delete t[n]}};t.addField=function(t){return t instanceof n.TextField?f.call(this,t):t instanceof n.ChoiceField?d.call(this,t):t instanceof n.Button?h.call(this,t):t instanceof n.ChildClass?s.call(this,t):t&&s.call(this,t),t.page=this.acroformPlugin.internal.getCurrentPageInfo().pageNumber,this};var h=function(t){(t=t||new n.Field).FT="/Btn";var e=t.Ff||0;t.pushbutton&&(e=n.internal.setBitPosition(e,17),delete t.pushbutton),t.radio&&(e=n.internal.setBitPosition(e,16),delete t.radio),t.noToggleToOff&&(e=n.internal.setBitPosition(e,15)),t.Ff=e,s.call(this,t)},f=function(t){(t=t||new n.Field).FT="/Tx";var e=t.Ff||0;t.multiline&&(e|=4096),t.password&&(e|=8192),t.fileSelect&&(e|=1<<20),t.doNotSpellCheck&&(e|=1<<22),t.doNotScroll&&(e|=1<<23),t.Ff=t.Ff||e,s.call(this,t)},d=function(t){var e=t||new n.Field;e.FT="/Ch";var r=e.Ff||0;e.combo&&(r=n.internal.setBitPosition(r,18),delete e.combo),e.edit&&(r=n.internal.setBitPosition(r,19),delete e.edit),e.sort&&(r=n.internal.setBitPosition(r,20),delete e.sort),e.multiSelect&&this.internal.getPDFVersion()>=1.4&&(r=n.internal.setBitPosition(r,22),delete e.multiSelect),e.doNotSpellCheck&&this.internal.getPDFVersion()>=1.4&&(r=n.internal.setBitPosition(r,23),delete e.doNotSpellCheck),e.Ff=r,s.call(this,e)}})(e.API);var n,i,o,s,a,c,l,u,h,f,d,p,m,w,y,v,x,k,_,C=window.AcroForm;C.internal={},C.createFormXObject=function(t){var e=new C.FormXObject,n=C.Appearance.internal.getHeight(t)||0,r=C.Appearance.internal.getWidth(t)||0;return e.BBox=[0,0,r,n],e},C.Appearance={CheckBox:{createAppearanceStream:function(){return{N:{On:C.Appearance.CheckBox.YesNormal},D:{On:C.Appearance.CheckBox.YesPushDown,Off:C.Appearance.CheckBox.OffPushDown}}},createMK:function(){return"<< /CA (3)>>"},YesPushDown:function(t){var e=C.createFormXObject(t),n="";t.Q=1;var r=C.internal.calculateX(t,"3","ZapfDingbats",50);return n+="0.749023 g\n 0 0 "+C.Appearance.internal.getWidth(t)+" "+C.Appearance.internal.getHeight(t)+" re\n f\n BMC\n q\n 0 0 1 rg\n /F13 "+r.fontSize+" Tf 0 g\n BT\n",n+=r.text,n+="ET\n Q\n EMC\n",e.stream=n,e},YesNormal:function(t){var e=C.createFormXObject(t),n="";t.Q=1;var r=C.internal.calculateX(t,"3","ZapfDingbats",.9*C.Appearance.internal.getHeight(t));return n+="1 g\n0 0 "+C.Appearance.internal.getWidth(t)+" "+C.Appearance.internal.getHeight(t)+" re\nf\nq\n0 0 1 rg\n0 0 "+(C.Appearance.internal.getWidth(t)-1)+" "+(C.Appearance.internal.getHeight(t)-1)+" re\nW\nn\n0 g\nBT\n/F13 "+r.fontSize+" Tf 0 g\n",n+=r.text,n+="ET\n Q\n",e.stream=n,e},OffPushDown:function(t){var e=C.createFormXObject(t),n="";return n+="0.749023 g\n 0 0 "+C.Appearance.internal.getWidth(t)+" "+C.Appearance.internal.getHeight(t)+" re\n f\n",e.stream=n,e}},RadioButton:{Circle:{createAppearanceStream:function(t){var e={D:{Off:C.Appearance.RadioButton.Circle.OffPushDown},N:{}};return e.N[t]=C.Appearance.RadioButton.Circle.YesNormal,e.D[t]=C.Appearance.RadioButton.Circle.YesPushDown,e},createMK:function(){return"<< /CA (l)>>"},YesNormal:function(t){var e=C.createFormXObject(t),n="",r=C.Appearance.internal.getWidth(t)<=C.Appearance.internal.getHeight(t)?C.Appearance.internal.getWidth(t)/4:C.Appearance.internal.getHeight(t)/4;r*=.9;var i=C.Appearance.internal.Bezier_C;return n+="q\n1 0 0 1 "+C.Appearance.internal.getWidth(t)/2+" "+C.Appearance.internal.getHeight(t)/2+" cm\n"+r+" 0 m\n"+r+" "+r*i+" "+r*i+" "+r+" 0 "+r+" c\n-"+r*i+" "+r+" -"+r+" "+r*i+" -"+r+" 0 c\n-"+r+" -"+r*i+" -"+r*i+" -"+r+" 0 -"+r+" c\n"+r*i+" -"+r+" "+r+" -"+r*i+" "+r+" 0 c\nf\nQ\n",e.stream=n,e},YesPushDown:function(t){var e=C.createFormXObject(t),n="",r=C.Appearance.internal.getWidth(t)<=C.Appearance.internal.getHeight(t)?C.Appearance.internal.getWidth(t)/4:C.Appearance.internal.getHeight(t)/4,i=2*(r*=.9),o=i*C.Appearance.internal.Bezier_C,s=r*C.Appearance.internal.Bezier_C;return n+="0.749023 g\n q\n 1 0 0 1 "+C.Appearance.internal.getWidth(t)/2+" "+C.Appearance.internal.getHeight(t)/2+" cm\n"+i+" 0 m\n"+i+" "+o+" "+o+" "+i+" 0 "+i+" c\n-"+o+" "+i+" -"+i+" "+o+" -"+i+" 0 c\n-"+i+" -"+o+" -"+o+" -"+i+" 0 -"+i+" c\n"+o+" -"+i+" "+i+" -"+o+" "+i+" 0 c\n f\n Q\n 0 g\n q\n 1 0 0 1 "+C.Appearance.internal.getWidth(t)/2+" "+C.Appearance.internal.getHeight(t)/2+" cm\n"+r+" 0 m\n"+r+" "+s+" "+s+" "+r+" 0 "+r+" c\n-"+s+" "+r+" -"+r+" "+s+" -"+r+" 0 c\n-"+r+" -"+s+" -"+s+" -"+r+" 0 -"+r+" c\n"+s+" -"+r+" "+r+" -"+s+" "+r+" 0 c\n f\n Q\n",e.stream=n,e},OffPushDown:function(t){var e=C.createFormXObject(t),n="",r=C.Appearance.internal.getWidth(t)<=C.Appearance.internal.getHeight(t)?C.Appearance.internal.getWidth(t)/4:C.Appearance.internal.getHeight(t)/4,i=2*(r*=.9),o=i*C.Appearance.internal.Bezier_C;return n+="0.749023 g\n q\n 1 0 0 1 "+C.Appearance.internal.getWidth(t)/2+" "+C.Appearance.internal.getHeight(t)/2+" cm\n"+i+" 0 m\n"+i+" "+o+" "+o+" "+i+" 0 "+i+" c\n-"+o+" "+i+" -"+i+" "+o+" -"+i+" 0 c\n-"+i+" -"+o+" -"+o+" -"+i+" 0 -"+i+" c\n"+o+" -"+i+" "+i+" -"+o+" "+i+" 0 c\n f\n Q\n",e.stream=n,e}},Cross:{createAppearanceStream:function(t){var e={D:{Off:C.Appearance.RadioButton.Cross.OffPushDown},N:{}};return e.N[t]=C.Appearance.RadioButton.Cross.YesNormal,e.D[t]=C.Appearance.RadioButton.Cross.YesPushDown,e},createMK:function(){return"<< /CA (8)>>"},YesNormal:function(t){var e=C.createFormXObject(t),n="",r=C.Appearance.internal.calculateCross(t);return n+="q\n 1 1 "+(C.Appearance.internal.getWidth(t)-2)+" "+(C.Appearance.internal.getHeight(t)-2)+" re\n W\n n\n "+r.x1.x+" "+r.x1.y+" m\n "+r.x2.x+" "+r.x2.y+" l\n "+r.x4.x+" "+r.x4.y+" m\n "+r.x3.x+" "+r.x3.y+" l\n s\n Q\n",e.stream=n,e},YesPushDown:function(t){var e=C.createFormXObject(t),n=C.Appearance.internal.calculateCross(t),r="";return r+="0.749023 g\n 0 0 "+C.Appearance.internal.getWidth(t)+" "+C.Appearance.internal.getHeight(t)+" re\n f\n q\n 1 1 "+(C.Appearance.internal.getWidth(t)-2)+" "+(C.Appearance.internal.getHeight(t)-2)+" re\n W\n n\n "+n.x1.x+" "+n.x1.y+" m\n "+n.x2.x+" "+n.x2.y+" l\n "+n.x4.x+" "+n.x4.y+" m\n "+n.x3.x+" "+n.x3.y+" l\n s\n Q\n",e.stream=r,e},OffPushDown:function(t){var e=C.createFormXObject(t),n="";return n+="0.749023 g\n 0 0 "+C.Appearance.internal.getWidth(t)+" "+C.Appearance.internal.getHeight(t)+" re\n f\n",e.stream=n,e}}},createDefaultAppearanceStream:function(t){return"/Helv 0 Tf 0 g","/Helv 0 Tf 0 g"}},C.Appearance.internal={Bezier_C:.551915024494,calculateCross:function(t){var e,n,r=C.Appearance.internal.getWidth(t),i=C.Appearance.internal.getHeight(t),o=(e=r)>(n=i)?n:e;return{x1:{x:(r-o)/2,y:(i-o)/2+o},x2:{x:(r-o)/2+o,y:(i-o)/2},x3:{x:(r-o)/2,y:(i-o)/2},x4:{x:(r-o)/2+o,y:(i-o)/2+o}}}},C.Appearance.internal.getWidth=function(t){return t.Rect[2]},C.Appearance.internal.getHeight=function(t){return t.Rect[3]},C.internal.inherit=function(t,e){Object.create;t.prototype=Object.create(e.prototype),t.prototype.constructor=t},C.internal.arrayToPdfArray=function(t){if(Array.isArray(t)){var e=" [";for(var n in t){e+=t[n].toString(),e+=n>\n",this.stream&&(t+="stream\n",t+=this.stream,t+="endstream\n"),t+="endobj\n"},C.PDFObject.prototype.getContent=function(){var t="";return t+=function(t){var e="",n=Object.keys(t).filter(function(t){return"content"!=t&&"appearanceStreamContent"!=t&&"_"!=t.substring(0,1)});for(var r in n){var i=n[r],o=t[i];o&&(Array.isArray(o)?e+="/"+i+" "+C.internal.arrayToPdfArray(o)+"\n":o instanceof C.PDFObject?e+="/"+i+" "+o.objId+" 0 R\n":e+="/"+i+" "+o+"\n")}return e}(this)},C.FormXObject=function(){var t;C.PDFObject.call(this),this.Type="/XObject",this.Subtype="/Form",this.FormType=1,this.BBox,this.Matrix,this.Resources="2 0 R",this.PieceInfo,Object.defineProperty(this,"Length",{enumerable:!0,get:function(){return void 0!==t?t.length:0}}),Object.defineProperty(this,"stream",{enumerable:!1,set:function(e){t=e},get:function(){return t||null}})},C.internal.inherit(C.FormXObject,C.PDFObject),C.AcroFormDictionary=function(){C.PDFObject.call(this);var t=[];Object.defineProperty(this,"Kids",{enumerable:!1,configurable:!0,get:function(){return t.length>0?t:void 0}}),Object.defineProperty(this,"Fields",{enumerable:!0,configurable:!0,get:function(){return t}}),this.DA},C.internal.inherit(C.AcroFormDictionary,C.PDFObject),C.Field=function(){var t;C.PDFObject.call(this),Object.defineProperty(this,"Rect",{enumerable:!0,configurable:!1,get:function(){if(t)return t},set:function(e){t=e}});var e,n,r,i="";Object.defineProperty(this,"FT",{enumerable:!0,set:function(t){i=t},get:function(){return i}}),Object.defineProperty(this,"T",{enumerable:!0,configurable:!1,set:function(t){e=t},get:function(){if(!e||e.length<1){if(this instanceof C.ChildClass)return;return"(FieldObject"+C.Field.FieldNum+++")"}return"("==e.substring(0,1)&&e.substring(e.length-1)?e:"("+e+")"}}),Object.defineProperty(this,"DA",{enumerable:!0,get:function(){if(n)return"("+n+")"},set:function(t){n=t}}),Object.defineProperty(this,"DV",{enumerable:!0,configurable:!0,get:function(){if(r)return r},set:function(t){r=t}}),Object.defineProperty(this,"Type",{enumerable:!0,get:function(){return this.hasAnnotation?"/Annot":null}}),Object.defineProperty(this,"Subtype",{enumerable:!0,get:function(){return this.hasAnnotation?"/Widget":null}}),this.BG,Object.defineProperty(this,"hasAnnotation",{enumerable:!1,get:function(){return!!(this.Rect||this.BC||this.BG)}}),Object.defineProperty(this,"hasAppearanceStream",{enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(this,"page",{enumerable:!1,configurable:!0,writable:!0})},C.Field.FieldNum=0,C.internal.inherit(C.Field,C.PDFObject),C.ChoiceField=function(){C.Field.call(this),this.FT="/Ch",this.Opt=[],this.V="()",this.TI=0,this.combo=!1,Object.defineProperty(this,"edit",{enumerable:!0,set:function(t){1==t?(this._edit=!0,this.combo=!0):this._edit=!1},get:function(){return!!this._edit&&this._edit},configurable:!1}),this.hasAppearanceStream=!0,Object.defineProperty(this,"V",{get:function(){C.internal.toPdfString()}})},C.internal.inherit(C.ChoiceField,C.Field),window.ChoiceField=C.ChoiceField,C.ListBox=function(){C.ChoiceField.call(this)},C.internal.inherit(C.ListBox,C.ChoiceField),window.ListBox=C.ListBox,C.ComboBox=function(){C.ListBox.call(this),this.combo=!0},C.internal.inherit(C.ComboBox,C.ListBox),window.ComboBox=C.ComboBox,C.EditBox=function(){C.ComboBox.call(this),this.edit=!0},C.internal.inherit(C.EditBox,C.ComboBox),window.EditBox=C.EditBox,C.Button=function(){C.Field.call(this),this.FT="/Btn"},C.internal.inherit(C.Button,C.Field),window.Button=C.Button,C.PushButton=function(){C.Button.call(this),this.pushbutton=!0},C.internal.inherit(C.PushButton,C.Button),window.PushButton=C.PushButton,C.RadioButton=function(){C.Button.call(this),this.radio=!0;var t,e=[];Object.defineProperty(this,"Kids",{enumerable:!0,get:function(){if(e.length>0)return e}}),Object.defineProperty(this,"__Kids",{get:function(){return e}}),Object.defineProperty(this,"noToggleToOff",{enumerable:!1,get:function(){return t},set:function(e){t=e}})},C.internal.inherit(C.RadioButton,C.Button),window.RadioButton=C.RadioButton,C.ChildClass=function(t,e){C.Field.call(this),this.Parent=t,this._AppearanceType=C.Appearance.RadioButton.Circle,this.appearanceStreamContent=this._AppearanceType.createAppearanceStream(e),this.F=C.internal.setBitPosition(this.F,3,1),this.MK=this._AppearanceType.createMK(),this.AS="/Off",this._Name=e},C.internal.inherit(C.ChildClass,C.Field),C.RadioButton.prototype.setAppearance=function(t){if("createAppearanceStream"in t&&"createMK"in t)for(var e in this.__Kids){var n=this.__Kids[e];n.appearanceStreamContent=t.createAppearanceStream(n._Name),n.MK=t.createMK()}else console.log("Couldn't assign Appearance to RadioButton. Appearance was Invalid!")},C.RadioButton.prototype.createOption=function(t){this.__Kids.length;var n=new C.ChildClass(this,t);return this.__Kids.push(n),e.API.addField(n),n},C.CheckBox=function(){Button.call(this),this.appearanceStreamContent=C.Appearance.CheckBox.createAppearanceStream(),this.MK=C.Appearance.CheckBox.createMK(),this.AS="/On",this.V="/On"},C.internal.inherit(C.CheckBox,C.Button),window.CheckBox=C.CheckBox,C.TextField=function(){var t,e;C.Field.call(this),this.DA=C.Appearance.createDefaultAppearanceStream(),this.F=4,Object.defineProperty(this,"V",{get:function(){return t?"("+t+")":t},enumerable:!0,set:function(e){t=e}}),Object.defineProperty(this,"DV",{get:function(){return e?"("+e+")":e},enumerable:!0,set:function(t){e=t}});var n=!1;Object.defineProperty(this,"multiline",{enumerable:!1,get:function(){return n},set:function(t){n=t}});var r=!1;Object.defineProperty(this,"MaxLen",{enumerable:!0,get:function(){return r},set:function(t){r=t}}),Object.defineProperty(this,"hasAppearanceStream",{enumerable:!1,get:function(){return this.V||this.DV}})},C.internal.inherit(C.TextField,C.Field),window.TextField=C.TextField,C.PasswordField=function(){TextField.call(this),Object.defineProperty(this,"password",{value:!0,enumerable:!1,configurable:!1,writable:!1})},C.internal.inherit(C.PasswordField,C.TextField),window.PasswordField=C.PasswordField,C.internal.calculateFontSpace=function(t,e,n){n=n||"helvetica";var r=C.internal.calculateFontSpace.canvas||(C.internal.calculateFontSpace.canvas=document.createElement("canvas"));(s=r.getContext("2d")).save();var i=e+" "+n;s.font=i;var o=s.measureText(t);s.fontcolor="black";var s=r.getContext("2d");o.height=1.5*s.measureText("3").width,s.restore();o.width;return o},C.internal.calculateX=function(t,e,n,r){r=r||12,n=n||"helvetica";var i={text:"",fontSize:""},o=(e=")"==(e="("==e.substr(0,1)?e.substr(1):e).substr(e.length-1)?e.substr(0,e.length-1):e).split(" "),s=r,a=C.Appearance.internal.getHeight(t)||0;a=a<0?-a:a;var c=C.Appearance.internal.getWidth(t)||0;c=c<0?-c:c;var l=function(t,e,r){if(t+1=o.length-1;if(!x||k){if(x||k){if(k)g=b;else if(t.multiline&&(u+2)*(y+2)+2>a)continue t}else{if(!t.multiline)continue t;if((u+2)*(y+2)+2>a)continue t;g=b}for(var _="",A=p;A<=g;A++)_+=o[A]+" ";switch(_=" "==_.substr(_.length-1)?_.substr(0,_.length-1):_,m=C.internal.calculateFontSpace(_,s+"px",n).width,t.Q){case 2:f=c-m-2;break;case 1:f=(c-m)/2;break;case 0:default:f=2}e+=f+" "+d+" Td\n",e+="("+_+") Tj\n",e+=-f+" 0 Td\n",d=-(s+2),f,m=0,p=g+1,y++,w=""}else w+=" "}break}return i.text=e,i.fontSize=s,i},C.internal.calculateAppearanceStream=function(t){if(t.appearanceStreamContent)return t.appearanceStreamContent;if(t.V||t.DV){var e="",n=t.V||t.DV,r=C.internal.calculateX(t,n);e+="/Tx BMC\nq\n/F1 "+r.fontSize+" Tf\n1 0 0 1 0 0 Tm\n",e+="BT\n",e+=r.text,e+="ET\n",e+="Q\nEMC\n";var i=new C.createFormXObject(t);i.stream=e;return i}},C.internal.calculateCoordinates=function(t,e,n,r){var i={};if(this.internal){var o=function(t){return t*this.internal.scaleFactor};Array.isArray(t)?(t[0]=C.scale(t[0]),t[1]=C.scale(t[1]),t[2]=C.scale(t[2]),t[3]=C.scale(t[3]),i.lowerLeft_X=t[0]||0,i.lowerLeft_Y=o.call(this,this.internal.pageSize.height)-t[3]-t[1]||0,i.upperRight_X=t[0]+t[2]||0,i.upperRight_Y=o.call(this,this.internal.pageSize.height)-t[1]||0):(t=C.scale(t),e=C.scale(e),n=C.scale(n),r=C.scale(r),i.lowerLeft_X=t||0,i.lowerLeft_Y=this.internal.pageSize.height-e||0,i.upperRight_X=t+n||0,i.upperRight_Y=this.internal.pageSize.height-e+r||0)}else Array.isArray(t)?(i.lowerLeft_X=t[0]||0,i.lowerLeft_Y=t[1]||0,i.upperRight_X=t[0]+t[2]||0,i.upperRight_Y=t[1]+t[3]||0):(i.lowerLeft_X=t||0,i.lowerLeft_Y=e||0,i.upperRight_X=t+n||0,i.upperRight_Y=e+r||0);return[i.lowerLeft_X,i.lowerLeft_Y,i.upperRight_X,i.upperRight_Y]},C.internal.calculateColor=function(t,e,n){var r=new Array(3);return r.r=0|t,r.g=0|e,r.b=0|n,r},C.internal.getBitPosition=function(t,e){var n=1;return(t=t||0)|(n<<=e-1)},C.internal.setBitPosition=function(t,e,n){t=t||0;var r=1;if(r<<=e-1,1==(n=n||1))t=t|r;else t=t&~r;return t},e.API.addHTML=function(t,e,n,r,i){if("undefined"==typeof html2canvas&&"undefined"==typeof rasterizeHTML)throw new Error("You need either https://github.com/niklasvh/html2canvas or https://github.com/cburgmer/rasterizeHTML.js");"number"!=typeof e&&(r=e,i=n),"function"==typeof r&&(i=r,r=null);var o=this.internal,s=o.scaleFactor,a=o.pageSize.width,c=o.pageSize.height;if((r=r||{}).onrendered=function(t){e=parseInt(e)||0,n=parseInt(n)||0;var o=r.dim||{},l=o.h||0,u=o.w||Math.min(a,t.width/s)-e,h="JPEG";if(r.format&&(h=r.format),t.height>c&&r.pagesplit){var f=function(){for(var r=0;;){var o=document.createElement("canvas");o.width=Math.min(a*s,t.width),o.height=Math.min(c*s,t.height-r),o.getContext("2d").drawImage(t,0,r,t.width,o.height,0,0,o.width,o.height);var l=[o,e,r?0:n,o.width/s,o.height/s,h,null,"SLOW"];if(this.addImage.apply(this,l),(r+=o.height)>=t.height)break;this.addPage()}i(u,r,null,l)}.bind(this);if("CANVAS"===t.nodeName){var d=new Image;d.onload=f,d.src=t.toDataURL("image/png"),t=d}else f()}else{var p=Math.random().toString(35),g=[t,e,n,u,l,h,p,"SLOW"];this.addImage.apply(this,g),i(u,l,p,g)}}.bind(this),"undefined"!=typeof html2canvas&&!r.rstz)return html2canvas(t,r);if("undefined"!=typeof rasterizeHTML){var l="drawDocument";return"string"==typeof t&&(l=/^http/.test(t)?"drawURL":"drawHTML"),r.width=r.width||a*s,rasterizeHTML[l](t,void 0,r).then(function(t){r.onrendered(t.image)},function(t){i(null,t)})}return null},function(e){var n=["jpeg","jpg","png"],r=function t(e){var n=this.internal.newObject(),r=this.internal.write,i=this.internal.putStream;if(e.n=n,r("<>"),"trns"in e&&e.trns.constructor==Array){for(var o="",s=0,a=e.trns.length;s>"),i(e.data),r("endobj"),"smask"in e){var c="/Predictor "+e.p+" /Colors 1 /BitsPerComponent "+e.bpc+" /Columns "+e.w,l={w:e.w,h:e.h,cs:"DeviceGray",bpc:e.bpc,dp:c,data:e.smask};"f"in e&&(l.f=e.f),t.call(this,l)}e.cs===this.color_spaces.INDEXED&&(this.internal.newObject(),r("<< /Length "+e.pal.length+">>"),i(this.arrayBufferToBinaryString(new Uint8Array(e.pal))),r("endobj"))},i=function(){var t=this.internal.collections.addImage_images;for(var e in t)r.call(this,t[e])},o=function(){var t,e=this.internal.collections.addImage_images,n=this.internal.write;for(var r in e)n("/I"+(t=e[r]).i,t.n,"0","R")},s=function(e){return"object"===(void 0===e?"undefined":t(e))&&1===e.nodeType},a=function(t,e){var n;if(e)for(var r in e)if(t===e[r].alias){n=e[r];break}return n};e.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"},e.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"},e.image_compression={NONE:"NONE",FAST:"FAST",MEDIUM:"MEDIUM",SLOW:"SLOW"},e.sHashCode=function(t){return Array.prototype.reduce&&t.split("").reduce(function(t,e){return(t=(t<<5)-t+e.charCodeAt(0))&t},0)},e.isString=function(t){return"string"==typeof t},e.extractInfoFromBase64DataURI=function(t){return/^data:([\w]+?\/([\w]+?));base64,(.+?)$/g.exec(t)},e.supportsArrayBuffer=function(){return"undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array},e.isArrayBuffer=function(t){return!!this.supportsArrayBuffer()&&t instanceof ArrayBuffer},e.isArrayBufferView=function(t){return!!this.supportsArrayBuffer()&&("undefined"!=typeof Uint32Array&&(t instanceof Int8Array||t instanceof Uint8Array||"undefined"!=typeof Uint8ClampedArray&&t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array))},e.binaryStringToUint8Array=function(t){for(var e=t.length,n=new Uint8Array(e),r=0;r>18]+r[(258048&e)>>12]+r[(4032&e)>>6]+r[63&e];return 1==s?n+=r[(252&(e=i[a]))>>2]+r[(3&e)<<4]+"==":2==s&&(n+=r[(64512&(e=i[a]<<8|i[a+1]))>>10]+r[(1008&e)>>4]+r[(15&e)<<2]+"="),n},e.createImageInfo=function(t,e,n,r,i,o,s,a,c,l,u,h,f){var d={alias:a,w:e,h:n,cs:r,bpc:i,i:s,data:t};return o&&(d.f=o),c&&(d.dp=c),l&&(d.trns=l),u&&(d.pal=u),h&&(d.smask=h),f&&(d.p=f),d},e.addImage=function(r,c,l,u,h,f,d,p,g){if("string"!=typeof c){var m=f;f=h,h=u,u=l,l=c,c=m}if("object"===(void 0===r?"undefined":t(r))&&!s(r)&&"imageData"in r){var w=r;r=w.imageData,c=w.format||c,l=w.x||l||0,u=w.y||u||0,h=w.w||h,f=w.h||f,d=w.alias||d,p=w.compression||p,g=w.rotation||w.angle||g}if(isNaN(l)||isNaN(u))throw console.error("jsPDF.addImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addImage");var y,v,b,x,k=function(){var t=this.internal.collections.addImage_images;return t||(this.internal.collections.addImage_images=t={},this.internal.events.subscribe("putResources",i),this.internal.events.subscribe("putXobjectDict",o)),t}.call(this);if(!(y=a(r,k))&&(s(r)&&(r=function(e,n,r){if("IMG"===e.nodeName&&e.hasAttribute("src")){var i=""+e.getAttribute("src");if(!r&&0===i.indexOf("data:image/"))return i;!n&&/\.png(?:[?#].*)?$/i.test(i)&&(n="png")}if("CANVAS"===e.nodeName)var o=e;else{(o=document.createElement("canvas")).width=e.clientWidth||e.width,o.height=e.clientHeight||e.height;var s=o.getContext("2d");if(!s)throw"addImage requires canvas to be supported by browser.";if(r){var a,c,l,u,h,f,d,p,g=Math.PI/180;"object"===(void 0===r?"undefined":t(r))&&(a=r.x,c=r.y,l=r.bg,r=r.angle),p=r*g,u=Math.abs(Math.cos(p)),h=Math.abs(Math.sin(p)),f=o.width,d=o.height,o.width=d*h+f*u,o.height=d*u+f*h,isNaN(a)&&(a=o.width/2),isNaN(c)&&(c=o.height/2),s.clearRect(0,0,o.width,o.height),s.fillStyle=l||"white",s.fillRect(0,0,o.width,o.height),s.save(),s.translate(a,c),s.rotate(p),s.drawImage(e,-f/2,-d/2),s.rotate(-p),s.translate(-a,-c),s.restore()}else s.drawImage(e,0,0,o.width,o.height)}return o.toDataURL("png"==(""+n).toLowerCase()?"image/png":"image/jpeg")}(r,c,g)),null==d&&(d="string"==typeof(x=r)&&e.sHashCode(x)),!(y=a(d,k)))){if(this.isString(r)){var _=this.extractInfoFromBase64DataURI(r);_?(c=_[2],r=atob(_[3])):137===r.charCodeAt(0)&&80===r.charCodeAt(1)&&78===r.charCodeAt(2)&&71===r.charCodeAt(3)&&(c="png")}if(c=(c||"JPEG").toLowerCase(),b=c,-1===n.indexOf(b))throw new Error("addImage currently only supports formats "+n+", not '"+c+"'");if(function(t){return"function"!=typeof e["process"+t.toUpperCase()]}(c))throw new Error("please ensure that the plugin for '"+c+"' support is added");if(this.supportsArrayBuffer()&&(r instanceof Uint8Array||(v=r,r=this.binaryStringToUint8Array(r))),!(y=this["process"+c.toUpperCase()](r,function(t){var e=0;return t&&(e=Object.keys?Object.keys(t).length:function(t){var e=0;for(var n in t)t.hasOwnProperty(n)&&e++;return e}(t)),e}(k),d,function(t){return t&&"string"==typeof t&&(t=t.toUpperCase()),t in e.image_compression?t:e.image_compression.NONE}(p),v)))throw new Error("An unkwown error occurred whilst processing the image")}return function(t,e,n,r,i,o,s){var a=function(t,e,n){return t||e||(t=-96,e=-96),t<0&&(t=-1*n.w*72/t/this.internal.scaleFactor),e<0&&(e=-1*n.h*72/e/this.internal.scaleFactor),0===t&&(t=e*n.w/n.h),0===e&&(e=t*n.h/n.w),[t,e]}.call(this,n,r,i),c=this.internal.getCoordinateString,l=this.internal.getVerticalCoordinateString;n=a[0],r=a[1],s[o]=i,this.internal.write("q",c(n),"0 0",c(r),c(t),l(e+r),"cm /I"+i.i,"Do Q")}.call(this,l,u,h,f,y,y.i,k),this};var c=function(t,e){return t.subarray(e,e+5)};e.processJPEG=function(t,e,n,r,i){var o,s=this.color_spaces.DEVICE_RGB,a=this.decode.DCT_DECODE;return this.isString(t)?(o=function(t){var e;if(255===!t.charCodeAt(0)||216===!t.charCodeAt(1)||255===!t.charCodeAt(2)||224===!t.charCodeAt(3)||!t.charCodeAt(6)==="J".charCodeAt(0)||!t.charCodeAt(7)==="F".charCodeAt(0)||!t.charCodeAt(8)==="I".charCodeAt(0)||!t.charCodeAt(9)==="F".charCodeAt(0)||0===!t.charCodeAt(10))throw new Error("getJpegSize requires a binary string jpeg file");for(var n=256*t.charCodeAt(4)+t.charCodeAt(5),r=4,i=t.length;r7)return{width:((e=c(t,i+5))[2]<<8)+e[3],height:(e[0]<<8)+e[1],numcomponents:e[4]};i+=2}throw new Error("getJpegSizeFromBytes could not find the size of the image")}(t),t=i||this.arrayBufferToBinaryString(t),this.createImageInfo(t,o.width,o.height,1==o.numcomponents?this.color_spaces.DEVICE_GRAY:s,8,a,e,n)):null)},e.processJPG=function(){return this.processJPEG.apply(this,arguments)}}(e.API),function(t){var n={annotations:[],f2:function(t){return t.toFixed(2)},notEmpty:function(t){if(void 0!==t&&""!=t)return!0}};e.API.annotationPlugin=n,e.API.events.push(["addPage",function(t){this.annotationPlugin.annotations[t.pageNumber]=[]}]),t.events.push(["putPage",function(t){for(var e=this.annotationPlugin.annotations[t.pageNumber],r=!1,i=0;i>",u.content=w;var d=u.objId+" 0 R";w="<>";else if(l.options.pageNumber){switch(w="<>",this.internal.write(w))}}this.internal.write("]")}}]),t.createAnnotation=function(t){switch(t.type){case"link":this.link(t.bounds.x,t.bounds.y,t.bounds.w,t.bounds.h,t);break;case"text":case"freetext":this.annotationPlugin.annotations[this.internal.getCurrentPageInfo().pageNumber].push(t)}},t.link=function(t,e,n,r,i){this.annotationPlugin.annotations[this.internal.getCurrentPageInfo().pageNumber].push({x:t,y:e,w:n,h:r,options:i,type:"link"})},t.link=function(t,e,n,r,i){this.annotationPlugin.annotations[this.internal.getCurrentPageInfo().pageNumber].push({x:t,y:e,w:n,h:r,options:i,type:"link"})},t.textWithLink=function(t,e,n,r){var i=this.getTextWidth(t),o=this.internal.getLineHeight();return this.text(t,e,n),n+=.2*o,this.link(e,n-o,i,o,r),i},t.getTextWidth=function(t){var e=this.internal.getFontSize();return this.getStringUnitWidth(t)*e/this.internal.scaleFactor},t.getLineHeight=function(){return this.internal.getLineHeight()}}(e.API),e.API.autoPrint=function(){var t;return this.internal.events.subscribe("postPutResources",function(){t=this.internal.newObject(),this.internal.write("<< /S/Named /Type/Action /N/Print >>","endobj")}),this.internal.events.subscribe("putCatalog",function(){this.internal.write("/OpenAction "+t+" 0 R")}),this},function(t){t.events.push(["initialized",function(){this.canvas.pdf=this}]),t.canvas={getContext:function(t){return this.pdf.context2d._canvas=this,this.pdf.context2d},style:{}},Object.defineProperty(t.canvas,"width",{get:function(){return this._width},set:function(t){this._width=t,this.getContext("2d").pageWrapX=t+1}}),Object.defineProperty(t.canvas,"height",{get:function(){return this._height},set:function(t){this._height=t,this.getContext("2d").pageWrapY=t+1}})}(e.API),n=e.API,c={x:void 0,y:void 0,w:void 0,h:void 0,ln:void 0},l=1,u=function(t,e,n,r,i){c={x:t,y:e,w:n,h:r,ln:i}},h=function(){return c},f={left:0,top:0,bottom:0},n.setHeaderFunction=function(t){a=t},n.getTextDimensions=function(t){var e,n;i=this.internal.getFont().fontName,o=this.table_font_size||this.internal.getFontSize(),s=this.internal.getFont().fontStyle,(n=document.createElement("font")).id="jsPDFCell";try{n.style.fontStyle=s}catch(t){n.style.fontWeight=s}n.style.fontName=i,n.style.fontSize=o+"pt";try{n.textContent=t}catch(e){n.innerText=t}return document.body.appendChild(n),e={w:(n.offsetWidth+1)*(19.049976/25.4),h:(n.offsetHeight+1)*(19.049976/25.4)},document.body.removeChild(n),e},n.cellAddPage=function(){var t=this.margins||f;this.addPage(),u(t.left,t.top,void 0,void 0),l+=1},n.cellInitialize=function(){c={x:void 0,y:void 0,w:void 0,h:void 0,ln:void 0},l=1},n.cell=function(t,e,n,r,i,o,s){var a=h(),c=!1;if(void 0!==a.ln)if(a.ln===o)t=a.x+a.w,e=a.y;else{var l=this.margins||f;a.y+a.h+r+13>=this.internal.pageSize.height-l.bottom&&(this.cellAddPage(),c=!0,this.printHeaders&&this.tableHeaderRow&&this.printHeaderRow(o,!0)),e=h().y+h().h,c&&(e=23)}if(void 0!==i[0])if(this.printingHeaderRow?this.rect(t,e,n,r,"FD"):this.rect(t,e,n,r),"right"===s){i instanceof Array||(i=[i]);for(var d=0;do&&(o=i);return o},n.table=function(t,e,r,i,o){if(!r)throw"No data for PDF table";var s,a,u,h,d,p,g,m,w,y,v=[],b=[],x={},k={},_=[],C=[],A=!1,S=!0,q=12,T=f;if(T.width=this.internal.pageSize.width,o&&(!0===o.autoSize&&(A=!0),!1===o.printHeaders&&(S=!1),o.fontSize&&(q=o.fontSize),o.css&&void 0!==o.css["font-size"]&&(q=16*o.css["font-size"]),o.margins&&(T=o.margins)),this.lnMod=0,c={x:void 0,y:void 0,w:void 0,h:void 0,ln:void 0},l=1,this.printHeaders=S,this.margins=T,this.setFontSize(q),this.table_font_size=q,null==i)v=Object.keys(r[0]);else if(i[0]&&"string"!=typeof i[0])for(a=0,u=i.length;ai&&(i=s)}return i},n.setTableHeaderRow=function(t){this.tableHeaderRow=t},n.printHeaderRow=function(t,e){if(!this.tableHeaderRow)throw"Property tableHeaderRow does not exist.";var n,r,i,o;if(this.printingHeaderRow=!0,void 0!==a){var s=a(this,l);u(s[0],s[1],s[2],s[3],-1)}this.setFontStyle("bold");var c=[];for(i=0,o=this.tableHeaderRow.length;i0&&this.setTableHeaderRow(c),this.setFontStyle("normal"),this.printingHeaderRow=!1},function(t){t.events.push(["initialized",function(){this.context2d.pdf=this,this.context2d.internal.pdf=this,this.context2d.ctx=new n,this.context2d.ctxStack=[],this.context2d.path=[]}]),t.context2d={pageWrapXEnabled:!1,pageWrapYEnabled:!1,pageWrapX:9999999,pageWrapY:9999999,ctx:new n,f2:function(t){return t.toFixed(2)},fillRect:function(t,e,n,r){if(!this._isFillTransparent()){t=this._wrapX(t),e=this._wrapY(e);var i=this._matrix_map_rect(this.ctx._transform,{x:t,y:e,w:n,h:r});this.pdf.rect(i.x,i.y,i.w,i.h,"f")}},strokeRect:function(t,e,n,r){if(!this._isStrokeTransparent()){t=this._wrapX(t),e=this._wrapY(e);var i=this._matrix_map_rect(this.ctx._transform,{x:t,y:e,w:n,h:r});this.pdf.rect(i.x,i.y,i.w,i.h,"s")}},clearRect:function(t,e,n,r){if(!this.ctx.ignoreClearRect){t=this._wrapX(t),e=this._wrapY(e);var i=this._matrix_map_rect(this.ctx._transform,{x:t,y:e,w:n,h:r});this.save(),this.setFillStyle("#ffffff"),this.pdf.rect(i.x,i.y,i.w,i.h,"f"),this.restore()}},save:function(){this.ctx._fontSize=this.pdf.internal.getFontSize();var t=new n;t.copy(this.ctx),this.ctxStack.push(this.ctx),this.ctx=t},restore:function(){this.ctx=this.ctxStack.pop(),this.setFillStyle(this.ctx.fillStyle),this.setStrokeStyle(this.ctx.strokeStyle),this.setFont(this.ctx.font),this.pdf.setFontSize(this.ctx._fontSize),this.setLineCap(this.ctx.lineCap),this.setLineWidth(this.ctx.lineWidth),this.setLineJoin(this.ctx.lineJoin)},rect:function(t,e,n,r){this.moveTo(t,e),this.lineTo(t+n,e),this.lineTo(t+n,e+r),this.lineTo(t,e+r),this.lineTo(t,e),this.closePath()},beginPath:function(){this.path=[]},closePath:function(){this.path.push({type:"close"})},_getRgba:function(t){var e={};if(this.internal.rxTransparent.test(t))e.r=0,e.g=0,e.b=0,e.a=0;else{var n=this.internal.rxRgb.exec(t);null!=n?(e.r=parseInt(n[1]),e.g=parseInt(n[2]),e.b=parseInt(n[3]),e.a=1):null!=(n=this.internal.rxRgba.exec(t))?(e.r=parseInt(n[1]),e.g=parseInt(n[2]),e.b=parseInt(n[3]),e.a=parseFloat(n[4])):(e.a=1,"#"!=t.charAt(0)&&((t=S.colorNameToHex(t))||(t="#000000")),4===t.length?(e.r=t.substring(1,2),e.r+=r,e.g=t.substring(2,3),e.g+=g,e.b=t.substring(3,4),e.b+=b):(e.r=t.substring(1,3),e.g=t.substring(3,5),e.b=t.substring(5,7)),e.r=parseInt(e.r,16),e.g=parseInt(e.g,16),e.b=parseInt(e.b,16))}return e.style=t,e},setFillStyle:function(t){var e,n,r,i;if(this.internal.rxTransparent.test(t))e=0,n=0,r=0,i=0;else{var o=this.internal.rxRgb.exec(t);null!=o?(e=parseInt(o[1]),n=parseInt(o[2]),r=parseInt(o[3]),i=1):null!=(o=this.internal.rxRgba.exec(t))?(e=parseInt(o[1]),n=parseInt(o[2]),r=parseInt(o[3]),i=parseFloat(o[4])):(i=1,"#"!=t.charAt(0)&&((t=S.colorNameToHex(t))||(t="#000000")),4===t.length?(e=t.substring(1,2),e+=e,n=t.substring(2,3),n+=n,r=t.substring(3,4),r+=r):(e=t.substring(1,3),n=t.substring(3,5),r=t.substring(5,7)),e=parseInt(e,16),n=parseInt(n,16),r=parseInt(r,16))}this.ctx.fillStyle=t,this.ctx._isFillTransparent=0==i,this.ctx._fillOpacity=i,this.pdf.setFillColor(e,n,r,{a:i}),this.pdf.setTextColor(e,n,r,{a:i})},setStrokeStyle:function(t){var e=this._getRgba(t);this.ctx.strokeStyle=e.style,this.ctx._isStrokeTransparent=0==e.a,this.ctx._strokeOpacity=e.a,0===e.a?this.pdf.setDrawColor(255,255,255):(e.a,this.pdf.setDrawColor(e.r,e.g,e.b))},fillText:function(t,e,n,r){if(!this._isFillTransparent()){e=this._wrapX(e),n=this._wrapY(n);var i=this._matrix_map_point(this.ctx._transform,[e,n]);e=i[0],n=i[1];var o=57.2958*this._matrix_rotation(this.ctx._transform);if(this.ctx._clip_path.length>0){var s;(s=window.outIntercept?"group"===window.outIntercept.type?window.outIntercept.stream:window.outIntercept:this.pdf.internal.pages[1]).push("q");var a=this.path;this.path=this.ctx._clip_path,this.ctx._clip_path=[],this._fill(null,!0),this.ctx._clip_path=this.path,this.path=a}this.pdf.text(t,e,this._getBaseline(n),null,o),this.ctx._clip_path.length>0&&s.push("Q")}},strokeText:function(t,e,n,r){if(!this._isStrokeTransparent()){e=this._wrapX(e),n=this._wrapY(n);var i=this._matrix_map_point(this.ctx._transform,[e,n]);e=i[0],n=i[1];var o=57.2958*this._matrix_rotation(this.ctx._transform);if(this.ctx._clip_path.length>0){var s;(s=window.outIntercept?"group"===window.outIntercept.type?window.outIntercept.stream:window.outIntercept:this.pdf.internal.pages[1]).push("q");var a=this.path;this.path=this.ctx._clip_path,this.ctx._clip_path=[],this._fill(null,!0),this.ctx._clip_path=this.path,this.path=a}this.pdf.text(t,e,this._getBaseline(n),{stroke:!0},o),this.ctx._clip_path.length>0&&s.push("Q")}},setFont:function(t){if(this.ctx.font=t,null!=(c=/\s*(\w+)\s+(\w+)\s+(\w+)\s+([\d\.]+)(px|pt|em)\s+(.*)?/.exec(t))){var e=c[1],n=(c[2],c[3]),r=c[4],i=c[5],o=c[6];r="px"===i?Math.floor(parseFloat(r)):"em"===i?Math.floor(parseFloat(r)*this.pdf.getFontSize()):Math.floor(parseFloat(r)),this.pdf.setFontSize(r),"bold"===n||"700"===n?this.pdf.setFontStyle("bold"):"italic"===e?this.pdf.setFontStyle("italic"):this.pdf.setFontStyle("normal");var s,a=(h=o).toLowerCase().split(/\s*,\s*/);s=-1!=a.indexOf("arial")?"Arial":-1!=a.indexOf("verdana")?"Verdana":-1!=a.indexOf("helvetica")?"Helvetica":-1!=a.indexOf("sans-serif")?"sans-serif":-1!=a.indexOf("fixed")?"Fixed":-1!=a.indexOf("monospace")?"Monospace":-1!=a.indexOf("terminal")?"Terminal":-1!=a.indexOf("courier")?"Courier":-1!=a.indexOf("times")?"Times":-1!=a.indexOf("cursive")?"Cursive":-1!=a.indexOf("fantasy")?"Fantasy":(a.indexOf("serif"),"Serif"),l="bold"===n?"bold":"normal",this.pdf.setFont(s,l)}else{var c=/(\d+)(pt|px|em)\s+(\w+)\s*(\w+)?/.exec(t);if(null!=c){var l,u=c[1],h=(c[2],c[3]);(l=c[4])||(l="normal"),u="em"===i?Math.floor(parseFloat(r)*this.pdf.getFontSize()):Math.floor(parseFloat(u)),this.pdf.setFontSize(u),this.pdf.setFont(h,l)}}},setTextBaseline:function(t){this.ctx.textBaseline=t},getTextBaseline:function(){return this.ctx.textBaseline},setTextAlign:function(t){this.ctx.textAlign=t},getTextAlign:function(){return this.ctx.textAlign},setLineWidth:function(t){this.ctx.lineWidth=t,this.pdf.setLineWidth(t)},setLineCap:function(t){this.ctx.lineCap=t,this.pdf.setLineCap(t)},setLineJoin:function(t){this.ctx.lineJoin=t,this.pdf.setLineJoin(t)},moveTo:function(t,e){t=this._wrapX(t),e=this._wrapY(e);var n=this._matrix_map_point(this.ctx._transform,[t,e]),r={type:"mt",x:t=n[0],y:e=n[1]};this.path.push(r)},_wrapX:function(t){return this.pageWrapXEnabled?t%this.pageWrapX:t},_wrapY:function(t){return this.pageWrapYEnabled?(this._gotoPage(this._page(t)),(t-this.lastBreak)%this.pageWrapY):t},transform:function(t,e,n,r,i,o){this.ctx._transform=[t,e,n,r,i,o]},setTransform:function(t,e,n,r,i,o){this.ctx._transform=[t,e,n,r,i,o]},_getTransform:function(){return this.ctx._transform},lastBreak:0,pageBreaks:[],_page:function(t){if(this.pageWrapYEnabled){this.lastBreak=0;for(var e=0,n=0,r=0;r=this.pageBreaks[r]){e++,0===this.lastBreak&&n++;var i=this.pageBreaks[r]-this.lastBreak;this.lastBreak=this.pageBreaks[r],n+=Math.floor(i/this.pageWrapY)}if(0===this.lastBreak)n+=Math.floor(t/this.pageWrapY)+1;return n+e}return this.pdf.internal.getCurrentPageInfo().pageNumber},_gotoPage:function(t){},lineTo:function(t,e){t=this._wrapX(t),e=this._wrapY(e);var n=this._matrix_map_point(this.ctx._transform,[t,e]),r={type:"lt",x:t=n[0],y:e=n[1]};this.path.push(r)},bezierCurveTo:function(t,e,n,r,i,o){var s;t=this._wrapX(t),e=this._wrapY(e),n=this._wrapX(n),r=this._wrapY(r),i=this._wrapX(i),o=this._wrapY(o),i=(s=this._matrix_map_point(this.ctx._transform,[i,o]))[0],o=s[1];var a={type:"bct",x1:t=(s=this._matrix_map_point(this.ctx._transform,[t,e]))[0],y1:e=s[1],x2:n=(s=this._matrix_map_point(this.ctx._transform,[n,r]))[0],y2:r=s[1],x:i,y:o};this.path.push(a)},quadraticCurveTo:function(t,e,n,r){var i;t=this._wrapX(t),e=this._wrapY(e),n=this._wrapX(n),r=this._wrapY(r),n=(i=this._matrix_map_point(this.ctx._transform,[n,r]))[0],r=i[1];var o={type:"qct",x1:t=(i=this._matrix_map_point(this.ctx._transform,[t,e]))[0],y1:e=i[1],x:n,y:r};this.path.push(o)},arc:function(t,e,n,r,i,o){t=this._wrapX(t),e=this._wrapY(e);var s=this._matrix_map_point(this.ctx._transform,[t,e]),a={type:"arc",x:t=s[0],y:e=s[1],radius:n,startAngle:r,endAngle:i,anticlockwise:o};this.path.push(a)},drawImage:function(t,e,n,r,i,o,s,a,c){void 0!==o&&(e=o,n=s,r=a,i=c),e=this._wrapX(e),n=this._wrapY(n);var l,u=this._matrix_map_rect(this.ctx._transform,{x:e,y:n,w:r,h:i}),h=(this._matrix_map_rect(this.ctx._transform,{x:o,y:s,w:a,h:c}),/data:image\/(\w+).*/i.exec(t));l=null!=h?h[1]:"png",this.pdf.addImage(t,l,u.x,u.y,u.w,u.h)},_matrix_multiply:function(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],s=e[4],a=e[5],c=n*t[0]+r*t[2],l=i*t[0]+o*t[2],u=s*t[0]+a*t[2]+t[4];return r=n*t[1]+r*t[3],o=i*t[1]+o*t[3],a=s*t[1]+a*t[3]+t[5],[n=c,r,i=l,o,s=u,a]},_matrix_rotation:function(t){return Math.atan2(t[2],t[0])},_matrix_decompose:function(t){var e=t[0],n=t[1],r=t[2],i=t[3],o=Math.sqrt(e*e+n*n),s=(e/=o)*r+(n/=o)*i;r-=e*s,i-=n*s;var a=Math.sqrt(r*r+i*i);return s/=a,e*(i/=a)0){var t;(t=window.outIntercept?"group"===window.outIntercept.type?window.outIntercept.stream:window.outIntercept:this.pdf.internal.pages[1]).push("q");var e=this.path;this.path=this.ctx._clip_path,this.ctx._clip_path=[],this._stroke(!0),this.ctx._clip_path=this.path,this.path=e,this._stroke(!1),t.push("Q")}else this._stroke(!1)},_stroke:function(t){if(t||!this._isStrokeTransparent()){for(var e=[],n=this.path,r=0;r0){var e;(e=window.outIntercept?"group"===window.outIntercept.type?window.outIntercept.stream:window.outIntercept:this.pdf.internal.pages[1]).push("q");var n=this.path;this.path=this.ctx._clip_path,this.ctx._clip_path=[],this._fill(t,!0),this.ctx._clip_path=this.path,this.path=n,this._fill(t,!1),e.push("Q")}else this._fill(t,!1)},_fill:function(t,n){if(!this._isFillTransparent()){var r,i="function"==typeof this.pdf.internal.newObject2;r=window.outIntercept?"group"===window.outIntercept.type?window.outIntercept.stream:window.outIntercept:this.pdf.internal.pages[1];var o=[],s=window.outIntercept;if(i)switch(this.ctx.globalCompositeOperation){case"normal":case"source-over":break;case"destination-in":case"destination-out":var a=this.pdf.internal.newStreamObject(),c=this.pdf.internal.newObject2();c.push("<>"),c.push(">>");var l="MASK"+c.objId;this.pdf.internal.addGraphicsState(l,c.objId);var u="/"+l+" gs";r.splice(0,0,"q"),r.splice(1,0,u),r.push("Q"),window.outIntercept=a;break;default:var h="/"+this.pdf.internal.blendModeMap[this.ctx.globalCompositeOperation.toUpperCase()];h&&this.pdf.internal.out(h+" gs")}var f=this.ctx.globalAlpha;if(this.ctx._fillOpacity<1&&(f=this.ctx._fillOpacity),i){var d=this.pdf.internal.newObject2();d.push("<>");l="GS_O_"+d.objId;this.pdf.internal.addGraphicsState(l,d.objId),this.pdf.internal.out("/"+l+" gs")}for(var p=this.path,g=0;g>"),e.push(">>");var n="MASK"+e.objId;this.pdf.internal.addGraphicsState(n,e.objId);var r="/"+n+" gs";this.pdf.internal.out(r)}else console.log("jsPDF v2 not enabled")},clip:function(){if(this.ctx._clip_path.length>0)for(var t=0;ti)&&(o%=i);var s=n;(si)&&(s%=i);for(var a=[],c=Math.PI/2,l=r?-1:1,u=e,h=Math.min(i,Math.abs(s-o));h>1e-5;){var f=u+l*Math.min(h,c);a.push(this.createSmallArc(t,u,f)),h-=Math.abs(f-u),u=f}return a},e.internal.createSmallArc=function(t,e,n){var r=(n-e)/2,i=t*Math.cos(r),o=t*Math.sin(r),s=i,a=-o,c=s*s+a*a,l=c+s*i+a*o,u=4/3*(Math.sqrt(2*c*l)-l)/(s*o-a*i),h=s-u*a,f=a+u*s,d=h,p=-f,g=r+e,m=Math.cos(g),w=Math.sin(g);return{x1:t*Math.cos(e),y1:t*Math.sin(e),x2:h*m-f*w,y2:h*w+f*m,x3:d*m-p*w,y3:d*w+p*m,x4:t*Math.cos(n),y4:t*Math.sin(n)}}}(e.API),function(e){var n,r,i,o,s,a,c,l,u,h,f,d,p,g,m,w,y,v,b,x;n=function(){return function(e){return t.prototype=e,new t};function t(){}}(),h=function(t){var e,n,r,i,o,s,a;for(n=0,r=t.length,e=void 0,i=!1,s=!1;!i&&n!==r;)(e=t[n]=t[n].trimLeft())&&(i=!0),n++;for(n=r-1;r&&!s&&-1!==n;)(e=t[n]=t[n].trimRight())&&(s=!0),n--;for(o=/\s+$/g,a=!0,n=0;n!==r;)"\u2028"!=t[n]&&(e=t[n].replace(/\s+/g," "),a&&(e=e.trimLeft()),e&&(a=o.test(e)),t[n]=e),n++;return t},d=function(t){var e,n,r;for(e=void 0,n=(r=t.split(",")).shift();!e&&n;)e=i[n.trim().toLowerCase()],n=r.shift();return e},p=function(t){var e;return(t="auto"===t?"0px":t).indexOf("em")>-1&&!isNaN(Number(t.replace("em","")))&&(t=18.719*Number(t.replace("em",""))+"px"),t.indexOf("pt")>-1&&!isNaN(Number(t.replace("pt","")))&&(t=1.333*Number(t.replace("pt",""))+"px"),void 0,16,(e=g[t])?e:void 0!==(e={"xx-small":9,"x-small":11,small:13,medium:16,large:19,"x-large":23,"xx-large":28,auto:0}[{css_line_height_string:t}])?g[t]=e/16:(e=parseFloat(t))?g[t]=e/16:3===(e=t.match(/([\d\.]+)(px)/)).length?g[t]=parseFloat(e[1])/16:g[t]=1},u=function(t){var e,n,r,i,u;return i=t,u=document.defaultView&&document.defaultView.getComputedStyle?document.defaultView.getComputedStyle(i,null):i.currentStyle?i.currentStyle:i.style,n=void 0,(e={})["font-family"]=d((r=function(t){return t=t.replace(/-\D/g,function(t){return t.charAt(1).toUpperCase()}),u[t]})("font-family"))||"times",e["font-style"]=o[r("font-style")]||"normal",e["text-align"]=s[r("text-align")]||"left","bold"===(n=a[r("font-weight")]||"normal")&&("normal"===e["font-style"]?e["font-style"]=n:e["font-style"]=n+e["font-style"]),e["font-size"]=p(r("font-size"))||1,e["line-height"]=p(r("line-height"))||1,e.display="inline"===r("display")?"inline":"block",n="block"===e.display,e["margin-top"]=n&&p(r("margin-top"))||0,e["margin-bottom"]=n&&p(r("margin-bottom"))||0,e["padding-top"]=n&&p(r("padding-top"))||0,e["padding-bottom"]=n&&p(r("padding-bottom"))||0,e["margin-left"]=n&&p(r("margin-left"))||0,e["margin-right"]=n&&p(r("margin-right"))||0,e["padding-left"]=n&&p(r("padding-left"))||0,e["padding-right"]=n&&p(r("padding-right"))||0,e["page-break-before"]=r("page-break-before")||"auto",e.float=c[r("cssFloat")]||"none",e.clear=l[r("clear")]||"none",e.color=r("color"),e},m=function(t,e,n){var r,i,o,s;if(o=!1,i=void 0,s=void 0,void 0,r=n["#"+t.id])if("function"==typeof r)o=r(t,e);else for(i=0,s=r.length;!o&&i!==s;)o=r[i](t,e),i++;if(r=n[t.nodeName],!o&&r)if("function"==typeof r)o=r(t,e);else for(i=0,s=r.length;!o&&i!==s;)o=r[i](t,e),i++;return o},x=function(t,e){var n,r,i,o,s,a,c,l,u;for(n=[],r=[],i=0,u=t.rows[0].cells.length,c=t.clientWidth;ii.pdf.margins_doc.top&&(i.pdf.addPage(),i.y=i.pdf.margins_doc.top,i.executeWatchFunctions(s));var I=u(s),P=i.x,E=12/i.pdf.internal.scaleFactor,O=(I["margin-left"]+I["padding-left"])*E,F=(I["margin-right"]+I["padding-right"])*E,R=(I["margin-top"]+I["padding-top"])*E,B=(I["margin-bottom"]+I["padding-bottom"])*E;void 0!==I.float&&"right"===I.float?P+=i.settings.width-s.width-F:P+=O,i.pdf.addImage(q,P,i.y+R,s.width,s.height),q=void 0,"right"===I.float||"left"===I.float?(i.watchFunctions.push(function(t,e,n,r){return i.y>=e?(i.x+=t,i.settings.width+=n,!0):!!(r&&1===r.nodeType&&!k[r.nodeName]&&i.x+r.width>i.pdf.margins_doc.left+i.pdf.margins_doc.width)&&(i.x+=t,i.y=e,i.settings.width+=n,!0)}.bind(this,"left"===I.float?-s.width-O-F:0,i.y+s.height+R+B,s.width)),i.watchFunctions.push(function(t,e,n){return!(i.y0){i=i[0];var o=e.pdf.internal.write,s=e.y;e.pdf.internal.write=function(){},r(i,e,n);var a=Math.ceil(e.y-s)+5;e.y=s,e.pdf.internal.write=o,e.pdf.margins_doc.bottom+=a;for(var c=function(t){var o=void 0!==t?t.pageNumber:1,s=e.y;e.y=e.pdf.internal.pageSize.height-e.pdf.margins_doc.bottom,e.pdf.margins_doc.bottom-=a;for(var c=i.getElementsByTagName("span"),l=0;l-1&&(c[l].innerHTML=o),(" "+c[l].className+" ").replace(/[\n\t]/g," ").indexOf(" totalPages ")>-1&&(c[l].innerHTML="###jsPDFVarTotalPages###");r(i,e,n),e.pdf.margins_doc.bottom+=a,e.y=s},l=i.getElementsByTagName("span"),u=0;u-1&&e.pdf.internal.events.subscribe("htmlRenderingFinished",e.pdf.putTotalPages.bind(e.pdf,"###jsPDFVarTotalPages###"),!0);e.pdf.internal.events.subscribe("addPage",c,!1),c(),k.FOOTER=1}},b=function(t,e,n,i,o,s){if(!e)return!1;"string"==typeof e||e.parentNode||(e=""+e.innerHTML),"string"==typeof e&&(e=function(t){var e,n,r;return r="jsPDFhtmlText"+Date.now().toString()+(1e3*Math.random()).toFixed(0),"position: absolute !important;clip: rect(1px 1px 1px 1px); /* IE6, IE7 */clip: rect(1px, 1px, 1px, 1px);padding:0 !important;border:0 !important;height: 1px !important;width: 1px !important; top:auto;left:-100px;overflow: hidden;",(n=document.createElement("div")).style.cssText="position: absolute !important;clip: rect(1px 1px 1px 1px); /* IE6, IE7 */clip: rect(1px, 1px, 1px, 1px);padding:0 !important;border:0 !important;height: 1px !important;width: 1px !important; top:auto;left:-100px;overflow: hidden;",n.innerHTML='