196 lines
350 KiB
JavaScript
196 lines
350 KiB
JavaScript
|
|
import{c as ve}from"./@react-pdf/renderer-e56aa971.js";const Fu="modulepreload",Iu=function(r){return"/"+r},ic={},gs=function(e,n,a){if(!n||n.length===0)return e();const c=document.getElementsByTagName("link");return Promise.all(n.map(o=>{if(o=Iu(o),o in ic)return;ic[o]=!0;const l=o.endsWith(".css"),h=l?'[rel="stylesheet"]':"";if(!!a)for(let b=c.length-1;b>=0;b--){const y=c[b];if(y.href===o&&(!l||y.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${o}"]${h}`))return;const g=document.createElement("link");if(g.rel=l?"stylesheet":Fu,l||(g.as="script",g.crossOrigin=""),g.href=o,document.head.appendChild(g),l)return new Promise((b,y)=>{g.addEventListener("load",b),g.addEventListener("error",()=>y(new Error(`Unable to preload CSS for ${o}`)))})})).then(()=>e()).catch(o=>{const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=o,window.dispatchEvent(l),!l.defaultPrevented)throw o})};var tn=Uint8Array,vn=Uint16Array,Ps=Int32Array,go=new tn([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]),mo=new tn([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]),ms=new tn([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Sc=function(r,e){for(var n=new vn(31),a=0;a<31;++a)n[a]=e+=1<<r[a-1];for(var c=new Ps(n[30]),a=1;a<30;++a)for(var o=n[a];o<n[a+1];++o)c[o]=o-n[a]<<5|a;return{b:n,r:c}},_c=Sc(go,2),Pc=_c.b,vs=_c.r;Pc[28]=258,vs[258]=28;var kc=Sc(mo,0),Cu=kc.b,ac=kc.r,bs=new vn(32768);for(var we=0;we<32768;++we){var kr=(we&43690)>>1|(we&21845)<<1;kr=(kr&52428)>>2|(kr&13107)<<2,kr=(kr&61680)>>4|(kr&3855)<<4,bs[we]=((kr&65280)>>8|(kr&255)<<8)>>1}var tr=function(r,e,n){for(var a=r.length,c=0,o=new vn(e);c<a;++c)r[c]&&++o[r[c]-1];var l=new vn(e);for(c=1;c<e;++c)l[c]=l[c-1]+o[c-1]<<1;var h;if(n){h=new vn(1<<e);var f=15-e;for(c=0;c<a;++c)if(r[c])for(var g=c<<4|r[c],b=e-r[c],y=l[r[c]-1]++<<b,S=y|(1<<b)-1;y<=S;++y)h[bs[y]>>f]=g}else for(h=new vn(a),c=0;c<a;++c)r[c]&&(h[c]=bs[l[r[c]-1]++]>>15-r[c]);return h},Or=new tn(288);for(var we=0;we<144;++we)Or[we]=8;for(var we=144;we<256;++we)Or[we]=9;for(var we=256;we<280;++we)Or[we]=7;for(var we=280;we<288;++we)Or[we]=8;var va=new tn(32);for(var we=0;we<32;++we)va[we]=5;var ju=tr(Or,9,0),Ou=tr(Or,9,1),Bu=tr(va,5,0),Mu=tr(va,5,1),os=function(r){for(var e=r[0],n=1;n<r.length;++n)r[n]>e&&(e=r[n]);return e},qn=function(r,e,n){var a=e/8|0;return(r[a]|r[a+1]<<8)>>(e&7)&n},ss=function(r,e){var n=e/8|0;return(r[n]|r[n+1]<<8|r[n+2]<<16)>>(e&7)},ks=function(r){return(r+7)/8|0},Fc=function(r,e,n){return(e==null||e<0)&&(e=0),(n==null||n>r.length)&&(n=r.length),new tn(r.subarray(e,n))},Eu=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],Rn=function(r,e,n){var a=new Error(e||Eu[r]);if(a.code=r,Error.captureStackTrace&&Error.captureStackTrace(a,Rn),!n)throw a;return a},qu=function(r,e,n,a){var c=r.length,o=a?a.length:0;if(!c||e.f&&!e.l)return n||new tn(0);var l=!n,h=l||e.i!=2,f=e.i;l&&(n=new tn(c*3));var g=function(Nt){var Ft=n.length;if(Nt>Ft){var _t=new tn(Math.max(Ft*2,Nt));_t.set(n),n=_t}},b=e.f||0,y=e.p||0,S=e.b||0,p=e.l,O=e.d,F=e.m,q=e.n,_=c*8;do{if(!p){b=qn(r,y,1);var B=qn(r,y+1,3);if(y+=3,B)if(B==1)p=Ou,O=Mu,F=9,q=5;else if(B==2){var wt=qn(r,y,31)+257,tt=qn(r,y+10,15)+4,z=wt+qn(r,y+5,31)+1;y+=14;for(var rt=new tn(z),dt=new tn(19),P=0;P<tt;++P)dt[ms[P]]=qn(r,y+P*3,7);y+=tt*3;for(var k=os(dt),W=(1<<k)-1,D=tr(dt,k,1),P=0;P<z;){var st=D[qn(r,y,W)];y+=st&15;var Y=st>>4;if(Y<16)rt[P++]=Y;else{var it=0,lt=0;for(Y==16?(lt=3+qn(r,y,3),y+=2,it=rt[P-1]):Y==17?(lt=3+qn(r,y,7),y+=3):Y==18&&(lt=11+qn(r,y,127),y+=7);lt--;)rt[P++]=it}}var $=rt.subarray(0,wt),ht=rt.subarray(wt);F=os($),q=os(ht),p=tr($,F,1),O=tr(ht,q,1)}else Rn(1);else{var Y=ks(y)+4,ot=r[Y-4]|r[Y-3]<<8,ut=Y+ot;if(ut>c){f&&Rn(0);break}h&&g(S+ot),n.set(r.subarray(Y,ut),S),e.b=S+=ot,e.p=y=ut*8,e.f=b;continue}if(y>_){f&&Rn(0);break}}h&&g(S+131072);for(var pt=(1<<F)-1,It=(1<<q)-1,N=y
|
||
|
|
* 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 Bc(r){var e;r=r||"",this.ok=!1,r.charAt(0)=="#"&&(r=r.substr(1,6)),r={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"}[r=(r=r.replace(/ /g,"")).toLowerCase()]||r;for(var n=[{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(h){return[parseInt(h[1]),parseInt(h[2]),parseInt(h[3])]}},{re:/^(\w{2})(\w{2})(\w{2})$/,example:["#00ff00","336699"],process:function(h){return[parseInt(h[1],16),parseInt(h[2],16),parseInt(h[3],16)]}},{re:/^(\w{1})(\w{1})(\w{1})$/,example:["#fb0","f0f"],process:function(h){return[parseInt(h[1]+h[1],16),parseInt(h[2]+h[2],16),parseInt(h[3]+h[3],16)]}}],a=0;a<n.length;a++){var c=n[a].re,o=n[a].process,l=c.exec(r);l&&(e=o(l),this.r=e[0],this.g=e[1],this.b=e[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 h=this.r.toString(16),f=this.g.toString(16),g=this.b.toString(16);return h.length==1&&(h="0"+h),f.length==1&&(f="0"+f),g.length==1&&(g="0"+g),"#"+h+f+g}}/**
|
||
|
|
* @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 hs(r,e){var n=r[0],a=r[1],c=r[2],o=r[3];n=Ke(n,a,c,o,e[0],7,-680876936),o=Ke(o,n,a,c,e[1],12,-389564586),c=Ke(c,o,n,a,e[2],17,606105819),a=Ke(a,c,o,n,e[3],22,-1044525330),n=Ke(n,a,c,o,e[4],7,-176418897),o=Ke(o,n,a,c,e[5],12,1200080426),c=Ke(c,o,n,a,e[6],17,-1473231341),a=Ke(a,c,o,n,e[7],22,-45705983),n=Ke(n,a,c,o,e[8],7,1770035416),o=Ke(o,n,a,c,e[9],12,-1958414417),c=Ke(c,o,n,a,e[10],17,-42063),a=Ke(a,c,o,n,e[11],22,-1990404162),n=Ke(n,a,c,o,e[12],7,1804603682),o=Ke(o,n,a,c,e[13],12,-40341101),c=Ke(c,o,n,a,e[14],17,-1502002290),n=Ze(n,a=Ke(a,c,o,n,e[15],22,1236535329),c,o,e[1],5,-165796510),o=Ze(o,n,a,c,e[6],9,-1069501632),c=Ze(c,o,n,a,e[11],14,643717713),a=Ze(a,c,o,n,e[0],20,-373897302),n=Ze(n,a,c,o,e[5],5,-701558691),o=Ze(o,n,a,c,e[10],9,38016083),c=Ze(c,o,n,a,e[15],14,-660478335),a=Ze(a,c,o,n,e[4],20,-405537848),n=Ze(n,a,c,o,e[9],5,568446438),o=Ze(o,n,a,c,e[14],9,-1019803690),c=Ze(c,o,n,a,e[3],14,-187363961),a=Ze(a,c,o,n,e[8],20,1163531501),n=Ze(n,a,c,o,e[13],5,-1444681467),o=Ze(o,n,a,c,e[2],9,-51403784),c=Ze(c,o,n,a,e[7],14,1735328473),n=$e(n,a=Ze(a,c,o,n,e[12],20,-1926607734),c,o,e[5],4,-378558),o=$e(o,n,a,c,e[8],11,-2022574463),c=$e(c,o,n,a,e[11],16,1839030562),a=$e(a,c,o,n,e[14],23,-35309556),n=$e(n,a,c,o,e[1],4,-1530992060),o=$e(o,n,a,c,e[4],11,1272893353),c=$e(c,o,n,a,e[7],16,-155497632),a=$e(a,c,o,n,e[10],23,-1094730640),n=$e(n,a,c,o,e[13],4,681279174),o=$e(o,n,a,c,e[0],11,-358537222),c=$e(c,o,n,a,e[3],16,-722521979),a=$e(a,c,o,n,e[6],23,76029189),n=$e(n,a,c,o,e[9],4,-640364487),o=$e(o,n,a,c,e[12],11,-421815835),c=$e(c,o,n,a,e[15],16,530742520),n=Qe(n,a=$e(a,c,o,n,e[2],23,-995338651),c,o,e[0],6,-198630844),o=Qe(o,n,a,c,e[7],10,1126891415),c=Qe(c,o,n,a,e[14],15,-1416354905),a=Qe(a,c,o,n,e[5],21,-57434055),n=Qe(n,a,c,o,e[12],6,1700485571),o=Qe(o,n,a,c,e[3],10,-1894986606),c=Qe(c,o,n,a,e[10],15,-1051523),a=Qe(a,c,o,n,e[1],21,-2054922799),n=Qe(n,a,c,o,e[8],6,1873313359),o=Qe(o,n,a,c,e[15],10,-30611744),c=Qe(c,o,n,a,e[6],15,-1560198380),a=Qe(a,c,o,n,e[13],21,1309151649),n=Qe(n,a,c,o,e[4],6,-145523070),o=Qe(o,n,a,c,e[11],10,-1120210379),c=Qe(c,o,n,a,e[2],15,718787259),a=Qe(a,c,o,n,e[9],21,-343485551),r[0]=Cr(n,r[0]),r[1]=Cr(a,r[1]),r[2]=Cr(c,r[2]),r[3]=Cr(o,r[3])}function vo(r,e,n,a,c,o){return e=Cr(Cr(e,r),Cr(a,o)),Cr(e<<c|e>>>32-c,n)}function Ke(r,e,n,a,c,o,l){return vo(e&n|~e&a,r,e,c,o,l)}function Ze(r,e,n,a,c,o,l){return vo(e&a|n&~a,r,e,c,o,l)}function $e(r,e,n,a,c,o,l){return vo(e^n^a,r,e,c,o,l)}function Qe(r,e,n,a,c,o,l){return vo(n^(e|~a),r,e,c,o,l)}function Mc(r){var e,n=r.length,a=[1732584193,-271733879,-1732584194,271733878];for(e=64;e<=r.length;e+=64)hs(a,Gu(r.substring(e-64,e)));r=r.substring(e-64);var c=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(e=0;e<r.length;e++)c[e>>2]|=r.charCodeAt(e)<<(e%4<<3);if(c[e>>2]|=128<<(e%4<<3),e>55)for(hs(a,c),e=0;e<16;e++)c[e]=0;return c[14]=8*n,hs(a,c),a}function Gu(r){var e,n=[];for(e=0;e<64;e+=4)n[e>>2]=r.charCodeAt(e)+(r.charCodeAt(e+1)<<8)+(r.charCodeAt(e+2)<<16)+(r.charCodeAt(e+3)<<24);return n}fa=Ht.atob.bind(Ht),Ls=Ht.btoa.bind(Ht);var uc="0123456789abcdef".split("");function Ju(r){for(var e="",n=0;n<4;n++)e+=uc[r>>8*n+4&15]+uc[r>>8*n&15];return e}function Yu(r){return String.fromCharCode((255&r)>>0,(65280&r)>>8,(16711680&r)>>16,(4278190080&r)>>24)}function Ns(r){return Mc(r).map(Yu).join("")}var Xu=function(r){for(var e=0;e<r.length;e++)r[e]=Ju(r[e]);return r.join("")}(Mc("hello"))!="5d41402abc4b2a76b9719d911017c592";function Cr(r,e){if(Xu){var n=(65535&r)+(65535&e);return(r>>16)+(e>>16)+(n>>16)<<16|65535&n}return r+e&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 As(r,e){var n,a,c,o;if(r!==n){for(var l=(c=r,o=1+(256/r.length>>0),new Array(o+1).join(c)),h=[],f=0;f<256;f++)h[f]=f;var g=0;for(f=0;f<256;f++){var b=h[f];g=(g+b+l.charCodeAt(f))%256,h[f]=h[g],h[g]=b}n=r,a=h}else h=a;var y=e.length,S=0,p=0,O="";for(f=0;f<y;f++)p=(p+(b=h[S=(S+1)%256]))%256,h[S]=h[p],h[p]=b,l=h[(h[S]+h[p])%256],O+=String.fromCharCode(e.charCodeAt(f)^l);return O}/**
|
||
|
|
* @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 lc={print:4,modify:8,copy:16,"annot-forms":32};function ji(r,e,n,a){this.v=1,this.r=2;var c=192;r.forEach(function(h){if(lc.perm!==void 0)throw new Error("Invalid permission: "+h);c+=lc[h]}),this.padding="(¿N^NuAd\0NVÿú\b..\0¶Ðh>/\f©þdSiz";var o=(e+this.padding).substr(0,32),l=(n+this.padding).substr(0,32);this.O=this.processOwnerPassword(o,l),this.P=-(1+(255^c)),this.encryptionKey=Ns(o+this.O+this.lsbFirstWord(this.P)+this.hexToBytes(a)).substr(0,5),this.U=As(this.encryptionKey,this.padding)}function Oi(r){if(/[^\u0000-\u00ff]/.test(r))throw new Error("Invalid PDF Name Object: "+r+", Only accept ASCII characters.");for(var e="",n=r.length,a=0;a<n;a++){var c=r.charCodeAt(a);c<33||c===35||c===37||c===40||c===41||c===47||c===60||c===62||c===91||c===93||c===123||c===125||c>126?e+="#"+("0"+c.toString(16)).slice(-2):e+=r[a]}return e}function hc(r){if(ve(r)!=="object")throw new Error("Invalid Context passed to initialize PubSub (jsPDF-module)");var e={};this.subscribe=function(n,a,c){if(c=c||!1,typeof n!="string"||typeof a!="function"||typeof c!="boolean")throw new Error("Invalid arguments passed to PubSub.subscribe (jsPDF-module)");e.hasOwnProperty(n)||(e[n]={});var o=Math.random().toString(35);return e[n][o]=[a,!!c],o},this.unsubscribe=function(n){for(var a in e)if(e[a][n])return delete e[a][n],Object.keys(e[a]).length===0&&delete e[a],!0;return!1},this.publish=function(n){if(e.hasOwnProperty(n)){var a=Array.prototype.slice.call(arguments,1),c=[];for(var o in e[n]){var l=e[n][o];try{l[0].apply(r,a)}catch(h){Ht.console&&me.error("jsPDF PubSub Error",h.message,h)}l[1]&&c.push(o)}c.length&&c.forEach(this.unsubscribe)}},this.getTopics=function(){return e}}function ba(r){if(!(this instanceof ba))return new ba(r);var e="opacity,stroke-opacity".split(",");for(var n in r)r.hasOwnProperty(n)&&e.indexOf(n)>=0&&(this[n]=r[n]);this.id="",this.objectNumber=-1}function Ec(r,e){this.gState=r,this.matrix=e,this.id="",this.objectNumber=-1}function Ir(r,e,n,a,c){if(!(this instanceof Ir))return new Ir(r,e,n,a,c);this.type=r==="axial"?2:3,this.coords=e,this.colors=n,Ec.call(this,a,c)}function Xr(r,e,n,a,c){if(!(this instanceof Xr))return new Xr(r,e,n,a,c);this.boundingBox=r,this.xStep=e,this.yStep=n,this.stream="",this.cloneIndex=0,Ec.call(this,a,c)}function Tt(r){var e,n=typeof arguments[0]=="string"?arguments[0]:"p",a=arguments[1],c=arguments[2],o=arguments[3],l=[],h=1,f=16,g="S",b=null;ve(r=r||{})==="object"&&(n=r.orientation,a=r.unit||a,c=r.format||c,o=r.compress||r.compressPdf||o,(b=r.encryption||null)!==null&&(b.userPassword=b.userPassword||"",b.ownerPassword=b.ownerPassword||"",b.userPermissions=b.userPermissions||[]),h=typeof r.userUnit=="number"?Math.abs(r.userUnit):1,r.precision!==void 0&&(e=r.precision),r.floatPrecision!==void 0&&(f=r.floatPrecision),g=r.defaultPathOperation||"S"),l=r.filters||(o===!0?["FlateEncode"]:l),a=a||"mm",n=(""+(n||"P")).toLowerCase();var y=r.putOnlyUsedFonts||!1,S={},p={internal:{},__private__:{}};p.__private__.PubSub=hc;var O="1.3",F=p.__private__.getPdfVersion=function(){return O};p.__private__.setPdfVersion=function(s){O=s};var q={a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89],a5:[419.53,595.28],a6:[297.64,419.53],a7:[209.76,297.64],a8:[147.4,209.76],a9:[104.88,147.4],a10:[73.7,104.88],b0:[2834.65,4008.19],b1:[2004.09,2834.65],b2:[1417.32,2004.09],b3:[1000.63,1417.32],b4:[708.66,1000.63],b5:[498.9,708.66],b6:[354.33,498.9],b7:[249.45,354.33],b8:[175.75,249.45],b9:[124.72,175.75],b10:[87.87,124.72],c0:[2599.37,3676.54],c1:[1836.85,2599.37],c2:[1298.27,1836.85],c3:[918.43,1298.27],c4:[649.13,918.43],c5:[459.21,649.13],c6:[323.15,459.21],c7:[229.61,323.15],c8:[161.57,229.61],c9:[113.39,161.57],c10:[79.37,113.39],dl:[311.81,623.62],letter:[612,792],"government-letter":[576,756],legal:[612,1008],"junior-legal":[576,360],ledger:[1224,792],tabloid:[792,1224],"credit-card":[153,243]};p.__private__.getPageFormats=function(){return q};var _=p.__private__.getPageFormat=function(s){return q[s]};c=c||"a4";var B={COMPAT:"compat",ADVANCED:"advanc
|
||
|
|
`),an(s,v),ue.publish("endTilingPattern",v),Wn.pop().restore()};var De=p.__private__.newObject=function(){var s=Be();return fn(s,!0),s},Be=p.__private__.newObjectDeferred=function(){return J++,Q[J]=function(){return nt},J},fn=function(s,v){return v=typeof v=="boolean"&&v,Q[s]=nt,v&&E(s+" 0 obj"),s},ei=p.__private__.newAdditionalObject=function(){var s={objId:Be(),content:""};return At.push(s),s},rr=Be(),Fn=Be(),In=p.__private__.decodeColorString=function(s){var v=s.split(" ");if(v.length!==2||v[1]!=="g"&&v[1]!=="G")v.length===5&&(v[4]==="k"||v[4]==="K")&&(v=[(1-v[0])*(1-v[3]),(1-v[1])*(1-v[3]),(1-v[2])*(1-v[3]),"r"]);else{var j=parseFloat(v[0]);v=[j,j,j,"r"]}for(var R="#",X=0;X<3;X++)R+=("0"+Math.floor(255*parseFloat(v[X])).toString(16)).slice(-2);return R},Cn=p.__private__.encodeColorString=function(s){var v;typeof s=="string"&&(s={ch1:s});var j=s.ch1,R=s.ch2,X=s.ch3,ct=s.ch4,yt=s.pdfColorType==="draw"?["G","RG","K"]:["g","rg","k"];if(typeof j=="string"&&j.charAt(0)!=="#"){var Ot=new Bc(j);if(Ot.ok)j=Ot.toHex();else if(!/^\d*\.?\d*$/.test(j))throw new Error('Invalid color "'+j+'" passed to jsPDF.encodeColorString.')}if(typeof j=="string"&&/^#[0-9A-Fa-f]{3}$/.test(j)&&(j="#"+j[1]+j[1]+j[2]+j[2]+j[3]+j[3]),typeof j=="string"&&/^#[0-9A-Fa-f]{6}$/.test(j)){var Dt=parseInt(j.substr(1),16);j=Dt>>16&255,R=Dt>>8&255,X=255&Dt}if(R===void 0||ct===void 0&&j===R&&R===X)if(typeof j=="string")v=j+" "+yt[0];else switch(s.precision){case 2:v=dt(j/255)+" "+yt[0];break;case 3:default:v=P(j/255)+" "+yt[0]}else if(ct===void 0||ve(ct)==="object"){if(ct&&!isNaN(ct.a)&&ct.a===0)return v=["1.","1.","1.",yt[1]].join(" ");if(typeof j=="string")v=[j,R,X,yt[1]].join(" ");else switch(s.precision){case 2:v=[dt(j/255),dt(R/255),dt(X/255),yt[1]].join(" ");break;default:case 3:v=[P(j/255),P(R/255),P(X/255),yt[1]].join(" ")}}else if(typeof j=="string")v=[j,R,X,ct,yt[2]].join(" ");else switch(s.precision){case 2:v=[dt(j),dt(R),dt(X),dt(ct),yt[2]].join(" ");break;case 3:default:v=[P(j),P(R),P(X),P(ct),yt[2]].join(" ")}return v},Gn=p.__private__.getFilters=function(){return l},bn=p.__private__.putStream=function(s){var v=(s=s||{}).data||"",j=s.filters||Gn(),R=s.alreadyAppliedFilters||[],X=s.addLength1||!1,ct=v.length,yt=s.objectId,Ot=function(Xe){return Xe};if(b!==null&&yt===void 0)throw new Error("ObjectId must be passed to putStream for file encryption");b!==null&&(Ot=Ye.encryptor(yt,0));var Dt={};j===!0&&(j=["FlateEncode"]);var Zt=s.additionalKeyValues||[],Yt=(Dt=Tt.API.processDataByFilters!==void 0?Tt.API.processDataByFilters(v,j):{data:v,reverseChain:[]}).reverseChain+(Array.isArray(R)?R.join(" "):R.toString());if(Dt.data.length!==0&&(Zt.push({key:"Length",value:Dt.data.length}),X===!0&&Zt.push({key:"Length1",value:ct})),Yt.length!=0)if(Yt.split("/").length-1==1)Zt.push({key:"Filter",value:Yt});else{Zt.push({key:"Filter",value:"["+Yt+"]"});for(var re=0;re<Zt.length;re+=1)if(Zt[re].key==="DecodeParms"){for(var Ne=[],Se=0;Se<Dt.reverseChain.split("/").length-1;Se+=1)Ne.push("null");Ne.push(Zt[re].value),Zt[re].value="["+Ne.join(" ")+"]"}}E("<<");for(var Me=0;Me<Zt.length;Me++)E("/"+Zt[Me].key+" "+Zt[Me].value);E(">>"),Dt.data.length!==0&&(E("stream"),E(Ot(Dt.data)),E("endstream"))},Jn=p.__private__.putPage=function(s){var v=s.number,j=s.data,R=s.objId,X=s.contentsObjId;fn(R,!0),E("<</Type /Page"),E("/Parent "+s.rootDictionaryObjId+" 0 R"),E("/Resources "+s.resourceDictionaryObjId+" 0 R"),E("/MediaBox ["+parseFloat(tt(s.mediaBox.bottomLeftX))+" "+parseFloat(tt(s.mediaBox.bottomLeftY))+" "+tt(s.mediaBox.topRightX)+" "+tt(s.mediaBox.topRightY)+"]"),s.cropBox!==null&&E("/CropBox ["+tt(s.cropBox.bottomLeftX)+" "+tt(s.cropBox.bottomLeftY)+" "+tt(s.cropBox.topRightX)+" "+tt(s.cropBox.topRightY)+"]"),s.bleedBox!==null&&E("/BleedBox ["+tt(s.bleedBox.bottomLeftX)+" "+tt(s.bleedBox.bottomLeftY)+" "+tt(s.bleedBox.topRightX)+" "+tt(s.bleedBox.topRightY)+"]"),s.trimBox!==null&&E("/TrimBox ["+tt(s.trimBox.bottomLeftX)+" "+tt(s.trimBox.bottomLeftY)+" "+tt(s.trimBox.topRightX)+" "+tt(s.trimBox.topRightY)+"]"),s.artBox!==null&&E("/ArtBox ["+tt(s.artBox.bottomLeftX)+" "+
|
||
|
|
`);return Y===B.ADVANCED&&(ct+=`
|
||
|
|
Q`),fn(X,!0),bn({data:ct,filters:Gn(),objectId:X}),E("endobj"),R},qr=p.__private__.putPages=function(){var s,v,j=[];for(s=1;s<=xe;s++)Jt[s].objId=Be(),Jt[s].contentsObjId=Be();for(s=1;s<=xe;s++)j.push(Jn({number:s,data:Nt[s],objId:Jt[s].objId,contentsObjId:Jt[s].contentsObjId,mediaBox:Jt[s].mediaBox,cropBox:Jt[s].cropBox,bleedBox:Jt[s].bleedBox,trimBox:Jt[s].trimBox,artBox:Jt[s].artBox,userUnit:Jt[s].userUnit,rootDictionaryObjId:rr,resourceDictionaryObjId:Fn}));fn(rr,!0),E("<</Type /Pages");var R="/Kids [";for(v=0;v<xe;v++)R+=j[v]+" 0 R ";E(R+"]"),E("/Count "+xe),E(">>"),E("endobj"),ue.publish("postPutPages")},ni=function(s){ue.publish("putFont",{font:s,out:E,newObject:De,putStream:bn}),s.isAlreadyPutted!==!0&&(s.objectNumber=De(),E("<<"),E("/Type /Font"),E("/BaseFont /"+Oi(s.postScriptName)),E("/Subtype /Type1"),typeof s.encoding=="string"&&E("/Encoding /"+s.encoding),E("/FirstChar 32"),E("/LastChar 255"),E(">>"),E("endobj"))},ri=function(){for(var s in pe)pe.hasOwnProperty(s)&&(y===!1||y===!0&&S.hasOwnProperty(s))&&ni(pe[s])},ii=function(s){s.objectNumber=De();var v=[];v.push({key:"Type",value:"/XObject"}),v.push({key:"Subtype",value:"/Form"}),v.push({key:"BBox",value:"["+[tt(s.x),tt(s.y),tt(s.x+s.width),tt(s.y+s.height)].join(" ")+"]"}),v.push({key:"Matrix",value:"["+s.matrix.toString()+"]"});var j=s.pages[1].join(`
|
||
|
|
`);bn({data:j,additionalKeyValues:v,objectId:s.objectNumber}),E("endobj")},ai=function(){for(var s in We)We.hasOwnProperty(s)&&ii(We[s])},ya=function(s,v){var j,R=[],X=1/(v-1);for(j=0;j<1;j+=X)R.push(j);if(R.push(1),s[0].offset!=0){var ct={offset:0,color:s[0].color};s.unshift(ct)}if(s[s.length-1].offset!=1){var yt={offset:1,color:s[s.length-1].color};s.push(yt)}for(var Ot="",Dt=0,Zt=0;Zt<R.length;Zt++){for(j=R[Zt];j>s[Dt+1].offset;)Dt++;var Yt=s[Dt].offset,re=(j-Yt)/(s[Dt+1].offset-Yt),Ne=s[Dt].color,Se=s[Dt+1].color;Ot+=T(Math.round((1-re)*Ne[0]+re*Se[0]).toString(16))+T(Math.round((1-re)*Ne[1]+re*Se[1]).toString(16))+T(Math.round((1-re)*Ne[2]+re*Se[2]).toString(16))}return Ot.trim()},bo=function(s,v){v||(v=21);var j=De(),R=ya(s.colors,v),X=[];X.push({key:"FunctionType",value:"0"}),X.push({key:"Domain",value:"[0.0 1.0]"}),X.push({key:"Size",value:"["+v+"]"}),X.push({key:"BitsPerSample",value:"8"}),X.push({key:"Range",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),X.push({key:"Decode",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),bn({data:R,additionalKeyValues:X,alreadyAppliedFilters:["/ASCIIHexDecode"],objectId:j}),E("endobj"),s.objectNumber=De(),E("<< /ShadingType "+s.type),E("/ColorSpace /DeviceRGB");var ct="/Coords ["+tt(parseFloat(s.coords[0]))+" "+tt(parseFloat(s.coords[1]))+" ";s.type===2?ct+=tt(parseFloat(s.coords[2]))+" "+tt(parseFloat(s.coords[3])):ct+=tt(parseFloat(s.coords[2]))+" "+tt(parseFloat(s.coords[3]))+" "+tt(parseFloat(s.coords[4]))+" "+tt(parseFloat(s.coords[5])),E(ct+="]"),s.matrix&&E("/Matrix ["+s.matrix.toString()+"]"),E("/Function "+j+" 0 R"),E("/Extend [true true]"),E(">>"),E("endobj")},yo=function(s,v){var j=Be(),R=De();v.push({resourcesOid:j,objectOid:R}),s.objectNumber=R;var X=[];X.push({key:"Type",value:"/Pattern"}),X.push({key:"PatternType",value:"1"}),X.push({key:"PaintType",value:"1"}),X.push({key:"TilingType",value:"1"}),X.push({key:"BBox",value:"["+s.boundingBox.map(tt).join(" ")+"]"}),X.push({key:"XStep",value:tt(s.xStep)}),X.push({key:"YStep",value:tt(s.yStep)}),X.push({key:"Resources",value:j+" 0 R"}),s.matrix&&X.push({key:"Matrix",value:"["+s.matrix.toString()+"]"}),bn({data:s.stream,additionalKeyValues:X,objectId:s.objectNumber}),E("endobj")},oi=function(s){var v;for(v in ce)ce.hasOwnProperty(v)&&(ce[v]instanceof Ir?bo(ce[v]):ce[v]instanceof Xr&&yo(ce[v],s))},wa=function(s){for(var v in s.objectNumber=De(),E("<<"),s)switch(v){case"opacity":E("/ca "+dt(s[v]));break;case"stroke-opacity":E("/CA "+dt(s[v]))}E(">>"),E("endobj")},wo=function(){var s;for(s in Ae)Ae.hasOwnProperty(s)&&wa(Ae[s])},Bi=function(){for(var s in E("/XObject <<"),We)We.hasOwnProperty(s)&&We[s].objectNumber>=0&&E("/"+s+" "+We[s].objectNumber+" 0 R");ue.publish("putXobjectDict"),E(">>")},Lo=function(){Ye.oid=De(),E("<<"),E("/Filter /Standard"),E("/V "+Ye.v),E("/R "+Ye.r),E("/U <"+Ye.toHexString(Ye.U)+">"),E("/O <"+Ye.toHexString(Ye.O)+">"),E("/P "+Ye.P),E(">>"),E("endobj")},La=function(){for(var s in E("/Font <<"),pe)pe.hasOwnProperty(s)&&(y===!1||y===!0&&S.hasOwnProperty(s))&&E("/"+s+" "+pe[s].objectNumber+" 0 R");E(">>")},No=function(){if(Object.keys(ce).length>0){for(var s in E("/Shading <<"),ce)ce.hasOwnProperty(s)&&ce[s]instanceof Ir&&ce[s].objectNumber>=0&&E("/"+s+" "+ce[s].objectNumber+" 0 R");ue.publish("putShadingPatternDict"),E(">>")}},si=function(s){if(Object.keys(ce).length>0){for(var v in E("/Pattern <<"),ce)ce.hasOwnProperty(v)&&ce[v]instanceof p.TilingPattern&&ce[v].objectNumber>=0&&ce[v].objectNumber<s&&E("/"+v+" "+ce[v].objectNumber+" 0 R");ue.publish("putTilingPatternDict"),E(">>")}},Ao=function(){if(Object.keys(Ae).length>0){var s;for(s in E("/ExtGState <<"),Ae)Ae.hasOwnProperty(s)&&Ae[s].objectNumber>=0&&E("/"+s+" "+Ae[s].objectNumber+" 0 R");ue.publish("putGStateDict"),E(">>")}},ke=function(s){fn(s.resourcesOid,!0),E("<<"),E("/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]"),La(),No(),si(s.objectOid),Ao(),Bi(),E(">>"),E("endobj")},Na=function(){var s=[];ri(),wo(),ai(),oi(s),ue.publish("putResources"),s.forEach(ke),ke({resourcesOid:Fn,objectOid:Number.MAX_SAFE_INTEGER}),ue.publish("postPutResources")},Aa=function(){ue
|
||
|
|
`)[0].split("<")[0]+": "+R.message;if(!Ht.console)throw new Error(j);Ht.console.error(j,R),Ht.alert&&alert(j)}},s.foo.bar=s,s.foo},ci=function(s,v){var j,R,X,ct,yt,Ot,Dt,Zt,Yt;if(X=(v=v||{}).sourceEncoding||"Unicode",yt=v.outputEncoding,(v.autoencode||yt)&&pe[ee].metadata&&pe[ee].metadata[X]&&pe[ee].metadata[X].encoding&&(ct=pe[ee].metadata[X].encoding,!yt&&pe[ee].encoding&&(yt=pe[ee].encoding),!yt&&ct.codePages&&(yt=ct.codePages[0]),typeof yt=="string"&&(yt=ct[yt]),yt)){for(Dt=!1,Ot=[],j=0,R=s.length;j<R;j++)(Zt=yt[s.charCodeAt(j)])?Ot.push(String.fromCharCode(Zt)):Ot.push(s[j]),Ot[j].charCodeAt(0)>>8&&(Dt=!0);s=Ot.join("")}for(j=s.length;Dt===void 0&&j!==0;)s.charCodeAt(j-1)>>8&&(Dt=!0),j--;if(!Dt)return s;for(Ot=v.noBOM?[]:[254,255],j=0,R=s.length;j<R;j++){if((Yt=(Zt=s.charCodeAt(j))>>8)>>8)throw new Error("Character at position "+j+" of string '"+s+"' exceeds 16bits. Cannot be encoded into UCS-2 BE");Ot.push(Yt),Ot.push(Zt-(Yt<<8))}return String.fromCharCode.apply(void 0,Ot)},on=p.__private__.pdfEscape=p.pdfEscape=function(s,v){return ci(s,v).replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},Ei=p.__private__.beginPage=function(s){Nt[++xe]=[],Jt[xe]={objId:0,contentsObjId:0,userUnit:Number(h),artBox:null,bleedBox:null,cropBox:null,trimBox:null,mediaBox:{bottomLeftX:0,bottomLeftY:0,topRightX:Number(s[0]),topRightY:Number(s[1])}},_a(xe),ft(Nt[C])},Sa=function(s,v){var j,R,X;switch(n=v||n,typeof s=="string"&&(j=_(s.toLowerCase()),Array.isArray(j)&&(R=j[0],X=j[1])),Array.isArray(s)&&(R=s[0]*jt,X=s[1]*jt),isNaN(R)&&(R=c[0],X=c[1]),(R>14400||X>14400)&&(me.warn("A page in a PDF can not be wider or taller than 14400 userUnit. jsPDF limits the width/height to 14400"),R=Math.min(14400,R),X=Math.min(14400,X)),c=[R,X],n.substr(0,1)){case"l":X>R&&(c=[X,R]);break;case"p":R>X&&(c=[X,R])}Ei(c),ja(Ti),E(On),Ui!==0&&E(Ui+" J"),Hi!==0&&E(Hi+" j"),ue.publish("addPage",{pageNumber:xe})},So=function(s){s>0&&s<=xe&&(Nt.splice(s,1),Jt.splice(s,1),xe--,C>xe&&(C=xe),this.setPage(C))},_a=function(s){s>0&&s<=xe&&(C=s)},_o=p.__private__.getNumberOfPages=p.getNumberOfPages=function(){return Nt.length-1},Pa=function(s,v,j){var R,X=void 0;return j=j||{},s=s!==void 0?s:pe[ee].fontName,v=v!==void 0?v:pe[ee].fontStyle,R=s.toLowerCase(),Le[R]!==void 0&&Le[R][v]!==void 0?X=Le[R][v]:Le[s]!==void 0&&Le[s][v]!==void 0?X=Le[s][v]:j.disableWarning===!1&&me.warn("Unable to look up font label for font '"+s+"', '"+v+"'. Refer to getFontList() for available fonts."),X||j.noFallback||(X=Le.times[v])==null&&(X=Le.times.normal),X},Po=p.__private__.putInfo=function(){var s=De(),v=function(R){return R};for(var j in b!==null&&(v=Ye.encryptor(s,0)),E("<<"),E("/Producer ("+on(v("jsPDF "+Tt.version))+")"),Wt)Wt.hasOwnProperty(j)&&Wt[j]&&E("/"+j.substr(0,1).toUpperCase()+j.substr(1)+" ("+on(v(Wt[j]))+")");E("/CreationDate ("+on(v(st))+")"),E(">>"),E("endobj")},qi=p.__private__.putCatalog=function(s){var v=(s=s||{}).rootDictionaryObjId||rr;switch(De(),E("<<"),E("/Type /Catalog"),E("/Pages "+v+" 0 R"),Ct||(Ct="fullwidth"),Ct){case"fullwidth":E("/OpenAction [3 0 R /FitH null]");break;case"fullheight":E("/OpenAction [3 0 R /FitV null]");break;case"fullpage":E("/OpenAction [3 0 R /Fit]");break;case"original":E("/OpenAction [3 0 R /XYZ null null 1]");break;default:var j=""+Ct;j.substr(j.length-1)==="%"&&(Ct=parseInt(Ct)/100),typeof Ct=="number"&&E("/OpenAction [3 0 R /XYZ null null "+dt(Ct)+"]")}switch(te||(te="continuous"),te){case"continuous":E("/PageLayout /OneColumn");break;case"single":E("/PageLayout /SinglePage");break;case"two":case"twoleft":E("/PageLayout /TwoColumnLeft");break;case"tworight":E("/PageLayout /TwoColumnRight")}Gt&&E("/PageMode /"+Gt),ue.publish("putCatalog"),E(">>"),E("endobj")},ko=p.__private__.putTrailer=function(){E("trailer"),E("<<"),E("/Size "+(J+1)),E("/Root "+J+" 0 R"),E("/Info "+(J-1)+" 0 R"),b!==null&&E("/Encrypt "+Ye.oid+" 0 R"),E("/ID [ <"+it+"> <"+it+"> ]"),E(">>")},Fo=p.__private__.putHeader=function(){E("%PDF-"+O),E("%ºß¬à")},Io=p.__private__.putXRef=function(){var s="0000000000";E("xref"),E("0 "+(J+1)),E("0000000000 65535
|
||
|
|
`)},ui=p.__private__.getBlob=function(s){return new Blob([Et(s)],{type:"application/pdf"})},li=p.output=p.__private__.output=jn(function(s,v){switch(typeof(v=v||{})=="string"?v={filename:v}:v.filename=v.filename||"generated.pdf",s){case void 0:return ir();case"save":p.save(v.filename);break;case"arraybuffer":return Et(ir());case"blob":return ui(ir());case"bloburi":case"bloburl":if(Ht.URL!==void 0&&typeof Ht.URL.createObjectURL=="function")return Ht.URL&&Ht.URL.createObjectURL(ui(ir()))||void 0;me.warn("bloburl is not supported by your system, because URL.createObjectURL is not supported by your browser.");break;case"datauristring":case"dataurlstring":var j="",R=ir();try{j=Ls(R)}catch{j=Ls(unescape(encodeURIComponent(R)))}return"data:application/pdf;filename="+v.filename+";base64,"+j;case"pdfobjectnewwindow":if(Object.prototype.toString.call(Ht)==="[object Window]"){var X="https://cdnjs.cloudflare.com/ajax/libs/pdfobject/2.1.1/pdfobject.min.js",ct=' integrity="sha512-4ze/a9/4jqu+tX9dfOqJYSvyYd5M6qum/3HpCLr+/Jqf0whc37VUbkpNGHR7/8pSnCFw47T1fmIpwBV7UySh3g==" crossorigin="anonymous"';v.pdfObjectUrl&&(X=v.pdfObjectUrl,ct="");var yt='<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;} </style><body><script src="'+X+'"'+ct+'><\/script><script >PDFObject.embed("'+this.output("dataurlstring")+'", '+JSON.stringify(v)+");<\/script></body></html>",Ot=Ht.open();return Ot!==null&&Ot.document.write(yt),Ot}throw new Error("The option pdfobjectnewwindow just works in a browser-environment.");case"pdfjsnewwindow":if(Object.prototype.toString.call(Ht)==="[object Window]"){var Dt='<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;} </style><body><iframe id="pdfViewer" src="'+(v.pdfJsUrl||"examples/PDF.js/web/viewer.html")+"?file=&downloadName="+v.filename+'" width="500px" height="400px" /></body></html>',Zt=Ht.open();if(Zt!==null){Zt.document.write(Dt);var Yt=this;Zt.document.documentElement.querySelector("#pdfViewer").onload=function(){Zt.document.title=v.filename,Zt.document.documentElement.querySelector("#pdfViewer").contentWindow.PDFViewerApplication.open(Yt.output("bloburl"))}}return Zt}throw new Error("The option pdfjsnewwindow just works in a browser-environment.");case"dataurlnewwindow":if(Object.prototype.toString.call(Ht)!=="[object Window]")throw new Error("The option dataurlnewwindow just works in a browser-environment.");var re='<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;} </style><body><iframe src="'+this.output("datauristring",v)+'"></iframe></body></html>',Ne=Ht.open();if(Ne!==null&&(Ne.document.write(re),Ne.document.title=v.filename),Ne||typeof safari>"u")return Ne;break;case"datauri":case"dataurl":return Ht.document.location.href=this.output("datauristring",v);default:return null}}),ka=function(s){return Array.isArray(Er)===!0&&Er.indexOf(s)>-1};switch(a){case"pt":jt=1;break;case"mm":jt=72/25.4;break;case"cm":jt=72/2.54;break;case"in":jt=72;break;case"px":jt=ka("px_scaling")==1?.75:96/72;break;case"pc":case"em":jt=12;break;case"ex":jt=6;break;default:if(typeof a!="number")throw new Error("Invalid unit: "+a);jt=a}var Ye=null;It(),$();var Co=function(s){return b!==null?Ye.encryptor(s,0):function(v){return v}},Fa=p.__private__.getPageInfo=p.getPageInfo=function(s){if(isNaN(s)||s%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfo");return{objId:Jt[s].objId,pageNumber:s,pageContext:Jt[s]}},Vt=p.__private__.getPageInfoByObjId=function(s){if(isNaN(s)||s%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfoByObjId");for(var v in Jt)if(Jt[v].objId===s)break;return Fa(v)},jo=p.__private__.getCurrentPageInfo=p.getCurrentPageInfo=function(){return{objId:Jt[C].objId,pageNumber:C,pageContext:Jt[C]}};p.addPage=function(){return Sa.apply(this,arguments),this},p.setPage=function(){return _a.apply(this,arguments),ft.call(this,Nt[C]),this},p.insertPage=function(s){return this.addPage(),this.movePage(C,s),this},p.movePage=function(s,v){var j,R;if(s>v){j=Nt[s],R=Jt[s
|
||
|
|
`,this.setCharSpace(this.getCharSpace()||0)),(Ne=R.horizontalScale)!==void 0&&(ze+=tt(100*Ne)+` Tz
|
||
|
|
`),R.lang;var sn=-1,Uo=R.renderingMode!==void 0?R.renderingMode:R.stroke,Qi=Me.internal.getCurrentPageInfo().pageContext;switch(Uo){case 0:case!1:case"fill":sn=0;break;case 1:case!0:case"stroke":sn=1;break;case 2:case"fillThenStroke":sn=2;break;case 3:case"invisible":sn=3;break;case 4:case"fillAndAddForClipping":sn=4;break;case 5:case"strokeAndAddPathForClipping":sn=5;break;case 6:case"fillThenStrokeAndAddToPathForClipping":sn=6;break;case 7:case"addToPathForClipping":sn=7}var Ra=Qi.usedRenderingMode!==void 0?Qi.usedRenderingMode:-1;sn!==-1?ze+=sn+` Tr
|
||
|
|
`:Ra!==-1&&(ze+=`0 Tr
|
||
|
|
`),sn!==-1&&(Qi.usedRenderingMode=sn),Dt=R.align||"left";var yn,Li=xt*dn,Ta=Me.internal.pageSize.getWidth(),za=pe[ee];Zt=R.charSpace||di,Yt=R.maxWidth||0,re=Object.assign({autoencode:!0,noBOM:!0},R.flags);var vr=[],Ur=function(be){return Me.getStringUnitWidth(be,{font:za,charSpace:Zt,fontSize:xt,doKerning:!1})*xt/Kn};if(Object.prototype.toString.call(s)==="[object Array]"){var cn;yt=Yi(s),Dt!=="left"&&(yn=yt.map(Ur));var en,br=0;if(Dt==="right"){v-=yn[0],s=[],Ve=yt.length;for(var or=0;or<Ve;or++)or===0?(en=Xn(v),cn=ar(j)):(en=k(br-yn[or]),cn=-Li),s.push([yt[or],en,cn]),br=yn[or]}else if(Dt==="center"){v-=yn[0]/2,s=[],Ve=yt.length;for(var sr=0;sr<Ve;sr++)sr===0?(en=Xn(v),cn=ar(j)):(en=k((br-yn[sr])/2),cn=-Li),s.push([yt[sr],en,cn]),br=yn[sr]}else if(Dt==="left"){s=[],Ve=yt.length;for(var Ni=0;Ni<Ve;Ni++)s.push(yt[Ni])}else if(Dt==="justify"&&za.encoding==="Identity-H"){s=[],Ve=yt.length,Yt=Yt!==0?Yt:Ta;for(var cr=0,Fe=0;Fe<Ve;Fe++)if(cn=Fe===0?ar(j):-Li,en=Fe===0?Xn(v):cr,Fe<Ve-1){var ta=k((Yt-yn[Fe])/(yt[Fe].split(" ").length-1)),nn=yt[Fe].split(" ");s.push([nn[0]+" ",en,cn]),cr=0;for(var wn=1;wn<nn.length;wn++){var Ai=(Ur(nn[wn-1]+" "+nn[wn])-Ur(nn[wn]))*Kn+ta;wn==nn.length-1?s.push([nn[wn],Ai,0]):s.push([nn[wn]+" ",Ai,0]),cr-=Ai}}else s.push([yt[Fe],en,cn]);s.push(["",cr,0])}else{if(Dt!=="justify")throw new Error('Unrecognized alignment option, use "left", "center", "right" or "justify".');for(s=[],Ve=yt.length,Yt=Yt!==0?Yt:Ta,Fe=0;Fe<Ve;Fe++)cn=Fe===0?ar(j):-Li,en=Fe===0?Xn(v):0,Fe<Ve-1?vr.push(tt(k((Yt-yn[Fe])/(yt[Fe].split(" ").length-1)))):vr.push(0),s.push([yt[Fe],en,cn])}}var Ua=typeof R.R2L=="boolean"?R.R2L:qt;Ua===!0&&(s=Xi(s,function(be,ye,Ie){return[be.split("").reverse().join(""),ye,Ie]})),ct={text:s,x:v,y:j,options:R,mutex:{pdfEscape:on,activeFontKey:ee,fonts:pe,activeFontSize:xt}},ue.publish("postProcessText",ct),s=ct.text,Bn=ct.mutex.isHex||!1;var ea=pe[ee].encoding;ea!=="WinAnsiEncoding"&&ea!=="StandardEncoding"||(s=Xi(s,function(be,ye,Ie){return[Da(be),ye,Ie]})),yt=Yi(s),s=[];for(var Hr,Wr,yr,Vr=0,xi=1,Gr=Array.isArray(yt[0])?xi:Vr,wr="",na=function(be,ye,Ie){var Re="";return Ie instanceof zt?(Ie=typeof R.angle=="number"?kn(Ie,new zt(1,0,0,1,be,ye)):kn(new zt(1,0,0,1,be,ye),Ie),Y===B.ADVANCED&&(Ie=kn(new zt(1,0,0,-1,0,0),Ie)),Re=Ie.join(" ")+` Tm
|
||
|
|
`):Re=tt(be)+" "+tt(ye)+` Td
|
||
|
|
`,Re},Ln=0;Ln<yt.length;Ln++){switch(wr="",Gr){case xi:yr=(Bn?"<":"(")+yt[Ln][0]+(Bn?">":")"),Hr=parseFloat(yt[Ln][1]),Wr=parseFloat(yt[Ln][2]);break;case Vr:yr=(Bn?"<":"(")+yt[Ln]+(Bn?">":")"),Hr=Xn(v),Wr=ar(j)}vr!==void 0&&vr[Ln]!==void 0&&(wr=vr[Ln]+` Tw
|
||
|
|
`),Ln===0?s.push(wr+na(Hr,Wr,Se)+yr):Gr===Vr?s.push(wr+yr):Gr===xi&&s.push(wr+na(Hr,Wr,Se)+yr)}s=Gr===Vr?s.join(` Tj
|
||
|
|
T* `):s.join(` Tj
|
||
|
|
`),s+=` Tj
|
||
|
|
`;var Nn=`BT
|
||
|
|
/`;return Nn+=ee+" "+xt+` Tf
|
||
|
|
`,Nn+=tt(xt*dn)+` TL
|
||
|
|
`,Nn+=Tr+`
|
||
|
|
`,Nn+=ze,Nn+=s,E(Nn+="ET"),S[ee]=!0,Me};var Oo=p.__private__.clip=p.clip=function(s){return E(s==="evenodd"?"W*":"W"),this};p.clipEvenOdd=function(){return Oo("evenodd")},p.__private__.discardPath=p.discardPath=function(){return E("n"),this};var Yn=p.__private__.isValidStyle=function(s){var v=!1;return[void 0,null,"S","D","F","DF","FD","f","f*","B","B*","n"].indexOf(s)!==-1&&(v=!0),v};p.__private__.setDefaultPathOperation=p.setDefaultPathOperation=function(s){return Yn(s)&&(g=s),this};var Ia=p.__private__.getStyle=p.getStyle=function(s){var v=g;switch(s){case"D":case"S":v="S";break;case"F":v="f";break;case"FD":case"DF":v="B";break;case"f":case"f*":case"B":case"B*":v=s}return v},Ca=p.close=function(){return E("h"),this};p.stroke=function(){return E("S"),this},p.fill=function(s){return hi("f",s),this},p.fillEvenOdd=function(s){return hi("f*",s),this},p.fillStroke=function(s){return hi("B",s),this},p.fillStrokeEvenOdd=function(s){return hi("B*",s),this};var hi=function(s,v){ve(v)==="object"?Mo(v,s):E(s)},Di=function(s){s===null||Y===B.ADVANCED&&s===void 0||(s=Ia(s),E(s))};function Bo(s,v,j,R,X){var ct=new Xr(v||this.boundingBox,j||this.xStep,R||this.yStep,this.gState,X||this.matrix);ct.stream=this.stream;var yt=s+"$$"+this.cloneIndex+++"$$";return an(yt,ct),ct}var Mo=function(s,v){var j=Mr[s.key],R=ce[j];if(R instanceof Ir)E("q"),E(Eo(v)),R.gState&&p.setGState(R.gState),E(s.matrix.toString()+" cm"),E("/"+j+" sh"),E("Q");else if(R instanceof Xr){var X=new zt(1,0,0,-1,0,mr());s.matrix&&(X=X.multiply(s.matrix||Vn),j=Bo.call(R,s.key,s.boundingBox,s.xStep,s.yStep,X).id),E("q"),E("/Pattern cs"),E("/"+j+" scn"),R.gState&&p.setGState(R.gState),E(v),E("Q")}},Eo=function(s){switch(s){case"f":case"F":return"W n";case"f*":return"W* n";case"B":return"W S";case"B*":return"W* S";case"S":return"W S";case"n":return"W n"}},Ri=p.moveTo=function(s,v){return E(tt(k(s))+" "+tt(D(v))+" m"),this},Dr=p.lineTo=function(s,v){return E(tt(k(s))+" "+tt(D(v))+" l"),this},pr=p.curveTo=function(s,v,j,R,X,ct){return E([tt(k(s)),tt(D(v)),tt(k(j)),tt(D(R)),tt(k(X)),tt(D(ct)),"c"].join(" ")),this};p.__private__.line=p.line=function(s,v,j,R,X){if(isNaN(s)||isNaN(v)||isNaN(j)||isNaN(R)||!Yn(X))throw new Error("Invalid arguments passed to jsPDF.line");return Y===B.COMPAT?this.lines([[j-s,R-v]],s,v,[1,1],X||"S"):this.lines([[j-s,R-v]],s,v,[1,1]).stroke()},p.__private__.lines=p.lines=function(s,v,j,R,X,ct){var yt,Ot,Dt,Zt,Yt,re,Ne,Se,Me,Xe,ze,Bn;if(typeof s=="number"&&(Bn=j,j=v,v=s,s=Bn),R=R||[1,1],ct=ct||!1,isNaN(v)||isNaN(j)||!Array.isArray(s)||!Array.isArray(R)||!Yn(X)||typeof ct!="boolean")throw new Error("Invalid arguments passed to jsPDF.lines");for(Ri(v,j),yt=R[0],Ot=R[1],Zt=s.length,Xe=v,ze=j,Dt=0;Dt<Zt;Dt++)(Yt=s[Dt]).length===2?(Xe=Yt[0]*yt+Xe,ze=Yt[1]*Ot+ze,Dr(Xe,ze)):(re=Yt[0]*yt+Xe,Ne=Yt[1]*Ot+ze,Se=Yt[2]*yt+Xe,Me=Yt[3]*Ot+ze,Xe=Yt[4]*yt+Xe,ze=Yt[5]*Ot+ze,pr(re,Ne,Se,Me,Xe,ze));return ct&&Ca(),Di(X),this},p.path=function(s){for(var v=0;v<s.length;v++){var j=s[v],R=j.c;switch(j.op){case"m":Ri(R[0],R[1]);break;case"l":Dr(R[0],R[1]);break;case"c":pr.apply(this,R);break;case"h":Ca()}}return this},p.__private__.rect=p.rect=function(s,v,j,R,X){if(isNaN(s)||isNaN(v)||isNaN(j)||isNaN(R)||!Yn(X))throw new Error("Invalid arguments passed to jsPDF.rect");return Y===B.COMPAT&&(R=-R),E([tt(k(s)),tt(D(v)),tt(k(j)),tt(k(R)),"re"].join(" ")),Di(X),this},p.__private__.triangle=p.triangle=function(s,v,j,R,X,ct,yt){if(isNaN(s)||isNaN(v)||isNaN(j)||isNaN(R)||isNaN(X)||isNaN(ct)||!Yn(yt))throw new Error("Invalid arguments passed to jsPDF.triangle");return this.lines([[j-s,R-v],[X-j,ct-R],[s-X,v-ct]],s,v,[1,1],yt,!0),this},p.__private__.roundedRect=p.roundedRect=function(s,v,j,R,X,ct,yt){if(isNaN(s)||isNaN(v)||isNaN(j)||isNaN(R)||isNaN(X)||isNaN(ct)||!Yn(yt))throw new Error("Invalid arguments passed to jsPDF.roundedRect");var Ot=4/3*(Math.SQRT2-1);return X=Math.min(X,.5*j),ct=Math.min(ct,.5*R),this.lines([[j-2*X,0],[X*Ot,0,X,ct-ct*Ot,X,ct],[0,R-2*ct],[0,ct*Ot,-X*Ot,ct,-X,ct],[2*X-j,0],[-X*Ot,0,-X,-ct*Ot,-X,-ct],[0,2*ct-R],[0,-ct*Ot,X*Ot,-ct,X,-ct]],s+X,v,[1,1],yt,!0),this}
|
||
|
|
`),o}},xs=function(r,e){var n=r.fontSize===0?r.maxFontSize:r.fontSize,a={text:"",fontSize:""},c=(e=(e=e.substr(0,1)=="("?e.substr(1):e).substr(e.length-1)==")"?e.substr(0,e.length-1):e).split(" ");c=r.multiline?c.map(function(P){return P.split(`
|
||
|
|
`)}):c.map(function(P){return[P]});var o=n,l=Mt.internal.getHeight(r)||0;l=l<0?-l:l;var h=Mt.internal.getWidth(r)||0;h=h<0?-h:h;var f=function(P,k,W){if(P+1<c.length){var D=k+" "+c[P+1][0];return lo(D,r,W).width<=h-4}return!1};o++;t:for(;o>0;){e="",o--;var g,b,y=lo("3",r,o).height,S=r.multiline?l-o:(l-y)/2,p=S+=2,O=0,F=0,q=0;if(o<=0){e=`(...) Tj
|
||
|
|
`,e+="% Width of Text: "+lo(e,r,o=12).width+", FieldWidth:"+h+`
|
||
|
|
`;break}for(var _="",B=0,Y=0;Y<c.length;Y++)if(c.hasOwnProperty(Y)){var ot=!1;if(c[Y].length!==1&&q!==c[Y].length-1){if((y+2)*(B+2)+2>l)continue t;_+=c[Y][q],ot=!0,F=Y,Y--}else{_=(_+=c[Y][q]+" ").substr(_.length-1)==" "?_.substr(0,_.length-1):_;var ut=parseInt(Y),wt=f(ut,_,o),tt=Y>=c.length-1;if(wt&&!tt){_+=" ",q=0;continue}if(wt||tt){if(tt)F=ut;else if(r.multiline&&(y+2)*(B+2)+2>l)continue t}else{if(!r.multiline||(y+2)*(B+2)+2>l)continue t;F=ut}}for(var z="",rt=O;rt<=F;rt++){var dt=c[rt];if(r.multiline){if(rt===F){z+=dt[q]+" ",q=(q+1)%dt.length;continue}if(rt===O){z+=dt[dt.length-1]+" ";continue}}z+=dt[0]+" "}switch(z=z.substr(z.length-1)==" "?z.substr(0,z.length-1):z,b=lo(z,r,o).width,r.textAlign){case"right":g=h-b-2;break;case"center":g=(h-b)/2;break;case"left":default:g=2}e+=Xt(g)+" "+Xt(p)+` Td
|
||
|
|
`,e+="("+ti(z)+`) Tj
|
||
|
|
`,e+=-Xt(g)+` 0 Td
|
||
|
|
`,p=-(o+2),b=0,O=ot?F:F+1,B++,_=""}break}return a.text=e,a.fontSize=o,a},lo=function(r,e,n){var a=e.scope.internal.getFont(e.fontName,e.fontStyle),c=e.scope.getStringUnitWidth(r,{font:a,fontSize:parseFloat(n),charSpace:0})*parseFloat(n);return{height:e.scope.getStringUnitWidth("3",{font:a,fontSize:parseFloat(n),charSpace:0})*parseFloat(n)*1.5,width:c}},el={fields:[],xForms:[],acroFormDictionaryRoot:null,printedOut:!1,internal:null,isInitialized:!1},nl=function(r,e){var n={type:"reference",object:r};e.internal.getPageInfo(r.page).pageContext.annotations.find(function(a){return a.type===n.type&&a.object===n.object})===void 0&&e.internal.getPageInfo(r.page).pageContext.annotations.push(n)},rl=function(r,e){for(var n in r)if(r.hasOwnProperty(n)){var a=n,c=r[n];e.internal.newObjectDeferredBegin(c.objId,!0),ve(c)==="object"&&typeof c.putStream=="function"&&c.putStream(),delete r[a]}},il=function(r,e){if(e.scope=r,r.internal!==void 0&&(r.internal.acroformPlugin===void 0||r.internal.acroformPlugin.isInitialized===!1)){if(Tn.FieldNum=0,r.internal.acroformPlugin=JSON.parse(JSON.stringify(el)),r.internal.acroformPlugin.acroFormDictionaryRoot)throw new Error("Exception while creating AcroformDictionary");Fs=r.internal.scaleFactor,r.internal.acroformPlugin.acroFormDictionaryRoot=new Rc,r.internal.acroformPlugin.acroFormDictionaryRoot.scope=r,r.internal.acroformPlugin.acroFormDictionaryRoot._eventID=r.internal.events.subscribe("postPutResources",function(){(function(n){n.internal.events.unsubscribe(n.internal.acroformPlugin.acroFormDictionaryRoot._eventID),delete n.internal.acroformPlugin.acroFormDictionaryRoot._eventID,n.internal.acroformPlugin.printedOut=!0})(r)}),r.internal.events.subscribe("buildDocument",function(){(function(n){n.internal.acroformPlugin.acroFormDictionaryRoot.objId=void 0;var a=n.internal.acroformPlugin.acroFormDictionaryRoot.Fields;for(var c in a)if(a.hasOwnProperty(c)){var o=a[c];o.objId=void 0,o.hasAnnotation&&nl(o,n)}})(r)}),r.internal.events.subscribe("putCatalog",function(){(function(n){if(n.internal.acroformPlugin.acroFormDictionaryRoot===void 0)throw new Error("putCatalogCallback: Root missing.");n.internal.write("/AcroForm "+n.internal.acroformPlugin.acroFormDictionaryRoot.objId+" 0 R")})(r)}),r.internal.events.subscribe("postPutPages",function(n){(function(a,c){var o=!a;for(var l in a||(c.internal.newObjectDeferredBegin(c.internal.acroformPlugin.acroFormDictionaryRoot.objId,!0),c.internal.acroformPlugin.acroFormDictionaryRoot.putStream()),a=a||c.internal.acroformPlugin.acroFormDictionaryRoot.Kids)if(a.hasOwnProperty(l)){var h=a[l],f=[],g=h.Rect;if(h.Rect&&(h.Rect=Qu(h.Rect,c)),c.internal.newObjectDeferredBegin(h.objId,!0),h.DA=Mt.createDefaultAppearanceStream(h),ve(h)==="object"&&typeof h.getKeyValueListForStream=="function"&&(f=h.getKeyValueListForStream()),h.Rect=g,h.hasAppearanceStream&&!h.appearanceStreamContent){var b=tl(h);f.push({key:"AP",value:"<</N "+b+">>"}),c.internal.acroformPlugin.xForms.push(b)}if(h.appearanceStreamContent){var y="";for(var S in h.appearanceStreamContent)if(h.appearanceStreamContent.hasOwnProperty(S)){var p=h.appearanceStreamContent[S];if(y+="/"+S+" ",y+="<<",Object.keys(p).length>=1||Array.isArray(p)){for(var l in p)if(p.hasOwnProperty(l)){var O=p[l];typeof O=="function"&&(O=O.call(c,h)),y+="/"+l+" "+O+" ",c.internal.acroformPlugin.xForms.indexOf(O)>=0||c.internal.acroformPlugin.xForms.push(O)}}else typeof(O=p)=="function"&&(O=O.call(c,h)),y+="/"+l+" "+O,c.internal.acroformPlugin.xForms.indexOf(O)>=0||c.internal.acroformPlugin.xForms.push(O);y+=">>"}f.push({key:"AP",value:`<<
|
||
|
|
`+y+">>"})}c.internal.putStream({additionalKeyValues:f,objectId:h.objId}),c.internal.out("endobj")}o&&rl(c.internal.acroformPlugin.xForms,c)})(n,r)}),r.internal.acroformPlugin.isInitialized=!0}},qc=Pe.__acroform__.arrayToPdfArray=function(r,e,n){var a=function(l){return l};if(Array.isArray(r)){for(var c="[",o=0;o<r.length;o++)switch(o!==0&&(c+=" "),ve(r[o])){case"boolean":case"number":case"object":c+=r[o].toString();break;case"string":r[o].substr(0,1)!=="/"?(e!==void 0&&n&&(a=n.internal.getEncryptor(e)),c+="("+ti(a(r[o].toString()))+")"):c+=r[o].toString()}return c+="]"}throw new Error("Invalid argument passed to jsPDF.__acroform__.arrayToPdfArray")},fs=function(r,e,n){var a=function(c){return c};return e!==void 0&&n&&(a=n.internal.getEncryptor(e)),(r=r||"").toString(),r="("+ti(a(r))+")"},Qn=function(){this._objId=void 0,this._scope=void 0,Object.defineProperty(this,"objId",{get:function(){if(this._objId===void 0){if(this.scope===void 0)return;this._objId=this.scope.internal.newObjectDeferred()}return this._objId},set:function(r){this._objId=r}}),Object.defineProperty(this,"scope",{value:this._scope,writable:!0})};Qn.prototype.toString=function(){return this.objId+" 0 R"},Qn.prototype.putStream=function(){var r=this.getKeyValueListForStream();this.scope.internal.putStream({data:this.stream,additionalKeyValues:r,objectId:this.objId}),this.scope.internal.out("endobj")},Qn.prototype.getKeyValueListForStream=function(){var r=[],e=Object.getOwnPropertyNames(this).filter(function(o){return o!="content"&&o!="appearanceStreamContent"&&o!="scope"&&o!="objId"&&o.substring(0,1)!="_"});for(var n in e)if(Object.getOwnPropertyDescriptor(this,e[n]).configurable===!1){var a=e[n],c=this[a];c&&(Array.isArray(c)?r.push({key:a,value:qc(c,this.objId,this.scope)}):c instanceof Qn?(c.scope=this.scope,r.push({key:a,value:c.objId+" 0 R"})):typeof c!="function"&&r.push({key:a,value:c}))}return r};var Dc=function(){Qn.call(this),Object.defineProperty(this,"Type",{value:"/XObject",configurable:!1,writable:!0}),Object.defineProperty(this,"Subtype",{value:"/Form",configurable:!1,writable:!0}),Object.defineProperty(this,"FormType",{value:1,configurable:!1,writable:!0});var r,e=[];Object.defineProperty(this,"BBox",{configurable:!1,get:function(){return e},set:function(n){e=n}}),Object.defineProperty(this,"Resources",{value:"2 0 R",configurable:!1,writable:!0}),Object.defineProperty(this,"stream",{enumerable:!1,configurable:!0,set:function(n){r=n.trim()},get:function(){return r||null}})};hn(Dc,Qn);var Rc=function(){Qn.call(this);var r,e=[];Object.defineProperty(this,"Kids",{enumerable:!1,configurable:!0,get:function(){return e.length>0?e:void 0}}),Object.defineProperty(this,"Fields",{enumerable:!1,configurable:!1,get:function(){return e}}),Object.defineProperty(this,"DA",{enumerable:!1,configurable:!1,get:function(){if(r){var n=function(a){return a};return this.scope&&(n=this.scope.internal.getEncryptor(this.objId)),"("+ti(n(r))+")"}},set:function(n){r=n}})};hn(Rc,Qn);var Tn=function r(){Qn.call(this);var e=4;Object.defineProperty(this,"F",{enumerable:!1,configurable:!1,get:function(){return e},set:function(_){if(isNaN(_))throw new Error('Invalid value "'+_+'" for attribute F supplied.');e=_}}),Object.defineProperty(this,"showWhenPrinted",{enumerable:!0,configurable:!0,get:function(){return!!Ce(e,3)},set:function(_){_?this.F=je(e,3):this.F=Oe(e,3)}});var n=0;Object.defineProperty(this,"Ff",{enumerable:!1,configurable:!1,get:function(){return n},set:function(_){if(isNaN(_))throw new Error('Invalid value "'+_+'" for attribute Ff supplied.');n=_}});var a=[];Object.defineProperty(this,"Rect",{enumerable:!1,configurable:!1,get:function(){if(a.length!==0)return a},set:function(_){a=_!==void 0?_:[]}}),Object.defineProperty(this,"x",{enumerable:!0,configurable:!0,get:function(){return!a||isNaN(a[0])?0:a[0]},set:function(_){a[0]=_}}),Object.defineProperty(this,"y",{enumerable:!0,configurable:!0,get:function(){return!a||isNaN(a[1])?0:a[1]},set:function(_){a[1]=_}}),Object.defineProperty(this,"width",{enumerable:!0,configurable:!0,get:function(){return!a||isNaN(a
|
||
|
|
`)}},set:function(n){ve(n)==="object"&&(e=n)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return e.CA||""},set:function(n){typeof n=="string"&&(e.CA=n)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return r},set:function(n){r=n}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return r.substr(1,r.length-1)},set:function(n){r="/"+n}})};hn(Te,Tn);var pa=function(){Te.call(this),this.pushButton=!0};hn(pa,Te);var Qr=function(){Te.call(this),this.radio=!0,this.pushButton=!1;var r=[];Object.defineProperty(this,"Kids",{enumerable:!0,configurable:!1,get:function(){return r},set:function(e){r=e!==void 0?e:[]}})};hn(Qr,Te);var po=function(){var r,e;Tn.call(this),Object.defineProperty(this,"Parent",{enumerable:!1,configurable:!1,get:function(){return r},set:function(c){r=c}}),Object.defineProperty(this,"optionName",{enumerable:!1,configurable:!0,get:function(){return e},set:function(c){e=c}});var n,a={};Object.defineProperty(this,"MK",{enumerable:!1,configurable:!1,get:function(){var c=function(h){return h};this.scope&&(c=this.scope.internal.getEncryptor(this.objId));var o,l=[];for(o in l.push("<<"),a)l.push("/"+o+" ("+ti(c(a[o]))+")");return l.push(">>"),l.join(`
|
||
|
|
`)},set:function(c){ve(c)==="object"&&(a=c)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return a.CA||""},set:function(c){typeof c=="string"&&(a.CA=c)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return n},set:function(c){n=c}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return n.substr(1,n.length-1)},set:function(c){n="/"+c}}),this.caption="l",this.appearanceState="Off",this._AppearanceType=Mt.RadioButton.Circle,this.appearanceStreamContent=this._AppearanceType.createAppearanceStream(this.optionName)};hn(po,Tn),Qr.prototype.setAppearance=function(r){if(!("createAppearanceStream"in r)||!("getCA"in r))throw new Error("Couldn't assign Appearance to RadioButton. Appearance was Invalid!");for(var e in this.Kids)if(this.Kids.hasOwnProperty(e)){var n=this.Kids[e];n.appearanceStreamContent=r.createAppearanceStream(n.optionName),n.caption=r.getCA()}},Qr.prototype.createOption=function(r){var e=new po;return e.Parent=this,e.optionName=r,this.Kids.push(e),al.call(this.scope,e),e};var ga=function(){Te.call(this),this.fontName="zapfdingbats",this.caption="3",this.appearanceState="On",this.value="On",this.textAlign="center",this.appearanceStreamContent=Mt.CheckBox.createAppearanceStream()};hn(ga,Te);var jr=function(){Tn.call(this),this.FT="/Tx",Object.defineProperty(this,"multiline",{enumerable:!0,configurable:!0,get:function(){return!!Ce(this.Ff,13)},set:function(e){e?this.Ff=je(this.Ff,13):this.Ff=Oe(this.Ff,13)}}),Object.defineProperty(this,"fileSelect",{enumerable:!0,configurable:!0,get:function(){return!!Ce(this.Ff,21)},set:function(e){e?this.Ff=je(this.Ff,21):this.Ff=Oe(this.Ff,21)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return!!Ce(this.Ff,23)},set:function(e){e?this.Ff=je(this.Ff,23):this.Ff=Oe(this.Ff,23)}}),Object.defineProperty(this,"doNotScroll",{enumerable:!0,configurable:!0,get:function(){return!!Ce(this.Ff,24)},set:function(e){e?this.Ff=je(this.Ff,24):this.Ff=Oe(this.Ff,24)}}),Object.defineProperty(this,"comb",{enumerable:!0,configurable:!0,get:function(){return!!Ce(this.Ff,25)},set:function(e){e?this.Ff=je(this.Ff,25):this.Ff=Oe(this.Ff,25)}}),Object.defineProperty(this,"richText",{enumerable:!0,configurable:!0,get:function(){return!!Ce(this.Ff,26)},set:function(e){e?this.Ff=je(this.Ff,26):this.Ff=Oe(this.Ff,26)}});var r=null;Object.defineProperty(this,"MaxLen",{enumerable:!0,configurable:!1,get:function(){return r},set:function(e){r=e}}),Object.defineProperty(this,"maxLength",{enumerable:!0,configurable:!0,get:function(){return r},set:function(e){Number.isInteger(e)&&(r=e)}}),Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return this.V||this.DV}})};hn(jr,Tn);var ma=function(){jr.call(this),Object.defineProperty(this,"password",{enumerable:!0,configurable:!0,get:function(){return!!Ce(this.Ff,14)},set:function(r){r?this.Ff=je(this.Ff,14):this.Ff=Oe(this.Ff,14)}}),this.password=!0};hn(ma,jr);var Mt={CheckBox:{createAppearanceStream:function(){return{N:{On:Mt.CheckBox.YesNormal},D:{On:Mt.CheckBox.YesPushDown,Off:Mt.CheckBox.OffPushDown}}},YesPushDown:function(r){var e=$n(r);e.scope=r.scope;var n=[],a=r.scope.internal.getFont(r.fontName,r.fontStyle).id,c=r.scope.__private__.encodeColorString(r.color),o=xs(r,r.caption);return n.push("0.749023 g"),n.push("0 0 "+Xt(Mt.internal.getWidth(r))+" "+Xt(Mt.internal.getHeight(r))+" re"),n.push("f"),n.push("BMC"),n.push("q"),n.push("0 0 1 rg"),n.push("/"+a+" "+Xt(o.fontSize)+" Tf "+c),n.push("BT"),n.push(o.text),n.push("ET"),n.push("Q"),n.push("EMC"),e.stream=n.join(`
|
||
|
|
`),e},YesNormal:function(r){var e=$n(r);e.scope=r.scope;var n=r.scope.internal.getFont(r.fontName,r.fontStyle).id,a=r.scope.__private__.encodeColorString(r.color),c=[],o=Mt.internal.getHeight(r),l=Mt.internal.getWidth(r),h=xs(r,r.caption);return c.push("1 g"),c.push("0 0 "+Xt(l)+" "+Xt(o)+" re"),c.push("f"),c.push("q"),c.push("0 0 1 rg"),c.push("0 0 "+Xt(l-1)+" "+Xt(o-1)+" re"),c.push("W"),c.push("n"),c.push("0 g"),c.push("BT"),c.push("/"+n+" "+Xt(h.fontSize)+" Tf "+a),c.push(h.text),c.push("ET"),c.push("Q"),e.stream=c.join(`
|
||
|
|
`),e},OffPushDown:function(r){var e=$n(r);e.scope=r.scope;var n=[];return n.push("0.749023 g"),n.push("0 0 "+Xt(Mt.internal.getWidth(r))+" "+Xt(Mt.internal.getHeight(r))+" re"),n.push("f"),e.stream=n.join(`
|
||
|
|
`),e}},RadioButton:{Circle:{createAppearanceStream:function(r){var e={D:{Off:Mt.RadioButton.Circle.OffPushDown},N:{}};return e.N[r]=Mt.RadioButton.Circle.YesNormal,e.D[r]=Mt.RadioButton.Circle.YesPushDown,e},getCA:function(){return"l"},YesNormal:function(r){var e=$n(r);e.scope=r.scope;var n=[],a=Mt.internal.getWidth(r)<=Mt.internal.getHeight(r)?Mt.internal.getWidth(r)/4:Mt.internal.getHeight(r)/4;a=Number((.9*a).toFixed(5));var c=Mt.internal.Bezier_C,o=Number((a*c).toFixed(5));return n.push("q"),n.push("1 0 0 1 "+Fr(Mt.internal.getWidth(r)/2)+" "+Fr(Mt.internal.getHeight(r)/2)+" cm"),n.push(a+" 0 m"),n.push(a+" "+o+" "+o+" "+a+" 0 "+a+" c"),n.push("-"+o+" "+a+" -"+a+" "+o+" -"+a+" 0 c"),n.push("-"+a+" -"+o+" -"+o+" -"+a+" 0 -"+a+" c"),n.push(o+" -"+a+" "+a+" -"+o+" "+a+" 0 c"),n.push("f"),n.push("Q"),e.stream=n.join(`
|
||
|
|
`),e},YesPushDown:function(r){var e=$n(r);e.scope=r.scope;var n=[],a=Mt.internal.getWidth(r)<=Mt.internal.getHeight(r)?Mt.internal.getWidth(r)/4:Mt.internal.getHeight(r)/4;a=Number((.9*a).toFixed(5));var c=Number((2*a).toFixed(5)),o=Number((c*Mt.internal.Bezier_C).toFixed(5)),l=Number((a*Mt.internal.Bezier_C).toFixed(5));return n.push("0.749023 g"),n.push("q"),n.push("1 0 0 1 "+Fr(Mt.internal.getWidth(r)/2)+" "+Fr(Mt.internal.getHeight(r)/2)+" cm"),n.push(c+" 0 m"),n.push(c+" "+o+" "+o+" "+c+" 0 "+c+" c"),n.push("-"+o+" "+c+" -"+c+" "+o+" -"+c+" 0 c"),n.push("-"+c+" -"+o+" -"+o+" -"+c+" 0 -"+c+" c"),n.push(o+" -"+c+" "+c+" -"+o+" "+c+" 0 c"),n.push("f"),n.push("Q"),n.push("0 g"),n.push("q"),n.push("1 0 0 1 "+Fr(Mt.internal.getWidth(r)/2)+" "+Fr(Mt.internal.getHeight(r)/2)+" cm"),n.push(a+" 0 m"),n.push(a+" "+l+" "+l+" "+a+" 0 "+a+" c"),n.push("-"+l+" "+a+" -"+a+" "+l+" -"+a+" 0 c"),n.push("-"+a+" -"+l+" -"+l+" -"+a+" 0 -"+a+" c"),n.push(l+" -"+a+" "+a+" -"+l+" "+a+" 0 c"),n.push("f"),n.push("Q"),e.stream=n.join(`
|
||
|
|
`),e},OffPushDown:function(r){var e=$n(r);e.scope=r.scope;var n=[],a=Mt.internal.getWidth(r)<=Mt.internal.getHeight(r)?Mt.internal.getWidth(r)/4:Mt.internal.getHeight(r)/4;a=Number((.9*a).toFixed(5));var c=Number((2*a).toFixed(5)),o=Number((c*Mt.internal.Bezier_C).toFixed(5));return n.push("0.749023 g"),n.push("q"),n.push("1 0 0 1 "+Fr(Mt.internal.getWidth(r)/2)+" "+Fr(Mt.internal.getHeight(r)/2)+" cm"),n.push(c+" 0 m"),n.push(c+" "+o+" "+o+" "+c+" 0 "+c+" c"),n.push("-"+o+" "+c+" -"+c+" "+o+" -"+c+" 0 c"),n.push("-"+c+" -"+o+" -"+o+" -"+c+" 0 -"+c+" c"),n.push(o+" -"+c+" "+c+" -"+o+" "+c+" 0 c"),n.push("f"),n.push("Q"),e.stream=n.join(`
|
||
|
|
`),e}},Cross:{createAppearanceStream:function(r){var e={D:{Off:Mt.RadioButton.Cross.OffPushDown},N:{}};return e.N[r]=Mt.RadioButton.Cross.YesNormal,e.D[r]=Mt.RadioButton.Cross.YesPushDown,e},getCA:function(){return"8"},YesNormal:function(r){var e=$n(r);e.scope=r.scope;var n=[],a=Mt.internal.calculateCross(r);return n.push("q"),n.push("1 1 "+Xt(Mt.internal.getWidth(r)-2)+" "+Xt(Mt.internal.getHeight(r)-2)+" re"),n.push("W"),n.push("n"),n.push(Xt(a.x1.x)+" "+Xt(a.x1.y)+" m"),n.push(Xt(a.x2.x)+" "+Xt(a.x2.y)+" l"),n.push(Xt(a.x4.x)+" "+Xt(a.x4.y)+" m"),n.push(Xt(a.x3.x)+" "+Xt(a.x3.y)+" l"),n.push("s"),n.push("Q"),e.stream=n.join(`
|
||
|
|
`),e},YesPushDown:function(r){var e=$n(r);e.scope=r.scope;var n=Mt.internal.calculateCross(r),a=[];return a.push("0.749023 g"),a.push("0 0 "+Xt(Mt.internal.getWidth(r))+" "+Xt(Mt.internal.getHeight(r))+" re"),a.push("f"),a.push("q"),a.push("1 1 "+Xt(Mt.internal.getWidth(r)-2)+" "+Xt(Mt.internal.getHeight(r)-2)+" re"),a.push("W"),a.push("n"),a.push(Xt(n.x1.x)+" "+Xt(n.x1.y)+" m"),a.push(Xt(n.x2.x)+" "+Xt(n.x2.y)+" l"),a.push(Xt(n.x4.x)+" "+Xt(n.x4.y)+" m"),a.push(Xt(n.x3.x)+" "+Xt(n.x3.y)+" l"),a.push("s"),a.push("Q"),e.stream=a.join(`
|
||
|
|
`),e},OffPushDown:function(r){var e=$n(r);e.scope=r.scope;var n=[];return n.push("0.749023 g"),n.push("0 0 "+Xt(Mt.internal.getWidth(r))+" "+Xt(Mt.internal.getHeight(r))+" re"),n.push("f"),e.stream=n.join(`
|
||
|
|
`),e}}},createDefaultAppearanceStream:function(r){var e=r.scope.internal.getFont(r.fontName,r.fontStyle).id,n=r.scope.__private__.encodeColorString(r.color);return"/"+e+" "+r.fontSize+" Tf "+n}};Mt.internal={Bezier_C:.551915024494,calculateCross:function(r){var e=Mt.internal.getWidth(r),n=Mt.internal.getHeight(r),a=Math.min(e,n);return{x1:{x:(e-a)/2,y:(n-a)/2+a},x2:{x:(e-a)/2+a,y:(n-a)/2},x3:{x:(e-a)/2,y:(n-a)/2},x4:{x:(e-a)/2+a,y:(n-a)/2+a}}}},Mt.internal.getWidth=function(r){var e=0;return ve(r)==="object"&&(e=fc(r.Rect[2])),e},Mt.internal.getHeight=function(r){var e=0;return ve(r)==="object"&&(e=fc(r.Rect[3])),e};var al=Pe.addField=function(r){if(il(this,r),!(r instanceof Tn))throw new Error("Invalid argument passed to jsPDF.addField.");var e;return(e=r).scope.internal.acroformPlugin.printedOut&&(e.scope.internal.acroformPlugin.printedOut=!1,e.scope.internal.acroformPlugin.acroFormDictionaryRoot=null),e.scope.internal.acroformPlugin.acroFormDictionaryRoot.Fields.push(e),r.page=r.scope.internal.getCurrentPageInfo().pageNumber,this};Pe.AcroFormChoiceField=Kr,Pe.AcroFormListBox=Zr,Pe.AcroFormComboBox=$r,Pe.AcroFormEditBox=da,Pe.AcroFormButton=Te,Pe.AcroFormPushButton=pa,Pe.AcroFormRadioButton=Qr,Pe.AcroFormCheckBox=ga,Pe.AcroFormTextField=jr,Pe.AcroFormPasswordField=ma,Pe.AcroFormAppearance=Mt,Pe.AcroForm={ChoiceField:Kr,ListBox:Zr,ComboBox:$r,EditBox:da,Button:Te,PushButton:pa,RadioButton:Qr,CheckBox:ga,TextField:jr,PasswordField:ma,Appearance:Mt},Tt.AcroForm={ChoiceField:Kr,ListBox:Zr,ComboBox:$r,EditBox:da,Button:Te,PushButton:pa,RadioButton:Qr,CheckBox:ga,TextField:jr,PasswordField:ma,Appearance:Mt};var ol=Tt.AcroForm;function Tc(r){return r.reduce(function(e,n,a){return e[n]=a,e},{})}(function(r){r.__addimage__={};var e="UNKNOWN",n={PNG:[[137,80,78,71]],TIFF:[[77,77,0,42],[73,73,42,0]],JPEG:[[255,216,255,224,void 0,void 0,74,70,73,70,0],[255,216,255,225,void 0,void 0,69,120,105,102,0,0],[255,216,255,219],[255,216,255,238]],JPEG2000:[[0,0,0,12,106,80,32,32]],GIF87a:[[71,73,70,56,55,97]],GIF89a:[[71,73,70,56,57,97]],WEBP:[[82,73,70,70,void 0,void 0,void 0,void 0,87,69,66,80]],BMP:[[66,77],[66,65],[67,73],[67,80],[73,67],[80,84]]},a=r.__addimage__.getImageFileTypeByImageData=function(P,k){var W,D,st,it,lt,$=e;if((k=k||e)==="RGBA"||P.data!==void 0&&P.data instanceof Uint8ClampedArray&&"height"in P&&"width"in P)return"RGBA";if(wt(P))for(lt in n)for(st=n[lt],W=0;W<st.length;W+=1){for(it=!0,D=0;D<st[W].length;D+=1)if(st[W][D]!==void 0&&st[W][D]!==P[D]){it=!1;break}if(it===!0){$=lt;break}}else for(lt in n)for(st=n[lt],W=0;W<st.length;W+=1){for(it=!0,D=0;D<st[W].length;D+=1)if(st[W][D]!==void 0&&st[W][D]!==P.charCodeAt(D)){it=!1;break}if(it===!0){$=lt;break}}return $===e&&k!==e&&($=k),$},c=function P(k){for(var W=this.internal.write,D=this.internal.putStream,st=(0,this.internal.getFilters)();st.indexOf("FlateEncode")!==-1;)st.splice(st.indexOf("FlateEncode"),1);k.objectId=this.internal.newObject();var it=[];if(it.push({key:"Type",value:"/XObject"}),it.push({key:"Subtype",value:"/Image"}),it.push({key:"Width",value:k.width}),it.push({key:"Height",value:k.height}),k.colorSpace===q.INDEXED?it.push({key:"ColorSpace",value:"[/Indexed /DeviceRGB "+(k.palette.length/3-1)+" "+("sMask"in k&&k.sMask!==void 0?k.objectId+2:k.objectId+1)+" 0 R]"}):(it.push({key:"ColorSpace",value:"/"+k.colorSpace}),k.colorSpace===q.DEVICE_CMYK&&it.push({key:"Decode",value:"[1 0 1 0 1 0 1 0]"})),it.push({key:"BitsPerComponent",value:k.bitsPerComponent}),"decodeParameters"in k&&k.decodeParameters!==void 0&&it.push({key:"DecodeParms",value:"<<"+k.decodeParameters+">>"}),"transparency"in k&&Array.isArray(k.transparency)){for(var lt="",$=0,ht=k.transparency.length;$<ht;$++)lt+=k.transparency[$]+" "+k.transparency[$]+" ";it.push({key:"Mask",value:"["+lt+"]"})}k.sMask!==void 0&&it.push({key:"SMask",value:k.objectId+1+" 0 R"});var pt=k.filter!==void 0?["/"+k.filter]:void 0;if(D({data:k.data,additionalKeyValues:it,alreadyAppliedFilters:pt,objectId:k.objectId}),W("endobj"),"sMask"in k&&k.sMask!==void 0){var It="/Predictor "+k.predictor+" /Colors 1 /BitsPerCompone
|
||
|
|
`},n.outline.makeRef=function(a){return a.id+" 0 R"},n.outline.makeString=function(a){return"("+n.internal.pdfEscape(a)+")"},n.outline.objStart=function(a){this.ctx.val+=`\r
|
||
|
|
`+a.id+` 0 obj\r
|
||
|
|
<<\r
|
||
|
|
`},n.outline.objEnd=function(){this.ctx.val+=`>> \r
|
||
|
|
endobj\r
|
||
|
|
`},n.outline.count_r=function(a,c){for(var o=0;o<c.children.length;o++)a.count++,this.count_r(a,c.children[o]);return a.count}}])}(Tt.API),function(r){var e=[192,193,194,195,196,197,198,199];r.processJPEG=function(n,a,c,o,l,h){var f,g=this.decode.DCT_DECODE,b=null;if(typeof n=="string"||this.__addimage__.isArrayBuffer(n)||this.__addimage__.isArrayBufferView(n)){switch(n=l||n,n=this.__addimage__.isArrayBuffer(n)?new Uint8Array(n):n,(f=function(y){for(var S,p=256*y.charCodeAt(4)+y.charCodeAt(5),O=y.length,F={width:0,height:0,numcomponents:1},q=4;q<O;q+=2){if(q+=p,e.indexOf(y.charCodeAt(q+1))!==-1){S=256*y.charCodeAt(q+5)+y.charCodeAt(q+6),F={width:256*y.charCodeAt(q+7)+y.charCodeAt(q+8),height:S,numcomponents:y.charCodeAt(q+9)};break}p=256*y.charCodeAt(q+2)+y.charCodeAt(q+3)}return F}(n=this.__addimage__.isArrayBufferView(n)?this.__addimage__.arrayBufferToBinaryString(n):n)).numcomponents){case 1:h=this.color_spaces.DEVICE_GRAY;break;case 4:h=this.color_spaces.DEVICE_CMYK;break;case 3:h=this.color_spaces.DEVICE_RGB}b={data:n,width:f.width,height:f.height,colorSpace:h,bitsPerComponent:8,filter:g,index:a,alias:c}}return b}}(Tt.API);var Ci,fo,yc,wc,Lc,fl=function(){var r,e,n;function a(o){var l,h,f,g,b,y,S,p,O,F,q,_,B,Y;for(this.data=o,this.pos=8,this.palette=[],this.imgData=[],this.transparency={},this.animation=null,this.text={},y=null;;){switch(l=this.readUInt32(),O=(function(){var ot,ut;for(ut=[],ot=0;ot<4;++ot)ut.push(String.fromCharCode(this.data[this.pos++]));return ut}).call(this).join("")){case"IHDR":this.width=this.readUInt32(),this.height=this.readUInt32(),this.bits=this.data[this.pos++],this.colorType=this.data[this.pos++],this.compressionMethod=this.data[this.pos++],this.filterMethod=this.data[this.pos++],this.interlaceMethod=this.data[this.pos++];break;case"acTL":this.animation={numFrames:this.readUInt32(),numPlays:this.readUInt32()||1/0,frames:[]};break;case"PLTE":this.palette=this.read(l);break;case"fcTL":y&&this.animation.frames.push(y),this.pos+=4,y={width:this.readUInt32(),height:this.readUInt32(),xOffset:this.readUInt32(),yOffset:this.readUInt32()},b=this.readUInt16(),g=this.readUInt16()||100,y.delay=1e3*b/g,y.disposeOp=this.data[this.pos++],y.blendOp=this.data[this.pos++],y.data=[];break;case"IDAT":case"fdAT":for(O==="fdAT"&&(this.pos+=4,l-=4),o=(y!=null?y.data:void 0)||this.imgData,_=0;0<=l?_<l:_>l;0<=l?++_:--_)o.push(this.data[this.pos++]);break;case"tRNS":switch(this.transparency={},this.colorType){case 3:if(f=this.palette.length/3,this.transparency.indexed=this.read(l),this.transparency.indexed.length>f)throw new Error("More transparent colors than palette size");if((F=f-this.transparency.indexed.length)>0)for(B=0;0<=F?B<F:B>F;0<=F?++B:--B)this.transparency.indexed.push(255);break;case 0:this.transparency.grayscale=this.read(l)[0];break;case 2:this.transparency.rgb=this.read(l)}break;case"tEXt":S=(q=this.read(l)).indexOf(0),p=String.fromCharCode.apply(String,q.slice(0,S)),this.text[p]=String.fromCharCode.apply(String,q.slice(S+1));break;case"IEND":return y&&this.animation.frames.push(y),this.colors=(function(){switch(this.colorType){case 0:case 3:case 4:return 1;case 2:case 6:return 3}}).call(this),this.hasAlphaChannel=(Y=this.colorType)===4||Y===6,h=this.colors+(this.hasAlphaChannel?1:0),this.pixelBitlength=this.bits*h,this.colorSpace=(function(){switch(this.colors){case 1:return"DeviceGray";case 3:return"DeviceRGB"}}).call(this),void(this.imgData=new Uint8Array(this.imgData));default:this.pos+=l}if(this.pos+=4,this.pos>this.data.length)throw new Error("Incomplete or corrupt PNG file")}}a.prototype.read=function(o){var l,h;for(h=[],l=0;0<=o?l<o:l>o;0<=o?++l:--l)h.push(this.data[this.pos++]);return h},a.prototype.readUInt32=function(){return this.data[this.pos++]<<24|this.data[this.pos++]<<16|this.data[this.pos++]<<8|this.data[this.pos++]},a.prototype.readUInt16=function(){return this.data[this.pos++]<<8|this.data[this.pos++]},a.prototype.decodePixels=function(o){var l=this.pixelBitlength/8,h=new Uint8Array(this.width*this.height*l),f=0,g=this;if(o==null&&(o=this.imgData),o.length===0)return new Uint
|
||
|
|
* @license
|
||
|
|
*
|
||
|
|
* Copyright (c) 2014 James Robb, https://github.com/jamesbrobb
|
||
|
|
*
|
||
|
|
* 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.
|
||
|
|
* ====================================================================
|
||
|
|
*//**
|
||
|
|
* @license
|
||
|
|
* (c) Dean McNamee <dean@gmail.com>, 2013.
|
||
|
|
*
|
||
|
|
* https://github.com/deanm/omggif
|
||
|
|
*
|
||
|
|
* 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.
|
||
|
|
*
|
||
|
|
* omggif is a JavaScript implementation of a GIF 89a encoder and decoder,
|
||
|
|
* including animation and compression. It does not rely on any specific
|
||
|
|
* underlying system, so should run in the browser, Node, or Plask.
|
||
|
|
*/function dl(r){var e=0;if(r[e++]!==71||r[e++]!==73||r[e++]!==70||r[e++]!==56||(r[e++]+1&253)!=56||r[e++]!==97)throw new Error("Invalid GIF 87a/89a header.");var n=r[e++]|r[e++]<<8,a=r[e++]|r[e++]<<8,c=r[e++],o=c>>7,l=1<<(7&c)+1;r[e++],r[e++];var h=null,f=null;o&&(h=e,f=l,e+=3*l);var g=!0,b=[],y=0,S=null,p=0,O=null;for(this.width=n,this.height=a;g&&e<r.length;)switch(r[e++]){case 33:switch(r[e++]){case 255:if(r[e]!==11||r[e+1]==78&&r[e+2]==69&&r[e+3]==84&&r[e+4]==83&&r[e+5]==67&&r[e+6]==65&&r[e+7]==80&&r[e+8]==69&&r[e+9]==50&&r[e+10]==46&&r[e+11]==48&&r[e+12]==3&&r[e+13]==1&&r[e+16]==0)e+=14,O=r[e++]|r[e++]<<8,e++;else for(e+=12;;){if(!((P=r[e++])>=0))throw Error("Invalid block size");if(P===0)break;e+=P}break;case 249:if(r[e++]!==4||r[e+4]!==0)throw new Error("Invalid graphics extension block.");var F=r[e++];y=r[e++]|r[e++]<<8,S=r[e++],!(1&F)&&(S=null),p=F>>2&7,e++;break;case 254:for(;;){if(!((P=r[e++])>=0))throw Error("Invalid block size");if(P===0)break;e+=P}break;default:throw new Error("Unknown graphic control label: 0x"+r[e-1].toString(16))}break;case 44:var q=r[e++]|r[e++]<<8,_=r[e++]|r[e++]<<8,B=r[e++]|r[e++]<<8,Y=r[e++]|r[e++]<<8,ot=r[e++],ut=ot>>6&1,wt=1<<(7&ot)+1,tt=h,z=f,rt=!1;ot>>7&&(rt=!0,tt=e,z=wt,e+=3*wt);var dt=e;for(e++;;){var P;if(!((P=r[e++])>=0))throw Error("Invalid block size");if(P===0)break;e+=P}b.push({x:q,y:_,width:B,height:Y,has_local_palette:rt,palette_offset:tt,palette_size:z,data_offset:dt,data_length:e-dt,transparent_index:S,interlaced:!!ut,delay:y,disposal:p});break;case 59:g=!1;break;default:throw new Error("Unknown gif block: 0x"+r[e-1].toString(16))}this.numFrames=function(){return b.length},this.loopCount=function(){return O},this.frameInfo=function(k){if(k<0||k>=b.length)throw new Error("Frame index out of range.");return b[k]},this.decodeAndBlitFrameBGRA=function(k,W){var D=this.frameInfo(k),st=D.width*D.height,it=new Uint8Array(st);Nc(r,D.data_offset,it,st);var lt=D.palette_offset,$=D.transparent_index;$===null&&($=256);var ht=D.width,pt=n-ht,It=ht,N=4*(D.y*n+D.x),C=4*((D.y+D.height)*n+D.x),M=N,T=4*pt;D.interlaced===!0&&(T+=4*n*7);for(var J=8,Q=0,et=it.length;Q<et;++Q){var nt=it[Q];if(It===0&&(It=ht,(M+=T)>=C&&(T=4*pt+4*n*(J-1),M=N+(ht+pt)*(J<<1),J>>=1)),nt===$)M+=4;else{var At=r[lt+3*nt],Nt=r[lt+3*nt+1],Ft=r[lt+3*nt+2];W[M++]=Ft,W[M++]=Nt,W[M++]=At,W[M++]=255}--It}},this.decodeAndBlitFrameRGBA=function(k,W){var D=this.frameInfo(k),st=D.width*D.height,it=new Uint8Array(st);Nc(r,D.data_offset,it,st);var lt=D.palette_offset,$=D.transparent_index;$===null&&($=256);var ht=D.width,pt=n-ht,It=ht,N=4*(D.y*n+D.x),C=4*((D.y+D.height)*n+D.x),M=N,T=4*pt;D.interlaced===!0&&(T+=4*n*7);for(var J=8,Q=0,et=it.length;Q<et;++Q){var nt=it[Q];if(It===0&&(It=ht,(M+=T)>=C&&(T=4*pt+4*n*(J-1),M=N+(ht+pt)*(J<<1),J>>=1)),nt===$)M+=4;else{var At=r[lt+3*nt],Nt=r[lt+3*nt+1],Ft=r[lt+3*nt+2];W[M++]=At,W[M++]=Nt,W[M++]=Ft,W[M++]=255}--It}}}function Nc(r,e,n,a){for(var c=r[e++],o=1<<c,l=o+1,h=l+1,f=c+1,g=(1<<f)-1,b=0,y=0,S=0,p=r[e++],O=new Int32Array(4096),F=null;;){for(;b<16&&p!==0;)y|=r[e++]<<b,b+=8,p===1?p=r[e++]:--p;if(b<f)break;var q=y&g;if(y>>=f,b-=f,q!==o){if(q===l)break;for(var _=q<h?q:F,B=0,Y=_;Y>o;)Y=O[Y]>>8,++B;var ot=Y;if(S+B+(_!==q?1:0)>a)return void me.log("Warning, gif stream longer than expected.");n[S++]=ot;var ut=S+=B;for(_!==q&&(n[S++]=ot),Y=_;B--;)Y=O[Y],n[--ut]=255&Y,Y>>=8;F!==null&&h<4096&&(O[h++]=F<<8|ot,h>=g+1&&f<12&&(++f,g=g<<1|1)),F=q}else h=l+1,g=(1<<(f=c+1))-1,F=null}return S!==a&&me.log("Warning, gif stream shorter than expected."),n}/**
|
||
|
|
* @license
|
||
|
|
Copyright (c) 2008, Adobe Systems Incorporated
|
||
|
|
All rights reserved.
|
||
|
|
|
||
|
|
Redistribution and use in source and binary forms, with or without
|
||
|
|
modification, are permitted provided that the following conditions are
|
||
|
|
met:
|
||
|
|
|
||
|
|
* Redistributions of source code must retain the above copyright notice,
|
||
|
|
this list of conditions and the following disclaimer.
|
||
|
|
|
||
|
|
* Redistributions in binary form must reproduce the above copyright
|
||
|
|
notice, this list of conditions and the following disclaimer in the
|
||
|
|
documentation and/or other materials provided with the distribution.
|
||
|
|
|
||
|
|
* Neither the name of Adobe Systems Incorporated nor the names of its
|
||
|
|
contributors may be used to endorse or promote products derived from
|
||
|
|
this software without specific prior written permission.
|
||
|
|
|
||
|
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
|
||
|
|
IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
||
|
|
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||
|
|
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||
|
|
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||
|
|
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||
|
|
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||
|
|
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||
|
|
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||
|
|
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||
|
|
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||
|
|
*/function ps(r){var e,n,a,c,o,l=Math.floor,h=new Array(64),f=new Array(64),g=new Array(64),b=new Array(64),y=new Array(65535),S=new Array(65535),p=new Array(64),O=new Array(64),F=[],q=0,_=7,B=new Array(64),Y=new Array(64),ot=new Array(64),ut=new Array(256),wt=new Array(2048),tt=[0,1,5,6,14,15,27,28,2,4,7,13,16,26,29,42,3,8,12,17,25,30,41,43,9,11,18,24,31,40,44,53,10,19,23,32,39,45,52,54,20,22,33,38,46,51,55,60,21,34,37,47,50,56,59,61,35,36,48,49,57,58,62,63],z=[0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0],rt=[0,1,2,3,4,5,6,7,8,9,10,11],dt=[0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,125],P=[1,2,3,0,4,17,5,18,33,49,65,6,19,81,97,7,34,113,20,50,129,145,161,8,35,66,177,193,21,82,209,240,36,51,98,114,130,9,10,22,23,24,25,26,37,38,39,40,41,42,52,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,225,226,227,228,229,230,231,232,233,234,241,242,243,244,245,246,247,248,249,250],k=[0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0],W=[0,1,2,3,4,5,6,7,8,9,10,11],D=[0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,119],st=[0,1,2,3,17,4,5,33,49,6,18,65,81,7,97,113,19,34,50,129,8,20,66,145,161,177,193,9,35,51,82,240,21,98,114,209,10,22,36,52,225,37,241,23,24,25,26,38,39,40,41,42,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,130,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,226,227,228,229,230,231,232,233,234,242,243,244,245,246,247,248,249,250];function it(N,C){for(var M=0,T=0,J=new Array,Q=1;Q<=16;Q++){for(var et=1;et<=N[Q];et++)J[C[T]]=[],J[C[T]][0]=M,J[C[T]][1]=Q,T++,M++;M*=2}return J}function lt(N){for(var C=N[0],M=N[1]-1;M>=0;)C&1<<M&&(q|=1<<_),M--,--_<0&&(q==255?($(255),$(0)):$(q),_=7,q=0)}function $(N){F.push(N)}function ht(N){$(N>>8&255),$(255&N)}function pt(N,C,M,T,J){for(var Q,et=J[0],nt=J[240],At=function(Lt,xt){var Ct,kt,qt,Gt,Qt,te,ie,fe,Wt,ee,jt=0;for(Wt=0;Wt<8;++Wt){Ct=Lt[jt],kt=Lt[jt+1],qt=Lt[jt+2],Gt=Lt[jt+3],Qt=Lt[jt+4],te=Lt[jt+5],ie=Lt[jt+6];var Je=Ct+(fe=Lt[jt+7]),oe=Ct-fe,_n=kt+ie,pe=kt-ie,Le=qt+te,Un=qt-te,ce=Gt+Qt,Mr=Gt-Qt,Ae=Je+ce,Pn=Je-ce,nr=_n+Le,xe=_n-Le;Lt[jt]=Ae+nr,Lt[jt+4]=Ae-nr;var Jt=.707106781*(xe+Pn);Lt[jt+2]=Pn+Jt,Lt[jt+6]=Pn-Jt;var ue=.382683433*((Ae=Mr+Un)-(xe=pe+oe)),Er=.5411961*Ae+ue,We=1.306562965*xe+ue,Hn=.707106781*(nr=Un+pe),Wn=oe+Hn,zt=oe-Hn;Lt[jt+5]=zt+Er,Lt[jt+3]=zt-Er,Lt[jt+1]=Wn+We,Lt[jt+7]=Wn-We,jt+=8}for(jt=0,Wt=0;Wt<8;++Wt){Ct=Lt[jt],kt=Lt[jt+8],qt=Lt[jt+16],Gt=Lt[jt+24],Qt=Lt[jt+32],te=Lt[jt+40],ie=Lt[jt+48];var kn=Ct+(fe=Lt[jt+56]),Vn=Ct-fe,an=kt+ie,De=kt-ie,Be=qt+te,fn=qt-te,ei=Gt+Qt,rr=Gt-Qt,Fn=kn+ei,In=kn-ei,Cn=an+Be,Gn=an-Be;Lt[jt]=Fn+Cn,Lt[jt+32]=Fn-Cn;var bn=.707106781*(Gn+In);Lt[jt+16]=In+bn,Lt[jt+48]=In-bn;var Jn=.382683433*((Fn=rr+fn)-(Gn=De+Vn)),qr=.5411961*Fn+Jn,ni=1.306562965*Gn+Jn,ri=.707106781*(Cn=fn+De),ii=Vn+ri,ai=Vn-ri;Lt[jt+40]=ai+qr,Lt[jt+24]=ai-qr,Lt[jt+8]=ii+ni,Lt[jt+56]=ii-ni,jt++}for(Wt=0;Wt<64;++Wt)ee=Lt[Wt]*xt[Wt],p[Wt]=ee>0?ee+.5|0:ee-.5|0;return p}(N,C),Nt=0;Nt<64;++Nt)O[tt[Nt]]=At[Nt];var Ft=O[0]-M;M=O[0],Ft==0?lt(T[0]):(lt(T[S[Q=32767+Ft]]),lt(y[Q]));for(var _t=63;_t>0&&O[_t]==0;)_t--;if(_t==0)return lt(et),M;for(var Ut,ft=1;ft<=_t;){for(var E=ft;O[ft]==0&&ft<=_t;)++ft;var Kt=ft-E;if(Kt>=16){Ut=Kt>>4;for(var Et=1;Et<=Ut;++Et)lt(nt);Kt&=15}Q=32767+O[ft],lt(J[(Kt<<4)+S[Q]]),lt(y[Q]),ft++}return _t!=63&<(et),M}function It(N){N=Math.min(Math.max(N,1),100),o!=N&&(function(C){for(var M=[16,11,10,16,24,40,51,61,12,12,14,19,26,58,60,55,14,13,16,24,40,57,69,56,14,17,22,29,51,87,80,62,18,22,37,56,68,109,103,77,24,35,55,64,81,104,113,92,49,64,78,87,103,121,120,101,72,92,95,98,112,100,103,99],T=0;T<64;T++){var J=l((M[T]*C+50)/100);J=Math.min(Math.max(J,1),255),h[tt[T]]=J}for(var Q=[17,
|
||
|
|
* @license
|
||
|
|
* Copyright (c) 2017 Aras Abbasi
|
||
|
|
*
|
||
|
|
* Licensed under the MIT License.
|
||
|
|
* http://opensource.org/licenses/mit-license
|
||
|
|
*/function Dn(r,e){if(this.pos=0,this.buffer=r,this.datav=new DataView(r.buffer),this.is_with_alpha=!!e,this.bottom_up=!0,this.flag=String.fromCharCode(this.buffer[0])+String.fromCharCode(this.buffer[1]),this.pos+=2,["BM","BA","CI","CP","IC","PT"].indexOf(this.flag)===-1)throw new Error("Invalid BMP File");this.parseHeader(),this.parseBGR()}function Ac(r){function e(z){if(!z)throw Error("assert :P")}function n(z,rt,dt){for(var P=0;4>P;P++)if(z[rt+P]!=dt.charCodeAt(P))return!0;return!1}function a(z,rt,dt,P,k){for(var W=0;W<k;W++)z[rt+W]=dt[P+W]}function c(z,rt,dt,P){for(var k=0;k<P;k++)z[rt+k]=dt}function o(z){return new Int32Array(z)}function l(z,rt){for(var dt=[],P=0;P<z;P++)dt.push(new rt);return dt}function h(z,rt){var dt=[];return function P(k,W,D){for(var st=D[W],it=0;it<st&&(k.push(D.length>W+1?[]:new rt),!(D.length<W+1));it++)P(k[it],W+1,D)}(dt,0,z),dt}var f=function(){var z=this;function rt(t,i){for(var u=1<<i-1>>>0;t&u;)u>>>=1;return u?(t&u-1)+u:t}function dt(t,i,u,d,m){e(!(d%u));do t[i+(d-=u)]=m;while(0<d)}function P(t,i,u,d,m){if(e(2328>=m),512>=m)var w=o(512);else if((w=o(m))==null)return 0;return function(L,A,x,I,U,K){var Z,G,vt=A,at=1<<x,H=o(16),V=o(16);for(e(U!=0),e(I!=null),e(L!=null),e(0<x),G=0;G<U;++G){if(15<I[G])return 0;++H[I[G]]}if(H[0]==U)return 0;for(V[1]=0,Z=1;15>Z;++Z){if(H[Z]>1<<Z)return 0;V[Z+1]=V[Z]+H[Z]}for(G=0;G<U;++G)Z=I[G],0<I[G]&&(K[V[Z]++]=G);if(V[15]==1)return(I=new k).g=0,I.value=K[0],dt(L,vt,1,at,I),at;var gt,bt=-1,mt=at-1,Bt=0,St=1,Rt=1,Pt=1<<x;for(G=0,Z=1,U=2;Z<=x;++Z,U<<=1){if(St+=Rt<<=1,0>(Rt-=H[Z]))return 0;for(;0<H[Z];--H[Z])(I=new k).g=Z,I.value=K[G++],dt(L,vt+Bt,U,Pt,I),Bt=rt(Bt,Z)}for(Z=x+1,U=2;15>=Z;++Z,U<<=1){if(St+=Rt<<=1,0>(Rt-=H[Z]))return 0;for(;0<H[Z];--H[Z]){if(I=new k,(Bt&mt)!=bt){for(vt+=Pt,gt=1<<(bt=Z)-x;15>bt&&!(0>=(gt-=H[bt]));)++bt,gt<<=1;at+=Pt=1<<(gt=bt-x),L[A+(bt=Bt&mt)].g=gt+x,L[A+bt].value=vt-A-bt}I.g=Z-x,I.value=K[G++],dt(L,vt+(Bt>>x),U,Pt,I),Bt=rt(Bt,Z)}}return St!=2*V[15]-1?0:at}(t,i,u,d,m,w)}function k(){this.value=this.g=0}function W(){this.value=this.g=0}function D(){this.G=l(5,k),this.H=o(5),this.jc=this.Qb=this.qb=this.nd=0,this.pd=l(Ve,W)}function st(t,i,u,d){e(t!=null),e(i!=null),e(2147483648>d),t.Ca=254,t.I=0,t.b=-8,t.Ka=0,t.oa=i,t.pa=u,t.Jd=i,t.Yc=u+d,t.Zc=4<=d?u+d-4+1:u,Q(t)}function it(t,i){for(var u=0;0<i--;)u|=nt(t,128)<<i;return u}function lt(t,i){var u=it(t,i);return et(t)?-u:u}function $(t,i,u,d){var m,w=0;for(e(t!=null),e(i!=null),e(4294967288>d),t.Sb=d,t.Ra=0,t.u=0,t.h=0,4<d&&(d=4),m=0;m<d;++m)w+=i[u+m]<<8*m;t.Ra=w,t.bb=d,t.oa=i,t.pa=u}function ht(t){for(;8<=t.u&&t.bb<t.Sb;)t.Ra>>>=8,t.Ra+=t.oa[t.pa+t.bb]<<wi-8>>>0,++t.bb,t.u-=8;M(t)&&(t.h=1,t.u=0)}function pt(t,i){if(e(0<=i),!t.h&&i<=yi){var u=C(t)&bi[i];return t.u+=i,ht(t),u}return t.h=1,t.u=0}function It(){this.b=this.Ca=this.I=0,this.oa=[],this.pa=0,this.Jd=[],this.Yc=0,this.Zc=[],this.Ka=0}function N(){this.Ra=0,this.oa=[],this.h=this.u=this.bb=this.Sb=this.pa=0}function C(t){return t.Ra>>>(t.u&wi-1)>>>0}function M(t){return e(t.bb<=t.Sb),t.h||t.bb==t.Sb&&t.u>wi}function T(t,i){t.u=i,t.h=M(t)}function J(t){t.u>=$i&&(e(t.u>=$i),ht(t))}function Q(t){e(t!=null&&t.oa!=null),t.pa<t.Zc?(t.I=(t.oa[t.pa++]|t.I<<8)>>>0,t.b+=8):(e(t!=null&&t.oa!=null),t.pa<t.Yc?(t.b+=8,t.I=t.oa[t.pa++]|t.I<<8):t.Ka?t.b=0:(t.I<<=8,t.b+=8,t.Ka=1))}function et(t){return it(t,1)}function nt(t,i){var u=t.Ca;0>t.b&&Q(t);var d=t.b,m=u*i>>>8,w=(t.I>>>d>m)+0;for(w?(u-=m,t.I-=m+1<<d>>>0):u=m+1,d=u,m=0;256<=d;)m+=8,d>>=8;return d=7^m+sn[d],t.b-=d,t.Ca=(u<<d)-1,w}function At(t,i,u){t[i+0]=u>>24&255,t[i+1]=u>>16&255,t[i+2]=u>>8&255,t[i+3]=u>>0&255}function Nt(t,i){return t[i+0]<<0|t[i+1]<<8}function Ft(t,i){return Nt(t,i)|t[i+2]<<16}function _t(t,i){return Nt(t,i)|Nt(t,i+2)<<16}function Ut(t,i){var u=1<<i;return e(t!=null),e(0<i),t.X=o(u),t.X==null?0:(t.Mb=32-i,t.Xa=i,1)}function ft(t,i){e(t!=null),e(i!=null),e(t.Xa==i.Xa),a(i.X,0,t.X,0,1<<i.Xa)}function E(){this.X=[],this.Xa=this.Mb=0}function Kt(t,i,u,d){e(u!=null),e(d!=null);var m=u[0],w=d[0];return m==0&&(m=(t*w+i/2)/i),w==0&&(w=(i*m+t/2)/t),0>=m||0>=w?0:(u[0]=m,d[
|
||
|
|
`:"")+ut})):B.push(ot[0])}),F=B,f=yc.apply(this,[_,n])}for(o=0,l=F.length;o<l;o++){var Y=0;if(a=F[o],f&&a[0]==`
|
||
|
|
`&&(a=a.substr(1),Y=1),S+p+(O=(c=fo.apply(this,[a,n])).reduce(function(ot,ut){return ot+ut},0))>e||Y){if(O>e){for(h=wc.apply(this,[a,c,e-(S+p),e]),b.push(h.shift()),b=[h.pop()];h.length;)y.push([h.shift()]);O=c.slice(a.length-(b[0]?b[0].length:0)).reduce(function(ot,ut){return ot+ut},0)}else b=[a];y.push(b),S=O+f,p=q}else b.push(a),S+=p+O,p=q}return g=f?function(ot,ut){return(ut?_:"")+ot.join(" ")}:function(ot){return ot.join(" ")},y.map(g)},Ci.splitTextToSize=function(r,e,n){var a,c=(n=n||{}).fontSize||this.internal.getFontSize(),o=(function(b){if(b.widths&&b.kerning)return{widths:b.widths,kerning:b.kerning};var y=this.internal.getFont(b.fontName,b.fontStyle);return y.metadata.Unicode?{widths:y.metadata.Unicode.widths||{0:1},kerning:y.metadata.Unicode.kerning||{}}:{font:y.metadata,fontSize:this.internal.getFontSize(),charSpace:this.internal.getCharSpace()}}).call(this,n);a=Array.isArray(r)?r:String(r).split(/\r?\n/);var l=1*this.internal.scaleFactor*e/c;o.textIndent=n.textIndent?1*n.textIndent*this.internal.scaleFactor/c:0,o.lineIndent=n.lineIndent;var h,f,g=[];for(h=0,f=a.length;h<f;h++)g=g.concat(Lc.apply(this,[a[h],l,o]));return g},function(r){r.__fontmetrics__=r.__fontmetrics__||{};for(var e="klmnopqrstuvwxyz",n={},a={},c=0;c<e.length;c++)n[e[c]]="0123456789abcdef"[c],a["0123456789abcdef"[c]]=e[c];var o=function(y){return"0x"+parseInt(y,10).toString(16)},l=r.__fontmetrics__.compress=function(y){var S,p,O,F,q=["{"];for(var _ in y){if(S=y[_],isNaN(parseInt(_,10))?p="'"+_+"'":(_=parseInt(_,10),p=(p=o(_).slice(2)).slice(0,-1)+a[p.slice(-1)]),typeof S=="number")S<0?(O=o(S).slice(3),F="-"):(O=o(S).slice(2),F=""),O=F+O.slice(0,-1)+a[O.slice(-1)];else{if(ve(S)!=="object")throw new Error("Don't know what to do with value type "+ve(S)+".");O=l(S)}q.push(p+O)}return q.push("}"),q.join("")},h=r.__fontmetrics__.uncompress=function(y){if(typeof y!="string")throw new Error("Invalid argument passed to uncompress.");for(var S,p,O,F,q={},_=1,B=q,Y=[],ot="",ut="",wt=y.length-1,tt=1;tt<wt;tt+=1)(F=y[tt])=="'"?S?(O=S.join(""),S=void 0):S=[]:S?S.push(F):F=="{"?(Y.push([B,O]),B={},O=void 0):F=="}"?((p=Y.pop())[0][p[1]]=B,O=void 0,B=p[0]):F=="-"?_=-1:O===void 0?n.hasOwnProperty(F)?(ot+=n[F],O=parseInt(ot,16)*_,_=1,ot=""):ot+=F:n.hasOwnProperty(F)?(ut+=n[F],B[O]=parseInt(ut,16)*_,_=1,O=void 0,ut=""):ut+=F;return q},f={codePages:["WinAnsiEncoding"],WinAnsiEncoding:h("{19m8n201n9q201o9r201s9l201t9m201u8m201w9n201x9o201y8o202k8q202l8r202m9p202q8p20aw8k203k8t203t8v203u9v2cq8s212m9t15m8w15n9w2dw9s16k8u16l9u17s9z17x8y17y9y}")},g={Unicode:{Courier:f,"Courier-Bold":f,"Courier-BoldOblique":f,"Courier-Oblique":f,Helvetica:f,"Helvetica-Bold":f,"Helvetica-BoldOblique":f,"Helvetica-Oblique":f,"Times-Roman":f,"Times-Bold":f,"Times-BoldItalic":f,"Times-Italic":f}},b={Unicode:{"Courier-Oblique":h("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-BoldItalic":h("{'widths'{k3o2q4ycx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2r202m2n2n3m2o3m2p5n202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5n4l4m4m4m4n4m4o4s4p4m4q4m4r4s4s4y4t2r4u3m4v4m4w3x4x5t4y4s4z4s5k3x5l4s5m4m5n3r5o3x5p4s5q4m5r5t5s4m5t3x5u3x5v2l5w1w5x2l5y3t5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q2l6r3m6s3r6t1w6u1w6v3m6w1w6x4y6y3r6z3m7k3m7l3m7m2r7n2r7o1w7p3r7q2w7r4m7s3m7t2w7u2r7v2n7w1q7x2n7y3t202l3mcl4mal2ram3man3mao3map3mar3mas2lat4uau1uav3maw3way4uaz2lbk2sbl3t'fof'6obo2lbp3tbq3mbr1tbs2lbu1ybv3mbz3mck4m202k3mcm4mcn4mco4mcp4mcq5ycr4mcs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz2w203k6o212m6o2dw2l2cq2l3t3m3u2l17s3x19m3m}'kerning'{cl{4qu5kt5qt5rs17ss5ts}201s{201ss}201t{cks4lscmscnscoscpscls2wu2yu201ts}201x{2wu2yu}2k{201ts}2w{4qx5kx5ou5qx5rs17su5tu}2x{17su5tu5ou}2y{4qx5kx5ou5qx5rs17ss5ts}'fof'-6ofn{17sw5tw5ou5qw5rs}7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qs}3v{17su5tu5os5qs}7p{17su5tu}ck{4qu5kt5qt5rs17ss5ts}4l{4qu5kt5qt5rs17ss5ts}cm{4qu5kt5qt5rs17ss5ts}cn{4qu5kt5qt5rs17ss5ts}co{4qu5kt5qt5rs17ss5
|
||
|
|
<<
|
||
|
|
`+F.join(`
|
||
|
|
`)+`
|
||
|
|
>>`)}),this.internal.viewerpreferences.isSubscribed=!0),this.internal.viewerpreferences.configuration=n,this},function(r){var e=function(){var a='<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><rdf:Description rdf:about="" xmlns:jspdf="'+this.internal.__metadata__.namespaceuri+'"><jspdf:metadata>',c=unescape(encodeURIComponent('<x:xmpmeta xmlns:x="adobe:ns:meta/">')),o=unescape(encodeURIComponent(a)),l=unescape(encodeURIComponent(this.internal.__metadata__.metadata)),h=unescape(encodeURIComponent("</jspdf:metadata></rdf:Description></rdf:RDF>")),f=unescape(encodeURIComponent("</x:xmpmeta>")),g=o.length+l.length+h.length+c.length+f.length;this.internal.__metadata__.metadata_object_number=this.internal.newObject(),this.internal.write("<< /Type /Metadata /Subtype /XML /Length "+g+" >>"),this.internal.write("stream"),this.internal.write(c+o+l+h+f),this.internal.write("endstream"),this.internal.write("endobj")},n=function(){this.internal.__metadata__.metadata_object_number&&this.internal.write("/Metadata "+this.internal.__metadata__.metadata_object_number+" 0 R")};r.addMetadata=function(a,c){return this.internal.__metadata__===void 0&&(this.internal.__metadata__={metadata:a,namespaceuri:c||"http://jspdf.default.namespaceuri/"},this.internal.events.subscribe("putCatalog",n),this.internal.events.subscribe("postPutResources",e)),this}}(Tt.API),function(r){var e=r.API,n=e.pdfEscape16=function(o,l){for(var h,f=l.metadata.Unicode.widths,g=["","0","00","000","0000"],b=[""],y=0,S=o.length;y<S;++y){if(h=l.metadata.characterToGlyph(o.charCodeAt(y)),l.metadata.glyIdsUsed.push(h),l.metadata.toUnicode[h]=o.charCodeAt(y),f.indexOf(h)==-1&&(f.push(h),f.push([parseInt(l.metadata.widthOfGlyph(h),10)])),h=="0")return b.join("");h=h.toString(16),b.push(g[4-h.length],h)}return b.join("")},a=function(o){var l,h,f,g,b,y,S;for(b=`/CIDInit /ProcSet findresource begin
|
||
|
|
12 dict begin
|
||
|
|
begincmap
|
||
|
|
/CIDSystemInfo <<
|
||
|
|
/Registry (Adobe)
|
||
|
|
/Ordering (UCS)
|
||
|
|
/Supplement 0
|
||
|
|
>> def
|
||
|
|
/CMapName /Adobe-Identity-UCS def
|
||
|
|
/CMapType 2 def
|
||
|
|
1 begincodespacerange
|
||
|
|
<0000><ffff>
|
||
|
|
endcodespacerange`,f=[],y=0,S=(h=Object.keys(o).sort(function(p,O){return p-O})).length;y<S;y++)l=h[y],f.length>=100&&(b+=`
|
||
|
|
`+f.length+` beginbfchar
|
||
|
|
`+f.join(`
|
||
|
|
`)+`
|
||
|
|
endbfchar`,f=[]),o[l]!==void 0&&o[l]!==null&&typeof o[l].toString=="function"&&(g=("0000"+o[l].toString(16)).slice(-4),l=("0000"+(+l).toString(16)).slice(-4),f.push("<"+l+"><"+g+">"));return f.length&&(b+=`
|
||
|
|
`+f.length+` beginbfchar
|
||
|
|
`+f.join(`
|
||
|
|
`)+`
|
||
|
|
endbfchar
|
||
|
|
`),b+=`endcmap
|
||
|
|
CMapName currentdict /CMap defineresource pop
|
||
|
|
end
|
||
|
|
end`};e.events.push(["putFont",function(o){(function(l){var h=l.font,f=l.out,g=l.newObject,b=l.putStream;if(h.metadata instanceof r.API.TTFFont&&h.encoding==="Identity-H"){for(var y=h.metadata.Unicode.widths,S=h.metadata.subset.encode(h.metadata.glyIdsUsed,1),p="",O=0;O<S.length;O++)p+=String.fromCharCode(S[O]);var F=g();b({data:p,addLength1:!0,objectId:F}),f("endobj");var q=g();b({data:a(h.metadata.toUnicode),addLength1:!0,objectId:q}),f("endobj");var _=g();f("<<"),f("/Type /FontDescriptor"),f("/FontName /"+Oi(h.fontName)),f("/FontFile2 "+F+" 0 R"),f("/FontBBox "+r.API.PDFObject.convert(h.metadata.bbox)),f("/Flags "+h.metadata.flags),f("/StemV "+h.metadata.stemV),f("/ItalicAngle "+h.metadata.italicAngle),f("/Ascent "+h.metadata.ascender),f("/Descent "+h.metadata.decender),f("/CapHeight "+h.metadata.capHeight),f(">>"),f("endobj");var B=g();f("<<"),f("/Type /Font"),f("/BaseFont /"+Oi(h.fontName)),f("/FontDescriptor "+_+" 0 R"),f("/W "+r.API.PDFObject.convert(y)),f("/CIDToGIDMap /Identity"),f("/DW 1000"),f("/Subtype /CIDFontType2"),f("/CIDSystemInfo"),f("<<"),f("/Supplement 0"),f("/Registry (Adobe)"),f("/Ordering ("+h.encoding+")"),f(">>"),f(">>"),f("endobj"),h.objectNumber=g(),f("<<"),f("/Type /Font"),f("/Subtype /Type0"),f("/ToUnicode "+q+" 0 R"),f("/BaseFont /"+Oi(h.fontName)),f("/Encoding /"+h.encoding),f("/DescendantFonts ["+B+" 0 R]"),f(">>"),f("endobj"),h.isAlreadyPutted=!0}})(o)}]),e.events.push(["putFont",function(o){(function(l){var h=l.font,f=l.out,g=l.newObject,b=l.putStream;if(h.metadata instanceof r.API.TTFFont&&h.encoding==="WinAnsiEncoding"){for(var y=h.metadata.rawData,S="",p=0;p<y.length;p++)S+=String.fromCharCode(y[p]);var O=g();b({data:S,addLength1:!0,objectId:O}),f("endobj");var F=g();b({data:a(h.metadata.toUnicode),addLength1:!0,objectId:F}),f("endobj");var q=g();f("<<"),f("/Descent "+h.metadata.decender),f("/CapHeight "+h.metadata.capHeight),f("/StemV "+h.metadata.stemV),f("/Type /FontDescriptor"),f("/FontFile2 "+O+" 0 R"),f("/Flags 96"),f("/FontBBox "+r.API.PDFObject.convert(h.metadata.bbox)),f("/FontName /"+Oi(h.fontName)),f("/ItalicAngle "+h.metadata.italicAngle),f("/Ascent "+h.metadata.ascender),f(">>"),f("endobj"),h.objectNumber=g();for(var _=0;_<h.metadata.hmtx.widths.length;_++)h.metadata.hmtx.widths[_]=parseInt(h.metadata.hmtx.widths[_]*(1e3/h.metadata.head.unitsPerEm));f("<</Subtype/TrueType/Type/Font/ToUnicode "+F+" 0 R/BaseFont/"+Oi(h.fontName)+"/FontDescriptor "+q+" 0 R/Encoding/"+h.encoding+" /FirstChar 29 /LastChar 255 /Widths "+r.API.PDFObject.convert(h.metadata.hmtx.widths)+">>"),f("endobj"),h.isAlreadyPutted=!0}})(o)}]);var c=function(o){var l,h=o.text||"",f=o.x,g=o.y,b=o.options||{},y=o.mutex||{},S=y.pdfEscape,p=y.activeFontKey,O=y.fonts,F=p,q="",_=0,B="",Y=O[F].encoding;if(O[F].encoding!=="Identity-H")return{text:h,x:f,y:g,options:b,mutex:y};for(B=h,F=p,Array.isArray(h)&&(B=h[0]),_=0;_<B.length;_+=1)O[F].metadata.hasOwnProperty("cmap")&&(l=O[F].metadata.cmap.unicode.codeMap[B[_].charCodeAt(0)]),l||B[_].charCodeAt(0)<256&&O[F].metadata.hasOwnProperty("Unicode")?q+=B[_]:q+="";var ot="";return parseInt(F.slice(1))<14||Y==="WinAnsiEncoding"?ot=S(q,F).split("").map(function(ut){return ut.charCodeAt(0).toString(16)}).join(""):Y==="Identity-H"&&(ot=n(q,O[F])),y.isHex=!0,{text:ot,x:f,y:g,options:b,mutex:y}};e.events.push(["postProcessText",function(o){var l=o.text||"",h=[],f={text:l,x:o.x,y:o.y,options:o.options,mutex:o.mutex};if(Array.isArray(l)){var g=0;for(g=0;g<l.length;g+=1)Array.isArray(l[g])&&l[g].length===3?h.push([c(Object.assign({},f,{text:l[g][0]})).text,l[g][1],l[g][2]]):h.push(c(Object.assign({},f,{text:l[g]})).text);o.text=h}else o.text=c(Object.assign({},f,{text:l})).text}])}(Tt),function(r){var e=function(){return this.internal.vFS===void 0&&(this.internal.vFS={}),!0};r.existsFileInVFS=function(n){return e.call(this),this.internal.vFS[n]!==void 0},r.addFileToVFS=function(n,a){return e.call(this),this.internal.vFS[n]=a,this},r.getFileFromVFS=function(n){return e.call(this),this.internal.vFS[n]!==void 0?this.internal.vFS[n]:null}}(Tt.API),function(r){r.__bidiEngine__=r.proto
|
||
|
|
`)}return""+n},e}();const Il=Object.freeze(Object.defineProperty({__proto__:null,AcroForm:ol,AcroFormAppearance:Mt,AcroFormButton:Te,AcroFormCheckBox:ga,AcroFormChoiceField:Kr,AcroFormComboBox:$r,AcroFormEditBox:da,AcroFormListBox:Zr,AcroFormPasswordField:ma,AcroFormPushButton:pa,AcroFormRadioButton:Qr,AcroFormTextField:jr,GState:ba,ShadingPattern:Ir,TilingPattern:Xr,default:Tt,jsPDF:Tt},Symbol.toStringTag,{value:"Module"}));export{Il as j};
|