moreShopAdmin/dist/admin/assets/jspdf.6c61b9d3.js

196 lines
342 KiB
JavaScript
Raw Permalink Normal View History

2024-11-08 12:27:11 +08:00
import{_ as ve,g as Yc}from"./@babel.80d29b7b.js";import{z as $o,u as Xc}from"./fflate.0418c72f.js";const Kc="modulepreload",Zc=function(i){return"/admin/"+i},Ms={},Qo=function(e,n,a){if(!n||n.length===0)return e();const u=document.getElementsByTagName("link");return Promise.all(n.map(o=>{if(o=Zc(o),o in Ms)return;Ms[o]=!0;const l=o.endsWith(".css"),h=l?'[rel="stylesheet"]':"";if(!!a)for(let A=u.length-1;A>=0;A--){const N=u[A];if(N.href===o&&(!l||N.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${o}"]${h}`))return;const g=document.createElement("link");if(g.rel=l?"stylesheet":Kc,l||(g.as="script",g.crossOrigin=""),g.href=o,document.head.appendChild(g),l)return new Promise((A,N)=>{g.addEventListener("load",A),g.addEventListener("error",()=>N(new Error(`Unable to preload CSS for ${o}`)))})})).then(()=>e())};var Ut=function(){return typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:this}();function Go(){Ut.console&&typeof Ut.console.log=="function"&&Ut.console.log.apply(Ut.console,arguments)}var me={log:Go,warn:function(i){Ut.console&&(typeof Ut.console.warn=="function"?Ut.console.warn.apply(Ut.console,arguments):Go.call(null,arguments))},error:function(i){Ut.console&&(typeof Ut.console.error=="function"?Ut.console.error.apply(Ut.console,arguments):Go(i))}};function Jo(i,e,n){var a=new XMLHttpRequest;a.open("GET",i),a.responseType="blob",a.onload=function(){Rr(a.response,e,n)},a.onerror=function(){me.error("could not download file")},a.send()}function Es(i){var e=new XMLHttpRequest;e.open("HEAD",i,!1);try{e.send()}catch{}return e.status>=200&&e.status<=299}function Za(i){try{i.dispatchEvent(new MouseEvent("click"))}catch{var e=document.createEvent("MouseEvents");e.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),i.dispatchEvent(e)}}var ea,ts,Rr=Ut.saveAs||((typeof window>"u"?"undefined":ve(window))!=="object"||window!==Ut?function(){}:typeof HTMLAnchorElement<"u"&&"download"in HTMLAnchorElement.prototype?function(i,e,n){var a=Ut.URL||Ut.webkitURL,u=document.createElement("a");e=e||i.name||"download",u.download=e,u.rel="noopener",typeof i=="string"?(u.href=i,u.origin!==location.origin?Es(u.href)?Jo(i,e,n):Za(u,u.target="_blank"):Za(u)):(u.href=a.createObjectURL(i),setTimeout(function(){a.revokeObjectURL(u.href)},4e4),setTimeout(function(){Za(u)},0))}:"msSaveOrOpenBlob"in navigator?function(i,e,n){if(e=e||i.name||"download",typeof i=="string")if(Es(i))Jo(i,e,n);else{var a=document.createElement("a");a.href=i,a.target="_blank",setTimeout(function(){Za(a)})}else navigator.msSaveOrOpenBlob(function(u,o){return o===void 0?o={autoBom:!1}:ve(o)!=="object"&&(me.warn("Deprecated: Expected third argument to be a object"),o={autoBom:!o}),o.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(u.type)?new Blob([String.fromCharCode(65279),u],{type:u.type}):u}(i,n),e)}:function(i,e,n,a){if((a=a||open("","_blank"))&&(a.document.title=a.document.body.innerText="downloading..."),typeof i=="string")return Jo(i,e,n);var u=i.type==="application/octet-stream",o=/constructor/i.test(Ut.HTMLElement)||Ut.safari,l=/CriOS\/[\d]+/.test(navigator.userAgent);if((l||u&&o)&&(typeof FileReader>"u"?"undefined":ve(FileReader))==="object"){var h=new FileReader;h.onloadend=function(){var A=h.result;A=l?A:A.replace(/^data:[^;]*;/,"data:attachment/file;"),a?a.location.href=A:location=A,a=null},h.readAsDataURL(i)}else{var f=Ut.URL||Ut.webkitURL,g=f.createObjectURL(i);a?a.location=g:location.href=g,a=null,setTimeout(function(){f.revokeObjectURL(g)},4e4)}});/**
* A class to parse color values
* @author Stoyan Stefanov <sstoo@gmail.com>
* {@link http://www.phpied.com/rgb-color-parser-in-javascript/}
* @license Use it if you like it
*/function Qs(i){var e;i=i||"",this.ok=!1,i.charAt(0)=="#"&&(i=i.substr(1,6)),i={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"}[i=(i=i.replace(/ /g,"")).toLowerCase()]||i;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 u=n[a].re,o=n[a].process,l=u.exec(i);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 Yo(i,e){var n=i[0],a=i[1],u=i[2],o=i[3];n=Xe(n,a,u,o,e[0],7,-680876936),o=Xe(o,n,a,u,e[1],12,-389564586),u=Xe(u,o,n,a,e[2],17,606105819),a=Xe(a,u,o,n,e[3],22,-1044525330),n=Xe(n,a,u,o,e[4],7,-176418897),o=Xe(o,n,a,u,e[5],12,1200080426),u=Xe(u,o,n,a,e[6],17,-1473231341),a=Xe(a,u,o,n,e[7],22,-45705983),n=Xe(n,a,u,o,e[8],7,1770035416),o=Xe(o,n,a,u,e[9],12,-1958414417),u=Xe(u,o,n,a,e[10],17,-42063),a=Xe(a,u,o,n,e[11],22,-1990404162),n=Xe(n,a,u,o,e[12],7,1804603682),o=Xe(o,n,a,u,e[13],12,-40341101),u=Xe(u,o,n,a,e[14],17,-1502002290),n=Ke(n,a=Xe(a,u,o,n,e[15],22,1236535329),u,o,e[1],5,-165796510),o=Ke(o,n,a,u,e[6],9,-1069501632),u=Ke(u,o,n,a,e[11],14,643717713),a=Ke(a,u,o,n,e[0],20,-373897302),n=Ke(n,a,u,o,e[5],5,-701558691),o=Ke(o,n,a,u,e[10],9,38016083),u=Ke(u,o,n,a,e[15],14,-660478335),a=Ke(a,u,o,n,e[4],20,-405537848),n=Ke(n,a,u,o,e[9],5,568446438),o=Ke(o,n,a,u,e[14],9,-1019803690),u=Ke(u,o,n,a,e[3],14,-187363961),a=Ke(a,u,o,n,e[8],20,1163531501),n=Ke(n,a,u,o,e[13],5,-1444681467),o=Ke(o,n,a,u,e[2],9,-51403784),u=Ke(u,o,n,a,e[7],14,1735328473),n=Ze(n,a=Ke(a,u,o,n,e[12],20,-1926607734),u,o,e[5],4,-378558),o=Ze(o,n,a,u,e[8],11,-2022574463),u=Ze(u,o,n,a,e[11],16,1839030562),a=Ze(a,u,o,n,e[14],23,-35309556),n=Ze(n,a,u,o,e[1],4,-1530992060),o=Ze(o,n,a,u,e[4],11,1272893353),u=Ze(u,o,n,a,e[7],16,-155497632),a=Ze(a,u,o,n,e[10],23,-1094730640),n=Ze(n,a,u,o,e[13],4,681279174),o=Ze(o,n,a,u,e[0],11,-358537222),u=Ze(u,o,n,a,e[3],16,-722521979),a=Ze(a,u,o,n,e[6],23,76029189),n=Ze(n,a,u,o,e[9],4,-640364487),o=Ze(o,n,a,u,e[12],11,-421815835),u=Ze(u,o,n,a,e[15],16,530742520),n=$e(n,a=Ze(a,u,o,n,e[2],23,-995338651),u,o,e[0],6,-198630844),o=$e(o,n,a,u,e[7],10,1126891415),u=$e(u,o,n,a,e[14],15,-1416354905),a=$e(a,u,o,n,e[5],21,-57434055),n=$e(n,a,u,o,e[12],6,1700485571),o=$e(o,n,a,u,e[3],10,-1894986606),u=$e(u,o,n,a,e[10],15,-1051523),a=$e(a,u,o,n,e[1],21,-2054922799),n=$e(n,a,u,o,e[8],6,1873313359),o=$e(o,n,a,u,e[15],10,-30611744),u=$e(u,o,n,a,e[6],15,-1560198380),a=$e(a,u,o,n,e[13],21,1309151649),n=$e(n,a,u,o,e[4],6,-145523070),o=$e(o,n,a,u,e[11],10,-1120210379),u=$e(u,o,n,a,e[2],15,718787259),a=$e(a,u,o,n,e[9],21,-343485551),i[0]=Ar(n,i[0]),i[1]=Ar(a,i[1]),i[2]=Ar(u,i[2]),i[3]=Ar(o,i[3])}function no(i,e,n,a,u,o){return e=Ar(Ar(e,i),Ar(a,o)),Ar(e<<u|e>>>32-u,n)}function Xe(i,e,n,a,u,o,l){return no(e&n|~e&a,i,e,u,o,l)}function Ke(i,e,n,a,u,o,l){return no(e&a|n&~a,i,e,u,o,l)}function Ze(i,e,n,a,u,o,l){return no(e^n^a,i,e,u,o,l)}function $e(i,e,n,a,u,o,l){return no(n^(e|~a),i,e,u,o,l)}function tc(i){var e,n=i.length,a=[1732584193,-271733879,-1732584194,271733878];for(e=64;e<=i.length;e+=64)Yo(a,$c(i.substring(e-64,e)));i=i.substring(e-64);var u=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(e=0;e<i.length;e++)u[e>>2]|=i.charCodeAt(e)<<(e%4<<3);if(u[e>>2]|=128<<(e%4<<3),e>55)for(Yo(a,u),e=0;e<16;e++)u[e]=0;return u[14]=8*n,Yo(a,u),a}function $c(i){var e,n=[];for(e=0;e<64;e+=4)n[e>>2]=i.charCodeAt(e)+(i.charCodeAt(e+1)<<8)+(i.charCodeAt(e+2)<<16)+(i.charCodeAt(e+3)<<24);return n}ea=Ut.atob.bind(Ut),ts=Ut.btoa.bind(Ut);var qs="0123456789abcdef".split("");function Qc(i){for(var e="",n=0;n<4;n++)e+=qs[i>>8*n+4&15]+qs[i>>8*n&15];return e}function tu(i){return String.fromCharCode((255&i)>>0,(65280&i)>>8,(16711680&i)>>16,(4278190080&i)>>24)}function es(i){return tc(i).map(tu).join("")}var eu=function(i){for(var e=0;e<i.length;e++)i[e]=Qc(i[e]);return i.join("")}(tc("hello"))!="5d41402abc4b2a76b9719d911017c592";function Ar(i,e){if(eu){var n=(65535&i)+(65535&e);return(i>>16)+(e>>16)+(n>>16)<<16|65535&n}return i+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 ns(i,e){var n,a,u,o;if(i!==n){for(var l=(u=i,o=1+(256/i.length>>0),new Array(o+1).join(u)),h=[],f=0;f<256;f++)h[f]=f;var g=0;for(f=0;f<256;f++){var A=h[f];g=(g+A+l.charCodeAt(f))%256,h[f]=h[g],h[g]=A}n=i,a=h}else h=a;var N=e.length,_=0,p=0,B="";for(f=0;f<N;f++)p=(p+(A=h[_=(_+1)%256]))%256,h[_]=h[p],h[p]=A,l=h[(h[_]+h[p])%256],B+=String.fromCharCode(e.charCodeAt(f)^l);return B}/**
* @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 Ds={print:4,modify:8,copy:16,"annot-forms":32};function Ai(i,e,n,a){this.v=1,this.r=2;var u=192;i.forEach(function(h){if(Ds.perm!==void 0)throw new Error("Invalid permission: "+h);u+=Ds[h]}),this.padding="(\xBFN^Nu\x8AAd\0NV\xFF\xFA\b..\0\xB6\xD0h>\x80/\f\xA9\xFEdSiz";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^u)),this.encryptionKey=es(o+this.O+this.lsbFirstWord(this.P)+this.hexToBytes(a)).substr(0,5),this.U=ns(this.encryptionKey,this.padding)}function xi(i){if(/[^\u0000-\u00ff]/.test(i))throw new Error("Invalid PDF Name Object: "+i+", Only accept ASCII characters.");for(var e="",n=i.length,a=0;a<n;a++){var u=i.charCodeAt(a);u<33||u===35||u===37||u===40||u===41||u===47||u===60||u===62||u===91||u===93||u===123||u===125||u>126?e+="#"+("0"+u.toString(16)).slice(-2):e+=i[a]}return e}function Rs(i){if(ve(i)!=="object")throw new Error("Invalid Context passed to initialize PubSub (jsPDF-module)");var e={};this.subscribe=function(n,a,u){if(u=u||!1,typeof n!="string"||typeof a!="function"||typeof u!="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,!!u],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),u=[];for(var o in e[n]){var l=e[n][o];try{l[0].apply(i,a)}catch(h){Ut.console&&me.error("jsPDF PubSub Error",h.message,h)}l[1]&&u.push(o)}u.length&&u.forEach(this.unsubscribe)}},this.getTopics=function(){return e}}function oa(i){if(!(this instanceof oa))return new oa(i);var e="opacity,stroke-opacity".split(",");for(var n in i)i.hasOwnProperty(n)&&e.indexOf(n)>=0&&(this[n]=i[n]);this.id="",this.objectNumber=-1}function ec(i,e){this.gState=i,this.matrix=e,this.id="",this.objectNumber=-1}function Nr(i,e,n,a,u){if(!(this instanceof Nr))return new Nr(i,e,n,a,u);this.type=i==="axial"?2:3,this.coords=e,this.colors=n,ec.call(this,a,u)}function Tr(i,e,n,a,u){if(!(this instanceof Tr))return new Tr(i,e,n,a,u);this.boundingBox=i,this.xStep=e,this.yStep=n,this.stream="",this.cloneIndex=0,ec.call(this,a,u)}function Tt(i){var e,n=typeof arguments[0]=="string"?arguments[0]:"p",a=arguments[1],u=arguments[2],o=arguments[3],l=[],h=1,f=16,g="S",A=null;ve(i=i||{})==="object"&&(n=i.orientation,a=i.unit||a,u=i.format||u,o=i.compress||i.compressPdf||o,(A=i.encryption||null)!==null&&(A.userPassword=A.userPassword||"",A.ownerPassword=A.ownerPassword||"",A.userPermissions=A.userPermissions||[]),h=typeof i.userUnit=="number"?Math.abs(i.userUnit):1,i.precision!==void 0&&(e=i.precision),i.floatPrecision!==void 0&&(f=i.floatPrecision),g=i.defaultPathOperation||"S"),l=i.filters||(o===!0?["FlateEncode"]:l),a=a||"mm",n=(""+(n||"P")).toLowerCase();var N=i.putOnlyUsedFonts||!1,_={},p={internal:{},__private__:{}};p.__private__.PubSub=Rs;var B="1.3",I=p.__private__.getPdfVersion=function(){return B};p.__private__.setPdfVersion=function(s){B=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 S=p.__private__.getPageFormat=function(s){return q[s]};u=u||"a4";var M={COMPAT:"compat
`),nn(s,v),ue.publish("endTilingPattern",v),Rn.pop().restore()};var qe=p.__private__.newObject=function(){var s=Oe();return ln(s,!0),s},Oe=p.__private__.newObjectDeferred=function(){return J++,$[J]=function(){return Q},J},ln=function(s,v){return v=typeof v=="boolean"&&v,$[s]=Q,v&&O(s+" 0 obj"),s},Gr=p.__private__.newAdditionalObject=function(){var s={objId:Oe(),content:""};return At.push(s),s},Zn=Oe(),_n=Oe(),Pn=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 C=parseFloat(v[0]);v=[C,C,C,"r"]}for(var D="#",Y=0;Y<3;Y++)D+=("0"+Math.floor(255*parseFloat(v[Y])).toString(16)).slice(-2);return D},kn=p.__private__.encodeColorString=function(s){var v;typeof s=="string"&&(s={ch1:s});var C=s.ch1,D=s.ch2,Y=s.ch3,it=s.ch4,yt=s.pdfColorType==="draw"?["G","RG","K"]:["g","rg","k"];if(typeof C=="string"&&C.charAt(0)!=="#"){var It=new Qs(C);if(It.ok)C=It.toHex();else if(!/^\d*\.?\d*$/.test(C))throw new Error('Invalid color "'+C+'" passed to jsPDF.encodeColorString.')}if(typeof C=="string"&&/^#[0-9A-Fa-f]{3}$/.test(C)&&(C="#"+C[1]+C[1]+C[2]+C[2]+C[3]+C[3]),typeof C=="string"&&/^#[0-9A-Fa-f]{6}$/.test(C)){var Dt=parseInt(C.substr(1),16);C=Dt>>16&255,D=Dt>>8&255,Y=255&Dt}if(D===void 0||it===void 0&&C===D&&D===Y)if(typeof C=="string")v=C+" "+yt[0];else switch(s.precision){case 2:v=bt(C/255)+" "+yt[0];break;case 3:default:v=k(C/255)+" "+yt[0]}else if(it===void 0||ve(it)==="object"){if(it&&!isNaN(it.a)&&it.a===0)return v=["1.","1.","1.",yt[1]].join(" ");if(typeof C=="string")v=[C,D,Y,yt[1]].join(" ");else switch(s.precision){case 2:v=[bt(C/255),bt(D/255),bt(Y/255),yt[1]].join(" ");break;default:case 3:v=[k(C/255),k(D/255),k(Y/255),yt[1]].join(" ")}}else if(typeof C=="string")v=[C,D,Y,it,yt[2]].join(" ");else switch(s.precision){case 2:v=[bt(C),bt(D),bt(Y),bt(it),yt[2]].join(" ");break;case 3:default:v=[k(C),k(D),k(Y),k(it),yt[2]].join(" ")}return v},zn=p.__private__.getFilters=function(){return l},gn=p.__private__.putStream=function(s){var v=(s=s||{}).data||"",C=s.filters||zn(),D=s.alreadyAppliedFilters||[],Y=s.addLength1||!1,it=v.length,yt=s.objectId,It=function(Ye){return Ye};if(A!==null&&yt===void 0)throw new Error("ObjectId must be passed to putStream for file encryption");A!==null&&(It=Je.encryptor(yt,0));var Dt={};C===!0&&(C=["FlateEncode"]);var Zt=s.additionalKeyValues||[],Yt=(Dt=Tt.API.processDataByFilters!==void 0?Tt.API.processDataByFilters(v,C):{data:v,reverseChain:[]}).reverseChain+(Array.isArray(D)?D.join(" "):D.toString());if(Dt.data.length!==0&&(Zt.push({key:"Length",value:Dt.data.length}),Y===!0&&Zt.push({key:"Length1",value:it})),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 Le=[],xe=0;xe<Dt.reverseChain.split("/").length-1;xe+=1)Le.push("null");Le.push(Zt[re].value),Zt[re].value="["+Le.join(" ")+"]"}}O("<<");for(var Be=0;Be<Zt.length;Be++)O("/"+Zt[Be].key+" "+Zt[Be].value);O(">>"),Dt.data.length!==0&&(O("stream"),O(It(Dt.data)),O("endstream"))},Un=p.__private__.putPage=function(s){var v=s.number,C=s.data,D=s.objId,Y=s.contentsObjId;ln(D,!0),O("<</Type /Page"),O("/Parent "+s.rootDictionaryObjId+" 0 R"),O("/Resources "+s.resourceDictionaryObjId+" 0 R"),O("/MediaBox ["+parseFloat(rt(s.mediaBox.bottomLeftX))+" "+parseFloat(rt(s.mediaBox.bottomLeftY))+" "+rt(s.mediaBox.topRightX)+" "+rt(s.mediaBox.topRightY)+"]"),s.cropBox!==null&&O("/CropBox ["+rt(s.cropBox.bottomLeftX)+" "+rt(s.cropBox.bottomLeftY)+" "+rt(s.cropBox.topRightX)+" "+rt(s.cropBox.topRightY)+"]"),s.bleedBox!==null&&O("/BleedBox ["+rt(s.bleedBox.bottomLeftX)+" "+rt(s.bleedBox.bottomLeftY)+" "+rt(s.bleedBox.topRightX)+" "+rt(s.bleedBox.topRightY)+"]"),s.trimBox!==null&&O("/TrimBox ["+rt(s.trimBox.bottomLeftX)+" "+rt(s.trimBox.bottomLeftY)+" "+rt(s.trimBox.topRightX)+" "+rt(s.trimBox.topRightY)+"]"),s.artBox!==null&&O("/ArtBox ["+rt(s.artBox.bottomLeftX)+" "+rt
`);return Z===M.ADVANCED&&(it+=`
Q`),ln(Y,!0),gn({data:it,filters:zn(),objectId:Y}),O("endobj"),D},kr=p.__private__.putPages=function(){var s,v,C=[];for(s=1;s<=Ae;s++)Jt[s].objId=Oe(),Jt[s].contentsObjId=Oe();for(s=1;s<=Ae;s++)C.push(Un({number:s,data:Lt[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:Zn,resourceDictionaryObjId:_n}));ln(Zn,!0),O("<</Type /Pages");var D="/Kids [";for(v=0;v<Ae;v++)D+=C[v]+" 0 R ";O(D+"]"),O("/Count "+Ae),O(">>"),O("endobj"),ue.publish("postPutPages")},Jr=function(s){ue.publish("putFont",{font:s,out:O,newObject:qe,putStream:gn}),s.isAlreadyPutted!==!0&&(s.objectNumber=qe(),O("<<"),O("/Type /Font"),O("/BaseFont /"+xi(s.postScriptName)),O("/Subtype /Type1"),typeof s.encoding=="string"&&O("/Encoding /"+s.encoding),O("/FirstChar 32"),O("/LastChar 255"),O(">>"),O("endobj"))},Yr=function(){for(var s in pe)pe.hasOwnProperty(s)&&(N===!1||N===!0&&_.hasOwnProperty(s))&&Jr(pe[s])},Xr=function(s){s.objectNumber=qe();var v=[];v.push({key:"Type",value:"/XObject"}),v.push({key:"Subtype",value:"/Form"}),v.push({key:"BBox",value:"["+[rt(s.x),rt(s.y),rt(s.x+s.width),rt(s.y+s.height)].join(" ")+"]"}),v.push({key:"Matrix",value:"["+s.matrix.toString()+"]"});var C=s.pages[1].join(`
`);gn({data:C,additionalKeyValues:v,objectId:s.objectNumber}),O("endobj")},Kr=function(){for(var s in He)He.hasOwnProperty(s)&&Xr(He[s])},sa=function(s,v){var C,D=[],Y=1/(v-1);for(C=0;C<1;C+=Y)D.push(C);if(D.push(1),s[0].offset!=0){var it={offset:0,color:s[0].color};s.unshift(it)}if(s[s.length-1].offset!=1){var yt={offset:1,color:s[s.length-1].color};s.push(yt)}for(var It="",Dt=0,Zt=0;Zt<D.length;Zt++){for(C=D[Zt];C>s[Dt+1].offset;)Dt++;var Yt=s[Dt].offset,re=(C-Yt)/(s[Dt+1].offset-Yt),Le=s[Dt].color,xe=s[Dt+1].color;It+=W(Math.round((1-re)*Le[0]+re*xe[0]).toString(16))+W(Math.round((1-re)*Le[1]+re*xe[1]).toString(16))+W(Math.round((1-re)*Le[2]+re*xe[2]).toString(16))}return It.trim()},ro=function(s,v){v||(v=21);var C=qe(),D=sa(s.colors,v),Y=[];Y.push({key:"FunctionType",value:"0"}),Y.push({key:"Domain",value:"[0.0 1.0]"}),Y.push({key:"Size",value:"["+v+"]"}),Y.push({key:"BitsPerSample",value:"8"}),Y.push({key:"Range",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),Y.push({key:"Decode",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),gn({data:D,additionalKeyValues:Y,alreadyAppliedFilters:["/ASCIIHexDecode"],objectId:C}),O("endobj"),s.objectNumber=qe(),O("<< /ShadingType "+s.type),O("/ColorSpace /DeviceRGB");var it="/Coords ["+rt(parseFloat(s.coords[0]))+" "+rt(parseFloat(s.coords[1]))+" ";s.type===2?it+=rt(parseFloat(s.coords[2]))+" "+rt(parseFloat(s.coords[3])):it+=rt(parseFloat(s.coords[2]))+" "+rt(parseFloat(s.coords[3]))+" "+rt(parseFloat(s.coords[4]))+" "+rt(parseFloat(s.coords[5])),O(it+="]"),s.matrix&&O("/Matrix ["+s.matrix.toString()+"]"),O("/Function "+C+" 0 R"),O("/Extend [true true]"),O(">>"),O("endobj")},io=function(s,v){var C=Oe(),D=qe();v.push({resourcesOid:C,objectOid:D}),s.objectNumber=D;var Y=[];Y.push({key:"Type",value:"/Pattern"}),Y.push({key:"PatternType",value:"1"}),Y.push({key:"PaintType",value:"1"}),Y.push({key:"TilingType",value:"1"}),Y.push({key:"BBox",value:"["+s.boundingBox.map(rt).join(" ")+"]"}),Y.push({key:"XStep",value:rt(s.xStep)}),Y.push({key:"YStep",value:rt(s.yStep)}),Y.push({key:"Resources",value:C+" 0 R"}),s.matrix&&Y.push({key:"Matrix",value:"["+s.matrix.toString()+"]"}),gn({data:s.stream,additionalKeyValues:Y,objectId:s.objectNumber}),O("endobj")},Zr=function(s){var v;for(v in ce)ce.hasOwnProperty(v)&&(ce[v]instanceof Nr?ro(ce[v]):ce[v]instanceof Tr&&io(ce[v],s))},ca=function(s){for(var v in s.objectNumber=qe(),O("<<"),s)switch(v){case"opacity":O("/ca "+bt(s[v]));break;case"stroke-opacity":O("/CA "+bt(s[v]))}O(">>"),O("endobj")},ao=function(){var s;for(s in Ne)Ne.hasOwnProperty(s)&&ca(Ne[s])},Si=function(){for(var s in O("/XObject <<"),He)He.hasOwnProperty(s)&&He[s].objectNumber>=0&&O("/"+s+" "+He[s].objectNumber+" 0 R");ue.publish("putXobjectDict"),O(">>")},oo=function(){Je.oid=qe(),O("<<"),O("/Filter /Standard"),O("/V "+Je.v),O("/R "+Je.r),O("/U <"+Je.toHexString(Je.U)+">"),O("/O <"+Je.toHexString(Je.O)+">"),O("/P "+Je.P),O(">>"),O("endobj")},ua=function(){for(var s in O("/Font <<"),pe)pe.hasOwnProperty(s)&&(N===!1||N===!0&&_.hasOwnProperty(s))&&O("/"+s+" "+pe[s].objectNumber+" 0 R");O(">>")},so=function(){if(Object.keys(ce).length>0){for(var s in O("/Shading <<"),ce)ce.hasOwnProperty(s)&&ce[s]instanceof Nr&&ce[s].objectNumber>=0&&O("/"+s+" "+ce[s].objectNumber+" 0 R");ue.publish("putShadingPatternDict"),O(">>")}},$r=function(s){if(Object.keys(ce).length>0){for(var v in O("/Pattern <<"),ce)ce.hasOwnProperty(v)&&ce[v]instanceof p.TilingPattern&&ce[v].objectNumber>=0&&ce[v].objectNumber<s&&O("/"+v+" "+ce[v].objectNumber+" 0 R");ue.publish("putTilingPatternDict"),O(">>")}},co=function(){if(Object.keys(Ne).length>0){var s;for(s in O("/ExtGState <<"),Ne)Ne.hasOwnProperty(s)&&Ne[s].objectNumber>=0&&O("/"+s+" "+Ne[s].objectNumber+" 0 R");ue.publish("putGStateDict"),O(">>")}},Pe=function(s){ln(s.resourcesOid,!0),O("<<"),O("/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]"),ua(),so(),$r(s.objectOid),co(),Si(),O(">>"),O("endobj")},la=function(){var s=[];Yr(),ao(),Kr(),Zr(s),ue.publish("putResources"),s.forEach(Pe),Pe({resourcesOid:_n,objectOid:Number.MAX_SAFE_INTEGER}),ue.publish("postPutResources")},ha=function(){ue
`)[0].split("<")[0]+": "+D.message;if(!Ut.console)throw new Error(C);Ut.console.error(C,D),Ut.alert&&alert(C)}},s.foo.bar=s,s.foo},Qr=function(s,v){var C,D,Y,it,yt,It,Dt,Zt,Yt;if(Y=(v=v||{}).sourceEncoding||"Unicode",yt=v.outputEncoding,(v.autoencode||yt)&&pe[ee].metadata&&pe[ee].metadata[Y]&&pe[ee].metadata[Y].encoding&&(it=pe[ee].metadata[Y].encoding,!yt&&pe[ee].encoding&&(yt=pe[ee].encoding),!yt&&it.codePages&&(yt=it.codePages[0]),typeof yt=="string"&&(yt=it[yt]),yt)){for(Dt=!1,It=[],C=0,D=s.length;C<D;C++)(Zt=yt[s.charCodeAt(C)])?It.push(String.fromCharCode(Zt)):It.push(s[C]),It[C].charCodeAt(0)>>8&&(Dt=!0);s=It.join("")}for(C=s.length;Dt===void 0&&C!==0;)s.charCodeAt(C-1)>>8&&(Dt=!0),C--;if(!Dt)return s;for(It=v.noBOM?[]:[254,255],C=0,D=s.length;C<D;C++){if((Yt=(Zt=s.charCodeAt(C))>>8)>>8)throw new Error("Character at position "+C+" of string '"+s+"' exceeds 16bits. Cannot be encoded into UCS-2 BE");It.push(Yt),It.push(Zt-(Yt<<8))}return String.fromCharCode.apply(void 0,It)},rn=p.__private__.pdfEscape=p.pdfEscape=function(s,v){return Qr(s,v).replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},Pi=p.__private__.beginPage=function(s){Lt[++Ae]=[],Jt[Ae]={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])}},pa(Ae),at(Lt[j])},da=function(s,v){var C,D,Y;switch(n=v||n,typeof s=="string"&&(C=S(s.toLowerCase()),Array.isArray(C)&&(D=C[0],Y=C[1])),Array.isArray(s)&&(D=s[0]*Ft,Y=s[1]*Ft),isNaN(D)&&(D=u[0],Y=u[1]),(D>14400||Y>14400)&&(me.warn("A page in a PDF can not be wider or taller than 14400 userUnit. jsPDF limits the width/height to 14400"),D=Math.min(14400,D),Y=Math.min(14400,Y)),u=[D,Y],n.substr(0,1)){case"l":Y>D&&(u=[Y,D]);break;case"p":D>Y&&(u=[Y,D])}Pi(u),wa(Ci),O(In),Oi!==0&&O(Oi+" J"),Bi!==0&&O(Bi+" j"),ue.publish("addPage",{pageNumber:Ae})},lo=function(s){s>0&&s<=Ae&&(Lt.splice(s,1),Jt.splice(s,1),Ae--,j>Ae&&(j=Ae),this.setPage(j))},pa=function(s){s>0&&s<=Ae&&(j=s)},ho=p.__private__.getNumberOfPages=p.getNumberOfPages=function(){return Lt.length-1},ga=function(s,v,C){var D,Y=void 0;return C=C||{},s=s!==void 0?s:pe[ee].fontName,v=v!==void 0?v:pe[ee].fontStyle,D=s.toLowerCase(),we[D]!==void 0&&we[D][v]!==void 0?Y=we[D][v]:we[s]!==void 0&&we[s][v]!==void 0?Y=we[s][v]:C.disableWarning===!1&&me.warn("Unable to look up font label for font '"+s+"', '"+v+"'. Refer to getFontList() for available fonts."),Y||C.noFallback||(Y=we.times[v])==null&&(Y=we.times.normal),Y},fo=p.__private__.putInfo=function(){var s=qe(),v=function(D){return D};for(var C in A!==null&&(v=Je.encryptor(s,0)),O("<<"),O("/Producer ("+rn(v("jsPDF "+Tt.version))+")"),Ht)Ht.hasOwnProperty(C)&&Ht[C]&&O("/"+C.substr(0,1).toUpperCase()+C.substr(1)+" ("+rn(v(Ht[C]))+")");O("/CreationDate ("+rn(v(ct))+")"),O(">>"),O("endobj")},ki=p.__private__.putCatalog=function(s){var v=(s=s||{}).rootDictionaryObjId||Zn;switch(qe(),O("<<"),O("/Type /Catalog"),O("/Pages "+v+" 0 R"),kt||(kt="fullwidth"),kt){case"fullwidth":O("/OpenAction [3 0 R /FitH null]");break;case"fullheight":O("/OpenAction [3 0 R /FitV null]");break;case"fullpage":O("/OpenAction [3 0 R /Fit]");break;case"original":O("/OpenAction [3 0 R /XYZ null null 1]");break;default:var C=""+kt;C.substr(C.length-1)==="%"&&(kt=parseInt(kt)/100),typeof kt=="number"&&O("/OpenAction [3 0 R /XYZ null null "+bt(kt)+"]")}switch(te||(te="continuous"),te){case"continuous":O("/PageLayout /OneColumn");break;case"single":O("/PageLayout /SinglePage");break;case"two":case"twoleft":O("/PageLayout /TwoColumnLeft");break;case"tworight":O("/PageLayout /TwoColumnRight")}Gt&&O("/PageMode /"+Gt),ue.publish("putCatalog"),O(">>"),O("endobj")},po=p.__private__.putTrailer=function(){O("trailer"),O("<<"),O("/Size "+(J+1)),O("/Root "+J+" 0 R"),O("/Info "+(J-1)+" 0 R"),A!==null&&O("/Encrypt "+Je.oid+" 0 R"),O("/ID [ <"+ot+"> <"+ot+"> ]"),O(">>")},go=p.__private__.putHeader=function(){O("%PDF-"+B),O("%\xBA\xDF\xAC\xE0")},mo=p.__private__.putXRef=function(){var s="0000000000";O("xref"),O("0 "+(J+1)),O("00000000
`)},ti=p.__private__.getBlob=function(s){return new Blob([Mt(s)],{type:"application/pdf"})},ei=p.output=p.__private__.output=Fn(function(s,v){switch(typeof(v=v||{})=="string"?v={filename:v}:v.filename=v.filename||"generated.pdf",s){case void 0:return $n();case"save":p.save(v.filename);break;case"arraybuffer":return Mt($n());case"blob":return ti($n());case"bloburi":case"bloburl":if(Ut.URL!==void 0&&typeof Ut.URL.createObjectURL=="function")return Ut.URL&&Ut.URL.createObjectURL(ti($n()))||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 C="",D=$n();try{C=ts(D)}catch{C=ts(unescape(encodeURIComponent(D)))}return"data:application/pdf;filename="+v.filename+";base64,"+C;case"pdfobjectnewwindow":if(Object.prototype.toString.call(Ut)==="[object Window]"){var Y="https://cdnjs.cloudflare.com/ajax/libs/pdfobject/2.1.1/pdfobject.min.js",it=' integrity="sha512-4ze/a9/4jqu+tX9dfOqJYSvyYd5M6qum/3HpCLr+/Jqf0whc37VUbkpNGHR7/8pSnCFw47T1fmIpwBV7UySh3g==" crossorigin="anonymous"';v.pdfObjectUrl&&(Y=v.pdfObjectUrl,it="");var yt='<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;} </style><body><script src="'+Y+'"'+it+'><\/script><script >PDFObject.embed("'+this.output("dataurlstring")+'", '+JSON.stringify(v)+");<\/script></body></html>",It=Ut.open();return It!==null&&It.document.write(yt),It}throw new Error("The option pdfobjectnewwindow just works in a browser-environment.");case"pdfjsnewwindow":if(Object.prototype.toString.call(Ut)==="[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=Ut.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(Ut)!=="[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>',Le=Ut.open();if(Le!==null&&(Le.document.write(re),Le.document.title=v.filename),Le||typeof safari>"u")return Le;break;case"datauri":case"dataurl":return Ut.document.location.href=this.output("datauristring",v);default:return null}}),ma=function(s){return Array.isArray(Pr)===!0&&Pr.indexOf(s)>-1};switch(a){case"pt":Ft=1;break;case"mm":Ft=72/25.4;break;case"cm":Ft=72/2.54;break;case"in":Ft=72;break;case"px":Ft=ma("px_scaling")==1?.75:96/72;break;case"pc":case"em":Ft=12;break;case"ex":Ft=6;break;default:if(typeof a!="number")throw new Error("Invalid unit: "+a);Ft=a}var Je=null;Et(),tt();var vo=function(s){return A!==null?Je.encryptor(s,0):function(v){return v}},va=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 va(v)},bo=p.__private__.getCurrentPageInfo=p.getCurrentPageInfo=function(){return{objId:Jt[j].objId,pageNumber:j,pageContext:Jt[j]}};p.addPage=function(){return da.apply(this,arguments),this},p.setPage=function(){return pa.apply(this,arguments),at.call(this,Lt[j]),this},p.insertPage=function(s){return this.addPage(),this.movePage(j,s),this},p.movePage=function(s,v){var C,D;if(s>v){C=Lt[s],D=Jt[
`,this.setCharSpace(this.getCharSpace()||0)),(Le=D.horizontalScale)!==void 0&&(Te+=rt(100*Le)+` Tz
`),D.lang;var an=-1,ko=D.renderingMode!==void 0?D.renderingMode:D.stroke,Wi=Be.internal.getCurrentPageInfo().pageContext;switch(ko){case 0:case!1:case"fill":an=0;break;case 1:case!0:case"stroke":an=1;break;case 2:case"fillThenStroke":an=2;break;case 3:case"invisible":an=3;break;case 4:case"fillAndAddForClipping":an=4;break;case 5:case"strokeAndAddPathForClipping":an=5;break;case 6:case"fillThenStrokeAndAddToPathForClipping":an=6;break;case 7:case"addToPathForClipping":an=7}var Pa=Wi.usedRenderingMode!==void 0?Wi.usedRenderingMode:-1;an!==-1?Te+=an+` Tr
`:Pa!==-1&&(Te+=`0 Tr
`),an!==-1&&(Wi.usedRenderingMode=an),Dt=D.align||"left";var mn,fi=xt*hn,ka=Be.internal.pageSize.getWidth(),Fa=pe[ee];Zt=D.charSpace||ii,Yt=D.maxWidth||0,re=Object.assign({autoencode:!0,noBOM:!0},D.flags);var lr=[],Or=function(be){return Be.getStringUnitWidth(be,{font:Fa,charSpace:Zt,fontSize:xt,doKerning:!1})*xt/Vn};if(Object.prototype.toString.call(s)==="[object Array]"){var on;yt=Ri(s),Dt!=="left"&&(mn=yt.map(Or));var Qe,hr=0;if(Dt==="right"){v-=mn[0],s=[],We=yt.length;for(var tr=0;tr<We;tr++)tr===0?(Qe=Wn(v),on=Qn(C)):(Qe=F(hr-mn[tr]),on=-fi),s.push([yt[tr],Qe,on]),hr=mn[tr]}else if(Dt==="center"){v-=mn[0]/2,s=[],We=yt.length;for(var er=0;er<We;er++)er===0?(Qe=Wn(v),on=Qn(C)):(Qe=F((hr-mn[er])/2),on=-fi),s.push([yt[er],Qe,on]),hr=mn[er]}else if(Dt==="left"){s=[],We=yt.length;for(var di=0;di<We;di++)s.push(yt[di])}else if(Dt==="justify"&&Fa.encoding==="Identity-H"){s=[],We=yt.length,Yt=Yt!==0?Yt:ka;for(var nr=0,ke=0;ke<We;ke++)if(on=ke===0?Qn(C):-fi,Qe=ke===0?Wn(v):nr,ke<We-1){var Vi=F((Yt-mn[ke])/(yt[ke].split(" ").length-1)),tn=yt[ke].split(" ");s.push([tn[0]+" ",Qe,on]),nr=0;for(var vn=1;vn<tn.length;vn++){var pi=(Or(tn[vn-1]+" "+tn[vn])-Or(tn[vn]))*Vn+Vi;vn==tn.length-1?s.push([tn[vn],pi,0]):s.push([tn[vn]+" ",pi,0]),nr-=pi}}else s.push([yt[ke],Qe,on]);s.push(["",nr,0])}else{if(Dt!=="justify")throw new Error('Unrecognized alignment option, use "left", "center", "right" or "justify".');for(s=[],We=yt.length,Yt=Yt!==0?Yt:ka,ke=0;ke<We;ke++)on=ke===0?Qn(C):-fi,Qe=ke===0?Wn(v):0,ke<We-1?lr.push(rt(F((Yt-mn[ke])/(yt[ke].split(" ").length-1)))):lr.push(0),s.push([yt[ke],Qe,on])}}var Ia=typeof D.R2L=="boolean"?D.R2L:qt;Ia===!0&&(s=Ti(s,function(be,ye,Fe){return[be.split("").reverse().join(""),ye,Fe]})),it={text:s,x:v,y:C,options:D,mutex:{pdfEscape:rn,activeFontKey:ee,fonts:pe,activeFontSize:xt}},ue.publish("postProcessText",it),s=it.text,Cn=it.mutex.isHex||!1;var Gi=pe[ee].encoding;Gi!=="WinAnsiEncoding"&&Gi!=="StandardEncoding"||(s=Ti(s,function(be,ye,Fe){return[_a(be),ye,Fe]})),yt=Ri(s),s=[];for(var Br,Mr,fr,Er=0,gi=1,qr=Array.isArray(yt[0])?gi:Er,dr="",Ji=function(be,ye,Fe){var De="";return Fe instanceof zt?(Fe=typeof D.angle=="number"?Sn(Fe,new zt(1,0,0,1,be,ye)):Sn(new zt(1,0,0,1,be,ye),Fe),Z===M.ADVANCED&&(Fe=Sn(new zt(1,0,0,-1,0,0),Fe)),De=Fe.join(" ")+` Tm
`):De=rt(be)+" "+rt(ye)+` Td
`,De},bn=0;bn<yt.length;bn++){switch(dr="",qr){case gi:fr=(Cn?"<":"(")+yt[bn][0]+(Cn?">":")"),Br=parseFloat(yt[bn][1]),Mr=parseFloat(yt[bn][2]);break;case Er:fr=(Cn?"<":"(")+yt[bn]+(Cn?">":")"),Br=Wn(v),Mr=Qn(C)}lr!==void 0&&lr[bn]!==void 0&&(dr=lr[bn]+` Tw
`),bn===0?s.push(dr+Ji(Br,Mr,xe)+fr):qr===Er?s.push(dr+fr):qr===gi&&s.push(dr+Ji(Br,Mr,xe)+fr)}s=qr===Er?s.join(` Tj
T* `):s.join(` Tj
`),s+=` Tj
`;var yn=`BT
/`;return yn+=ee+" "+xt+` Tf
`,yn+=rt(xt*hn)+` TL
`,yn+=Cr+`
`,yn+=Te,yn+=s,O(yn+="ET"),_[ee]=!0,Be};var yo=p.__private__.clip=p.clip=function(s){return O(s==="evenodd"?"W*":"W"),this};p.clipEvenOdd=function(){return yo("evenodd")},p.__private__.discardPath=p.discardPath=function(){return O("n"),this};var Hn=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 Hn(s)&&(g=s),this};var ba=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},ya=p.close=function(){return O("h"),this};p.stroke=function(){return O("S"),this},p.fill=function(s){return ni("f",s),this},p.fillEvenOdd=function(s){return ni("f*",s),this},p.fillStroke=function(s){return ni("B",s),this},p.fillStrokeEvenOdd=function(s){return ni("B*",s),this};var ni=function(s,v){ve(v)==="object"?Lo(v,s):O(s)},Fi=function(s){s===null||Z===M.ADVANCED&&s===void 0||(s=ba(s),O(s))};function wo(s,v,C,D,Y){var it=new Tr(v||this.boundingBox,C||this.xStep,D||this.yStep,this.gState,Y||this.matrix);it.stream=this.stream;var yt=s+"$$"+this.cloneIndex+++"$$";return nn(yt,it),it}var Lo=function(s,v){var C=_r[s.key],D=ce[C];if(D instanceof Nr)O("q"),O(No(v)),D.gState&&p.setGState(D.gState),O(s.matrix.toString()+" cm"),O("/"+C+" sh"),O("Q");else if(D instanceof Tr){var Y=new zt(1,0,0,-1,0,ur());s.matrix&&(Y=Y.multiply(s.matrix||Tn),C=wo.call(D,s.key,s.boundingBox,s.xStep,s.yStep,Y).id),O("q"),O("/Pattern cs"),O("/"+C+" scn"),D.gState&&p.setGState(D.gState),O(v),O("Q")}},No=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"}},Ii=p.moveTo=function(s,v){return O(rt(F(s))+" "+rt(R(v))+" m"),this},Fr=p.lineTo=function(s,v){return O(rt(F(s))+" "+rt(R(v))+" l"),this},sr=p.curveTo=function(s,v,C,D,Y,it){return O([rt(F(s)),rt(R(v)),rt(F(C)),rt(R(D)),rt(F(Y)),rt(R(it)),"c"].join(" ")),this};p.__private__.line=p.line=function(s,v,C,D,Y){if(isNaN(s)||isNaN(v)||isNaN(C)||isNaN(D)||!Hn(Y))throw new Error("Invalid arguments passed to jsPDF.line");return Z===M.COMPAT?this.lines([[C-s,D-v]],s,v,[1,1],Y||"S"):this.lines([[C-s,D-v]],s,v,[1,1]).stroke()},p.__private__.lines=p.lines=function(s,v,C,D,Y,it){var yt,It,Dt,Zt,Yt,re,Le,xe,Be,Ye,Te,Cn;if(typeof s=="number"&&(Cn=C,C=v,v=s,s=Cn),D=D||[1,1],it=it||!1,isNaN(v)||isNaN(C)||!Array.isArray(s)||!Array.isArray(D)||!Hn(Y)||typeof it!="boolean")throw new Error("Invalid arguments passed to jsPDF.lines");for(Ii(v,C),yt=D[0],It=D[1],Zt=s.length,Ye=v,Te=C,Dt=0;Dt<Zt;Dt++)(Yt=s[Dt]).length===2?(Ye=Yt[0]*yt+Ye,Te=Yt[1]*It+Te,Fr(Ye,Te)):(re=Yt[0]*yt+Ye,Le=Yt[1]*It+Te,xe=Yt[2]*yt+Ye,Be=Yt[3]*It+Te,Ye=Yt[4]*yt+Ye,Te=Yt[5]*It+Te,sr(re,Le,xe,Be,Ye,Te));return it&&ya(),Fi(Y),this},p.path=function(s){for(var v=0;v<s.length;v++){var C=s[v],D=C.c;switch(C.op){case"m":Ii(D[0],D[1]);break;case"l":Fr(D[0],D[1]);break;case"c":sr.apply(this,D);break;case"h":ya()}}return this},p.__private__.rect=p.rect=function(s,v,C,D,Y){if(isNaN(s)||isNaN(v)||isNaN(C)||isNaN(D)||!Hn(Y))throw new Error("Invalid arguments passed to jsPDF.rect");return Z===M.COMPAT&&(D=-D),O([rt(F(s)),rt(R(v)),rt(F(C)),rt(F(D)),"re"].join(" ")),Fi(Y),this},p.__private__.triangle=p.triangle=function(s,v,C,D,Y,it,yt){if(isNaN(s)||isNaN(v)||isNaN(C)||isNaN(D)||isNaN(Y)||isNaN(it)||!Hn(yt))throw new Error("Invalid arguments passed to jsPDF.triangle");return this.lines([[C-s,D-v],[Y-C,it-D],[s-Y,v-it]],s,v,[1,1],yt,!0),this},p.__private__.roundedRect=p.roundedRect=function(s,v,C,D,Y,it,yt){if(isNaN(s)||isNaN(v)||isNaN(C)||isNaN(D)||isNaN(Y)||isNaN(it)||!Hn(yt))throw new Error("Invalid arguments passed to jsPDF.roundedRect");var It=4/3*(Math.SQRT2-1);return Y=Math.min(Y,.5*C),it=Math.min(it,.5*D),this.lines([[C-2*Y,0],[Y*It,0,Y,it-it*It,Y,it],[0,D-2*it],[0,it*It,-Y*It,it,-Y,it],[2*Y-C,0],[-Y*It,0,-Y,-it*It,-Y,-it],[0,2*it-D],[0,-it*It,Y*It,-it,Y,-it]],s+Y,v,[1,1],yt,!0),this}
`),o}},rs=function(i,e){var n=i.fontSize===0?i.maxFontSize:i.fontSize,a={text:"",fontSize:""},u=(e=(e=e.substr(0,1)=="("?e.substr(1):e).substr(e.length-1)==")"?e.substr(0,e.length-1):e).split(" ");u=i.multiline?u.map(function(k){return k.split(`
`)}):u.map(function(k){return[k]});var o=n,l=Bt.internal.getHeight(i)||0;l=l<0?-l:l;var h=Bt.internal.getWidth(i)||0;h=h<0?-h:h;var f=function(k,F,H){if(k+1<u.length){var R=F+" "+u[k+1][0];return $a(R,i,H).width<=h-4}return!1};o++;t:for(;o>0;){e="",o--;var g,A,N=$a("3",i,o).height,_=i.multiline?l-o:(l-N)/2,p=_+=2,B=0,I=0,q=0;if(o<=0){e=`(...) Tj
`,e+="% Width of Text: "+$a(e,i,o=12).width+", FieldWidth:"+h+`
`;break}for(var S="",M=0,Z=0;Z<u.length;Z++)if(u.hasOwnProperty(Z)){var st=!1;if(u[Z].length!==1&&q!==u[Z].length-1){if((N+2)*(M+2)+2>l)continue t;S+=u[Z][q],st=!0,I=Z,Z--}else{S=(S+=u[Z][q]+" ").substr(S.length-1)==" "?S.substr(0,S.length-1):S;var dt=parseInt(Z),Nt=f(dt,S,o),rt=Z>=u.length-1;if(Nt&&!rt){S+=" ",q=0;continue}if(Nt||rt){if(rt)I=dt;else if(i.multiline&&(N+2)*(M+2)+2>l)continue t}else{if(!i.multiline||(N+2)*(M+2)+2>l)continue t;I=dt}}for(var G="",vt=B;vt<=I;vt++){var bt=u[vt];if(i.multiline){if(vt===I){G+=bt[q]+" ",q=(q+1)%bt.length;continue}if(vt===B){G+=bt[bt.length-1]+" ";continue}}G+=bt[0]+" "}switch(G=G.substr(G.length-1)==" "?G.substr(0,G.length-1):G,A=$a(G,i,o).width,i.textAlign){case"right":g=h-A-2;break;case"center":g=(h-A)/2;break;case"left":default:g=2}e+=Xt(g)+" "+Xt(p)+` Td
`,e+="("+Vr(G)+`) Tj
`,e+=-Xt(g)+` 0 Td
`,p=-(o+2),A=0,B=st?I:I+1,M++,S=""}break}return a.text=e,a.fontSize=o,a},$a=function(i,e,n){var a=e.scope.internal.getFont(e.fontName,e.fontStyle),u=e.scope.getStringUnitWidth(i,{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:u}},su={fields:[],xForms:[],acroFormDictionaryRoot:null,printedOut:!1,internal:null,isInitialized:!1},cu=function(i,e){var n={type:"reference",object:i};e.internal.getPageInfo(i.page).pageContext.annotations.find(function(a){return a.type===n.type&&a.object===n.object})===void 0&&e.internal.getPageInfo(i.page).pageContext.annotations.push(n)},uu=function(i,e){for(var n in i)if(i.hasOwnProperty(n)){var a=n,u=i[n];e.internal.newObjectDeferredBegin(u.objId,!0),ve(u)==="object"&&typeof u.putStream=="function"&&u.putStream(),delete i[a]}},lu=function(i,e){if(e.scope=i,i.internal!==void 0&&(i.internal.acroformPlugin===void 0||i.internal.acroformPlugin.isInitialized===!1)){if(Mn.FieldNum=0,i.internal.acroformPlugin=JSON.parse(JSON.stringify(su)),i.internal.acroformPlugin.acroFormDictionaryRoot)throw new Error("Exception while creating AcroformDictionary");os=i.internal.scaleFactor,i.internal.acroformPlugin.acroFormDictionaryRoot=new ic,i.internal.acroformPlugin.acroFormDictionaryRoot.scope=i,i.internal.acroformPlugin.acroFormDictionaryRoot._eventID=i.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})(i)}),i.internal.events.subscribe("buildDocument",function(){(function(n){n.internal.acroformPlugin.acroFormDictionaryRoot.objId=void 0;var a=n.internal.acroformPlugin.acroFormDictionaryRoot.Fields;for(var u in a)if(a.hasOwnProperty(u)){var o=a[u];o.objId=void 0,o.hasAnnotation&&cu(o,n)}})(i)}),i.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")})(i)}),i.internal.events.subscribe("postPutPages",function(n){(function(a,u){var o=!a;for(var l in a||(u.internal.newObjectDeferredBegin(u.internal.acroformPlugin.acroFormDictionaryRoot.objId,!0),u.internal.acroformPlugin.acroFormDictionaryRoot.putStream()),a=a||u.internal.acroformPlugin.acroFormDictionaryRoot.Kids)if(a.hasOwnProperty(l)){var h=a[l],f=[],g=h.Rect;if(h.Rect&&(h.Rect=au(h.Rect,u)),u.internal.newObjectDeferredBegin(h.objId,!0),h.DA=Bt.createDefaultAppearanceStream(h),ve(h)==="object"&&typeof h.getKeyValueListForStream=="function"&&(f=h.getKeyValueListForStream()),h.Rect=g,h.hasAppearanceStream&&!h.appearanceStreamContent){var A=ou(h);f.push({key:"AP",value:"<</N "+A+">>"}),u.internal.acroformPlugin.xForms.push(A)}if(h.appearanceStreamContent){var N="";for(var _ in h.appearanceStreamContent)if(h.appearanceStreamContent.hasOwnProperty(_)){var p=h.appearanceStreamContent[_];if(N+="/"+_+" ",N+="<<",Object.keys(p).length>=1||Array.isArray(p)){for(var l in p)if(p.hasOwnProperty(l)){var B=p[l];typeof B=="function"&&(B=B.call(u,h)),N+="/"+l+" "+B+" ",u.internal.acroformPlugin.xForms.indexOf(B)>=0||u.internal.acroformPlugin.xForms.push(B)}}else typeof(B=p)=="function"&&(B=B.call(u,h)),N+="/"+l+" "+B,u.internal.acroformPlugin.xForms.indexOf(B)>=0||u.internal.acroformPlugin.xForms.push(B);N+=">>"}f.push({key:"AP",value:`<<
`+N+">>"})}u.internal.putStream({additionalKeyValues:f,objectId:h.objId}),u.internal.out("endobj")}o&&uu(u.internal.acroformPlugin.xForms,u)})(n,i)}),i.internal.acroformPlugin.isInitialized=!0}},nc=_e.__acroform__.arrayToPdfArray=function(i,e,n){var a=function(l){return l};if(Array.isArray(i)){for(var u="[",o=0;o<i.length;o++)switch(o!==0&&(u+=" "),ve(i[o])){case"boolean":case"number":case"object":u+=i[o].toString();break;case"string":i[o].substr(0,1)!=="/"?(e!==void 0&&n&&(a=n.internal.getEncryptor(e)),u+="("+Vr(a(i[o].toString()))+")"):u+=i[o].toString()}return u+="]"}throw new Error("Invalid argument passed to jsPDF.__acroform__.arrayToPdfArray")},Xo=function(i,e,n){var a=function(u){return u};return e!==void 0&&n&&(a=n.internal.getEncryptor(e)),(i=i||"").toString(),i="("+Vr(a(i))+")"},Yn=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(i){this._objId=i}}),Object.defineProperty(this,"scope",{value:this._scope,writable:!0})};Yn.prototype.toString=function(){return this.objId+" 0 R"},Yn.prototype.putStream=function(){var i=this.getKeyValueListForStream();this.scope.internal.putStream({data:this.stream,additionalKeyValues:i,objectId:this.objId}),this.scope.internal.out("endobj")},Yn.prototype.getKeyValueListForStream=function(){var i=[],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],u=this[a];u&&(Array.isArray(u)?i.push({key:a,value:nc(u,this.objId,this.scope)}):u instanceof Yn?(u.scope=this.scope,i.push({key:a,value:u.objId+" 0 R"})):typeof u!="function"&&i.push({key:a,value:u}))}return i};var rc=function(){Yn.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 i,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){i=n.trim()},get:function(){return i||null}})};un(rc,Yn);var ic=function(){Yn.call(this);var i,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(i){var n=function(a){return a};return this.scope&&(n=this.scope.internal.getEncryptor(this.objId)),"("+Vr(n(i))+")"}},set:function(n){i=n}})};un(ic,Yn);var Mn=function i(){Yn.call(this);var e=4;Object.defineProperty(this,"F",{enumerable:!1,configurable:!1,get:function(){return e},set:function(S){if(isNaN(S))throw new Error('Invalid value "'+S+'" for attribute F supplied.');e=S}}),Object.defineProperty(this,"showWhenPrinted",{enumerable:!0,configurable:!0,get:function(){return Boolean(Ie(e,3))},set:function(S){Boolean(S)===!0?this.F=Ce(e,3):this.F=je(e,3)}});var n=0;Object.defineProperty(this,"Ff",{enumerable:!1,configurable:!1,get:function(){return n},set:function(S){if(isNaN(S))throw new Error('Invalid value "'+S+'" for attribute Ff supplied.');n=S}});var a=[];Object.defineProperty(this,"Rect",{enumerable:!1,configurable:!1,get:function(){if(a.length!==0)return a},set:function(S){a=S!==void 0?S:[]}}),Object.defineProperty(this,"x",{enumerable:!0,configurable:!0,get:function(){return!a||isNaN(a[0])?0:a[0]},set:function(S){a[0]=S}}),Object.defineProperty(this,"y",{enumerable:!0,configurable:!0,get:function(){return!a||isNaN(a[1])?0:a[1]},set:function(S){a[1]=S}}),Object.defineProperty(this,"width",{enumerable:!0,configurable:!0,get:functi
`)}},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 i},set:function(n){i=n}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return i.substr(1,i.length-1)},set:function(n){i="/"+n}})};un(Re,Mn);var ra=function(){Re.call(this),this.pushButton=!0};un(ra,Re);var Wr=function(){Re.call(this),this.radio=!0,this.pushButton=!1;var i=[];Object.defineProperty(this,"Kids",{enumerable:!0,configurable:!1,get:function(){return i},set:function(e){i=e!==void 0?e:[]}})};un(Wr,Re);var eo=function(){var i,e;Mn.call(this),Object.defineProperty(this,"Parent",{enumerable:!1,configurable:!1,get:function(){return i},set:function(u){i=u}}),Object.defineProperty(this,"optionName",{enumerable:!1,configurable:!0,get:function(){return e},set:function(u){e=u}});var n,a={};Object.defineProperty(this,"MK",{enumerable:!1,configurable:!1,get:function(){var u=function(h){return h};this.scope&&(u=this.scope.internal.getEncryptor(this.objId));var o,l=[];for(o in l.push("<<"),a)l.push("/"+o+" ("+Vr(u(a[o]))+")");return l.push(">>"),l.join(`
`)},set:function(u){ve(u)==="object"&&(a=u)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return a.CA||""},set:function(u){typeof u=="string"&&(a.CA=u)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return n},set:function(u){n=u}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return n.substr(1,n.length-1)},set:function(u){n="/"+u}}),this.caption="l",this.appearanceState="Off",this._AppearanceType=Bt.RadioButton.Circle,this.appearanceStreamContent=this._AppearanceType.createAppearanceStream(this.optionName)};un(eo,Mn),Wr.prototype.setAppearance=function(i){if(!("createAppearanceStream"in i)||!("getCA"in i))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=i.createAppearanceStream(n.optionName),n.caption=i.getCA()}},Wr.prototype.createOption=function(i){var e=new eo;return e.Parent=this,e.optionName=i,this.Kids.push(e),hu.call(this.scope,e),e};var ia=function(){Re.call(this),this.fontName="zapfdingbats",this.caption="3",this.appearanceState="On",this.value="On",this.textAlign="center",this.appearanceStreamContent=Bt.CheckBox.createAppearanceStream()};un(ia,Re);var xr=function(){Mn.call(this),this.FT="/Tx",Object.defineProperty(this,"multiline",{enumerable:!0,configurable:!0,get:function(){return Boolean(Ie(this.Ff,13))},set:function(e){Boolean(e)===!0?this.Ff=Ce(this.Ff,13):this.Ff=je(this.Ff,13)}}),Object.defineProperty(this,"fileSelect",{enumerable:!0,configurable:!0,get:function(){return Boolean(Ie(this.Ff,21))},set:function(e){Boolean(e)===!0?this.Ff=Ce(this.Ff,21):this.Ff=je(this.Ff,21)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return Boolean(Ie(this.Ff,23))},set:function(e){Boolean(e)===!0?this.Ff=Ce(this.Ff,23):this.Ff=je(this.Ff,23)}}),Object.defineProperty(this,"doNotScroll",{enumerable:!0,configurable:!0,get:function(){return Boolean(Ie(this.Ff,24))},set:function(e){Boolean(e)===!0?this.Ff=Ce(this.Ff,24):this.Ff=je(this.Ff,24)}}),Object.defineProperty(this,"comb",{enumerable:!0,configurable:!0,get:function(){return Boolean(Ie(this.Ff,25))},set:function(e){Boolean(e)===!0?this.Ff=Ce(this.Ff,25):this.Ff=je(this.Ff,25)}}),Object.defineProperty(this,"richText",{enumerable:!0,configurable:!0,get:function(){return Boolean(Ie(this.Ff,26))},set:function(e){Boolean(e)===!0?this.Ff=Ce(this.Ff,26):this.Ff=je(this.Ff,26)}});var i=null;Object.defineProperty(this,"MaxLen",{enumerable:!0,configurable:!1,get:function(){return i},set:function(e){i=e}}),Object.defineProperty(this,"maxLength",{enumerable:!0,configurable:!0,get:function(){return i},set:function(e){Number.isInteger(e)&&(i=e)}}),Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return this.V||this.DV}})};un(xr,Mn);var aa=function(){xr.call(this),Object.defineProperty(this,"password",{enumerable:!0,configurable:!0,get:function(){return Boolean(Ie(this.Ff,14))},set:function(i){Boolean(i)===!0?this.Ff=Ce(this.Ff,14):this.Ff=je(this.Ff,14)}}),this.password=!0};un(aa,xr);var Bt={CheckBox:{createAppearanceStream:function(){return{N:{On:Bt.CheckBox.YesNormal},D:{On:Bt.CheckBox.YesPushDown,Off:Bt.CheckBox.OffPushDown}}},YesPushDown:function(i){var e=Jn(i);e.scope=i.scope;var n=[],a=i.scope.internal.getFont(i.fontName,i.fontStyle).id,u=i.scope.__private__.encodeColorString(i.color),o=rs(i,i.caption);return n.push("0.749023 g"),n.push("0 0 "+Xt(Bt.internal.getWidth(i))+" "+Xt(Bt.internal.getHeight(i))+" re"),n.push("f"),n.push("BMC"),n.push("q"),n.push("0 0 1 rg"),n.push("/"+a+" "+Xt(o.fontSize)+" Tf "+u),n.push("BT"),n.push(o.text),n.push("ET"),n.push("Q"),n.push("EMC"),e.stream=n.join(`
`),e},YesNormal:function(i){var e=Jn(i);e.scope=i.scope;var n=i.scope.internal.getFont(i.fontName,i.fontStyle).id,a=i.scope.__private__.encodeColorString(i.color),u=[],o=Bt.internal.getHeight(i),l=Bt.internal.getWidth(i),h=rs(i,i.caption);return u.push("1 g"),u.push("0 0 "+Xt(l)+" "+Xt(o)+" re"),u.push("f"),u.push("q"),u.push("0 0 1 rg"),u.push("0 0 "+Xt(l-1)+" "+Xt(o-1)+" re"),u.push("W"),u.push("n"),u.push("0 g"),u.push("BT"),u.push("/"+n+" "+Xt(h.fontSize)+" Tf "+a),u.push(h.text),u.push("ET"),u.push("Q"),e.stream=u.join(`
`),e},OffPushDown:function(i){var e=Jn(i);e.scope=i.scope;var n=[];return n.push("0.749023 g"),n.push("0 0 "+Xt(Bt.internal.getWidth(i))+" "+Xt(Bt.internal.getHeight(i))+" re"),n.push("f"),e.stream=n.join(`
`),e}},RadioButton:{Circle:{createAppearanceStream:function(i){var e={D:{Off:Bt.RadioButton.Circle.OffPushDown},N:{}};return e.N[i]=Bt.RadioButton.Circle.YesNormal,e.D[i]=Bt.RadioButton.Circle.YesPushDown,e},getCA:function(){return"l"},YesNormal:function(i){var e=Jn(i);e.scope=i.scope;var n=[],a=Bt.internal.getWidth(i)<=Bt.internal.getHeight(i)?Bt.internal.getWidth(i)/4:Bt.internal.getHeight(i)/4;a=Number((.9*a).toFixed(5));var u=Bt.internal.Bezier_C,o=Number((a*u).toFixed(5));return n.push("q"),n.push("1 0 0 1 "+Lr(Bt.internal.getWidth(i)/2)+" "+Lr(Bt.internal.getHeight(i)/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(i){var e=Jn(i);e.scope=i.scope;var n=[],a=Bt.internal.getWidth(i)<=Bt.internal.getHeight(i)?Bt.internal.getWidth(i)/4:Bt.internal.getHeight(i)/4;a=Number((.9*a).toFixed(5));var u=Number((2*a).toFixed(5)),o=Number((u*Bt.internal.Bezier_C).toFixed(5)),l=Number((a*Bt.internal.Bezier_C).toFixed(5));return n.push("0.749023 g"),n.push("q"),n.push("1 0 0 1 "+Lr(Bt.internal.getWidth(i)/2)+" "+Lr(Bt.internal.getHeight(i)/2)+" cm"),n.push(u+" 0 m"),n.push(u+" "+o+" "+o+" "+u+" 0 "+u+" c"),n.push("-"+o+" "+u+" -"+u+" "+o+" -"+u+" 0 c"),n.push("-"+u+" -"+o+" -"+o+" -"+u+" 0 -"+u+" c"),n.push(o+" -"+u+" "+u+" -"+o+" "+u+" 0 c"),n.push("f"),n.push("Q"),n.push("0 g"),n.push("q"),n.push("1 0 0 1 "+Lr(Bt.internal.getWidth(i)/2)+" "+Lr(Bt.internal.getHeight(i)/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(i){var e=Jn(i);e.scope=i.scope;var n=[],a=Bt.internal.getWidth(i)<=Bt.internal.getHeight(i)?Bt.internal.getWidth(i)/4:Bt.internal.getHeight(i)/4;a=Number((.9*a).toFixed(5));var u=Number((2*a).toFixed(5)),o=Number((u*Bt.internal.Bezier_C).toFixed(5));return n.push("0.749023 g"),n.push("q"),n.push("1 0 0 1 "+Lr(Bt.internal.getWidth(i)/2)+" "+Lr(Bt.internal.getHeight(i)/2)+" cm"),n.push(u+" 0 m"),n.push(u+" "+o+" "+o+" "+u+" 0 "+u+" c"),n.push("-"+o+" "+u+" -"+u+" "+o+" -"+u+" 0 c"),n.push("-"+u+" -"+o+" -"+o+" -"+u+" 0 -"+u+" c"),n.push(o+" -"+u+" "+u+" -"+o+" "+u+" 0 c"),n.push("f"),n.push("Q"),e.stream=n.join(`
`),e}},Cross:{createAppearanceStream:function(i){var e={D:{Off:Bt.RadioButton.Cross.OffPushDown},N:{}};return e.N[i]=Bt.RadioButton.Cross.YesNormal,e.D[i]=Bt.RadioButton.Cross.YesPushDown,e},getCA:function(){return"8"},YesNormal:function(i){var e=Jn(i);e.scope=i.scope;var n=[],a=Bt.internal.calculateCross(i);return n.push("q"),n.push("1 1 "+Xt(Bt.internal.getWidth(i)-2)+" "+Xt(Bt.internal.getHeight(i)-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(i){var e=Jn(i);e.scope=i.scope;var n=Bt.internal.calculateCross(i),a=[];return a.push("0.749023 g"),a.push("0 0 "+Xt(Bt.internal.getWidth(i))+" "+Xt(Bt.internal.getHeight(i))+" re"),a.push("f"),a.push("q"),a.push("1 1 "+Xt(Bt.internal.getWidth(i)-2)+" "+Xt(Bt.internal.getHeight(i)-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(i){var e=Jn(i);e.scope=i.scope;var n=[];return n.push("0.749023 g"),n.push("0 0 "+Xt(Bt.internal.getWidth(i))+" "+Xt(Bt.internal.getHeight(i))+" re"),n.push("f"),e.stream=n.join(`
2024-11-08 17:23:40 +08:00
`),e}}},createDefaultAppearanceStream:function(i){var e=i.scope.internal.getFont(i.fontName,i.fontStyle).id,n=i.scope.__private__.encodeColorString(i.color);return"/"+e+" "+i.fontSize+" Tf "+n}};Bt.internal={Bezier_C:.551915024494,calculateCross:function(i){var e=Bt.internal.getWidth(i),n=Bt.internal.getHeight(i),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}}}},Bt.internal.getWidth=function(i){var e=0;return ve(i)==="object"&&(e=Ts(i.Rect[2])),e},Bt.internal.getHeight=function(i){var e=0;return ve(i)==="object"&&(e=Ts(i.Rect[3])),e};var hu=_e.addField=function(i){if(lu(this,i),!(i instanceof Mn))throw new Error("Invalid argument passed to jsPDF.addField.");var e;return(e=i).scope.internal.acroformPlugin.printedOut&&(e.scope.internal.acroformPlugin.printedOut=!1,e.scope.internal.acroformPlugin.acroFormDictionaryRoot=null),e.scope.internal.acroformPlugin.acroFormDictionaryRoot.Fields.push(e),i.page=i.scope.internal.getCurrentPageInfo().pageNumber,this};_e.AcroFormChoiceField=zr,_e.AcroFormListBox=Ur,_e.AcroFormComboBox=Hr,_e.AcroFormEditBox=na,_e.AcroFormButton=Re,_e.AcroFormPushButton=ra,_e.AcroFormRadioButton=Wr,_e.AcroFormCheckBox=ia,_e.AcroFormTextField=xr,_e.AcroFormPasswordField=aa,_e.AcroFormAppearance=Bt,_e.AcroForm={ChoiceField:zr,ListBox:Ur,ComboBox:Hr,EditBox:na,Button:Re,PushButton:ra,RadioButton:Wr,CheckBox:ia,TextField:xr,PasswordField:aa,Appearance:Bt},Tt.AcroForm={ChoiceField:zr,ListBox:Ur,ComboBox:Hr,EditBox:na,Button:Re,PushButton:ra,RadioButton:Wr,CheckBox:ia,TextField:xr,PasswordField:aa,Appearance:Bt};var fu=Tt.AcroForm;function ac(i){return i.reduce(function(e,n,a){return e[n]=a,e},{})}(function(i){i.__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=i.__addimage__.getImageFileTypeByImageData=function(k,F){var H,R,ct,ot,mt,tt=e;if((F=F||e)==="RGBA"||k.data!==void 0&&k.data instanceof Uint8ClampedArray&&"height"in k&&"width"in k)return"RGBA";if(Nt(k))for(mt in n)for(ct=n[mt],H=0;H<ct.length;H+=1){for(ot=!0,R=0;R<ct[H].length;R+=1)if(ct[H][R]!==void 0&&ct[H][R]!==k[R]){ot=!1;break}if(ot===!0){tt=mt;break}}else for(mt in n)for(ct=n[mt],H=0;H<ct.length;H+=1){for(ot=!0,R=0;R<ct[H].length;R+=1)if(ct[H][R]!==void 0&&ct[H][R]!==k.charCodeAt(R)){ot=!1;break}if(ot===!0){tt=mt;break}}return tt===e&&F!==e&&(tt=F),tt},u=function k(F){for(var H=this.internal.write,R=this.internal.putStream,ct=(0,this.internal.getFilters)();ct.indexOf("FlateEncode")!==-1;)ct.splice(ct.indexOf("FlateEncode"),1);F.objectId=this.internal.newObject();var ot=[];if(ot.push({key:"Type",value:"/XObject"}),ot.push({key:"Subtype",value:"/Image"}),ot.push({key:"Width",value:F.width}),ot.push({key:"Height",value:F.height}),F.colorSpace===q.INDEXED?ot.push({key:"ColorSpace",value:"[/Indexed /DeviceRGB "+(F.palette.length/3-1)+" "+("sMask"in F&&F.sMask!==void 0?F.objectId+2:F.objectId+1)+" 0 R]"}):(ot.push({key:"ColorSpace",value:"/"+F.colorSpace}),F.colorSpace===q.DEVICE_CMYK&&ot.push({key:"Decode",value:"[1 0 1 0 1 0 1 0]"})),ot.push({key:"BitsPerComponent",value:F.bitsPerComponent}),"decodeParameters"in F&&F.decodeParameters!==void 0&&ot.push({key:"DecodeParms",value:"<<"+F.decodeParameters+">>"}),"transparency"in F&&Array.isArray(F.transparency)){for(var mt="",tt=0,pt=F.transparency.length;tt<pt;tt++)mt+=F.transparency[tt]+" "+F.transparency[tt]+" ";ot.push({key:"Mask",value:"["+mt+"]"})}F.sMask!==void 0&&ot.push({key:"SMask",value:F.objectId+1+" 0 R"});var ft=F.filter!==void 0?["/"+F.filter]:void 0;if(R({data:F.data,additionalKeyValues:ot,alreadyAppliedFilters:ft,objectId:F.objectId}),H("endobj"),"sMask"in F&&F.sMask!==void 0){var Et="/Predictor "+F.predictor+" /Colors 1 /Bit
2024-11-08 12:27:11 +08:00
`},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,u){for(var o=0;o<u.children.length;o++)a.count++,this.count_r(a,u.children[o]);return a.count}}])}(Tt.API),function(i){var e=[192,193,194,195,196,197,198,199];i.processJPEG=function(n,a,u,o,l,h){var f,g=this.decode.DCT_DECODE,A=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(N){for(var _,p=256*N.charCodeAt(4)+N.charCodeAt(5),B=N.length,I={width:0,height:0,numcomponents:1},q=4;q<B;q+=2){if(q+=p,e.indexOf(N.charCodeAt(q+1))!==-1){_=256*N.charCodeAt(q+5)+N.charCodeAt(q+6),I={width:256*N.charCodeAt(q+7)+N.charCodeAt(q+8),height:_,numcomponents:N.charCodeAt(q+9)};break}p=256*N.charCodeAt(q+2)+N.charCodeAt(q+3)}return I}(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}A={data:n,width:f.width,height:f.height,colorSpace:h,bitsPerComponent:8,filter:g,index:a,alias:u}}return A}}(Tt.API);var Ni,to,Js,Ys,Xs,bu=function(){var i,e,n;function a(o){var l,h,f,g,A,N,_,p,B,I,q,S,M,Z;for(this.data=o,this.pos=8,this.palette=[],this.imgData=[],this.transparency={},this.animation=null,this.text={},N=null;;){switch(l=this.readUInt32(),B=function(){var st,dt;for(dt=[],st=0;st<4;++st)dt.push(String.fromCharCode(this.data[this.pos++]));return dt}.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":N&&this.animation.frames.push(N),this.pos+=4,N={width:this.readUInt32(),height:this.readUInt32(),xOffset:this.readUInt32(),yOffset:this.readUInt32()},A=this.readUInt16(),g=this.readUInt16()||100,N.delay=1e3*A/g,N.disposeOp=this.data[this.pos++],N.blendOp=this.data[this.pos++],N.data=[];break;case"IDAT":case"fdAT":for(B==="fdAT"&&(this.pos+=4,l-=4),o=(N!=null?N.data:void 0)||this.imgData,S=0;0<=l?S<l:S>l;0<=l?++S:--S)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((I=f-this.transparency.indexed.length)>0)for(M=0;0<=I?M<I:M>I;0<=I?++M:--M)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":_=(q=this.read(l)).indexOf(0),p=String.fromCharCode.apply(String,q.slice(0,_)),this.text[p]=String.fromCharCode.apply(String,q.slice(_+1));break;case"IEND":return N&&this.animation.frames.push(N),this.colors=function(){switch(this.colorType){case 0:case 3:case 4:return 1;case 2:case 6:return 3}}.call(this),this.hasAlphaChannel=(Z=this.colorType)===4||Z===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 Uint8Array
* @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 yu(i){var e=0;if(i[e++]!==71||i[e++]!==73||i[e++]!==70||i[e++]!==56||(i[e++]+1&253)!=56||i[e++]!==97)throw new Error("Invalid GIF 87a/89a header.");var n=i[e++]|i[e++]<<8,a=i[e++]|i[e++]<<8,u=i[e++],o=u>>7,l=1<<(7&u)+1;i[e++],i[e++];var h=null,f=null;o&&(h=e,f=l,e+=3*l);var g=!0,A=[],N=0,_=null,p=0,B=null;for(this.width=n,this.height=a;g&&e<i.length;)switch(i[e++]){case 33:switch(i[e++]){case 255:if(i[e]!==11||i[e+1]==78&&i[e+2]==69&&i[e+3]==84&&i[e+4]==83&&i[e+5]==67&&i[e+6]==65&&i[e+7]==80&&i[e+8]==69&&i[e+9]==50&&i[e+10]==46&&i[e+11]==48&&i[e+12]==3&&i[e+13]==1&&i[e+16]==0)e+=14,B=i[e++]|i[e++]<<8,e++;else for(e+=12;;){if(!((k=i[e++])>=0))throw Error("Invalid block size");if(k===0)break;e+=k}break;case 249:if(i[e++]!==4||i[e+4]!==0)throw new Error("Invalid graphics extension block.");var I=i[e++];N=i[e++]|i[e++]<<8,_=i[e++],(1&I)==0&&(_=null),p=I>>2&7,e++;break;case 254:for(;;){if(!((k=i[e++])>=0))throw Error("Invalid block size");if(k===0)break;e+=k}break;default:throw new Error("Unknown graphic control label: 0x"+i[e-1].toString(16))}break;case 44:var q=i[e++]|i[e++]<<8,S=i[e++]|i[e++]<<8,M=i[e++]|i[e++]<<8,Z=i[e++]|i[e++]<<8,st=i[e++],dt=st>>6&1,Nt=1<<(7&st)+1,rt=h,G=f,vt=!1;st>>7&&(vt=!0,rt=e,G=Nt,e+=3*Nt);var bt=e;for(e++;;){var k;if(!((k=i[e++])>=0))throw Error("Invalid block size");if(k===0)break;e+=k}A.push({x:q,y:S,width:M,height:Z,has_local_palette:vt,palette_offset:rt,palette_size:G,data_offset:bt,data_length:e-bt,transparent_index:_,interlaced:!!dt,delay:N,disposal:p});break;case 59:g=!1;break;default:throw new Error("Unknown gif block: 0x"+i[e-1].toString(16))}this.numFrames=function(){return A.length},this.loopCount=function(){return B},this.frameInfo=function(F){if(F<0||F>=A.length)throw new Error("Frame index out of range.");return A[F]},this.decodeAndBlitFrameBGRA=function(F,H){var R=this.frameInfo(F),ct=R.width*R.height,ot=new Uint8Array(ct);Ks(i,R.data_offset,ot,ct);var mt=R.palette_offset,tt=R.transparent_index;tt===null&&(tt=256);var pt=R.width,ft=n-pt,Et=pt,w=4*(R.y*n+R.x),j=4*((R.y+R.height)*n+R.x),E=w,W=4*ft;R.interlaced===!0&&(W+=4*n*7);for(var J=8,$=0,et=ot.length;$<et;++$){var Q=ot[$];if(Et===0&&(Et=pt,(E+=W)>=j&&(W=4*ft+4*n*(J-1),E=w+(pt+ft)*(J<<1),J>>=1)),Q===tt)E+=4;else{var At=i[mt+3*Q],Lt=i[mt+3*Q+1],Ot=i[mt+3*Q+2];H[E++]=Ot,H[E++]=Lt,H[E++]=At,H[E++]=255}--Et}},this.decodeAndBlitFrameRGBA=function(F,H){var R=this.frameInfo(F),ct=R.width*R.height,ot=new Uint8Array(ct);Ks(i,R.data_offset,ot,ct);var mt=R.palette_offset,tt=R.transparent_index;tt===null&&(tt=256);var pt=R.width,ft=n-pt,Et=pt,w=4*(R.y*n+R.x),j=4*((R.y+R.height)*n+R.x),E=w,W=4*ft;R.interlaced===!0&&(W+=4*n*7);for(var J=8,$=0,et=ot.length;$<et;++$){var Q=ot[$];if(Et===0&&(Et=pt,(E+=W)>=j&&(W=4*ft+4*n*(J-1),E=w+(pt+ft)*(J<<1),J>>=1)),Q===tt)E+=4;else{var At=i[mt+3*Q],Lt=i[mt+3*Q+1],Ot=i[mt+3*Q+2];H[E++]=At,H[E++]=Lt,H[E++]=Ot,H[E++]=255}--Et}}}function Ks(i,e,n,a){for(var u=i[e++],o=1<<u,l=o+1,h=l+1,f=u+1,g=(1<<f)-1,A=0,N=0,_=0,p=i[e++],B=new Int32Array(4096),I=null;;){for(;A<16&&p!==0;)N|=i[e++]<<A,A+=8,p===1?p=i[e++]:--p;if(A<f)break;var q=N&g;if(N>>=f,A-=f,q!==o){if(q===l)break;for(var S=q<h?q:I,M=0,Z=S;Z>o;)Z=B[Z]>>8,++M;var st=Z;if(_+M+(S!==q?1:0)>a)return void me.log("Warning, gif stream longer than expected.");n[_++]=st;var dt=_+=M;for(S!==q&&(n[_++]=st),Z=S;M--;)Z=B[Z],n[--dt]=255&Z,Z>>=8;I!==null&&h<4096&&(B[h++]=I<<8|st,h>=g+1&&f<12&&(++f,g=g<<1|1)),I=q}else h=l+1,g=(1<<(f=u+1))-1,I=null}return _!==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 Zo(i){var e,n,a,u,o,l=Math.floor,h=new Array(64),f=new Array(64),g=new Array(64),A=new Array(64),N=new Array(65535),_=new Array(65535),p=new Array(64),B=new Array(64),I=[],q=0,S=7,M=new Array(64),Z=new Array(64),st=new Array(64),dt=new Array(256),Nt=new Array(2048),rt=[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],G=[0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0],vt=[0,1,2,3,4,5,6,7,8,9,10,11],bt=[0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,125],k=[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],F=[0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0],H=[0,1,2,3,4,5,6,7,8,9,10,11],R=[0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,119],ct=[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 ot(w,j){for(var E=0,W=0,J=new Array,$=1;$<=16;$++){for(var et=1;et<=w[$];et++)J[j[W]]=[],J[j[W]][0]=E,J[j[W]][1]=$,W++,E++;E*=2}return J}function mt(w){for(var j=w[0],E=w[1]-1;E>=0;)j&1<<E&&(q|=1<<S),E--,--S<0&&(q==255?(tt(255),tt(0)):tt(q),S=7,q=0)}function tt(w){I.push(w)}function pt(w){tt(w>>8&255),tt(255&w)}function ft(w,j,E,W,J){for(var $,et=J[0],Q=J[240],At=function(wt,xt){var kt,Pt,qt,Gt,Qt,te,ie,fe,Ht,ee,Ft=0;for(Ht=0;Ht<8;++Ht){kt=wt[Ft],Pt=wt[Ft+1],qt=wt[Ft+2],Gt=wt[Ft+3],Qt=wt[Ft+4],te=wt[Ft+5],ie=wt[Ft+6];var Ge=kt+(fe=wt[Ft+7]),oe=kt-fe,An=Pt+ie,pe=Pt-ie,we=qt+te,qn=qt-te,ce=Gt+Qt,_r=Gt-Qt,Ne=Ge+ce,xn=Ge-ce,Kn=An+we,Ae=An-we;wt[Ft]=Ne+Kn,wt[Ft+4]=Ne-Kn;var Jt=.707106781*(Ae+xn);wt[Ft+2]=xn+Jt,wt[Ft+6]=xn-Jt;var ue=.382683433*((Ne=_r+qn)-(Ae=pe+oe)),Pr=.5411961*Ne+ue,He=1.306562965*Ae+ue,Dn=.707106781*(Kn=qn+pe),Rn=oe+Dn,zt=oe-Dn;wt[Ft+5]=zt+Pr,wt[Ft+3]=zt-Pr,wt[Ft+1]=Rn+He,wt[Ft+7]=Rn-He,Ft+=8}for(Ft=0,Ht=0;Ht<8;++Ht){kt=wt[Ft],Pt=wt[Ft+8],qt=wt[Ft+16],Gt=wt[Ft+24],Qt=wt[Ft+32],te=wt[Ft+40],ie=wt[Ft+48];var Sn=kt+(fe=wt[Ft+56]),Tn=kt-fe,nn=Pt+ie,qe=Pt-ie,Oe=qt+te,ln=qt-te,Gr=Gt+Qt,Zn=Gt-Qt,_n=Sn+Gr,Pn=Sn-Gr,kn=nn+Oe,zn=nn-Oe;wt[Ft]=_n+kn,wt[Ft+32]=_n-kn;var gn=.707106781*(zn+Pn);wt[Ft+16]=Pn+gn,wt[Ft+48]=Pn-gn;var Un=.382683433*((_n=Zn+ln)-(zn=qe+Tn)),kr=.5411961*_n+Un,Jr=1.306562965*zn+Un,Yr=.707106781*(kn=ln+qe),Xr=Tn+Yr,Kr=Tn-Yr;wt[Ft+40]=Kr+kr,wt[Ft+24]=Kr-kr,wt[Ft+8]=Xr+Jr,wt[Ft+56]=Xr-Jr,Ft++}for(Ht=0;Ht<64;++Ht)ee=wt[Ht]*xt[Ht],p[Ht]=ee>0?ee+.5|0:ee-.5|0;return p}(w,j),Lt=0;Lt<64;++Lt)B[rt[Lt]]=At[Lt];var Ot=B[0]-E;E=B[0],Ot==0?mt(W[0]):(mt(W[_[$=32767+Ot]]),mt(N[$]));for(var jt=63;jt>0&&B[jt]==0;)jt--;if(jt==0)return mt(et),E;for(var Wt,at=1;at<=jt;){for(var O=at;B[at]==0&&at<=jt;)++at;var Kt=at-O;if(Kt>=16){Wt=Kt>>4;for(var Mt=1;Mt<=Wt;++Mt)mt(Q);Kt&=15}$=32767+B[at],mt(J[(Kt<<4)+_[$]]),mt(N[$]),at++}return jt!=63&&mt(et),E}function Et(w){w=Math.min(Math.max(w,1),100),o!=w&&(function(j){for(var E=[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],W=0;W<64;W++){var J=l((E[W]*j+50)/100);J=Math.min(Math.max(J,1),255),h[rt[W]]=J}for(var $=
* @license
* Copyright (c) 2017 Aras Abbasi
*
* Licensed under the MIT License.
* http://opensource.org/licenses/mit-license
*/function Bn(i,e){if(this.pos=0,this.buffer=i,this.datav=new DataView(i.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 Zs(i){function e(G){if(!G)throw Error("assert :P")}function n(G,vt,bt){for(var k=0;4>k;k++)if(G[vt+k]!=bt.charCodeAt(k))return!0;return!1}function a(G,vt,bt,k,F){for(var H=0;H<F;H++)G[vt+H]=bt[k+H]}function u(G,vt,bt,k){for(var F=0;F<k;F++)G[vt+F]=bt}function o(G){return new Int32Array(G)}function l(G,vt){for(var bt=[],k=0;k<G;k++)bt.push(new vt);return bt}function h(G,vt){var bt=[];return function k(F,H,R){for(var ct=R[H],ot=0;ot<ct&&(F.push(R.length>H+1?[]:new vt),!(R.length<H+1));ot++)k(F[ot],H+1,R)}(bt,0,G),bt}var f=function(){var G=this;function vt(t,r){for(var c=1<<r-1>>>0;t&c;)c>>>=1;return c?(t&c-1)+c:t}function bt(t,r,c,d,m){e(!(d%c));do t[r+(d-=c)]=m;while(0<d)}function k(t,r,c,d,m){if(e(2328>=m),512>=m)var b=o(512);else if((b=o(m))==null)return 0;return function(y,L,x,P,T,X){var K,V,ht=L,nt=1<<x,z=o(16),U=o(16);for(e(T!=0),e(P!=null),e(y!=null),e(0<x),V=0;V<T;++V){if(15<P[V])return 0;++z[P[V]]}if(z[0]==T)return 0;for(U[1]=0,K=1;15>K;++K){if(z[K]>1<<K)return 0;U[K+1]=U[K]+z[K]}for(V=0;V<T;++V)K=P[V],0<P[V]&&(X[U[K]++]=V);if(U[15]==1)return(P=new F).g=0,P.value=X[0],bt(y,ht,1,nt,P),nt;var ut,gt=-1,lt=nt-1,Ct=0,St=1,Rt=1,_t=1<<x;for(V=0,K=1,T=2;K<=x;++K,T<<=1){if(St+=Rt<<=1,0>(Rt-=z[K]))return 0;for(;0<z[K];--z[K])(P=new F).g=K,P.value=X[V++],bt(y,ht+Ct,T,_t,P),Ct=vt(Ct,K)}for(K=x+1,T=2;15>=K;++K,T<<=1){if(St+=Rt<<=1,0>(Rt-=z[K]))return 0;for(;0<z[K];--z[K]){if(P=new F,(Ct&lt)!=gt){for(ht+=_t,ut=1<<(gt=K)-x;15>gt&&!(0>=(ut-=z[gt]));)++gt,ut<<=1;nt+=_t=1<<(ut=gt-x),y[L+(gt=Ct&lt)].g=ut+x,y[L+gt].value=ht-L-gt}P.g=K-x,P.value=X[V++],bt(y,ht+(Ct>>x),T,_t,P),Ct=vt(Ct,K)}}return St!=2*U[15]-1?0:nt}(t,r,c,d,m,b)}function F(){this.value=this.g=0}function H(){this.value=this.g=0}function R(){this.G=l(5,F),this.H=o(5),this.jc=this.Qb=this.qb=this.nd=0,this.pd=l(We,H)}function ct(t,r,c,d){e(t!=null),e(r!=null),e(2147483648>d),t.Ca=254,t.I=0,t.b=-8,t.Ka=0,t.oa=r,t.pa=c,t.Jd=r,t.Yc=c+d,t.Zc=4<=d?c+d-4+1:c,$(t)}function ot(t,r){for(var c=0;0<r--;)c|=Q(t,128)<<r;return c}function mt(t,r){var c=ot(t,r);return et(t)?-c:c}function tt(t,r,c,d){var m,b=0;for(e(t!=null),e(r!=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)b+=r[c+m]<<8*m;t.Ra=b,t.bb=d,t.oa=r,t.pa=c}function pt(t){for(;8<=t.u&&t.bb<t.Sb;)t.Ra>>>=8,t.Ra+=t.oa[t.pa+t.bb]<<hi-8>>>0,++t.bb,t.u-=8;E(t)&&(t.h=1,t.u=0)}function ft(t,r){if(e(0<=r),!t.h&&r<=li){var c=j(t)&ui[r];return t.u+=r,pt(t),c}return t.h=1,t.u=0}function Et(){this.b=this.Ca=this.I=0,this.oa=[],this.pa=0,this.Jd=[],this.Yc=0,this.Zc=[],this.Ka=0}function w(){this.Ra=0,this.oa=[],this.h=this.u=this.bb=this.Sb=this.pa=0}function j(t){return t.Ra>>>(t.u&hi-1)>>>0}function E(t){return e(t.bb<=t.Sb),t.h||t.bb==t.Sb&&t.u>hi}function W(t,r){t.u=r,t.h=E(t)}function J(t){t.u>=Hi&&(e(t.u>=Hi),pt(t))}function $(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 ot(t,1)}function Q(t,r){var c=t.Ca;0>t.b&&$(t);var d=t.b,m=c*r>>>8,b=(t.I>>>d>m)+0;for(b?(c-=m,t.I-=m+1<<d>>>0):c=m+1,d=c,m=0;256<=d;)m+=8,d>>=8;return d=7^m+an[d],t.b-=d,t.Ca=(c<<d)-1,b}function At(t,r,c){t[r+0]=c>>24&255,t[r+1]=c>>16&255,t[r+2]=c>>8&255,t[r+3]=c>>0&255}function Lt(t,r){return t[r+0]<<0|t[r+1]<<8}function Ot(t,r){return Lt(t,r)|t[r+2]<<16}function jt(t,r){return Lt(t,r)|Lt(t,r+2)<<16}function Wt(t,r){var c=1<<r;return e(t!=null),e(0<r),t.X=o(c),t.X==null?0:(t.Mb=32-r,t.Xa=r,1)}function at(t,r){e(t!=null),e(r!=null),e(t.Xa==r.Xa),a(r.X,0,t.X,0,1<<r.Xa)}function O(){this.X=[],this.Xa=this.Mb=0}function Kt(t,r,c,d){e(c!=null),e(d!=null);var m=c[0],b=d[0];return m==0&&(m=(t*b+r/2)/r),b==0&&(b=(r*m+t/2)/t),0>=m||0>=b?0:(c[0]=m,d[0
`:"")+dt})):M.push(st[0])}),I=M,f=Js.apply(this,[S,n])}for(o=0,l=I.length;o<l;o++){var Z=0;if(a=I[o],f&&a[0]==`
2024-11-08 17:23:40 +08:00
`&&(a=a.substr(1),Z=1),_+p+(B=(u=to.apply(this,[a,n])).reduce(function(st,dt){return st+dt},0))>e||Z){if(B>e){for(h=Ys.apply(this,[a,u,e-(_+p),e]),A.push(h.shift()),A=[h.pop()];h.length;)N.push([h.shift()]);B=u.slice(a.length-(A[0]?A[0].length:0)).reduce(function(st,dt){return st+dt},0)}else A=[a];N.push(A),_=B+f,p=q}else A.push(a),_+=p+B,p=q}return g=f?function(st,dt){return(dt?S:"")+st.join(" ")}:function(st){return st.join(" ")},N.map(g)},Ni.splitTextToSize=function(i,e,n){var a,u=(n=n||{}).fontSize||this.internal.getFontSize(),o=function(A){if(A.widths&&A.kerning)return{widths:A.widths,kerning:A.kerning};var N=this.internal.getFont(A.fontName,A.fontStyle);return N.metadata.Unicode?{widths:N.metadata.Unicode.widths||{0:1},kerning:N.metadata.Unicode.kerning||{}}:{font:N.metadata,fontSize:this.internal.getFontSize(),charSpace:this.internal.getCharSpace()}}.call(this,n);a=Array.isArray(i)?i:String(i).split(/\r?\n/);var l=1*this.internal.scaleFactor*e/u;o.textIndent=n.textIndent?1*n.textIndent*this.internal.scaleFactor/u:0,o.lineIndent=n.lineIndent;var h,f,g=[];for(h=0,f=a.length;h<f;h++)g=g.concat(Xs.apply(this,[a[h],l,o]));return g},function(i){i.__fontmetrics__=i.__fontmetrics__||{};for(var e="klmnopqrstuvwxyz",n={},a={},u=0;u<e.length;u++)n[e[u]]="0123456789abcdef"[u],a["0123456789abcdef"[u]]=e[u];var o=function(N){return"0x"+parseInt(N,10).toString(16)},l=i.__fontmetrics__.compress=function(N){var _,p,B,I,q=["{"];for(var S in N){if(_=N[S],isNaN(parseInt(S,10))?p="'"+S+"'":(S=parseInt(S,10),p=(p=o(S).slice(2)).slice(0,-1)+a[p.slice(-1)]),typeof _=="number")_<0?(B=o(_).slice(3),I="-"):(B=o(_).slice(2),I=""),B=I+B.slice(0,-1)+a[B.slice(-1)];else{if(ve(_)!=="object")throw new Error("Don't know what to do with value type "+ve(_)+".");B=l(_)}q.push(p+B)}return q.push("}"),q.join("")},h=i.__fontmetrics__.uncompress=function(N){if(typeof N!="string")throw new Error("Invalid argument passed to uncompress.");for(var _,p,B,I,q={},S=1,M=q,Z=[],st="",dt="",Nt=N.length-1,rt=1;rt<Nt;rt+=1)(I=N[rt])=="'"?_?(B=_.join(""),_=void 0):_=[]:_?_.push(I):I=="{"?(Z.push([M,B]),M={},B=void 0):I=="}"?((p=Z.pop())[0][p[1]]=M,B=void 0,M=p[0]):I=="-"?S=-1:B===void 0?n.hasOwnProperty(I)?(st+=n[I],B=parseInt(st,16)*S,S=1,st=""):st+=I:n.hasOwnProperty(I)?(dt+=n[I],M[B]=parseInt(dt,16)*S,S=1,B=void 0,dt=""):dt+=I;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}},A={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{4qu5kt5qt5rs17ss5ts
2024-11-08 12:27:11 +08:00
<<
`+I.join(`
`)+`
>>`)}),this.internal.viewerpreferences.isSubscribed=!0),this.internal.viewerpreferences.configuration=n,this},function(i){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>',u=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+u.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(u+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")};i.addMetadata=function(a,u){return this.internal.__metadata__===void 0&&(this.internal.__metadata__={metadata:a,namespaceuri:u||"http://jspdf.default.namespaceuri/"},this.internal.events.subscribe("putCatalog",n),this.internal.events.subscribe("postPutResources",e)),this}}(Tt.API),function(i){var e=i.API,n=e.pdfEscape16=function(o,l){for(var h,f=l.metadata.Unicode.widths,g=["","0","00","000","0000"],A=[""],N=0,_=o.length;N<_;++N){if(h=l.metadata.characterToGlyph(o.charCodeAt(N)),l.metadata.glyIdsUsed.push(h),l.metadata.toUnicode[h]=o.charCodeAt(N),f.indexOf(h)==-1&&(f.push(h),f.push([parseInt(l.metadata.widthOfGlyph(h),10)])),h=="0")return A.join("");h=h.toString(16),A.push(g[4-h.length],h)}return A.join("")},a=function(o){var l,h,f,g,A,N,_;for(A=`/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=[],N=0,_=(h=Object.keys(o).sort(function(p,B){return p-B})).length;N<_;N++)l=h[N],f.length>=100&&(A+=`
`+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&&(A+=`
`+f.length+` beginbfchar
`+f.join(`
`)+`
endbfchar
`),A+=`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,A=l.putStream;if(h.metadata instanceof i.API.TTFFont&&h.encoding==="Identity-H"){for(var N=h.metadata.Unicode.widths,_=h.metadata.subset.encode(h.metadata.glyIdsUsed,1),p="",B=0;B<_.length;B++)p+=String.fromCharCode(_[B]);var I=g();A({data:p,addLength1:!0,objectId:I}),f("endobj");var q=g();A({data:a(h.metadata.toUnicode),addLength1:!0,objectId:q}),f("endobj");var S=g();f("<<"),f("/Type /FontDescriptor"),f("/FontName /"+xi(h.fontName)),f("/FontFile2 "+I+" 0 R"),f("/FontBBox "+i.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 M=g();f("<<"),f("/Type /Font"),f("/BaseFont /"+xi(h.fontName)),f("/FontDescriptor "+S+" 0 R"),f("/W "+i.API.PDFObject.convert(N)),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 /"+xi(h.fontName)),f("/Encoding /"+h.encoding),f("/DescendantFonts ["+M+" 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,A=l.putStream;if(h.metadata instanceof i.API.TTFFont&&h.encoding==="WinAnsiEncoding"){for(var N=h.metadata.rawData,_="",p=0;p<N.length;p++)_+=String.fromCharCode(N[p]);var B=g();A({data:_,addLength1:!0,objectId:B}),f("endobj");var I=g();A({data:a(h.metadata.toUnicode),addLength1:!0,objectId:I}),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 "+B+" 0 R"),f("/Flags 96"),f("/FontBBox "+i.API.PDFObject.convert(h.metadata.bbox)),f("/FontName /"+xi(h.fontName)),f("/ItalicAngle "+h.metadata.italicAngle),f("/Ascent "+h.metadata.ascender),f(">>"),f("endobj"),h.objectNumber=g();for(var S=0;S<h.metadata.hmtx.widths.length;S++)h.metadata.hmtx.widths[S]=parseInt(h.metadata.hmtx.widths[S]*(1e3/h.metadata.head.unitsPerEm));f("<</Subtype/TrueType/Type/Font/ToUnicode "+I+" 0 R/BaseFont/"+xi(h.fontName)+"/FontDescriptor "+q+" 0 R/Encoding/"+h.encoding+" /FirstChar 29 /LastChar 255 /Widths "+i.API.PDFObject.convert(h.metadata.hmtx.widths)+">>"),f("endobj"),h.isAlreadyPutted=!0}})(o)}]);var u=function(o){var l,h=o.text||"",f=o.x,g=o.y,A=o.options||{},N=o.mutex||{},_=N.pdfEscape,p=N.activeFontKey,B=N.fonts,I=p,q="",S=0,M="",Z=B[I].encoding;if(B[I].encoding!=="Identity-H")return{text:h,x:f,y:g,options:A,mutex:N};for(M=h,I=p,Array.isArray(h)&&(M=h[0]),S=0;S<M.length;S+=1)B[I].metadata.hasOwnProperty("cmap")&&(l=B[I].metadata.cmap.unicode.codeMap[M[S].charCodeAt(0)]),l||M[S].charCodeAt(0)<256&&B[I].metadata.hasOwnProperty("Unicode")?q+=M[S]:q+="";var st="";return parseInt(I.slice(1))<14||Z==="WinAnsiEncoding"?st=_(q,I).split("").map(function(dt){return dt.charCodeAt(0).toString(16)}).join(""):Z==="Identity-H"&&(st=n(q,B[I])),N.isHex=!0,{text:st,x:f,y:g,options:A,mutex:N}};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([u(Object.assign({},f,{text:l[g][0]})).text,l[g][1],l[g][2]]):h.push(u(Object.assign({},f,{text:l[g]})).text);o.text=h}else o.text=u(Object.assign({},f,{text:l})).text}])}(Tt),function(i){var e=function(){return this.internal.vFS===void 0&&(this.internal.vFS={}),!0};i.existsFileInVFS=function(n){return e.call(this),this.internal.vFS[n]!==void 0},i.addFileToVFS=function(n,a){return e.call(this),this.internal.vFS[n]=a,this},i.getFileFromVFS=function(n){return e.call(this),this.internal.vFS[n]!==void 0?this.internal.vFS[n]:null}}(Tt.API),function(i){i.__bidiEngine__=i.proto
`)}return""+n},e}();const Mu=Object.freeze(Object.defineProperty({__proto__:null,default:Tt,AcroForm:fu,AcroFormAppearance:Bt,AcroFormButton:Re,AcroFormCheckBox:ia,AcroFormChoiceField:zr,AcroFormComboBox:Hr,AcroFormEditBox:na,AcroFormListBox:Ur,AcroFormPasswordField:aa,AcroFormPushButton:ra,AcroFormRadioButton:Wr,AcroFormTextField:xr,GState:oa,ShadingPattern:Nr,TilingPattern:Tr,jsPDF:Tt},Symbol.toStringTag,{value:"Module"})),Du=Yc(Mu);export{Qo as _,Du as r};