UNPKG

vue-data-ui-hq

Version:

A user-empowering data visualization Vue 3 components library for eloquent data storytelling

1,048 lines 486 kB
function fe(r) { "@babel/helpers - typeof"; return fe = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) { return typeof e; } : function(e) { return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e; }, fe(r); } var tn = Uint8Array, vn = Uint16Array, _s = Int32Array, go = new tn([ 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, /* unused */ 0, 0, /* impossible */ 0 ]), mo = new tn([ 0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, /* unused */ 0, 0 ]), gs = new tn([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]), Ac = function(r, e) { for (var n = new vn(31), a = 0; a < 31; ++a) n[a] = e += 1 << r[a - 1]; for (var c = new _s(n[30]), a = 1; a < 30; ++a) for (var o = n[a]; o < n[a + 1]; ++o) c[o] = o - n[a] << 5 | a; return { b: n, r: c }; }, xc = Ac(go, 2), Sc = xc.b, ms = xc.r; Sc[28] = 258, ms[258] = 28; var _c = Ac(mo, 0), Pu = _c.b, rc = _c.r, vs = new vn(32768); for (var we = 0; we < 32768; ++we) { var kr = (we & 43690) >> 1 | (we & 21845) << 1; kr = (kr & 52428) >> 2 | (kr & 13107) << 2, kr = (kr & 61680) >> 4 | (kr & 3855) << 4, vs[we] = ((kr & 65280) >> 8 | (kr & 255) << 8) >> 1; } var tr = function(r, e, n) { for (var a = r.length, c = 0, o = new vn(e); c < a; ++c) r[c] && ++o[r[c] - 1]; var l = new vn(e); for (c = 1; c < e; ++c) l[c] = l[c - 1] + o[c - 1] << 1; var h; if (n) { h = new vn(1 << e); var f = 15 - e; for (c = 0; c < a; ++c) if (r[c]) for (var g = c << 4 | r[c], y = e - r[c], w = l[r[c] - 1]++ << y, S = w | (1 << y) - 1; w <= S; ++w) h[vs[w] >> f] = g; } else for (h = new vn(a), c = 0; c < a; ++c) r[c] && (h[c] = vs[l[r[c] - 1]++] >> 15 - r[c]); return h; }, Cr = new tn(288); for (var we = 0; we < 144; ++we) Cr[we] = 8; for (var we = 144; we < 256; ++we) Cr[we] = 9; for (var we = 256; we < 280; ++we) Cr[we] = 7; for (var we = 280; we < 288; ++we) Cr[we] = 8; var da = new tn(32); for (var we = 0; we < 32; ++we) da[we] = 5; var ku = /* @__PURE__ */ tr(Cr, 9, 0), Fu = /* @__PURE__ */ tr(Cr, 9, 1), Iu = /* @__PURE__ */ tr(da, 5, 0), Cu = /* @__PURE__ */ tr(da, 5, 1), os = function(r) { for (var e = r[0], n = 1; n < r.length; ++n) r[n] > e && (e = r[n]); return e; }, qn = function(r, e, n) { var a = e / 8 | 0; return (r[a] | r[a + 1] << 8) >> (e & 7) & n; }, ss = function(r, e) { var n = e / 8 | 0; return (r[n] | r[n + 1] << 8 | r[n + 2] << 16) >> (e & 7); }, Ps = function(r) { return (r + 7) / 8 | 0; }, Pc = function(r, e, n) { return (n == null || n > r.length) && (n = r.length), new tn(r.subarray(e, n)); }, ju = [ "unexpected EOF", "invalid block type", "invalid length/literal", "invalid distance", "stream finished", "no stream handler", , "no callback", "invalid UTF-8 data", "extra field too long", "date not in range 1980-2099", "filename too long", "stream finishing", "invalid zip data" // determined by unknown compression method ], Rn = function(r, e, n) { var a = new Error(e || ju[r]); if (a.code = r, Error.captureStackTrace && Error.captureStackTrace(a, Rn), !n) throw a; return a; }, Ou = function(r, e, n, a) { var c = r.length, o = 0; if (!c || e.f && !e.l) return n || new tn(0); var l = !n, h = l || e.i != 2, f = e.i; l && (n = new tn(c * 3)); var g = function(Nt) { var Ft = n.length; if (Nt > Ft) { var _t = new tn(Math.max(Ft * 2, Nt)); _t.set(n), n = _t; } }, y = e.f || 0, w = e.p || 0, S = e.b || 0, p = e.l, O = e.d, F = e.m, q = e.n, _ = c * 8; do { if (!p) { y = qn(r, w, 1); var M = qn(r, w + 1, 3); if (w += 3, M) if (M == 1) p = Fu, O = Cu, F = 9, q = 5; else if (M == 2) { var wt = qn(r, w, 31) + 257, tt = qn(r, w + 10, 15) + 4, z = wt + qn(r, w + 5, 31) + 1; w += 14; for (var rt = new tn(z), dt = new tn(19), P = 0; P < tt; ++P) dt[gs[P]] = qn(r, w + P * 3, 7); w += tt * 3; for (var k = os(dt), W = (1 << k) - 1, D = tr(dt, k, 1), P = 0; P < z; ) { var st = D[qn(r, w, W)]; w += st & 15; var Y = st >> 4; if (Y < 16) rt[P++] = Y; else { var it = 0, lt = 0; for (Y == 16 ? (lt = 3 + qn(r, w, 3), w += 2, it = rt[P - 1]) : Y == 17 ? (lt = 3 + qn(r, w, 7), w += 3) : Y == 18 && (lt = 11 + qn(r, w, 127), w += 7); lt--; ) rt[P++] = it; } } var $ = rt.subarray(0, wt), ht = rt.subarray(wt); F = os($), q = os(ht), p = tr($, F, 1), O = tr(ht, q, 1); } else Rn(1); else { var Y = Ps(w) + 4, ot = r[Y - 4] | r[Y - 3] << 8, ut = Y + ot; if (ut > c) { f && Rn(0); break; } h && g(S + ot), n.set(r.subarray(Y, ut), S), e.b = S += ot, e.p = w = ut * 8, e.f = y; continue; } if (w > _) { f && Rn(0); break; } } h && g(S + 131072); for (var pt = (1 << F) - 1, It = (1 << q) - 1, N = w; ; N = w) { var it = p[ss(r, w) & pt], C = it >> 4; if (w += it & 15, w > _) { f && Rn(0); break; } if (it || Rn(2), C < 256) n[S++] = C; else if (C == 256) { N = w, p = null; break; } else { var B = C - 254; if (C > 264) { var P = C - 257, T = go[P]; B = qn(r, w, (1 << T) - 1) + Sc[P], w += T; } var J = O[ss(r, w) & It], Q = J >> 4; J || Rn(3), w += J & 15; var ht = Pu[Q]; if (Q > 3) { var T = mo[Q]; ht += ss(r, w) & (1 << T) - 1, w += T; } if (w > _) { f && Rn(0); break; } h && g(S + 131072); var et = S + B; if (S < ht) { var nt = o - ht, At = Math.min(ht, et); for (nt + S < 0 && Rn(3); S < At; ++S) n[S] = a[nt + S]; } for (; S < et; ++S) n[S] = n[S - ht]; } } e.l = p, e.p = N, e.b = S, e.f = y, p && (y = 1, e.m = F, e.d = O, e.n = q); } while (!y); return S != n.length && l ? Pc(n, 0, S) : n.subarray(0, S); }, dr = function(r, e, n) { n <<= e & 7; var a = e / 8 | 0; r[a] |= n, r[a + 1] |= n >> 8; }, la = function(r, e, n) { n <<= e & 7; var a = e / 8 | 0; r[a] |= n, r[a + 1] |= n >> 8, r[a + 2] |= n >> 16; }, cs = function(r, e) { for (var n = [], a = 0; a < r.length; ++a) r[a] && n.push({ s: a, f: r[a] }); var c = n.length, o = n.slice(); if (!c) return { t: Fc, l: 0 }; if (c == 1) { var l = new tn(n[0].s + 1); return l[n[0].s] = 1, { t: l, l: 1 }; } n.sort(function(ut, wt) { return ut.f - wt.f; }), n.push({ s: -1, f: 25001 }); var h = n[0], f = n[1], g = 0, y = 1, w = 2; for (n[0] = { s: -1, f: h.f + f.f, l: h, r: f }; y != c - 1; ) h = n[n[g].f < n[w].f ? g++ : w++], f = n[g != y && n[g].f < n[w].f ? g++ : w++], n[y++] = { s: -1, f: h.f + f.f, l: h, r: f }; for (var S = o[0].s, a = 1; a < c; ++a) o[a].s > S && (S = o[a].s); var p = new vn(S + 1), O = bs(n[y - 1], p, 0); if (O > e) { var a = 0, F = 0, q = O - e, _ = 1 << q; for (o.sort(function(wt, tt) { return p[tt.s] - p[wt.s] || wt.f - tt.f; }); a < c; ++a) { var M = o[a].s; if (p[M] > e) F += _ - (1 << O - p[M]), p[M] = e; else break; } for (F >>= q; F > 0; ) { var Y = o[a].s; p[Y] < e ? F -= 1 << e - p[Y]++ - 1 : ++a; } for (; a >= 0 && F; --a) { var ot = o[a].s; p[ot] == e && (--p[ot], ++F); } O = e; } return { t: new tn(p), l: O }; }, bs = function(r, e, n) { return r.s == -1 ? Math.max(bs(r.l, e, n + 1), bs(r.r, e, n + 1)) : e[r.s] = n; }, ic = function(r) { for (var e = r.length; e && !r[--e]; ) ; for (var n = new vn(++e), a = 0, c = r[0], o = 1, l = function(f) { n[a++] = f; }, h = 1; h <= e; ++h) if (r[h] == c && h != e) ++o; else { if (!c && o > 2) { for (; o > 138; o -= 138) l(32754); o > 2 && (l(o > 10 ? o - 11 << 5 | 28690 : o - 3 << 5 | 12305), o = 0); } else if (o > 3) { for (l(c), --o; o > 6; o -= 6) l(8304); o > 2 && (l(o - 3 << 5 | 8208), o = 0); } for (; o--; ) l(c); o = 1, c = r[h]; } return { c: n.subarray(0, a), n: e }; }, ha = function(r, e) { for (var n = 0, a = 0; a < e.length; ++a) n += r[a] * e[a]; return n; }, kc = function(r, e, n) { var a = n.length, c = Ps(e + 2); r[c] = a & 255, r[c + 1] = a >> 8, r[c + 2] = r[c] ^ 255, r[c + 3] = r[c + 1] ^ 255; for (var o = 0; o < a; ++o) r[c + o + 4] = n[o]; return (c + 4 + a) * 8; }, ac = function(r, e, n, a, c, o, l, h, f, g, y) { dr(e, y++, n), ++c[256]; for (var w = cs(c, 15), S = w.t, p = w.l, O = cs(o, 15), F = O.t, q = O.l, _ = ic(S), M = _.c, Y = _.n, ot = ic(F), ut = ot.c, wt = ot.n, tt = new vn(19), z = 0; z < M.length; ++z) ++tt[M[z] & 31]; for (var z = 0; z < ut.length; ++z) ++tt[ut[z] & 31]; for (var rt = cs(tt, 7), dt = rt.t, P = rt.l, k = 19; k > 4 && !dt[gs[k - 1]]; --k) ; var W = g + 5 << 3, D = ha(c, Cr) + ha(o, da) + l, st = ha(c, S) + ha(o, F) + l + 14 + 3 * k + ha(tt, dt) + 2 * tt[16] + 3 * tt[17] + 7 * tt[18]; if (f >= 0 && W <= D && W <= st) return kc(e, y, r.subarray(f, f + g)); var it, lt, $, ht; if (dr(e, y, 1 + (st < D)), y += 2, st < D) { it = tr(S, p, 0), lt = S, $ = tr(F, q, 0), ht = F; var pt = tr(dt, P, 0); dr(e, y, Y - 257), dr(e, y + 5, wt - 1), dr(e, y + 10, k - 4), y += 14; for (var z = 0; z < k; ++z) dr(e, y + 3 * z, dt[gs[z]]); y += 3 * k; for (var It = [M, ut], N = 0; N < 2; ++N) for (var C = It[N], z = 0; z < C.length; ++z) { var B = C[z] & 31; dr(e, y, pt[B]), y += dt[B], B > 15 && (dr(e, y, C[z] >> 5 & 127), y += C[z] >> 12); } } else it = ku, lt = Cr, $ = Iu, ht = da; for (var z = 0; z < h; ++z) { var T = a[z]; if (T > 255) { var B = T >> 18 & 31; la(e, y, it[B + 257]), y += lt[B + 257], B > 7 && (dr(e, y, T >> 23 & 31), y += go[B]); var J = T & 31; la(e, y, $[J]), y += ht[J], J > 3 && (la(e, y, T >> 5 & 8191), y += mo[J]); } else la(e, y, it[T]), y += lt[T]; } return la(e, y, it[256]), y + lt[256]; }, Mu = /* @__PURE__ */ new _s([65540, 131080, 131088, 131104, 262176, 1048704, 1048832, 2114560, 2117632]), Fc = /* @__PURE__ */ new tn(0), Bu = function(r, e, n, a, c, o) { var l = o.z || r.length, h = new tn(a + l + 5 * (1 + Math.ceil(l / 7e3)) + c), f = h.subarray(a, h.length - c), g = o.l, y = (o.r || 0) & 7; if (e) { y && (f[0] = o.r >> 3); for (var w = Mu[e - 1], S = w >> 13, p = w & 8191, O = (1 << n) - 1, F = o.p || new vn(32768), q = o.h || new vn(O + 1), _ = Math.ceil(n / 3), M = 2 * _, Y = function(zt) { return (r[zt] ^ r[zt + 1] << _ ^ r[zt + 2] << M) & O; }, ot = new _s(25e3), ut = new vn(288), wt = new vn(32), tt = 0, z = 0, rt = o.i || 0, dt = 0, P = o.w || 0, k = 0; rt + 2 < l; ++rt) { var W = Y(rt), D = rt & 32767, st = q[W]; if (F[D] = st, q[W] = D, P <= rt) { var it = l - rt; if ((tt > 7e3 || dt > 24576) && (it > 423 || !g)) { y = ac(r, f, 0, ot, ut, wt, z, dt, k, rt - k, y), dt = tt = z = 0, k = rt; for (var lt = 0; lt < 286; ++lt) ut[lt] = 0; for (var lt = 0; lt < 30; ++lt) wt[lt] = 0; } var $ = 2, ht = 0, pt = p, It = D - st & 32767; if (it > 2 && W == Y(rt - It)) for (var N = Math.min(S, it) - 1, C = Math.min(32767, rt), B = Math.min(258, it); It <= C && --pt && D != st; ) { if (r[rt + $] == r[rt + $ - It]) { for (var T = 0; T < B && r[rt + T] == r[rt + T - It]; ++T) ; if (T > $) { if ($ = T, ht = It, T > N) break; for (var J = Math.min(It, T - 2), Q = 0, lt = 0; lt < J; ++lt) { var et = rt - It + lt & 32767, nt = F[et], At = et - nt & 32767; At > Q && (Q = At, st = et); } } } D = st, st = F[D], It += D - st & 32767; } if (ht) { ot[dt++] = 268435456 | ms[$] << 18 | rc[ht]; var Nt = ms[$] & 31, Ft = rc[ht] & 31; z += go[Nt] + mo[Ft], ++ut[257 + Nt], ++wt[Ft], P = rt + $, ++tt; } else ot[dt++] = r[rt], ++ut[r[rt]]; } } for (rt = Math.max(rt, P); rt < l; ++rt) ot[dt++] = r[rt], ++ut[r[rt]]; y = ac(r, f, g, ot, ut, wt, z, dt, k, rt - k, y), g || (o.r = y & 7 | f[y / 8 | 0] << 3, y -= 7, o.h = q, o.p = F, o.i = rt, o.w = P); } else { for (var rt = o.w || 0; rt < l + g; rt += 65535) { var _t = rt + 65535; _t >= l && (f[y / 8 | 0] = g, _t = l), y = kc(f, y + 1, r.subarray(rt, _t)); } o.i = l; } return Pc(h, 0, a + Ps(y) + c); }, Ic = function() { var r = 1, e = 0; return { p: function(n) { for (var a = r, c = e, o = n.length | 0, l = 0; l != o; ) { for (var h = Math.min(l + 2655, o); l < h; ++l) c += a += n[l]; a = (a & 65535) + 15 * (a >> 16), c = (c & 65535) + 15 * (c >> 16); } r = a, e = c; }, d: function() { return r %= 65521, e %= 65521, (r & 255) << 24 | (r & 65280) << 8 | (e & 255) << 8 | e >> 8; } }; }, Eu = function(r, e, n, a, c) { if (!c && (c = { l: 1 }, e.dictionary)) { var o = e.dictionary.subarray(-32768), l = new tn(o.length + r.length); l.set(o), l.set(r, o.length), r = l, c.w = o.length; } return Bu(r, e.level == null ? 6 : e.level, e.mem == null ? c.l ? Math.ceil(Math.max(8, Math.min(13, Math.log(r.length))) * 1.5) : 20 : 12 + e.mem, n, a, c); }, Cc = function(r, e, n) { for (; n; ++e) r[e] = n, n >>>= 8; }, qu = function(r, e) { var n = e.level, a = n == 0 ? 0 : n < 6 ? 1 : n == 9 ? 3 : 2; if (r[0] = 120, r[1] = a << 6 | (e.dictionary && 32), r[1] |= 31 - (r[0] << 8 | r[1]) % 31, e.dictionary) { var c = Ic(); c.p(e.dictionary), Cc(r, 2, c.d()); } }, Du = function(r, e) { return ((r[0] & 15) != 8 || r[0] >> 4 > 7 || (r[0] << 8 | r[1]) % 31) && Rn(6, "invalid zlib data"), (r[1] >> 5 & 1) == +!e && Rn(6, "invalid zlib data: " + (r[1] & 32 ? "need" : "unexpected") + " dictionary"), (r[1] >> 3 & 4) + 2; }; function ys(r, e) { e || (e = {}); var n = Ic(); n.p(r); var a = Eu(r, e, e.dictionary ? 6 : 2, 4); return qu(a, e), Cc(a, a.length - 4, n.d()), a; } function Ru(r, e) { return Ou(r.subarray(Du(r, e), -4), { i: 2 }, e, e); } var Tu = typeof TextDecoder < "u" && /* @__PURE__ */ new TextDecoder(), zu = 0; try { Tu.decode(Fc, { stream: !0 }), zu = 1; } catch { } /** @license * * jsPDF - PDF Document creation from JavaScript * Version 2.5.2 Built on 2024-09-17T13:29:57.859Z * CommitID 00000000 * * Copyright (c) 2010-2021 James Hall <james@parall.ax>, https://github.com/MrRio/jsPDF * 2015-2021 yWorks GmbH, http://www.yworks.com * 2015-2021 Lukas Holländer <lukas.hollaender@yworks.com>, https://github.com/HackbrettXXX * 2016-2018 Aras Abbasi <aras.abbasi@gmail.com> * 2010 Aaron Spike, https://github.com/acspike * 2012 Willow Systems Corporation, https://github.com/willowsystems * 2012 Pablo Hess, https://github.com/pablohess * 2012 Florian Jenett, https://github.com/fjenett * 2013 Warren Weckesser, https://github.com/warrenweckesser * 2013 Youssef Beddad, https://github.com/lifof * 2013 Lee Driscoll, https://github.com/lsdriscoll * 2013 Stefan Slonevskiy, https://github.com/stefslon * 2013 Jeremy Morel, https://github.com/jmorel * 2013 Christoph Hartmann, https://github.com/chris-rock * 2014 Juan Pablo Gaviria, https://github.com/juanpgaviria * 2014 James Makes, https://github.com/dollaruw * 2014 Diego Casorran, https://github.com/diegocr * 2014 Steven Spungin, https://github.com/Flamenco * 2014 Kenneth Glassey, https://github.com/Gavvers * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * * Contributor(s): * siefkenj, ahwolf, rickygu, Midnith, saintclair, eaparango, * kim3er, mfo, alnorth, Flamenco */ var Ut = /* @__PURE__ */ function() { return typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : this; }(); function us() { Ut.console && typeof Ut.console.log == "function" && Ut.console.log.apply(Ut.console, arguments); } var ve = { log: us, warn: function(r) { Ut.console && (typeof Ut.console.warn == "function" ? Ut.console.warn.apply(Ut.console, arguments) : us.call(null, arguments)); }, error: function(r) { Ut.console && (typeof Ut.console.error == "function" ? Ut.console.error.apply(Ut.console, arguments) : us(r)); } }; function ls(r, e, n) { var a = new XMLHttpRequest(); a.open("GET", r), a.responseType = "blob", a.onload = function() { Gr(a.response, e, n); }, a.onerror = function() { ve.error("could not download file"); }, a.send(); } function oc(r) { var e = new XMLHttpRequest(); e.open("HEAD", r, !1); try { e.send(); } catch { } return e.status >= 200 && e.status <= 299; } function io(r) { try { r.dispatchEvent(new MouseEvent("click")); } catch { var e = document.createEvent("MouseEvents"); e.initMouseEvent("click", !0, !0, window, 0, 0, 0, 80, 20, !1, !1, !1, !1, 0, null), r.dispatchEvent(e); } } var fa, ws, Gr = Ut.saveAs || ((typeof window > "u" ? "undefined" : fe(window)) !== "object" || window !== Ut ? function() { } : typeof HTMLAnchorElement < "u" && "download" in HTMLAnchorElement.prototype ? function(r, e, n) { var a = Ut.URL || Ut.webkitURL, c = document.createElement("a"); e = e || r.name || "download", c.download = e, c.rel = "noopener", typeof r == "string" ? (c.href = r, c.origin !== location.origin ? oc(c.href) ? ls(r, e, n) : io(c, c.target = "_blank") : io(c)) : (c.href = a.createObjectURL(r), setTimeout(function() { a.revokeObjectURL(c.href); }, 4e4), setTimeout(function() { io(c); }, 0)); } : "msSaveOrOpenBlob" in navigator ? function(r, e, n) { if (e = e || r.name || "download", typeof r == "string") if (oc(r)) ls(r, e, n); else { var a = document.createElement("a"); a.href = r, a.target = "_blank", setTimeout(function() { io(a); }); } else navigator.msSaveOrOpenBlob(function(c, o) { return o === void 0 ? o = { autoBom: !1 } : fe(o) !== "object" && (ve.warn("Deprecated: Expected third argument to be a object"), o = { autoBom: !o }), o.autoBom && /^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(c.type) ? new Blob(["\uFEFF", c], { type: c.type }) : c; }(r, n), e); } : function(r, e, n, a) { if ((a = a || open("", "_blank")) && (a.document.title = a.document.body.innerText = "downloading..."), typeof r == "string") return ls(r, e, n); var c = r.type === "application/octet-stream", o = /constructor/i.test(Ut.HTMLElement) || Ut.safari, l = /CriOS\/[\d]+/.test(navigator.userAgent); if ((l || c && o) && (typeof FileReader > "u" ? "undefined" : fe(FileReader)) === "object") { var h = new FileReader(); h.onloadend = function() { var y = h.result; y = l ? y : y.replace(/^data:[^;]*;/, "data:attachment/file;"), a ? a.location.href = y : location = y, a = null; }, h.readAsDataURL(r); } else { var f = Ut.URL || Ut.webkitURL, g = f.createObjectURL(r); a ? a.location = g : location.href = g, a = null, setTimeout(function() { f.revokeObjectURL(g); }, 4e4); } }); /** * A class to parse color values * @author Stoyan Stefanov <sstoo@gmail.com> * {@link http://www.phpied.com/rgb-color-parser-in-javascript/} * @license Use it if you like it */ function jc(r) { var e; r = r || "", this.ok = !1, r.charAt(0) == "#" && (r = r.substr(1, 6)), r = { aliceblue: "f0f8ff", antiquewhite: "faebd7", aqua: "00ffff", aquamarine: "7fffd4", azure: "f0ffff", beige: "f5f5dc", bisque: "ffe4c4", black: "000000", blanchedalmond: "ffebcd", blue: "0000ff", blueviolet: "8a2be2", brown: "a52a2a", burlywood: "deb887", cadetblue: "5f9ea0", chartreuse: "7fff00", chocolate: "d2691e", coral: "ff7f50", cornflowerblue: "6495ed", cornsilk: "fff8dc", crimson: "dc143c", cyan: "00ffff", darkblue: "00008b", darkcyan: "008b8b", darkgoldenrod: "b8860b", darkgray: "a9a9a9", darkgreen: "006400", darkkhaki: "bdb76b", darkmagenta: "8b008b", darkolivegreen: "556b2f", darkorange: "ff8c00", darkorchid: "9932cc", darkred: "8b0000", darksalmon: "e9967a", darkseagreen: "8fbc8f", darkslateblue: "483d8b", darkslategray: "2f4f4f", darkturquoise: "00ced1", darkviolet: "9400d3", deeppink: "ff1493", deepskyblue: "00bfff", dimgray: "696969", dodgerblue: "1e90ff", feldspar: "d19275", firebrick: "b22222", floralwhite: "fffaf0", forestgreen: "228b22", fuchsia: "ff00ff", gainsboro: "dcdcdc", ghostwhite: "f8f8ff", gold: "ffd700", goldenrod: "daa520", gray: "808080", green: "008000", greenyellow: "adff2f", honeydew: "f0fff0", hotpink: "ff69b4", indianred: "cd5c5c", indigo: "4b0082", ivory: "fffff0", khaki: "f0e68c", lavender: "e6e6fa", lavenderblush: "fff0f5", lawngreen: "7cfc00", lemonchiffon: "fffacd", lightblue: "add8e6", lightcoral: "f08080", lightcyan: "e0ffff", lightgoldenrodyellow: "fafad2", lightgrey: "d3d3d3", lightgreen: "90ee90", lightpink: "ffb6c1", lightsalmon: "ffa07a", lightseagreen: "20b2aa", lightskyblue: "87cefa", lightslateblue: "8470ff", lightslategray: "778899", lightsteelblue: "b0c4de", lightyellow: "ffffe0", lime: "00ff00", limegreen: "32cd32", linen: "faf0e6", magenta: "ff00ff", maroon: "800000", mediumaquamarine: "66cdaa", mediumblue: "0000cd", mediumorchid: "ba55d3", mediumpurple: "9370d8", mediumseagreen: "3cb371", mediumslateblue: "7b68ee", mediumspringgreen: "00fa9a", mediumturquoise: "48d1cc", mediumvioletred: "c71585", midnightblue: "191970", mintcream: "f5fffa", mistyrose: "ffe4e1", moccasin: "ffe4b5", navajowhite: "ffdead", navy: "000080", oldlace: "fdf5e6", olive: "808000", olivedrab: "6b8e23", orange: "ffa500", orangered: "ff4500", orchid: "da70d6", palegoldenrod: "eee8aa", palegreen: "98fb98", paleturquoise: "afeeee", palevioletred: "d87093", papayawhip: "ffefd5", peachpuff: "ffdab9", peru: "cd853f", pink: "ffc0cb", plum: "dda0dd", powderblue: "b0e0e6", purple: "800080", red: "ff0000", rosybrown: "bc8f8f", royalblue: "4169e1", saddlebrown: "8b4513", salmon: "fa8072", sandybrown: "f4a460", seagreen: "2e8b57", seashell: "fff5ee", sienna: "a0522d", silver: "c0c0c0", skyblue: "87ceeb", slateblue: "6a5acd", slategray: "708090", snow: "fffafa", springgreen: "00ff7f", steelblue: "4682b4", tan: "d2b48c", teal: "008080", thistle: "d8bfd8", tomato: "ff6347", turquoise: "40e0d0", violet: "ee82ee", violetred: "d02090", wheat: "f5deb3", white: "ffffff", whitesmoke: "f5f5f5", yellow: "ffff00", yellowgreen: "9acd32" }[r = (r = r.replace(/ /g, "")).toLowerCase()] || r; for (var n = [{ re: /^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/, example: ["rgb(123, 234, 45)", "rgb(255,234,245)"], process: function(h) { return [parseInt(h[1]), parseInt(h[2]), parseInt(h[3])]; } }, { re: /^(\w{2})(\w{2})(\w{2})$/, example: ["#00ff00", "336699"], process: function(h) { return [parseInt(h[1], 16), parseInt(h[2], 16), parseInt(h[3], 16)]; } }, { re: /^(\w{1})(\w{1})(\w{1})$/, example: ["#fb0", "f0f"], process: function(h) { return [parseInt(h[1] + h[1], 16), parseInt(h[2] + h[2], 16), parseInt(h[3] + h[3], 16)]; } }], a = 0; a < n.length; a++) { var c = n[a].re, o = n[a].process, l = c.exec(r); l && (e = o(l), this.r = e[0], this.g = e[1], this.b = e[2], this.ok = !0); } this.r = this.r < 0 || isNaN(this.r) ? 0 : this.r > 255 ? 255 : this.r, this.g = this.g < 0 || isNaN(this.g) ? 0 : this.g > 255 ? 255 : this.g, this.b = this.b < 0 || isNaN(this.b) ? 0 : this.b > 255 ? 255 : this.b, this.toRGB = function() { return "rgb(" + this.r + ", " + this.g + ", " + this.b + ")"; }, this.toHex = function() { var h = this.r.toString(16), f = this.g.toString(16), g = this.b.toString(16); return h.length == 1 && (h = "0" + h), f.length == 1 && (f = "0" + f), g.length == 1 && (g = "0" + g), "#" + h + f + g; }; } /** * @license * Joseph Myers does not specify a particular license for his work. * * Author: Joseph Myers * Accessed from: http://www.myersdaily.org/joseph/javascript/md5.js * * Modified by: Owen Leong */ function hs(r, e) { var n = r[0], a = r[1], c = r[2], o = r[3]; n = Ke(n, a, c, o, e[0], 7, -680876936), o = Ke(o, n, a, c, e[1], 12, -389564586), c = Ke(c, o, n, a, e[2], 17, 606105819), a = Ke(a, c, o, n, e[3], 22, -1044525330), n = Ke(n, a, c, o, e[4], 7, -176418897), o = Ke(o, n, a, c, e[5], 12, 1200080426), c = Ke(c, o, n, a, e[6], 17, -1473231341), a = Ke(a, c, o, n, e[7], 22, -45705983), n = Ke(n, a, c, o, e[8], 7, 1770035416), o = Ke(o, n, a, c, e[9], 12, -1958414417), c = Ke(c, o, n, a, e[10], 17, -42063), a = Ke(a, c, o, n, e[11], 22, -1990404162), n = Ke(n, a, c, o, e[12], 7, 1804603682), o = Ke(o, n, a, c, e[13], 12, -40341101), c = Ke(c, o, n, a, e[14], 17, -1502002290), n = Ze(n, a = Ke(a, c, o, n, e[15], 22, 1236535329), c, o, e[1], 5, -165796510), o = Ze(o, n, a, c, e[6], 9, -1069501632), c = Ze(c, o, n, a, e[11], 14, 643717713), a = Ze(a, c, o, n, e[0], 20, -373897302), n = Ze(n, a, c, o, e[5], 5, -701558691), o = Ze(o, n, a, c, e[10], 9, 38016083), c = Ze(c, o, n, a, e[15], 14, -660478335), a = Ze(a, c, o, n, e[4], 20, -405537848), n = Ze(n, a, c, o, e[9], 5, 568446438), o = Ze(o, n, a, c, e[14], 9, -1019803690), c = Ze(c, o, n, a, e[3], 14, -187363961), a = Ze(a, c, o, n, e[8], 20, 1163531501), n = Ze(n, a, c, o, e[13], 5, -1444681467), o = Ze(o, n, a, c, e[2], 9, -51403784), c = Ze(c, o, n, a, e[7], 14, 1735328473), n = $e(n, a = Ze(a, c, o, n, e[12], 20, -1926607734), c, o, e[5], 4, -378558), o = $e(o, n, a, c, e[8], 11, -2022574463), c = $e(c, o, n, a, e[11], 16, 1839030562), a = $e(a, c, o, n, e[14], 23, -35309556), n = $e(n, a, c, o, e[1], 4, -1530992060), o = $e(o, n, a, c, e[4], 11, 1272893353), c = $e(c, o, n, a, e[7], 16, -155497632), a = $e(a, c, o, n, e[10], 23, -1094730640), n = $e(n, a, c, o, e[13], 4, 681279174), o = $e(o, n, a, c, e[0], 11, -358537222), c = $e(c, o, n, a, e[3], 16, -722521979), a = $e(a, c, o, n, e[6], 23, 76029189), n = $e(n, a, c, o, e[9], 4, -640364487), o = $e(o, n, a, c, e[12], 11, -421815835), c = $e(c, o, n, a, e[15], 16, 530742520), n = Qe(n, a = $e(a, c, o, n, e[2], 23, -995338651), c, o, e[0], 6, -198630844), o = Qe(o, n, a, c, e[7], 10, 1126891415), c = Qe(c, o, n, a, e[14], 15, -1416354905), a = Qe(a, c, o, n, e[5], 21, -57434055), n = Qe(n, a, c, o, e[12], 6, 1700485571), o = Qe(o, n, a, c, e[3], 10, -1894986606), c = Qe(c, o, n, a, e[10], 15, -1051523), a = Qe(a, c, o, n, e[1], 21, -2054922799), n = Qe(n, a, c, o, e[8], 6, 1873313359), o = Qe(o, n, a, c, e[15], 10, -30611744), c = Qe(c, o, n, a, e[6], 15, -1560198380), a = Qe(a, c, o, n, e[13], 21, 1309151649), n = Qe(n, a, c, o, e[4], 6, -145523070), o = Qe(o, n, a, c, e[11], 10, -1120210379), c = Qe(c, o, n, a, e[2], 15, 718787259), a = Qe(a, c, o, n, e[9], 21, -343485551), r[0] = Ir(n, r[0]), r[1] = Ir(a, r[1]), r[2] = Ir(c, r[2]), r[3] = Ir(o, r[3]); } function vo(r, e, n, a, c, o) { return e = Ir(Ir(e, r), Ir(a, o)), Ir(e << c | e >>> 32 - c, n); } function Ke(r, e, n, a, c, o, l) { return vo(e & n | ~e & a, r, e, c, o, l); } function Ze(r, e, n, a, c, o, l) { return vo(e & a | n & ~a, r, e, c, o, l); } function $e(r, e, n, a, c, o, l) { return vo(e ^ n ^ a, r, e, c, o, l); } function Qe(r, e, n, a, c, o, l) { return vo(n ^ (e | ~a), r, e, c, o, l); } function Oc(r) { var e, n = r.length, a = [1732584193, -271733879, -1732584194, 271733878]; for (e = 64; e <= r.length; e += 64) hs(a, Uu(r.substring(e - 64, e))); r = r.substring(e - 64); var c = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; for (e = 0; e < r.length; e++) c[e >> 2] |= r.charCodeAt(e) << (e % 4 << 3); if (c[e >> 2] |= 128 << (e % 4 << 3), e > 55) for (hs(a, c), e = 0; e < 16; e++) c[e] = 0; return c[14] = 8 * n, hs(a, c), a; } function Uu(r) { var e, n = []; for (e = 0; e < 64; e += 4) n[e >> 2] = r.charCodeAt(e) + (r.charCodeAt(e + 1) << 8) + (r.charCodeAt(e + 2) << 16) + (r.charCodeAt(e + 3) << 24); return n; } fa = Ut.atob.bind(Ut), ws = Ut.btoa.bind(Ut); var sc = "0123456789abcdef".split(""); function Hu(r) { for (var e = "", n = 0; n < 4; n++) e += sc[r >> 8 * n + 4 & 15] + sc[r >> 8 * n & 15]; return e; } function Wu(r) { return String.fromCharCode((255 & r) >> 0, (65280 & r) >> 8, (16711680 & r) >> 16, (4278190080 & r) >> 24); } function Ls(r) { return Oc(r).map(Wu).join(""); } var Vu = function(r) { for (var e = 0; e < r.length; e++) r[e] = Hu(r[e]); return r.join(""); }(Oc("hello")) != "5d41402abc4b2a76b9719d911017c592"; function Ir(r, e) { if (Vu) { var n = (65535 & r) + (65535 & e); return (r >> 16) + (e >> 16) + (n >> 16) << 16 | 65535 & n; } return r + e & 4294967295; } /** * @license * FPDF is released under a permissive license: there is no usage restriction. * You may embed it freely in your application (commercial or not), with or * without modifications. * * Reference: http://www.fpdf.org/en/script/script37.php */ function Ns(r, e) { var n, a, c, o; if (r !== n) { for (var l = (c = r, o = 1 + (256 / r.length >> 0), new Array(o + 1).join(c)), h = [], f = 0; f < 256; f++) h[f] = f; var g = 0; for (f = 0; f < 256; f++) { var y = h[f]; g = (g + y + l.charCodeAt(f)) % 256, h[f] = h[g], h[g] = y; } n = r, a = h; } else h = a; var w = e.length, S = 0, p = 0, O = ""; for (f = 0; f < w; f++) p = (p + (y = h[S = (S + 1) % 256])) % 256, h[S] = h[p], h[p] = y, l = h[(h[S] + h[p]) % 256], O += String.fromCharCode(e.charCodeAt(f) ^ l); return O; } /** * @license * Licensed under the MIT License. * http://opensource.org/licenses/mit-license * Author: Owen Leong (@owenl131) * Date: 15 Oct 2020 * References: * https://www.cs.cmu.edu/~dst/Adobe/Gallery/anon21jul01-pdf-encryption.txt * https://github.com/foliojs/pdfkit/blob/master/lib/security.js * http://www.fpdf.org/en/script/script37.php */ var cc = { print: 4, modify: 8, copy: 16, "annot-forms": 32 }; function Pi(r, e, n, a) { this.v = 1, this.r = 2; var c = 192; r.forEach(function(h) { if (cc.perm !== void 0) throw new Error("Invalid permission: " + h); c += cc[h]; }), this.padding = "(¿N^NuŠAd\0NVÿú\b..\0¶Ðh>€/\f©þdSiz"; var o = (e + this.padding).substr(0, 32), l = (n + this.padding).substr(0, 32); this.O = this.processOwnerPassword(o, l), this.P = -(1 + (255 ^ c)), this.encryptionKey = Ls(o + this.O + this.lsbFirstWord(this.P) + this.hexToBytes(a)).substr(0, 5), this.U = Ns(this.encryptionKey, this.padding); } function ki(r) { if (/[^\u0000-\u00ff]/.test(r)) throw new Error("Invalid PDF Name Object: " + r + ", Only accept ASCII characters."); for (var e = "", n = r.length, a = 0; a < n; a++) { var c = r.charCodeAt(a); c < 33 || c === 35 || c === 37 || c === 40 || c === 41 || c === 47 || c === 60 || c === 62 || c === 91 || c === 93 || c === 123 || c === 125 || c > 126 ? e += "#" + ("0" + c.toString(16)).slice(-2) : e += r[a]; } return e; } function uc(r) { if (fe(r) !== "object") throw new Error("Invalid Context passed to initialize PubSub (jsPDF-module)"); var e = {}; this.subscribe = function(n, a, c) { if (c = c || !1, typeof n != "string" || typeof a != "function" || typeof c != "boolean") throw new Error("Invalid arguments passed to PubSub.subscribe (jsPDF-module)"); e.hasOwnProperty(n) || (e[n] = {}); var o = Math.random().toString(35); return e[n][o] = [a, !!c], o; }, this.unsubscribe = function(n) { for (var a in e) if (e[a][n]) return delete e[a][n], Object.keys(e[a]).length === 0 && delete e[a], !0; return !1; }, this.publish = function(n) { if (e.hasOwnProperty(n)) { var a = Array.prototype.slice.call(arguments, 1), c = []; for (var o in e[n]) { var l = e[n][o]; try { l[0].apply(r, a); } catch (h) { Ut.console && ve.error("jsPDF PubSub Error", h.message, h); } l[1] && c.push(o); } c.length && c.forEach(this.unsubscribe); } }, this.getTopics = function() { return e; }; } function fo(r) { if (!(this instanceof fo)) return new fo(r); var e = "opacity,stroke-opacity".split(","); for (var n in r) r.hasOwnProperty(n) && e.indexOf(n) >= 0 && (this[n] = r[n]); this.id = "", this.objectNumber = -1; } function Mc(r, e) { this.gState = r, this.matrix = e, this.id = "", this.objectNumber = -1; } function Jr(r, e, n, a, c) { if (!(this instanceof Jr)) return new Jr(r, e, n, a, c); this.type = r === "axial" ? 2 : 3, this.coords = e, this.colors = n, Mc.call(this, a, c); } function Fi(r, e, n, a, c) { if (!(this instanceof Fi)) return new Fi(r, e, n, a, c); this.boundingBox = r, this.xStep = e, this.yStep = n, this.stream = "", this.cloneIndex = 0, Mc.call(this, a, c); } function Ht(r) { var e, n = typeof arguments[0] == "string" ? arguments[0] : "p", a = arguments[1], c = arguments[2], o = arguments[3], l = [], h = 1, f = 16, g = "S", y = null; fe(r = r || {}) === "object" && (n = r.orientation, a = r.unit || a, c = r.format || c, o = r.compress || r.compressPdf || o, (y = r.encryption || null) !== null && (y.userPassword = y.userPassword || "", y.ownerPassword = y.ownerPassword || "", y.userPermissions = y.userPermissions || []), h = typeof r.userUnit == "number" ? Math.abs(r.userUnit) : 1, r.precision !== void 0 && (e = r.precision), r.floatPrecision !== void 0 && (f = r.floatPrecision), g = r.defaultPathOperation || "S"), l = r.filters || (o === !0 ? ["FlateEncode"] : l), a = a || "mm", n = ("" + (n || "P")).toLowerCase(); var w = r.putOnlyUsedFonts || !1, S = {}, p = { internal: {}, __private__: {} }; p.__private__.PubSub = uc; var O = "1.3", F = p.__private__.getPdfVersion = function() { return O; }; p.__private__.setPdfVersion = function(s) { O = s; }; var q = { a0: [2383.94, 3370.39], a1: [1683.78, 2383.94], a2: [1190.55, 1683.78], a3: [841.89, 1190.55], a4: [595.28, 841.89], a5: [419.53, 595.28], a6: [297.64, 419.53], a7: [209.76, 297.64], a8: [147.4, 209.76], a9: [104.88, 147.4], a10: [73.7, 104.88], b0: [2834.65, 4008.19], b1: [2004.09, 2834.65], b2: [1417.32, 2004.09], b3: [1000.63, 1417.32], b4: [708.66, 1000.63], b5: [498.9, 708.66], b6: [354.33, 498.9], b7: [249.45, 354.33], b8: [175.75, 249.45], b9: [124.72, 175.75], b10: [87.87, 124.72], c0: [2599.37, 3676.54], c1: [1836.85, 2599.37], c2: [1298.27, 1836.85], c3: [918.43, 1298.27], c4: [649.13, 918.43], c5: [459.21, 649.13], c6: [323.15, 459.21], c7: [229.61, 323.15], c8: [161.57, 229.61], c9: [113.39, 161.57], c10: [79.37, 113.39], dl: [311.81, 623.62], letter: [612, 792], "government-letter": [576, 756], legal: [612, 1008], "junior-legal": [576, 360], ledger: [1224, 792], tabloid: [792, 1224], "credit-card": [153, 243] }; p.__private__.getPageFormats = function() { return q; }; var _ = p.__private__.getPageFormat = function(s) { return q[s]; }; c = c || "a4"; var M = { COMPAT: "compat", ADVANCED: "advanced" }, Y = M.COMPAT; function ot() { this.saveGraphicsState(), E(new Tt(jt, 0, 0, -jt, 0, mr() * jt).toString() + " cm"), this.setFontSize(this.getFontSize() / jt), g = "n", Y = M.ADVANCED; } function ut() { this.restoreGraphicsState(), g = "S", Y = M.COMPAT; } var wt = p.__private__.combineFontStyleAndFontWeight = function(s, v) { if (s == "bold" && v == "normal" || s == "bold" && v == 400 || s == "normal" && v == "italic" || s == "bold" && v == "italic") throw new Error("Invalid Combination of fontweight and fontstyle"); return v && (s = v == 400 || v === "normal" ? s === "italic" ? "italic" : "normal" : v != 700 && v !== "bold" || s !== "normal" ? (v == 700 ? "bold" : v) + "" + s : "bold"), s; }; p.advancedAPI = function(s) { var v = Y === M.COMPAT; return v && ot.call(this), typeof s != "function" || (s(this), v && ut.call(this)), this; }, p.compatAPI = function(s) { var v = Y === M.ADVANCED; return v && ut.call(this), typeof s != "function" || (s(this), v && ot.call(this)), this; }, p.isAdvancedAPI = function() { return Y === M.ADVANCED; }; var tt, z = function(s) { if (Y !== M.ADVANCED) throw new Error(s + " is only available in 'advanced' API mode. You need to call advancedAPI() first."); }, rt = p.roundToPrecision = p.__private__.roundToPrecision = function(s, v) { var j = e || v; if (isNaN(s) || isNaN(j)) throw new Error("Invalid argument passed to jsPDF.roundToPrecision"); return s.toFixed(j).replace(/0+$/, ""); }; tt = p.hpf = p.__private__.hpf = typeof f == "number" ? function(s) { if (isNaN(s)) throw new Error("Invalid argument passed to jsPDF.hpf"); return rt(s, f); } : f === "smart" ? function(s) { if (isNaN(s)) throw new Error("Invalid argument passed to jsPDF.hpf"); return rt(s, s > -1 && s < 1 ? 16 : 5); } : function(s) { if (isNaN(s)) throw new Error("Invalid argument passed to jsPDF.hpf"); return rt(s, 16); }; var dt = p.f2 = p.__private__.f2 = function(s) { if (isNaN(s)) throw new Error("Invalid argument passed to jsPDF.f2"); return rt(s, 2); }, P = p.__private__.f3 = function(s) { if (isNaN(s)) throw new Error("Invalid argument passed to jsPDF.f3"); return rt(s, 3); }, k = p.scale = p.__private__.scale = function(s) { if (isNaN(s)) throw new Error("Invalid argument passed to jsPDF.scale"); return Y === M.COMPAT ? s * jt : Y === M.ADVANCED ? s : void 0; }, W = function(s) { return Y === M.COMPAT ? mr() - s : Y === M.ADVANCED ? s : void 0; }, D = function(s) { return k(W(s)); }; p.__private__.setPrecision = p.setPrecision = function(s) { typeof parseInt(s, 10) == "number" && (e = parseInt(s, 10)); }; var st, it = "00000000000000000000000000000000", lt = p.__private__.getFileId = function() { return it; }, $ = p.__private__.setFileId = function(s) { return it = s !== void 0 && /^[a-fA-F0-9]{32}$/.test(s) ? s.toUpperCase() : it.split("").map(function() { return "ABCDEF0123456789".charAt(Math.floor(16 * Math.random())); }).join(""), y !== null && (Ye = new Pi(y.userPermissions, y.userPassword, y.ownerPassword, it)), it; }; p.setFileId = function(s) { return $(s), this; }, p.getFileId = function() { return lt(); }; var ht = p.__private__.convertDateToPDFDate = function(s) { var v = s.getTimezoneOffset(), j = v < 0 ? "+" : "-", R = Math.floor(Math.abs(v / 60)), X = Math.abs(v % 60), ct = [j, B(R), "'", B(X), "'"].join(""); return ["D:", s.getFullYear(), B(s.getMonth() + 1), B(s.getDate()), B(s.getHours()), B(s.getMinutes()), B(s.getSeconds()), ct].join(""); }, pt = p.__private__.convertPDFDateToDate = function(s) { var v = parseInt(s.substr(2, 4), 10), j = parseInt(s.substr(6, 2), 10) - 1, R = parseInt(s.substr(8, 2), 10), X = parseInt(s.substr(10, 2), 10), ct = parseInt(s.substr(12, 2), 10), yt = parseInt(s.substr(14, 2), 10); return new Date(v, j, R, X, ct, yt, 0); }, It = p.__private__.setCreationDate = function(s) { var v; if (s === void 0 && (s = /* @__PURE__ */ new Date()), s instanceof Date) v = ht(s); else { if (!/^D:(20[0-2][0-9]|203[0-7]|19[7-9][0-9])(0[0-9]|1[0-2])([0-2][0-9]|3[0-1])(0[0-9]|1[0-9]|2[0-3])(0[0-9]|[1-5][0-9])(0[0-9]|[1-5][0-9])(\+0[0-9]|\+1[0-4]|-0[0-9]|-1[0-1])'(0[0-9]|[1-5][0-9])'?$/.test(s)) throw new Error("Invalid argument passed to jsPDF.setCreationDate"); v = s; } return st = v; }, N = p.__private__.getCreationDate = function(s) { var v = st; return s === "jsDate" && (v = pt(st)), v; }; p.setCreationDate = function(s) { return It(s), this; }, p.getCreationDate = function(s) { return N(s); }; var C, B = p.__private__.padd2 = function(s) { return ("0" + parseInt(s)).slice(-2); }, T = p.__private__.padd2Hex = function(s) { return ("00" + (s = s.toString())).substr(s.length); }, J = 0, Q = [], et = [], nt = 0, At = [], Nt = [], Ft = !1, _t = et, zt = function() { J = 0, nt = 0, et = [], Q = [], At = [], rr = Me(), Fn = Me(); }; p.__private__.setCustomOutputDestination = function(s) { Ft = !0, _t = s; }; var ft = function(s) { Ft || (_t = s); }; p.__private__.resetCustomOutputDestination = function() { Ft = !1, _t = et; }; var E = p.__private__.out = function(s) { return s = s.toString(), nt += s.length + 1, _t.push(s), _t; }, Kt = p.__private__.write = function(s) { return E(arguments.length === 1 ? s.toString() : Array.prototype.join.call(arguments, " ")); }, Et = p.__private__.getArrayBuffer = function(s) { for (var v = s.length, j = new ArrayBuffer(v), R = new Uint8Array(j); v--; ) R[v] = s.charCodeAt(v); return j; }, Lt = [["Helvetica", "helvetica", "normal", "WinAnsiEncoding"], ["Helvetica-Bold", "helvetica", "bold", "WinAnsiEncoding"], ["Helvetica-Oblique", "helvetica", "italic", "WinAnsiEncoding"], ["Helvetica-BoldOblique", "helvetica", "bolditalic", "WinAnsiEncoding"], ["Courier", "courier", "normal", "WinAnsiEncoding"], ["Courier-Bold", "courier", "bold", "WinAnsiEncoding"], ["Courier-Oblique", "courier", "italic", "WinAnsiEncoding"], ["Courier-BoldOblique", "courier", "bolditalic", "WinAnsiEncoding"], ["Times-Roman", "times", "normal", "WinAnsiEncoding"], ["Times-Bold", "times", "bold", "WinAnsiEncoding"], ["Times-Italic", "times", "italic", "WinAnsiEncoding"], ["Times-BoldItalic", "times", "bolditalic", "WinAnsiEncoding"], ["ZapfDingbats", "zapfdingbats", "normal", null], ["Symbol", "symbol", "normal", null]]; p.__private__.getStandardFonts = function() { return Lt; }; var xt = r.fontSize || 16; p.__private__.setFontSize = p.setFontSize = function(s) { return xt = Y === M.ADVANCED ? s / jt : s, this; }; var Ct, kt = p.__private__.getFontSize = p.getFontSize = function() { return Y === M.COMPAT ? xt : xt * jt; }, qt = r.R2L || !1; p.__private__.setR2L = p.setR2L = function(s) { return qt = s, this; }, p.__private__.getR2L = p.getR2L = function() { return qt; }; var Gt, Qt = p.__private__.setZoomMode = function(s) { var v = [void 0, null, "fullwidth", "fullheight", "fullpage", "original"]; if (/^(?:\d+\.\d*|\d*\.\d+|\d+)%$/.test(s)) Ct = s; else if (isNaN(s)) { if (v.indexOf(s) === -1) throw new Error('zoom must be Integer (e.g. 2), a percentage Value (e.g. 300%) or fullwidth, fullheight, fullpage, original. "' + s + '" is not recognized.'); Ct = s; } else Ct = parseInt(s, 10); }; p.__private__.getZoomMode = function() { return Ct; }; var te, ie = p.__private__.setPageMode = function(s) { if ([void 0, null, "UseNone", "UseOutlines", "UseThumbs", "FullScreen"].indexOf(s) == -1) throw new Error('Page mode must be one of UseNone, UseOutlines, UseThumbs, or FullScreen. "' + s + '" is not recognized.'); Gt = s; }; p.__private__.getPageMode = function() { return Gt; }; var de = p.__private__.setLayoutMode = function(s) { if ([void 0, null, "continuous", "single", "twoleft", "tworight", "two"].indexOf(s) == -1) throw new Error('Layout mode must be one of continuous, single, twoleft, tworight. "' + s + '" is not recognized.'); te = s; }; p.__private__.getLayoutMode = function() { return te; }, p.__private__.setDisplayMode = p.setDisplayMode = function(s, v, j) { return Qt(s), de(v), ie(j), this; }; var Wt = { title: "", subject: "", author: "", keywords: "", creator: "" }; p.__private__.getDocumentProperty = function(s) { if (Object.keys(Wt).indexOf(s) === -1) throw new Error("Invalid argument passed to jsPDF.getDocumentProperty"); return Wt[s]; }, p.__private__.getDocumentProperties = function() { return Wt; }, p.__private__.setDocumentProperties = p.setProperties = p.setDocumentProperties = function(s) { for (var v in Wt) Wt.hasOwnProperty(v) && s[v] && (Wt[v] = s[v]); return this; }, p.__private__.setDocumentProperty = function(s, v) { if (Object.keys(Wt).indexOf(s) === -1) throw new Error("Invalid arguments passed to jsPDF.setDocumentProperty"); return Wt[s] = v; }; var ee, jt, Je, oe, _n, ge = {}, Le = {}, Un = [], ce = {}, Or = {}, Ae = {}, Pn = {}, nr = null, xe = 0, Jt = [], ue = new uc(p), Mr = r.hotfixes || [], We = {}, Hn = {}, Wn = [], Tt = function s(v, j, R, X, ct, yt) { if (!(this instanceof s)) return new s(v, j, R, X, ct, yt); isNaN(v) && (v = 1), isNaN(j) && (j = 0), isNaN(R) && (R = 0), isNaN(X) && (X = 1), isNaN(ct) && (ct = 0), isNaN(yt) && (yt = 0), this._matrix = [v, j, R, X, ct, yt]; }; Object.defineProperty(Tt.prototype, "sx", { get: function() { return this._matrix[0]; }, set: function(s) { this._matrix[0] = s; } }), Object.defineProperty(Tt.prototype, "shy", { get: function() { return this._matrix[1]; }, set: function(s) { this._matrix[1] = s; } }), Object.defineProperty(Tt.prototype, "shx", { get: function() { return this._matrix[2]; }, set: function(s) { this._matrix[2] = s; } }), Object.defineProperty(Tt.prototype, "sy", { get: function() { return this._matrix[3]; }, set: function(s) { this._matrix[3] = s; } }), Object.defineProperty(Tt.prototype, "tx", { get: function() { return this._matrix[4]; }, set: function(s) { this._matrix[4] = s; } }), Object.defineProperty(Tt.prototype, "ty", { get: function() { return this._matrix[5]; }, set: function(s) { this._matrix[5] = s; } }), Object.defineProperty(Tt.prototype, "a", { get: function() { return this._matrix[0]; }, set: function(s) { this._matrix[0] = s; } }), Object.defineProperty(Tt.prototype, "b", { get: function() { return this._matrix[1]; }, set: function(s) { this._matrix[1] = s; } }), Object.defineProperty(Tt.prototype, "c", { get: function() { return this._matrix[2]; }, set: function(s) { this._matrix[2] = s; } }), Object.defineProperty(Tt.prototype, "d", { get: function() { return this._matrix[3]; }, set: function(s) { this._matrix[3] = s; } }), Object.defineProperty(Tt.prototype, "e", { get: function() { return this._matrix[4]; }, set: function(s) { this._matrix[4] = s; } }), Object.defineProperty(Tt.prototype, "f", { get: function() { return this._matrix[5]; }, set: function(s) { this._matrix[5] = s; } }), Object.defineProperty(Tt.prototype, "rotation", { get: function() { return Math.atan2(this.shx, this.sx); } }), Object.defineProperty(Tt.prototype, "scaleX", { get: function() { return this.decompose().scale.sx; } }), Object.defineProperty(Tt.prototype, "scaleY", { get: function() { return this.decompose().scale.sy; } }), Object.defineProperty(Tt.prototype, "isIdentity", { get: function() { return this.sx === 1 && this.shy === 0 && this.shx === 0 && this.sy === 1 && this.tx === 0 && this.ty === 0; } }), Tt.prototype.join = function(s) { return [this.sx, this.shy, this.shx, this.sy, this.tx, this.ty].map(tt).join(s); }, Tt.prototype.multiply = function(s) { var v = s.sx * this.sx + s.shy * this.shx, j = s.sx * this.shy + s.shy * this.sy, R = s.shx * this.sx + s.sy * this.shx, X = s.shx * this.shy + s.sy * this.sy, ct = s.tx * this.sx + s.ty * this.shx + this.tx, yt = s.tx * this.shy + s.ty * this.sy + this.ty; return new Tt(v, j, R, X, ct, yt); }, Tt.prototype.decompose = function() { var s = this.sx, v = this.shy, j = this.shx, R = this.sy, X = this.tx, ct = this.ty, yt = Math.sqrt(s * s + v * v), Ot = (s /= yt) * j + (v /= yt) * R; j -= s * Ot, R -= v * Ot; var Dt = Math.sqrt(j * j + R * R); return Ot /= Dt, s * (R /= Dt) < v * (j /= Dt) && (s = -s, v = -v, Ot = -Ot, yt = -yt), { scale: new Tt(yt, 0, 0, Dt, 0, 0), translate: new Tt(1, 0, 0, 1, X, ct), rotate: new Tt(s, v, -v, s, 0, 0), skew: new Tt(1, 0, Ot, 1, 0, 0) }; }, Tt.prototype.toString = function(s) { return this.join(" "); }, Tt.prototype.inversed = function() { var s = this.sx, v = this.shy, j = this.shx, R = this.sy, X = this.tx, ct = this.ty, yt = 1 / (s * R - v * j), Ot = R