248 lines
670 KiB
JavaScript
248 lines
670 KiB
JavaScript
|
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./admin-DgPvPHD7.js","./admin-Bbyck9zg.css","./index.es-C5pQJbT7.js","./defineProperty-DbXIQDXj.js","./typeof-QjJsDpFa.js"])))=>i.map(i=>d[i]);
|
|||
|
|
var z1=Object.defineProperty;var bh=t=>{throw TypeError(t)};var X1=(t,A,e)=>A in t?z1(t,A,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[A]=e;var YA=(t,A,e)=>X1(t,typeof A!="symbol"?A+"":A,e),J1=(t,A,e)=>A.has(t)||bh("Cannot "+e);var yh=(t,A,e)=>A.has(t)?bh("Cannot add the same private member more than once"):A instanceof WeakSet?A.add(t):A.set(t,e);var Io=(t,A,e)=>(J1(t,A,"access private method"),e);import{_ as Y1,u as $1,a as Z1}from"./index-D2yV7fvo.js";import{ay as wr,aO as cn,aE as te,aF as De,cq as ff,b2 as Ce,aB as ZA,aD as DA,aG as EA,aH as FA,aI as xA,aS as Gr,aK as Ut,aJ as ae,da as Pt,aA as mi,b7 as Kl,aW as ut,c$ as hf,b8 as Ar,bc as On,cg as Tn,b1 as _t,aX as AB,aY as eB,cF as tB,cf as $i,az as Ks,aQ as df,ba as Gl,cx as hi,bd as yl,aU as Jg,aC as wt,b6 as gf,eH as Pn,bD as Gi,b3 as rB,c0 as nB,ce as pf,eI as So,cs as Tc,aV as iB,eJ as aB,eK as sB,eL as oB,eM as lB,eN as cB,eO as uB,aZ as Fh,ct as fB,bF as hB}from"./admin-DgPvPHD7.js";import{_ as Yg}from"./ResetPassword.vue_vue_type_script_setup_true_lang-Bwq0Pu2j.js";import{_ as dB}from"./500-CPkRZzc6.js";import{_ as je}from"./typeof-QjJsDpFa.js";import{C as gB}from"./index-DDzHjusB.js";import"./index-s2VnG6qr.js";const pB=Object.freeze(Object.defineProperty({__proto__:null,get default(){return YQ}},Symbol.toStringTag,{value:"Module"}));function Qh(t,A){(A==null||A>t.length)&&(A=t.length);for(var e=0,r=Array(A);e<A;e++)r[e]=t[e];return r}function BB(t,A){if(t){if(typeof t=="string")return Qh(t,A);var e={}.toString.call(t).slice(8,-1);return e==="Object"&&t.constructor&&(e=t.constructor.name),e==="Map"||e==="Set"?Array.from(t):e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?Qh(t,A):void 0}}const wB=Object.freeze(Object.defineProperty({__proto__:null,default:Y1},Symbol.toStringTag,{value:"Module"})),mB=wr({__name:"index",props:{modelValue:{type:Boolean},application_profile:{},auth_type:{default:"password"},style:{default:{}}},emits:["update:modelValue"],setup(t,{emit:A}){const e=Object.assign({"/src/views/chat/auth/component/password.vue":wB}),r=A,n=t,i=cn({get:()=>n.modelValue,set:a=>{r("update:modelValue",a)}});return(a,s)=>(te(),De(ff(Ce(e)[`/src/views/chat/auth/component/${t.auth_type}.vue`].default),{modelValue:i.value,"onUpdate:modelValue":s[0]||(s[0]=l=>i.value=l),applicationProfile:t.application_profile},null,8,["modelValue","applicationProfile"]))}}),vB=Object.freeze(Object.defineProperty({__proto__:null,default:mB},Symbol.toStringTag,{value:"Module"})),CB={class:"dialog-footer"},bB=wr({__name:"EditTitleDialog",emits:["refresh"],setup(t,{expose:A,emit:e}){const r=e,n=ZA(),i=ZA(!1),a=ZA(""),s=ZA(""),l=ZA({abstract:""}),u=ZA(!1),f=(B,d)=>{a.value=d,s.value=B.id,l.value.abstract=B.abstract,u.value=!0},p=async B=>{B&&await B.validate(d=>{d&&Pt.modifyChat(s.value,l.value,i).then(()=>{r("refresh",s.value,l.value.abstract),u.value=!1})})};return A({open:f,close}),(B,d)=>{const m=DA("el-input"),C=DA("el-form-item"),E=DA("el-form"),v=DA("el-button"),H=DA("el-dialog");return te(),De(H,{class:"responsive-dialog",title:B.$t("chat.editTitle"),modelValue:u.value,"onUpdate:modelValue":d[4]||(d[4]=R=>u.value=R),"close-on-click-modal":!1,"close-on-press-escape":!1,"destroy-on-close":!0,"append-to-body":""},{footer:EA(()=>[xA("span",CB,[FA(v,{onClick:d[2]||(d[2]=Gr(R=>u.value=!1,["prevent"]))},{default:EA(()=>[Ut(ae(B.$t("common.cancel")),1)]),_:1}),FA(v,{type:"primary",onClick:d[3]||(d[3]=R=>p(n.value)),loading:i.value},{default:EA(()=>[Ut(ae(B.$t("common.save")),1)]),_:1},8,["loading"])])]),default:EA(()=>[FA(E,{"label-position":"top",ref_key:"fieldFormRef",ref:n,model:l.value,"require-asterisk-position":"right"},{default:EA(()=>[FA(C,{prop:"abstract",rules:[{required:!0,message:B.$t("common.inputPlaceholder"),trigger:"blur"}]},{default:EA(()=>[FA(m,{modelValue:l.value.abstract,"onUpdate:modelValue":d[0]||(d[0]=R=>l.value.abstract=R),maxlength:"1024","show-word-limit":"",type:"textarea",onBlur:d[1]||(d[1]=R=>l.value.abstract=l.value.abstract.trim())},null,8,["modelValue"])]),_:1},8,["rules"])]),_:1},8,["model"])]),_:1},8,["title","modelV
|
|||
|
|
`).map(n=>{const i=n.match(/^\s+/);if(i===null)return n;const[a]=i;return a.length>=r.length?n.slice(r.length):n}).join(`
|
|||
|
|
`)}class Fl{constructor(A){YA(this,"options");YA(this,"rules");YA(this,"lexer");this.options=A||Zi}space(A){const e=this.rules.block.newline.exec(A);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(A){const e=this.rules.block.code.exec(A);if(e){const r=e[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?r:Ho(r,`
|
|||
|
|
`)}}}fences(A){const e=this.rules.block.fences.exec(A);if(e){const r=e[0],n=M2(r,e[3]||"");return{type:"code",raw:r,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:n}}}heading(A){const e=this.rules.block.heading.exec(A);if(e){let r=e[2].trim();if(/#$/.test(r)){const n=Ho(r,"#");(this.options.pedantic||!n||/ $/.test(n))&&(r=n.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:r,tokens:this.lexer.inline(r)}}}hr(A){const e=this.rules.block.hr.exec(A);if(e)return{type:"hr",raw:e[0]}}blockquote(A){const e=this.rules.block.blockquote.exec(A);if(e){let r=e[0].replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,`
|
|||
|
|
$1`);r=Ho(r.replace(/^ *>[ \t]?/gm,""),`
|
|||
|
|
`);const n=this.lexer.state.top;this.lexer.state.top=!0;const i=this.lexer.blockTokens(r);return this.lexer.state.top=n,{type:"blockquote",raw:e[0],tokens:i,text:r}}}list(A){let e=this.rules.block.list.exec(A);if(e){let r=e[1].trim();const n=r.length>1,i={type:"list",raw:"",ordered:n,start:n?+r.slice(0,-1):"",loose:!1,items:[]};r=n?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=n?r:"[*+-]");const a=new RegExp(`^( {0,3}${r})((?:[ ][^\\n]*)?(?:\\n|$))`);let s="",l="",u=!1;for(;A;){let f=!1;if(!(e=a.exec(A))||this.rules.block.hr.test(A))break;s=e[0],A=A.substring(s.length);let p=e[2].split(`
|
|||
|
|
`,1)[0].replace(/^\t+/,v=>" ".repeat(3*v.length)),B=A.split(`
|
|||
|
|
`,1)[0],d=0;this.options.pedantic?(d=2,l=p.trimStart()):(d=e[2].search(/[^ ]/),d=d>4?1:d,l=p.slice(d),d+=e[1].length);let m=!1;if(!p&&/^ *$/.test(B)&&(s+=B+`
|
|||
|
|
`,A=A.substring(B.length+1),f=!0),!f){const v=new RegExp(`^ {0,${Math.min(3,d-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),H=new RegExp(`^ {0,${Math.min(3,d-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),R=new RegExp(`^ {0,${Math.min(3,d-1)}}(?:\`\`\`|~~~)`),k=new RegExp(`^ {0,${Math.min(3,d-1)}}#`);for(;A;){const j=A.split(`
|
|||
|
|
`,1)[0];if(B=j,this.options.pedantic&&(B=B.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),R.test(B)||k.test(B)||v.test(B)||H.test(A))break;if(B.search(/[^ ]/)>=d||!B.trim())l+=`
|
|||
|
|
`+B.slice(d);else{if(m||p.search(/[^ ]/)>=4||R.test(p)||k.test(p)||H.test(p))break;l+=`
|
|||
|
|
`+B}!m&&!B.trim()&&(m=!0),s+=j+`
|
|||
|
|
`,A=A.substring(j.length+1),p=B.slice(d)}}i.loose||(u?i.loose=!0:/\n *\n *$/.test(s)&&(u=!0));let C=null,E;this.options.gfm&&(C=/^\[[ xX]\] /.exec(l),C&&(E=C[0]!=="[ ] ",l=l.replace(/^\[[ xX]\] +/,""))),i.items.push({type:"list_item",raw:s,task:!!C,checked:E,loose:!1,text:l,tokens:[]}),i.raw+=s}i.items[i.items.length-1].raw=s.trimEnd(),i.items[i.items.length-1].text=l.trimEnd(),i.raw=i.raw.trimEnd();for(let f=0;f<i.items.length;f++)if(this.lexer.state.top=!1,i.items[f].tokens=this.lexer.blockTokens(i.items[f].text,[]),!i.loose){const p=i.items[f].tokens.filter(d=>d.type==="space"),B=p.length>0&&p.some(d=>/\n.*\n/.test(d.raw));i.loose=B}if(i.loose)for(let f=0;f<i.items.length;f++)i.items[f].loose=!0;return i}}html(A){const e=this.rules.block.html.exec(A);if(e)return{type:"html",block:!0,raw:e[0],pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:e[0]}}def(A){const e=this.rules.block.def.exec(A);if(e){const r=e[1].toLowerCase().replace(/\s+/g," "),n=e[2]?e[2].replace(/^<(.*)>$/,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",i=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:r,raw:e[0],href:n,title:i}}}table(A){const e=this.rules.block.table.exec(A);if(!e||!/[:|]/.test(e[2]))return;const r=Eh(e[1]),n=e[2].replace(/^\||\| *$/g,"").split("|"),i=e[3]&&e[3].trim()?e[3].replace(/\n[ \t]*$/,"").split(`
|
|||
|
|
`):[],a={type:"table",raw:e[0],header:[],align:[],rows:[]};if(r.length===n.length){for(const s of n)/^ *-+: *$/.test(s)?a.align.push("right"):/^ *:-+: *$/.test(s)?a.align.push("center"):/^ *:-+ *$/.test(s)?a.align.push("left"):a.align.push(null);for(const s of r)a.header.push({text:s,tokens:this.lexer.inline(s)});for(const s of i)a.rows.push(Eh(s,a.header.length).map(l=>({text:l,tokens:this.lexer.inline(l)})));return a}}lheading(A){const e=this.rules.block.lheading.exec(A);if(e)return{type:"heading",raw:e[0],depth:e[2].charAt(0)==="="?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(A){const e=this.rules.block.paragraph.exec(A);if(e){const r=e[1].charAt(e[1].length-1)===`
|
|||
|
|
`?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:r,tokens:this.lexer.inline(r)}}}text(A){const e=this.rules.block.text.exec(A);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(A){const e=this.rules.inline.escape.exec(A);if(e)return{type:"escape",raw:e[0],text:pr(e[1])}}tag(A){const e=this.rules.inline.tag.exec(A);if(e)return!this.lexer.state.inLink&&/^<a /i.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(A){const e=this.rules.inline.link.exec(A);if(e){const r=e[2].trim();if(!this.options.pedantic&&/^</.test(r)){if(!/>$/.test(r))return;const a=Ho(r.slice(0,-1),"\\");if((r.length-a.length)%2===0)return}else{const a=R2(e[2],"()");if(a>-1){const l=(e[0].indexOf("!")===0?5:4)+e[1].length+a;e[2]=e[2].substring(0,a),e[0]=e[0].substring(0,l).trim(),e[3]=""}}let n=e[2],i="";if(this.options.pedantic){const a=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(n);a&&(n=a[1],i=a[3])}else i=e[3]?e[3].slice(1,-1):"";return n=n.trim(),/^</.test(n)&&(this.options.pedantic&&!/>$/.test(r)?n=n.slice(1):n=n.slice(1,-1)),Lh(e,{href:n&&n.replace(this.rules.inline.anyPunctuation,"$1"),title:i&&i.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer)}}reflink(A,e){let r;if((r=this.rules.inline.reflink.exec(A))||(r=this.rules.inline.nolink.exec(A))){const n=(r[2]||r[1]).replace(/\s+/g," "),i=e[n.toLowerCase()];if(!i){const a=r[0].charAt(0);return{type:"text",raw:a,text:a}}return Lh(r,i,r[0],this.lexer)}}emStrong(A,e,r=""){let n=this.rules.inline.emStrongLDelim.exec(A);if(!n||n[3]&&r.match(/[\p{L}\p{N}]/u))return;if(!(n[1]||n[2]||"")||!r||this.rules.inline.punctuation.exec(r)){const a=[...n[0]].length-1;let s,l,u=a,f=0;const p=n[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(p.lastIndex=0,e=e.slice(-1*A.length+a);(n=p.exec(e))!=null;){if(s=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!s)continue;if(l=[...s].length,n[3]||n[4]){u+=l;continue}else if((n[5]||n[6])&&a%3&&!((a+l)%3)){f+=l;continue}if(u-=l,u>0)continue;l=Math.min(l,l+u+f);const B=[...n[0]][0].length,d=A.slice(0,a+n.index+B+l);if(Math.min(a,l)%2){const C=d.slice(1,-1);return{type:"em",raw:d,text:C,tokens:this.lexer.inlineTokens(C)}}const m=d.slice(2,-2);return{type:"strong",raw:d,text:m,tokens:this.lexer.inlineTokens(m)}}}}codespan(A){const e=this.rules.inline.code.exec(A);if(e){let r=e[2].replace(/\n/g," ");const n=/[^ ]/.test(r),i=/^ /.test(r)&&/ $/.test(r);return n&&i&&(r=r.substring(1,r.length-1)),r=pr(r,!0),{type:"codespan",raw:e[0],text:r}}}br(A){const e=this.rules.inline.br.exec(A);if(e)return{type:"br",raw:e[0]}}del(A){const e=this.rules.inline.del.exec(A);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(A){const e=this.rules.inline.autolink.exec(A);if(e){let r,n;return e[2]==="@"?(r=pr(e[1]),n="mailto:"+r):(r=pr(e[1]),n=r),{type:"link",raw:e[0],text:r,href:n,tokens:[{type:"text",raw:r,text:r}]}}}url(A){var r;let e;if(e=this.rules.inline.url.exec(A)){let n,i;if(e[2]==="@")n=pr(e[0]),i="mailto:"+n;else{let a;do a=e[0],e[0]=((r=this.rules.inline._backpedal.exec(e[0]))==null?void 0:r[0])??"";while(a!==e[0]);n=pr(e[0]),e[1]==="www."?i="http://"+e[0]:i=e[0]}return{type:"link",raw:e[0],text:n,href:i,tokens:[{type:"text",raw:n,text:n}]}}}inlineText(A){const e=this.rules.inline.text.exec(A);if(e){let r;return this.lexer.state.inRawBlock?r=e[0]:r=pr(e[0]),{type:"text",raw:e[0],text:r}}}}const K2=/^(?: *(?:\n|$))+/,G2=/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,V2=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Gs=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,j2=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,ep=/(?:[*+
|
|||
|
|
]`).replace("lheading",tp).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},np=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Z2=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,ip=/^( {2,}|\\)\n(?!\s*$)/,Aw=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Vs="\\p{P}\\p{S}",ew=Re(/^((?![*_])[\spunctuation])/,"u").replace(/punctuation/g,Vs).getRegex(),tw=/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g,rw=Re(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,Vs).getRegex(),nw=Re("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,Vs).getRegex(),iw=Re("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,Vs).getRegex(),aw=Re(/\\([punct])/,"gu").replace(/punct/g,Vs).getRegex(),sw=Re(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),ow=Re(Cf).replace("(?:-->|$)","-->").getRegex(),lw=Re("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",ow).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Ql=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,cw=Re(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",Ql).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),ap=Re(/^!?\[(label)\]\[(ref)\]/).replace("label",Ql).replace("ref",vf).getRegex(),sp=Re(/^!?\[(ref)\](?:\[\])?/).replace("ref",vf).getRegex(),uw=Re("reflink|nolink(?!\\()","g").replace("reflink",ap).replace("nolink",sp).getRegex(),yf={_backpedal:Es,anyPunctuation:aw,autolink:sw,blockSkip:tw,br:ip,code:Z2,del:Es,emStrongLDelim:rw,emStrongRDelimAst:nw,emStrongRDelimUnd:iw,escape:np,link:cw,nolink:sp,punctuation:ew,reflink:ap,reflinkSearch:uw,tag:lw,text:Aw,url:Es},fw={...yf,link:Re(/^!?\[(label)\]\((.*?)\)/).replace("label",Ql).getRegex(),reflink:Re(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Ql).getRegex()},Uu={...yf,escape:Re(np).replace("])","~|])").getRegex(),url:Re(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},hw={...Uu,br:Re(ip).replace("{2,}","*").getRegex(),text:Re(Uu.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},No={normal:bf,gfm:Y2,pedantic:$2},ds={normal:yf,gfm:Uu,breaks:hw,pedantic:fw};class sn{constructor(A){YA(this,"tokens");YA(this,"options");YA(this,"state");YA(this,"tokenizer");YA(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=A||Zi,this.options.tokenizer=this.options.tokenizer||new Fl,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const e={block:No.normal,inline:ds.normal};this.options.pedantic?(e.block=No.pedantic,e.inline=ds.pedantic):
|
|||
|
|
`),this.blockTokens(A,this.tokens);for(let e=0;e<this.inlineQueue.length;e++){const r=this.inlineQueue[e];this.inlineTokens(r.src,r.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(A,e=[]){this.options.pedantic?A=A.replace(/\t/g," ").replace(/^ +$/gm,""):A=A.replace(/^( *)(\t+)/gm,(s,l,u)=>l+" ".repeat(u.length));let r,n,i,a;for(;A;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(s=>(r=s.call({lexer:this},A,e))?(A=A.substring(r.raw.length),e.push(r),!0):!1))){if(r=this.tokenizer.space(A)){A=A.substring(r.raw.length),r.raw.length===1&&e.length>0?e[e.length-1].raw+=`
|
|||
|
|
`:e.push(r);continue}if(r=this.tokenizer.code(A)){A=A.substring(r.raw.length),n=e[e.length-1],n&&(n.type==="paragraph"||n.type==="text")?(n.raw+=`
|
|||
|
|
`+r.raw,n.text+=`
|
|||
|
|
`+r.text,this.inlineQueue[this.inlineQueue.length-1].src=n.text):e.push(r);continue}if(r=this.tokenizer.fences(A)){A=A.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.heading(A)){A=A.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.hr(A)){A=A.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.blockquote(A)){A=A.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.list(A)){A=A.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.html(A)){A=A.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.def(A)){A=A.substring(r.raw.length),n=e[e.length-1],n&&(n.type==="paragraph"||n.type==="text")?(n.raw+=`
|
|||
|
|
`+r.raw,n.text+=`
|
|||
|
|
`+r.raw,this.inlineQueue[this.inlineQueue.length-1].src=n.text):this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title});continue}if(r=this.tokenizer.table(A)){A=A.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.lheading(A)){A=A.substring(r.raw.length),e.push(r);continue}if(i=A,this.options.extensions&&this.options.extensions.startBlock){let s=1/0;const l=A.slice(1);let u;this.options.extensions.startBlock.forEach(f=>{u=f.call({lexer:this},l),typeof u=="number"&&u>=0&&(s=Math.min(s,u))}),s<1/0&&s>=0&&(i=A.substring(0,s+1))}if(this.state.top&&(r=this.tokenizer.paragraph(i))){n=e[e.length-1],a&&n.type==="paragraph"?(n.raw+=`
|
|||
|
|
`+r.raw,n.text+=`
|
|||
|
|
`+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=n.text):e.push(r),a=i.length!==A.length,A=A.substring(r.raw.length);continue}if(r=this.tokenizer.text(A)){A=A.substring(r.raw.length),n=e[e.length-1],n&&n.type==="text"?(n.raw+=`
|
|||
|
|
`+r.raw,n.text+=`
|
|||
|
|
`+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=n.text):e.push(r);continue}if(A){const s="Infinite loop on byte: "+A.charCodeAt(0);if(this.options.silent){console.error(s);break}else throw new Error(s)}}return this.state.top=!0,e}inline(A,e=[]){return this.inlineQueue.push({src:A,tokens:e}),e}inlineTokens(A,e=[]){let r,n,i,a=A,s,l,u;if(this.tokens.links){const f=Object.keys(this.tokens.links);if(f.length>0)for(;(s=this.tokenizer.rules.inline.reflinkSearch.exec(a))!=null;)f.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(a=a.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+a.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(s=this.tokenizer.rules.inline.blockSkip.exec(a))!=null;)a=a.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+a.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(s=this.tokenizer.rules.inline.anyPunctuation.exec(a))!=null;)a=a.slice(0,s.index)+"++"+a.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;A;)if(l||(u=""),l=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(f=>(r=f.call({lexer:this},A,e))?(A=A.substring(r.raw.length),e.push(r),!0):!1))){if(r=this.tokenizer.escape(A)){A=A.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.tag(A)){A=A.substring(r.raw.length),n=e[e.length-1],n&&r.type==="text"&&n.type==="text"?(n.raw+=r.raw,n.text+=r.text):e.push(r);continue}if(r=this.tokenizer.link(A)){A=A.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.reflink(A,this.tokens.links)){A=A.substring(r.raw.length),n=e[e.length-1],n&&r.type==="text"&&n.type==="text"?(n.raw+=r.raw,n.text+=r.text):e.push(r);continue}if(r=this.tokenizer.emStrong(A,a,u)){A=A.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.codespan(A)){A=A.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.br(A)){A=A.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.del(A)){A=A.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.autolink(A)){A=A.substring(r.raw.length),e.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(A))){A=A.substring(r.raw.length),e.push(r);continue}if(i=A,this.options.extensions&&this.options.extensions.startInline){let f=1/0;const p=A.slice(1);let B;this.options.extensions.startInline.forEach(d=>{B=d.call({lexer:this},p),typeof B=="number"&&B>=0&&(f=Math.min(f,B))}),f<1/0&&f>=0&&(i=A.substring(0,f+1))}if(r=this.tokenizer.inlineText(i)){A=A.substring(r.raw.length),r.raw.slice(-1)!=="_"&&(u=r.raw.slice(-1)),l=!0,n=e[e.length-1],n&&n.type==="text"?(n.raw+=r.raw,n.text+=r.text):e.push(r);continue}if(A){const f="Infinite loop on byte: "+A.charCodeAt(0);if(this.options.silent){console.error(f);break}else throw new Error(f)}}return e}}class Ul{constructor(A){YA(this,"options");this.options=A||Zi}code(A,e,r){var i;const n=(i=(e||"").match(/^\S*/))==null?void 0:i[0];return A=A.replace(/\n$/,"")+`
|
|||
|
|
`,n?'<pre><code class="language-'+pr(n)+'">'+(r?A:pr(A,!0))+`</code></pre>
|
|||
|
|
`:"<pre><code>"+(r?A:pr(A,!0))+`</code></pre>
|
|||
|
|
`}blockquote(A){return`<blockquote>
|
|||
|
|
${A}</blockquote>
|
|||
|
|
`}html(A,e){return A}heading(A,e,r){return`<h${e}>${A}</h${e}>
|
|||
|
|
`}hr(){return`<hr>
|
|||
|
|
`}list(A,e,r){const n=e?"ol":"ul",i=e&&r!==1?' start="'+r+'"':"";return"<"+n+i+`>
|
|||
|
|
`+A+"</"+n+`>
|
|||
|
|
`}listitem(A,e,r){return`<li>${A}</li>
|
|||
|
|
`}checkbox(A){return"<input "+(A?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph(A){return`<p>${A}</p>
|
|||
|
|
`}table(A,e){return e&&(e=`<tbody>${e}</tbody>`),`<table>
|
|||
|
|
<thead>
|
|||
|
|
`+A+`</thead>
|
|||
|
|
`+e+`</table>
|
|||
|
|
`}tablerow(A){return`<tr>
|
|||
|
|
${A}</tr>
|
|||
|
|
`}tablecell(A,e){const r=e.header?"th":"td";return(e.align?`<${r} align="${e.align}">`:`<${r}>`)+A+`</${r}>
|
|||
|
|
`}strong(A){return`<strong>${A}</strong>`}em(A){return`<em>${A}</em>`}codespan(A){return`<code>${A}</code>`}br(){return"<br>"}del(A){return`<del>${A}</del>`}link(A,e,r){const n=xh(A);if(n===null)return r;A=n;let i='<a href="'+A+'"';return e&&(i+=' title="'+e+'"'),i+=">"+r+"</a>",i}image(A,e,r){const n=xh(A);if(n===null)return r;A=n;let i=`<img src="${A}" alt="${r}"`;return e&&(i+=` title="${e}"`),i+=">",i}text(A){return A}}class Ff{strong(A){return A}em(A){return A}codespan(A){return A}del(A){return A}html(A){return A}text(A){return A}link(A,e,r){return""+r}image(A,e,r){return""+r}br(){return""}}class on{constructor(A){YA(this,"options");YA(this,"renderer");YA(this,"textRenderer");this.options=A||Zi,this.options.renderer=this.options.renderer||new Ul,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Ff}static parse(A,e){return new on(e).parse(A)}static parseInline(A,e){return new on(e).parseInline(A)}parse(A,e=!0){let r="";for(let n=0;n<A.length;n++){const i=A[n];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[i.type]){const a=i,s=this.options.extensions.renderers[a.type].call({parser:this},a);if(s!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(a.type)){r+=s||"";continue}}switch(i.type){case"space":continue;case"hr":{r+=this.renderer.hr();continue}case"heading":{const a=i;r+=this.renderer.heading(this.parseInline(a.tokens),a.depth,O2(this.parseInline(a.tokens,this.textRenderer)));continue}case"code":{const a=i;r+=this.renderer.code(a.text,a.lang,!!a.escaped);continue}case"table":{const a=i;let s="",l="";for(let f=0;f<a.header.length;f++)l+=this.renderer.tablecell(this.parseInline(a.header[f].tokens),{header:!0,align:a.align[f]});s+=this.renderer.tablerow(l);let u="";for(let f=0;f<a.rows.length;f++){const p=a.rows[f];l="";for(let B=0;B<p.length;B++)l+=this.renderer.tablecell(this.parseInline(p[B].tokens),{header:!1,align:a.align[B]});u+=this.renderer.tablerow(l)}r+=this.renderer.table(s,u);continue}case"blockquote":{const a=i,s=this.parse(a.tokens);r+=this.renderer.blockquote(s);continue}case"list":{const a=i,s=a.ordered,l=a.start,u=a.loose;let f="";for(let p=0;p<a.items.length;p++){const B=a.items[p],d=B.checked,m=B.task;let C="";if(B.task){const E=this.renderer.checkbox(!!d);u?B.tokens.length>0&&B.tokens[0].type==="paragraph"?(B.tokens[0].text=E+" "+B.tokens[0].text,B.tokens[0].tokens&&B.tokens[0].tokens.length>0&&B.tokens[0].tokens[0].type==="text"&&(B.tokens[0].tokens[0].text=E+" "+B.tokens[0].tokens[0].text)):B.tokens.unshift({type:"text",text:E+" "}):C+=E+" "}C+=this.parse(B.tokens,u),f+=this.renderer.listitem(C,m,!!d)}r+=this.renderer.list(f,s,l);continue}case"html":{const a=i;r+=this.renderer.html(a.text,a.block);continue}case"paragraph":{const a=i;r+=this.renderer.paragraph(this.parseInline(a.tokens));continue}case"text":{let a=i,s=a.tokens?this.parseInline(a.tokens):a.text;for(;n+1<A.length&&A[n+1].type==="text";)a=A[++n],s+=`
|
|||
|
|
`+(a.tokens?this.parseInline(a.tokens):a.text);r+=e?this.renderer.paragraph(s):s;continue}default:{const a='Token with "'+i.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw new Error(a)}}}return r}parseInline(A,e){e=e||this.renderer;let r="";for(let n=0;n<A.length;n++){const i=A[n];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[i.type]){const a=this.options.extensions.renderers[i.type].call({parser:this},i);if(a!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(i.type)){r+=a||"";continue}}switch(i.type){case"escape":{const a=i;r+=e.text(a.text);break}case"html":{const a=i;r+=e.html(a.text);break}case"link":{const a=i;r+=e.link(a.href,a.title,this.parseInline(a.tokens,e));break}case"image":{const a=i;r+=e.image(a.href,a.title,a.text);break}case"strong":{const a=i;r+=e.strong(this.parseInline(a.tokens,e));break}case"em":{const a=i;r+=e.em(this.parseInline(a.tokens,e));break}case"codespan":{const a=i;r+=e.codespan(a.text);break}case"br":{r+=e.br();break}case"del":{const a=i;r+=e.del(this.parseInline(a.tokens,e));break}case"text":{const a=i;r+=e.text(a.text);break}default:{const a='Token with "'+i.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw new Error(a)}}}return r}}class Ls{constructor(A){YA(this,"options");this.options=A||Zi}preprocess(A){return A}postprocess(A){return A}processAllTokens(A){return A}}YA(Ls,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"]));var Yi,xu,op;class dw{constructor(...A){yh(this,Yi);YA(this,"defaults",wf());YA(this,"options",this.setOptions);YA(this,"parse",Io(this,Yi,xu).call(this,sn.lex,on.parse));YA(this,"parseInline",Io(this,Yi,xu).call(this,sn.lexInline,on.parseInline));YA(this,"Parser",on);YA(this,"Renderer",Ul);YA(this,"TextRenderer",Ff);YA(this,"Lexer",sn);YA(this,"Tokenizer",Fl);YA(this,"Hooks",Ls);this.use(...A)}walkTokens(A,e){var n,i;let r=[];for(const a of A)switch(r=r.concat(e.call(this,a)),a.type){case"table":{const s=a;for(const l of s.header)r=r.concat(this.walkTokens(l.tokens,e));for(const l of s.rows)for(const u of l)r=r.concat(this.walkTokens(u.tokens,e));break}case"list":{const s=a;r=r.concat(this.walkTokens(s.items,e));break}default:{const s=a;(i=(n=this.defaults.extensions)==null?void 0:n.childTokens)!=null&&i[s.type]?this.defaults.extensions.childTokens[s.type].forEach(l=>{const u=s[l].flat(1/0);r=r.concat(this.walkTokens(u,e))}):s.tokens&&(r=r.concat(this.walkTokens(s.tokens,e)))}}return r}use(...A){const e=this.defaults.extensions||{renderers:{},childTokens:{}};return A.forEach(r=>{const n={...r};if(n.async=this.defaults.async||n.async||!1,r.extensions&&(r.extensions.forEach(i=>{if(!i.name)throw new Error("extension name required");if("renderer"in i){const a=e.renderers[i.name];a?e.renderers[i.name]=function(...s){let l=i.renderer.apply(this,s);return l===!1&&(l=a.apply(this,s)),l}:e.renderers[i.name]=i.renderer}if("tokenizer"in i){if(!i.level||i.level!=="block"&&i.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const a=e[i.level];a?a.unshift(i.tokenizer):e[i.level]=[i.tokenizer],i.start&&(i.level==="block"?e.startBlock?e.startBlock.push(i.start):e.startBlock=[i.start]:i.level==="inline"&&(e.startInline?e.startInline.push(i.start):e.startInline=[i.start]))}"childTokens"in i&&i.childTokens&&(e.childTokens[i.name]=i.childTokens)}),n.extensions=e),r.renderer){const i=this.defaults.renderer||new Ul(this.defaults);for(const a in r.renderer){if(!(a in i))throw new Error(`renderer '${a}' does not exist`);if(a==="options")continue;const s=a,l=r.renderer[s],u=i[s];i[s]=(...f)=>{let p=l.apply(i,f);return p===!1&&(p=u.apply(i,f)),p||""}}n.renderer=i}if(r.tokenizer){const i=this.defaults.tokenizer||new Fl(this.defaults);for(const a in r.tokenizer){if(!(a in i))throw new Error(`tokenizer '${a}' does not exist`);if(["options","rules","lexer"].includes(a))continue;const s=a,l=r.tokenizer[s],u=i[s];i[s]=(...f)=>{let p=l.apply(i,f);return p===!1&&(p=u.apply(i,f)),p}}
|
|||
|
|
Please report this to https://github.com/markedjs/marked.`,A){const n="<p>An error occurred:</p><pre>"+pr(r.message+"",!0)+"</pre>";return e?Promise.resolve(n):n}if(e)return Promise.reject(r);throw r}};const Wi=new dw;function Oe(t,A){return Wi.parse(t,A)}Oe.options=Oe.setOptions=function(t){return Wi.setOptions(t),Oe.defaults=Wi.defaults,$g(Oe.defaults),Oe};Oe.getDefaults=wf;Oe.defaults=Zi;Oe.use=function(...t){return Wi.use(...t),Oe.defaults=Wi.defaults,$g(Oe.defaults),Oe};Oe.walkTokens=function(t,A){return Wi.walkTokens(t,A)};Oe.parseInline=Wi.parseInline;Oe.Parser=on;Oe.parser=on.parse;Oe.Renderer=Ul;Oe.TextRenderer=Ff;Oe.Lexer=sn;Oe.lexer=sn.lex;Oe.Tokenizer=Fl;Oe.Hooks=Ls;Oe.parse=Oe;Oe.options;Oe.setOptions;Oe.use;Oe.walkTokens;Oe.parseInline;on.parse;sn.lex;var fl={exports:{}},gw=fl.exports,Ih;function pw(){return Ih||(Ih=1,(function(t,A){(function(e,r){r()})(gw,function(){function e(u,f){return typeof f>"u"?f={autoBom:!1}:typeof f!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),f={autoBom:!f}),f.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(u.type)?new Blob(["\uFEFF",u],{type:u.type}):u}function r(u,f,p){var B=new XMLHttpRequest;B.open("GET",u),B.responseType="blob",B.onload=function(){l(B.response,f,p)},B.onerror=function(){console.error("could not download file")},B.send()}function n(u){var f=new XMLHttpRequest;f.open("HEAD",u,!1);try{f.send()}catch{}return 200<=f.status&&299>=f.status}function i(u){try{u.dispatchEvent(new MouseEvent("click"))}catch{var f=document.createEvent("MouseEvents");f.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),u.dispatchEvent(f)}}var a=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof So=="object"&&So.global===So?So:void 0,s=a.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),l=a.saveAs||(typeof window!="object"||window!==a?function(){}:"download"in HTMLAnchorElement.prototype&&!s?function(u,f,p){var B=a.URL||a.webkitURL,d=document.createElement("a");f=f||u.name||"download",d.download=f,d.rel="noopener",typeof u=="string"?(d.href=u,d.origin===location.origin?i(d):n(d.href)?r(u,f,p):i(d,d.target="_blank")):(d.href=B.createObjectURL(u),setTimeout(function(){B.revokeObjectURL(d.href)},4e4),setTimeout(function(){i(d)},0))}:"msSaveOrOpenBlob"in navigator?function(u,f,p){if(f=f||u.name||"download",typeof u!="string")navigator.msSaveOrOpenBlob(e(u,p),f);else if(n(u))r(u,f,p);else{var B=document.createElement("a");B.href=u,B.target="_blank",setTimeout(function(){i(B)})}}:function(u,f,p,B){if(B=B||open("","_blank"),B&&(B.document.title=B.document.body.innerText="downloading..."),typeof u=="string")return r(u,f,p);var d=u.type==="application/octet-stream",m=/constructor/i.test(a.HTMLElement)||a.safari,C=/CriOS\/[\d]+/.test(navigator.userAgent);if((C||d&&m||s)&&typeof FileReader<"u"){var E=new FileReader;E.onloadend=function(){var R=E.result;R=C?R:R.replace(/^data:[^;]*;/,"data:attachment/file;"),B?B.location.href=R:location=R,B=null},E.readAsDataURL(u)}else{var v=a.URL||a.webkitURL,H=v.createObjectURL(u);B?B.location=H:location.href=H,B=null,setTimeout(function(){v.revokeObjectURL(H)},4e4)}});a.saveAs=l.saveAs=l,t.exports=l})})(fl)),fl.exports}var Sh=pw();function Bw(t,A){if(t.match(/^[a-z]+:\/\//i))return t;if(t.match(/^\/\//))return window.location.protocol+t;if(t.match(/^[a-z]+:/i))return t;const e=document.implementation.createHTMLDocument(),r=e.createElement("base"),n=e.createElement("a");return e.head.appendChild(r),e.body.appendChild(n),A&&(r.href=A),n.href=t,n.href}const ww=(()=>{let t=0;const A=()=>`0000${(Math.random()*36**4<<0).toString(36)}`.slice(-4);return()=>(t+=1,`u${A()}${t}`)})();function di(t){const A=[];for(let e=0,r=t.length;e<r;e++)A.push(t[e]);return A}let ga=null;function lp(t={}){return ga||(t.includeStyleProperties?(ga=t.includeStyleProperties,ga):(ga=di(window.getComputedStyle(document.documentElement)),ga))}function xl(t,A){const r=(t.o
|
|||
|
|
`)}async function i5(t,A){const e=A.fontEmbedCSS!=null?A.fontEmbedCSS:A.skipFonts?null:await n5(t,A);if(e){const r=document.createElement("style"),n=document.createTextNode(e);r.appendChild(n),t.firstChild?t.insertBefore(r,t.firstChild):t.appendChild(r)}}async function a5(t,A={}){const{width:e,height:r}=Cw(t,A),n=await jl(t,A,!0);return await i5(n,A),await gp(n,A),Zw(n,A),await yw(n,e,r)}/*!
|
|||
|
|
* html2canvas 1.4.1 <https://html2canvas.hertzen.com>
|
|||
|
|
* Copyright (c) 2022 Niklas von Hertzen <https://hertzen.com>
|
|||
|
|
* Released under MIT License
|
|||
|
|
*//*! *****************************************************************************
|
|||
|
|
Copyright (c) Microsoft Corporation.
|
|||
|
|
|
|||
|
|
Permission to use, copy, modify, and/or distribute this software for any
|
|||
|
|
purpose with or without fee is hereby granted.
|
|||
|
|
|
|||
|
|
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|||
|
|
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|||
|
|
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|||
|
|
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|||
|
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|||
|
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|||
|
|
PERFORMANCE OF THIS SOFTWARE.
|
|||
|
|
***************************************************************************** */var _u=function(t,A){return _u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])},_u(t,A)};function jr(t,A){if(typeof A!="function"&&A!==null)throw new TypeError("Class extends value "+String(A)+" is not a constructor or null");_u(t,A);function e(){this.constructor=t}t.prototype=A===null?Object.create(A):(e.prototype=A.prototype,new e)}var Iu=function(){return Iu=Object.assign||function(A){for(var e,r=1,n=arguments.length;r<n;r++){e=arguments[r];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(A[i]=e[i])}return A},Iu.apply(this,arguments)};function Zt(t,A,e,r){function n(i){return i instanceof e?i:new e(function(a){a(i)})}return new(e||(e=Promise))(function(i,a){function s(f){try{u(r.next(f))}catch(p){a(p)}}function l(f){try{u(r.throw(f))}catch(p){a(p)}}function u(f){f.done?i(f.value):n(f.value).then(s,l)}u((r=r.apply(t,[])).next())})}function Wt(t,A){var e={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,n,i,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(u){return function(f){return l([u,f])}}function l(u){if(r)throw new TypeError("Generator is already executing.");for(;e;)try{if(r=1,n&&(i=u[0]&2?n.return:u[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,u[1])).done)return i;switch(n=0,i&&(u=[u[0]&2,i.value]),u[0]){case 0:case 1:i=u;break;case 4:return e.label++,{value:u[1],done:!1};case 5:e.label++,n=u[1],u=[0];continue;case 7:u=e.ops.pop(),e.trys.pop();continue;default:if(i=e.trys,!(i=i.length>0&&i[i.length-1])&&(u[0]===6||u[0]===2)){e=0;continue}if(u[0]===3&&(!i||u[1]>i[0]&&u[1]<i[3])){e.label=u[1];break}if(u[0]===6&&e.label<i[1]){e.label=i[1],i=u;break}if(i&&e.label<i[2]){e.label=i[2],e.ops.push(u);break}i[2]&&e.ops.pop(),e.trys.pop();continue}u=A.call(t,e)}catch(f){u=[6,f],n=0}finally{r=i=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}function ko(t,A,e){if(arguments.length===2)for(var r=0,n=A.length,i;r<n;r++)(i||!(r in A))&&(i||(i=Array.prototype.slice.call(A,0,r)),i[r]=A[r]);return t.concat(i||A)}var Mn=(function(){function t(A,e,r,n){this.left=A,this.top=e,this.width=r,this.height=n}return t.prototype.add=function(A,e,r,n){return new t(this.left+A,this.top+e,this.width+r,this.height+n)},t.fromClientRect=function(A,e){return new t(e.left+A.windowBounds.left,e.top+A.windowBounds.top,e.width,e.height)},t.fromDOMRectList=function(A,e){var r=Array.from(e).find(function(n){return n.width!==0});return r?new t(r.left+A.windowBounds.left,r.top+A.windowBounds.top,r.width,r.height):t.EMPTY},t.EMPTY=new t(0,0,0,0),t})(),ql=function(t,A){return Mn.fromClientRect(t,A.getBoundingClientRect())},s5=function(t){var A=t.body,e=t.documentElement;if(!A||!e)throw new Error("Unable to get document size");var r=Math.max(Math.max(A.scrollWidth,e.scrollWidth),Math.max(A.offsetWidth,e.offsetWidth),Math.max(A.clientWidth,e.clientWidth)),n=Math.max(Math.max(A.scrollHeight,e.scrollHeight),Math.max(A.offsetHeight,e.offsetHeight),Math.max(A.clientHeight,e.clientHeight));return new Mn(0,0,r,n)},Wl=function(t){for(var A=[],e=0,r=t.length;e<r;){var n=t.charCodeAt(e++);if(n>=55296&&n<=56319&&e<r){var i=t.charCodeAt(e++);(i&64512)===56320?A.push(((n&1023)<<10)+(i&1023)+65536):(A.push(n),e--)}else A.push(n)}return A},ct=function(){for(var t=[],A=0;A<arguments.length;A++)t[A]=arguments[A];if(String.fromCodePoint)return String.fromCodePoint.apply(String,t);var e=t.length;if(!e)return"";for(var r=[],n=-1,i="";++n<e;){var a=t[n];a<=65535?r.push(a):(a-=65536,r.push((a>>10)+55296,a%1024+56320)),(n+1===e||r.length>16384)&&(i+=String.fromCharCode.apply(String,r),r.length=0)}return i},Rh="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o5=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var To=0;To<Rh.length;To++)o5[Rh.charCodeAt(To)]=To;var Mh="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwx
|
|||
|
|
content: "" !important;
|
|||
|
|
display: none !important;
|
|||
|
|
}`,q4=function(t){W4(t,"."+Ju+V4+kd+`
|
|||
|
|
.`+Yu+j4+kd)},W4=function(t,A){var e=t.ownerDocument;if(e){var r=e.createElement("style");r.textContent=A,t.appendChild(r)}},h0=(function(){function t(){}return t.getOrigin=function(A){var e=t._link;return e?(e.href=A,e.href=e.href,e.protocol+e.hostname+e.port):"about:blank"},t.isSameOrigin=function(A){return t.getOrigin(A)===t._origin},t.setContext=function(A){t._link=A.document.createElement("a"),t._origin=t.getOrigin(A.location.href)},t._origin="about:blank",t})(),z4=(function(){function t(A,e){this.context=A,this._options=e,this._cache={}}return t.prototype.addImage=function(A){var e=Promise.resolve();return this.has(A)||(ru(A)||$4(A))&&(this._cache[A]=this.loadImage(A)).catch(function(){}),e},t.prototype.match=function(A){return this._cache[A]},t.prototype.loadImage=function(A){return Zt(this,void 0,void 0,function(){var e,r,n,i,a=this;return Wt(this,function(s){switch(s.label){case 0:return e=h0.isSameOrigin(A),r=!tu(A)&&this._options.useCORS===!0&&Ot.SUPPORT_CORS_IMAGES&&!e,n=!tu(A)&&!e&&!ru(A)&&typeof this._options.proxy=="string"&&Ot.SUPPORT_CORS_XHR&&!r,!e&&this._options.allowTaint===!1&&!tu(A)&&!ru(A)&&!n&&!r?[2]:(i=A,n?[4,this.proxy(i)]:[3,2]);case 1:i=s.sent(),s.label=2;case 2:return this.context.logger.debug("Added image "+A.substring(0,256)),[4,new Promise(function(l,u){var f=new Image;f.onload=function(){return l(f)},f.onerror=u,(Z4(i)||r)&&(f.crossOrigin="anonymous"),f.src=i,f.complete===!0&&setTimeout(function(){return l(f)},500),a._options.imageTimeout>0&&setTimeout(function(){return u("Timed out ("+a._options.imageTimeout+"ms) loading image")},a._options.imageTimeout)})];case 3:return[2,s.sent()]}})})},t.prototype.has=function(A){return typeof this._cache[A]<"u"},t.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},t.prototype.proxy=function(A){var e=this,r=this._options.proxy;if(!r)throw new Error("No proxy defined");var n=A.substring(0,256);return new Promise(function(i,a){var s=Ot.SUPPORT_RESPONSE_TYPE?"blob":"text",l=new XMLHttpRequest;l.onload=function(){if(l.status===200)if(s==="text")i(l.response);else{var p=new FileReader;p.addEventListener("load",function(){return i(p.result)},!1),p.addEventListener("error",function(B){return a(B)},!1),p.readAsDataURL(l.response)}else a("Failed to proxy resource "+n+" with status code "+l.status)},l.onerror=a;var u=r.indexOf("?")>-1?"&":"?";if(l.open("GET",""+r+u+"url="+encodeURIComponent(A)+"&responseType="+s),s!=="text"&&l instanceof XMLHttpRequest&&(l.responseType=s),e._options.imageTimeout){var f=e._options.imageTimeout;l.timeout=f,l.ontimeout=function(){return a("Timed out ("+f+"ms) proxying "+n)}}l.send()})},t})(),X4=/^data:image\/svg\+xml/i,J4=/^data:image\/.*;base64,/i,Y4=/^data:image\/.*/i,$4=function(t){return Ot.SUPPORT_SVG_DRAWING||!Ab(t)},tu=function(t){return Y4.test(t)},Z4=function(t){return J4.test(t)},ru=function(t){return t.substr(0,4)==="blob"},Ab=function(t){return t.substr(-3).toLowerCase()==="svg"||X4.test(t)},SA=(function(){function t(A,e){this.type=0,this.x=A,this.y=e}return t.prototype.add=function(A,e){return new t(this.x+A,this.y+e)},t})(),Ca=function(t,A,e){return new SA(t.x+(A.x-t.x)*e,t.y+(A.y-t.y)*e)},Al=(function(){function t(A,e,r,n){this.type=1,this.start=A,this.startControl=e,this.endControl=r,this.end=n}return t.prototype.subdivide=function(A,e){var r=Ca(this.start,this.startControl,A),n=Ca(this.startControl,this.endControl,A),i=Ca(this.endControl,this.end,A),a=Ca(r,n,A),s=Ca(n,i,A),l=Ca(a,s,A);return e?new t(this.start,r,a,l):new t(l,s,i,this.end)},t.prototype.add=function(A,e){return new t(this.start.add(A,e),this.startControl.add(A,e),this.endControl.add(A,e),this.end.add(A,e))},t.prototype.reverse=function(){return new t(this.end,this.endControl,this.startControl,this.start)},t})(),Lr=function(t){return t.type===1},eb=(function(){function t(A){var e=A.styles,r=A.bounds,n=Qs(e.borderTopLeftRadius,r.width,r.height),i=n[0],a=n[1],s=Qs(e.borderTopRightRadius,r.width,r.height),l=s[0],u=s[1],f=Qs(e.borderBottomRightRadius,r.width,r.height),p=f[0],B=f[1],d=Qs(e.borderBottomLeftRadius,r.width,
|
|||
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Gd(t,A){return Gb(t)||Vb(t,A)||BB(t,A)||jb()}function Vd(t,A="utf8"){return new TextDecoder(A).decode(t)}const qb=new TextEncoder;function Wb(t){return qb.encode(t)}const zb=1024*8,Xb=(()=>{const t=new Uint8Array(4),A=new Uint32Array(t.buffer);return!((A[0]=1)&t[0])})(),au={int8:globalThis.Int8Array,uint8:globalThis.Uint8Array,int16:globalThis.Int16Array,uint16:globalThis.Uint16Array,int32:globalThis.Int32Array,uint32:globalThis.Uint32Array,uint64:globalThis.BigUint64Array,int64:globalThis.BigInt64Array,float32:globalThis.Float32Array,float64:globalThis.Float64Array};class Df{constructor(A=zb,e={}){YA(this,"buffer");YA(this,"byteLength");YA(this,"byteOffset");YA(this,"length");YA(this,"offset");YA(this,"lastWrittenByte");YA(this,"littleEndian");YA(this,"_data");YA(this,"_mark");YA(this,"_marks");let r=!1;typeof A=="number"?A=new ArrayBuffer(A):(r=!0,this.lastWrittenByte=A.byteLength);const n=e.offset?e.offset>>>0:0,i=A.byteLength-n;let a=n;(ArrayBuffer.isView(A)||A instanceof Df)&&(A.byteLength!==A.buffer.byteLength&&(a=A.byteOffset+n),A=A.buffer),r?this.lastWrittenByte=i:this.lastWrittenByte=0,this.buffer=A,this.length=i,this.byteLength=i,this.byteOffset=a,this.offset=0,this.littleEndian=!0,this._data=new DataView(this.buffer,a,i),this._mark=0,this._marks=[]}available(A=1){return this.offset+A<=this.length}isLittleEndian(){return this.littleEndian}setLittleEndian(){return this.littleEndian=!0,this}isBigEndian(){return!this.littleEndian}setBigEndian(){return this.littleEndian=!1,this}skip(A=1){return this.offset+=A,this}back(A=1){return this.offset-=A,this}seek(A){return this.offset=A,this}mark(){return this._mark=this.offset,this}reset(){return this.offset=this._mark,this}pushMark(){return this._marks.push(this.offset),this}popMark(){const A=this._marks.pop();if(A===void 0)throw new Error("Mark stack empty");return this.seek(A),this}rewind(){return this.offset=0,this}ensureAvailable(A=1){if(!this.available(A)){const r=(this.offset+A)*2,n=new Uint8Array(r);n.set(new Uint8Array(this.buffer)),this.buffer=n.buffer,this.length=r,this.byteLength=r,this._data=new DataView(this.buffer)}return this}readBoolean(){return this.readUint8()!==0}readInt8(){return this._data.getInt8(this.offset++)}readUint8(){return this._data.getUint8(this.offset++)}readByte(){return this.readUint8()}readBytes(A=1){return this.readArray(A,"uint8")}readArray(A,e){const r=au[e].BYTES_PER_ELEMENT*A,n=this.byteOffset+this.offset,i=this.buffer.slice(n,n+r);if(this.littleEndian===Xb&&e!=="uint8"&&e!=="int8"){const s=new Uint8Array(this.buffer.slice(n,n+r));s.reverse();const l=new au[e](s.buffer);return this.offset+=r,l.reverse(),l}const a=new au[e](i);return this.offset+=r,a}readInt16(){const A=this._data.getInt16(this.offset,this.littleEndian);return this.offset+=2,A}readUint16(){const A=this._data.getUint16(this.offset,this.littleEndian);return this.offset+=2,A}readInt32(){const A=this._data.getInt32(this.offset,this.littleEndian);return this.offset+=4,A}readUint32(){const A=this._data.getUint32(this.offset,this.littleEndian);return this.offset+=4,A}readFloat32(){const A=this._data.getFloat32(this.offset,this.littleEndian);return this.offset+=4,A}readFloat64(){const A=this._data.getFloat64(this.offset,this.littleEndian);return this.offset+=8,A}readBigInt64(){const A=this._data.getBigInt64(this.offset,this.littleEndian);return this.offset+=8,A}readBigUint64(){const A=this._data.getBigUint64(this.offset,this.littleEndian);return this.offset+=8,A}readChar(){return String.fromCharCode(this.readInt8())}readChars(A=1){let e="";for(let r=0;r<A;r++)e+=this.readChar();return e}readUtf8(A=1){return Vd(this.readBytes(A))}decodeText(A=1,e="utf8"){return Vd(this.readBytes(A),e)}writeBoolean(A){return this.writeUint8(A?255:0),this}writeInt8(A){return this.ensureAvailable(1),this._data.setInt8(this.offset++,A),this._updateLastWrittenByte(),this}writeUint8(A){return this.ensureAvailable(1),this._data.setUint8(this.offset++,A),this._updateLastWrittenByte(),this}writeByte(A){retu
|
|||
|
|
* 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 $0(t){var A;t=t||"",this.ok=!1,t.charAt(0)=="#"&&(t=t.substr(1,6)),t={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"}[t=(t=t.replace(/ /g,"")).toLowerCase()]||t;for(var e=[{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(s){return[parseInt(s[1]),parseInt(s[2]),parseInt(s[3])]}},{re:/^(\w{2})(\w{2})(\w{2})$/,example:["#00ff00","336699"],process:function(s){return[parseInt(s[1],16),parseInt(s[2],16),parseInt(s[3],16)]}},{re:/^(\w{1})(\w{1})(\w{1})$/,example:["#fb0","f0f"],process:function(s){return[parseInt(s[1]+s[1],16),parseInt(s[2]+s[2],16),parseInt(s[3]+s[3],16)]}}],r=0;r<e.length;r++){var n=e[r].re,i=e[r].process,a=n.exec(t);a&&(A=i(a),this.r=A[0],this.g=A[1],this.b=A[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 s=this.r.toString(16),l=this.g.toString(16),u=this.b.toString(16);return s.length==1&&(s="0"+s),l.length==1&&(l="0"+l),u.length==1&&(u="0"+u),"#"+s+l+u}}var wl=re.atob.bind(re),Lg=re.btoa.bind(re);/**
|
|||
|
|
* @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 vu(t,A){var e=t[0],r=t[1],n=t[2],i=t[3];e=Gt(e,r,n,i,A[0],7,-680876936),i=Gt(i,e,r,n,A[1],12,-389564586),n=Gt(n,i,e,r,A[2],17,606105819),r=Gt(r,n,i,e,A[3],22,-1044525330),e=Gt(e,r,n,i,A[4],7,-176418897),i=Gt(i,e,r,n,A[5],12,1200080426),n=Gt(n,i,e,r,A[6],17,-1473231341),r=Gt(r,n,i,e,A[7],22,-45705983),e=Gt(e,r,n,i,A[8],7,1770035416),i=Gt(i,e,r,n,A[9],12,-1958414417),n=Gt(n,i,e,r,A[10],17,-42063),r=Gt(r,n,i,e,A[11],22,-1990404162),e=Gt(e,r,n,i,A[12],7,1804603682),i=Gt(i,e,r,n,A[13],12,-40341101),n=Gt(n,i,e,r,A[14],17,-1502002290),e=Vt(e,r=Gt(r,n,i,e,A[15],22,1236535329),n,i,A[1],5,-165796510),i=Vt(i,e,r,n,A[6],9,-1069501632),n=Vt(n,i,e,r,A[11],14,643717713),r=Vt(r,n,i,e,A[0],20,-373897302),e=Vt(e,r,n,i,A[5],5,-701558691),i=Vt(i,e,r,n,A[10],9,38016083),n=Vt(n,i,e,r,A[15],14,-660478335),r=Vt(r,n,i,e,A[4],20,-405537848),e=Vt(e,r,n,i,A[9],5,568446438),i=Vt(i,e,r,n,A[14],9,-1019803690),n=Vt(n,i,e,r,A[3],14,-187363961),r=Vt(r,n,i,e,A[8],20,1163531501),e=Vt(e,r,n,i,A[13],5,-1444681467),i=Vt(i,e,r,n,A[2],9,-51403784),n=Vt(n,i,e,r,A[7],14,1735328473),e=jt(e,r=Vt(r,n,i,e,A[12],20,-1926607734),n,i,A[5],4,-378558),i=jt(i,e,r,n,A[8],11,-2022574463),n=jt(n,i,e,r,A[11],16,1839030562),r=jt(r,n,i,e,A[14],23,-35309556),e=jt(e,r,n,i,A[1],4,-1530992060),i=jt(i,e,r,n,A[4],11,1272893353),n=jt(n,i,e,r,A[7],16,-155497632),r=jt(r,n,i,e,A[10],23,-1094730640),e=jt(e,r,n,i,A[13],4,681279174),i=jt(i,e,r,n,A[0],11,-358537222),n=jt(n,i,e,r,A[3],16,-722521979),r=jt(r,n,i,e,A[6],23,76029189),e=jt(e,r,n,i,A[9],4,-640364487),i=jt(i,e,r,n,A[12],11,-421815835),n=jt(n,i,e,r,A[15],16,530742520),e=qt(e,r=jt(r,n,i,e,A[2],23,-995338651),n,i,A[0],6,-198630844),i=qt(i,e,r,n,A[7],10,1126891415),n=qt(n,i,e,r,A[14],15,-1416354905),r=qt(r,n,i,e,A[5],21,-57434055),e=qt(e,r,n,i,A[12],6,1700485571),i=qt(i,e,r,n,A[3],10,-1894986606),n=qt(n,i,e,r,A[10],15,-1051523),r=qt(r,n,i,e,A[1],21,-2054922799),e=qt(e,r,n,i,A[8],6,1873313359),i=qt(i,e,r,n,A[15],10,-30611744),n=qt(n,i,e,r,A[6],15,-1560198380),r=qt(r,n,i,e,A[13],21,1309151649),e=qt(e,r,n,i,A[4],6,-145523070),i=qt(i,e,r,n,A[11],10,-1120210379),n=qt(n,i,e,r,A[2],15,718787259),r=qt(r,n,i,e,A[9],21,-343485551),t[0]=fi(e,t[0]),t[1]=fi(r,t[1]),t[2]=fi(n,t[2]),t[3]=fi(i,t[3])}function rc(t,A,e,r,n,i){return A=fi(fi(A,t),fi(r,i)),fi(A<<n|A>>>32-n,e)}function Gt(t,A,e,r,n,i,a){return rc(A&e|~A&r,t,A,n,i,a)}function Vt(t,A,e,r,n,i,a){return rc(A&r|e&~r,t,A,n,i,a)}function jt(t,A,e,r,n,i,a){return rc(A^e^r,t,A,n,i,a)}function qt(t,A,e,r,n,i,a){return rc(e^(A|~r),t,A,n,i,a)}function Z0(t){var A,e=t.length,r=[1732584193,-271733879,-1732584194,271733878];for(A=64;A<=t.length;A+=64)vu(r,DF(t.substring(A-64,A)));t=t.substring(A-64);var n=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(A=0;A<t.length;A++)n[A>>2]|=t.charCodeAt(A)<<(A%4<<3);if(n[A>>2]|=128<<(A%4<<3),A>55)for(vu(r,n),A=0;A<16;A++)n[A]=0;return n[14]=8*e,vu(r,n),r}function DF(t){var A,e=[];for(A=0;A<64;A+=4)e[A>>2]=t.charCodeAt(A)+(t.charCodeAt(A+1)<<8)+(t.charCodeAt(A+2)<<16)+(t.charCodeAt(A+3)<<24);return e}var _g="0123456789abcdef".split("");function OF(t){for(var A="",e=0;e<4;e++)A+=_g[t>>8*e+4&15]+_g[t>>8*e&15];return A}function PF(t){return String.fromCharCode(255&t,(65280&t)>>8,(16711680&t)>>16,(4278190080&t)>>24)}function of(t){return Z0(t).map(PF).join("")}var RF=(function(t){for(var A=0;A<t.length;A++)t[A]=OF(t[A]);return t.join("")})(Z0("hello"))!="5d41402abc4b2a76b9719d911017c592";function fi(t,A){if(RF){var e=(65535&t)+(65535&A);return(t>>16)+(A>>16)+(e>>16)<<16|65535&e}return t+A&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 lf(t,A){var e,r,n,i;if(t!==e){for(var a=(n=t,i=1+(256/t.length|0),new Array(i+1).join(n)),s=[],l=0;l<256;l++)s[l]=l;var u=0;for(l=0;l<256;l++){var f=s[l];u=(u+f+a.charCodeAt(l))%256,s[l]=s[u],s[u]=f}e=t,r=s}else s=r;var p=A.length,B=0,d=0,m="";for(l=0;l<p;l++)d=(d+(f=s[B=(B+1)%256]))%256,s[B]=s[d],s[d]=f,a=s[(s[B]+s[d])%256],m+=String.fromCharCode(A.charCodeAt(l)^a);return m}/**
|
|||
|
|
* @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 Ig={print:4,modify:8,copy:16,"annot-forms":32};function Ea(t,A,e,r){this.v=1,this.r=2;var n=192;t.forEach(function(s){if(Ig.perm!==void 0)throw new Error("Invalid permission: "+s);n+=Ig[s]}),this.padding="(¿N^NuAd\0NVÿú\b..\0¶Ðh>/\f©þdSiz";var i=(A+this.padding).substr(0,32),a=(e+this.padding).substr(0,32);this.O=this.processOwnerPassword(i,a),this.P=-(1+(255^n)),this.encryptionKey=of(i+this.O+this.lsbFirstWord(this.P)+this.hexToBytes(r)).substr(0,5),this.U=lf(this.encryptionKey,this.padding)}function La(t){if(/[^\u0000-\u00ff]/.test(t))throw new Error("Invalid PDF Name Object: "+t+", Only accept ASCII characters.");for(var A="",e=t.length,r=0;r<e;r++){var n=t.charCodeAt(r);A+=n<33||n===35||n===37||n===40||n===41||n===47||n===60||n===62||n===91||n===93||n===123||n===125||n>126?"#"+("0"+n.toString(16)).slice(-2):t[r]}return A}function Sg(t){if(je(t)!=="object")throw new Error("Invalid Context passed to initialize PubSub (jsPDF-module)");var A={};this.subscribe=function(e,r,n){if(n=n||!1,typeof e!="string"||typeof r!="function"||typeof n!="boolean")throw new Error("Invalid arguments passed to PubSub.subscribe (jsPDF-module)");A.hasOwnProperty(e)||(A[e]={});var i=Math.random().toString(35);return A[e][i]=[r,!!n],i},this.unsubscribe=function(e){for(var r in A)if(A[r][e])return delete A[r][e],Object.keys(A[r]).length===0&&delete A[r],!0;return!1},this.publish=function(e){if(A.hasOwnProperty(e)){var r=Array.prototype.slice.call(arguments,1),n=[];for(var i in A[e]){var a=A[e][i];try{a[0].apply(t,r)}catch(s){re.console&&Ve.error("jsPDF PubSub Error",s.message,s)}a[1]&&n.push(i)}n.length&&n.forEach(this.unsubscribe)}},this.getTopics=function(){return A}}function Rl(t){if(!(this instanceof Rl))return new Rl(t);var A="opacity,stroke-opacity".split(",");for(var e in t)t.hasOwnProperty(e)&&A.indexOf(e)>=0&&(this[e]=t[e]);this.id="",this.objectNumber=-1}function A1(t,A){this.gState=t,this.matrix=A,this.id="",this.objectNumber=-1}function Mi(t,A,e,r,n){if(!(this instanceof Mi))return new Mi(t,A,e,r,n);this.type=t==="axial"?2:3,this.coords=A,this.colors=e,A1.call(this,r,n)}function Ia(t,A,e,r,n){if(!(this instanceof Ia))return new Ia(t,A,e,r,n);this.boundingBox=t,this.xStep=A,this.yStep=e,this.stream="",this.cloneIndex=0,A1.call(this,r,n)}function jA(t){var A,e=typeof arguments[0]=="string"?arguments[0]:"p",r=arguments[1],n=arguments[2],i=arguments[3],a=[],s=1,l=16,u="S",f=null;je(t=t||{})==="object"&&(e=t.orientation,r=t.unit||r,n=t.format||n,i=t.compress||t.compressPdf||i,(f=t.encryption||null)!==null&&(f.userPassword=f.userPassword||"",f.ownerPassword=f.ownerPassword||"",f.userPermissions=f.userPermissions||[]),s=typeof t.userUnit=="number"?Math.abs(t.userUnit):1,t.precision!==void 0&&(A=t.precision),t.floatPrecision!==void 0&&(l=t.floatPrecision),u=t.defaultPathOperation||"S"),a=t.filters||(i===!0?["FlateEncode"]:a),r=r||"mm",e=(""+(e||"P")).toLowerCase();var p=t.putOnlyUsedFonts||!1,B={},d={internal:{},__private__:{}};d.__private__.PubSub=Sg;var m="1.3",C=d.__private__.getPdfVersion=function(){return m};d.__private__.setPdfVersion=function(h){m=h};var E={a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89],a5:[419.53,595.28],a6:[297.64,419.53],a7:[209.76,297.64],a8:[147.4,209.76],a9:[104.88,147.4],a10:[73.7,104.88],b0:[2834.65,4008.19],b1:[2004.09,2834.65],b2:[1417.32,2004.09],b3:[1000.63,1417.32],b4:[708.66,1000.63],b5:[498.9,708.66],b6:[354.33,498.9],b7:[249.45,354.33],b8:[175.75,249.45],b9:[124.72,175.75],b10:[87.87,124.72],c0:[2599.37,3676.54],c1:[1836.85,2599.37],c2:[1298.27,1836.85],c3:[918.43,1298.27],c4:[649.13,918.43],c5:[459.21,649.13],c6:[323.15,459.21],c7:[229.61,323.15],c8:[161.57,229.61],c9:[113.39,161.57],c10:[79.37,113.39],dl:[311.81,623.62],letter:[612,792],"government-letter":[576,756],legal:[612,1008],"junior-legal":[576,360],ledger:[1224,792],tabloid:[792,1224],"credit-card":[153,243]};d.__private__.getPageFormats=function(){return E};var v=d.__private__.getPageFormat=function(h){return E[h]};n=n||"a4";var H="compat",R="advanced",k=H;function j
|
|||
|
|
`),mr(h,b),Ie.publish("endTilingPattern",b),zr.pop().restore()};var vr,et=d.__private__.newObject=function(){var h=Et();return St(h,!0),h},Et=d.__private__.newObjectDeferred=function(){return Y++,tA[Y]=function(){return hA},Y},St=function(h,b){return b=typeof b=="boolean"&&b,tA[h]=hA,b&&N(h+" 0 obj"),h},Ci=d.__private__.newAdditionalObject=function(){var h={objId:Et(),content:""};return dA.push(h),h},Kn=Et(),Hr=Et(),Xr=d.__private__.decodeColorString=function(h){var b=h.split(" ");if(b.length!==2||b[1]!=="g"&&b[1]!=="G")b.length!==5||b[4]!=="k"&&b[4]!=="K"||(b=[(1-b[0])*(1-b[3]),(1-b[1])*(1-b[3]),(1-b[2])*(1-b[3]),"r"]);else{var P=parseFloat(b[0]);b=[P,P,P,"r"]}for(var z="#",AA=0;AA<3;AA++)z+=("0"+Math.floor(255*parseFloat(b[AA])).toString(16)).slice(-2);return z},Nr=d.__private__.encodeColorString=function(h){var b;typeof h=="string"&&(h={ch1:h});var P=h.ch1,z=h.ch2,AA=h.ch3,BA=h.ch4,vA=h.pdfColorType==="draw"?["G","RG","K"]:["g","rg","k"];if(typeof P=="string"&&P.charAt(0)!=="#"){var PA=new $0(P);if(PA.ok)P=PA.toHex();else if(!/^\d*\.?\d*$/.test(P))throw new Error('Invalid color "'+P+'" passed to jsPDF.encodeColorString.')}if(typeof P=="string"&&/^#[0-9A-Fa-f]{3}$/.test(P)&&(P="#"+P[1]+P[1]+P[2]+P[2]+P[3]+P[3]),typeof P=="string"&&/^#[0-9A-Fa-f]{6}$/.test(P)){var GA=parseInt(P.substr(1),16);P=GA>>16&255,z=GA>>8&255,AA=255&GA}if(z===void 0||BA===void 0&&P===z&&z===AA)b=typeof P=="string"?P+" "+vA[0]:h.precision===2?U(P/255)+" "+vA[0]:S(P/255)+" "+vA[0];else if(BA===void 0||je(BA)==="object"){if(BA&&!isNaN(BA.a)&&BA.a===0)return["1.","1.","1.",vA[1]].join(" ");b=typeof P=="string"?[P,z,AA,vA[1]].join(" "):h.precision===2?[U(P/255),U(z/255),U(AA/255),vA[1]].join(" "):[S(P/255),S(z/255),S(AA/255),vA[1]].join(" ")}else b=typeof P=="string"?[P,z,AA,BA,vA[2]].join(" "):h.precision===2?[U(P),U(z),U(AA),U(BA),vA[2]].join(" "):[S(P),S(z),S(AA),S(BA),vA[2]].join(" ");return b},kr=d.__private__.getFilters=function(){return a},Cr=d.__private__.putStream=function(h){var b=(h=h||{}).data||"",P=h.filters||kr(),z=h.alreadyAppliedFilters||[],AA=h.addLength1||!1,BA=b.length,vA=h.objectId,PA=function(Ct){return Ct};if(f!==null&&vA===void 0)throw new Error("ObjectId must be passed to putStream for file encryption");f!==null&&(PA=vt.encryptor(vA,0));var GA={};P===!0&&(P=["FlateEncode"]);var ie=h.additionalKeyValues||[],ge=(GA=jA.API.processDataByFilters!==void 0?jA.API.processDataByFilters(b,P):{data:b,reverseChain:[]}).reverseChain+(Array.isArray(z)?z.join(" "):z.toString());if(GA.data.length!==0&&(ie.push({key:"Length",value:GA.data.length}),AA===!0&&ie.push({key:"Length1",value:BA})),ge.length!=0)if(ge.split("/").length-1==1)ie.push({key:"Filter",value:ge});else{ie.push({key:"Filter",value:"["+ge+"]"});for(var Ee=0;Ee<ie.length;Ee+=1)if(ie[Ee].key==="DecodeParms"){for(var At=[],pt=0;pt<GA.reverseChain.split("/").length-1;pt+=1)At.push("null");At.push(ie[Ee].value),ie[Ee].value="["+At.join(" ")+"]"}}N("<<");for(var qe=0;qe<ie.length;qe++)N("/"+ie[qe].key+" "+ie[qe].value);N(">>"),GA.data.length!==0&&(N("stream"),N(PA(GA.data)),N("endstream"))},bi=d.__private__.putPage=function(h){var b=h.number,P=h.data,z=h.objId,AA=h.contentsObjId;St(z,!0),N("<</Type /Page"),N("/Parent "+h.rootDictionaryObjId+" 0 R"),N("/Resources "+h.resourceDictionaryObjId+" 0 R"),N("/MediaBox ["+parseFloat(K(h.mediaBox.bottomLeftX))+" "+parseFloat(K(h.mediaBox.bottomLeftY))+" "+K(h.mediaBox.topRightX)+" "+K(h.mediaBox.topRightY)+"]"),h.cropBox!==null&&N("/CropBox ["+K(h.cropBox.bottomLeftX)+" "+K(h.cropBox.bottomLeftY)+" "+K(h.cropBox.topRightX)+" "+K(h.cropBox.topRightY)+"]"),h.bleedBox!==null&&N("/BleedBox ["+K(h.bleedBox.bottomLeftX)+" "+K(h.bleedBox.bottomLeftY)+" "+K(h.bleedBox.topRightX)+" "+K(h.bleedBox.topRightY)+"]"),h.trimBox!==null&&N("/TrimBox ["+K(h.trimBox.bottomLeftX)+" "+K(h.trimBox.bottomLeftY)+" "+K(h.trimBox.topRightX)+" "+K(h.trimBox.topRightY)+"]"),h.artBox!==null&&N("/ArtBox ["+K(h.artBox.bottomLeftX)+" "+K(h.artBox.bottomLeftY)+" "+K(h.artBox.topRightX)+" "+K(h.artBox.topRightY)+"]"),typeof h.userUnit=="number"&&h.userUnit!==1&&N("/UserUnit "+h
|
|||
|
|
`);return k===R&&(BA+=`
|
|||
|
|
Q`),St(AA,!0),Cr({data:BA,filters:kr(),objectId:AA}),N("endobj"),z},Jr=d.__private__.putPages=function(){var h,b,P=[];for(h=1;h<=ye;h++)Ae[h].objId=Et(),Ae[h].contentsObjId=Et();for(h=1;h<=ye;h++)P.push(bi({number:h,data:oA[h],objId:Ae[h].objId,contentsObjId:Ae[h].contentsObjId,mediaBox:Ae[h].mediaBox,cropBox:Ae[h].cropBox,bleedBox:Ae[h].bleedBox,trimBox:Ae[h].trimBox,artBox:Ae[h].artBox,userUnit:Ae[h].userUnit,rootDictionaryObjId:Kn,resourceDictionaryObjId:Hr}));St(Kn,!0),N("<</Type /Pages");var z="/Kids [";for(b=0;b<ye;b++)z+=P[b]+" 0 R ";N(z+"]"),N("/Count "+ye),N(">>"),N("endobj"),Ie.publish("postPutPages")},yi=function(h){Ie.publish("putFont",{font:h,out:N,newObject:et,putStream:Cr}),h.isAlreadyPutted!==!0&&(h.objectNumber=et(),N("<<"),N("/Type /Font"),N("/BaseFont /"+La(h.postScriptName)),N("/Subtype /Type1"),typeof h.encoding=="string"&&N("/Encoding /"+h.encoding),N("/FirstChar 32"),N("/LastChar 255"),N(">>"),N("endobj"))},ta=function(h){h.objectNumber=et();var b=[];b.push({key:"Type",value:"/XObject"}),b.push({key:"Subtype",value:"/Form"}),b.push({key:"BBox",value:"["+[K(h.x),K(h.y),K(h.x+h.width),K(h.y+h.height)].join(" ")+"]"}),b.push({key:"Matrix",value:"["+h.matrix.toString()+"]"});var P=h.pages[1].join(`
|
|||
|
|
`);Cr({data:P,additionalKeyValues:b,objectId:h.objectNumber}),N("endobj")},ra=function(h,b){b||(b=21);var P=et(),z=(function(vA,PA){var GA,ie=[],ge=1/(PA-1);for(GA=0;GA<1;GA+=ge)ie.push(GA);if(ie.push(1),vA[0].offset!=0){var Ee={offset:0,color:vA[0].color};vA.unshift(Ee)}if(vA[vA.length-1].offset!=1){var At={offset:1,color:vA[vA.length-1].color};vA.push(At)}for(var pt="",qe=0,Ct=0;Ct<ie.length;Ct++){for(GA=ie[Ct];GA>vA[qe+1].offset;)qe++;var Bt=vA[qe].offset,Ht=(GA-Bt)/(vA[qe+1].offset-Bt),Fn=vA[qe].color,Dr=vA[qe+1].color;pt+=q(Math.round((1-Ht)*Fn[0]+Ht*Dr[0]).toString(16))+q(Math.round((1-Ht)*Fn[1]+Ht*Dr[1]).toString(16))+q(Math.round((1-Ht)*Fn[2]+Ht*Dr[2]).toString(16))}return pt.trim()})(h.colors,b),AA=[];AA.push({key:"FunctionType",value:"0"}),AA.push({key:"Domain",value:"[0.0 1.0]"}),AA.push({key:"Size",value:"["+b+"]"}),AA.push({key:"BitsPerSample",value:"8"}),AA.push({key:"Range",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),AA.push({key:"Decode",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),Cr({data:z,additionalKeyValues:AA,alreadyAppliedFilters:["/ASCIIHexDecode"],objectId:P}),N("endobj"),h.objectNumber=et(),N("<< /ShadingType "+h.type),N("/ColorSpace /DeviceRGB");var BA="/Coords ["+K(parseFloat(h.coords[0]))+" "+K(parseFloat(h.coords[1]))+" ";h.type===2?BA+=K(parseFloat(h.coords[2]))+" "+K(parseFloat(h.coords[3])):BA+=K(parseFloat(h.coords[2]))+" "+K(parseFloat(h.coords[3]))+" "+K(parseFloat(h.coords[4]))+" "+K(parseFloat(h.coords[5])),N(BA+="]"),h.matrix&&N("/Matrix ["+h.matrix.toString()+"]"),N("/Function "+P+" 0 R"),N("/Extend [true true]"),N(">>"),N("endobj")},na=function(h,b){var P=Et(),z=et();b.push({resourcesOid:P,objectOid:z}),h.objectNumber=z;var AA=[];AA.push({key:"Type",value:"/Pattern"}),AA.push({key:"PatternType",value:"1"}),AA.push({key:"PaintType",value:"1"}),AA.push({key:"TilingType",value:"1"}),AA.push({key:"BBox",value:"["+h.boundingBox.map(K).join(" ")+"]"}),AA.push({key:"XStep",value:K(h.xStep)}),AA.push({key:"YStep",value:K(h.yStep)}),AA.push({key:"Resources",value:P+" 0 R"}),h.matrix&&AA.push({key:"Matrix",value:"["+h.matrix.toString()+"]"}),Cr({data:h.stream,additionalKeyValues:AA,objectId:h.objectNumber}),N("endobj")},nc=function(h){for(var b in h.objectNumber=et(),N("<<"),h)switch(b){case"opacity":N("/ca "+U(h[b]));break;case"stroke-opacity":N("/CA "+U(h[b]))}N(">>"),N("endobj")},Ra=function(h){St(h.resourcesOid,!0),N("<<"),N("/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]"),(function(){for(var b in N("/Font <<"),oe)oe.hasOwnProperty(b)&&(p===!1||p===!0&&B.hasOwnProperty(b))&&N("/"+b+" "+oe[b].objectNumber+" 0 R");N(">>")})(),(function(){if(Object.keys(WA).length>0){for(var b in N("/Shading <<"),WA)WA.hasOwnProperty(b)&&WA[b]instanceof Mi&&WA[b].objectNumber>=0&&N("/"+b+" "+WA[b].objectNumber+" 0 R");Ie.publish("putShadingPatternDict"),N(">>")}})(),(function(b){if(Object.keys(WA).length>0){for(var P in N("/Pattern <<"),WA)WA.hasOwnProperty(P)&&WA[P]instanceof d.TilingPattern&&WA[P].objectNumber>=0&&WA[P].objectNumber<b&&N("/"+P+" "+WA[P].objectNumber+" 0 R");Ie.publish("putTilingPatternDict"),N(">>")}})(h.objectOid),(function(){if(Object.keys($A).length>0){var b;for(b in N("/ExtGState <<"),$A)$A.hasOwnProperty(b)&&$A[b].objectNumber>=0&&N("/"+b+" "+$A[b].objectNumber+" 0 R");Ie.publish("putGStateDict"),N(">>")}})(),(function(){for(var b in N("/XObject <<"),Mt)Mt.hasOwnProperty(b)&&Mt[b].objectNumber>=0&&N("/"+b+" "+Mt[b].objectNumber+" 0 R");Ie.publish("putXobjectDict"),N(">>")})(),N(">>"),N("endobj")},zs=function(h){le[h.fontName]=le[h.fontName]||{},le[h.fontName][h.fontStyle]=h.id},Xs=function(h,b,P,z,AA){var BA={id:"F"+(Object.keys(oe).length+1).toString(10),postScriptName:h,fontName:b,fontStyle:P,encoding:z,isStandardFont:AA||!1,metadata:{}};return Ie.publish("addFont",{font:BA,instance:this}),oe[BA.id]=BA,zs(BA),BA.id},br=d.__private__.pdfEscape=d.pdfEscape=function(h,b){return(function(P,z){var AA,BA,vA,PA,GA,ie,ge,Ee,At;if(vA=(z=z||{}).sourceEncoding||"Unicode",GA=z.outputEncoding,(z.autoencode||GA)&&oe[RA].metadata&&oe[RA].metadata[vA]&&oe[RA].metadata[vA].encoding&&(PA=oe[RA].metadata[vA].encodi
|
|||
|
|
`)},aa=d.__private__.getBlob=function(h){return new Blob([fe(h)],{type:"application/pdf"})},eo=d.output=d.__private__.output=(vr=function(h,b){switch(typeof(b=b||{})=="string"?b={filename:b}:b.filename=b.filename||"generated.pdf",h){case void 0:return $r();case"save":d.save(b.filename);break;case"arraybuffer":return fe($r());case"blob":return aa($r());case"bloburi":case"bloburl":if(re.URL!==void 0&&typeof re.URL.createObjectURL=="function")return re.URL&&re.URL.createObjectURL(aa($r()))||void 0;Ve.warn("bloburl is not supported by your system, because URL.createObjectURL is not supported by your browser.");break;case"datauristring":case"dataurlstring":var P="",z=$r();try{P=Lg(z)}catch{P=Lg(unescape(encodeURIComponent(z)))}return"data:application/pdf;filename="+b.filename+";base64,"+P;case"pdfobjectnewwindow":if(Object.prototype.toString.call(re)==="[object Window]"){var AA="https://cdnjs.cloudflare.com/ajax/libs/pdfobject/2.1.1/pdfobject.min.js",BA=' integrity="sha512-4ze/a9/4jqu+tX9dfOqJYSvyYd5M6qum/3HpCLr+/Jqf0whc37VUbkpNGHR7/8pSnCFw47T1fmIpwBV7UySh3g==" crossorigin="anonymous"';b.pdfObjectUrl&&(AA=b.pdfObjectUrl,BA="");var vA='<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;} </style><body><script src="'+AA+'"'+BA+'><\/script><script >PDFObject.embed("'+this.output("dataurlstring")+'", '+JSON.stringify(b)+");<\/script></body></html>",PA=re.open();return PA!==null&&PA.document.write(vA),PA}throw new Error("The option pdfobjectnewwindow just works in a browser-environment.");case"pdfjsnewwindow":if(Object.prototype.toString.call(re)==="[object Window]"){var GA='<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;} </style><body><iframe id="pdfViewer" src="'+(b.pdfJsUrl||"examples/PDF.js/web/viewer.html")+"?file=&downloadName="+b.filename+'" width="500px" height="400px" /></body></html>',ie=re.open();if(ie!==null){ie.document.write(GA);var ge=this;ie.document.documentElement.querySelector("#pdfViewer").onload=function(){ie.document.title=b.filename,ie.document.documentElement.querySelector("#pdfViewer").contentWindow.PDFViewerApplication.open(ge.output("bloburl"))}}return ie}throw new Error("The option pdfjsnewwindow just works in a browser-environment.");case"dataurlnewwindow":if(Object.prototype.toString.call(re)!=="[object Window]")throw new Error("The option dataurlnewwindow just works in a browser-environment.");var Ee='<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;} </style><body><iframe src="'+this.output("datauristring",b)+'"></iframe></body></html>',At=re.open();if(At!==null&&(At.document.write(Ee),At.document.title=b.filename),At||typeof safari>"u")return At;break;case"datauri":case"dataurl":return re.document.location.href=this.output("datauristring",b);default:return null}},vr.foo=function(){try{return vr.apply(this,arguments)}catch(P){var h=P.stack||"";~h.indexOf(" at ")&&(h=h.split(" at ")[1]);var b="Error in function "+h.split(`
|
|||
|
|
`)[0].split("<")[0]+": "+P.message;if(!re.console)throw new Error(b);re.console.error(b,P),re.alert&&alert(b)}},vr.foo.bar=vr,vr.foo),yr=function(h){return Array.isArray(vi)===!0&&vi.indexOf(h)>-1};switch(r){case"pt":se=1;break;case"mm":se=72/25.4;break;case"cm":se=72/2.54;break;case"in":se=72;break;case"px":se=yr("px_scaling")==1?.75:96/72;break;case"pc":case"em":se=12;break;case"ex":se=6;break;default:if(typeof r!="number")throw new Error("Invalid unit: "+r);se=r}var vt=null;uA(),eA();var Bn=d.__private__.getPageInfo=d.getPageInfo=function(h){if(isNaN(h)||h%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfo");return{objId:Ae[h].objId,pageNumber:h,pageContext:Ae[h]}},to=d.__private__.getPageInfoByObjId=function(h){if(isNaN(h)||h%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfoByObjId");for(var b in Ae)if(Ae[b].objId===h)break;return Bn(b)},ac=d.__private__.getCurrentPageInfo=d.getCurrentPageInfo=function(){return{objId:Ae[T].objId,pageNumber:T,pageContext:Ae[T]}};d.addPage=function(){return Js.apply(this,arguments),this},d.setPage=function(){return Ys.apply(this,arguments),IA.call(this,oA[T]),this},d.insertPage=function(h){return this.addPage(),this.movePage(T,h),this},d.movePage=function(h,b){var P,z;if(h>b){P=oA[h],z=Ae[h];for(var AA=h;AA>b;AA--)oA[AA]=oA[AA-1],Ae[AA]=Ae[AA-1];oA[b]=P,Ae[b]=z,this.setPage(b)}else if(h<b){P=oA[h],z=Ae[h];for(var BA=h;BA<b;BA++)oA[BA]=oA[BA+1],Ae[BA]=Ae[BA+1];oA[b]=P,Ae[b]=z,this.setPage(b)}return this},d.deletePage=function(){return Ka.apply(this,arguments),this},d.__private__.text=d.text=function(h,b,P,z,AA){var BA,vA,PA,GA,ie,ge,Ee,At,pt,qe=(z=z||{}).scope||this;if(typeof h=="number"&&typeof b=="number"&&(typeof P=="string"||Array.isArray(P))){var Ct=P;P=b,b=h,h=Ct}if(arguments[3]instanceof ee==0?(PA=arguments[4],GA=arguments[5],je(Ee=arguments[3])==="object"&&Ee!==null||(typeof PA=="string"&&(GA=PA,PA=null),typeof Ee=="string"&&(GA=Ee,Ee=null),typeof Ee=="number"&&(PA=Ee,Ee=null),z={flags:Ee,angle:PA,align:GA})):(L("The transform parameter of text() with a Matrix value"),pt=AA),isNaN(b)||isNaN(P)||h==null)throw new Error("Invalid arguments passed to jsPDF.text");if(h.length===0)return qe;var Bt,Ht="",Fn=typeof z.lineHeightFactor=="number"?z.lineHeightFactor:Qi,Dr=qe.internal.scaleFactor;function Qn(Se){return Se=Se.split(" ").join(Array(z.TabLen||9).join(" ")),br(Se,Ee)}function Ya(Se){for(var Ke,at=Se.concat(),bt=[],En=at.length;En--;)typeof(Ke=at.shift())=="string"?bt.push(Ke):Array.isArray(Se)&&(Ke.length===1||Ke[1]===void 0&&Ke[2]===void 0)?bt.push(Ke[0]):bt.push([Ke[0],Ke[1],Ke[2]]);return bt}function ca(Se,Ke){var at;if(typeof Se=="string")at=Ke(Se)[0];else if(Array.isArray(Se)){for(var bt,En,ss=Se.concat(),ha=[],ho=ss.length;ho--;)typeof(bt=ss.shift())=="string"?ha.push(Ke(bt)[0]):Array.isArray(bt)&&typeof bt[0]=="string"&&(En=Ke(bt[0],bt[1],bt[2]),ha.push([En[0],En[1],En[2]]));at=ha}return at}var Gn=!1,Li=!0;if(typeof h=="string")Gn=!0;else if(Array.isArray(h)){var _i=h.concat();vA=[];for(var Vn,Nt=_i.length;Nt--;)(typeof(Vn=_i.shift())!="string"||Array.isArray(Vn)&&typeof Vn[0]!="string")&&(Li=!1);Gn=Li}if(Gn===!1)throw new Error('Type of text must be string or Array. "'+h+'" is not recognized.');typeof h=="string"&&(h=h.match(/[\r?\n]/)?h.split(/\r\n|\r|\n/g):[h]);var Ii=yA/qe.internal.scaleFactor,Si=Ii*(Fn-1);switch(z.baseline){case"bottom":P-=Si;break;case"top":P+=Ii-Si;break;case"hanging":P+=Ii-2*Si;break;case"middle":P+=Ii/2-Si}if((ge=z.maxWidth||0)>0&&(typeof h=="string"?h=qe.splitTextToSize(h,ge):Object.prototype.toString.call(h)==="[object Array]"&&(h=h.reduce(function(Se,Ke){return Se.concat(qe.splitTextToSize(Ke,ge))},[]))),BA={text:h,x:b,y:P,options:z,mutex:{pdfEscape:br,activeFontKey:RA,fonts:oe,activeFontSize:yA}},Ie.publish("preProcessText",BA),h=BA.text,PA=(z=BA.options).angle,pt instanceof ee==0&&PA&&typeof PA=="number"){PA*=Math.PI/180,z.rotationDirection===0&&(PA=-PA),k===R&&(PA=-PA);var $a=Math.cos(PA),Za=Math.sin(PA);pt=new ee($a,Za,-Za,$a,0,0)}else PA&&PA instanceof ee&&(pt=PA);k!==R||pt||(pt=pn),(ie=z.charSpace||vn)!=
|
|||
|
|
`,this.setCharSpace(this.getCharSpace()||0)),(At=z.horizontalScale)!==void 0&&(Ht+=K(100*At)+` Tz
|
|||
|
|
`),z.lang;var Xt=-1,Un=z.renderingMode!==void 0?z.renderingMode:z.stroke,ua=qe.internal.getCurrentPageInfo().pageContext;switch(Un){case 0:case!1:case"fill":Xt=0;break;case 1:case!0:case"stroke":Xt=1;break;case 2:case"fillThenStroke":Xt=2;break;case 3:case"invisible":Xt=3;break;case 4:case"fillAndAddForClipping":Xt=4;break;case 5:case"strokeAndAddPathForClipping":Xt=5;break;case 6:case"fillThenStrokeAndAddToPathForClipping":Xt=6;break;case 7:case"addToPathForClipping":Xt=7}var uo=ua.usedRenderingMode!==void 0?ua.usedRenderingMode:-1;Xt!==-1?Ht+=Xt+` Tr
|
|||
|
|
`:uo!==-1&&(Ht+=`0 Tr
|
|||
|
|
`),Xt!==-1&&(ua.usedRenderingMode=Xt),GA=z.align||"left";var Fr,Hi=yA*Fn,As=qe.internal.pageSize.getWidth(),es=oe[RA];ie=z.charSpace||vn,ge=z.maxWidth||0,Ee=Object.assign({autoencode:!0,noBOM:!0},z.flags);var jn=[],Ni=function(Se){return qe.getStringUnitWidth(Se,{font:es,charSpace:ie,fontSize:yA,doKerning:!1})*yA/Dr};if(Object.prototype.toString.call(h)==="[object Array]"){var ar;vA=Ya(h),GA!=="left"&&(Fr=vA.map(Ni));var sr,qn=0;if(GA==="right"){b-=Fr[0],h=[],Nt=vA.length;for(var xn=0;xn<Nt;xn++)xn===0?(sr=wn(b),ar=mn(P)):(sr=G(qn-Fr[xn]),ar=-Hi),h.push([vA[xn],sr,ar]),qn=Fr[xn]}else if(GA==="center"){b-=Fr[0]/2,h=[],Nt=vA.length;for(var Wn=0;Wn<Nt;Wn++)Wn===0?(sr=wn(b),ar=mn(P)):(sr=G((qn-Fr[Wn])/2),ar=-Hi),h.push([vA[Wn],sr,ar]),qn=Fr[Wn]}else if(GA==="left"){h=[],Nt=vA.length;for(var ts=0;ts<Nt;ts++)h.push(vA[ts])}else if(GA==="justify"&&es.encoding==="Identity-H"){h=[],Nt=vA.length,ge=ge!==0?ge:As;for(var fa=0,it=0;it<Nt;it++)if(ar=it===0?mn(P):-Hi,sr=it===0?wn(b):fa,it<Nt-1){var fo=G((ge-Fr[it])/(vA[it].split(" ").length-1)),An=vA[it].split(" ");h.push([An[0]+" ",sr,ar]),fa=0;for(var en=1;en<An.length;en++){var rs=(Ni(An[en-1]+" "+An[en])-Ni(An[en]))*Dr+fo;en==An.length-1?h.push([An[en],rs,0]):h.push([An[en]+" ",rs,0]),fa-=rs}}else h.push([vA[it],sr,ar]);h.push(["",fa,0])}else{if(GA!=="justify")throw new Error('Unrecognized alignment option, use "left", "center", "right" or "justify".');for(h=[],Nt=vA.length,ge=ge!==0?ge:As,it=0;it<Nt;it++){ar=it===0?mn(P):-Hi,sr=it===0?wn(b):0;var ns=vA[it].split(" ").length-1,is=ns>0?(ge-Fr[it])/ns:0;it<Nt-1?jn.push(K(G(is))):jn.push(0),h.push([vA[it],sr,ar])}}}(typeof z.R2L=="boolean"?z.R2L:zA)===!0&&(h=ca(h,function(Se,Ke,at){return[Se.split("").reverse().join(""),Ke,at]})),BA={text:h,x:b,y:P,options:z,mutex:{pdfEscape:br,activeFontKey:RA,fonts:oe,activeFontSize:yA}},Ie.publish("postProcessText",BA),h=BA.text,Bt=BA.mutex.isHex||!1;var as=oe[RA].encoding;as!=="WinAnsiEncoding"&&as!=="StandardEncoding"||(h=ca(h,function(Se,Ke,at){return[Qn(Se),Ke,at]})),vA=Ya(h),h=[];for(var zn,Xn,Jn,ki=Array.isArray(vA[0])?1:0,Yn="",Ti=function(Se,Ke,at){var bt="";return at instanceof ee?(at=typeof z.angle=="number"?gn(at,new ee(1,0,0,1,Se,Ke)):gn(new ee(1,0,0,1,Se,Ke),at),k===R&&(at=gn(new ee(1,0,0,-1,0,0),at)),bt=at.join(" ")+` Tm
|
|||
|
|
`):bt=K(Se)+" "+K(Ke)+` Td
|
|||
|
|
`,bt},Qr=0;Qr<vA.length;Qr++){switch(Yn="",ki){case 1:Jn=(Bt?"<":"(")+vA[Qr][0]+(Bt?">":")"),zn=parseFloat(vA[Qr][1]),Xn=parseFloat(vA[Qr][2]);break;case 0:Jn=(Bt?"<":"(")+vA[Qr]+(Bt?">":")"),zn=wn(b),Xn=mn(P)}jn!==void 0&&jn[Qr]!==void 0&&(Yn=jn[Qr]+` Tw
|
|||
|
|
`),Qr===0?h.push(Yn+Ti(zn,Xn,pt)+Jn):ki===0?h.push(Yn+Jn):ki===1&&h.push(Yn+Ti(zn,Xn,pt)+Jn)}h=ki===0?h.join(` Tj
|
|||
|
|
T* `):h.join(` Tj
|
|||
|
|
`),h+=` Tj
|
|||
|
|
`;var tn=`BT
|
|||
|
|
/`;return tn+=RA+" "+yA+` Tf
|
|||
|
|
`,tn+=K(yA*Fn)+` TL
|
|||
|
|
`,tn+=Ui+`
|
|||
|
|
`,tn+=Ht,tn+=h,N(tn+="ET"),B[RA]=!0,qe};var sc=d.__private__.clip=d.clip=function(h){return N(h==="evenodd"?"W*":"W"),this};d.clipEvenOdd=function(){return sc("evenodd")},d.__private__.discardPath=d.discardPath=function(){return N("n"),this};var Zr=d.__private__.isValidStyle=function(h){var b=!1;return[void 0,null,"S","D","F","DF","FD","f","f*","B","B*","n"].indexOf(h)!==-1&&(b=!0),b};d.__private__.setDefaultPathOperation=d.setDefaultPathOperation=function(h){return Zr(h)&&(u=h),this};var ro=d.__private__.getStyle=d.getStyle=function(h){var b=u;switch(h){case"D":case"S":b="S";break;case"F":b="f";break;case"FD":case"DF":b="B";break;case"f":case"f*":case"B":case"B*":b=h}return b},no=d.close=function(){return N("h"),this};d.stroke=function(){return N("S"),this},d.fill=function(h){return sa("f",h),this},d.fillEvenOdd=function(h){return sa("f*",h),this},d.fillStroke=function(h){return sa("B",h),this},d.fillStrokeEvenOdd=function(h){return sa("B*",h),this};var sa=function(h,b){je(b)==="object"?lc(b,h):N(h)},Fi=function(h){h===null||k===R&&h===void 0||(h=ro(h),N(h))};function oc(h,b,P,z,AA){var BA=new Ia(b||this.boundingBox,P||this.xStep,z||this.yStep,this.gState,AA||this.matrix);BA.stream=this.stream;var vA=h+"$$"+this.cloneIndex+++"$$";return mr(vA,BA),BA}var lc=function(h,b){var P=Ne[h.key],z=WA[P];if(z instanceof Mi)N("q"),N(cc(b)),z.gState&&d.setGState(z.gState),N(h.matrix.toString()+" cm"),N("/"+P+" sh"),N("Q");else if(z instanceof Ia){var AA=new ee(1,0,0,-1,0,Ei());h.matrix&&(AA=AA.multiply(h.matrix||pn),P=oc.call(z,h.key,h.boundingBox,h.xStep,h.yStep,AA).id),N("q"),N("/Pattern cs"),N("/"+P+" scn"),z.gState&&d.setGState(z.gState),N(b),N("Q")}},cc=function(h){switch(h){case"f":case"F":case"n":return"W n";case"f*":return"W* n";case"B":case"S":return"W S";case"B*":return"W* S"}},Ga=d.moveTo=function(h,b){return N(K(G(h))+" "+K(V(b))+" m"),this},io=d.lineTo=function(h,b){return N(K(G(h))+" "+K(V(b))+" l"),this},Tr=d.curveTo=function(h,b,P,z,AA,BA){return N([K(G(h)),K(V(b)),K(G(P)),K(V(z)),K(G(AA)),K(V(BA)),"c"].join(" ")),this};d.__private__.line=d.line=function(h,b,P,z,AA){if(isNaN(h)||isNaN(b)||isNaN(P)||isNaN(z)||!Zr(AA))throw new Error("Invalid arguments passed to jsPDF.line");return k===H?this.lines([[P-h,z-b]],h,b,[1,1],AA||"S"):this.lines([[P-h,z-b]],h,b,[1,1]).stroke()},d.__private__.lines=d.lines=function(h,b,P,z,AA,BA){var vA,PA,GA,ie,ge,Ee,At,pt,qe,Ct,Bt,Ht;if(typeof h=="number"&&(Ht=P,P=b,b=h,h=Ht),z=z||[1,1],BA=BA||!1,isNaN(b)||isNaN(P)||!Array.isArray(h)||!Array.isArray(z)||!Zr(AA)||typeof BA!="boolean")throw new Error("Invalid arguments passed to jsPDF.lines");for(Ga(b,P),vA=z[0],PA=z[1],ie=h.length,Ct=b,Bt=P,GA=0;GA<ie;GA++)(ge=h[GA]).length===2?(Ct=ge[0]*vA+Ct,Bt=ge[1]*PA+Bt,io(Ct,Bt)):(Ee=ge[0]*vA+Ct,At=ge[1]*PA+Bt,pt=ge[2]*vA+Ct,qe=ge[3]*PA+Bt,Ct=ge[4]*vA+Ct,Bt=ge[5]*PA+Bt,Tr(Ee,At,pt,qe,Ct,Bt));return BA&&no(),Fi(AA),this},d.path=function(h){for(var b=0;b<h.length;b++){var P=h[b],z=P.c;switch(P.op){case"m":Ga(z[0],z[1]);break;case"l":io(z[0],z[1]);break;case"c":Tr.apply(this,z);break;case"h":no()}}return this},d.__private__.rect=d.rect=function(h,b,P,z,AA){if(isNaN(h)||isNaN(b)||isNaN(P)||isNaN(z)||!Zr(AA))throw new Error("Invalid arguments passed to jsPDF.rect");return k===H&&(z=-z),N([K(G(h)),K(V(b)),K(G(P)),K(G(z)),"re"].join(" ")),Fi(AA),this},d.__private__.triangle=d.triangle=function(h,b,P,z,AA,BA,vA){if(isNaN(h)||isNaN(b)||isNaN(P)||isNaN(z)||isNaN(AA)||isNaN(BA)||!Zr(vA))throw new Error("Invalid arguments passed to jsPDF.triangle");return this.lines([[P-h,z-b],[AA-P,BA-z],[h-AA,b-BA]],h,b,[1,1],vA,!0),this},d.__private__.roundedRect=d.roundedRect=function(h,b,P,z,AA,BA,vA){if(isNaN(h)||isNaN(b)||isNaN(P)||isNaN(z)||isNaN(AA)||isNaN(BA)||!Zr(vA))throw new Error("Invalid arguments passed to jsPDF.roundedRect");var PA=4/3*(Math.SQRT2-1);return AA=Math.min(AA,.5*P),BA=Math.min(BA,.5*z),this.lines([[P-2*AA,0],[AA*PA,0,AA,BA-BA*PA,AA,BA],[0,z-2*BA],[0,BA*PA,-AA*PA,BA,-AA,BA],[2*AA-P,0],[-AA*PA,0,-AA,-BA*PA,-AA,-BA],[0,2*BA-z],[0,-BA*PA,AA*PA,-BA,AA,-BA]],h+AA,b,[1,1],vA,!0),this},d.__private__.ellipse=
|
|||
|
|
`),i}},cf=function(t,A){var e=t.fontSize===0?t.maxFontSize:t.fontSize,r={text:"",fontSize:""},n=(A=(A=A.substr(0,1)=="("?A.substr(1):A).substr(A.length-1)==")"?A.substr(0,A.length-1):A).split(" ");n=t.multiline?n.map(function(U){return U.split(`
|
|||
|
|
`)}):n.map(function(U){return[U]});var i=e,a=TA.internal.getHeight(t)||0;a=a<0?-a:a;var s=TA.internal.getWidth(t)||0;s=s<0?-s:s;var l=function(U,S,G){if(U+1<n.length){var V=S+" "+n[U+1][0];return cl(V,t,G).width<=s-4}return!1};i++;A:for(;i>0;){A="",i--;var u,f,p=cl("3",t,i).height,B=t.multiline?a-i:(a-p)/2,d=B+=2,m=0,C=0,E=0;if(i<=0){A=`(...) Tj
|
|||
|
|
`,A+="% Width of Text: "+cl(A,t,i=12).width+", FieldWidth:"+s+`
|
|||
|
|
`;break}for(var v="",H=0,R=0;R<n.length;R++)if(n.hasOwnProperty(R)){var k=!1;if(n[R].length!==1&&E!==n[R].length-1){if((p+2)*(H+2)+2>a)continue A;v+=n[R][E],k=!0,C=R,R--}else{v=(v+=n[R][E]+" ").substr(v.length-1)==" "?v.substr(0,v.length-1):v;var j=parseInt(R),J=l(j,v,i),X=R>=n.length-1;if(J&&!X){v+=" ",E=0;continue}if(J||X){if(X)C=j;else if(t.multiline&&(p+2)*(H+2)+2>a)continue A}else{if(!t.multiline||(p+2)*(H+2)+2>a)continue A;C=j}}for(var K="",L=m;L<=C;L++){var W=n[L];if(t.multiline){if(L===C){K+=W[E]+" ",E=(E+1)%W.length;continue}if(L===m){K+=W[W.length-1]+" ";continue}}K+=W[0]+" "}switch(K=K.substr(K.length-1)==" "?K.substr(0,K.length-1):K,f=cl(K,t,i).width,t.textAlign){case"right":u=s-f-2;break;case"center":u=(s-f)/2;break;default:u=2}A+=he(u)+" "+he(d)+` Td
|
|||
|
|
`,A+="("+ea(K)+`) Tj
|
|||
|
|
`,A+=-he(u)+` 0 Td
|
|||
|
|
`,d=-(i+2),f=0,m=k?C:C+1,H++,v=""}break}return r.text=A,r.fontSize=i,r},cl=function(t,A,e){var r=A.scope.internal.getFont(A.fontName,A.fontStyle),n=A.scope.getStringUnitWidth(t,{font:r,fontSize:parseFloat(e),charSpace:0})*parseFloat(e);return{height:A.scope.getStringUnitWidth("3",{font:r,fontSize:parseFloat(e),charSpace:0})*parseFloat(e)*1.5,width:n}},qF={fields:[],xForms:[],acroFormDictionaryRoot:null,printedOut:!1,internal:null,isInitialized:!1},WF=function(t,A){var e={type:"reference",object:t};A.internal.getPageInfo(t.page).pageContext.annotations.find(function(r){return r.type===e.type&&r.object===e.object})===void 0&&A.internal.getPageInfo(t.page).pageContext.annotations.push(e)},zF=function(t,A){if(A.scope=t,t.internal!==void 0&&(t.internal.acroformPlugin===void 0||t.internal.acroformPlugin.isInitialized===!1)){if(qr.FieldNum=0,t.internal.acroformPlugin=JSON.parse(JSON.stringify(qF)),t.internal.acroformPlugin.acroFormDictionaryRoot)throw new Error("Exception while creating AcroformDictionary");Of=t.internal.scaleFactor,t.internal.acroformPlugin.acroFormDictionaryRoot=new r1,t.internal.acroformPlugin.acroFormDictionaryRoot.scope=t,t.internal.acroformPlugin.acroFormDictionaryRoot._eventID=t.internal.events.subscribe("postPutResources",function(){(function(e){e.internal.events.unsubscribe(e.internal.acroformPlugin.acroFormDictionaryRoot._eventID),delete e.internal.acroformPlugin.acroFormDictionaryRoot._eventID,e.internal.acroformPlugin.printedOut=!0})(t)}),t.internal.events.subscribe("buildDocument",function(){(function(e){e.internal.acroformPlugin.acroFormDictionaryRoot.objId=void 0;var r=e.internal.acroformPlugin.acroFormDictionaryRoot.Fields;for(var n in r)if(r.hasOwnProperty(n)){var i=r[n];i.objId=void 0,i.hasAnnotation&&WF(i,e)}})(t)}),t.internal.events.subscribe("putCatalog",function(){(function(e){if(e.internal.acroformPlugin.acroFormDictionaryRoot===void 0)throw new Error("putCatalogCallback: Root missing.");e.internal.write("/AcroForm "+e.internal.acroformPlugin.acroFormDictionaryRoot.objId+" 0 R")})(t)}),t.internal.events.subscribe("postPutPages",function(e){(function(r,n){var i=!r;for(var a in r||(n.internal.newObjectDeferredBegin(n.internal.acroformPlugin.acroFormDictionaryRoot.objId,!0),n.internal.acroformPlugin.acroFormDictionaryRoot.putStream()),r=r||n.internal.acroformPlugin.acroFormDictionaryRoot.Kids)if(r.hasOwnProperty(a)){var s=r[a],l=[],u=s.Rect;if(s.Rect&&(s.Rect=VF(s.Rect,n)),n.internal.newObjectDeferredBegin(s.objId,!0),s.DA=TA.createDefaultAppearanceStream(s),je(s)==="object"&&typeof s.getKeyValueListForStream=="function"&&(l=s.getKeyValueListForStream()),s.Rect=u,s.hasAppearanceStream&&!s.appearanceStreamContent){var f=jF(s);l.push({key:"AP",value:"<</N "+f+">>"}),n.internal.acroformPlugin.xForms.push(f)}if(s.appearanceStreamContent){var p="";for(var B in s.appearanceStreamContent)if(s.appearanceStreamContent.hasOwnProperty(B)){var d=s.appearanceStreamContent[B];if(p+="/"+B+" ",p+="<<",Object.keys(d).length>=1||Array.isArray(d)){for(var a in d)if(d.hasOwnProperty(a)){var m=d[a];typeof m=="function"&&(m=m.call(n,s)),p+="/"+a+" "+m+" ",n.internal.acroformPlugin.xForms.indexOf(m)>=0||n.internal.acroformPlugin.xForms.push(m)}}else typeof(m=d)=="function"&&(m=m.call(n,s)),p+="/"+a+" "+m,n.internal.acroformPlugin.xForms.indexOf(m)>=0||n.internal.acroformPlugin.xForms.push(m);p+=">>"}l.push({key:"AP",value:`<<
|
|||
|
|
`+p+">>"})}n.internal.putStream({additionalKeyValues:l,objectId:s.objId}),n.internal.out("endobj")}i&&(function(C,E){for(var v in C)if(C.hasOwnProperty(v)){var H=v,R=C[v];E.internal.newObjectDeferredBegin(R.objId,!0),je(R)==="object"&&typeof R.putStream=="function"&&R.putStream(),delete C[H]}})(n.internal.acroformPlugin.xForms,n)})(e,t)}),t.internal.acroformPlugin.isInitialized=!0}},e1=nt.__acroform__.arrayToPdfArray=function(t,A,e){var r=function(a){return a};if(Array.isArray(t)){for(var n="[",i=0;i<t.length;i++)switch(i!==0&&(n+=" "),je(t[i])){case"boolean":case"number":case"object":n+=t[i].toString();break;case"string":t[i].substr(0,1)==="/"?n+="/"+Ji(t[i].substr(1)):(A!==void 0&&e&&(r=e.internal.getEncryptor(A)),n+="("+ea(r(t[i].toString()))+")")}return n+"]"}throw new Error("Invalid argument passed to jsPDF.__acroform__.arrayToPdfArray")},Cu=function(t,A,e){var r=function(n){return n};return A!==void 0&&e&&(r=e.internal.getEncryptor(A)),(t=t||"").toString(),"("+ea(r(t))+")"},ln=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(t){this._objId=t}}),Object.defineProperty(this,"scope",{value:this._scope,writable:!0})};ln.prototype.toString=function(){return this.objId+" 0 R"},ln.prototype.putStream=function(){var t=this.getKeyValueListForStream();this.scope.internal.putStream({data:this.stream,additionalKeyValues:t,objectId:this.objId}),this.scope.internal.out("endobj")},ln.prototype.getKeyValueListForStream=function(){var t=[],A=Object.getOwnPropertyNames(this).filter(function(i){return i!="content"&&i!="appearanceStreamContent"&&i!="scope"&&i!="objId"&&i.substring(0,1)!="_"});for(var e in A)if(Object.getOwnPropertyDescriptor(this,A[e]).configurable===!1){var r=A[e],n=this[r];n&&(Array.isArray(n)?t.push({key:r,value:e1(n,this.objId,this.scope)}):n instanceof ln?(n.scope=this.scope,t.push({key:r,value:n.objId+" 0 R"})):typeof n!="function"&&t.push({key:r,value:n}))}return t};var t1=function(){ln.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 t,A=[];Object.defineProperty(this,"BBox",{configurable:!1,get:function(){return A},set:function(e){A=e}}),Object.defineProperty(this,"Resources",{value:"2 0 R",configurable:!1,writable:!0}),Object.defineProperty(this,"stream",{enumerable:!1,configurable:!0,set:function(e){t=e.trim()},get:function(){return t||null}})};ir(t1,ln);var r1=function(){ln.call(this);var t,A=[];Object.defineProperty(this,"Kids",{enumerable:!1,configurable:!0,get:function(){return A.length>0?A:void 0}}),Object.defineProperty(this,"Fields",{enumerable:!1,configurable:!1,get:function(){return A}}),Object.defineProperty(this,"DA",{enumerable:!1,configurable:!1,get:function(){if(t){var e=function(r){return r};return this.scope&&(e=this.scope.internal.getEncryptor(this.objId)),"("+ea(e(t))+")"}},set:function(e){t=e}})};ir(r1,ln);var qr=function t(){ln.call(this);var A=4;Object.defineProperty(this,"F",{enumerable:!1,configurable:!1,get:function(){return A},set:function(v){if(isNaN(v))throw new Error('Invalid value "'+v+'" for attribute F supplied.');A=v}}),Object.defineProperty(this,"showWhenPrinted",{enumerable:!0,configurable:!0,get:function(){return!!ft(A,3)},set:function(v){v?this.F=ht(A,3):this.F=dt(A,3)}});var e=0;Object.defineProperty(this,"Ff",{enumerable:!1,configurable:!1,get:function(){return e},set:function(v){if(isNaN(v))throw new Error('Invalid value "'+v+'" for attribute Ff supplied.');e=v}});var r=[];Object.defineProperty(this,"Rect",{enumerable:!1,configurable:!1,get:function(){if(r.length!==0)return r},set:function(v){r=v!==void 0?v:[]}}),Object.defineProperty(this,"x",{enumerable:!0,configurable:!0,get:function(){return!r||isNaN(r[0])?0:r[0]},set:function(v){r[0]=v}}),Object.defineProperty(this,"y",{enum
|
|||
|
|
`)}},set:function(e){je(e)==="object"&&(A=e)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return A.CA||""},set:function(e){typeof e=="string"&&(A.CA=e)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return t},set:function(e){var r=e==null?"":e.toString();r.substr(0,1)==="/"&&(r=r.substr(1)),t="/"+Ji(r)}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return t.substr(1,t.length-1)},set:function(e){t="/"+Ji(e)}})};ir(It,qr);var vl=function(){It.call(this),this.pushButton=!0};ir(vl,It);var Ta=function(){It.call(this),this.radio=!0,this.pushButton=!1;var t=[];Object.defineProperty(this,"Kids",{enumerable:!0,configurable:!1,get:function(){return t},set:function(A){t=A!==void 0?A:[]}})};ir(Ta,It);var Ml=function(){var t,A;qr.call(this),Object.defineProperty(this,"Parent",{enumerable:!1,configurable:!1,get:function(){return t},set:function(n){t=n}}),Object.defineProperty(this,"optionName",{enumerable:!1,configurable:!0,get:function(){return A},set:function(n){A=n}});var e,r={};Object.defineProperty(this,"MK",{enumerable:!1,configurable:!1,get:function(){var n=function(s){return s};this.scope&&(n=this.scope.internal.getEncryptor(this.objId));var i,a=[];for(i in a.push("<<"),r)a.push("/"+i+" ("+ea(n(r[i]))+")");return a.push(">>"),a.join(`
|
|||
|
|
`)},set:function(n){je(n)==="object"&&(r=n)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return r.CA||""},set:function(n){typeof n=="string"&&(r.CA=n)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return e},set:function(n){var i=n==null?"":n.toString();i.substr(0,1)==="/"&&(i=i.substr(1)),e="/"+Ji(i)}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return e.substr(1,e.length-1)},set:function(n){var i=n==null?"":n.toString();i.substr(0,1)==="/"&&(i=i.substr(1)),e="/"+Ji(i)}}),this.caption="l",this.appearanceState="Off",this._AppearanceType=TA.RadioButton.Circle,this.appearanceStreamContent=this._AppearanceType.createAppearanceStream(this.optionName)};ir(Ml,qr),Ta.prototype.setAppearance=function(t){if(!("createAppearanceStream"in t)||!("getCA"in t))throw new Error("Couldn't assign Appearance to RadioButton. Appearance was Invalid!");for(var A in this.Kids)if(this.Kids.hasOwnProperty(A)){var e=this.Kids[A];e.appearanceStreamContent=t.createAppearanceStream(e.optionName),e.caption=t.getCA()}},Ta.prototype.createOption=function(t){var A=new Ml;return A.Parent=this,A.optionName=t,this.Kids.push(A),XF.call(this.scope,A),A};var Cl=function(){It.call(this),this.fontName="zapfdingbats",this.caption="3",this.appearanceState="On",this.value="On",this.textAlign="center",this.appearanceStreamContent=TA.CheckBox.createAppearanceStream()};ir(Cl,It);var qi=function(){qr.call(this),this.FT="/Tx",Object.defineProperty(this,"multiline",{enumerable:!0,configurable:!0,get:function(){return!!ft(this.Ff,13)},set:function(A){A?this.Ff=ht(this.Ff,13):this.Ff=dt(this.Ff,13)}}),Object.defineProperty(this,"fileSelect",{enumerable:!0,configurable:!0,get:function(){return!!ft(this.Ff,21)},set:function(A){A?this.Ff=ht(this.Ff,21):this.Ff=dt(this.Ff,21)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return!!ft(this.Ff,23)},set:function(A){A?this.Ff=ht(this.Ff,23):this.Ff=dt(this.Ff,23)}}),Object.defineProperty(this,"doNotScroll",{enumerable:!0,configurable:!0,get:function(){return!!ft(this.Ff,24)},set:function(A){A?this.Ff=ht(this.Ff,24):this.Ff=dt(this.Ff,24)}}),Object.defineProperty(this,"comb",{enumerable:!0,configurable:!0,get:function(){return!!ft(this.Ff,25)},set:function(A){A?this.Ff=ht(this.Ff,25):this.Ff=dt(this.Ff,25)}}),Object.defineProperty(this,"richText",{enumerable:!0,configurable:!0,get:function(){return!!ft(this.Ff,26)},set:function(A){A?this.Ff=ht(this.Ff,26):this.Ff=dt(this.Ff,26)}});var t=null;Object.defineProperty(this,"MaxLen",{enumerable:!0,configurable:!1,get:function(){return t},set:function(A){t=A}}),Object.defineProperty(this,"maxLength",{enumerable:!0,configurable:!0,get:function(){return t},set:function(A){Number.isInteger(A)&&(t=A)}}),Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return this.V||this.DV}})};ir(qi,qr);var bl=function(){qi.call(this),Object.defineProperty(this,"password",{enumerable:!0,configurable:!0,get:function(){return!!ft(this.Ff,14)},set:function(t){t?this.Ff=ht(this.Ff,14):this.Ff=dt(this.Ff,14)}}),this.password=!0};ir(bl,qi);var TA={CheckBox:{createAppearanceStream:function(){return{N:{On:TA.CheckBox.YesNormal},D:{On:TA.CheckBox.YesPushDown,Off:TA.CheckBox.OffPushDown}}},YesPushDown:function(t){var A=an(t);A.scope=t.scope;var e=[],r=t.scope.internal.getFont(t.fontName,t.fontStyle).id,n=t.scope.__private__.encodeColorString(t.color),i=cf(t,t.caption);return e.push("0.749023 g"),e.push("0 0 "+he(TA.internal.getWidth(t))+" "+he(TA.internal.getHeight(t))+" re"),e.push("f"),e.push("BMC"),e.push("q"),e.push("0 0 1 rg"),e.push("/"+r+" "+he(i.fontSize)+" Tf "+n),e.push("BT"),e.push(i.text),e.push("ET"),e.push("Q"),e.push("EMC"),A.stream=e.join(`
|
|||
|
|
`),A},YesNormal:function(t){var A=an(t);A.scope=t.scope;var e=t.scope.internal.getFont(t.fontName,t.fontStyle).id,r=t.scope.__private__.encodeColorString(t.color),n=[],i=TA.internal.getHeight(t),a=TA.internal.getWidth(t),s=cf(t,t.caption);return n.push("1 g"),n.push("0 0 "+he(a)+" "+he(i)+" re"),n.push("f"),n.push("q"),n.push("0 0 1 rg"),n.push("0 0 "+he(a-1)+" "+he(i-1)+" re"),n.push("W"),n.push("n"),n.push("0 g"),n.push("BT"),n.push("/"+e+" "+he(s.fontSize)+" Tf "+r),n.push(s.text),n.push("ET"),n.push("Q"),A.stream=n.join(`
|
|||
|
|
`),A},OffPushDown:function(t){var A=an(t);A.scope=t.scope;var e=[];return e.push("0.749023 g"),e.push("0 0 "+he(TA.internal.getWidth(t))+" "+he(TA.internal.getHeight(t))+" re"),e.push("f"),A.stream=e.join(`
|
|||
|
|
`),A}},RadioButton:{Circle:{createAppearanceStream:function(t){var A={D:{Off:TA.RadioButton.Circle.OffPushDown},N:{}};return A.N[t]=TA.RadioButton.Circle.YesNormal,A.D[t]=TA.RadioButton.Circle.YesPushDown,A},getCA:function(){return"l"},YesNormal:function(t){var A=an(t);A.scope=t.scope;var e=[],r=TA.internal.getWidth(t)<=TA.internal.getHeight(t)?TA.internal.getWidth(t)/4:TA.internal.getHeight(t)/4;r=Number((.9*r).toFixed(5));var n=TA.internal.Bezier_C,i=Number((r*n).toFixed(5));return e.push("q"),e.push("1 0 0 1 "+ii(TA.internal.getWidth(t)/2)+" "+ii(TA.internal.getHeight(t)/2)+" cm"),e.push(r+" 0 m"),e.push(r+" "+i+" "+i+" "+r+" 0 "+r+" c"),e.push("-"+i+" "+r+" -"+r+" "+i+" -"+r+" 0 c"),e.push("-"+r+" -"+i+" -"+i+" -"+r+" 0 -"+r+" c"),e.push(i+" -"+r+" "+r+" -"+i+" "+r+" 0 c"),e.push("f"),e.push("Q"),A.stream=e.join(`
|
|||
|
|
`),A},YesPushDown:function(t){var A=an(t);A.scope=t.scope;var e=[],r=TA.internal.getWidth(t)<=TA.internal.getHeight(t)?TA.internal.getWidth(t)/4:TA.internal.getHeight(t)/4;r=Number((.9*r).toFixed(5));var n=Number((2*r).toFixed(5)),i=Number((n*TA.internal.Bezier_C).toFixed(5)),a=Number((r*TA.internal.Bezier_C).toFixed(5));return e.push("0.749023 g"),e.push("q"),e.push("1 0 0 1 "+ii(TA.internal.getWidth(t)/2)+" "+ii(TA.internal.getHeight(t)/2)+" cm"),e.push(n+" 0 m"),e.push(n+" "+i+" "+i+" "+n+" 0 "+n+" c"),e.push("-"+i+" "+n+" -"+n+" "+i+" -"+n+" 0 c"),e.push("-"+n+" -"+i+" -"+i+" -"+n+" 0 -"+n+" c"),e.push(i+" -"+n+" "+n+" -"+i+" "+n+" 0 c"),e.push("f"),e.push("Q"),e.push("0 g"),e.push("q"),e.push("1 0 0 1 "+ii(TA.internal.getWidth(t)/2)+" "+ii(TA.internal.getHeight(t)/2)+" cm"),e.push(r+" 0 m"),e.push(r+" "+a+" "+a+" "+r+" 0 "+r+" c"),e.push("-"+a+" "+r+" -"+r+" "+a+" -"+r+" 0 c"),e.push("-"+r+" -"+a+" -"+a+" -"+r+" 0 -"+r+" c"),e.push(a+" -"+r+" "+r+" -"+a+" "+r+" 0 c"),e.push("f"),e.push("Q"),A.stream=e.join(`
|
|||
|
|
`),A},OffPushDown:function(t){var A=an(t);A.scope=t.scope;var e=[],r=TA.internal.getWidth(t)<=TA.internal.getHeight(t)?TA.internal.getWidth(t)/4:TA.internal.getHeight(t)/4;r=Number((.9*r).toFixed(5));var n=Number((2*r).toFixed(5)),i=Number((n*TA.internal.Bezier_C).toFixed(5));return e.push("0.749023 g"),e.push("q"),e.push("1 0 0 1 "+ii(TA.internal.getWidth(t)/2)+" "+ii(TA.internal.getHeight(t)/2)+" cm"),e.push(n+" 0 m"),e.push(n+" "+i+" "+i+" "+n+" 0 "+n+" c"),e.push("-"+i+" "+n+" -"+n+" "+i+" -"+n+" 0 c"),e.push("-"+n+" -"+i+" -"+i+" -"+n+" 0 -"+n+" c"),e.push(i+" -"+n+" "+n+" -"+i+" "+n+" 0 c"),e.push("f"),e.push("Q"),A.stream=e.join(`
|
|||
|
|
`),A}},Cross:{createAppearanceStream:function(t){var A={D:{Off:TA.RadioButton.Cross.OffPushDown},N:{}};return A.N[t]=TA.RadioButton.Cross.YesNormal,A.D[t]=TA.RadioButton.Cross.YesPushDown,A},getCA:function(){return"8"},YesNormal:function(t){var A=an(t);A.scope=t.scope;var e=[],r=TA.internal.calculateCross(t);return e.push("q"),e.push("1 1 "+he(TA.internal.getWidth(t)-2)+" "+he(TA.internal.getHeight(t)-2)+" re"),e.push("W"),e.push("n"),e.push(he(r.x1.x)+" "+he(r.x1.y)+" m"),e.push(he(r.x2.x)+" "+he(r.x2.y)+" l"),e.push(he(r.x4.x)+" "+he(r.x4.y)+" m"),e.push(he(r.x3.x)+" "+he(r.x3.y)+" l"),e.push("s"),e.push("Q"),A.stream=e.join(`
|
|||
|
|
`),A},YesPushDown:function(t){var A=an(t);A.scope=t.scope;var e=TA.internal.calculateCross(t),r=[];return r.push("0.749023 g"),r.push("0 0 "+he(TA.internal.getWidth(t))+" "+he(TA.internal.getHeight(t))+" re"),r.push("f"),r.push("q"),r.push("1 1 "+he(TA.internal.getWidth(t)-2)+" "+he(TA.internal.getHeight(t)-2)+" re"),r.push("W"),r.push("n"),r.push(he(e.x1.x)+" "+he(e.x1.y)+" m"),r.push(he(e.x2.x)+" "+he(e.x2.y)+" l"),r.push(he(e.x4.x)+" "+he(e.x4.y)+" m"),r.push(he(e.x3.x)+" "+he(e.x3.y)+" l"),r.push("s"),r.push("Q"),A.stream=r.join(`
|
|||
|
|
`),A},OffPushDown:function(t){var A=an(t);A.scope=t.scope;var e=[];return e.push("0.749023 g"),e.push("0 0 "+he(TA.internal.getWidth(t))+" "+he(TA.internal.getHeight(t))+" re"),e.push("f"),A.stream=e.join(`
|
|||
|
|
`),A}}},createDefaultAppearanceStream:function(t){var A=t.scope.internal.getFont(t.fontName,t.fontStyle).id,e=t.scope.__private__.encodeColorString(t.color);return"/"+A+" "+t.fontSize+" Tf "+e}};TA.internal={Bezier_C:.551915024494,calculateCross:function(t){var A=TA.internal.getWidth(t),e=TA.internal.getHeight(t),r=Math.min(A,e);return{x1:{x:(A-r)/2,y:(e-r)/2+r},x2:{x:(A-r)/2+r,y:(e-r)/2},x3:{x:(A-r)/2,y:(e-r)/2},x4:{x:(A-r)/2+r,y:(e-r)/2+r}}}},TA.internal.getWidth=function(t){var A=0;return je(t)==="object"&&(A=Hg(t.Rect[2])),A},TA.internal.getHeight=function(t){var A=0;return je(t)==="object"&&(A=Hg(t.Rect[3])),A};var XF=nt.addField=function(t){if(zF(this,t),!(t instanceof qr))throw new Error("Invalid argument passed to jsPDF.addField.");var A;return(A=t).scope.internal.acroformPlugin.printedOut&&(A.scope.internal.acroformPlugin.printedOut=!1,A.scope.internal.acroformPlugin.acroFormDictionaryRoot=null),A.scope.internal.acroformPlugin.acroFormDictionaryRoot.Fields.push(A),t.page=t.scope.internal.getCurrentPageInfo().pageNumber,this};nt.AcroFormChoiceField=Ha,nt.AcroFormListBox=Na,nt.AcroFormComboBox=ka,nt.AcroFormEditBox=ml,nt.AcroFormButton=It,nt.AcroFormPushButton=vl,nt.AcroFormRadioButton=Ta,nt.AcroFormCheckBox=Cl,nt.AcroFormTextField=qi,nt.AcroFormPasswordField=bl,nt.AcroFormAppearance=TA,nt.AcroForm={ChoiceField:Ha,ListBox:Na,ComboBox:ka,EditBox:ml,Button:It,PushButton:vl,RadioButton:Ta,CheckBox:Cl,TextField:qi,PasswordField:bl,Appearance:TA},jA.AcroForm={ChoiceField:Ha,ListBox:Na,ComboBox:ka,EditBox:ml,Button:It,PushButton:vl,RadioButton:Ta,CheckBox:Cl,TextField:qi,PasswordField:bl,Appearance:TA};jA.AcroForm;function n1(t){return t.reduce(function(A,e,r){return A[e]=r,A},{})}(function(t){var A="addImage_";t.__addimage__={};var e="UNKNOWN",r={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]]},n=t.__addimage__.getImageFileTypeByImageData=function(U,S){var G,V,nA,sA,lA,eA=e;if((S=S||e)==="RGBA"||U.data!==void 0&&U.data instanceof Uint8ClampedArray&&"height"in U&&"width"in U)return"RGBA";if(J(U))for(lA in r)for(nA=r[lA],G=0;G<nA.length;G+=1){for(sA=!0,V=0;V<nA[G].length;V+=1)if(nA[G][V]!==void 0&&nA[G][V]!==U[V]){sA=!1;break}if(sA===!0){eA=lA;break}}else for(lA in r)for(nA=r[lA],G=0;G<nA.length;G+=1){for(sA=!0,V=0;V<nA[G].length;V+=1)if(nA[G][V]!==void 0&&nA[G][V]!==U.charCodeAt(V)){sA=!1;break}if(sA===!0){eA=lA;break}}return eA===e&&S!==e&&(eA=S),eA},i=function U(S){for(var G=this.internal.write,V=this.internal.putStream,nA=(0,this.internal.getFilters)();nA.indexOf("FlateEncode")!==-1;)nA.splice(nA.indexOf("FlateEncode"),1);S.objectId=this.internal.newObject();var sA=[];if(sA.push({key:"Type",value:"/XObject"}),sA.push({key:"Subtype",value:"/Image"}),sA.push({key:"Width",value:S.width}),sA.push({key:"Height",value:S.height}),S.colorSpace===v.INDEXED?sA.push({key:"ColorSpace",value:"[/Indexed /DeviceRGB "+(S.palette.length/3-1)+" "+("sMask"in S&&S.sMask!==void 0?S.objectId+2:S.objectId+1)+" 0 R]"}):(sA.push({key:"ColorSpace",value:"/"+S.colorSpace}),S.colorSpace===v.DEVICE_CMYK&&sA.push({key:"Decode",value:"[1 0 1 0 1 0 1 0]"})),sA.push({key:"BitsPerComponent",value:S.bitsPerComponent}),"decodeParameters"in S&&S.decodeParameters!==void 0&&sA.push({key:"DecodeParms",value:"<<"+S.decodeParameters+">>"}),"transparency"in S&&Array.isArray(S.transparency)&&S.transparency.length>0){for(var lA="",eA=0,cA=S.transparency.length;eA<cA;eA++)lA+=S.transparency[eA]+" "+S.transparency[eA]+" ";sA.push({key:"Mask",value:"["+lA+"]"})}S.sMask!==void 0&&sA.push({key:"SMask",value:S.objectId+1+" 0 R"});var mA=S.filter!==void 0?["/"+S.filter]:void 0;if(V({data:S.data,additionalKeyValues:sA,alreadyAppliedFilters:mA,objectId:S.objectId}),G("endobj"),"sMask"in S&&S.sMask!==void 0){var uA,F=(uA=S
|
|||
|
|
* @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 Qu(t){var A,e,r,n,i,a=Math.floor,s=new Array(64),l=new Array(64),u=new Array(64),f=new Array(64),p=new Array(65535),B=new Array(65535),d=new Array(64),m=new Array(64),C=[],E=0,v=7,H=new Array(64),R=new Array(64),k=new Array(64),j=new Array(256),J=new Array(2048),X=[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],K=[0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0],L=[0,1,2,3,4,5,6,7,8,9,10,11],W=[0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,125],U=[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],S=[0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0],G=[0,1,2,3,4,5,6,7,8,9,10,11],V=[0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,119],nA=[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 sA(F,T){for(var M=0,q=0,Y=new Array,tA=1;tA<=16;tA++){for(var fA=1;fA<=F[tA];fA++)Y[T[q]]=[],Y[T[q]][0]=M,Y[T[q]][1]=tA,q++,M++;M*=2}return Y}function lA(F){for(var T=F[0],M=F[1]-1;M>=0;)T&1<<M&&(E|=1<<v),M--,--v<0&&(E==255?(eA(255),eA(0)):eA(E),v=7,E=0)}function eA(F){C.push(F)}function cA(F){eA(F>>8&255),eA(255&F)}function mA(F,T,M,q,Y){for(var tA,fA=Y[0],hA=Y[240],dA=(function(yA,JA){var NA,zA,qA,xe,we,ne,be,me,RA,se,OA=0;for(RA=0;RA<8;++RA){NA=yA[OA],zA=yA[OA+1],qA=yA[OA+2],xe=yA[OA+3],we=yA[OA+4],ne=yA[OA+5],be=yA[OA+6];var _e=NA+(me=yA[OA+7]),ve=NA-me,oe=zA+be,le=zA-be,Me=qA+ne,WA=qA-ne,Ne=xe+we,$A=xe-we,ce=_e+Ne,Ye=_e-Ne,ye=oe+Me,Ae=oe-Me;yA[OA]=ce+ye,yA[OA+4]=ce-ye;var Ie=.707106781*(Ae+Ye);yA[OA+2]=Ye+Ie,yA[OA+6]=Ye-Ie;var vi=.382683433*((ce=$A+WA)-(Ae=le+ve)),Mt=.5411961*ce+vi,dn=1.306562965*Ae+vi,zr=.707106781*(ye=WA+le),ee=ve+zr,gn=ve-zr;yA[OA+5]=gn+Mt,yA[OA+3]=gn-Mt,yA[OA+1]=ee+dn,yA[OA+7]=ee-dn,OA+=8}for(OA=0,RA=0;RA<8;++RA){NA=yA[OA],zA=yA[OA+8],qA=yA[OA+16],xe=yA[OA+24],we=yA[OA+32],ne=yA[OA+40],be=yA[OA+48];var pn=NA+(me=yA[OA+56]),mr=NA-me,vr=zA+be,et=zA-be,Et=qA+ne,St=qA-ne,Ci=xe+we,Kn=xe-we,Hr=pn+Ci,Xr=pn-Ci,Nr=vr+Et,kr=vr-Et;yA[OA]=Hr+Nr,yA[OA+32]=Hr-Nr;var Cr=.707106781*(kr+Xr);yA[OA+16]=Xr+Cr,yA[OA+48]=Xr-Cr;var bi=.382683433*((Hr=Kn+St)-(kr=et+mr)),Jr=.5411961*Hr+bi,yi=1.306562965*kr+bi,ta=.707106781*(Nr=St+et),ra=mr+ta,na=mr-ta;yA[OA+40]=na+Jr,yA[OA+24]=na-Jr,yA[OA+8]=ra+yi,yA[OA+56]=ra-yi,OA++}for(RA=0;RA<64;++RA)se=yA[RA]*JA[RA],d[RA]=se>0?se+.5|0:se-.5|0;return d})(F,T),oA=0;oA<64;++oA)m[X[oA]]=dA[oA];var bA=m[0]-M;M=m[0],bA==0?lA(q[0]):(lA(q[B[tA=32767+bA]]),lA(p[tA]));for(var UA=63;UA>0&&m[UA]==0;)UA--;if(UA==0)return lA(fA),M;for(var IA,N=1;N<=UA;){for(var _A=N;m[N]==0&&N<=UA;)++N;var fe=N-_A;if(fe>=16){IA=fe>>4;for(var XA=1;XA<=IA;++XA)lA(hA);fe&=15}tA=32767+m[N],lA(Y[(fe<<4)+B[tA]]),lA(p[tA]),N++}return UA!=63&&lA(fA),M}function uA(F){F=Math.min(Math.max(F,1),100),i!=F&&((function(T){for(var M=[16,11,10,16,24,40,51,61,12,12,14,19,26,58,60,55,14,13,16,24,40,57,69,56,14,17,22,29,51,87,80,62,18,22,37,56,68,109,103,77,24,35,55,64,81,104,113,92,49,64,78,87,103,121,120,101,72,92,95,98,112,100,103,99],q=0;q<64;q++){var Y=a((M[q]*T+50)/100);Y=Math.min(Math.max(Y,1),255),s[X[q]]=Y}for(var t
|
|||
|
|
* @license
|
|||
|
|
* Copyright (c) 2017 Aras Abbasi
|
|||
|
|
*
|
|||
|
|
* Licensed under the MIT License.
|
|||
|
|
* http://opensource.org/licenses/mit-license
|
|||
|
|
*/function Mr(t,A){if(this.pos=0,this.buffer=t,this.datav=new DataView(t.buffer),this.is_with_alpha=!!A,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 zg(t){function A(L){if(!L)throw Error("assert :P")}function e(L,W,U){for(var S=0;4>S;S++)if(L[W+S]!=U.charCodeAt(S))return!0;return!1}function r(L,W,U,S,G){for(var V=0;V<G;V++)L[W+V]=U[S+V]}function n(L,W,U,S){for(var G=0;G<S;G++)L[W+G]=U}function i(L){return new Int32Array(L)}function a(L,W){for(var U=[],S=0;S<L;S++)U.push(new W);return U}function s(L,W){var U=[];return(function S(G,V,nA){for(var sA=nA[V],lA=0;lA<sA&&(G.push(nA.length>V+1?[]:new W),!(nA.length<V+1));lA++)S(G[lA],V+1,nA)})(U,0,L),U}var l=function(){var L=this;function W(o,c){for(var g=1<<c-1>>>0;o&g;)g>>>=1;return g?(o&g-1)+g:o}function U(o,c,g,w,y){A(!(w%g));do o[c+(w-=g)]=y;while(0<w)}function S(o,c,g,w,y){if(A(2328>=y),512>=y)var Q=i(512);else if((Q=i(y))==null)return 0;return(function(x,_,I,D,$,aA){var O,Z,rA=_,gA=1<<I,iA=i(16),pA=i(16);for(A($!=0),A(D!=null),A(x!=null),A(0<I),Z=0;Z<$;++Z){if(15<D[Z])return 0;++iA[D[Z]]}if(iA[0]==$)return 0;for(pA[1]=0,O=1;15>O;++O){if(iA[O]>1<<O)return 0;pA[O+1]=pA[O]+iA[O]}for(Z=0;Z<$;++Z)O=D[Z],0<D[Z]&&(aA[pA[O]++]=Z);if(pA[15]==1)return(D=new G).g=0,D.value=aA[0],U(x,rA,1,gA,D),gA;var wA,QA=-1,CA=gA-1,VA=0,kA=1,pe=1,MA=1<<I;for(Z=0,O=1,$=2;O<=I;++O,$<<=1){if(kA+=pe<<=1,0>(pe-=iA[O]))return 0;for(;0<iA[O];--iA[O])(D=new G).g=O,D.value=aA[Z++],U(x,rA+VA,$,MA,D),VA=W(VA,O)}for(O=I+1,$=2;15>=O;++O,$<<=1){if(kA+=pe<<=1,0>(pe-=iA[O]))return 0;for(;0<iA[O];--iA[O]){if(D=new G,(VA&CA)!=QA){for(rA+=MA,wA=1<<(QA=O)-I;15>QA&&!(0>=(wA-=iA[QA]));)++QA,wA<<=1;gA+=MA=1<<(wA=QA-I),x[_+(QA=VA&CA)].g=wA+I,x[_+QA].value=rA-_-QA}D.g=O-I,D.value=aA[Z++],U(x,rA+(VA>>I),$,MA,D),VA=W(VA,O)}}return kA!=2*pA[15]-1?0:gA})(o,c,g,w,y,Q)}function G(){this.value=this.g=0}function V(){this.value=this.g=0}function nA(){this.G=a(5,G),this.H=i(5),this.jc=this.Qb=this.qb=this.nd=0,this.pd=a(Ni,V)}function sA(o,c,g,w){A(o!=null),A(c!=null),A(2147483648>w),o.Ca=254,o.I=0,o.b=-8,o.Ka=0,o.oa=c,o.pa=g,o.Jd=c,o.Yc=g+w,o.Zc=4<=w?g+w-4+1:g,fA(o)}function lA(o,c){for(var g=0;0<c--;)g|=dA(o,128)<<c;return g}function eA(o,c){var g=lA(o,c);return hA(o)?-g:g}function cA(o,c,g,w){var y,Q=0;for(A(o!=null),A(c!=null),A(4294967288>w),o.Sb=w,o.Ra=0,o.u=0,o.h=0,4<w&&(w=4),y=0;y<w;++y)Q+=c[g+y]<<8*y;o.Ra=Q,o.bb=w,o.oa=c,o.pa=g}function mA(o){for(;8<=o.u&&o.bb<o.Sb;)o.Ra>>>=8,o.Ra+=o.oa[o.pa+o.bb]<<qn-8>>>0,++o.bb,o.u-=8;q(o)&&(o.h=1,o.u=0)}function uA(o,c){if(A(0<=c),!o.h&&c<=sr){var g=M(o)&ar[c];return o.u+=c,mA(o),g}return o.h=1,o.u=0}function F(){this.b=this.Ca=this.I=0,this.oa=[],this.pa=0,this.Jd=[],this.Yc=0,this.Zc=[],this.Ka=0}function T(){this.Ra=0,this.oa=[],this.h=this.u=this.bb=this.Sb=this.pa=0}function M(o){return o.Ra>>>(o.u&qn-1)>>>0}function q(o){return A(o.bb<=o.Sb),o.h||o.bb==o.Sb&&o.u>qn}function Y(o,c){o.u=c,o.h=q(o)}function tA(o){o.u>=xn&&(A(o.u>=xn),mA(o))}function fA(o){A(o!=null&&o.oa!=null),o.pa<o.Zc?(o.I=(o.oa[o.pa++]|o.I<<8)>>>0,o.b+=8):(A(o!=null&&o.oa!=null),o.pa<o.Yc?(o.b+=8,o.I=o.oa[o.pa++]|o.I<<8):o.Ka?o.b=0:(o.I<<=8,o.b+=8,o.Ka=1))}function hA(o){return lA(o,1)}function dA(o,c){var g=o.Ca;0>o.b&&fA(o);var w=o.b,y=g*c>>>8,Q=(o.I>>>w>y)+0;for(Q?(g-=y,o.I-=y+1<<w>>>0):g=y+1,w=g,y=0;256<=w;)y+=8,w>>=8;return w=7^y+Wn[w],o.b-=w,o.Ca=(g<<w)-1,Q}function oA(o,c,g){o[c+0]=g>>24&255,o[c+1]=g>>16&255,o[c+2]=g>>8&255,o[c+3]=255&g}function bA(o,c){return o[c+0]|o[c+1]<<8}function UA(o,c){return bA(o,c)|o[c+2]<<16}function IA(o,c){return bA(o,c)|bA(o,c+2)<<16}function N(o,c){var g=1<<c;return A(o!=null),A(0<c),o.X=i(g),o.X==null?0:(o.Mb=32-c,o.Xa=c,1)}function _A(o,c){A(o!=null),A(c!=null),A(o.Xa==c.Xa),r(c.X,0,o.X,0,1<<c.Xa)}function fe(){this.X=[],this.Xa=this.Mb=0}function XA(o,c,g,w){A(g!=null),A(w!=null);var y=g[0],Q=w[0];return y==0&&(y=(o*Q+c/2)/c),Q==0&&(Q=(c*y+o/2)/o),0>=y||0>=Q?0:(g[0]=y,w
|
|||
|
|
* @license
|
|||
|
|
* jsPDF XMP metadata plugin
|
|||
|
|
* Copyright (c) 2016 Jussi Utunen, u-jussi@suomi24.fi
|
|||
|
|
*
|
|||
|
|
* 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.
|
|||
|
|
* ====================================================================
|
|||
|
|
*/function nQ(){var t,A=this.internal.__metadata__.metadata,e=unescape(encodeURIComponent(A));t=this.internal.__metadata__.rawXml?e:'<x:xmpmeta xmlns:x="adobe:ns:meta/"><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>'+e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")+"</jspdf:metadata></rdf:Description></rdf:RDF></x:xmpmeta>",this.internal.__metadata__.metadataObjectNumber=this.internal.newObject(),this.internal.write("<< /Type /Metadata /Subtype /XML /Length "+t.length+" >>"),this.internal.write("stream"),this.internal.write(t),this.internal.write("endstream"),this.internal.write("endobj")}function iQ(){this.internal.__metadata__.metadataObjectNumber&&this.internal.write("/Metadata "+this.internal.__metadata__.metadataObjectNumber+" 0 R")}(function(t){var A,e,r,n,i,a,s,l,u,f=function(F){return F=F||{},this.isStrokeTransparent=F.isStrokeTransparent||!1,this.strokeOpacity=F.strokeOpacity||1,this.strokeStyle=F.strokeStyle||"#000000",this.fillStyle=F.fillStyle||"#000000",this.isFillTransparent=F.isFillTransparent||!1,this.fillOpacity=F.fillOpacity||1,this.font=F.font||"10px sans-serif",this.textBaseline=F.textBaseline||"alphabetic",this.textAlign=F.textAlign||"left",this.lineWidth=F.lineWidth||1,this.lineJoin=F.lineJoin||"miter",this.lineCap=F.lineCap||"butt",this.path=F.path||[],this.transform=F.transform!==void 0?F.transform.clone():new l,this.globalCompositeOperation=F.globalCompositeOperation||"normal",this.globalAlpha=F.globalAlpha||1,this.clip_path=F.clip_path||[],this.currentPoint=F.currentPoint||new a,this.miterLimit=F.miterLimit||10,this.lastPoint=F.lastPoint||new a,this.lineDashOffset=F.lineDashOffset||0,this.lineDash=F.lineDash||[],this.margin=F.margin||[0,0,0,0],this.prevPageLastElemOffset=F.prevPageLastElemOffset||0,this.ignoreClearRect=typeof F.ignoreClearRect!="boolean"||F.ignoreClearRect,this};t.events.push(["initialized",function(){this.context2d=new p(this),A=this.internal.f2,e=this.internal.getCoordinateString,r=this.internal.getVerticalCoordinateString,n=this.internal.getHorizontalCoordinate,i=this.internal.getVerticalCoordinate,a=this.internal.Point,s=this.internal.Rectangle,l=this.internal.Matrix,u=new f}]);var p=function(F){Object.defineProperty(this,"canvas",{get:function(){return{parentNode:!1,style:!1}}});var T=F;Object.defineProperty(this,"pdf",{get:function(){return T}});var M=!1;Object.defineProperty(this,"pageWrapXEnabled",{get:function(){return M},set:function(N){M=!!N}});var q=!1;Object.defineProperty(this,"pageWrapYEnabled",{get:function(){return q},set:function(N){q=!!N}});var Y=0;Object.defineProperty(this,"posX",{get:function(){return Y},set:function(N){isNaN(N)||(Y=N)}});var tA=0;Object.defineProperty(this,"posY",{get:function(){return tA},set:function(N){isNaN(N)||(tA=N)}}),Object.defineProperty(this,"margin",{get:function(){return u.margin},set:function(N){var _A;typeof N=="number"?_A=[N,N,N,N]:((_A=new Array(4))[0]=N[0],_A[1]=N.length>=2?N[1]:_A[0],_A[2]=N.length>=3?N[2]:_A[0],_A[3]=N.length>=4?N[3]:_A[1]),u.margin=_A}});var fA=!1;Object.defineProperty(this,"autoPaging",{get:function(){return fA},set:function(N){fA=N}});var hA=0;Object.defineProperty(this,"lastBreak",{get:function(){return hA},set:function(N){hA=N}});var dA=[];Object.defineProperty(this,"pageBreaks",{get:function(){return dA},set:function(N){dA=N}}),Object.defineProperty(this,"ctx",{get:function(){return u},set:function(N){N instanceof f&&(u=N)}}),Object.defineProperty(this,"path",{get:function(){return u.path},set:function(N){u.path=N}});var oA=[];Object.defineProperty(this,"ctxStack",{get:function(){return oA},set:function(N){oA=N}}),Object.defineProperty(this,"fillStyle",{get:function(){return this.ctx.fillStyle},set:function(N){var _A;_A=B(N),this.ctx.fillStyle=_A.style,this.ctx.isFillTransparent=_A.a===0,this.ctx.fillOpacity=_A.a,this.pdf.setFillColor(_A.r,_A.g,_A.b,{a:_A.a}),this.pdf.setTextColor(_A.r,_A.g,_A.b,{a:_A.a})}}),Objec
|
|||
|
|
`},e.outline.makeRef=function(r){return r.id+" 0 R"},e.outline.makeString=function(r){return"("+e.internal.pdfEscape(r)+")"},e.outline.objStart=function(r){this.ctx.val+=`\r
|
|||
|
|
`+r.id+` 0 obj\r
|
|||
|
|
<<\r
|
|||
|
|
`},e.outline.objEnd=function(){this.ctx.val+=`>> \r
|
|||
|
|
endobj\r
|
|||
|
|
`},e.outline.count_r=function(r,n){for(var i=0;i<n.children.length;i++)r.count++,this.count_r(r,n.children[i]);return r.count}}])})(jA.API),(function(t){var A=[192,193,194,195,196,197,198,199];t.processJPEG=function(e,r,n,i,a,s){var l,u=this.decode.DCT_DECODE,f=null;if(typeof e=="string"||this.__addimage__.isArrayBuffer(e)||this.__addimage__.isArrayBufferView(e)){switch(e=a||e,e=this.__addimage__.isArrayBuffer(e)?new Uint8Array(e):e,l=(function(p){for(var B,d=256*p.charCodeAt(4)+p.charCodeAt(5),m=p.length,C={width:0,height:0,numcomponents:1},E=4;E<m;E+=2){if(E+=d,A.indexOf(p.charCodeAt(E+1))!==-1){B=256*p.charCodeAt(E+5)+p.charCodeAt(E+6),C={width:256*p.charCodeAt(E+7)+p.charCodeAt(E+8),height:B,numcomponents:p.charCodeAt(E+9)};break}d=256*p.charCodeAt(E+2)+p.charCodeAt(E+3)}return C})(e=this.__addimage__.isArrayBufferView(e)?this.__addimage__.arrayBufferToBinaryString(e):e),l.numcomponents){case 1:s=this.color_spaces.DEVICE_GRAY;break;case 4:s=this.color_spaces.DEVICE_CMYK;break;case 3:s=this.color_spaces.DEVICE_RGB}f={data:e,width:l.width,height:l.height,colorSpace:s,bitsPerComponent:8,filter:u,index:r,alias:n}}return f}})(jA.API),jA.API.processPNG=function(t,A,e,r){if(this.__addimage__.isArrayBuffer(t)&&(t=new Uint8Array(t)),this.__addimage__.isArrayBufferView(t)){var n,i=TF(t,{checkCrc:!0}),a=i.width,s=i.height,l=i.channels,u=i.palette,f=i.depth;n=u&&l===1?(function(K){for(var L=K.width,W=K.height,U=K.data,S=K.palette,G=K.depth,V=!1,nA=[],sA=[],lA=void 0,eA=!1,cA=0,mA=0;mA<S.length;mA++){var uA=Gd(S[mA],4),F=uA[0],T=uA[1],M=uA[2],q=uA[3];nA.push(F,T,M),q!=null&&(q===0?(cA++,sA.length<1&&sA.push(mA)):q<255&&(eA=!0))}if(eA||cA>1){V=!0,sA=void 0;var Y=L*W;lA=new Uint8Array(Y);for(var tA=new DataView(U.buffer),fA=0;fA<Y;fA++){var hA=Fu(tA,fA,G),dA=Gd(S[hA],4)[3];lA[fA]=dA}}else cA===0&&(sA=void 0);return{colorSpace:"Indexed",colorsPerPixel:1,sMaskBitsPerComponent:V?8:void 0,colorBytes:U,alphaBytes:lA,needSMask:V,palette:nA,mask:sA}})(i):l===2||l===4?(function(K){for(var L=K.data,W=K.width,U=K.height,S=K.channels,G=K.depth,V=S===2?"DeviceGray":"DeviceRGB",nA=S-1,sA=W*U,lA=nA,eA=sA*lA,cA=1*sA,mA=Math.ceil(eA*G/8),uA=Math.ceil(cA*G/8),F=new Uint8Array(mA),T=new Uint8Array(uA),M=new DataView(L.buffer),q=new DataView(F.buffer),Y=new DataView(T.buffer),tA=!1,fA=0;fA<sA;fA++){for(var hA=fA*S,dA=0;dA<lA;dA++)qg(q,Fu(M,hA+dA,G),fA*lA+dA,G);var oA=Fu(M,hA+lA,G);oA<(1<<G)-1&&(tA=!0),qg(Y,oA,1*fA,G)}return{colorSpace:V,colorsPerPixel:nA,sMaskBitsPerComponent:tA?G:void 0,colorBytes:F,alphaBytes:T,needSMask:tA}})(i):(function(K){var L=K.data,W=K.channels===1?"DeviceGray":"DeviceRGB";return{colorSpace:W,colorsPerPixel:W==="DeviceGray"?1:3,colorBytes:L instanceof Uint16Array?(function(U){for(var S=U.length,G=new Uint8Array(2*S),V=new DataView(G.buffer,G.byteOffset,G.byteLength),nA=0;nA<S;nA++)V.setUint16(2*nA,U[nA],!1);return G})(L):L,needSMask:!1}})(i);var p,B,d,m=n,C=m.colorSpace,E=m.colorsPerPixel,v=m.sMaskBitsPerComponent,H=m.colorBytes,R=m.alphaBytes,k=m.needSMask,j=m.palette,J=m.mask,X=null;return r!==jA.API.image_compression.NONE&&typeof rf=="function"?(X=(function(K){var L;switch(K){case jA.API.image_compression.FAST:L=11;break;case jA.API.image_compression.MEDIUM:L=13;break;case jA.API.image_compression.SLOW:L=14;break;default:L=12}return L})(r),p=this.decode.FLATE_DECODE,B="/Predictor ".concat(X," /Colors ").concat(E," /BitsPerComponent ").concat(f," /Columns ").concat(a),t=Mg(H,Math.ceil(a*E*f/8),E,f,r),k&&(d=Mg(R,Math.ceil(a*v/8),1,v,r))):(p=void 0,B=void 0,t=H,k&&(d=R)),(this.__addimage__.isArrayBuffer(t)||this.__addimage__.isArrayBufferView(t))&&(t=this.__addimage__.arrayBufferToBinaryString(t)),(d&&this.__addimage__.isArrayBuffer(d)||this.__addimage__.isArrayBufferView(d))&&(d=this.__addimage__.arrayBufferToBinaryString(d)),{alias:e,data:t,index:A,filter:p,decodeParameters:B,transparency:J,palette:j,sMask:d,predictor:X,width:a,height:s,bitsPerComponent:f,sMaskBitsPerComponent:v,colorSpace:C}}},(function(t){t.processGIF89A=function(A,e,r,n){var i=new rQ(A),a=i.width,s=i.height,l=[];i.decodeAndBlitFrameRGBA(0,l);var u={dat
|
|||
|
|
`:"")+j})):H.push(k[0])}),C=H,l=Og.apply(this,[v,e])}for(i=0,a=C.length;i<a;i++){var R=0;if(r=C[i],l&&r[0]==`
|
|||
|
|
`&&(r=r.substr(1),R=1),B+d+(m=(n=ul.apply(this,[r,e])).reduce(function(k,j){return k+j},0))>A||R){if(m>A){for(s=Pg.apply(this,[r,n,A-(B+d),A]),f.push(s.shift()),f=[s.pop()];s.length;)p.push([s.shift()]);m=n.slice(r.length-(f[0]?f[0].length:0)).reduce(function(k,j){return k+j},0)}else f=[r];p.push(f),B=m+l,d=E}else f.push(r),B+=d+m,d=E}return u=l?function(k,j){return(j?v:"")+k.join(" ")}:function(k){return k.join(" ")},p.map(u)},Qa.splitTextToSize=function(t,A,e){var r,n=(e=e||{}).fontSize||this.internal.getFontSize(),i=(function(f){if(f.widths&&f.kerning)return{widths:f.widths,kerning:f.kerning};var p=this.internal.getFont(f.fontName,f.fontStyle),B="Unicode";return p.metadata[B]?{widths:p.metadata[B].widths||{0:1},kerning:p.metadata[B].kerning||{}}:{font:p.metadata,fontSize:this.internal.getFontSize(),charSpace:this.internal.getCharSpace()}}).call(this,e);r=Array.isArray(t)?t:String(t).split(/\r?\n/);var a=1*this.internal.scaleFactor*A/n;i.textIndent=e.textIndent?1*e.textIndent*this.internal.scaleFactor/n:0,i.lineIndent=e.lineIndent;var s,l,u=[];for(s=0,l=r.length;s<l;s++)u=u.concat(Rg.apply(this,[r[s],a,i]));return u},(function(t){t.__fontmetrics__=t.__fontmetrics__||{};for(var A="0123456789abcdef",e="klmnopqrstuvwxyz",r={},n={},i=0;i<16;i++)r[e[i]]=A[i],n[A[i]]=e[i];var a=function(B){return"0x"+parseInt(B,10).toString(16)},s=t.__fontmetrics__.compress=function(B){var d,m,C,E,v=["{"];for(var H in B){if(d=B[H],isNaN(parseInt(H,10))?m="'"+H+"'":(H=parseInt(H,10),m=(m=a(H).slice(2)).slice(0,-1)+n[m.slice(-1)]),typeof d=="number")d<0?(C=a(d).slice(3),E="-"):(C=a(d).slice(2),E=""),C=E+C.slice(0,-1)+n[C.slice(-1)];else{if(je(d)!=="object")throw new Error("Don't know what to do with value type "+je(d)+".");C=s(d)}v.push(m+C)}return v.push("}"),v.join("")},l=t.__fontmetrics__.uncompress=function(B){if(typeof B!="string")throw new Error("Invalid argument passed to uncompress.");for(var d,m,C,E,v={},H=1,R=v,k=[],j="",J="",X=B.length-1,K=1;K<X;K+=1)(E=B[K])=="'"?d?(C=d.join(""),d=void 0):d=[]:d?d.push(E):E=="{"?(k.push([R,C]),R={},C=void 0):E=="}"?((m=k.pop())[0][m[1]]=R,C=void 0,R=m[0]):E=="-"?H=-1:C===void 0?r.hasOwnProperty(E)?(j+=r[E],C=parseInt(j,16)*H,H=1,j=""):j+=E:r.hasOwnProperty(E)?(J+=r[E],R[C]=parseInt(J,16)*H,H=1,C=void 0,J=""):J+=E;return v},u={codePages:["WinAnsiEncoding"],WinAnsiEncoding:l("{19m8n201n9q201o9r201s9l201t9m201u8m201w9n201x9o201y8o202k8q202l8r202m9p202q8p20aw8k203k8t203t8v203u9v2cq8s212m9t15m8w15n9w2dw9s16k8u16l9u17s9z17x8y17y9y}")},f={Unicode:{Courier:u,"Courier-Bold":u,"Courier-BoldOblique":u,"Courier-Oblique":u,Helvetica:u,"Helvetica-Bold":u,"Helvetica-BoldOblique":u,"Helvetica-Oblique":u,"Times-Roman":u,"Times-Bold":u,"Times-BoldItalic":u,"Times-Italic":u}},p={Unicode:{"Courier-Oblique":l("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-BoldItalic":l("{'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}cp{4qu5kt5qt5rs17ss5ts}6l{4qu5ou5qw5rt17su5tu}5q
|
|||
|
|
<<
|
|||
|
|
`+C.join(`
|
|||
|
|
`)+`
|
|||
|
|
>>`)}),this.internal.viewerpreferences.isSubscribed=!0),this.internal.viewerpreferences.configuration=e,this},jA.API.addMetadata=function(t,A){return this.internal.__metadata__===void 0&&(this.internal.__metadata__={metadata:t,namespaceUri:A??"http://jspdf.default.namespaceuri/",rawXml:typeof A=="boolean"&&A},this.internal.events.subscribe("putCatalog",iQ),this.internal.events.subscribe("postPutResources",nQ)),this},(function(t){var A=t.API,e=A.pdfEscape16=function(i,a){for(var s,l=a.metadata.Unicode.widths,u=["","0","00","000","0000"],f=[""],p=0,B=i.length;p<B;++p){if(s=a.metadata.characterToGlyph(i.charCodeAt(p)),a.metadata.glyIdsUsed.push(s),a.metadata.toUnicode[s]=i.charCodeAt(p),l.indexOf(s)==-1&&(l.push(s),l.push([parseInt(a.metadata.widthOfGlyph(s),10)])),s=="0")return f.join("");s=s.toString(16),f.push(u[4-s.length],s)}return f.join("")},r=function(i){var a,s,l,u,f,p,B;for(f=`/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`,l=[],p=0,B=(s=Object.keys(i).sort(function(d,m){return d-m})).length;p<B;p++)a=s[p],l.length>=100&&(f+=`
|
|||
|
|
`+l.length+` beginbfchar
|
|||
|
|
`+l.join(`
|
|||
|
|
`)+`
|
|||
|
|
endbfchar`,l=[]),i[a]!==void 0&&i[a]!==null&&typeof i[a].toString=="function"&&(u=("0000"+i[a].toString(16)).slice(-4),a=("0000"+(+a).toString(16)).slice(-4),l.push("<"+a+"><"+u+">"));return l.length&&(f+=`
|
|||
|
|
`+l.length+` beginbfchar
|
|||
|
|
`+l.join(`
|
|||
|
|
`)+`
|
|||
|
|
endbfchar
|
|||
|
|
`),f+`endcmap
|
|||
|
|
CMapName currentdict /CMap defineresource pop
|
|||
|
|
end
|
|||
|
|
end`};A.events.push(["putFont",function(i){(function(a){var s=a.font,l=a.out,u=a.newObject,f=a.putStream;if(s.metadata instanceof t.API.TTFFont&&s.encoding==="Identity-H"){for(var p=s.metadata.Unicode.widths,B=s.metadata.subset.encode(s.metadata.glyIdsUsed,1),d="",m=0;m<B.length;m++)d+=String.fromCharCode(B[m]);var C=u();f({data:d,addLength1:!0,objectId:C}),l("endobj");var E=u();f({data:r(s.metadata.toUnicode),addLength1:!0,objectId:E}),l("endobj");var v=u();l("<<"),l("/Type /FontDescriptor"),l("/FontName /"+La(s.fontName)),l("/FontFile2 "+C+" 0 R"),l("/FontBBox "+t.API.PDFObject.convert(s.metadata.bbox)),l("/Flags "+s.metadata.flags),l("/StemV "+s.metadata.stemV),l("/ItalicAngle "+s.metadata.italicAngle),l("/Ascent "+s.metadata.ascender),l("/Descent "+s.metadata.decender),l("/CapHeight "+s.metadata.capHeight),l(">>"),l("endobj");var H=u();l("<<"),l("/Type /Font"),l("/BaseFont /"+La(s.fontName)),l("/FontDescriptor "+v+" 0 R"),l("/W "+t.API.PDFObject.convert(p)),l("/CIDToGIDMap /Identity"),l("/DW 1000"),l("/Subtype /CIDFontType2"),l("/CIDSystemInfo"),l("<<"),l("/Supplement 0"),l("/Registry (Adobe)"),l("/Ordering ("+s.encoding+")"),l(">>"),l(">>"),l("endobj"),s.objectNumber=u(),l("<<"),l("/Type /Font"),l("/Subtype /Type0"),l("/ToUnicode "+E+" 0 R"),l("/BaseFont /"+La(s.fontName)),l("/Encoding /"+s.encoding),l("/DescendantFonts ["+H+" 0 R]"),l(">>"),l("endobj"),s.isAlreadyPutted=!0}})(i)}]),A.events.push(["putFont",function(i){(function(a){var s=a.font,l=a.out,u=a.newObject,f=a.putStream;if(s.metadata instanceof t.API.TTFFont&&s.encoding==="WinAnsiEncoding"){for(var p=s.metadata.rawData,B="",d=0;d<p.length;d++)B+=String.fromCharCode(p[d]);var m=u();f({data:B,addLength1:!0,objectId:m}),l("endobj");var C=u();f({data:r(s.metadata.toUnicode),addLength1:!0,objectId:C}),l("endobj");var E=u();l("<<"),l("/Descent "+s.metadata.decender),l("/CapHeight "+s.metadata.capHeight),l("/StemV "+s.metadata.stemV),l("/Type /FontDescriptor"),l("/FontFile2 "+m+" 0 R"),l("/Flags 96"),l("/FontBBox "+t.API.PDFObject.convert(s.metadata.bbox)),l("/FontName /"+La(s.fontName)),l("/ItalicAngle "+s.metadata.italicAngle),l("/Ascent "+s.metadata.ascender),l(">>"),l("endobj"),s.objectNumber=u();for(var v=0;v<s.metadata.hmtx.widths.length;v++)s.metadata.hmtx.widths[v]=parseInt(s.metadata.hmtx.widths[v]*(1e3/s.metadata.head.unitsPerEm));l("<</Subtype/TrueType/Type/Font/ToUnicode "+C+" 0 R/BaseFont/"+La(s.fontName)+"/FontDescriptor "+E+" 0 R/Encoding/"+s.encoding+" /FirstChar 29 /LastChar 255 /Widths "+t.API.PDFObject.convert(s.metadata.hmtx.widths)+">>"),l("endobj"),s.isAlreadyPutted=!0}})(i)}]);var n=function(i){var a,s=i.text||"",l=i.x,u=i.y,f=i.options||{},p=i.mutex||{},B=p.pdfEscape,d=p.activeFontKey,m=p.fonts,C=d,E="",v=0,H="",R=m[C].encoding;if(m[C].encoding!=="Identity-H")return{text:s,x:l,y:u,options:f,mutex:p};for(H=s,C=d,Array.isArray(s)&&(H=s[0]),v=0;v<H.length;v+=1)m[C].metadata.hasOwnProperty("cmap")&&(a=m[C].metadata.cmap.unicode.codeMap[H[v].charCodeAt(0)]),a||H[v].charCodeAt(0)<256&&m[C].metadata.hasOwnProperty("Unicode")?E+=H[v]:E+="";var k="";return parseInt(C.slice(1))<14||R==="WinAnsiEncoding"?k=B(E,C).split("").map(function(j){return j.charCodeAt(0).toString(16)}).join(""):R==="Identity-H"&&(k=e(E,m[C])),p.isHex=!0,{text:k,x:l,y:u,options:f,mutex:p}};A.events.push(["postProcessText",function(i){var a=i.text||"",s=[],l={text:a,x:i.x,y:i.y,options:i.options,mutex:i.mutex};if(Array.isArray(a)){var u=0;for(u=0;u<a.length;u+=1)Array.isArray(a[u])&&a[u].length===3?s.push([n(Object.assign({},l,{text:a[u][0]})).text,a[u][1],a[u][2]]):s.push(n(Object.assign({},l,{text:a[u]})).text);i.text=s}else i.text=n(Object.assign({},l,{text:a})).text}])})(jA),(function(t){var A=function(){return this.internal.vFS===void 0&&(this.internal.vFS={}),!0};t.existsFileInVFS=function(e){return A.call(this),this.internal.vFS[e]!==void 0},t.addFileToVFS=function(e,r){return A.call(this),this.internal.vFS[e]=r,this},t.getFileFromVFS=function(e){return A.call(this),this.internal.vFS[e]!==void 0?this.internal.vFS[e]:null}})(jA.API),(function(t){t.__bidiEngine__=t.prototy
|
|||
|
|
`)}return""+e},A})();const CQ={style:{"max-height":"calc(100vh - 200px)","overflow-y":"auto",display:"flex","justify-content":"center"}},bQ={class:"dialog-footer"},yQ=wr({__name:"index",setup(t,{expose:A}){const e=ZA(!1),r=ZA(),n=ZA(),i=ZA(!1),a=f=>{if(i.value=!0,e.value=!0,!f)return;const p=f.cloneNode(!0),B=p.querySelectorAll("img"),d=Array.from(B).map(m=>(!m.src.startsWith(window.origin)&&m.src.startsWith("http")&&(m.src=`${window.MaxKB.prefix}/api/resource_proxy?url=${encodeURIComponent(m.src)}`),m.setAttribute("onerror",""),new Promise(C=>{if(m.complete){C({img:m,success:m.naturalWidth>0});return}m.onload=()=>C({img:m,success:!0}),m.onerror=()=>C({img:m,success:!1})})));Promise.all(d).finally(()=>{setTimeout(()=>{Gi(()=>{n.value.appendChild(p),a5(p,{pixelRatio:1,quality:1,onImageErrorHandler:(m,C,E,v,H)=>{console.log(m,C,E,v,H)}}).then(m=>fetch(m).then(C=>C.text()).then(C=>{const v=new DOMParser().parseFromString(C,"image/svg+xml");n.value.style.display="none";const H=v.documentElement;r.value.appendChild(H),r.value.style.height=H.scrollHeight+"px"})).finally(()=>{e.value=!1}).catch(m=>{e.value=!1})})},1)})},s=()=>{e.value=!0,setTimeout(()=>{Gi(()=>{Zu(r.value,{logging:!1}).then(f=>{const p=new jA("p","mm","a4"),B=f.toDataURL("image/jpeg",1),d=p.internal.pageSize.getWidth(),m=p.internal.pageSize.getHeight(),C=d,E=f.height*C/f.width;p.addImage(B,"jpeg",0,0,C,E);let v=E,H=0;for(v-=m;v>=0;)H=v-E,p.addPage(),p.addImage(B,"jpeg",0,H,C,E),v-=m;return p.save("导出文档.pdf"),"ok"}).finally(()=>{e.value=!1})})})},l=()=>{e.value=!0,setTimeout(()=>{Gi(()=>{Zu(r.value,{logging:!1}).then(f=>{const p=f.toDataURL("image/jpeg",1),B=document.createElement("a");return B.download="webpage-screenshot.jpeg",B.href=p,document.body.appendChild(B),B.click(),"ok"}).finally(()=>{e.value=!1})})},1)},u=()=>{i.value=!1};return A({open:a,close:u}),(f,p)=>{const B=DA("el-button"),d=DA("el-dialog"),m=Kl("loading");return te(),De(d,{modelValue:i.value,"onUpdate:modelValue":p[1]||(p[1]=C=>i.value=C),title:f.$t("chat.preview"),style:{overflow:"auto"},width:"60%","before-close":u,"destroy-on-close":"","align-center":""},{footer:EA(()=>[xA("span",bQ,[FA(B,{loading:e.value,onClick:s},{default:EA(()=>[Ut(ae(f.$t("chat.exportPDF")),1)]),_:1},8,["loading"]),FA(B,{loading:e.value,type:"primary",onClick:p[0]||(p[0]=()=>{e.value=!0,l()})},{default:EA(()=>[Ut(ae(f.$t("chat.exportImg")),1)]),_:1},8,["loading"])])]),default:EA(()=>[Ar((te(),ut("div",CQ,[xA("div",{ref_key:"cloneContainerRef",ref:n,style:{width:"100%"}},null,512),xA("div",{ref_key:"svgContainerRef",ref:r},null,512)])),[[m,e.value]])]),_:1},8,["modelValue","title"])}}}),FQ={class:"app-top-bar-container border-b flex-center"},QQ={class:"flex-between w-full align-center",style:{padding:"0 16px"}},UQ={class:"chat-header-brand"},xQ={style:{display:"flex","align-items":"center"}},EQ={key:0,class:"flex align-center"},LQ={class:"user-info p-16 cursor"},_Q={class:"flex align-center"},IQ={class:"flex align-center p-8"},SQ={class:"mr-8 flex align-center"},HQ={class:"medium mb-4"},NQ={class:"color-secondary"},kQ={class:"flex-between w-full"},TQ={class:"ellipsis-1",style:{width:"66%"}},DQ={key:0,class:"flex align-center"},OQ={key:1,class:"lighter"},PQ={style:{flex:"1",width:"calc(100% - var(--execution-detail-panel-width))"}},RQ={class:"right-height chat-width"},MQ={class:"execution-detail-panel",resizable:!1,collapsible:""},KQ={class:"p-16 flex-between border-b"},GQ=["title"],VQ={class:"flex align-center"},jQ={key:0,class:"mr-4"},qQ=["href","title"],WQ={class:"execution-detail-content"},zQ=wr({__name:"index",props:{application_profile:{},applicationAvailable:{type:Boolean}},setup(t){$1();const A=ZA(),{common:e,chatUser:r}=mi(),n=Ks(),i=()=>{var oA;(oA=A.value)==null||oA.open(document.getElementById("chatListId"))},a=df(),s=ZA(!1),l=ZA(!1);iB(()=>e.device,()=>{e.isMobile()&&(l.value=!1)});const u=()=>{r.logout().then(()=>{n.push({name:"login",query:a.query})})},f=ZA(),p=()=>{var oA;(oA=f.value)==null||oA.open()},B=oA=>{Pt.resetCurrentPassword(oA).then(()=>{n.push({name:"login"})})},d=cn(()=>({mobile:e.isM
|
|||
|
|
|
|||
|
|
${IA.answer_text}
|
|||
|
|
|
|||
|
|
`).join(`
|
|||
|
|
`),UA=new Blob([bA],{type:"text/markdown;charset=utf-8"});Sh.saveAs(UA,oA)}async function cA(){const oA=`${X.value}.html`,bA=J.value.map(N=>`# ${N.problem_text}
|
|||
|
|
|
|||
|
|
${N.answer_text}
|
|||
|
|
|
|||
|
|
`).join(`
|
|||
|
|
`),UA=Oe(bA),IA=new Blob([UA],{type:"text/html;charset=utf-8"});Sh.saveAs(IA,oA)}const mA=()=>{V()};gf(()=>{mA()});const uA=ZA(0),F=ZA(""),T=ZA(""),M=ZA(!1),q=ZA([]),Y=ZA();async function tA(oA){if(uA.value=400,F.value=wt("chat.executionDetails.title"),T.value="executionDetail",oA.execution_details)q.value=Fh.cloneDeep(oA.execution_details);else{const bA=await Pt.getChatRecord(oA.chat_id,oA.record_id,M);q.value=Fh.cloneDeep(bA.data.execution_details)}}async function fA(oA){F.value=wt("chat.KnowledgeSource.title"),T.value="knowledgeSource",Y.value=oA,uA.value=400}function hA(oA,bA){F.value=bA.document_name,T.value="paragraphDocument",uA.value=400,Y.value=bA}function dA(){uA.value=0}return(oA,bA)=>{var qA,xe,we,ne,be,me,RA,se;const UA=DA("AppIcon"),IA=DA("el-dropdown-item"),N=DA("el-dropdown-menu"),_A=DA("el-dropdown"),fe=DA("el-avatar"),XA=DA("AiChat"),yA=DA("el-button"),JA=DA("Close"),NA=DA("el-icon"),zA=Kl("loading");return Ar((te(),ut("div",{class:pf(["chat-pc",d.value]),style:On({"--el-color-primary":(xe=(qA=R.value)==null?void 0:qA.custom_theme)==null?void 0:xe.theme_color,"--el-color-primary-light-9":Ce(Pn)(((ne=(we=R.value)==null?void 0:we.custom_theme)==null?void 0:ne.theme_color)||"#3370FF",.1),"--el-color-primary-light-6":Ce(Pn)(((me=(be=R.value)==null?void 0:be.custom_theme)==null?void 0:me.theme_color)||"#3370FF",.4),"--el-color-primary-light-06":Ce(Pn)(((se=(RA=R.value)==null?void 0:RA.custom_theme)==null?void 0:se.theme_color)||"#3370FF",.04)})},[xA("div",FQ,[xA("div",QQ,[xA("div",UQ,[FA(gB,{class:"chat-header-icon"}),bA[1]||(bA[1]=xA("h1",{class:"chat-header-title"},"AI-RAG",-1))]),xA("div",xQ,[J.value.length?(te(),ut("span",EQ,[FA(_A,{class:"ml-8"},{dropdown:EA(()=>[FA(N,null,{default:EA(()=>[FA(IA,{onClick:eA},{default:EA(()=>[Ut(ae(oA.$t("common.export"))+" Markdown",1)]),_:1}),FA(IA,{onClick:cA},{default:EA(()=>[Ut(ae(oA.$t("common.export"))+" HTML",1)]),_:1}),FA(IA,{onClick:i},{default:EA(()=>[Ut(ae(oA.$t("common.export"))+" PDF",1)]),_:1})]),_:1})]),default:EA(()=>[FA(UA,{iconName:"app-export",class:"cursor",title:oA.$t("chat.exportRecords")},null,8,["title"])]),_:1})])):_t("",!0)])])]),FA(uB,{class:"application-manage","show-collapse":!1},{left:EA(()=>[FA(Bf,{"application-detail":R.value,"chat-log-data":k.value,"left-loading":H.value,currentChatId:X.value,onNewChat:G,onClickLog:sA,onDeleteLog:W,onClearChat:U,onRefreshFieldTitle:L,isPcCollapse:l.value},{default:EA(()=>{var OA;return[xA("div",LQ,[!((OA=Ce(r).chat_profile)!=null&&OA.authentication)||Ce(r).chat_profile.authentication_type==="password"?(te(),De(fe,{key:0,size:32},{default:EA(()=>[...bA[2]||(bA[2]=[xA("img",{src:hi,style:{width:"54%"},alt:""},null,-1)])]),_:1})):(te(),De(_A,{key:1,trigger:"click",type:"primary",class:"w-full"},{dropdown:EA(()=>[FA(N,{style:{"min-width":"260px"}},{default:EA(()=>{var _e,ve,oe,le;return[xA("div",IQ,[xA("div",SQ,[FA(fe,{size:40},{default:EA(()=>[...bA[4]||(bA[4]=[xA("img",{src:hi,style:{width:"54%"},alt:""},null,-1)])]),_:1})]),xA("div",null,[xA("h4",HQ,ae((_e=Ce(r).chatUserProfile)==null?void 0:_e.nick_name),1),xA("div",NQ,ae(`${Ce(wt)("common.username")}: ${(ve=Ce(r).chatUserProfile)==null?void 0:ve.username}`),1)])]),((oe=Ce(r).chatUserProfile)==null?void 0:oe.source)==="LOCAL"?(te(),De(IA,{key:0,class:"border-t",style:{"padding-top":"8px","padding-bottom":"8px"},onClick:p},{default:EA(()=>[FA(UA,{iconName:"app-key",class:"color-secondary"}),Ut(" "+ae(oA.$t("views.login.resetPassword")),1)]),_:1})):_t("",!0),((le=Ce(r).chatUserProfile)==null?void 0:le.source)==="LOCAL"?(te(),De(IA,{key:1,class:"border-t",style:{"padding-top":"8px","padding-bottom":"8px"},onClick:u},{default:EA(()=>[FA(UA,{iconName:"app-export",class:"color-secondary"}),Ut(" "+ae(oA.$t("layout.logout")),1)]),_:1})):_t("",!0)]}),_:1})]),default:EA(()=>{var _e;return[xA("div",_Q,[FA(fe,{size:32},{default:EA(()=>[...bA[3]||(bA[3]=[xA("img",{src:hi,style:{width:"54%"},alt:""},null,-1)])]),_:1}),Ar(xA("span",{class:"ml-8 color-text-primary"},ae((_e=Ce(r).chatUserProfile)==null?void 0:_e.nick_name),513),[[Tn,!l.value]])])]}),_:1}))])]}),_:1},8,[
|