UNPKG

gantt-source_management

Version:

Gantt, Schedule,

85 lines 736 kB
function A(A,t){return t.forEach((function(t){t&&"string"!=typeof t&&!Array.isArray(t)&&Object.keys(t).forEach((function(e){if("default"!==e&&!(e in A)){var r=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(A,e,r.get?r:{enumerable:!0,get:function(){return t[e]}})}}))})),Object.freeze(A)}function t(A,t,e,r){return new(e||(e=Promise))((function(n,i){function s(A){try{a(r.next(A))}catch(A){i(A)}}function o(A){try{a(r.throw(A))}catch(A){i(A)}}function a(A){var t;A.done?n(A.value):(t=A.value,t instanceof e?t:new e((function(A){A(t)}))).then(s,o)}a((r=r.apply(A,t||[])).next())}))}function e(A){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(A){return typeof A}:function(A){return A&&"function"==typeof Symbol&&A.constructor===Symbol&&A!==Symbol.prototype?"symbol":typeof A},e(A)}"function"==typeof SuppressedError&&SuppressedError;var r=Uint8Array,n=Uint16Array,i=Uint32Array,s=new r([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),o=new r([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),a=new r([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),c=function(A,t){for(var e=new n(31),r=0;r<31;++r)e[r]=t+=1<<A[r-1];var s=new i(e[30]);for(r=1;r<30;++r)for(var o=e[r];o<e[r+1];++o)s[o]=o-e[r]<<5|r;return[e,s]},u=c(s,2),l=u[0],h=u[1];l[28]=258,h[258]=28;for(var f=c(o,0),d=f[0],g=f[1],p=new n(32768),B=0;B<32768;++B){var w=(43690&B)>>>1|(21845&B)<<1;w=(61680&(w=(52428&w)>>>2|(13107&w)<<2))>>>4|(3855&w)<<4,p[B]=((65280&w)>>>8|(255&w)<<8)>>>1}var m=function(A,t,e){for(var r=A.length,i=0,s=new n(t);i<r;++i)++s[A[i]-1];var o,a=new n(t);for(i=0;i<t;++i)a[i]=a[i-1]+s[i-1]<<1;if(e){o=new n(1<<t);var c=15-t;for(i=0;i<r;++i)if(A[i])for(var u=i<<4|A[i],l=t-A[i],h=a[A[i]-1]++<<l,f=h|(1<<l)-1;h<=f;++h)o[p[h]>>>c]=u}else for(o=new n(r),i=0;i<r;++i)o[i]=p[a[A[i]-1]++]>>>15-A[i];return o},y=new r(288);for(B=0;B<144;++B)y[B]=8;for(B=144;B<256;++B)y[B]=9;for(B=256;B<280;++B)y[B]=7;for(B=280;B<288;++B)y[B]=8;var v=new r(32);for(B=0;B<32;++B)v[B]=5;var b=m(y,9,0),C=m(y,9,1),Q=m(v,5,0),F=m(v,5,1),U=function(A){for(var t=A[0],e=1;e<A.length;++e)A[e]>t&&(t=A[e]);return t},x=function(A,t,e){var r=t/8|0;return(A[r]|A[r+1]<<8)>>>(7&t)&e},E=function(A,t){var e=t/8|0;return(A[e]|A[e+1]<<8|A[e+2]<<16)>>>(7&t)},L=function(A){return(A/8|0)+(7&A&&1)},S=function(A,t,e){(null==t||t<0)&&(t=0),(null==e||e>A.length)&&(e=A.length);var s=new(A instanceof n?n:A instanceof i?i:r)(e-t);return s.set(A.subarray(t,e)),s},I=function(A,t,e){e<<=7&t;var r=t/8|0;A[r]|=e,A[r+1]|=e>>>8},N=function(A,t,e){e<<=7&t;var r=t/8|0;A[r]|=e,A[r+1]|=e>>>8,A[r+2]|=e>>>16},H=function(A,t){for(var e=[],i=0;i<A.length;++i)A[i]&&e.push({s:i,f:A[i]});var s=e.length,o=e.slice();if(!s)return[new r(0),0];if(1==s){var a=new r(e[0].s+1);return a[e[0].s]=1,[a,1]}e.sort((function(A,t){return A.f-t.f})),e.push({s:-1,f:25001});var c=e[0],u=e[1],l=0,h=1,f=2;for(e[0]={s:-1,f:c.f+u.f,l:c,r:u};h!=s-1;)c=e[e[l].f<e[f].f?l++:f++],u=e[l!=h&&e[l].f<e[f].f?l++:f++],e[h++]={s:-1,f:c.f+u.f,l:c,r:u};var d=o[0].s;for(i=1;i<s;++i)o[i].s>d&&(d=o[i].s);var g=new n(d+1),p=P(e[h-1],g,0);if(p>t){i=0;var B=0,w=p-t,m=1<<w;for(o.sort((function(A,t){return g[t.s]-g[A.s]||A.f-t.f}));i<s;++i){var y=o[i].s;if(!(g[y]>t))break;B+=m-(1<<p-g[y]),g[y]=t}for(B>>>=w;B>0;){var v=o[i].s;g[v]<t?B-=1<<t-g[v]++-1:++i}for(;i>=0&&B;--i){var b=o[i].s;g[b]==t&&(--g[b],++B)}p=t}return[new r(g),p]},P=function(A,t,e){return-1==A.s?Math.max(P(A.l,t,e+1),P(A.r,t,e+1)):t[A.s]=e},O=function(A){for(var t=A.length;t&&!A[--t];);for(var e=new n(++t),r=0,i=A[0],s=1,o=function(A){e[r++]=A},a=1;a<=t;++a)if(A[a]==i&&a!=t)++s;else{if(!i&&s>2){for(;s>138;s-=138)o(32754);s>2&&(o(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(o(i),--s;s>6;s-=6)o(8304);s>2&&(o(s-3<<5|8208),s=0)}for(;s--;)o(i);s=1,i=A[a]}return[e.subarray(0,r),t]},T=function(A,t){for(var e=0,r=0;r<t.length;++r)e+=A[r]*t[r];return e},_=function(A,t,e){var r=e.length,n=L(t+2);A[n]=255&r,A[n+1]=r>>>8,A[n+2]=255^A[n],A[n+3]=255^A[n+1];for(var i=0;i<r;++i)A[n+i+4]=e[i];return 8*(n+4+r)},k=function(A,t,e,r,i,c,u,l,h,f,d){I(t,d++,e),++i[256];for(var g=H(i,15),p=g[0],B=g[1],w=H(c,15),C=w[0],F=w[1],U=O(p),x=U[0],E=U[1],L=O(C),S=L[0],P=L[1],k=new n(19),M=0;M<x.length;++M)k[31&x[M]]++;for(M=0;M<S.length;++M)k[31&S[M]]++;for(var D=H(k,7),R=D[0],K=D[1],V=19;V>4&&!R[a[V-1]];--V);var j,G,q,X,z=f+5<<3,W=T(i,y)+T(c,v)+u,Y=T(i,p)+T(c,C)+u+14+3*V+T(k,R)+(2*k[16]+3*k[17]+7*k[18]);if(z<=W&&z<=Y)return _(t,d,A.subarray(h,h+f));if(I(t,d,1+(Y<W)),d+=2,Y<W){j=m(p,B,0),G=p,q=m(C,F,0),X=C;var J=m(R,K,0);I(t,d,E-257),I(t,d+5,P-1),I(t,d+10,V-4),d+=14;for(M=0;M<V;++M)I(t,d+3*M,R[a[M]]);d+=3*V;for(var Z=[x,S],$=0;$<2;++$){var AA=Z[$];for(M=0;M<AA.length;++M){var tA=31&AA[M];I(t,d,J[tA]),d+=R[tA],tA>15&&(I(t,d,AA[M]>>>5&127),d+=AA[M]>>>12)}}}else j=b,G=y,q=Q,X=v;for(M=0;M<l;++M)if(r[M]>255){tA=r[M]>>>18&31;N(t,d,j[tA+257]),d+=G[tA+257],tA>7&&(I(t,d,r[M]>>>23&31),d+=s[tA]);var eA=31&r[M];N(t,d,q[eA]),d+=X[eA],eA>3&&(N(t,d,r[M]>>>5&8191),d+=o[eA])}else N(t,d,j[r[M]]),d+=G[r[M]];return N(t,d,j[256]),d+G[256]},M=new i([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),D=new r(0),R=function(A,t,e,a,c){return function(A,t,e,a,c,u){var l=A.length,f=new r(a+l+5*(1+Math.floor(l/7e3))+c),d=f.subarray(a,f.length-c),p=0;if(!t||l<8)for(var B=0;B<=l;B+=65535){var w=B+65535;w<l?p=_(d,p,A.subarray(B,w)):(d[B]=u,p=_(d,p,A.subarray(B,l)))}else{for(var m=M[t-1],y=m>>>13,v=8191&m,b=(1<<e)-1,C=new n(32768),Q=new n(b+1),F=Math.ceil(e/3),U=2*F,x=function(t){return(A[t]^A[t+1]<<F^A[t+2]<<U)&b},E=new i(25e3),I=new n(288),N=new n(32),H=0,P=0,O=(B=0,0),T=0,R=0;B<l;++B){var K=x(B),V=32767&B,j=Q[K];if(C[V]=j,Q[K]=V,T<=B){var G=l-B;if((H>7e3||O>24576)&&G>423){p=k(A,d,0,E,I,N,P,O,R,B-R,p),O=H=P=0,R=B;for(var q=0;q<286;++q)I[q]=0;for(q=0;q<30;++q)N[q]=0}var X=2,z=0,W=v,Y=V-j&32767;if(G>2&&K==x(B-Y))for(var J=Math.min(y,G)-1,Z=Math.min(32767,B),$=Math.min(258,G);Y<=Z&&--W&&V!=j;){if(A[B+X]==A[B+X-Y]){for(var AA=0;AA<$&&A[B+AA]==A[B+AA-Y];++AA);if(AA>X){if(X=AA,z=Y,AA>J)break;var tA=Math.min(Y,AA-2),eA=0;for(q=0;q<tA;++q){var rA=B-Y+q+32768&32767,nA=rA-C[rA]+32768&32767;nA>eA&&(eA=nA,j=rA)}}}Y+=(V=j)-(j=C[V])+32768&32767}if(z){E[O++]=268435456|h[X]<<18|g[z];var iA=31&h[X],sA=31&g[z];P+=s[iA]+o[sA],++I[257+iA],++N[sA],T=B+X,++H}else E[O++]=A[B],++I[A[B]]}}p=k(A,d,u,E,I,N,P,O,R,B-R,p),u||(p=_(d,p,D))}return S(f,0,a+L(p)+c)}(A,null==t.level?6:t.level,null==t.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(A.length)))):12+t.mem,e,a,!c)};function K(A,t){void 0===t&&(t={});var e=function(){var A=1,t=0;return{p:function(e){for(var r=A,n=t,i=e.length,s=0;s!=i;){for(var o=Math.min(s+5552,i);s<o;++s)n+=r+=e[s];r%=65521,n%=65521}A=r,t=n},d:function(){return(A>>>8<<16|(255&t)<<8|t>>>8)+2*((255&A)<<23)}}}();e.p(A);var r=R(A,t,2,4);return function(A,t){var e=t.level,r=0==e?0:e<6?1:9==e?3:2;A[0]=120,A[1]=r<<6|(r?32-2*r:1)}(r,t),function(A,t,e){for(;e;++t)A[t]=e,e>>>=8}(r,r.length-4,e.d()),r}function V(A,t){return function(A,t,e){var n=A.length,i=!t||e,c=!e||e.i;e||(e={}),t||(t=new r(3*n));var u=function(A){var e=t.length;if(A>e){var n=new r(Math.max(2*e,A));n.set(t),t=n}},h=e.f||0,f=e.p||0,g=e.b||0,p=e.l,B=e.d,w=e.m,y=e.n,v=8*n;do{if(!p){e.f=h=x(A,f,1);var b=x(A,f+1,3);if(f+=3,!b){var Q=A[(R=L(f)+4)-4]|A[R-3]<<8,I=R+Q;if(I>n){if(c)throw"unexpected EOF";break}i&&u(g+Q),t.set(A.subarray(R,I),g),e.b=g+=Q,e.p=f=8*I;continue}if(1==b)p=C,B=F,w=9,y=5;else{if(2!=b)throw"invalid block type";var N=x(A,f,31)+257,H=x(A,f+10,15)+4,P=N+x(A,f+5,31)+1;f+=14;for(var O=new r(P),T=new r(19),_=0;_<H;++_)T[a[_]]=x(A,f+3*_,7);f+=3*H;var k=U(T),M=(1<<k)-1;if(!c&&f+P*(k+7)>v)break;var D=m(T,k,1);for(_=0;_<P;){var R,K=D[x(A,f,M)];if(f+=15&K,(R=K>>>4)<16)O[_++]=R;else{var V=0,j=0;for(16==R?(j=3+x(A,f,3),f+=2,V=O[_-1]):17==R?(j=3+x(A,f,7),f+=3):18==R&&(j=11+x(A,f,127),f+=7);j--;)O[_++]=V}}var G=O.subarray(0,N),q=O.subarray(N);w=U(G),y=U(q),p=m(G,w,1),B=m(q,y,1)}if(f>v)throw"unexpected EOF"}i&&u(g+131072);for(var X=(1<<w)-1,z=(1<<y)-1,W=w+y+18;c||f+W<v;){var Y=(V=p[E(A,f)&X])>>>4;if((f+=15&V)>v)throw"unexpected EOF";if(!V)throw"invalid length/literal";if(Y<256)t[g++]=Y;else{if(256==Y){p=null;break}var J=Y-254;if(Y>264){var Z=s[_=Y-257];J=x(A,f,(1<<Z)-1)+l[_],f+=Z}var $=B[E(A,f)&z],AA=$>>>4;if(!$)throw"invalid distance";if(f+=15&$,q=d[AA],AA>3&&(Z=o[AA],q+=E(A,f)&(1<<Z)-1,f+=Z),f>v)throw"unexpected EOF";i&&u(g+131072);for(var tA=g+J;g<tA;g+=4)t[g]=t[g-q],t[g+1]=t[g+1-q],t[g+2]=t[g+2-q],t[g+3]=t[g+3-q];g=tA}}e.l=p,e.p=f,e.b=g,p&&(h=1,e.m=w,e.d=B,e.n=y)}while(!h);return g==t.length?t:S(t,0,g)}((function(A){if(8!=(15&A[0])||A[0]>>>4>7||(A[0]<<8|A[1])%31)throw"invalid zlib data";if(32&A[1])throw"invalid zlib data: preset dictionaries not supported"}(A),A.subarray(2,-4)),t)} /** @license * * jsPDF - PDF Document creation from JavaScript * Version 2.5.1 Built on 2022-01-28T15:37:57.791Z * CommitID 00000000 * * Copyright (c) 2010-2021 James Hall <james@parall.ax>, https://github.com/MrRio/jsPDF * 2015-2021 yWorks GmbH, http://www.yworks.com * 2015-2021 Lukas Holländer <lukas.hollaender@yworks.com>, https://github.com/HackbrettXXX * 2016-2018 Aras Abbasi <aras.abbasi@gmail.com> * 2010 Aaron Spike, https://github.com/acspike * 2012 Willow Systems Corporation, https://github.com/willowsystems * 2012 Pablo Hess, https://github.com/pablohess * 2012 Florian Jenett, https://github.com/fjenett * 2013 Warren Weckesser, https://github.com/warrenweckesser * 2013 Youssef Beddad, https://github.com/lifof * 2013 Lee Driscoll, https://github.com/lsdriscoll * 2013 Stefan Slonevskiy, https://github.com/stefslon * 2013 Jeremy Morel, https://github.com/jmorel * 2013 Christoph Hartmann, https://github.com/chris-rock * 2014 Juan Pablo Gaviria, https://github.com/juanpgaviria * 2014 James Makes, https://github.com/dollaruw * 2014 Diego Casorran, https://github.com/diegocr * 2014 Steven Spungin, https://github.com/Flamenco * 2014 Kenneth Glassey, https://github.com/Gavvers * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * * Contributor(s): * siefkenj, ahwolf, rickygu, Midnith, saintclair, eaparango, * kim3er, mfo, alnorth, Flamenco */var j=function(){return"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this}();function G(){j.console&&"function"==typeof j.console.log&&j.console.log.apply(j.console,arguments)}var q={log:G,warn:function(A){j.console&&("function"==typeof j.console.warn?j.console.warn.apply(j.console,arguments):G.call(null,arguments))},error:function(A){j.console&&("function"==typeof j.console.error?j.console.error.apply(j.console,arguments):G(A))}};function X(A,t,e){var r=new XMLHttpRequest;r.open("GET",A),r.responseType="blob",r.onload=function(){Z(r.response,t,e)},r.onerror=function(){q.error("could not download file")},r.send()}function z(A){var t=new XMLHttpRequest;t.open("HEAD",A,!1);try{t.send()}catch(A){}return t.status>=200&&t.status<=299}function W(A){try{A.dispatchEvent(new MouseEvent("click"))}catch(e){var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),A.dispatchEvent(t)}}var Y,J,Z=j.saveAs||("object"!==("undefined"==typeof window?"undefined":e(window))||window!==j?function(){}:"undefined"!=typeof HTMLAnchorElement&&"download"in HTMLAnchorElement.prototype?function(A,t,e){var r=j.URL||j.webkitURL,n=document.createElement("a");t=t||A.name||"download",n.download=t,n.rel="noopener","string"==typeof A?(n.href=A,n.origin!==location.origin?z(n.href)?X(A,t,e):W(n,n.target="_blank"):W(n)):(n.href=r.createObjectURL(A),setTimeout((function(){r.revokeObjectURL(n.href)}),4e4),setTimeout((function(){W(n)}),0))}:"msSaveOrOpenBlob"in navigator?function(A,t,r){if(t=t||A.name||"download","string"==typeof A)if(z(A))X(A,t,r);else{var n=document.createElement("a");n.href=A,n.target="_blank",setTimeout((function(){W(n)}))}else navigator.msSaveOrOpenBlob(function(A,t){return void 0===t?t={autoBom:!1}:"object"!==e(t)&&(q.warn("Deprecated: Expected third argument to be a object"),t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(A.type)?new Blob([String.fromCharCode(65279),A],{type:A.type}):A}(A,r),t)}:function(A,t,r,n){if((n=n||open("","_blank"))&&(n.document.title=n.document.body.innerText="downloading..."),"string"==typeof A)return X(A,t,r);var i="application/octet-stream"===A.type,s=/constructor/i.test(j.HTMLElement)||j.safari,o=/CriOS\/[\d]+/.test(navigator.userAgent);if((o||i&&s)&&"object"===("undefined"==typeof FileReader?"undefined":e(FileReader))){var a=new FileReader;a.onloadend=function(){var A=a.result;A=o?A:A.replace(/^data:[^;]*;/,"data:attachment/file;"),n?n.location.href=A:location=A,n=null},a.readAsDataURL(A)}else{var c=j.URL||j.webkitURL,u=c.createObjectURL(A);n?n.location=u:location.href=u,n=null,setTimeout((function(){c.revokeObjectURL(u)}),4e4)}}); /** * A class to parse color values * @author Stoyan Stefanov <sstoo@gmail.com> * {@link http://www.phpied.com/rgb-color-parser-in-javascript/} * @license Use it if you like it */function $(A){var t;A=A||"",this.ok=!1,"#"==A.charAt(0)&&(A=A.substr(1,6));A={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"}[A=(A=A.replace(/ /g,"")).toLowerCase()]||A;for(var e=[{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(A){return[parseInt(A[1]),parseInt(A[2]),parseInt(A[3])]}},{re:/^(\w{2})(\w{2})(\w{2})$/,example:["#00ff00","336699"],process:function(A){return[parseInt(A[1],16),parseInt(A[2],16),parseInt(A[3],16)]}},{re:/^(\w{1})(\w{1})(\w{1})$/,example:["#fb0","f0f"],process:function(A){return[parseInt(A[1]+A[1],16),parseInt(A[2]+A[2],16),parseInt(A[3]+A[3],16)]}}],r=0;r<e.length;r++){var n=e[r].re,i=e[r].process,s=n.exec(A);s&&(t=i(s),this.r=t[0],this.g=t[1],this.b=t[2],this.ok=!0)}this.r=this.r<0||isNaN(this.r)?0:this.r>255?255:this.r,this.g=this.g<0||isNaN(this.g)?0:this.g>255?255:this.g,this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b,this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},this.toHex=function(){var A=this.r.toString(16),t=this.g.toString(16),e=this.b.toString(16);return 1==A.length&&(A="0"+A),1==t.length&&(t="0"+t),1==e.length&&(e="0"+e),"#"+A+t+e}} /** * @license * Joseph Myers does not specify a particular license for his work. * * Author: Joseph Myers * Accessed from: http://www.myersdaily.org/joseph/javascript/md5.js * * Modified by: Owen Leong */ function AA(A,t){var e=A[0],r=A[1],n=A[2],i=A[3];e=eA(e,r,n,i,t[0],7,-680876936),i=eA(i,e,r,n,t[1],12,-389564586),n=eA(n,i,e,r,t[2],17,606105819),r=eA(r,n,i,e,t[3],22,-1044525330),e=eA(e,r,n,i,t[4],7,-176418897),i=eA(i,e,r,n,t[5],12,1200080426),n=eA(n,i,e,r,t[6],17,-1473231341),r=eA(r,n,i,e,t[7],22,-45705983),e=eA(e,r,n,i,t[8],7,1770035416),i=eA(i,e,r,n,t[9],12,-1958414417),n=eA(n,i,e,r,t[10],17,-42063),r=eA(r,n,i,e,t[11],22,-1990404162),e=eA(e,r,n,i,t[12],7,1804603682),i=eA(i,e,r,n,t[13],12,-40341101),n=eA(n,i,e,r,t[14],17,-1502002290),e=rA(e,r=eA(r,n,i,e,t[15],22,1236535329),n,i,t[1],5,-165796510),i=rA(i,e,r,n,t[6],9,-1069501632),n=rA(n,i,e,r,t[11],14,643717713),r=rA(r,n,i,e,t[0],20,-373897302),e=rA(e,r,n,i,t[5],5,-701558691),i=rA(i,e,r,n,t[10],9,38016083),n=rA(n,i,e,r,t[15],14,-660478335),r=rA(r,n,i,e,t[4],20,-405537848),e=rA(e,r,n,i,t[9],5,568446438),i=rA(i,e,r,n,t[14],9,-1019803690),n=rA(n,i,e,r,t[3],14,-187363961),r=rA(r,n,i,e,t[8],20,1163531501),e=rA(e,r,n,i,t[13],5,-1444681467),i=rA(i,e,r,n,t[2],9,-51403784),n=rA(n,i,e,r,t[7],14,1735328473),e=nA(e,r=rA(r,n,i,e,t[12],20,-1926607734),n,i,t[5],4,-378558),i=nA(i,e,r,n,t[8],11,-2022574463),n=nA(n,i,e,r,t[11],16,1839030562),r=nA(r,n,i,e,t[14],23,-35309556),e=nA(e,r,n,i,t[1],4,-1530992060),i=nA(i,e,r,n,t[4],11,1272893353),n=nA(n,i,e,r,t[7],16,-155497632),r=nA(r,n,i,e,t[10],23,-1094730640),e=nA(e,r,n,i,t[13],4,681279174),i=nA(i,e,r,n,t[0],11,-358537222),n=nA(n,i,e,r,t[3],16,-722521979),r=nA(r,n,i,e,t[6],23,76029189),e=nA(e,r,n,i,t[9],4,-640364487),i=nA(i,e,r,n,t[12],11,-421815835),n=nA(n,i,e,r,t[15],16,530742520),e=iA(e,r=nA(r,n,i,e,t[2],23,-995338651),n,i,t[0],6,-198630844),i=iA(i,e,r,n,t[7],10,1126891415),n=iA(n,i,e,r,t[14],15,-1416354905),r=iA(r,n,i,e,t[5],21,-57434055),e=iA(e,r,n,i,t[12],6,1700485571),i=iA(i,e,r,n,t[3],10,-1894986606),n=iA(n,i,e,r,t[10],15,-1051523),r=iA(r,n,i,e,t[1],21,-2054922799),e=iA(e,r,n,i,t[8],6,1873313359),i=iA(i,e,r,n,t[15],10,-30611744),n=iA(n,i,e,r,t[6],15,-1560198380),r=iA(r,n,i,e,t[13],21,1309151649),e=iA(e,r,n,i,t[4],6,-145523070),i=iA(i,e,r,n,t[11],10,-1120210379),n=iA(n,i,e,r,t[2],15,718787259),r=iA(r,n,i,e,t[9],21,-343485551),A[0]=fA(e,A[0]),A[1]=fA(r,A[1]),A[2]=fA(n,A[2]),A[3]=fA(i,A[3])}function tA(A,t,e,r,n,i){return t=fA(fA(t,A),fA(r,i)),fA(t<<n|t>>>32-n,e)}function eA(A,t,e,r,n,i,s){return tA(t&e|~t&r,A,t,n,i,s)}function rA(A,t,e,r,n,i,s){return tA(t&r|e&~r,A,t,n,i,s)}function nA(A,t,e,r,n,i,s){return tA(t^e^r,A,t,n,i,s)}function iA(A,t,e,r,n,i,s){return tA(e^(t|~r),A,t,n,i,s)}function sA(A){var t,e=A.length,r=[1732584193,-271733879,-1732584194,271733878];for(t=64;t<=A.length;t+=64)AA(r,oA(A.substring(t-64,t)));A=A.substring(t-64);var n=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(t=0;t<A.length;t++)n[t>>2]|=A.charCodeAt(t)<<(t%4<<3);if(n[t>>2]|=128<<(t%4<<3),t>55)for(AA(r,n),t=0;t<16;t++)n[t]=0;return n[14]=8*e,AA(r,n),r}function oA(A){var t,e=[];for(t=0;t<64;t+=4)e[t>>2]=A.charCodeAt(t)+(A.charCodeAt(t+1)<<8)+(A.charCodeAt(t+2)<<16)+(A.charCodeAt(t+3)<<24);return e}Y=j.atob.bind(j),J=j.btoa.bind(j);var aA="0123456789abcdef".split("");function cA(A){for(var t="",e=0;e<4;e++)t+=aA[A>>8*e+4&15]+aA[A>>8*e&15];return t}function uA(A){return String.fromCharCode(255&A,(65280&A)>>8,(16711680&A)>>16,(4278190080&A)>>24)}function lA(A){return function(A){return A.map(uA).join("")}(sA(A))}var hA="5d41402abc4b2a76b9719d911017c592"!=function(A){return function(A){for(var t=0;t<A.length;t++)A[t]=cA(A[t]);return A.join("")}(sA(A))}("hello");function fA(A,t){if(hA){var e=(65535&A)+(65535&t);return(A>>16)+(t>>16)+(e>>16)<<16|65535&e}return A+t&4294967295} /** * @license * FPDF is released under a permissive license: there is no usage restriction. * You may embed it freely in your application (commercial or not), with or * without modifications. * * Reference: http://www.fpdf.org/en/script/script37.php */function dA(A,t){var e,r,n,i;if(A!==e){for(var s=(n=A,i=1+(256/A.length|0),new Array(i+1).join(n)),o=[],a=0;a<256;a++)o[a]=a;var c=0;for(a=0;a<256;a++){var u=o[a];c=(c+u+s.charCodeAt(a))%256,o[a]=o[c],o[c]=u}e=A,r=o}else o=r;var l=t.length,h=0,f=0,d="";for(a=0;a<l;a++)f=(f+(u=o[h=(h+1)%256]))%256,o[h]=o[f],o[f]=u,s=o[(o[h]+o[f])%256],d+=String.fromCharCode(t.charCodeAt(a)^s);return d} /** * @license * Licensed under the MIT License. * http://opensource.org/licenses/mit-license * Author: Owen Leong (@owenl131) * Date: 15 Oct 2020 * References: * https://www.cs.cmu.edu/~dst/Adobe/Gallery/anon21jul01-pdf-encryption.txt * https://github.com/foliojs/pdfkit/blob/master/lib/security.js * http://www.fpdf.org/en/script/script37.php */var gA={print:4,modify:8,copy:16,"annot-forms":32};function pA(A,t,e,r){this.v=1,this.r=2;var n=192;A.forEach((function(A){if(void 0!==gA.perm)throw new Error("Invalid permission: "+A);n+=gA[A]})),this.padding="(¿N^NuŠAd\0NVÿú\b..\0¶Ðh>€/\f©þdSiz";var i=(t+this.padding).substr(0,32),s=(e+this.padding).substr(0,32);this.O=this.processOwnerPassword(i,s),this.P=-(1+(255^n)),this.encryptionKey=lA(i+this.O+this.lsbFirstWord(this.P)+this.hexToBytes(r)).substr(0,5),this.U=dA(this.encryptionKey,this.padding)}function BA(A){if(/[^\u0000-\u00ff]/.test(A))throw new Error("Invalid PDF Name Object: "+A+", Only accept ASCII characters.");for(var t="",e=A.length,r=0;r<e;r++){var n=A.charCodeAt(r);if(n<33||35===n||37===n||40===n||41===n||47===n||60===n||62===n||91===n||93===n||123===n||125===n||n>126)t+="#"+("0"+n.toString(16)).slice(-2);else t+=A[r]}return t}function wA(A){if("object"!==e(A))throw new Error("Invalid Context passed to initialize PubSub (jsPDF-module)");var t={};this.subscribe=function(A,e,r){if(r=r||!1,"string"!=typeof A||"function"!=typeof e||"boolean"!=typeof r)throw new Error("Invalid arguments passed to PubSub.subscribe (jsPDF-module)");t.hasOwnProperty(A)||(t[A]={});var n=Math.random().toString(35);return t[A][n]=[e,!!r],n},this.unsubscribe=function(A){for(var e in t)if(t[e][A])return delete t[e][A],0===Object.keys(t[e]).length&&delete t[e],!0;return!1},this.publish=function(e){if(t.hasOwnProperty(e)){var r=Array.prototype.slice.call(arguments,1),n=[];for(var i in t[e]){var s=t[e][i];try{s[0].apply(A,r)}catch(A){j.console&&q.error("jsPDF PubSub Error",A.message,A)}s[1]&&n.push(i)}n.length&&n.forEach(this.unsubscribe)}},this.getTopics=function(){return t}}function mA(A){if(!(this instanceof mA))return new mA(A);var t="opacity,stroke-opacity".split(",");for(var e in A)A.hasOwnProperty(e)&&t.indexOf(e)>=0&&(this[e]=A[e]);this.id="",this.objectNumber=-1}function yA(A,t){this.gState=A,this.matrix=t,this.id="",this.objectNumber=-1}function vA(A,t,e,r,n){if(!(this instanceof vA))return new vA(A,t,e,r,n);this.type="axial"===A?2:3,this.coords=t,this.colors=e,yA.call(this,r,n)}function bA(A,t,e,r,n){if(!(this instanceof bA))return new bA(A,t,e,r,n);this.boundingBox=A,this.xStep=t,this.yStep=e,this.stream="",this.cloneIndex=0,yA.call(this,r,n)}function CA(A){var t,r="string"==typeof arguments[0]?arguments[0]:"p",n=arguments[1],i=arguments[2],s=arguments[3],o=[],a=1,c=16,u="S",l=null;"object"===e(A=A||{})&&(r=A.orientation,n=A.unit||n,i=A.format||i,s=A.compress||A.compressPdf||s,null!==(l=A.encryption||null)&&(l.userPassword=l.userPassword||"",l.ownerPassword=l.ownerPassword||"",l.userPermissions=l.userPermissions||[]),a="number"==typeof A.userUnit?Math.abs(A.userUnit):1,void 0!==A.precision&&(t=A.precision),void 0!==A.floatPrecision&&(c=A.floatPrecision),u=A.defaultPathOperation||"S"),o=A.filters||(!0===s?["FlateEncode"]:o),n=n||"mm",r=(""+(r||"P")).toLowerCase();var h=A.putOnlyUsedFonts||!1,f={},d={internal:{},__private__:{}};d.__private__.PubSub=wA;var g="1.3",p=d.__private__.getPdfVersion=function(){return g};d.__private__.setPdfVersion=function(A){g=A};var B={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]};d.__private__.getPageFormats=function(){return B};var w=d.__private__.getPageFormat=function(A){return B[A]};i=i||"a4";var m="compat",y="advanced",v=m;function b(){this.saveGraphicsState(),rA(new jA(FA,0,0,-FA,0,ve()*FA).toString()+" cm"),this.setFontSize(this.getFontSize()/FA),u="n",v=y}function C(){this.restoreGraphicsState(),u="S",v=m}var Q=d.__private__.combineFontStyleAndFontWeight=function(A,t){if("bold"==A&&"normal"==t||"bold"==A&&400==t||"normal"==A&&"italic"==t||"bold"==A&&"italic"==t)throw new Error("Invalid Combination of fontweight and fontstyle");return t&&(A=400==t||"normal"===t?"italic"===A?"italic":"normal":700!=t&&"bold"!==t||"normal"!==A?(700==t?"bold":t)+""+A:"bold"),A};d.advancedAPI=function(A){var t=v===m;return t&&b.call(this),"function"!=typeof A||(A(this),t&&C.call(this)),this},d.compatAPI=function(A){var t=v===y;return t&&C.call(this),"function"!=typeof A||(A(this),t&&b.call(this)),this},d.isAdvancedAPI=function(){return v===y};var F,U=function(A){if(v!==y)throw new Error(A+" is only available in 'advanced' API mode. You need to call advancedAPI() first.")},x=d.roundToPrecision=d.__private__.roundToPrecision=function(A,e){var r=t||e;if(isNaN(A)||isNaN(r))throw new Error("Invalid argument passed to jsPDF.roundToPrecision");return A.toFixed(r).replace(/0+$/,"")};F=d.hpf=d.__private__.hpf="number"==typeof c?function(A){if(isNaN(A))throw new Error("Invalid argument passed to jsPDF.hpf");return x(A,c)}:"smart"===c?function(A){if(isNaN(A))throw new Error("Invalid argument passed to jsPDF.hpf");return x(A,A>-1&&A<1?16:5)}:function(A){if(isNaN(A))throw new Error("Invalid argument passed to jsPDF.hpf");return x(A,16)};var E=d.f2=d.__private__.f2=function(A){if(isNaN(A))throw new Error("Invalid argument passed to jsPDF.f2");return x(A,2)},L=d.__private__.f3=function(A){if(isNaN(A))throw new Error("Invalid argument passed to jsPDF.f3");return x(A,3)},S=d.scale=d.__private__.scale=function(A){if(isNaN(A))throw new Error("Invalid argument passed to jsPDF.scale");return v===m?A*FA:v===y?A:void 0},I=function(A){return S(function(A){return v===m?ve()-A:v===y?A:void 0}(A))};d.__private__.setPrecision=d.setPrecision=function(A){"number"==typeof parseInt(A,10)&&(t=parseInt(A,10))};var N,H="00000000000000000000000000000000",P=d.__private__.getFileId=function(){return H},O=d.__private__.setFileId=function(A){return H=void 0!==A&&/^[a-fA-F0-9]{32}$/.test(A)?A.toUpperCase():H.split("").map((function(){return"ABCDEF0123456789".charAt(Math.floor(16*Math.random()))})).join(""),null!==l&&(It=new pA(l.userPermissions,l.userPassword,l.ownerPassword,H)),H};d.setFileId=function(A){return O(A),this},d.getFileId=function(){return P()};var T=d.__private__.convertDateToPDFDate=function(A){var t=A.getTimezoneOffset(),e=t<0?"+":"-",r=Math.floor(Math.abs(t/60)),n=Math.abs(t%60),i=[e,R(r),"'",R(n),"'"].join("");return["D:",A.getFullYear(),R(A.getMonth()+1),R(A.getDate()),R(A.getHours()),R(A.getMinutes()),R(A.getSeconds()),i].join("")},_=d.__private__.convertPDFDateToDate=function(A){var t=parseInt(A.substr(2,4),10),e=parseInt(A.substr(6,2),10)-1,r=parseInt(A.substr(8,2),10),n=parseInt(A.substr(10,2),10),i=parseInt(A.substr(12,2),10),s=parseInt(A.substr(14,2),10);return new Date(t,e,r,n,i,s,0)},k=d.__private__.setCreationDate=function(A){var t;if(void 0===A&&(A=new Date),A instanceof Date)t=T(A);else{if(!/^D:(20[0-2][0-9]|203[0-7]|19[7-9][0-9])(0[0-9]|1[0-2])([0-2][0-9]|3[0-1])(0[0-9]|1[0-9]|2[0-3])(0[0-9]|[1-5][0-9])(0[0-9]|[1-5][0-9])(\+0[0-9]|\+1[0-4]|-0[0-9]|-1[0-1])'(0[0-9]|[1-5][0-9])'?$/.test(A))throw new Error("Invalid argument passed to jsPDF.setCreationDate");t=A}return N=t},M=d.__private__.getCreationDate=function(A){var t=N;return"jsDate"===A&&(t=_(N)),t};d.setCreationDate=function(A){return k(A),this},d.getCreationDate=function(A){return M(A)};var D,R=d.__private__.padd2=function(A){return("0"+parseInt(A)).slice(-2)},K=d.__private__.padd2Hex=function(A){return("00"+(A=A.toString())).substr(A.length)},V=0,G=[],X=[],z=0,W=[],Y=[],AA=!1,tA=X;d.__private__.setCustomOutputDestination=function(A){AA=!0,tA=A};var eA=function(A){AA||(tA=A)};d.__private__.resetCustomOutputDestination=function(){AA=!1,tA=X};var rA=d.__private__.out=function(A){return A=A.toString(),z+=A.length+1,tA.push(A),tA},nA=d.__private__.write=function(A){return rA(1===arguments.length?A.toString():Array.prototype.join.call(arguments," "))},iA=d.__private__.getArrayBuffer=function(A){for(var t=A.length,e=new ArrayBuffer(t),r=new Uint8Array(e);t--;)r[t]=A.charCodeAt(t);return e},sA=[["Helvetica","helvetica","normal","WinAnsiEncoding"],["Helvetica-Bold","helvetica","bold","WinAnsiEncoding"],["Helvetica-Oblique","helvetica","italic","WinAnsiEncoding"],["Helvetica-BoldOblique","helvetica","bolditalic","WinAnsiEncoding"],["Courier","courier","normal","WinAnsiEncoding"],["Courier-Bold","courier","bold","WinAnsiEncoding"],["Courier-Oblique","courier","italic","WinAnsiEncoding"],["Courier-BoldOblique","courier","bolditalic","WinAnsiEncoding"],["Times-Roman","times","normal","WinAnsiEncoding"],["Times-Bold","times","bold","WinAnsiEncoding"],["Times-Italic","times","italic","WinAnsiEncoding"],["Times-BoldItalic","times","bolditalic","WinAnsiEncoding"],["ZapfDingbats","zapfdingbats","normal",null],["Symbol","symbol","normal",null]];d.__private__.getStandardFonts=function(){return sA};var oA=A.fontSize||16;d.__private__.setFontSize=d.setFontSize=function(A){return oA=v===y?A/FA:A,this};var aA,cA=d.__private__.getFontSize=d.getFontSize=function(){return v===m?oA:oA*FA},uA=A.R2L||!1;d.__private__.setR2L=d.setR2L=function(A){return uA=A,this},d.__private__.getR2L=d.getR2L=function(){return uA};var lA,hA=d.__private__.setZoomMode=function(A){var t=[void 0,null,"fullwidth","fullheight","fullpage","original"];if(/^(?:\d+\.\d*|\d*\.\d+|\d+)%$/.test(A))aA=A;else if(isNaN(A)){if(-1===t.indexOf(A))throw new Error('zoom must be Integer (e.g. 2), a percentage Value (e.g. 300%) or fullwidth, fullheight, fullpage, original. "'+A+'" is not recognized.');aA=A}else aA=parseInt(A,10)};d.__private__.getZoomMode=function(){return aA};var fA,dA=d.__private__.setPageMode=function(A){if(-1==[void 0,null,"UseNone","UseOutlines","UseThumbs","FullScreen"].indexOf(A))throw new Error('Page mode must be one of UseNone, UseOutlines, UseThumbs, or FullScreen. "'+A+'" is not recognized.');lA=A};d.__private__.getPageMode=function(){return lA};var gA=d.__private__.setLayoutMode=function(A){if(-1==[void 0,null,"continuous","single","twoleft","tworight","two"].indexOf(A))throw new Error('Layout mode must be one of continuous, single, twoleft, tworight. "'+A+'" is not recognized.');fA=A};d.__private__.getLayoutMode=function(){return fA},d.__private__.setDisplayMode=d.setDisplayMode=function(A,t,e){return hA(A),gA(t),dA(e),this};var yA={title:"",subject:"",author:"",keywords:"",creator:""};d.__private__.getDocumentProperty=function(A){if(-1===Object.keys(yA).indexOf(A))throw new Error("Invalid argument passed to jsPDF.getDocumentProperty");return yA[A]},d.__private__.getDocumentProperties=function(){return yA},d.__private__.setDocumentProperties=d.setProperties=d.setDocumentProperties=function(A){for(var t in yA)yA.hasOwnProperty(t)&&A[t]&&(yA[t]=A[t]);return this},d.__private__.setDocumentProperty=function(A,t){if(-1===Object.keys(yA).indexOf(A))throw new Error("Invalid arguments passed to jsPDF.setDocumentProperty");return yA[A]=t};var QA,FA,UA,xA,EA,LA={},SA={},IA=[],NA={},HA={},PA={},OA={},TA=null,_A=0,kA=[],MA=new wA(d),DA=A.hotfixes||[],RA={},KA={},VA=[],jA=function A(t,e,r,n,i,s){if(!(this instanceof A))return new A(t,e,r,n,i,s);isNaN(t)&&(t=1),isNaN(e)&&(e=0),isNaN(r)&&(r=0),isNaN(n)&&(n=1),isNaN(i)&&(i=0),isNaN(s)&&(s=0),this._matrix=[t,e,r,n,i,s]};Object.defineProperty(jA.prototype,"sx",{get:function(){return this._matrix[0]},set:function(A){this._matrix[0]=A}}),Object.defineProperty(jA.prototype,"shy",{get:function(){return this._matrix[1]},set:function(A){this._matrix[1]=A}}),Object.defineProperty(jA.prototype,"shx",{get:function(){return this._matrix[2]},set:function(A){this._matrix[2]=A}}),Object.defineProperty(jA.prototype,"sy",{get:function(){return this._matrix[3]},set:function(A){this._matrix[3]=A}}),Object.defineProperty(jA.prototype,"tx",{get:function(){return this._matrix[4]},set:function(A){this._matrix[4]=A}}),Object.defineProperty(jA.prototype,"ty",{get:function(){return this._matrix[5]},set:function(A){this._matrix[5]=A}}),Object.defineProperty(jA.prototype,"a",{get:function(){return this._matrix[0]},set:function(A){this._matrix[0]=A}}),Object.defineProperty(jA.prototype,"b",{get:function(){return this._matrix[1]},set:function(A){this._matrix[1]=A}}),Object.defineProperty(jA.prototype,"c",{get:function(){return this._matrix[2]},set:function(A){this._matrix[2]=A}}),Object.defineProperty(jA.prototype,"d",{get:function(){return this._matrix[3]},set:function(A){this._matrix[3]=A}}),Object.defineProperty(jA.prototype,"e",{get:function(){return this._matrix[4]},set:function(A){this._matrix[4]=A}}),Object.defineProperty(jA.prototype,"f",{get:function(){return this._matrix[5]},set:function(A){this._matrix[5]=A}}),Object.defineProperty(jA.prototype,"rotation",{get:function(){return Math.atan2(this.shx,this.sx)}}),Object.defineProperty(jA.prototype,"scaleX",{get:function(){return this.decompose().scale.sx}}),Object.defineProperty(jA.prototype,"scaleY",{get:function(){return this.decompose().scale.sy}}),Object.defineProperty(jA.prototype,"isIdentity",{get:function(){return 1===this.sx&&(0===this.shy&&(0===this.shx&&(1===this.sy&&(0===this.tx&&0===this.ty))))}}),jA.prototype.join=function(A){return[this.sx,this.shy,this.shx,this.sy,this.tx,this.ty].map(F).join(A)},jA.prototype.multiply=function(A){var t=A.sx*this.sx+A.shy*this.shx,e=A.sx*this.shy+A.shy*this.sy,r=A.shx*this.sx+A.sy*this.shx,n=A.shx*this.shy+A.sy*this.sy,i=A.tx*this.sx+A.ty*this.shx+this.tx,s=A.tx*this.shy+A.ty*this.sy+this.ty;return new jA(t,e,r,n,i,s)},jA.prototype.decompose=function(){var A=this.sx,t=this.shy,e=this.shx,r=this.sy,n=this.tx,i=this.ty,s=Math.sqrt(A*A+t*t),o=(A/=s)*e+(t/=s)*r;e-=A*o,r-=t*o;var a=Math.sqrt(e*e+r*r);return o/=a,A*(r/=a)<t*(e/=a)&&(A=-A,t=-t,o=-o,s=-s),{scale:new jA(s,0,0,a,0,0),translate:new jA(1,0,0,1,n,i),rotate:new jA(A,t,-t,A,0,0),skew:new jA(1,0,o,1,0,0)}},jA.prototype.toString=function(A){return this.join(" ")},jA.prototype.inversed=function(){var A=this.sx,t=this.shy,e=this.shx,r=this.sy,n=this.tx,i=this.ty,s=1/(A*r-t*e),o=r*s,a=-t*s,c=-e*s,u=A*s;return new jA(o,a,c,u,-o*n-c*i,-a*n-u*i)},jA.prototype.applyToPoint=function(A){var t=A.x*this.sx+A.y*this.shx+this.tx,e=A.x*this.shy+A.y*this.sy+this.ty;return new de(t,e)},jA.prototype.applyToRectangle=function(A){var t=this.applyToPoint(A),e=this.applyToPoint(new de(A.x+A.w,A.y+A.h));return new ge(t.x,t.y,e.x-t.x,e.y-t.y)},jA.prototype.clone=function(){var A=this.sx,t=this.shy,e=this.shx,r=this.sy,n=this.tx,i=this.ty;return new jA(A,t,e,r,n,i)},d.Matrix=jA;var GA=d.matrixMult=function(A,t){return t.multiply(A)},qA=new jA(1,0,0,1,0,0);d.unitMatrix=d.identityMatrix=qA;var XA=function(A,t){if(!HA[A]){var e=(t instanceof vA?"Sh":"P")+(Object.keys(NA).length+1).toString(10);t.id=e,HA[A]=e,NA[e]=t,MA.publish("addPattern",t)}};d.ShadingPattern=vA,d.TilingPattern=bA,d.addShadingPattern=function(A,t){return U("addShadingPattern()"),XA(A,t),this},d.beginTilingPattern=function(A){U("beginTilingPattern()"),Be(A.boundingBox[0],A.boundingBox[1],A.boundingBox[2]-A.boundingBox[0],A.boundingBox[3]-A.boundingBox[1],A.matrix)},d.endTilingPattern=function(A,t){U("endTilingPattern()"),t.stream=Y[D].join("\n"),XA(A,t),MA.publish("endTilingPattern",t),VA.pop().restore()};var zA,WA=d.__private__.newObject=function(){var A=YA();return JA(A,!0),A},YA=d.__private__.newObjectDeferred=function(){return V++,G[V]=function(){return z},V},JA=function(A,t){return t="boolean"==typeof t&&t,G[A]=z,t&&rA(A+" 0 obj"),A},ZA=d.__private__.newAdditionalObject=function(){var A={objId:YA(),content:""};return W.push(A),A},$A=YA(),At=YA(),tt=d.__private__.decodeColorString=function(A){var t=A.split(" ");if(2!==t.length||"g"!==t[1]&&"G"!==t[1]){if(5===t.length&&("k"===t[4]||"K"===t[4])){t=[(1-t[0])*(1-t[3]),(1-t[1])*(1-t[3]),(1-t[2])*(1-t[3]),"r"]}}else{var e=parseFloat(t[0]);t=[e,e,e,"r"]}for(var r="#",n=0;n<3;n++)r+=("0"+Math.floor(255*parseFloat(t[n])).toString(16)).slice(-2);return r},et=d.__private__.encodeColorString=function(A){var t;"string"==typeof A&&(A={ch1:A});var r=A.ch1,n=A.ch2,i=A.ch3,s=A.ch4,o="draw"===A.pdfColorType?["G","RG","K"]:["g","rg","k"];if("string"==typeof r&&"#"!==r.charAt(0)){var a=new $(r);if(a.ok)r=a.toHex();else if(!/^\d*\.?\d*$/.test(r))throw new Error('Invalid color "'+r+'" passed to jsPDF.encodeColorString.')}if("string"==typeof r&&/^#[0-9A-Fa-f]{3}$/.test(r)&&(r="#"+r[1]+r[1]+r[2]+r[2]+r[3]+r[3]),"string"==typeof r&&/^#[0-9A-Fa-f]{6}$/.test(r)){var c=parseInt(r.substr(1),16);r=c>>16&255,n=c>>8&255,i=255&c}if(void 0===n||void 0===s&&r===n&&n===i)if("string"==typeof r)t=r+" "+o[0];else if(2===A.precision)t=E(r/255)+" "+o[0];else t=L(r/255)+" "+o[0];else if(void 0===s||"object"===e(s)){if(s&&!isNaN(s.a)&&0===s.a)return t=["1.","1.","1.",o[1]].join(" ");if("string"==typeof r)t=[r,n,i,o[1]].join(" ");else if(2===A.precision)t=[E(r/255),E(n/255),E(i/255),o[1]].join(" ");else t=[L(r/255),L(n/255),L(i/255),o[1]].join(" ")}else if("string"==typeof r)t=[r,n,i,s,o[2]].join(" ");else if(2===A.precision)t=[E(r),E(n),E(i),E(s),o[2]].join(" ");else t=[L(r),L(n),L(i),L(s),o[2]].join(" ");return t},rt=d.__private__.getFilters=function(){return o},nt=d.__private__.putStream=function(A){var t=(A=A||{}).data||"",e=A.filters||rt(),r=A.alreadyAppliedFilters||[],n=A.addLength1||!1,i=t.length,s=A.objectId,o=function(A){return A};if(null!==l&&void 0===s)throw new Error("ObjectId must be passed to putStream for file encryption");null!==l&&(o=It.encryptor(s,0));var a={};!0===e&&(e=["FlateEncode"]);var c=A.additionalKeyValues||[],u=(a=void 0!==CA.API.processDataByFilters?CA.API.processDataByFilters(t,e):{data:t,reverseChain:[]}).reverseChain+(Array.isArray(r)?r.join(" "):r.toString());if(0!==a.data.length&&(c.push({key:"Length",value:a.data.length}),!0===n&&c.push({key:"Length1",value:i})),0!=u.length)if(u.split("/").length-1==1)c.push({key:"Filter",value:u});else{c.push({key:"Filter",value:"["+u+"]"});for(var h=0;h<c.length;h+=1)if("DecodeParms"===c[h].key){for(var f=[],d=0;d<a.reverseChain.split("/").length-1;d+=1)f.push("null");f.push(c[h].value),c[h].value="["+f.join(" ")+"]"}}rA("<<");for(var g=0;g<c.length;g++)rA("/"+c[g].key+" "+c[g].value);rA(">>"),0!==a.data.length&&(rA("stream"),rA(o(a.data)),rA("endstream"))},it=d.__private__.putPage=function(A){var t=A.number,e=A.data,r=A.objId,n=A.contentsObjId;JA(r,!0),rA("<</Type /Page"),rA("/Parent "+A.rootDictionaryObjId+" 0 R"),rA("/Resources "+A.resourceDictionaryObjId+" 0 R"),rA("/MediaBox ["+parseFloat(F(A.mediaBox.bottomLeftX))+" "+parseFloat(F(A.mediaBox.bottomLeftY))+" "+F(A.mediaBox.topRightX)+" "+F(A.mediaBox.topRightY)+"]"),null!==A.cropBox&&rA("/CropBox ["+F(A.cropBox.bottomLeftX)+" "+F(A.cropBox.bottomLeftY)+" "+F(A.cropBox.topRightX)+" "+F(A.cropBox.topRightY)+"]"),null!==A.bleedBox&&rA("/BleedBox ["+F(A.bleedBox.bottomLeftX)+" "+F(A.bleedBox.bottomLeftY)+" "+F(A.bleedBox.topRightX)+" "+F(A.bleedBox.topRightY)+"]"),null!==A.trimBox&&rA("/TrimBox ["+F(A.trimBox.bottomLeftX)+" "+F(A.trimBox.bottomLeftY)+" "+F(A.trimBox.topRightX)+" "+F(A.trimBox.topRightY)+"]"),null!==A.artBox&&rA("/ArtBox ["+F(A.artBox.bottomLeftX)+" "+F(A.artBox.bottomLeftY)+" "+F(A.artBox.topRightX)+" "+F(A.artBox.topRightY)+"]"),"number"==typeof A.userUnit&&1!==A.userUnit&&rA("/UserUnit "+A.userUnit),MA.publish("putPage",{objId:r,pageContext:kA[t],pageNumber:t,page:e}),rA("/Contents "+n+" 0 R"),rA(">>"),rA("endobj");var i=e.join("\n");return v===y&&(i+="\nQ"),JA(n,!0),nt({data:i,filters:rt(),objectId:n}),rA("endobj"),r},st=d.__private__.putPages=function(){var A,t,e=[];for(A=1;A<=_A;A++)kA[A].objId=YA(),kA[A].contentsObjId=YA();for(A=1;A<=_A;A++)e.push(it({number:A,data:Y[A],objId:kA[A].objId,contentsObjId:kA[A].contentsObjId,mediaBox:kA[A].mediaBox,cropBox:kA[A].cropBox,bleedBox:kA[A].bleedBox,trimBox:kA[A].trimBox,artBox:kA[A].artBox,userUnit:kA[A].userUnit,rootDictionaryObjId:$A,resourceDictionaryObjId:At}));JA($A,!0),rA("<</Type /Pages");var r="/Kids [";for(t=0;t<_A;t++)r+=e[t]+" 0 R ";rA(r+"]"),rA("/Count "+_A),rA(">>"),rA("endobj"),MA.publish("postPutPages")},ot=function(A){A.objectNumber=WA();var t=[];t.push({key:"Type",value:"/XObject"}),t.push({key:"Subtype",value:"/Form"}),t.push({key:"BBox",value:"["+[F(A.x),F(A.y),F(A.x+A.width),F(A.y+A.height)].join(" ")+"]"}),t.push({key:"Matrix",value:"["+A.matrix.toString()+"]"});var e=A.pages[1].join("\n");nt({data:e,additionalKeyValues:t,objectId:A.objectNumber}),rA("endobj")},at=function(A,t){t||(t=21);var e=WA(),r=function(A,t){var e,r=[],n=1/(t-1);for(e=0;e<1;e+=n)r.push(e);if(r.push(1),0!=A[0].offset){var i={offset:0,color:A[0].color};A.unshift(i)}if(1!=A[A.length-1].offset){var s={offset:1,color:A[A.length-1].color};A.push(s)}for(var o="",a=0,c=0;c<r.length;c++){for(e=r[c];e>A[a+1].offset;)a++;var u=A[a].offset,l=(e-u)/(A[a+1].offset-u),h=A[a].color,f=A[a+1].color;o+=K(Math.round((1-l)*h[0]+l*f[0]).toString(16))+K(Math.round((1-l)*h[1]+l*f[1]).toString(16))+K(Math.round((1-l)*h[2]+l*f[2]).toString(16))}return o.trim()}(A.colors,t),n=[];n.push({key:"FunctionType",value:"0"}),n.push({key:"Domain",value:"[0.0 1.0]"}),n.push({key:"Size",value:"["+t+"]"}),n.push({key:"BitsPerSample",value:"8"}),n.push({key:"Range",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),n.push({key:"Decode",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),nt({data:r,additionalKeyValues:n,alreadyAppliedFilters:["/ASCIIHexDecode"],objectId:e}),rA("endobj"),A.objectNumber=WA(),rA("<< /ShadingType "+A.type),rA("/ColorSpace /DeviceRGB");var i="/Coords ["+F(parseFloat(A.coords[0]))+" "+F(parseFloat(A.coords[1]))+" ";2===A.type?i+=F(parseFloat(A.coords[2]))+" "+F(parseFloat(A.coords[3])):i+=F(parseFloat(A.coords[2]))+" "+F(parseFloat(A.coords[3]))+" "+F(parseFloat(A.coords[4]))+" "+F(parseFloat(A.coords[5])),rA(i+="]"),A.matrix&&rA("/Matrix ["+A.matrix.toString()+"]"),rA("/Function "+e+" 0 R"),rA("/Extend [true true]"),rA(">>"),rA("endobj")},ct=function(A,t){var e=YA(),r=WA();t.push({resourcesOid:e,objectOid:r}),A.objectNumber=r;var n=[];n.push({key:"Type",value:"/Pattern"}),n.push({key:"PatternType",value:"1"}),n.push({key:"PaintType",value:"1"}),n.push({key:"TilingType",value:"1"}),n.push({key:"BBox",value:"["+A.boundingBox.map(F).join(" ")+"]"}),n.push({key:"XStep",value:F(A.xStep)}),n.push({key:"YStep",value:F(A.yStep)}),n.push({key:"Resources",value:e+" 0 R"}),A.matrix&&n.push({key:"Matrix",value:"["+A.matrix.toString()+"]"}),nt({data:A.stream,additionalKeyValues:n,objectId:A.objectNumber}),rA("endobj")},ut=function(A){for(var t in A.objectNumber=WA(),rA("<<"),A)switch(t){case"opacity":rA("/ca "+E(A[t]));break;case"stroke-opacity":rA("/CA "+E(A[t]))}rA(">>"),rA("endobj")},lt=function(A){JA(A.resourcesOid,!0),rA("<<"),rA("/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]"),function(){for(var A in rA("/Font <<"),LA)LA.hasOwnProperty(A)&&(!1===h||!0===h&&f.hasOwnProperty(A))&&rA("/"+A+" "+LA[A].objectNumber+" 0 R");rA(">>")}(),function(){if(Object.keys(NA).length>0){for(var A in rA("/Shading <<"),NA)NA.hasOwnProperty(A)&&NA[A]instanceof vA&&NA[A].objectNumber>=0&&rA("/"+A+" "+NA[A].objectNumber+" 0 R");MA.publish("putShadingPatternDict"),rA(">>")}}(),function(A){if(Object.keys(NA).length>0){for(var t in rA("/Pattern <<"),NA)NA.hasOwnProperty(t)&&NA[t]instanceof d.TilingPattern&&NA[t].objectNumber>=0&&NA[t].objectNumber<A&&rA("/"+t+" "+NA[t].objectNumber+" 0 R");MA.publish("putTilingPatternDict"),rA(">>")}}(A.objectOid),function(){if(Object.keys(PA).length>0){var A;for(A in rA("/ExtGState <<"),PA)PA.hasOwnProperty(A)&&PA[A].objectNumber>=0&&rA("/"+A+" "+PA[A].objectNumber+" 0 R");MA.publish("putGStateDict"),rA(">>")}}(),function(){for(var A in rA("/XObject <<"),RA)RA.hasOwnProperty(A)&&RA[A].objectNumber>=0&&rA("/"+A+" "+RA[A].objectNumber+" 0 R");MA.publish("putXobjectDict"),rA(">>")}(),rA(">>"),rA("endobj")},ht=function(){var A=[];!function(){for(var A in LA)LA.hasOwnProperty(A)&&(!1===h||!0===h&&f.hasOwnProperty(A))&&(t=LA[A],MA.publish("putFont",{font:t,out:rA,newObject:WA,putStream:nt}),!0!==t.isAlreadyPutted&&(t.objectNumber=WA(),rA("<<"),rA("/Type /Font"),rA("/BaseFont /"+BA(t.postScriptName)),rA("/Subtype /Type1"),"string"==typeof t.encoding&&rA("/Encoding /"+t.encoding),rA("/FirstChar 32"),rA("/LastChar 255"),rA(">>"),rA("endobj")));var t}(),function(){var A;for(A in PA)PA.hasOwnProperty(A)&&ut(PA[A])}(),function(){for(var A in RA)RA.hasOwnProperty(A)&&ot(RA[A])}(),function(A){var t;for(t in NA)NA.hasOwnProperty(t)&&(NA[t]instanceof vA?at(NA[t]):NA[t]instanceof bA&&ct(NA[t],A))}(A),MA.publish("putResources"),A.forEach(lt),lt({resourcesOid:At,objectOid:Number.MAX_SAFE_INTEGER}),MA.publish("postPutResources")},ft=function(A){SA[A.fontName]=SA[A.fontName]||{},SA[A.fontName][A.fontStyle]=A.id},dt=function(A,t,e,r,n){var i={id:"F"+(Object.keys(LA).length+1).toString(10),postScriptName:A,fontName:t,fontStyle:e,encoding:r,isStandardFont:n||!1,metadata:{}};return MA.publish("addFont",{font:i,instance:this}),LA[i.id]=i,ft(i),i.id},gt=d.__private__.pdfEscape=d.pdfEscape=function(A,t){return function(A,t){var e,r,n,i,s,o,a,c,u;if(n=(t=t||{}).sourceEncoding||"Unicode",s=t.outputEncoding,(t.autoencode||s)&&LA[QA].metadata&&LA[QA].metadata[n]&&LA[QA].metadata[n].encoding&&(i=LA[QA].metadata[n].encoding,!s&&LA[QA].encoding&&(s=LA[QA].encoding),!s&&i.codePages&&(s=i.codePages[0]),"string"==typeof s&&(s=i[s]),s)){for(a=!1,o=[],e=0,r=A.length;e<r;e++)(c=s[A.charCodeAt(e)])?o.push(String.fromCharCode(c)):o.push(A[e]),o[e].charCodeAt(0)>>8&&(a=!0);A=o.join("")}for(e=A.length;void 0===a&&0!==e;)A.charCodeAt(e-1)>>8&&(a=!0),e--;if(!a)return A;for(o=t.noBOM?[]:[254,255],e=0,r=A.length;e<r;e++){if((u=(c=A.charCodeAt(e))>>8)>>8)throw new Error("Character at position "+e+" of string '"+A+"' exceeds 16bits. Cannot be encoded into UCS-2 BE");o.push(u),o.push(c-(u<<8))}return String.fromCharCode.apply(void 0,o)}(A,t).replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},pt=d.__private__.beginPage=function(A){Y[++_A]=[],kA[_A]={objId:0,contentsObjId:0,userUnit:Number(a),artBox:null,bleedBox:null,cropBox:null,trimBox:null,mediaBox:{bottomLeftX:0,bottomLeftY:0,topRightX:Number(A[0]),topRightY:Number(A[1])}},mt(_A),eA(Y[D])},Bt=function(A,t){var e,n,s;switch(r=t||r,"string"==typeof A&&(e=w(A.toLowerCase()),Array.isArray(e)&&(n=e[0],s=e[1])),Array.isArray(A)&&(n=A[0]*FA,s=A[1]*FA),isNaN(n)&&(n=i[0],s=i[1]),(n>14400||s>14400)&&(q.warn("A page in a PDF can not be wider or taller than 14400 userUnit. jsPDF limits the width/height to 14400"),n=Math.min(14400,n),s=Math.min(14400,s)),i=[n,s],r.substr(0,1)){case"l":s>n&&(i=[s,n]);break;case"p":n>s&&(i=[s,n])}pt(i),Jt(Wt),rA(ie),0!==le&&rA(le+" J"),0!==he&&rA(he+" j"),MA.publish("addPage",{