224 lines
667 KiB
JavaScript
224 lines
667 KiB
JavaScript
|
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./admin-CkbVdLTL.js","./admin-DNnRQ7pR.css","./index.es-BoX6Cw5D.js","./defineProperty-DbXIQDXj.js","./typeof-QjJsDpFa.js"])))=>i.map(i=>d[i]);
|
|||
|
|
var J1=Object.defineProperty;var bh=t=>{throw TypeError(t)};var Y1=(t,A,e)=>A in t?J1(t,A,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[A]=e;var JA=(t,A,e)=>Y1(t,typeof A!="symbol"?A+"":A,e),$1=(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 _o=(t,A,e)=>($1(t,A,"access private method"),e);import{_ as Z1,u as AB,a as eB}from"./index-DmOGZmTO.js";import{ay as mr,aO as on,aE as _e,aF as $A,cp as Kl,b2 as we,aB as YA,aD as TA,aG as EA,aH as FA,aI as LA,aS as Gr,aK as xt,aJ as oe,d9 as Pt,aA as di,b7 as Gl,aW as vt,cE as tB,b8 as Ar,b1 as It,c_ as hf,bd as Sn,cg as _n,aX as rB,aY as nB,cf as $i,ba as yl,az as Ks,aP as df,bb as Vl,cw as oi,aU as $g,aC as mt,b6 as gf,eG as Hn,bD as Vi,b3 as iB,c0 as aB,ce as pf,eH as Io,cr as Dc,aV as sB,eI as oB,eJ as lB,eK as cB,eL as uB,aZ as Fh,cs as fB,bF as hB}from"./admin-CkbVdLTL.js";import{_ as Zg}from"./ResetPassword.vue_vue_type_script_setup_true_lang-ByZoTF9H.js";import{_ as dB}from"./500-CPkRZzc6.js";import{_ as je}from"./typeof-QjJsDpFa.js";import"./index-DOysudDJ.js";const gB=Object.freeze(Object.defineProperty({__proto__:null,get default(){return jQ}},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 pB(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 BB=Object.freeze(Object.defineProperty({__proto__:null,default:Z1},Symbol.toStringTag,{value:"Module"})),wB=mr({__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":BB}),r=A,n=t,i=on({get:()=>n.modelValue,set:a=>{r("update:modelValue",a)}});return(a,s)=>($A(),_e(Kl(we(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"]))}}),mB=Object.freeze(Object.defineProperty({__proto__:null,default:wB},Symbol.toStringTag,{value:"Module"})),vB={class:"dialog-footer"},CB=mr({__name:"EditTitleDialog",emits:["refresh"],setup(t,{expose:A,emit:e}){const r=e,n=YA(),i=YA(!1),a=YA(""),s=YA(""),l=YA({abstract:""}),u=YA(!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=TA("el-input"),C=TA("el-form-item"),E=TA("el-form"),v=TA("el-button"),H=TA("el-dialog");return $A(),_e(H,{class:"responsive-dialog",title:B.$t("chat.editTitle"),modelValue:u.value,"onUpdate:modelValue":d[4]||(d[4]=P=>u.value=P),"close-on-click-modal":!1,"close-on-press-escape":!1,"destroy-on-close":!0,"append-to-body":""},{footer:EA(()=>[LA("span",vB,[FA(v,{onClick:d[2]||(d[2]=Gr(P=>u.value=!1,["prevent"]))},{default:EA(()=>[xt(oe(B.$t("common.cancel")),1)]),_:1}),FA(v,{type:"primary",onClick:d[3]||(d[3]=P=>p(n.value)),loading:i.value},{default:EA(()=>[xt(oe(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]=P=>l.value.abstract=P),maxlength:"1024","show-word-limit":"",type:"textarea",onBlur:d[1]||(d[1]=P=>l.value.abstract=l.value.abstract.trim())},null,8,["modelValue"])]),_:1},8,["rules"])]),_:1},8,["model"])]),_:1},8,["title","modelValue"])}}}),bB={class:"history-component h-full"},yB={style
|
|||
|
|
`).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){JA(this,"options");JA(this,"rules");JA(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:So(r,`
|
|||
|
|
`)}}}fences(A){const e=this.rules.block.fences.exec(A);if(e){const r=e[0],n=R2(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=So(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=So(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+|$)`),P=new RegExp(`^ {0,${Math.min(3,d-1)}}(?:\`\`\`|~~~)`),N=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," ")),P.test(B)||N.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||P.test(p)||N.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:Br(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=So(r.slice(0,-1),"\\");if((r.length-a.length)%2===0)return}else{const a=P2(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=Br(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=Br(e[1]),n="mailto:"+r):(r=Br(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=Br(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=Br(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=Br(e[0]),{type:"text",raw:e[0],text:r}}}}const M2=/^(?: *(?:\n|$))+/,K2=/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,G2=/^ {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+|$)/,V2=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,rp=/(?:[*+
|
|||
|
|
]`).replace("lheading",np).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},ap=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,$2=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,sp=/^( {2,}|\\)\n(?!\s*$)/,Z2=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Vs="\\p{P}\\p{S}",Aw=Re(/^((?![*_])[\spunctuation])/,"u").replace(/punctuation/g,Vs).getRegex(),ew=/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g,tw=Re(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,Vs).getRegex(),rw=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(),nw=Re("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,Vs).getRegex(),iw=Re(/\\([punct])/,"gu").replace(/punct/g,Vs).getRegex(),aw=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(),sw=Re(Cf).replace("(?:-->|$)","-->").getRegex(),ow=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",sw).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Ql=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,lw=Re(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",Ql).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),op=Re(/^!?\[(label)\]\[(ref)\]/).replace("label",Ql).replace("ref",vf).getRegex(),lp=Re(/^!?\[(ref)\](?:\[\])?/).replace("ref",vf).getRegex(),cw=Re("reflink|nolink(?!\\()","g").replace("reflink",op).replace("nolink",lp).getRegex(),yf={_backpedal:Es,anyPunctuation:iw,autolink:aw,blockSkip:ew,br:sp,code:$2,del:Es,emStrongLDelim:tw,emStrongRDelimAst:rw,emStrongRDelimUnd:nw,escape:ap,link:lw,nolink:lp,punctuation:Aw,reflink:op,reflinkSearch:cw,tag:ow,text:Z2,url:Es},uw={...yf,link:Re(/^!?\[(label)\]\((.*?)\)/).replace("label",Ql).getRegex(),reflink:Re(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Ql).getRegex()},xu={...yf,escape:Re(ap).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.!#$%&'*+\/=?_`{\|}~-]+@)))/},fw={...xu,br:Re(sp).replace("{2,}","*").getRegex(),text:Re(xu.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Ho={normal:bf,gfm:J2,pedantic:Y2},ds={normal:yf,gfm:xu,breaks:fw,pedantic:uw};class nn{constructor(A){JA(this,"tokens");JA(this,"options");JA(this,"state");JA(this,"tokenizer");JA(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:Ho.normal,inline:ds.normal};this.options.pedantic?(e.block=Ho.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){JA(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-'+Br(n)+'">'+(r?A:Br(A,!0))+`</code></pre>
|
|||
|
|
`:"<pre><code>"+(r?A:Br(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 an{constructor(A){JA(this,"options");JA(this,"renderer");JA(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 an(e).parse(A)}static parseInline(A,e){return new an(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,D2(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){JA(this,"options");this.options=A||Zi}preprocess(A){return A}postprocess(A){return A}processAllTokens(A){return A}}JA(Ls,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"]));var Yi,Eu,cp;class hw{constructor(...A){yh(this,Yi);JA(this,"defaults",wf());JA(this,"options",this.setOptions);JA(this,"parse",_o(this,Yi,Eu).call(this,nn.lex,an.parse));JA(this,"parseInline",_o(this,Yi,Eu).call(this,nn.lexInline,an.parseInline));JA(this,"Parser",an);JA(this,"Renderer",Ul);JA(this,"TextRenderer",Ff);JA(this,"Lexer",nn);JA(this,"Tokenizer",Fl);JA(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>"+Br(r.message+"",!0)+"</pre>";return e?Promise.resolve(n):n}if(e)return Promise.reject(r);throw r}};const zi=new hw;function Oe(t,A){return zi.parse(t,A)}Oe.options=Oe.setOptions=function(t){return zi.setOptions(t),Oe.defaults=zi.defaults,Ap(Oe.defaults),Oe};Oe.getDefaults=wf;Oe.defaults=Zi;Oe.use=function(...t){return zi.use(...t),Oe.defaults=zi.defaults,Ap(Oe.defaults),Oe};Oe.walkTokens=function(t,A){return zi.walkTokens(t,A)};Oe.parseInline=zi.parseInline;Oe.Parser=an;Oe.parser=an.parse;Oe.Renderer=Ul;Oe.TextRenderer=Ff;Oe.Lexer=nn;Oe.lexer=nn.lex;Oe.Tokenizer=Fl;Oe.Hooks=Ls;Oe.parse=Oe;Oe.options;Oe.setOptions;Oe.use;Oe.walkTokens;Oe.parseInline;an.parse;nn.lex;var fl={exports:{}},dw=fl.exports,Ih;function gw(){return Ih||(Ih=1,(function(t,A){(function(e,r){r()})(dw,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 Io=="object"&&Io.global===Io?Io: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 P=E.result;P=C?P:P.replace(/^data:[^;]*;/,"data:attachment/file;"),B?B.location.href=P:location=P,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=gw();function pw(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 Bw=(()=>{let t=0;const A=()=>`0000${(Math.random()*36**4<<0).toString(36)}`.slice(-4);return()=>(t+=1,`u${A()}${t}`)})();function li(t){const A=[];for(let e=0,r=t.length;e<r;e++)A.push(t[e]);return A}let ga=null;function up(t={}){return ga||(t.includeStyleProperties?(ga=t.includeStyleProperties,ga):(ga=li(window.getComputedStyle(document.documentElement)),ga))}function xl(t,A){const r=(t.o
|
|||
|
|
`)}async function n5(t,A){const e=A.fontEmbedCSS!=null?A.fontEmbedCSS:A.skipFonts?null:await r5(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 i5(t,A={}){const{width:e,height:r}=vw(t,A),n=await ql(t,A,!0);return await n5(n,A),await Bp(n,A),$w(n,A),await bw(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 Iu=function(t,A){return Iu=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])},Iu(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");Iu(t,A);function e(){this.constructor=t}t.prototype=A===null?Object.create(A):(e.prototype=A.prototype,new e)}var Su=function(){return Su=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},Su.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 zt(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 No(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 kn=(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})(),Wl=function(t,A){return kn.fromClientRect(t,A.getBoundingClientRect())},a5=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 kn(0,0,r,n)},zl=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},ft=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+/",s5=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var ko=0;ko<Rh.length;ko++)s5[Rh.charCodeAt(ko)]=ko;var Mh="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwx
|
|||
|
|
content: "" !important;
|
|||
|
|
display: none !important;
|
|||
|
|
}`,j4=function(t){q4(t,"."+Yu+G4+kd+`
|
|||
|
|
.`+$u+V4+kd)},q4=function(t,A){var e=t.ownerDocument;if(e){var r=e.createElement("style");r.textContent=A,t.appendChild(r)}},g0=(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})(),W4=(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)||(nu(A)||Y4(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 zt(this,function(s){switch(s.label){case 0:return e=g0.isSameOrigin(A),r=!ru(A)&&this._options.useCORS===!0&&Ot.SUPPORT_CORS_IMAGES&&!e,n=!ru(A)&&!e&&!nu(A)&&typeof this._options.proxy=="string"&&Ot.SUPPORT_CORS_XHR&&!r,!e&&this._options.allowTaint===!1&&!ru(A)&&!nu(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,($4(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})(),z4=/^data:image\/svg\+xml/i,X4=/^data:image\/.*;base64,/i,J4=/^data:image\/.*/i,Y4=function(t){return Ot.SUPPORT_SVG_DRAWING||!Z4(t)},ru=function(t){return J4.test(t)},$4=function(t){return X4.test(t)},nu=function(t){return t.substr(0,4)==="blob"},Z4=function(t){return t.substr(-3).toLowerCase()==="svg"||z4.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)},Zo=(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})(),_r=function(t){return t.type===1},Ab=(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 Kb(t)||Gb(t,A)||pB(t,A)||Vb()}function Vd(t,A="utf8"){return new TextDecoder(A).decode(t)}const jb=new TextEncoder;function qb(t){return jb.encode(t)}const Wb=1024*8,zb=(()=>{const t=new Uint8Array(4),A=new Uint32Array(t.buffer);return!((A[0]=1)&t[0])})(),su={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=Wb,e={}){JA(this,"buffer");JA(this,"byteLength");JA(this,"byteOffset");JA(this,"length");JA(this,"offset");JA(this,"lastWrittenByte");JA(this,"littleEndian");JA(this,"_data");JA(this,"_mark");JA(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=su[e].BYTES_PER_ELEMENT*A,n=this.byteOffset+this.offset,i=this.buffer.slice(n,n+r);if(this.littleEndian===zb&&e!=="uint8"&&e!=="int8"){const s=new Uint8Array(this.buffer.slice(n,n+r));s.reverse();const l=new su[e](s.buffer);return this.offset+=r,l.reverse(),l}const a=new su[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 A1(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=te.atob.bind(te),Lg=te.btoa.bind(te);/**
|
|||
|
|
* @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 Cu(t,A){var e=t[0],r=t[1],n=t[2],i=t[3];e=Vt(e,r,n,i,A[0],7,-680876936),i=Vt(i,e,r,n,A[1],12,-389564586),n=Vt(n,i,e,r,A[2],17,606105819),r=Vt(r,n,i,e,A[3],22,-1044525330),e=Vt(e,r,n,i,A[4],7,-176418897),i=Vt(i,e,r,n,A[5],12,1200080426),n=Vt(n,i,e,r,A[6],17,-1473231341),r=Vt(r,n,i,e,A[7],22,-45705983),e=Vt(e,r,n,i,A[8],7,1770035416),i=Vt(i,e,r,n,A[9],12,-1958414417),n=Vt(n,i,e,r,A[10],17,-42063),r=Vt(r,n,i,e,A[11],22,-1990404162),e=Vt(e,r,n,i,A[12],7,1804603682),i=Vt(i,e,r,n,A[13],12,-40341101),n=Vt(n,i,e,r,A[14],17,-1502002290),e=jt(e,r=Vt(r,n,i,e,A[15],22,1236535329),n,i,A[1],5,-165796510),i=jt(i,e,r,n,A[6],9,-1069501632),n=jt(n,i,e,r,A[11],14,643717713),r=jt(r,n,i,e,A[0],20,-373897302),e=jt(e,r,n,i,A[5],5,-701558691),i=jt(i,e,r,n,A[10],9,38016083),n=jt(n,i,e,r,A[15],14,-660478335),r=jt(r,n,i,e,A[4],20,-405537848),e=jt(e,r,n,i,A[9],5,568446438),i=jt(i,e,r,n,A[14],9,-1019803690),n=jt(n,i,e,r,A[3],14,-187363961),r=jt(r,n,i,e,A[8],20,1163531501),e=jt(e,r,n,i,A[13],5,-1444681467),i=jt(i,e,r,n,A[2],9,-51403784),n=jt(n,i,e,r,A[7],14,1735328473),e=qt(e,r=jt(r,n,i,e,A[12],20,-1926607734),n,i,A[5],4,-378558),i=qt(i,e,r,n,A[8],11,-2022574463),n=qt(n,i,e,r,A[11],16,1839030562),r=qt(r,n,i,e,A[14],23,-35309556),e=qt(e,r,n,i,A[1],4,-1530992060),i=qt(i,e,r,n,A[4],11,1272893353),n=qt(n,i,e,r,A[7],16,-155497632),r=qt(r,n,i,e,A[10],23,-1094730640),e=qt(e,r,n,i,A[13],4,681279174),i=qt(i,e,r,n,A[0],11,-358537222),n=qt(n,i,e,r,A[3],16,-722521979),r=qt(r,n,i,e,A[6],23,76029189),e=qt(e,r,n,i,A[9],4,-640364487),i=qt(i,e,r,n,A[12],11,-421815835),n=qt(n,i,e,r,A[15],16,530742520),e=Wt(e,r=qt(r,n,i,e,A[2],23,-995338651),n,i,A[0],6,-198630844),i=Wt(i,e,r,n,A[7],10,1126891415),n=Wt(n,i,e,r,A[14],15,-1416354905),r=Wt(r,n,i,e,A[5],21,-57434055),e=Wt(e,r,n,i,A[12],6,1700485571),i=Wt(i,e,r,n,A[3],10,-1894986606),n=Wt(n,i,e,r,A[10],15,-1051523),r=Wt(r,n,i,e,A[1],21,-2054922799),e=Wt(e,r,n,i,A[8],6,1873313359),i=Wt(i,e,r,n,A[15],10,-30611744),n=Wt(n,i,e,r,A[6],15,-1560198380),r=Wt(r,n,i,e,A[13],21,1309151649),e=Wt(e,r,n,i,A[4],6,-145523070),i=Wt(i,e,r,n,A[11],10,-1120210379),n=Wt(n,i,e,r,A[2],15,718787259),r=Wt(r,n,i,e,A[9],21,-343485551),t[0]=si(e,t[0]),t[1]=si(r,t[1]),t[2]=si(n,t[2]),t[3]=si(i,t[3])}function nc(t,A,e,r,n,i){return A=si(si(A,t),si(r,i)),si(A<<n|A>>>32-n,e)}function Vt(t,A,e,r,n,i,a){return nc(A&e|~A&r,t,A,n,i,a)}function jt(t,A,e,r,n,i,a){return nc(A&r|e&~r,t,A,n,i,a)}function qt(t,A,e,r,n,i,a){return nc(A^e^r,t,A,n,i,a)}function Wt(t,A,e,r,n,i,a){return nc(e^(A|~r),t,A,n,i,a)}function e1(t){var A,e=t.length,r=[1732584193,-271733879,-1732584194,271733878];for(A=64;A<=t.length;A+=64)Cu(r,TF(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(Cu(r,n),A=0;A<16;A++)n[A]=0;return n[14]=8*e,Cu(r,n),r}function TF(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 DF(t){for(var A="",e=0;e<4;e++)A+=_g[t>>8*e+4&15]+_g[t>>8*e&15];return A}function OF(t){return String.fromCharCode(255&t,(65280&t)>>8,(16711680&t)>>16,(4278190080&t)>>24)}function lf(t){return e1(t).map(OF).join("")}var PF=(function(t){for(var A=0;A<t.length;A++)t[A]=DF(t[A]);return t.join("")})(e1("hello"))!="5d41402abc4b2a76b9719d911017c592";function si(t,A){if(PF){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 cf(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=lf(i+this.O+this.lsbFirstWord(this.P)+this.hexToBytes(r)).substr(0,5),this.U=cf(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){te.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 t1(t,A){this.gState=t,this.matrix=A,this.id="",this.objectNumber=-1}function Ki(t,A,e,r,n){if(!(this instanceof Ki))return new Ki(t,A,e,r,n);this.type=t==="axial"?2:3,this.coords=A,this.colors=e,t1.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,t1.call(this,r,n)}function qA(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",P="advanced",N=H;function j
|
|||
|
|
`),vr(h,b),Ue.publish("endTilingPattern",b),zr.pop().restore()};var Cr,et=d.__private__.newObject=function(){var h=Lt();return Ht(h,!0),h},Lt=d.__private__.newObjectDeferred=function(){return $++,rA[$]=function(){return fA},$},Ht=function(h,b){return b=typeof b=="boolean"&&b,rA[h]=fA,b&&R(h+" 0 obj"),h},pi=d.__private__.newAdditionalObject=function(){var h={objId:Lt(),content:""};return gA.push(h),h},Tn=Lt(),Nr=Lt(),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 O=parseFloat(b[0]);b=[O,O,O,"r"]}for(var z="#",AA=0;AA<3;AA++)z+=("0"+Math.floor(255*parseFloat(b[AA])).toString(16)).slice(-2);return z},kr=d.__private__.encodeColorString=function(h){var b;typeof h=="string"&&(h={ch1:h});var O=h.ch1,z=h.ch2,AA=h.ch3,wA=h.ch4,bA=h.pdfColorType==="draw"?["G","RG","K"]:["g","rg","k"];if(typeof O=="string"&&O.charAt(0)!=="#"){var DA=new A1(O);if(DA.ok)O=DA.toHex();else if(!/^\d*\.?\d*$/.test(O))throw new Error('Invalid color "'+O+'" passed to jsPDF.encodeColorString.')}if(typeof O=="string"&&/^#[0-9A-Fa-f]{3}$/.test(O)&&(O="#"+O[1]+O[1]+O[2]+O[2]+O[3]+O[3]),typeof O=="string"&&/^#[0-9A-Fa-f]{6}$/.test(O)){var MA=parseInt(O.substr(1),16);O=MA>>16&255,z=MA>>8&255,AA=255&MA}if(z===void 0||wA===void 0&&O===z&&z===AA)b=typeof O=="string"?O+" "+bA[0]:h.precision===2?U(O/255)+" "+bA[0]:S(O/255)+" "+bA[0];else if(wA===void 0||je(wA)==="object"){if(wA&&!isNaN(wA.a)&&wA.a===0)return["1.","1.","1.",bA[1]].join(" ");b=typeof O=="string"?[O,z,AA,bA[1]].join(" "):h.precision===2?[U(O/255),U(z/255),U(AA/255),bA[1]].join(" "):[S(O/255),S(z/255),S(AA/255),bA[1]].join(" ")}else b=typeof O=="string"?[O,z,AA,wA,bA[2]].join(" "):h.precision===2?[U(O),U(z),U(AA),U(wA),bA[2]].join(" "):[S(O),S(z),S(AA),S(wA),bA[2]].join(" ");return b},Tr=d.__private__.getFilters=function(){return a},br=d.__private__.putStream=function(h){var b=(h=h||{}).data||"",O=h.filters||Tr(),z=h.alreadyAppliedFilters||[],AA=h.addLength1||!1,wA=b.length,bA=h.objectId,DA=function(bt){return bt};if(f!==null&&bA===void 0)throw new Error("ObjectId must be passed to putStream for file encryption");f!==null&&(DA=at.encryptor(bA,0));var MA={};O===!0&&(O=["FlateEncode"]);var se=h.additionalKeyValues||[],he=(MA=qA.API.processDataByFilters!==void 0?qA.API.processDataByFilters(b,O):{data:b,reverseChain:[]}).reverseChain+(Array.isArray(z)?z.join(" "):z.toString());if(MA.data.length!==0&&(se.push({key:"Length",value:MA.data.length}),AA===!0&&se.push({key:"Length1",value:wA})),he.length!=0)if(he.split("/").length-1==1)se.push({key:"Filter",value:he});else{se.push({key:"Filter",value:"["+he+"]"});for(var Le=0;Le<se.length;Le+=1)if(se[Le].key==="DecodeParms"){for(var At=[],Bt=0;Bt<MA.reverseChain.split("/").length-1;Bt+=1)At.push("null");At.push(se[Le].value),se[Le].value="["+At.join(" ")+"]"}}R("<<");for(var qe=0;qe<se.length;qe++)R("/"+se[qe].key+" "+se[qe].value);R(">>"),MA.data.length!==0&&(R("stream"),R(DA(MA.data)),R("endstream"))},Bi=d.__private__.putPage=function(h){var b=h.number,O=h.data,z=h.objId,AA=h.contentsObjId;Ht(z,!0),R("<</Type /Page"),R("/Parent "+h.rootDictionaryObjId+" 0 R"),R("/Resources "+h.resourceDictionaryObjId+" 0 R"),R("/MediaBox ["+parseFloat(K(h.mediaBox.bottomLeftX))+" "+parseFloat(K(h.mediaBox.bottomLeftY))+" "+K(h.mediaBox.topRightX)+" "+K(h.mediaBox.topRightY)+"]"),h.cropBox!==null&&R("/CropBox ["+K(h.cropBox.bottomLeftX)+" "+K(h.cropBox.bottomLeftY)+" "+K(h.cropBox.topRightX)+" "+K(h.cropBox.topRightY)+"]"),h.bleedBox!==null&&R("/BleedBox ["+K(h.bleedBox.bottomLeftX)+" "+K(h.bleedBox.bottomLeftY)+" "+K(h.bleedBox.topRightX)+" "+K(h.bleedBox.topRightY)+"]"),h.trimBox!==null&&R("/TrimBox ["+K(h.trimBox.bottomLeftX)+" "+K(h.trimBox.bottomLeftY)+" "+K(h.trimBox.topRightX)+" "+K(h.trimBox.topRightY)+"]"),h.artBox!==null&&R("/ArtBox ["+K(h.artBox.bottomLeftX)+" "+K(h.artBox.bottomLeftY)+" "+K(h.artBox.topRightX)+" "+K(h.artBox.topRightY)+"]"),typeof h.userUnit=="number"&&h.userUnit!==1&&R("/UserUnit "+h
|
|||
|
|
`);return N===P&&(wA+=`
|
|||
|
|
Q`),Ht(AA,!0),br({data:wA,filters:Tr(),objectId:AA}),R("endobj"),z},Jr=d.__private__.putPages=function(){var h,b,O=[];for(h=1;h<=Se;h++)ee[h].objId=Lt(),ee[h].contentsObjId=Lt();for(h=1;h<=Se;h++)O.push(Bi({number:h,data:sA[h],objId:ee[h].objId,contentsObjId:ee[h].contentsObjId,mediaBox:ee[h].mediaBox,cropBox:ee[h].cropBox,bleedBox:ee[h].bleedBox,trimBox:ee[h].trimBox,artBox:ee[h].artBox,userUnit:ee[h].userUnit,rootDictionaryObjId:Tn,resourceDictionaryObjId:Nr}));Ht(Tn,!0),R("<</Type /Pages");var z="/Kids [";for(b=0;b<Se;b++)z+=O[b]+" 0 R ";R(z+"]"),R("/Count "+Se),R(">>"),R("endobj"),Ue.publish("postPutPages")},wi=function(h){Ue.publish("putFont",{font:h,out:R,newObject:et,putStream:br}),h.isAlreadyPutted!==!0&&(h.objectNumber=et(),R("<<"),R("/Type /Font"),R("/BaseFont /"+La(h.postScriptName)),R("/Subtype /Type1"),typeof h.encoding=="string"&&R("/Encoding /"+h.encoding),R("/FirstChar 32"),R("/LastChar 255"),R(">>"),R("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 O=h.pages[1].join(`
|
|||
|
|
`);br({data:O,additionalKeyValues:b,objectId:h.objectNumber}),R("endobj")},ra=function(h,b){b||(b=21);var O=et(),z=(function(bA,DA){var MA,se=[],he=1/(DA-1);for(MA=0;MA<1;MA+=he)se.push(MA);if(se.push(1),bA[0].offset!=0){var Le={offset:0,color:bA[0].color};bA.unshift(Le)}if(bA[bA.length-1].offset!=1){var At={offset:1,color:bA[bA.length-1].color};bA.push(At)}for(var Bt="",qe=0,bt=0;bt<se.length;bt++){for(MA=se[bt];MA>bA[qe+1].offset;)qe++;var wt=bA[qe].offset,Nt=(MA-wt)/(bA[qe+1].offset-wt),Fr=bA[qe].color,er=bA[qe+1].color;Bt+=W(Math.round((1-Nt)*Fr[0]+Nt*er[0]).toString(16))+W(Math.round((1-Nt)*Fr[1]+Nt*er[1]).toString(16))+W(Math.round((1-Nt)*Fr[2]+Nt*er[2]).toString(16))}return Bt.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]"}),br({data:z,additionalKeyValues:AA,alreadyAppliedFilters:["/ASCIIHexDecode"],objectId:O}),R("endobj"),h.objectNumber=et(),R("<< /ShadingType "+h.type),R("/ColorSpace /DeviceRGB");var wA="/Coords ["+K(parseFloat(h.coords[0]))+" "+K(parseFloat(h.coords[1]))+" ";h.type===2?wA+=K(parseFloat(h.coords[2]))+" "+K(parseFloat(h.coords[3])):wA+=K(parseFloat(h.coords[2]))+" "+K(parseFloat(h.coords[3]))+" "+K(parseFloat(h.coords[4]))+" "+K(parseFloat(h.coords[5])),R(wA+="]"),h.matrix&&R("/Matrix ["+h.matrix.toString()+"]"),R("/Function "+O+" 0 R"),R("/Extend [true true]"),R(">>"),R("endobj")},na=function(h,b){var O=Lt(),z=et();b.push({resourcesOid:O,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:O+" 0 R"}),h.matrix&&AA.push({key:"Matrix",value:"["+h.matrix.toString()+"]"}),br({data:h.stream,additionalKeyValues:AA,objectId:h.objectNumber}),R("endobj")},ic=function(h){for(var b in h.objectNumber=et(),R("<<"),h)switch(b){case"opacity":R("/ca "+U(h[b]));break;case"stroke-opacity":R("/CA "+U(h[b]))}R(">>"),R("endobj")},Ra=function(h){Ht(h.resourcesOid,!0),R("<<"),R("/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]"),(function(){for(var b in R("/Font <<"),OA)OA.hasOwnProperty(b)&&(p===!1||p===!0&&B.hasOwnProperty(b))&&R("/"+b+" "+OA[b].objectNumber+" 0 R");R(">>")})(),(function(){if(Object.keys(XA).length>0){for(var b in R("/Shading <<"),XA)XA.hasOwnProperty(b)&&XA[b]instanceof Ki&&XA[b].objectNumber>=0&&R("/"+b+" "+XA[b].objectNumber+" 0 R");Ue.publish("putShadingPatternDict"),R(">>")}})(),(function(b){if(Object.keys(XA).length>0){for(var O in R("/Pattern <<"),XA)XA.hasOwnProperty(O)&&XA[O]instanceof d.TilingPattern&&XA[O].objectNumber>=0&&XA[O].objectNumber<b&&R("/"+O+" "+XA[O].objectNumber+" 0 R");Ue.publish("putTilingPatternDict"),R(">>")}})(h.objectOid),(function(){if(Object.keys(ae).length>0){var b;for(b in R("/ExtGState <<"),ae)ae.hasOwnProperty(b)&&ae[b].objectNumber>=0&&R("/"+b+" "+ae[b].objectNumber+" 0 R");Ue.publish("putGStateDict"),R(">>")}})(),(function(){for(var b in R("/XObject <<"),Mt)Mt.hasOwnProperty(b)&&Mt[b].objectNumber>=0&&R("/"+b+" "+Mt[b].objectNumber+" 0 R");Ue.publish("putXobjectDict"),R(">>")})(),R(">>"),R("endobj")},zs=function(h){ie[h.fontName]=ie[h.fontName]||{},ie[h.fontName][h.fontStyle]=h.id},Xs=function(h,b,O,z,AA){var wA={id:"F"+(Object.keys(OA).length+1).toString(10),postScriptName:h,fontName:b,fontStyle:O,encoding:z,isStandardFont:AA||!1,metadata:{}};return Ue.publish("addFont",{font:wA,instance:this}),OA[wA.id]=wA,zs(wA),wA.id},yr=d.__private__.pdfEscape=d.pdfEscape=function(h,b){return(function(O,z){var AA,wA,bA,DA,MA,se,he,Le,At;if(bA=(z=z||{}).sourceEncoding||"Unicode",MA=z.outputEncoding,(z.autoencode||MA)&&OA[GA].metadata&&OA[GA].metadata[bA]&&OA[GA].metadata[bA].encoding&&(DA=OA[GA].metadata[bA].encodi
|
|||
|
|
`)},mi=d.__private__.getBlob=function(h){return new Blob([le(h)],{type:"application/pdf"})},Dr=d.output=d.__private__.output=(Cr=function(h,b){switch(typeof(b=b||{})=="string"?b={filename:b}:b.filename=b.filename||"generated.pdf",h){case void 0:return gn();case"save":d.save(b.filename);break;case"arraybuffer":return le(gn());case"blob":return mi(gn());case"bloburi":case"bloburl":if(te.URL!==void 0&&typeof te.URL.createObjectURL=="function")return te.URL&&te.URL.createObjectURL(mi(gn()))||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 O="",z=gn();try{O=Lg(z)}catch{O=Lg(unescape(encodeURIComponent(z)))}return"data:application/pdf;filename="+b.filename+";base64,"+O;case"pdfobjectnewwindow":if(Object.prototype.toString.call(te)==="[object Window]"){var AA="https://cdnjs.cloudflare.com/ajax/libs/pdfobject/2.1.1/pdfobject.min.js",wA=' integrity="sha512-4ze/a9/4jqu+tX9dfOqJYSvyYd5M6qum/3HpCLr+/Jqf0whc37VUbkpNGHR7/8pSnCFw47T1fmIpwBV7UySh3g==" crossorigin="anonymous"';b.pdfObjectUrl&&(AA=b.pdfObjectUrl,wA="");var bA='<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;} </style><body><script src="'+AA+'"'+wA+'><\/script><script >PDFObject.embed("'+this.output("dataurlstring")+'", '+JSON.stringify(b)+");<\/script></body></html>",DA=te.open();return DA!==null&&DA.document.write(bA),DA}throw new Error("The option pdfobjectnewwindow just works in a browser-environment.");case"pdfjsnewwindow":if(Object.prototype.toString.call(te)==="[object Window]"){var MA='<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>',se=te.open();if(se!==null){se.document.write(MA);var he=this;se.document.documentElement.querySelector("#pdfViewer").onload=function(){se.document.title=b.filename,se.document.documentElement.querySelector("#pdfViewer").contentWindow.PDFViewerApplication.open(he.output("bloburl"))}}return se}throw new Error("The option pdfjsnewwindow just works in a browser-environment.");case"dataurlnewwindow":if(Object.prototype.toString.call(te)!=="[object Window]")throw new Error("The option dataurlnewwindow just works in a browser-environment.");var Le='<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=te.open();if(At!==null&&(At.document.write(Le),At.document.title=b.filename),At||typeof safari>"u")return At;break;case"datauri":case"dataurl":return te.document.location.href=this.output("datauristring",b);default:return null}},Cr.foo=function(){try{return Cr.apply(this,arguments)}catch(O){var h=O.stack||"";~h.indexOf(" at ")&&(h=h.split(" at ")[1]);var b="Error in function "+h.split(`
|
|||
|
|
`)[0].split("<")[0]+": "+O.message;if(!te.console)throw new Error(b);te.console.error(b,O),te.alert&&alert(b)}},Cr.foo.bar=Cr,Cr.foo),vi=function(h){return Array.isArray(gi)===!0&&gi.indexOf(h)>-1};switch(r){case"pt":ZA=1;break;case"mm":ZA=72/25.4;break;case"cm":ZA=72/2.54;break;case"in":ZA=72;break;case"px":ZA=vi("px_scaling")==1?.75:96/72;break;case"pc":case"em":ZA=12;break;case"ex":ZA=6;break;default:if(typeof r!="number")throw new Error("Invalid unit: "+r);ZA=r}var at=null;hA(),eA();var Ga=d.__private__.getPageInfo=d.getPageInfo=function(h){if(isNaN(h)||h%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfo");return{objId:ee[h].objId,pageNumber:h,pageContext:ee[h]}},sc=d.__private__.getPageInfoByObjId=function(h){if(isNaN(h)||h%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfoByObjId");for(var b in ee)if(ee[b].objId===h)break;return Ga(b)},oc=d.__private__.getCurrentPageInfo=d.getCurrentPageInfo=function(){return{objId:ee[k].objId,pageNumber:k,pageContext:ee[k]}};d.addPage=function(){return Js.apply(this,arguments),this},d.setPage=function(){return Ys.apply(this,arguments),cA.call(this,sA[k]),this},d.insertPage=function(h){return this.addPage(),this.movePage(k,h),this},d.movePage=function(h,b){var O,z;if(h>b){O=sA[h],z=ee[h];for(var AA=h;AA>b;AA--)sA[AA]=sA[AA-1],ee[AA]=ee[AA-1];sA[b]=O,ee[b]=z,this.setPage(b)}else if(h<b){O=sA[h],z=ee[h];for(var wA=h;wA<b;wA++)sA[wA]=sA[wA+1],ee[wA]=ee[wA+1];sA[b]=O,ee[b]=z,this.setPage(b)}return this},d.deletePage=function(){return Ka.apply(this,arguments),this},d.__private__.text=d.text=function(h,b,O,z,AA){var wA,bA,DA,MA,se,he,Le,At,Bt,qe=(z=z||{}).scope||this;if(typeof h=="number"&&typeof b=="number"&&(typeof O=="string"||Array.isArray(O))){var bt=O;O=b,b=h,h=bt}if(arguments[3]instanceof Ae==0?(DA=arguments[4],MA=arguments[5],je(Le=arguments[3])==="object"&&Le!==null||(typeof DA=="string"&&(MA=DA,DA=null),typeof Le=="string"&&(MA=Le,Le=null),typeof Le=="number"&&(DA=Le,Le=null),z={flags:Le,angle:DA,align:MA})):(L("The transform parameter of text() with a Matrix value"),Bt=AA),isNaN(b)||isNaN(O)||h==null)throw new Error("Invalid arguments passed to jsPDF.text");if(h.length===0)return qe;var wt,Nt="",Fr=typeof z.lineHeightFactor=="number"?z.lineHeightFactor:bi,er=qe.internal.scaleFactor;function lo(He){return He=He.split(" ").join(Array(z.TabLen||9).join(" ")),yr(He,Le)}function ca(He){for(var Ke,ot=He.concat(),yt=[],bn=ot.length;bn--;)typeof(Ke=ot.shift())=="string"?yt.push(Ke):Array.isArray(He)&&(Ke.length===1||Ke[1]===void 0&&Ke[2]===void 0)?yt.push(Ke[0]):yt.push([Ke[0],Ke[1],Ke[2]]);return yt}function Ei(He,Ke){var ot;if(typeof He=="string")ot=Ke(He)[0];else if(Array.isArray(He)){for(var yt,bn,ss=He.concat(),ha=[],fo=ss.length;fo--;)typeof(yt=ss.shift())=="string"?ha.push(Ke(yt)[0]):Array.isArray(yt)&&typeof yt[0]=="string"&&(bn=Ke(yt[0],yt[1],yt[2]),ha.push([bn[0],bn[1],bn[2]]));ot=ha}return ot}var Pn=!1,Li=!0;if(typeof h=="string")Pn=!0;else if(Array.isArray(h)){var _i=h.concat();bA=[];for(var Ii,Kt=_i.length;Kt--;)(typeof(Ii=_i.shift())!="string"||Array.isArray(Ii)&&typeof Ii[0]!="string")&&(Li=!1);Pn=Li}if(Pn===!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 Si=QA/qe.internal.scaleFactor,Hi=Si*(Fr-1);switch(z.baseline){case"bottom":O-=Hi;break;case"top":O+=Si-Hi;break;case"hanging":O+=Si-2*Hi;break;case"middle":O+=Si/2-Hi}if((he=z.maxWidth||0)>0&&(typeof h=="string"?h=qe.splitTextToSize(h,he):Object.prototype.toString.call(h)==="[object Array]"&&(h=h.reduce(function(He,Ke){return He.concat(qe.splitTextToSize(Ke,he))},[]))),wA={text:h,x:b,y:O,options:z,mutex:{pdfEscape:yr,activeFontKey:GA,fonts:OA,activeFontSize:QA}},Ue.publish("preProcessText",wA),h=wA.text,DA=(z=wA.options).angle,Bt instanceof Ae==0&&DA&&typeof DA=="number"){DA*=Math.PI/180,z.rotationDirection===0&&(DA=-DA),N===P&&(DA=-DA);var $a=Math.cos(DA),Za=Math.sin(DA);Bt=new Ae($a,Za,-Za,$a,0,0)}else DA&&DA instanceof Ae&&(Bt=DA);N!==P||Bt||(Bt=dn),(se=z.charSpace||oa)!=
|
|||
|
|
`,this.setCharSpace(this.getCharSpace()||0)),(At=z.horizontalScale)!==void 0&&(Nt+=K(100*At)+` Tz
|
|||
|
|
`),z.lang;var tt=-1,vn=z.renderingMode!==void 0?z.renderingMode:z.stroke,ua=qe.internal.getCurrentPageInfo().pageContext;switch(vn){case 0:case!1:case"fill":tt=0;break;case 1:case!0:case"stroke":tt=1;break;case 2:case"fillThenStroke":tt=2;break;case 3:case"invisible":tt=3;break;case 4:case"fillAndAddForClipping":tt=4;break;case 5:case"strokeAndAddPathForClipping":tt=5;break;case 6:case"fillThenStrokeAndAddToPathForClipping":tt=6;break;case 7:case"addToPathForClipping":tt=7}var co=ua.usedRenderingMode!==void 0?ua.usedRenderingMode:-1;tt!==-1?Nt+=tt+` Tr
|
|||
|
|
`:co!==-1&&(Nt+=`0 Tr
|
|||
|
|
`),tt!==-1&&(ua.usedRenderingMode=tt),MA=z.align||"left";var Qr,Ni=QA*Fr,As=qe.internal.pageSize.getWidth(),es=OA[GA];se=z.charSpace||oa,he=z.maxWidth||0,Le=Object.assign({autoencode:!0,noBOM:!0},z.flags);var Rn=[],ki=function(He){return qe.getStringUnitWidth(He,{font:es,charSpace:se,fontSize:QA,doKerning:!1})*QA/er};if(Object.prototype.toString.call(h)==="[object Array]"){var sr;bA=ca(h),MA!=="left"&&(Qr=bA.map(ki));var or,Mn=0;if(MA==="right"){b-=Qr[0],h=[],Kt=bA.length;for(var Cn=0;Cn<Kt;Cn++)Cn===0?(or=pn(b),sr=Bn(O)):(or=G(Mn-Qr[Cn]),sr=-Ni),h.push([bA[Cn],or,sr]),Mn=Qr[Cn]}else if(MA==="center"){b-=Qr[0]/2,h=[],Kt=bA.length;for(var Kn=0;Kn<Kt;Kn++)Kn===0?(or=pn(b),sr=Bn(O)):(or=G((Mn-Qr[Kn])/2),sr=-Ni),h.push([bA[Kn],or,sr]),Mn=Qr[Kn]}else if(MA==="left"){h=[],Kt=bA.length;for(var ts=0;ts<Kt;ts++)h.push(bA[ts])}else if(MA==="justify"&&es.encoding==="Identity-H"){h=[],Kt=bA.length,he=he!==0?he:As;for(var fa=0,st=0;st<Kt;st++)if(sr=st===0?Bn(O):-Ni,or=st===0?pn(b):fa,st<Kt-1){var uo=G((he-Qr[st])/(bA[st].split(" ").length-1)),$r=bA[st].split(" ");h.push([$r[0]+" ",or,sr]),fa=0;for(var Zr=1;Zr<$r.length;Zr++){var rs=(ki($r[Zr-1]+" "+$r[Zr])-ki($r[Zr]))*er+uo;Zr==$r.length-1?h.push([$r[Zr],rs,0]):h.push([$r[Zr]+" ",rs,0]),fa-=rs}}else h.push([bA[st],or,sr]);h.push(["",fa,0])}else{if(MA!=="justify")throw new Error('Unrecognized alignment option, use "left", "center", "right" or "justify".');for(h=[],Kt=bA.length,he=he!==0?he:As,st=0;st<Kt;st++){sr=st===0?Bn(O):-Ni,or=st===0?pn(b):0;var ns=bA[st].split(" ").length-1,is=ns>0?(he-Qr[st])/ns:0;st<Kt-1?Rn.push(K(G(is))):Rn.push(0),h.push([bA[st],or,sr])}}}(typeof z.R2L=="boolean"?z.R2L:ce)===!0&&(h=Ei(h,function(He,Ke,ot){return[He.split("").reverse().join(""),Ke,ot]})),wA={text:h,x:b,y:O,options:z,mutex:{pdfEscape:yr,activeFontKey:GA,fonts:OA,activeFontSize:QA}},Ue.publish("postProcessText",wA),h=wA.text,wt=wA.mutex.isHex||!1;var as=OA[GA].encoding;as!=="WinAnsiEncoding"&&as!=="StandardEncoding"||(h=Ei(h,function(He,Ke,ot){return[lo(He),Ke,ot]})),bA=ca(h),h=[];for(var Gn,Vn,jn,Ti=Array.isArray(bA[0])?1:0,qn="",Di=function(He,Ke,ot){var yt="";return ot instanceof Ae?(ot=typeof z.angle=="number"?hn(ot,new Ae(1,0,0,1,He,Ke)):hn(new Ae(1,0,0,1,He,Ke),ot),N===P&&(ot=hn(new Ae(1,0,0,-1,0,0),ot)),yt=ot.join(" ")+` Tm
|
|||
|
|
`):yt=K(He)+" "+K(Ke)+` Td
|
|||
|
|
`,yt},Ur=0;Ur<bA.length;Ur++){switch(qn="",Ti){case 1:jn=(wt?"<":"(")+bA[Ur][0]+(wt?">":")"),Gn=parseFloat(bA[Ur][1]),Vn=parseFloat(bA[Ur][2]);break;case 0:jn=(wt?"<":"(")+bA[Ur]+(wt?">":")"),Gn=pn(b),Vn=Bn(O)}Rn!==void 0&&Rn[Ur]!==void 0&&(qn=Rn[Ur]+` Tw
|
|||
|
|
`),Ur===0?h.push(qn+Di(Gn,Vn,Bt)+jn):Ti===0?h.push(qn+jn):Ti===1&&h.push(qn+Di(Gn,Vn,Bt)+jn)}h=Ti===0?h.join(` Tj
|
|||
|
|
T* `):h.join(` Tj
|
|||
|
|
`),h+=` Tj
|
|||
|
|
`;var An=`BT
|
|||
|
|
/`;return An+=GA+" "+QA+` Tf
|
|||
|
|
`,An+=K(QA*Fr)+` TL
|
|||
|
|
`,An+=yi+`
|
|||
|
|
`,An+=Nt,An+=h,R(An+="ET"),B[GA]=!0,qe};var lc=d.__private__.clip=d.clip=function(h){return R(h==="evenodd"?"W*":"W"),this};d.clipEvenOdd=function(){return lc("evenodd")},d.__private__.discardPath=d.discardPath=function(){return R("n"),this};var Yr=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 Yr(h)&&(u=h),this};var to=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},ro=d.close=function(){return R("h"),this};d.stroke=function(){return R("S"),this},d.fill=function(h){return Dn("f",h),this},d.fillEvenOdd=function(h){return Dn("f*",h),this},d.fillStroke=function(h){return Dn("B",h),this},d.fillStrokeEvenOdd=function(h){return Dn("B*",h),this};var Dn=function(h,b){je(b)==="object"?uc(b,h):R(h)},Va=function(h){h===null||N===P&&h===void 0||(h=to(h),R(h))};function cc(h,b,O,z,AA){var wA=new Ia(b||this.boundingBox,O||this.xStep,z||this.yStep,this.gState,AA||this.matrix);wA.stream=this.stream;var bA=h+"$$"+this.cloneIndex+++"$$";return vr(bA,wA),wA}var uc=function(h,b){var O=ve[h.key],z=XA[O];if(z instanceof Ki)R("q"),R(fc(b)),z.gState&&d.setGState(z.gState),R(h.matrix.toString()+" cm"),R("/"+O+" sh"),R("Q");else if(z instanceof Ia){var AA=new Ae(1,0,0,-1,0,xi());h.matrix&&(AA=AA.multiply(h.matrix||dn),O=cc.call(z,h.key,h.boundingBox,h.xStep,h.yStep,AA).id),R("q"),R("/Pattern cs"),R("/"+O+" scn"),z.gState&&d.setGState(z.gState),R(b),R("Q")}},fc=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"}},ja=d.moveTo=function(h,b){return R(K(G(h))+" "+K(V(b))+" m"),this},Ci=d.lineTo=function(h,b){return R(K(G(h))+" "+K(V(b))+" l"),this},On=d.curveTo=function(h,b,O,z,AA,wA){return R([K(G(h)),K(V(b)),K(G(O)),K(V(z)),K(G(AA)),K(V(wA)),"c"].join(" ")),this};d.__private__.line=d.line=function(h,b,O,z,AA){if(isNaN(h)||isNaN(b)||isNaN(O)||isNaN(z)||!Yr(AA))throw new Error("Invalid arguments passed to jsPDF.line");return N===H?this.lines([[O-h,z-b]],h,b,[1,1],AA||"S"):this.lines([[O-h,z-b]],h,b,[1,1]).stroke()},d.__private__.lines=d.lines=function(h,b,O,z,AA,wA){var bA,DA,MA,se,he,Le,At,Bt,qe,bt,wt,Nt;if(typeof h=="number"&&(Nt=O,O=b,b=h,h=Nt),z=z||[1,1],wA=wA||!1,isNaN(b)||isNaN(O)||!Array.isArray(h)||!Array.isArray(z)||!Yr(AA)||typeof wA!="boolean")throw new Error("Invalid arguments passed to jsPDF.lines");for(ja(b,O),bA=z[0],DA=z[1],se=h.length,bt=b,wt=O,MA=0;MA<se;MA++)(he=h[MA]).length===2?(bt=he[0]*bA+bt,wt=he[1]*DA+wt,Ci(bt,wt)):(Le=he[0]*bA+bt,At=he[1]*DA+wt,Bt=he[2]*bA+bt,qe=he[3]*DA+wt,bt=he[4]*bA+bt,wt=he[5]*DA+wt,On(Le,At,Bt,qe,bt,wt));return wA&&ro(),Va(AA),this},d.path=function(h){for(var b=0;b<h.length;b++){var O=h[b],z=O.c;switch(O.op){case"m":ja(z[0],z[1]);break;case"l":Ci(z[0],z[1]);break;case"c":On.apply(this,z);break;case"h":ro()}}return this},d.__private__.rect=d.rect=function(h,b,O,z,AA){if(isNaN(h)||isNaN(b)||isNaN(O)||isNaN(z)||!Yr(AA))throw new Error("Invalid arguments passed to jsPDF.rect");return N===H&&(z=-z),R([K(G(h)),K(V(b)),K(G(O)),K(G(z)),"re"].join(" ")),Va(AA),this},d.__private__.triangle=d.triangle=function(h,b,O,z,AA,wA,bA){if(isNaN(h)||isNaN(b)||isNaN(O)||isNaN(z)||isNaN(AA)||isNaN(wA)||!Yr(bA))throw new Error("Invalid arguments passed to jsPDF.triangle");return this.lines([[O-h,z-b],[AA-O,wA-z],[h-AA,b-wA]],h,b,[1,1],bA,!0),this},d.__private__.roundedRect=d.roundedRect=function(h,b,O,z,AA,wA,bA){if(isNaN(h)||isNaN(b)||isNaN(O)||isNaN(z)||isNaN(AA)||isNaN(wA)||!Yr(bA))throw new Error("Invalid arguments passed to jsPDF.roundedRect");var DA=4/3*(Math.SQRT2-1);return AA=Math.min(AA,.5*O),wA=Math.min(wA,.5*z),this.lines([[O-2*AA,0],[AA*DA,0,AA,wA-wA*DA,AA,wA],[0,z-2*wA],[0,wA*DA,-AA*DA,wA,-AA,wA],[2*AA-O,0],[-AA*DA,0,-AA,-wA*DA,-AA,-wA],[0,2*wA-z],[0,-wA*DA,AA*DA,-wA,AA,-wA]],h+AA,b,[1,1],bA,!0),this},d.__private__.ellipse=
|
|||
|
|
`),i}},uf=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=kA.internal.getHeight(t)||0;a=a<0?-a:a;var s=kA.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 ll(V,t,G).width<=s-4}return!1};i++;A:for(;i>0;){A="",i--;var u,f,p=ll("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: "+ll(A,t,i=12).width+", FieldWidth:"+s+`
|
|||
|
|
`;break}for(var v="",H=0,P=0;P<n.length;P++)if(n.hasOwnProperty(P)){var N=!1;if(n[P].length!==1&&E!==n[P].length-1){if((p+2)*(H+2)+2>a)continue A;v+=n[P][E],N=!0,C=P,P--}else{v=(v+=n[P][E]+" ").substr(v.length-1)==" "?v.substr(0,v.length-1):v;var j=parseInt(P),J=l(j,v,i),X=P>=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 q=n[L];if(t.multiline){if(L===C){K+=q[E]+" ",E=(E+1)%q.length;continue}if(L===m){K+=q[q.length-1]+" ";continue}}K+=q[0]+" "}switch(K=K.substr(K.length-1)==" "?K.substr(0,K.length-1):K,f=ll(K,t,i).width,t.textAlign){case"right":u=s-f-2;break;case"center":u=(s-f)/2;break;default:u=2}A+=de(u)+" "+de(d)+` Td
|
|||
|
|
`,A+="("+ea(K)+`) Tj
|
|||
|
|
`,A+=-de(u)+` 0 Td
|
|||
|
|
`,d=-(i+2),f=0,m=N?C:C+1,H++,v=""}break}return r.text=A,r.fontSize=i,r},ll=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}},jF={fields:[],xForms:[],acroFormDictionaryRoot:null,printedOut:!1,internal:null,isInitialized:!1},qF=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)},WF=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(jF)),t.internal.acroformPlugin.acroFormDictionaryRoot)throw new Error("Exception while creating AcroformDictionary");Of=t.internal.scaleFactor,t.internal.acroformPlugin.acroFormDictionaryRoot=new i1,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&&qF(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=GF(s.Rect,n)),n.internal.newObjectDeferredBegin(s.objId,!0),s.DA=kA.createDefaultAppearanceStream(s),je(s)==="object"&&typeof s.getKeyValueListForStream=="function"&&(l=s.getKeyValueListForStream()),s.Rect=u,s.hasAppearanceStream&&!s.appearanceStreamContent){var f=VF(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,P=C[v];E.internal.newObjectDeferredBegin(P.objId,!0),je(P)==="object"&&typeof P.putStream=="function"&&P.putStream(),delete C[H]}})(n.internal.acroformPlugin.xForms,n)})(e,t)}),t.internal.acroformPlugin.isInitialized=!0}},r1=it.__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)!=="/"?(A!==void 0&&e&&(r=e.internal.getEncryptor(A)),n+="("+ea(r(t[i].toString()))+")"):n+=t[i].toString()}return n+"]"}throw new Error("Invalid argument passed to jsPDF.__acroform__.arrayToPdfArray")},bu=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))+")"},sn=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})};sn.prototype.toString=function(){return this.objId+" 0 R"},sn.prototype.putStream=function(){var t=this.getKeyValueListForStream();this.scope.internal.putStream({data:this.stream,additionalKeyValues:t,objectId:this.objId}),this.scope.internal.out("endobj")},sn.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:r1(n,this.objId,this.scope)}):n instanceof sn?(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 n1=function(){sn.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}})};ar(n1,sn);var i1=function(){sn.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}})};ar(i1,sn);var qr=function t(){sn.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!!ht(A,3)},set:function(v){v?this.F=dt(A,3):this.F=gt(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",{enumerable:
|
|||
|
|
`)}},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){t=e}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return t.substr(1,t.length-1)},set:function(e){t="/"+e}})};ar(St,qr);var vl=function(){St.call(this),this.pushButton=!0};ar(vl,St);var Ta=function(){St.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:[]}})};ar(Ta,St);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){e=n}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return e.substr(1,e.length-1)},set:function(n){e="/"+n}}),this.caption="l",this.appearanceState="Off",this._AppearanceType=kA.RadioButton.Circle,this.appearanceStreamContent=this._AppearanceType.createAppearanceStream(this.optionName)};ar(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),zF.call(this.scope,A),A};var Cl=function(){St.call(this),this.fontName="zapfdingbats",this.caption="3",this.appearanceState="On",this.value="On",this.textAlign="center",this.appearanceStreamContent=kA.CheckBox.createAppearanceStream()};ar(Cl,St);var Wi=function(){qr.call(this),this.FT="/Tx",Object.defineProperty(this,"multiline",{enumerable:!0,configurable:!0,get:function(){return!!ht(this.Ff,13)},set:function(A){A?this.Ff=dt(this.Ff,13):this.Ff=gt(this.Ff,13)}}),Object.defineProperty(this,"fileSelect",{enumerable:!0,configurable:!0,get:function(){return!!ht(this.Ff,21)},set:function(A){A?this.Ff=dt(this.Ff,21):this.Ff=gt(this.Ff,21)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return!!ht(this.Ff,23)},set:function(A){A?this.Ff=dt(this.Ff,23):this.Ff=gt(this.Ff,23)}}),Object.defineProperty(this,"doNotScroll",{enumerable:!0,configurable:!0,get:function(){return!!ht(this.Ff,24)},set:function(A){A?this.Ff=dt(this.Ff,24):this.Ff=gt(this.Ff,24)}}),Object.defineProperty(this,"comb",{enumerable:!0,configurable:!0,get:function(){return!!ht(this.Ff,25)},set:function(A){A?this.Ff=dt(this.Ff,25):this.Ff=gt(this.Ff,25)}}),Object.defineProperty(this,"richText",{enumerable:!0,configurable:!0,get:function(){return!!ht(this.Ff,26)},set:function(A){A?this.Ff=dt(this.Ff,26):this.Ff=gt(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}})};ar(Wi,qr);var bl=function(){Wi.call(this),Object.defineProperty(this,"password",{enumerable:!0,configurable:!0,get:function(){return!!ht(this.Ff,14)},set:function(t){t?this.Ff=dt(this.Ff,14):this.Ff=gt(this.Ff,14)}}),this.password=!0};ar(bl,Wi);var kA={CheckBox:{createAppearanceStream:function(){return{N:{On:kA.CheckBox.YesNormal},D:{On:kA.CheckBox.YesPushDown,Off:kA.CheckBox.OffPushDown}}},YesPushDown:function(t){var A=rn(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=uf(t,t.caption);return e.push("0.749023 g"),e.push("0 0 "+de(kA.internal.getWidth(t))+" "+de(kA.internal.getHeight(t))+" re"),e.push("f"),e.push("BMC"),e.push("q"),e.push("0 0 1 rg"),e.push("/"+r+" "+de(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=rn(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=kA.internal.getHeight(t),a=kA.internal.getWidth(t),s=uf(t,t.caption);return n.push("1 g"),n.push("0 0 "+de(a)+" "+de(i)+" re"),n.push("f"),n.push("q"),n.push("0 0 1 rg"),n.push("0 0 "+de(a-1)+" "+de(i-1)+" re"),n.push("W"),n.push("n"),n.push("0 g"),n.push("BT"),n.push("/"+e+" "+de(s.fontSize)+" Tf "+r),n.push(s.text),n.push("ET"),n.push("Q"),A.stream=n.join(`
|
|||
|
|
`),A},OffPushDown:function(t){var A=rn(t);A.scope=t.scope;var e=[];return e.push("0.749023 g"),e.push("0 0 "+de(kA.internal.getWidth(t))+" "+de(kA.internal.getHeight(t))+" re"),e.push("f"),A.stream=e.join(`
|
|||
|
|
`),A}},RadioButton:{Circle:{createAppearanceStream:function(t){var A={D:{Off:kA.RadioButton.Circle.OffPushDown},N:{}};return A.N[t]=kA.RadioButton.Circle.YesNormal,A.D[t]=kA.RadioButton.Circle.YesPushDown,A},getCA:function(){return"l"},YesNormal:function(t){var A=rn(t);A.scope=t.scope;var e=[],r=kA.internal.getWidth(t)<=kA.internal.getHeight(t)?kA.internal.getWidth(t)/4:kA.internal.getHeight(t)/4;r=Number((.9*r).toFixed(5));var n=kA.internal.Bezier_C,i=Number((r*n).toFixed(5));return e.push("q"),e.push("1 0 0 1 "+Ai(kA.internal.getWidth(t)/2)+" "+Ai(kA.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=rn(t);A.scope=t.scope;var e=[],r=kA.internal.getWidth(t)<=kA.internal.getHeight(t)?kA.internal.getWidth(t)/4:kA.internal.getHeight(t)/4;r=Number((.9*r).toFixed(5));var n=Number((2*r).toFixed(5)),i=Number((n*kA.internal.Bezier_C).toFixed(5)),a=Number((r*kA.internal.Bezier_C).toFixed(5));return e.push("0.749023 g"),e.push("q"),e.push("1 0 0 1 "+Ai(kA.internal.getWidth(t)/2)+" "+Ai(kA.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 "+Ai(kA.internal.getWidth(t)/2)+" "+Ai(kA.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=rn(t);A.scope=t.scope;var e=[],r=kA.internal.getWidth(t)<=kA.internal.getHeight(t)?kA.internal.getWidth(t)/4:kA.internal.getHeight(t)/4;r=Number((.9*r).toFixed(5));var n=Number((2*r).toFixed(5)),i=Number((n*kA.internal.Bezier_C).toFixed(5));return e.push("0.749023 g"),e.push("q"),e.push("1 0 0 1 "+Ai(kA.internal.getWidth(t)/2)+" "+Ai(kA.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:kA.RadioButton.Cross.OffPushDown},N:{}};return A.N[t]=kA.RadioButton.Cross.YesNormal,A.D[t]=kA.RadioButton.Cross.YesPushDown,A},getCA:function(){return"8"},YesNormal:function(t){var A=rn(t);A.scope=t.scope;var e=[],r=kA.internal.calculateCross(t);return e.push("q"),e.push("1 1 "+de(kA.internal.getWidth(t)-2)+" "+de(kA.internal.getHeight(t)-2)+" re"),e.push("W"),e.push("n"),e.push(de(r.x1.x)+" "+de(r.x1.y)+" m"),e.push(de(r.x2.x)+" "+de(r.x2.y)+" l"),e.push(de(r.x4.x)+" "+de(r.x4.y)+" m"),e.push(de(r.x3.x)+" "+de(r.x3.y)+" l"),e.push("s"),e.push("Q"),A.stream=e.join(`
|
|||
|
|
`),A},YesPushDown:function(t){var A=rn(t);A.scope=t.scope;var e=kA.internal.calculateCross(t),r=[];return r.push("0.749023 g"),r.push("0 0 "+de(kA.internal.getWidth(t))+" "+de(kA.internal.getHeight(t))+" re"),r.push("f"),r.push("q"),r.push("1 1 "+de(kA.internal.getWidth(t)-2)+" "+de(kA.internal.getHeight(t)-2)+" re"),r.push("W"),r.push("n"),r.push(de(e.x1.x)+" "+de(e.x1.y)+" m"),r.push(de(e.x2.x)+" "+de(e.x2.y)+" l"),r.push(de(e.x4.x)+" "+de(e.x4.y)+" m"),r.push(de(e.x3.x)+" "+de(e.x3.y)+" l"),r.push("s"),r.push("Q"),A.stream=r.join(`
|
|||
|
|
`),A},OffPushDown:function(t){var A=rn(t);A.scope=t.scope;var e=[];return e.push("0.749023 g"),e.push("0 0 "+de(kA.internal.getWidth(t))+" "+de(kA.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}};kA.internal={Bezier_C:.551915024494,calculateCross:function(t){var A=kA.internal.getWidth(t),e=kA.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}}}},kA.internal.getWidth=function(t){var A=0;return je(t)==="object"&&(A=Hg(t.Rect[2])),A},kA.internal.getHeight=function(t){var A=0;return je(t)==="object"&&(A=Hg(t.Rect[3])),A};var zF=it.addField=function(t){if(WF(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};it.AcroFormChoiceField=Ha,it.AcroFormListBox=Na,it.AcroFormComboBox=ka,it.AcroFormEditBox=ml,it.AcroFormButton=St,it.AcroFormPushButton=vl,it.AcroFormRadioButton=Ta,it.AcroFormCheckBox=Cl,it.AcroFormTextField=Wi,it.AcroFormPasswordField=bl,it.AcroFormAppearance=kA,it.AcroForm={ChoiceField:Ha,ListBox:Na,ComboBox:ka,EditBox:ml,Button:St,PushButton:vl,RadioButton:Ta,CheckBox:Cl,TextField:Wi,PasswordField:bl,Appearance:kA},qA.AcroForm={ChoiceField:Ha,ListBox:Na,ComboBox:ka,EditBox:ml,Button:St,PushButton:vl,RadioButton:Ta,CheckBox:Cl,TextField:Wi,PasswordField:bl,Appearance:kA};qA.AcroForm;function a1(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,oA,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(oA=!0,V=0;V<nA[G].length;V+=1)if(nA[G][V]!==void 0&&nA[G][V]!==U[V]){oA=!1;break}if(oA===!0){eA=lA;break}}else for(lA in r)for(nA=r[lA],G=0;G<nA.length;G+=1){for(oA=!0,V=0;V<nA[G].length;V+=1)if(nA[G][V]!==void 0&&nA[G][V]!==U.charCodeAt(V)){oA=!1;break}if(oA===!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 oA=[];if(oA.push({key:"Type",value:"/XObject"}),oA.push({key:"Subtype",value:"/Image"}),oA.push({key:"Width",value:S.width}),oA.push({key:"Height",value:S.height}),S.colorSpace===v.INDEXED?oA.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]"}):(oA.push({key:"ColorSpace",value:"/"+S.colorSpace}),S.colorSpace===v.DEVICE_CMYK&&oA.push({key:"Decode",value:"[1 0 1 0 1 0 1 0]"})),oA.push({key:"BitsPerComponent",value:S.bitsPerComponent}),"decodeParameters"in S&&S.decodeParameters!==void 0&&oA.push({key:"DecodeParms",value:"<<"+S.decodeParameters+">>"}),"transparency"in S&&Array.isArray(S.transparency)&&S.transparency.length>0){for(var lA="",eA=0,uA=S.transparency.length;eA<uA;eA++)lA+=S.transparency[eA]+" "+S.transparency[eA]+" ";oA.push({key:"Mask",value:"["+lA+"]"})}S.sMask!==void 0&&oA.push({key:"SMask",value:S.objectId+1+" 0 R"});var vA=S.filter!==void 0?["/"+S.filter]:void 0;if(V({data:S.data,additionalKeyValues:oA,alreadyAppliedFilters:vA,objectId:S.objectId}),G("endobj"),"sMask"in S&&S.sMask!==void 0){var hA,F=(hA=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 Uu(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),P=new Array(64),N=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],q=[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 oA(F,k){for(var M=0,W=0,$=new Array,rA=1;rA<=16;rA++){for(var dA=1;dA<=F[rA];dA++)$[k[W]]=[],$[k[W]][0]=M,$[k[W]][1]=rA,W++,M++;M*=2}return $}function lA(F){for(var k=F[0],M=F[1]-1;M>=0;)k&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 uA(F){eA(F>>8&255),eA(255&F)}function vA(F,k,M,W,$){for(var rA,dA=$[0],fA=$[240],gA=(function(QA,KA){var IA,ce,WA,ye,re,ne,Ee,ue,GA,ZA,VA=0;for(GA=0;GA<8;++GA){IA=QA[VA],ce=QA[VA+1],WA=QA[VA+2],ye=QA[VA+3],re=QA[VA+4],ne=QA[VA+5],Ee=QA[VA+6];var ke=IA+(ue=QA[VA+7]),Fe=IA-ue,OA=ce+Ee,ie=ce-Ee,Ie=WA+ne,XA=WA-ne,ve=ye+re,ae=ye-re,Me=ke+ve,Xe=ke-ve,Se=OA+Ie,ee=OA-Ie;QA[VA]=Me+Se,QA[VA+4]=Me-Se;var Ue=.707106781*(ee+Xe);QA[VA+2]=Xe+Ue,QA[VA+6]=Xe-Ue;var gi=.382683433*((Me=ae+XA)-(ee=ie+Fe)),Mt=.5411961*Me+gi,fn=1.306562965*ee+gi,zr=.707106781*(Se=XA+ie),Ae=Fe+zr,hn=Fe-zr;QA[VA+5]=hn+Mt,QA[VA+3]=hn-Mt,QA[VA+1]=Ae+fn,QA[VA+7]=Ae-fn,VA+=8}for(VA=0,GA=0;GA<8;++GA){IA=QA[VA],ce=QA[VA+8],WA=QA[VA+16],ye=QA[VA+24],re=QA[VA+32],ne=QA[VA+40],Ee=QA[VA+48];var dn=IA+(ue=QA[VA+56]),vr=IA-ue,Cr=ce+Ee,et=ce-Ee,Lt=WA+ne,Ht=WA-ne,pi=ye+re,Tn=ye-re,Nr=dn+pi,Xr=dn-pi,kr=Cr+Lt,Tr=Cr-Lt;QA[VA]=Nr+kr,QA[VA+32]=Nr-kr;var br=.707106781*(Tr+Xr);QA[VA+16]=Xr+br,QA[VA+48]=Xr-br;var Bi=.382683433*((Nr=Tn+Ht)-(Tr=et+vr)),Jr=.5411961*Nr+Bi,wi=1.306562965*Tr+Bi,ta=.707106781*(kr=Ht+et),ra=vr+ta,na=vr-ta;QA[VA+40]=na+Jr,QA[VA+24]=na-Jr,QA[VA+8]=ra+wi,QA[VA+56]=ra-wi,VA++}for(GA=0;GA<64;++GA)ZA=QA[GA]*KA[GA],d[GA]=ZA>0?ZA+.5|0:ZA-.5|0;return d})(F,k),sA=0;sA<64;++sA)m[X[sA]]=gA[sA];var yA=m[0]-M;M=m[0],yA==0?lA(W[0]):(lA(W[B[rA=32767+yA]]),lA(p[rA]));for(var xA=63;xA>0&&m[xA]==0;)xA--;if(xA==0)return lA(dA),M;for(var cA,R=1;R<=xA;){for(var me=R;m[R]==0&&R<=xA;)++R;var le=R-me;if(le>=16){cA=le>>4;for(var zA=1;zA<=cA;++zA)lA(fA);le&=15}rA=32767+m[R],lA($[(le<<4)+B[rA]]),lA(p[rA]),R++}return xA!=63&&lA(dA),M}function hA(F){F=Math.min(Math.max(F,1),100),i!=F&&((function(k){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],W=0;W<64;W++){var $=a((M[W]*k+50)/100);$=Math.min(Math.max($,1),255),s[X[W]]=$}for(var r
|
|||
|
|
* @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 Jg(t){function A(L){if(!L)throw Error("assert :P")}function e(L,q,U){for(var S=0;4>S;S++)if(L[q+S]!=U.charCodeAt(S))return!0;return!1}function r(L,q,U,S,G){for(var V=0;V<G;V++)L[q+V]=U[S+V]}function n(L,q,U,S){for(var G=0;G<S;G++)L[q+G]=U}function i(L){return new Int32Array(L)}function a(L,q){for(var U=[],S=0;S<L;S++)U.push(new q);return U}function s(L,q){var U=[];return(function S(G,V,nA){for(var oA=nA[V],lA=0;lA<oA&&(G.push(nA.length>V+1?[]:new q),!(nA.length<V+1));lA++)S(G[lA],V+1,nA)})(U,0,L),U}var l=function(){var L=this;function q(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,T,Y,aA){var D,Z,tA=_,pA=1<<I,iA=i(16),BA=i(16);for(A(Y!=0),A(T!=null),A(x!=null),A(0<I),Z=0;Z<Y;++Z){if(15<T[Z])return 0;++iA[T[Z]]}if(iA[0]==Y)return 0;for(BA[1]=0,D=1;15>D;++D){if(iA[D]>1<<D)return 0;BA[D+1]=BA[D]+iA[D]}for(Z=0;Z<Y;++Z)D=T[Z],0<T[Z]&&(aA[BA[D]++]=Z);if(BA[15]==1)return(T=new G).g=0,T.value=aA[0],U(x,tA,1,pA,T),pA;var mA,UA=-1,CA=pA-1,jA=0,NA=1,pe=1,PA=1<<I;for(Z=0,D=1,Y=2;D<=I;++D,Y<<=1){if(NA+=pe<<=1,0>(pe-=iA[D]))return 0;for(;0<iA[D];--iA[D])(T=new G).g=D,T.value=aA[Z++],U(x,tA+jA,Y,PA,T),jA=q(jA,D)}for(D=I+1,Y=2;15>=D;++D,Y<<=1){if(NA+=pe<<=1,0>(pe-=iA[D]))return 0;for(;0<iA[D];--iA[D]){if(T=new G,(jA&CA)!=UA){for(tA+=PA,mA=1<<(UA=D)-I;15>UA&&!(0>=(mA-=iA[UA]));)++UA,mA<<=1;pA+=PA=1<<(mA=UA-I),x[_+(UA=jA&CA)].g=mA+I,x[_+UA].value=tA-_-UA}T.g=D-I,T.value=aA[Z++],U(x,tA+(jA>>I),Y,PA,T),jA=q(jA,D)}}return NA!=2*BA[15]-1?0:pA})(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(ki,V)}function oA(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,dA(o)}function lA(o,c){for(var g=0;0<c--;)g|=gA(o,128)<<c;return g}function eA(o,c){var g=lA(o,c);return fA(o)?-g:g}function uA(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 vA(o){for(;8<=o.u&&o.bb<o.Sb;)o.Ra>>>=8,o.Ra+=o.oa[o.pa+o.bb]<<Mn-8>>>0,++o.bb,o.u-=8;W(o)&&(o.h=1,o.u=0)}function hA(o,c){if(A(0<=c),!o.h&&c<=or){var g=M(o)&sr[c];return o.u+=c,vA(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 k(){this.Ra=0,this.oa=[],this.h=this.u=this.bb=this.Sb=this.pa=0}function M(o){return o.Ra>>>(o.u&Mn-1)>>>0}function W(o){return A(o.bb<=o.Sb),o.h||o.bb==o.Sb&&o.u>Mn}function $(o,c){o.u=c,o.h=W(o)}function rA(o){o.u>=Cn&&(A(o.u>=Cn),vA(o))}function dA(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 fA(o){return lA(o,1)}function gA(o,c){var g=o.Ca;0>o.b&&dA(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+Kn[w],o.b-=w,o.Ca=(g<<w)-1,Q}function sA(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 yA(o,c){return o[c+0]|o[c+1]<<8}function xA(o,c){return yA(o,c)|o[c+2]<<16}function cA(o,c){return yA(o,c)|yA(o,c+2)<<16}function R(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 me(o,c){A(o!=null),A(c!=null),A(o.Xa==c.Xa),r(c.X,0,o.X,0,1<<c.Xa)}function le(){this.X=[],this.Xa=this.Mb=0}function zA(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
|
|||
|
|
`},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}}])})(qA.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}})(qA.API),qA.API.processPNG=function(t,A,e,r){if(this.__addimage__.isArrayBuffer(t)&&(t=new Uint8Array(t)),this.__addimage__.isArrayBufferView(t)){var n,i=kF(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,q=K.height,U=K.data,S=K.palette,G=K.depth,V=!1,nA=[],oA=[],lA=void 0,eA=!1,uA=0,vA=0;vA<S.length;vA++){var hA=Gd(S[vA],4),F=hA[0],k=hA[1],M=hA[2],W=hA[3];nA.push(F,k,M),W!=null&&(W===0?(uA++,oA.length<1&&oA.push(vA)):W<255&&(eA=!0))}if(eA||uA>1){V=!0,oA=void 0;var $=L*q;lA=new Uint8Array($);for(var rA=new DataView(U.buffer),dA=0;dA<$;dA++){var fA=Qu(rA,dA,G),gA=Gd(S[fA],4)[3];lA[dA]=gA}}else uA===0&&(oA=void 0);return{colorSpace:"Indexed",colorsPerPixel:1,sMaskBitsPerComponent:V?8:void 0,colorBytes:U,alphaBytes:lA,needSMask:V,palette:nA,mask:oA}})(i):l===2||l===4?(function(K){for(var L=K.data,q=K.width,U=K.height,S=K.channels,G=K.depth,V=S===2?"DeviceGray":"DeviceRGB",nA=S-1,oA=q*U,lA=nA,eA=oA*lA,uA=1*oA,vA=Math.ceil(eA*G/8),hA=Math.ceil(uA*G/8),F=new Uint8Array(vA),k=new Uint8Array(hA),M=new DataView(L.buffer),W=new DataView(F.buffer),$=new DataView(k.buffer),rA=!1,dA=0;dA<oA;dA++){for(var fA=dA*S,gA=0;gA<lA;gA++)zg(W,Qu(M,fA+gA,G),dA*lA+gA,G);var sA=Qu(M,fA+lA,G);sA<(1<<G)-1&&(rA=!0),zg($,sA,1*dA,G)}return{colorSpace:V,colorsPerPixel:nA,sMaskBitsPerComponent:rA?G:void 0,colorBytes:F,alphaBytes:k,needSMask:rA}})(i):(function(K){var L=K.data,q=K.channels===1?"DeviceGray":"DeviceRGB";return{colorSpace:q,colorsPerPixel:q==="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,P=m.alphaBytes,N=m.needSMask,j=m.palette,J=m.mask,X=null;return r!==qA.API.image_compression.NONE&&typeof nf=="function"?(X=(function(K){var L;switch(K){case qA.API.image_compression.FAST:L=11;break;case qA.API.image_compression.MEDIUM:L=13;break;case qA.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=Gg(H,Math.ceil(a*E*f/8),E,f,r),N&&(d=Gg(P,Math.ceil(a*v/8),1,v,r))):(p=void 0,B=void 0,t=H,N&&(d=P)),(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 tQ(A),a=i.width,s=i.height,l=[];i.decodeAndBlitFrameRGBA(0,l);var u={dat
|
|||
|
|
`:"")+j})):H.push(N[0])}),C=H,l=Rg.apply(this,[v,e])}for(i=0,a=C.length;i<a;i++){var P=0;if(r=C[i],l&&r[0]==`
|
|||
|
|
`&&(r=r.substr(1),P=1),B+d+(m=(n=ul.apply(this,[r,e])).reduce(function(N,j){return N+j},0))>A||P){if(m>A){for(s=Mg.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(N,j){return N+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(N,j){return(j?v:"")+N.join(" ")}:function(N){return N.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(Kg.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,P=v,N=[],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=="{"?(N.push([P,C]),P={},C=void 0):E=="}"?((m=N.pop())[0][m[1]]=P,C=void 0,P=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],P[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},(function(t){var A=function(){var r='<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>',n=unescape(encodeURIComponent('<x:xmpmeta xmlns:x="adobe:ns:meta/">')),i=unescape(encodeURIComponent(r)),a=unescape(encodeURIComponent(this.internal.__metadata__.metadata)),s=unescape(encodeURIComponent("</jspdf:metadata></rdf:Description></rdf:RDF>")),l=unescape(encodeURIComponent("</x:xmpmeta>")),u=i.length+a.length+s.length+n.length+l.length;this.internal.__metadata__.metadata_object_number=this.internal.newObject(),this.internal.write("<< /Type /Metadata /Subtype /XML /Length "+u+" >>"),this.internal.write("stream"),this.internal.write(n+i+a+s+l),this.internal.write("endstream"),this.internal.write("endobj")},e=function(){this.internal.__metadata__.metadata_object_number&&this.internal.write("/Metadata "+this.internal.__metadata__.metadata_object_number+" 0 R")};t.addMetadata=function(r,n){return this.internal.__metadata__===void 0&&(this.internal.__metadata__={metadata:r,namespaceuri:n||"http://jspdf.default.namespaceuri/"},this.internal.events.subscribe("putCatalog",e),this.internal.events.subscribe("postPutResources",A)),this}})(qA.API),(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="",P=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 N="";return parseInt(C.slice(1))<14||P==="WinAnsiEncoding"?N=B(E,C).split("").map(function(j){return j.charCodeAt(0).toString(16)}).join(""):P==="Identity-H"&&(N=e(E,m[C])),p.isHex=!0,{text:N,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}])})(qA),(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}})(qA.API),(function(t){t.__bidiEngine__=t.prototy
|
|||
|
|
`)}return""+e},A})();const wQ={style:{"max-height":"calc(100vh - 200px)","overflow-y":"auto",display:"flex","justify-content":"center"}},mQ={class:"dialog-footer"},vQ=mr({__name:"index",setup(t,{expose:A}){const e=YA(!1),r=YA(),n=YA(),i=YA(!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(()=>{Vi(()=>{n.value.appendChild(p),i5(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(()=>{Vi(()=>{Af(r.value,{logging:!1}).then(f=>{const p=new qA("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(()=>{Vi(()=>{Af(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=TA("el-button"),d=TA("el-dialog"),m=Gl("loading");return $A(),_e(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(()=>[LA("span",mQ,[FA(B,{loading:e.value,onClick:s},{default:EA(()=>[xt(oe(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(()=>[xt(oe(f.$t("chat.exportImg")),1)]),_:1},8,["loading"])])]),default:EA(()=>[Ar(($A(),vt("div",wQ,[LA("div",{ref_key:"cloneContainerRef",ref:n,style:{width:"100%"}},null,512),LA("div",{ref_key:"svgContainerRef",ref:r},null,512)])),[[m,e.value]])]),_:1},8,["modelValue","title"])}}}),CQ={class:"flex h-full w-full"},bQ={class:"chat-pc__left"},yQ={class:"user-info p-16 cursor"},FQ={class:"flex align-center"},QQ={class:"flex align-center p-8"},UQ={class:"mr-8 flex align-center"},xQ={class:"medium mb-4"},EQ={class:"color-secondary"},LQ={style:{flex:"1",width:"calc(100% - var(--execution-detail-panel-width))"}},_Q={class:"p-16-24 flex-between"},IQ={class:"ellipsis-1",style:{width:"66%"}},SQ={key:0,class:"flex align-center"},HQ={key:1,class:"lighter"},NQ={class:"right-height chat-width"},kQ={class:"execution-detail-panel",resizable:!1,collapsible:""},TQ={class:"p-16 flex-between border-b"},DQ=["title"],OQ={class:"flex align-center"},PQ={key:0,class:"mr-4"},RQ=["href","title"],MQ={class:"execution-detail-content"},KQ=mr({__name:"index",props:{application_profile:{},applicationAvailable:{type:Boolean}},setup(t){AB();const A=YA(),{common:e,chatUser:r}=di(),n=Ks(),i=()=>{var sA;(sA=A.value)==null||sA.open(document.getElementById("chatListId"))},a=df(),s=YA(!1),l=YA(!1);sB(()=>e.device,()=>{e.isMobile()&&(l.value=!1)});const u=()=>{r.logout().then(()=>{n.push({name:"login",query:a.query})})},f=YA(),p=()=>{var sA;(sA=f.value)==null||sA.open()},B=sA=>{Pt.resetCurrentPassword(sA).then(()=>{n.push({name:"login"})})},d=on(()=>({mobile:e.isMobile(),hideLeft:!s.value,openLeft:s.value})),m={id:"new",abstract:mt("chat.createChat")},C=t,E=YA(),v=YA(!1),H=YA(!1),P=on({get:()=>C.application_profile,set:sA=>{}}),N=YA([]),j=YA({cur
|
|||
|
|
|
|||
|
|
${cA.answer_text}
|
|||
|
|
|
|||
|
|
`).join(`
|
|||
|
|
`),xA=new Blob([yA],{type:"text/markdown;charset=utf-8"});Sh.saveAs(xA,sA)}async function uA(){const sA=`${X.value}.html`,yA=J.value.map(R=>`# ${R.problem_text}
|
|||
|
|
|
|||
|
|
${R.answer_text}
|
|||
|
|
|
|||
|
|
`).join(`
|
|||
|
|
`),xA=Oe(yA),cA=new Blob([xA],{type:"text/html;charset=utf-8"});Sh.saveAs(cA,sA)}const vA=()=>{V()};gf(()=>{vA()});const hA=YA(0),F=YA(""),k=YA(""),M=YA(!1),W=YA([]),$=YA();async function rA(sA){if(hA.value=400,F.value=mt("chat.executionDetails.title"),k.value="executionDetail",sA.execution_details)W.value=Fh.cloneDeep(sA.execution_details);else{const yA=await Pt.getChatRecord(sA.chat_id,sA.record_id,M);W.value=Fh.cloneDeep(yA.data.execution_details)}}async function dA(sA){F.value=mt("chat.KnowledgeSource.title"),k.value="knowledgeSource",$.value=sA,hA.value=400}function fA(sA,yA){F.value=yA.document_name,k.value="paragraphDocument",hA.value=400,$.value=yA}function gA(){hA.value=0}return(sA,yA)=>{var WA,ye,re,ne,Ee,ue,GA,ZA,VA,ke,Fe,OA,ie,Ie,XA,ve,ae;const xA=TA("el-avatar"),cA=TA("AppIcon"),R=TA("el-dropdown-item"),me=TA("el-dropdown-menu"),le=TA("el-dropdown"),zA=TA("el-icon"),QA=TA("el-button"),KA=TA("AiChat"),IA=TA("Close"),ce=Gl("loading");return Ar(($A(),vt("div",{class:pf(["chat-pc",d.value]),style:Sn({"--el-color-primary":(ye=(WA=P.value)==null?void 0:WA.custom_theme)==null?void 0:ye.theme_color,"--el-color-primary-light-9":we(Hn)(((ne=(re=P.value)==null?void 0:re.custom_theme)==null?void 0:ne.theme_color)||"#3370FF",.1),"--el-color-primary-light-6":we(Hn)(((ue=(Ee=P.value)==null?void 0:Ee.custom_theme)==null?void 0:ue.theme_color)||"#3370FF",.4),"--el-color-primary-light-06":we(Hn)(((ZA=(GA=P.value)==null?void 0:GA.custom_theme)==null?void 0:ZA.theme_color)||"#3370FF",.04)})},[LA("div",CQ,[LA("div",bQ,[FA(Bf,{"application-detail":P.value,"chat-log-data":N.value,"left-loading":H.value,currentChatId:X.value,onNewChat:G,onClickLog:oA,onDeleteLog:q,onClearChat:U,onRefreshFieldTitle:L,isPcCollapse:l.value},{default:EA(()=>{var Me;return[LA("div",yQ,[!((Me=we(r).chat_profile)!=null&&Me.authentication)||we(r).chat_profile.authentication_type==="password"?($A(),_e(xA,{key:0,size:32},{default:EA(()=>[...yA[2]||(yA[2]=[LA("img",{src:oi,style:{width:"54%"},alt:""},null,-1)])]),_:1})):($A(),_e(le,{key:1,trigger:"click",type:"primary",class:"w-full"},{dropdown:EA(()=>[FA(me,{style:{"min-width":"260px"}},{default:EA(()=>{var Xe,Se,ee,Ue;return[LA("div",QQ,[LA("div",UQ,[FA(xA,{size:40},{default:EA(()=>[...yA[4]||(yA[4]=[LA("img",{src:oi,style:{width:"54%"},alt:""},null,-1)])]),_:1})]),LA("div",null,[LA("h4",xQ,oe((Xe=we(r).chatUserProfile)==null?void 0:Xe.nick_name),1),LA("div",EQ,oe(`${we(mt)("common.username")}: ${(Se=we(r).chatUserProfile)==null?void 0:Se.username}`),1)])]),((ee=we(r).chatUserProfile)==null?void 0:ee.source)==="LOCAL"?($A(),_e(R,{key:0,class:"border-t",style:{"padding-top":"8px","padding-bottom":"8px"},onClick:p},{default:EA(()=>[FA(cA,{iconName:"app-key",class:"color-secondary"}),xt(" "+oe(sA.$t("views.login.resetPassword")),1)]),_:1})):It("",!0),((Ue=we(r).chatUserProfile)==null?void 0:Ue.source)==="LOCAL"?($A(),_e(R,{key:1,class:"border-t",style:{"padding-top":"8px","padding-bottom":"8px"},onClick:u},{default:EA(()=>[FA(cA,{iconName:"app-export",class:"color-secondary"}),xt(" "+oe(sA.$t("layout.logout")),1)]),_:1})):It("",!0)]}),_:1})]),default:EA(()=>{var Xe;return[LA("div",FQ,[FA(xA,{size:32},{default:EA(()=>[...yA[3]||(yA[3]=[LA("img",{src:oi,style:{width:"54%"},alt:""},null,-1)])]),_:1}),Ar(LA("span",{class:"ml-8 color-text-primary"},oe((Xe=we(r).chatUserProfile)==null?void 0:Xe.nick_name),513),[[_n,!l.value]])])]}),_:1}))])]}),_:1},8,["application-detail","chat-log-data","left-loading","currentChatId","isPcCollapse"]),we(e).isMobile()?It("",!0):($A(),_e(QA,{key:0,class:"pc-collapse cursor",circle:"",onClick:yA[0]||(yA[0]=Me=>l.value=!l.value)},{default:EA(()=>[FA(zA,null,{default:EA(()=>[($A(),_e(Kl(l.value?"ArrowRightBold":"ArrowLeftBold")))]),_:1})]),_:1}))]),LA("div",{class:"chat-pc__right chat-background",style:Sn({backgroundImage:`url(${(VA=P.value)==null?void 0:VA.chat_background})`,"--execution-detail-panel-width":hA.value+"px"})},[LA("div",LQ,[LA("div",_Q,[LA("h4",IQ,oe(K.value),1),J.value.length?($A(),vt("span",SQ,[j.value.total?($A(),_e(cA,{key:0,iconName:"app-chat-record",class:"color-se
|