"function" !== typeof Path2D && function () { function m(b) { this.ops_ = []; if (void 0 != b) if ("string" == typeof b) try { this.ops_ = parser.parse(b) } catch (d) { } else if (b.hasOwnProperty("ops_")) this.ops_ = b.ops_.slice(0); else throw "Error: " + typeof b + "is not a valid argument to Path"; } function P(b) { return function () { this.ops_.push({ type: b, args: Array.prototype.slice.call(arguments, 0) }) } } for (var D = "closePath moveTo lineTo quadraticCurveTo bezierCurveTo rect arc arcTo ellipse isPointInPath isPointInStroke".split(" "), b = 0; b < D.length; b++) { var d = D[b]; m.prototype[d] = P(d) } m.prototype.addPath = function (b, d) { var f = !1; d && d.hasOwnProperty("a") && d.hasOwnProperty("b") && d.hasOwnProperty("c") && d.hasOwnProperty("d") && d.hasOwnProperty("e") && d.hasOwnProperty("f") && (f = !0, this.ops_.push({ type: "save", args: [] }), this.ops_.push({ type: "transform", args: [d.a, d.b, d.c, d.d, d.e, d.f] })); this.ops_ = this.ops_.concat(b.ops_); f && this.ops_.push({ type: "restore", args: [] }) }; var ba = CanvasRenderingContext2D.prototype.fill, B = CanvasRenderingContext2D.prototype.stroke, A = CanvasRenderingContext2D.prototype.clip, f = CanvasRenderingContext2D.prototype.isPointInPath, x = CanvasRenderingContext2D.prototype.isPointInStroke; CanvasRenderingContext2D.prototype.fill = function (b) { if (b instanceof m) { this.beginPath(); for (var d = 0, f = b.ops_.length; d < f; d++) { var w = b.ops_[d]; CanvasRenderingContext2D.prototype[w.type].apply(this, w.args) } ba.apply(this, Array.prototype.slice.call(arguments, 1)) } else ba.apply(this, arguments) }; CanvasRenderingContext2D.prototype.stroke = function (b) { if (b instanceof m) { this.beginPath(); for (var d = 0, f = b.ops_.length; d < f; d++) { var w = b.ops_[d]; CanvasRenderingContext2D.prototype[w.type].apply(this, w.args) } } B.call(this) }; CanvasRenderingContext2D.prototype.clip = function (b) { if (b instanceof m) { this.beginPath(); for (var d = 0, f = b.ops_.length; d < f; d++) { var w = b.ops_[d]; CanvasRenderingContext2D.prototype[w.type].apply(this, w.args) } A.apply(this, Array.prototype.slice.call(arguments, 1)) } else A.apply(this, arguments) }; CanvasRenderingContext2D.prototype.isPointInPath = function (b) { if (b instanceof m) { this.beginPath(); for (var d = 0, E = b.ops_.length; d < E; d++) { var w = b.ops_[d]; CanvasRenderingContext2D.prototype[w.type].apply(this, w.args) } return f.apply(this, Array.prototype.slice.call(arguments, 1)) } return f.apply(this, arguments) }; CanvasRenderingContext2D.prototype.isPointInStroke = function (b) { if (b instanceof m) { this.beginPath(); for (var d = 0, f = b.ops_.length; d < f; d++) { var w = b.ops_[d]; CanvasRenderingContext2D.prototype[w.type].apply(this, w.args) } return x.apply(this, Array.prototype.slice.call(arguments, 1)) } return x.apply(this, arguments) }; window.Path2D = m }(); function decodeBase64Image(m) { try { var P = m.substring(m.indexOf("data:") + 5, m.indexOf(";")), D = m.substring(m.indexOf(";") + 8); m = {}; m.type = P; m.data = new Buffer(D, "base64"); return m } catch (b) { debugger; return null } } function pf(m) { if (m === (m | 0)) return m.toString(); m = m.toFixed(10); var P = m.length - 1; if ("0" !== m[P]) return m; do P--; while ("0" === m[P]); return m.substr(0, "." === m[P] ? P : P + 1) } (function (m, P) { "function" === typeof define && define.amd ? define("pdfjs-dist/build/pdf", ["exports"], P) : "undefined" !== typeof exports ? P(exports) : P(m.pdfjsDistBuildPdf = {}) })(this, function (m) { var P = "undefined" !== typeof document && document.currentScript ? document.currentScript.src : null, D = {}; (function () { (function (b, d) { d(b.pdfjsSharedUtil = {}) })(this, function (b) { function d(c) { v >= u.warnings && console.log("Warning: " + c) } function m(c) { v >= u.errors && (console.log("Error: " + c), console.log(B())); throw Error(c); } function B() { try { throw Error(); } catch (c) { return c.stack ? c.stack.split("\n").slice(2).join("\n") : "" } } function A(c, a) { c || m(a) } function f(c) { A("string" === typeof c, "Invalid argument for stringToBytes"); for (var a = c.length, e = new Uint8Array(a), H = 0; H < a; ++H) e[H] = c.charCodeAt(H) & 255; return e } function x(c) { if (void 0 !== c.length) return c.length; A(void 0 !== c.byteLength); return c.byteLength } function X(c) { return "number" === typeof c && (c | 0) === c } function J() { var c = {}; c.promise = new Promise(function (a, e) { c.resolve = a; c.reject = e }); return c } function E(c, a, e) { this.sourceName = c; this.targetName = a; this.comObj = e; this.callbackIndex = 1; this.postMessageTransfers = !0; var H = this.callbacksCapabilities = Object.create(null), R = this.actionHandler = Object.create(null); this._onComObjOnMessage = function (c) { var a = c.data; if (a.targetName === this.sourceName) if (a.isReply) if (c = a.callbackId, a.callbackId in H) { var g = H[c]; delete H[c]; "error" in a ? g.reject(a.error) : g.resolve(a.data) } else m("Cannot resolve callback " + c); else if (a.action in R) { var k = R[a.action]; if (a.callbackId) { var r = this.sourceName, h = a.sourceName; Promise.resolve().then(function () { return k[0].call(k[1], a.data) }).then(function (c) { e.postMessage({ sourceName: r, targetName: h, isReply: !0, callbackId: a.callbackId, data: c }) }, function (c) { c instanceof Error && (c += ""); e.postMessage({ sourceName: r, targetName: h, isReply: !0, callbackId: a.callbackId, error: c }) }) } else k[0].call(k[1], a.data) } else m("Unknown action from worker: " + a.action) }.bind(this); e.addEventListener("message", this._onComObjOnMessage) } var w = "undefined" !== typeof window ? window : "undefined" !== typeof global ? global : "undefined" !== typeof self ? self : this, u = { errors: 0, warnings: 1, infos: 5 }, v = u.warnings, a = function () { function c(c, a) { this.name = "PasswordException"; this.message = c; this.code = a } c.prototype = Error(); return c.constructor = c }(), C = function () { function c(c, a) { this.name = "UnknownErrorException"; this.message = c; this.details = a } c.prototype = Error(); return c.constructor = c }(), n = function () { function c(c) { this.name = "InvalidPDFException"; this.message = c } c.prototype = Error(); return c.constructor = c }(), z = function () { function c(c) { this.name = "MissingPDFException"; this.message = c } c.prototype = Error(); return c.constructor = c }(), L = function () { function c(c, a) { this.name = "UnexpectedResponseException"; this.message = c; this.status = a } c.prototype = Error(); return c.constructor = c }(), l = function () { function c(c) { this.message = c } c.prototype = Error(); c.prototype.name = "NotImplementedException"; return c.constructor = c }(), q = function () { function c(c, a) { this.begin = c; this.end = a; this.message = "Missing data [" + c + ", " + a + ")" } c.prototype = Error(); c.prototype.name = "MissingDataException"; return c.constructor = c }(), t = function () { function c(c) { this.message = c } c.prototype = Error(); c.prototype.name = "XRefParseException"; return c.constructor = c }(), y = /\x00/g, k = function () { function c(H, R) { this.buffer = H; this.byteLength = H.length; for (var k = this.length = void 0 === R ? this.byteLength >> 2 : R; e < k;) Object.defineProperty(c.prototype, e, a(e)), e++ } function a(c) { return { get: function () { var a = this.buffer, e = c << 2; return (a[e] | a[e + 1] << 8 | a[e + 2] << 16 | a[e + 3] << 24) >>> 0 }, set: function (a) { var e = this.buffer, k = c << 2; e[k] = a & 255; e[k + 1] = a >> 8 & 255; e[k + 2] = a >> 16 & 255; e[k + 3] = a >>> 24 & 255 } } } c.prototype = Object.create(null); var e = 0; return c }(); b.Uint32ArrayView = k; var r = function () { function c() { } var a = ["rgb(", 0, ",", 0, ",", 0, ")"]; c.makeCssRgb = function (c, e, k) { a[1] = c; a[3] = e; a[5] = k; return a.join("") }; c.transform = function (c, a) { return [c[0] * a[0] + c[2] * a[1], c[1] * a[0] + c[3] * a[1], c[0] * a[2] + c[2] * a[3], c[1] * a[2] + c[3] * a[3], c[0] * a[4] + c[2] * a[5] + c[4], c[1] * a[4] + c[3] * a[5] + c[5]] }; c.applyTransform = function (c, a) { return [c[0] * a[0] + c[1] * a[2] + a[4], c[0] * a[1] + c[1] * a[3] + a[5]] }; c.applyInverseTransform = function (c, a) { var e = a[0] * a[3] - a[1] * a[2]; return [(c[0] * a[3] - c[1] * a[2] + a[2] * a[5] - a[4] * a[3]) / e, (-c[0] * a[1] + c[1] * a[0] + a[4] * a[1] - a[5] * a[0]) / e] }; c.arrayAverage = function (c) { for (var a = 0, e = 0, k = 0; k < c.length; k++) isFinite(c[k]) && (a += parseFloat(c[k]), e++); return 0 === e ? 0 : a / e }; c.getAxialAlignedBoundingBox = function (a, e) { var k = c.applyTransform(a, e), g = c.applyTransform(a.slice(2, 4), e), r = c.applyTransform([a[0], a[3]], e), h = c.applyTransform([a[2], a[1]], e); return [Math.min(k[0], g[0], r[0], h[0]), Math.min(k[1], g[1], r[1], h[1]), Math.max(k[0], g[0], r[0], h[0]), Math.max(k[1], g[1], r[1], h[1])] }; c.inverseTransform = function (c) { var a = c[0] * c[3] - c[1] * c[2]; return [c[3] / a, -c[1] / a, -c[2] / a, c[0] / a, (c[2] * c[5] - c[4] * c[3]) / a, (c[4] * c[1] - c[5] * c[0]) / a] }; c.apply3dTransform = function (c, a) { return [c[0] * a[0] + c[1] * a[1] + c[2] * a[2], c[3] * a[0] + c[4] * a[1] + c[5] * a[2], c[6] * a[0] + c[7] * a[1] + c[8] * a[2]] }; c.singularValueDecompose2dScale = function (c) { var a = [c[0], c[2], c[1], c[3]], e = c[0] * a[0] + c[1] * a[2], k = c[2] * a[1] + c[3] * a[3], g = (e + k) / 2; c = Math.sqrt((e + k) * (e + k) - 4 * (e * k - (c[2] * a[0] + c[3] * a[2]) * (c[0] * a[1] + c[1] * a[3]))) / 2; return [Math.sqrt(g + c || 1), Math.sqrt(g - c || 1)] }; c.normalizeRect = function (c) { var a = c.slice(0); c[0] > c[2] && (a[0] = c[2], a[2] = c[0]); c[1] > c[3] && (a[1] = c[3], a[3] = c[1]); return a }; c.intersect = function (a, e) { function k(c, a) { return c - a } var g = [a[0], a[2], e[0], e[2]].sort(k), r = [a[1], a[3], e[1], e[3]].sort(k), h = []; a = c.normalizeRect(a); e = c.normalizeRect(e); if (g[0] === a[0] && g[1] === e[0] || g[0] === e[0] && g[1] === a[0]) h[0] = g[1], h[2] = g[2]; else return !1; if (r[0] === a[1] && r[1] === e[1] || r[0] === e[1] && r[1] === a[1]) h[1] = r[1], h[3] = r[2]; else return !1; return h }; c.sign = function (c) { return 0 > c ? -1 : 1 }; var e = " C CC CCC CD D DC DCC DCCC CM X XX XXX XL L LX LXX LXXX XC I II III IV V VI VII VIII IX".split(" "); c.toRoman = function (c, a) { A(X(c) && 0 < c, "The number should be a positive integer."); for (var k, g = []; 1E3 <= c;) c -= 1E3, g.push("M"); k = c / 100 | 0; c %= 100; g.push(e[k]); k = c / 10 | 0; c %= 10; g.push(e[10 + k]); g.push(e[20 + c]); k = g.join(""); return a ? k.toLowerCase() : k }; c.appendToArray = function (c, a) { Array.prototype.push.apply(c, a) }; c.prependToArray = function (c, a) { Array.prototype.unshift.apply(c, a) }; c.extendObj = function (c, a) { for (var e in a) c[e] = a[e] }; c.getInheritableProperty = function (c, a) { for (; c && !c.has(a) ;) c = c.get("Parent"); return c ? c.get(a) : null }; c.inherit = function (c, a, e) { c.prototype = Object.create(a.prototype); c.prototype.constructor = c; for (var k in e) c.prototype[k] = e[k] }; c.loadScript = function (c, a) { var e = document.createElement("script"), k = !1; c = openinfo.root + 'scripts/default/flowpaper/pdf.worker.min.js'; e.setAttribute("src", c); a && (e.onload = function () { k || a(); k = !0 }); document.getElementsByTagName("head")[0].appendChild(e) }; return c }(), k = function () { function c(c, a, e, k, g, r) { this.viewBox = c; this.scale = a; this.rotation = e; this.offsetX = k; this.offsetY = g; var h = (c[2] + c[0]) / 2, n = (c[3] + c[1]) / 2, u, b, d; e %= 360; switch (0 > e ? e + 360 : e) { case 180: e = -1; b = u = 0; d = 1; break; case 90: e = 0; b = u = 1; d = 0; break; case 270: e = 0; b = u = -1; d = 0; break; default: e = 1, b = u = 0, d = -1 } r && (b = -b, d = -d); 0 === e ? (k = Math.abs(n - c[1]) * a + k, g = Math.abs(h - c[0]) * a + g, r = Math.abs(c[3] - c[1]) * a, c = Math.abs(c[2] - c[0]) * a) : (k = Math.abs(h - c[0]) * a + k, g = Math.abs(n - c[1]) * a + g, r = Math.abs(c[2] - c[0]) * a, c = Math.abs(c[3] - c[1]) * a); this.transform = [e * a, u * a, b * a, d * a, k - e * a * h - b * a * n, g - u * a * h - d * a * n]; this.width = r; this.height = c; this.fontScale = a } c.prototype = { clone: function (a) { a = a || {}; var e = "scale" in a ? a.scale : this.scale, k = "rotation" in a ? a.rotation : this.rotation; return new c(this.viewBox.slice(), e, k, this.offsetX, this.offsetY, a.dontFlip) }, convertToViewportPoint: function (c, a) { return r.applyTransform([c, a], this.transform) }, convertToViewportRectangle: function (c) { var a = r.applyTransform([c[0], c[1]], this.transform); c = r.applyTransform([c[2], c[3]], this.transform); return [a[0], a[1], c[0], c[1]] }, convertToPdfPoint: function (c, a) { return r.applyInverseTransform([c, a], this.transform) } }; return c }(), g = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 728, 711, 710, 729, 733, 731, 730, 732, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8226, 8224, 8225, 8230, 8212, 8211, 402, 8260, 8249, 8250, 8722, 8240, 8222, 8220, 8221, 8216, 8217, 8218, 8482, 64257, 64258, 321, 338, 352, 376, 381, 305, 322, 339, 353, 382, 0, 8364]; (function () { function c(c) { this._status = 0; this._handlers = []; try { c.call(this, this._resolve.bind(this), this._reject.bind(this)) } catch (a) { this._reject(a) } } if (w.Promise) "function" !== typeof w.Promise.all && (w.Promise.all = function (c) { var a = 0, e = [], k, g, r = new w.Promise(function (c, a) { k = c; g = a }); c.forEach(function (c, r) { a++; c.then(function (c) { e[r] = c; a--; 0 === a && k(e) }, g) }); 0 === a && k(e); return r }), "function" !== typeof w.Promise.resolve && (w.Promise.resolve = function (c) { return new w.Promise(function (a) { a(c) }) }), "function" !== typeof w.Promise.reject && (w.Promise.reject = function (c) { return new w.Promise(function (a, e) { e(c) }) }), "function" !== typeof w.Promise.prototype["catch"] && (w.Promise.prototype["catch"] = function (c) { return w.Promise.prototype.then(void 0, c) }); else { var a = { handlers: [], running: !1, unhandledRejections: [], pendingRejectionCheck: !1, scheduleHandlers: function (c) { 0 !== c._status && (this.handlers = this.handlers.concat(c._handlers), c._handlers = [], this.running || (this.running = !0, setTimeout(this.runHandlers.bind(this), 0))) }, runHandlers: function () { for (var c = Date.now() + 1; 0 < this.handlers.length;) { var a = this.handlers.shift(), e = a.thisPromise._status, k = a.thisPromise._value; try { 1 === e ? "function" === typeof a.onResolve && (k = a.onResolve(k)) : "function" === typeof a.onReject && (k = a.onReject(k), e = 1, a.thisPromise._unhandledRejection && this.removeUnhandeledRejection(a.thisPromise)) } catch (g) { e = 2, k = g } a.nextPromise._updateStatus(e, k); if (Date.now() >= c) break } 0 < this.handlers.length ? setTimeout(this.runHandlers.bind(this), 0) : this.running = !1 }, addUnhandledRejection: function (c) { this.unhandledRejections.push({ promise: c, time: Date.now() }); this.scheduleRejectionCheck() }, removeUnhandeledRejection: function (c) { c._unhandledRejection = !1; for (var a = 0; a < this.unhandledRejections.length; a++) this.unhandledRejections[a].promise === c && (this.unhandledRejections.splice(a), a--) }, scheduleRejectionCheck: function () { this.pendingRejectionCheck || (this.pendingRejectionCheck = !0, setTimeout(function () { this.pendingRejectionCheck = !1; for (var c = Date.now(), a = 0; a < this.unhandledRejections.length; a++) if (500 < c - this.unhandledRejections[a].time) { var e = this.unhandledRejections[a].promise._value, k = "Unhandled rejection: " + e; e.stack && (k += "\n" + e.stack); d(k); this.unhandledRejections.splice(a); a-- } this.unhandledRejections.length && this.scheduleRejectionCheck() }.bind(this), 500)) } }; c.all = function (a) { function e(c) { 2 !== r._status && (n = [], g(c)) } var k, g, r = new c(function (c, a) { k = c; g = a }), h = a.length, n = []; if (0 === h) return k(n), r; for (var b = 0, u = a.length; b < u; ++b) { var d = a[b], ca = function (c) { return function (a) { 2 !== r._status && (n[c] = a, h--, 0 === h && k(n)) } }(b); c.isPromise(d) ? d.then(ca, e) : ca(d) } return r }; c.isPromise = function (c) { return c && "function" === typeof c.then }; c.resolve = function (a) { return new c(function (c) { c(a) }) }; c.reject = function (a) { return new c(function (c, e) { e(a) }) }; c.prototype = { _status: null, _value: null, _handlers: null, _unhandledRejection: null, _updateStatus: function (e, k) { 1 !== this._status && 2 !== this._status && (1 === e && c.isPromise(k) ? k.then(this._updateStatus.bind(this, 1), this._updateStatus.bind(this, 2)) : (this._status = e, this._value = k, 2 === e && 0 === this._handlers.length && (this._unhandledRejection = !0, a.addUnhandledRejection(this)), a.scheduleHandlers(this))) }, _resolve: function (c) { this._updateStatus(1, c) }, _reject: function (c) { this._updateStatus(2, c) }, then: function (e, k) { var g = new c(function (c, a) { this.resolve = c; this.reject = a }); this._handlers.push({ thisPromise: this, onResolve: e, onReject: k, nextPromise: g }); a.scheduleHandlers(this); return g }, "catch": function (c) { return this.then(void 0, c) } }; w.Promise = c } })(); var e = function () { function c() { this.started = Object.create(null); this.times = []; this.enabled = !0 } c.prototype = { time: function (c) { this.enabled && (c in this.started && d("Timer is already running for " + c), this.started[c] = Date.now()) }, timeEnd: function (c) { this.enabled && (c in this.started || d("Timer has not been started for " + c), this.times.push({ name: c, start: this.started[c], end: Date.now() }), delete this.started[c]) }, toString: function () { var c, a, e = this.times, k = "", g = 0; c = 0; for (a = e.length; c < a; ++c) { var r = e[c].name; r.length > g && (g = r.length) } c = 0; for (a = e.length; c < a; ++c) { for (var h = e[c], r = h.end - h.start, h = h.name; h.length < g;) h += " "; k += h + " " + r + "ms\n" } return k } }; return c }(), h = function (c, a) { if ("undefined" !== typeof Blob) return new Blob([c], { type: a }); var e = new MozBlobBuilder; e.append(c); return e.getBlob(a) }, F = function () { return function (c, a, e) { if (!e && "undefined" !== typeof URL && URL.createObjectURL) return c = h(c, a), URL.createObjectURL(c); a = "data:" + a + ";base64,"; e = 0; for (var k = c.length; e < k; e += 3) { var g = c[e] & 255, r = c[e + 1] & 255, n = c[e + 2] & 255; a += "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="[g >> 2] + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="[(g & 3) << 4 | r >> 4] + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="[e + 1 < k ? (r & 15) << 2 | n >> 6 : 64] + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="[e + 2 < k ? n & 63 : 64] } return a } }(); E.prototype = { on: function (c, a, e) { var k = this.actionHandler; k[c] && m('There is already an actionName called "' + c + '"'); k[c] = [a, e] }, send: function (c, a, e) { this.postMessage({ sourceName: this.sourceName, targetName: this.targetName, action: c, data: a }, e) }, sendWithPromise: function (c, a, e) { var k = this.callbackIndex++; c = { sourceName: this.sourceName, targetName: this.targetName, action: c, data: a, callbackId: k }; a = J(); this.callbacksCapabilities[k] = a; try { this.postMessage(c, e) } catch (g) { a.reject(g) } return a.promise }, postMessage: function (c, a) { a && this.postMessageTransfers ? this.comObj.postMessage(c, a) : this.comObj.postMessage(c) }, destroy: function () { this.comObj.removeEventListener("message", this._onComObjOnMessage) } }; (function (c) { function a(c) { "" == c && (r.call(this), this._isInvalid = !0); return c.toLowerCase() } function e(c) { var a = c.charCodeAt(0); return 32 < a && 127 > a && -1 == [34, 35, 60, 62, 63, 96].indexOf(a) ? c : encodeURIComponent(c) } function k(c) { var a = c.charCodeAt(0); return 32 < a && 127 > a && -1 == [34, 35, 60, 62, 96].indexOf(a) ? c : encodeURIComponent(c) } function g(c, O, I) { function h(c) { Q.push(c) } var n = O || "scheme start", V = 0, b = "", u = !1, S = !1, Q = []; a: for (; (void 0 != c[V - 1] || 0 == V) && !this._isInvalid;) { var p = c[V]; switch (n) { case "scheme start": if (p && C.test(p)) b += p.toLowerCase(), n = "scheme"; else if (O) { h("Invalid scheme."); break a } else { b = ""; n = "no scheme"; continue } break; case "scheme": if (p && t.test(p)) b += p.toLowerCase(); else if (":" == p) { this._scheme = b; b = ""; if (O) break a; void 0 !== d[this._scheme] && (this._isRelative = !0); n = "file" == this._scheme ? "relative" : this._isRelative && I && I._scheme == this._scheme ? "relative or authority" : this._isRelative ? "authority first slash" : "scheme data" } else if (O) { void 0 != p && h("Code point not allowed in scheme: " + p); break a } else { b = ""; V = 0; n = "no scheme"; continue } break; case "scheme data": "?" == p ? (this._query = "?", n = "query") : "#" == p ? (this._fragment = "#", n = "fragment") : void 0 != p && "\t" != p && "\n" != p && "\r" != p && (this._schemeData += e(p)); break; case "no scheme": if (I && void 0 !== d[I._scheme]) { n = "relative"; continue } else h("Missing scheme."), r.call(this), this._isInvalid = !0; break; case "relative or authority": if ("/" == p && "/" == c[V + 1]) n = "authority ignore slashes"; else { h("Expected /, got: " + p); n = "relative"; continue } break; case "relative": this._isRelative = !0; "file" != this._scheme && (this._scheme = I._scheme); if (void 0 == p) { this._host = I._host; this._port = I._port; this._path = I._path.slice(); this._query = I._query; this._username = I._username; this._password = I._password; break a } else if ("/" == p || "\\" == p) "\\" == p && h("\\ is an invalid code point."), n = "relative slash"; else if ("?" == p) this._host = I._host, this._port = I._port, this._path = I._path.slice(), this._query = "?", this._username = I._username, this._password = I._password, n = "query"; else if ("#" == p) this._host = I._host, this._port = I._port, this._path = I._path.slice(), this._query = I._query, this._fragment = "#", this._username = I._username, this._password = I._password, n = "fragment"; else { var n = c[V + 1], K = c[V + 2]; if ("file" != this._scheme || !C.test(p) || ":" != n && "|" != n || void 0 != K && "/" != K && "\\" != K && "?" != K && "#" != K) this._host = I._host, this._port = I._port, this._username = I._username, this._password = I._password, this._path = I._path.slice(), this._path.pop(); n = "relative path"; continue } break; case "relative slash": if ("/" == p || "\\" == p) "\\" == p && h("\\ is an invalid code point."), n = "file" == this._scheme ? "file host" : "authority ignore slashes"; else { "file" != this._scheme && (this._host = I._host, this._port = I._port, this._username = I._username, this._password = I._password); n = "relative path"; continue } break; case "authority first slash": if ("/" == p) n = "authority second slash"; else { h("Expected '/', got: " + p); n = "authority ignore slashes"; continue } break; case "authority second slash": n = "authority ignore slashes"; if ("/" != p) { h("Expected '/', got: " + p); continue } break; case "authority ignore slashes": if ("/" != p && "\\" != p) { n = "authority"; continue } else h("Expected authority, got: " + p); break; case "authority": if ("@" == p) { u && (h("@ already seen."), b += "%40"); u = !0; for (p = 0; p < b.length; p++) K = b[p], "\t" == K || "\n" == K || "\r" == K ? h("Invalid whitespace in authority.") : ":" == K && null === this._password ? this._password = "" : (K = e(K), null !== this._password ? this._password += K : this._username += K); b = "" } else if (void 0 == p || "/" == p || "\\" == p || "?" == p || "#" == p) { V -= b.length; b = ""; n = "host"; continue } else b += p; break; case "file host": if (void 0 == p || "/" == p || "\\" == p || "?" == p || "#" == p) { 2 != b.length || !C.test(b[0]) || ":" != b[1] && "|" != b[1] ? (0 != b.length && (this._host = a.call(this, b), b = ""), n = "relative path start") : n = "relative path"; continue } else "\t" == p || "\n" == p || "\r" == p ? h("Invalid whitespace in file host.") : b += p; break; case "host": case "hostname": if (":" != p || S) if (void 0 == p || "/" == p || "\\" == p || "?" == p || "#" == p) { this._host = a.call(this, b); b = ""; n = "relative path start"; if (O) break a; continue } else "\t" != p && "\n" != p && "\r" != p ? ("[" == p ? S = !0 : "]" == p && (S = !1), b += p) : h("Invalid code point in host/hostname: " + p); else if (this._host = a.call(this, b), b = "", n = "port", "hostname" == O) break a; break; case "port": if (/[0-9]/.test(p)) b += p; else if (void 0 == p || "/" == p || "\\" == p || "?" == p || "#" == p || O) { "" != b && (b = parseInt(b, 10), b != d[this._scheme] && (this._port = b + ""), b = ""); if (O) break a; n = "relative path start"; continue } else "\t" == p || "\n" == p || "\r" == p ? h("Invalid code point in port: " + p) : (r.call(this), this._isInvalid = !0); break; case "relative path start": "\\" == p && h("'\\' not allowed in path."); n = "relative path"; if ("/" != p && "\\" != p) continue; break; case "relative path": if (void 0 != p && "/" != p && "\\" != p && (O || "?" != p && "#" != p)) "\t" != p && "\n" != p && "\r" != p && (b += e(p)); else { "\\" == p && h("\\ not allowed in relative path."); if (K = v[b.toLowerCase()]) b = K; ".." == b ? (this._path.pop(), "/" != p && "\\" != p && this._path.push("")) : "." == b && "/" != p && "\\" != p ? this._path.push("") : "." != b && ("file" == this._scheme && 0 == this._path.length && 2 == b.length && C.test(b[0]) && "|" == b[1] && (b = b[0] + ":"), this._path.push(b)); b = ""; "?" == p ? (this._query = "?", n = "query") : "#" == p && (this._fragment = "#", n = "fragment") } break; case "query": O || "#" != p ? void 0 != p && "\t" != p && "\n" != p && "\r" != p && (this._query += k(p)) : (this._fragment = "#", n = "fragment"); break; case "fragment": void 0 != p && "\t" != p && "\n" != p && "\r" != p && (this._fragment += p) } V++ } } function r() { this._username = this._schemeData = this._scheme = ""; this._password = null; this._port = this._host = ""; this._path = []; this._fragment = this._query = ""; this._isRelative = this._isInvalid = !1 } function h(c, a) { void 0 === a || a instanceof h || (a = new h(String(a))); this._url = c; r.call(this); var e = c.replace(/^[ \t\r\n\f]+|[ \t\r\n\f]+$/g, ""); g.call(this, e, null, a) } var n = !1; try { if ("function" === typeof URL && "object" === typeof URL.prototype && "origin" in URL.prototype) { var b = new URL("b", "http://a"); b.pathname = "c%20d"; n = "http://a/c%20d" === b.href } } catch (u) { } if (!n) { var d = Object.create(null); d.ftp = 21; d.file = 0; d.gopher = 70; d.http = 80; d.https = 443; d.ws = 80; d.wss = 443; var v = Object.create(null); v["%2e"] = "."; v[".%2e"] = ".."; v["%2e."] = ".."; v["%2e%2e"] = ".."; var C = /[a-zA-Z]/, t = /[a-zA-Z0-9\+\-\.]/; h.prototype = { toString: function () { return this.href }, get href() { if (this._isInvalid) return this._url; var c = ""; if ("" != this._username || null != this._password) c = this._username + (null != this._password ? ":" + this._password : "") + "@"; return this.protocol + (this._isRelative ? "//" + c + this.host : "") + this.pathname + this._query + this._fragment }, set href(c) { r.call(this); g.call(this, c) }, get protocol() { return this._scheme + ":" }, set protocol(c) { this._isInvalid || g.call(this, c + ":", "scheme start") }, get host() { return this._isInvalid ? "" : this._port ? this._host + ":" + this._port : this._host }, set host(c) { !this._isInvalid && this._isRelative && g.call(this, c, "host") }, get hostname() { return this._host }, set hostname(c) { !this._isInvalid && this._isRelative && g.call(this, c, "hostname") }, get port() { return this._port }, set port(c) { !this._isInvalid && this._isRelative && g.call(this, c, "port") }, get pathname() { return this._isInvalid ? "" : this._isRelative ? "/" + this._path.join("/") : this._schemeData }, set pathname(c) { !this._isInvalid && this._isRelative && (this._path = [], g.call(this, c, "relative path start")) }, get search() { return this._isInvalid || !this._query || "?" == this._query ? "" : this._query }, set search(c) { !this._isInvalid && this._isRelative && (this._query = "?", "?" == c[0] && (c = c.slice(1)), g.call(this, c, "query")) }, get hash() { return this._isInvalid || !this._fragment || "#" == this._fragment ? "" : this._fragment }, set hash(c) { this._isInvalid || (this._fragment = "#", "#" == c[0] && (c = c.slice(1)), g.call(this, c, "fragment")) }, get origin() { var c; if (this._isInvalid || !this._scheme) return ""; switch (this._scheme) { case "data": case "file": case "javascript": case "mailto": return "null" } return (c = this.host) ? this._scheme + "://" + c : "" } }; var w = c.URL; w && (h.createObjectURL = function (c) { return w.createObjectURL.apply(w, arguments) }, h.revokeObjectURL = function (c) { w.revokeObjectURL(c) }); c.URL = h } })(w); b.FONT_IDENTITY_MATRIX = [.001, 0, 0, .001, 0, 0]; b.IDENTITY_MATRIX = [1, 0, 0, 1, 0, 0]; b.OPS = { dependency: 1, setLineWidth: 2, setLineCap: 3, setLineJoin: 4, setMiterLimit: 5, setDash: 6, setRenderingIntent: 7, setFlatness: 8, setGState: 9, save: 10, restore: 11, transform: 12, moveTo: 13, lineTo: 14, curveTo: 15, curveTo2: 16, curveTo3: 17, closePath: 18, rectangle: 19, stroke: 20, closeStroke: 21, fill: 22, eoFill: 23, fillStroke: 24, eoFillStroke: 25, closeFillStroke: 26, closeEOFillStroke: 27, endPath: 28, clip: 29, eoClip: 30, beginText: 31, endText: 32, setCharSpacing: 33, setWordSpacing: 34, setHScale: 35, setLeading: 36, setFont: 37, setTextRenderingMode: 38, setTextRise: 39, moveText: 40, setLeadingMoveText: 41, setTextMatrix: 42, nextLine: 43, showText: 44, showSpacedText: 45, nextLineShowText: 46, nextLineSetSpacingShowText: 47, setCharWidth: 48, setCharWidthAndBounds: 49, setStrokeColorSpace: 50, setFillColorSpace: 51, setStrokeColor: 52, setStrokeColorN: 53, setFillColor: 54, setFillColorN: 55, setStrokeGray: 56, setFillGray: 57, setStrokeRGBColor: 58, setFillRGBColor: 59, setStrokeCMYKColor: 60, setFillCMYKColor: 61, shadingFill: 62, beginInlineImage: 63, beginImageData: 64, endInlineImage: 65, paintXObject: 66, markPoint: 67, markPointProps: 68, beginMarkedContent: 69, beginMarkedContentProps: 70, endMarkedContent: 71, beginCompat: 72, endCompat: 73, paintFormXObjectBegin: 74, paintFormXObjectEnd: 75, beginGroup: 76, endGroup: 77, beginAnnotations: 78, endAnnotations: 79, beginAnnotation: 80, endAnnotation: 81, paintJpegXObject: 82, paintImageMaskXObject: 83, paintImageMaskXObjectGroup: 84, paintImageXObject: 85, paintInlineImageXObject: 86, paintInlineImageXObjectGroup: 87, paintImageXObjectRepeat: 88, paintImageMaskXObjectRepeat: 89, paintSolidColorImageMask: 90, constructPath: 91 }; b.VERBOSITY_LEVELS = u; b.UNSUPPORTED_FEATURES = { unknown: "unknown", forms: "forms", javaScript: "javaScript", smask: "smask", shadingPattern: "shadingPattern", font: "font" }; b.AnnotationBorderStyleType = { SOLID: 1, DASHED: 2, BEVELED: 3, INSET: 4, UNDERLINE: 5 }; b.AnnotationFlag = { INVISIBLE: 1, HIDDEN: 2, PRINT: 4, NOZOOM: 8, NOROTATE: 16, NOVIEW: 32, READONLY: 64, LOCKED: 128, TOGGLENOVIEW: 256, LOCKEDCONTENTS: 512 }; b.AnnotationType = { TEXT: 1, LINK: 2, FREETEXT: 3, LINE: 4, SQUARE: 5, CIRCLE: 6, POLYGON: 7, POLYLINE: 8, HIGHLIGHT: 9, UNDERLINE: 10, SQUIGGLY: 11, STRIKEOUT: 12, STAMP: 13, CARET: 14, INK: 15, POPUP: 16, FILEATTACHMENT: 17, SOUND: 18, MOVIE: 19, WIDGET: 20, SCREEN: 21, PRINTERMARK: 22, TRAPNET: 23, WATERMARK: 24, THREED: 25, REDACT: 26 }; b.FontType = { UNKNOWN: 0, TYPE1: 1, TYPE1C: 2, CIDFONTTYPE0: 3, CIDFONTTYPE0C: 4, TRUETYPE: 5, CIDFONTTYPE2: 6, TYPE3: 7, OPENTYPE: 8, TYPE0: 9, MMTYPE1: 10 }; b.ImageKind = { GRAYSCALE_1BPP: 1, RGB_24BPP: 2, RGBA_32BPP: 3 }; b.InvalidPDFException = n; b.MessageHandler = E; b.MissingDataException = q; b.MissingPDFException = z; b.NotImplementedException = l; b.PageViewport = k; b.PasswordException = a; b.PasswordResponses = { NEED_PASSWORD: 1, INCORRECT_PASSWORD: 2 }; b.StatTimer = e; b.StreamType = { UNKNOWN: 0, FLATE: 1, LZW: 2, DCT: 3, JPX: 4, JBIG: 5, A85: 6, AHX: 7, CCF: 8, RL: 9 }; b.TextRenderingMode = { FILL: 0, STROKE: 1, FILL_STROKE: 2, INVISIBLE: 3, FILL_ADD_TO_PATH: 4, STROKE_ADD_TO_PATH: 5, FILL_STROKE_ADD_TO_PATH: 6, ADD_TO_PATH: 7, FILL_STROKE_MASK: 3, ADD_TO_PATH_FLAG: 4 }; b.UnexpectedResponseException = L; b.UnknownErrorException = C; b.Util = r; b.XRefParseException = t; b.arrayByteLength = x; b.arraysToBytes = function (c) { if (1 === c.length && c[0] instanceof Uint8Array) return c[0]; var a = 0, e, k = c.length, g, h; for (e = 0; e < k; e++) g = c[e], h = x(g), a += h; var r = 0, a = new Uint8Array(a); for (e = 0; e < k; e++) g = c[e], g instanceof Uint8Array || (g = "string" === typeof g ? f(g) : new Uint8Array(g)), h = g.byteLength, a.set(g, r), r += h; return a }; b.assert = A; b.bytesToString = function (c) { A(null !== c && "object" === typeof c && void 0 !== c.length, "Invalid argument for bytesToString"); var a = c.length; if (8192 > a) return String.fromCharCode.apply(null, c); for (var e = [], k = 0; k < a; k += 8192) { var g = c.subarray(k, Math.min(k + 8192, a)); e.push(String.fromCharCode.apply(null, g)) } return e.join("") }; b.createBlob = h; b.createPromiseCapability = J; b.createObjectURL = F; b.deprecated = function (c) { console.log("Deprecated API usage: " + c) }; b.error = m; b.getLookupTableFactory = function (c) { var a; return function () { c && (a = Object.create(null), c(a), c = null); return a } }; b.getVerbosityLevel = function () { return v }; b.globalScope = w; b.info = function (c) { v >= u.infos && console.log("Info: " + c) }; b.isArray = function (c) { return c instanceof Array }; b.isArrayBuffer = function (c) { return "object" === typeof c && null !== c && void 0 !== c.byteLength }; b.isBool = function (c) { return "boolean" === typeof c }; b.isEmptyObj = function (c) { for (var a in c) return !1; return !0 }; b.isInt = X; b.isNum = function (c) { return "number" === typeof c }; b.isString = function (c) { return "string" === typeof c }; b.isSameOrigin = function (c, a) { try { var e = new URL(c); if (!e.origin || "null" === e.origin) return !1 } catch (k) { return !1 } var g = new URL(a, e); return e.origin === g.origin }; b.isValidUrl = function (c, a) { if (!c || "string" !== typeof c) return !1; var e = /^[a-z][a-z0-9+\-.]*(?=:)/i.exec(c); if (!e) return a; e = e[0].toLowerCase(); switch (e) { case "http": case "https": case "ftp": case "mailto": case "tel": return !0; default: return !1 } }; b.isLittleEndian = function () { var c = new Uint8Array(2); c[0] = 1; return 1 === (new Uint16Array(c.buffer))[0] }; b.isEvalSupported = function () { try { return new Function(""), !0 } catch (c) { return !1 } }; b.loadJpegStream = function (c, a, e) { var k = new Image; k.onload = function () { e.resolve(c, k) }; k.onerror = function () { e.resolve(c, null); d("Error during JPEG image loading") }; k.src = a }; b.log2 = function (c) { for (var a = 1, e = 0; c > a;) a <<= 1, e++; return e }; b.readInt8 = function (c, a) { return c[a] << 24 >> 24 }; b.readUint16 = function (c, a) { return c[a] << 8 | c[a + 1] }; b.readUint32 = function (c, a) { return (c[a] << 24 | c[a + 1] << 16 | c[a + 2] << 8 | c[a + 3]) >>> 0 }; b.removeNullCharacters = function (c) { return "string" !== typeof c ? (d("The argument for removeNullCharacters must be a string."), c) : c.replace(y, "") }; b.setVerbosityLevel = function (c) { v = c }; b.shadow = function (c, a, e) { Object.defineProperty(c, a, { value: e, enumerable: !0, configurable: !0, writable: !1 }); return e }; b.string32 = function (c) { return String.fromCharCode(c >> 24 & 255, c >> 16 & 255, c >> 8 & 255, c & 255) }; b.stringToBytes = f; b.stringToPDFString = function (c) { var a, e = c.length, k = []; if ("\u00fe" === c[0] && "\u00ff" === c[1]) for (a = 2; a < e; a += 2) k.push(String.fromCharCode(c.charCodeAt(a) << 8 | c.charCodeAt(a + 1))); else for (a = 0; a < e; ++a) { var h = g[c.charCodeAt(a)]; k.push(h ? String.fromCharCode(h) : c.charAt(a)) } return k.join("") }; b.stringToUTF8String = function (c) { return decodeURIComponent(escape(c)) }; b.utf8StringToString = function (c) { return unescape(encodeURIComponent(c)) }; b.warn = d }); (function (b, d) { d(b.pdfjsDisplayDOMUtils = {}, b.pdfjsSharedUtil) })(this, function (b, d) { function m(b) { var f = d.globalScope.PDFJS; switch (b) { case "pdfBug": return f ? f.pdfBug : !1; case "disableAutoFetch": return f ? f.disableAutoFetch : !1; case "disableStream": return f ? f.disableStream : !1; case "disableRange": return f ? f.disableRange : !1; case "disableFontFace": return f ? f.disableFontFace : !1; case "disableCreateObjectURL": return f ? f.disableCreateObjectURL : !1; case "disableWebGL": return f ? f.disableWebGL : !0; case "cMapUrl": return f ? f.cMapUrl : null; case "cMapPacked": return f ? f.cMapPacked : !1; case "postMessageTransfers": return f ? f.postMessageTransfers : !0; case "workerSrc": return f ? f.workerSrc : null; case "disableWorker": return f ? f.disableWorker : !1; case "maxImageSize": return f ? f.maxImageSize : -1; case "imageResourcesPath": return f ? f.imageResourcesPath : ""; case "isEvalSupported": return f ? f.isEvalSupported : !0; case "externalLinkTarget": if (!f) return x.NONE; switch (f.externalLinkTarget) { case x.NONE: case x.SELF: case x.BLANK: case x.PARENT: case x.TOP: return f.externalLinkTarget } A("PDFJS.externalLinkTarget is invalid: " + f.externalLinkTarget); return f.externalLinkTarget = x.NONE; case "externalLinkRel": return f ? f.externalLinkRel : "noreferrer"; case "enableStats": return !(!f || !f.enableStats); default: throw Error("Unknown default setting: " + b); } } var B = d.removeNullCharacters, A = d.warn, f = function () { function b() { } var d = ["ms", "Moz", "Webkit", "O"], f = Object.create(null); b.getProp = function (b, v) { if (1 === arguments.length && "string" === typeof f[b]) return f[b]; v = v || document.documentElement; var a = v.style, C, n; if ("string" === typeof a[b]) return f[b] = b; n = b.charAt(0).toUpperCase() + b.slice(1); for (var z = 0, L = d.length; z < L; z++) if (C = d[z] + n, "string" === typeof a[C]) return f[b] = C; return f[b] = "undefined" }; b.setProp = function (b, d, a) { b = this.getProp(b); "undefined" !== b && (d.style[b] = a) }; return b }(), x = { NONE: 0, SELF: 1, BLANK: 2, PARENT: 3, TOP: 4 }, X = ["", "_self", "_blank", "_parent", "_top"]; b.CustomStyle = f; b.addLinkAttributes = function (b, d) { var f = d && d.url; b.href = b.title = f ? B(f) : ""; f && (f = d.target, "undefined" === typeof f && (f = m("externalLinkTarget")), b.target = X[f], f = d.rel, "undefined" === typeof f && (f = m("externalLinkRel")), b.rel = f) }; b.isExternalLinkTargetSet = function () { switch (m("externalLinkTarget")) { case x.NONE: return !1; case x.SELF: case x.BLANK: case x.PARENT: case x.TOP: return !0 } }; b.getFilenameFromUrl = function (b) { var d = b.indexOf("#"), f = b.indexOf("?"), d = Math.min(0 < d ? d : b.length, 0 < f ? f : b.length); return b.substring(b.lastIndexOf("/", d) + 1, d) }; b.LinkTarget = x; b.hasCanvasTypedArrays = function () { var b = document.createElement("canvas"); b.width = b.height = 1; return "undefined" !== typeof b.getContext("2d").createImageData(1, 1).data.buffer }; b.getDefaultSetting = m }); (function (b, d) { d(b.pdfjsDisplayFontLoader = {}, b.pdfjsSharedUtil) })(this, function (b, d) { function m(b) { this.docId = b; this.styleElement = null; this.nativeFontFaces = []; this.loadTestFontId = 0; this.loadingContext = { requests: [], nextRequestId: 0 } } var B = d.assert, A = d.bytesToString, f = d.string32, x = d.shadow, X = d.warn; m.prototype = { insertRule: function (b) { var d = this.styleElement; d || (d = this.styleElement = document.createElement("style"), d.id = "PDFJS_FONT_STYLE_TAG_" + this.docId, document.documentElement.getElementsByTagName("head")[0].appendChild(d)); d = d.sheet; d.insertRule(b, d.cssRules.length) }, clear: function () { var b = this.styleElement; b && (b.parentNode.removeChild(b), b = this.styleElement = null); this.nativeFontFaces.forEach(function (b) { document.fonts["delete"](b) }); this.nativeFontFaces.length = 0 }, get loadTestFont() { return x(this, "loadTestFont", atob("T1RUTwALAIAAAwAwQ0ZGIDHtZg4AAAOYAAAAgUZGVE1lkzZwAAAEHAAAABxHREVGABQAFQAABDgAAAAeT1MvMlYNYwkAAAEgAAAAYGNtYXABDQLUAAACNAAAAUJoZWFk/xVFDQAAALwAAAA2aGhlYQdkA+oAAAD0AAAAJGhtdHgD6AAAAAAEWAAAAAZtYXhwAAJQAAAAARgAAAAGbmFtZVjmdH4AAAGAAAAAsXBvc3T/hgAzAAADeAAAACAAAQAAAAEAALZRFsRfDzz1AAsD6AAAAADOBOTLAAAAAM4KHDwAAAAAA+gDIQAAAAgAAgAAAAAAAAABAAADIQAAAFoD6AAAAAAD6AABAAAAAAAAAAAAAAAAAAAAAQAAUAAAAgAAAAQD6AH0AAUAAAKKArwAAACMAooCvAAAAeAAMQECAAACAAYJAAAAAAAAAAAAAQAAAAAAAAAAAAAAAFBmRWQAwAAuAC4DIP84AFoDIQAAAAAAAQAAAAAAAAAAACAAIAABAAAADgCuAAEAAAAAAAAAAQAAAAEAAAAAAAEAAQAAAAEAAAAAAAIAAQAAAAEAAAAAAAMAAQAAAAEAAAAAAAQAAQAAAAEAAAAAAAUAAQAAAAEAAAAAAAYAAQAAAAMAAQQJAAAAAgABAAMAAQQJAAEAAgABAAMAAQQJAAIAAgABAAMAAQQJAAMAAgABAAMAAQQJAAQAAgABAAMAAQQJAAUAAgABAAMAAQQJAAYAAgABWABYAAAAAAAAAwAAAAMAAAAcAAEAAAAAADwAAwABAAAAHAAEACAAAAAEAAQAAQAAAC7//wAAAC7////TAAEAAAAAAAABBgAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAD/gwAyAAAAAQAAAAAAAAAAAAAAAAAAAAABAAQEAAEBAQJYAAEBASH4DwD4GwHEAvgcA/gXBIwMAYuL+nz5tQXkD5j3CBLnEQACAQEBIVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYAAABAQAADwACAQEEE/t3Dov6fAH6fAT+fPp8+nwHDosMCvm1Cvm1DAz6fBQAAAAAAAABAAAAAMmJbzEAAAAAzgTjFQAAAADOBOQpAAEAAAAAAAAADAAUAAQAAAABAAAAAgABAAAAAAAAAAAD6AAAAAAAAA==")) }, addNativeFontFace: function (b) { this.nativeFontFaces.push(b); document.fonts.add(b) }, bind: function (b, d) { for (var f = [], a = [], C = [], n = function (a) { return a.loaded["catch"](function (k) { X('Failed to load font "' + a.family + '": ' + k) }) }, z = 0, L = b.length; z < L; z++) { var l = b[z]; if (!l.attached && !1 !== l.loading) if (l.attached = !0, m.isFontLoadingAPISupported) { if (l = l.createNativeFontFace()) this.addNativeFontFace(l), C.push(n(l)) } else { var q = l.createFontFaceRule(); q && (this.insertRule(q), f.push(q), a.push(l)) } } var t = this.queueLoadingCallback(d); m.isFontLoadingAPISupported ? Promise.all(C).then(function () { t.complete() }) : 0 < f.length && !m.isSyncFontLoadingSupported ? this.prepareFontLoadEvent(f, a, t) : t.complete() }, queueLoadingCallback: function (b) { var d = this.loadingContext, f = { id: "pdfjs-font-loading-" + d.nextRequestId++, complete: function () { B(!f.end, "completeRequest() cannot be called twice"); for (f.end = Date.now() ; 0 < d.requests.length && d.requests[0].end;) { var a = d.requests.shift(); setTimeout(a.callback, 0) } }, callback: b, started: Date.now() }; d.requests.push(f); return f }, prepareFontLoadEvent: function (b, d, v) { function a(a, k) { return a.charCodeAt(k) << 24 | a.charCodeAt(k + 1) << 16 | a.charCodeAt(k + 2) << 8 | a.charCodeAt(k + 3) & 255 } function C(a, k, e, b) { var n = a.substr(0, k); a = a.substr(k + e); return n + b + a } function n(a, k) { q++; 30 < q ? (X("Load test font never loaded."), k()) : (l.font = "30px " + a, l.fillText(".", 0, 20), 0 < l.getImageData(0, 0, 1, 1).data[3] ? k() : setTimeout(n.bind(null, a, k))) } var z, L; b = document.createElement("canvas"); b.width = 1; b.height = 1; var l = b.getContext("2d"), q = 0; b = "lt" + Date.now() + this.loadTestFontId++; var t = this.loadTestFont, t = C(t, 976, b.length, b), y = a(t, 16); z = 0; for (L = b.length - 3; z < L; z += 4) y = y - 1482184792 + a(b, z) | 0; z < b.length && (y = y - 1482184792 + a(b + "XXX", z) | 0); t = C(t, 16, 4, f(y)); z = "url(data:font/opentype;base64," + btoa(t) + ");"; this.insertRule('@font-face { font-family:"' + b + '";src:' + z + "}"); t = []; z = 0; for (L = d.length; z < L; z++) t.push(d[z].loadedName); t.push(b); var k = document.createElement("div"); k.setAttribute("style", "visibility: hidden;width: 10px; height: 10px;position: absolute; top: 0px; left: 0px;"); z = 0; for (L = t.length; z < L; ++z) d = document.createElement("span"), d.textContent = "Hi", d.style.fontFamily = t[z], k.appendChild(d); document.body.appendChild(k); n(b, function () { document.body.removeChild(k); v.complete() }) } }; m.isFontLoadingAPISupported = "undefined" !== typeof document && !!document.fonts; Object.defineProperty(m, "isSyncFontLoadingSupported", { get: function () { if ("undefined" === typeof navigator) return x(m, "isSyncFontLoadingSupported", !0); var b = !1, d = /Mozilla\/5.0.*?rv:(\d+).*? Gecko/.exec(navigator.userAgent); d && 14 <= d[1] && (b = !0); return x(m, "isSyncFontLoadingSupported", b) }, enumerable: !0, configurable: !0 }); var J = { get value() { return x(this, "value", d.isEvalSupported()) } }, E = function () { function b(d, f) { this.compiledGlyphs = Object.create(null); for (var a in d) this[a] = d[a]; this.options = f } b.prototype = { createNativeFontFace: function () { if (!this.data) return null; if (this.options.disableFontFace) return this.disableFontFace = !0, null; var b = new FontFace(this.loadedName, this.data, {}); this.options.fontRegistry && this.options.fontRegistry.registerFont(this); return b }, createFontFaceRule: function () { if (!this.data) return null; if (this.options.disableFontFace) return this.disableFontFace = !0, null; var b = A(new Uint8Array(this.data)), d = this.loadedName, b = "url(data:" + this.mimetype + ";base64," + btoa(b) + ");", d = '@font-face { font-family:"' + d + '";src:' + b + "}"; this.options.fontRegistry && this.options.fontRegistry.registerFont(this, b); return d }, spaceWidth: function () { if ("_shadowWidth" in this) return this._shadowWidth; for (var b = ["space", "minus", "one", "i"], d, a = 0, f = b.length; a < f; a++) { d = b[a]; if (d in this.widths) { d = this.widths[d]; break } d = GlyphsUnicode[d]; var n = 0; this.composite && this.cMap.contains(d) && (n = this.cMap.lookup(d)); !n && this.toUnicode && (n = this.toUnicode.charCodeOf(d)); 0 >= n && (n = d); if (d = this.widths[n]) break } return this._shadowWidth = d = d || PDFJS.Util.arrayAverage(this.widths) || this.defaultWidth }, getPathGenerator: function (b, d) { if (!(d in this.compiledGlyphs)) { var a = b.get(this.loadedName + "_path_" + d), f, n, z; if (this.options.isEvalSupported && J.value) { var w, l = ""; n = 0; for (z = a.length; n < z; n++) f = a[n], w = void 0 !== f.args ? f.args.join(",") : "", l += "c." + f.cmd + "(" + w + ");\n"; this.compiledGlyphs[d] = new Function("c", "size", l) } else this.compiledGlyphs[d] = function (b, d) { n = 0; for (z = a.length; n < z; n++) f = a[n], "scale" === f.cmd && (f.args = [d, -d]), b[f.cmd].apply(b, f.args) } } return this.compiledGlyphs[d] } }; return b }(); b.FontFaceObject = E; b.FontLoader = m }); (function (b, d) { d(b.pdfjsDisplayMetadata = {}, b.pdfjsSharedUtil) })(this, function (b, d) { function m(b) { return b.replace(/>\\376\\377([^<]+)/g, function (b, d) { for (var f = d.replace(/\\([0-3])([0-7])([0-7])/g, function (b, a, d, n) { return String.fromCharCode(64 * a + 8 * d + 1 * n) }), m = "", w = 0; w < f.length; w += 2) var u = 256 * f.charCodeAt(w) + f.charCodeAt(w + 1), m = m + ("&#x" + (65536 + u).toString(16).substring(1) + ";"); return ">" + m }) } function B(b) { "string" === typeof b ? (b = m(b), b = (new DOMParser).parseFromString(b, "application/xml")) : b instanceof Document || A("Metadata: Invalid metadata object"); this.metaDocument = b; this.metadata = Object.create(null); this.parse() } var A = d.error; B.prototype = { parse: function () { var b = this.metaDocument.documentElement; if ("rdf:rdf" !== b.nodeName.toLowerCase()) for (b = b.firstChild; b && "rdf:rdf" !== b.nodeName.toLowerCase() ;) b = b.nextSibling; var d = b ? b.nodeName.toLowerCase() : null; if (b && "rdf:rdf" === d && b.hasChildNodes()) { var b = b.childNodes, m, B, A, w, u, v; A = 0; for (u = b.length; A < u; A++) if (d = b[A], "rdf:description" === d.nodeName.toLowerCase()) for (w = 0, v = d.childNodes.length; w < v; w++) "#text" !== d.childNodes[w].nodeName.toLowerCase() && (m = d.childNodes[w], B = m.nodeName.toLowerCase(), this.metadata[B] = m.textContent.trim()) } }, get: function (b) { return this.metadata[b] || null }, has: function (b) { return "undefined" !== typeof this.metadata[b] } }; b.Metadata = B }); (function (b, d) { d(b.pdfjsDisplaySVG = {}, b.pdfjsSharedUtil) })(this, function (b, d) { var m = d.FONT_IDENTITY_MATRIX, B = d.IDENTITY_MATRIX, A = d.ImageKind, f = d.OPS, x = d.Util, D = d.isNum, J = d.isArray, E = d.warn, w = d.createObjectURL, u = function () { function a(b, n, k, r) { var g = r, e = n.length; k[g] = e >> 24 & 255; k[g + 1] = e >> 16 & 255; k[g + 2] = e >> 8 & 255; k[g + 3] = e & 255; g += 4; k[g] = b.charCodeAt(0) & 255; k[g + 1] = b.charCodeAt(1) & 255; k[g + 2] = b.charCodeAt(2) & 255; k[g + 3] = b.charCodeAt(3) & 255; g += 4; k.set(n, g); g += n.length; b = -1; for (r += 4; r < g; r++) b = b >>> 8 ^ d[(b ^ k[r]) & 255]; r = b ^ -1; k[g] = r >> 24 & 255; k[g + 1] = r >> 16 & 255; k[g + 2] = r >> 8 & 255; k[g + 3] = r & 255 } for (var b = new Uint8Array([137, 80, 78, 71, 13, 10, 26, 10]), d = new Int32Array(256), f = 0; 256 > f; f++) { for (var u = f, v = 0; 8 > v; v++) u = u & 1 ? 3988292384 ^ u >> 1 & 2147483647 : u >> 1 & 2147483647; d[f] = u } return function (d, f) { var k = void 0 === d.kind ? A.GRAYSCALE_1BPP : d.kind, r = d.width, g = d.height, e, h, u, c = d.data; switch (k) { case A.GRAYSCALE_1BPP: h = 0; e = 1; u = r + 7 >> 3; break; case A.RGB_24BPP: h = 2; e = 8; u = 3 * r; break; case A.RGBA_32BPP: h = 6; e = 8; u = 4 * r; break; default: throw Error("invalid format"); } var l = new Uint8Array((1 + u) * g), v = 0, z = 0, q; for (q = 0; q < g; ++q) l[v++] = 0, l.set(c.subarray(z, z + u), v), z += u, v += u; if (k === A.GRAYSCALE_1BPP) for (q = v = 0; q < g; q++) for (v++, k = 0; k < u; k++) l[v++] ^= 255; r = new Uint8Array([r >> 24 & 255, r >> 16 & 255, r >> 8 & 255, r & 255, g >> 24 & 255, g >> 16 & 255, g >> 8 & 255, g & 255, e, h, 0, 0, 0]); h = l.length; g = new Uint8Array(2 + h + 5 * Math.ceil(h / 65535) + 4); e = 0; g[e++] = 120; g[e++] = 156; for (u = 0; 65535 < h;) g[e++] = 0, g[e++] = 255, g[e++] = 255, g[e++] = 0, g[e++] = 0, g.set(l.subarray(u, u + 65535), e), e += 65535, u += 65535, h -= 65535; g[e++] = 1; g[e++] = h & 255; g[e++] = h >> 8 & 255; g[e++] = ~h & 255; g[e++] = (~h & 65535) >> 8 & 255; g.set(l.subarray(u), e); e += l.length - u; h = 1; for (v = u = 0; v < l.length; ++v) h = (h + (l[v] & 255)) % 65521, u = (u + h) % 65521; l = u << 16 | h; g[e++] = l >> 24 & 255; g[e++] = l >> 16 & 255; g[e++] = l >> 8 & 255; g[e++] = l & 255; l = new Uint8Array(b.length + 36 + r.length + g.length); e = 0; l.set(b, e); e += b.length; a("IHDR", r, l, e); e += 12 + r.length; a("IDATA", g, l, e); e += 12 + g.length; a("IEND", new Uint8Array(0), l, e); return w(l, "image/png", f) } }(), v = function () { function a() { this.fontSizeScale = 1; this.fontWeight = "normal"; this.fontSize = 0; this.textMatrix = B; this.fontMatrix = m; this.wordSpacing = this.charSpacing = this.lineY = this.lineX = this.y = this.x = this.leading = 0; this.textHScale = 1; this.textRise = 0; this.strokeColor = this.fillColor = "#000000"; this.lineWidth = this.strokeAlpha = this.fillAlpha = 1; this.lineCap = this.lineJoin = ""; this.miterLimit = 0; this.dashArray = []; this.dashPhase = 0; this.dependencies = []; this.clipId = ""; this.pendingClip = !1; this.maskId = "" } a.prototype = { clone: function () { return Object.create(this) }, setCurrentPoint: function (a, b) { this.x = a; this.y = b } }; return a }(), a = function () { function a(b, d) { var g = document.createElementNS("http://www.w3.org/2000/svg", "svg:svg"); g.setAttributeNS(null, "version", "1.1"); g.setAttributeNS(null, "width", b + "px"); g.setAttributeNS(null, "height", d + "px"); g.setAttributeNS(null, "viewBox", "0 0 " + b + " " + d); return g } function b(a) { if (a === (a | 0)) return a.toString(); a = a.toFixed(10); var d = a.length - 1; if ("0" !== a[d]) return a; do d--; while ("0" === a[d]); return a.substr(0, "." === a[d] ? d : d + 1) } function d(a) { if (0 === a[4] && 0 === a[5]) { if (0 === a[1] && 0 === a[2]) return 1 === a[0] && 1 === a[3] ? "" : "scale(" + b(a[0]) + " " + b(a[3]) + ")"; if (a[0] === a[3] && a[1] === -a[2]) return "rotate(" + b(180 * Math.acos(a[0]) / Math.PI) + ")" } else if (1 === a[0] && 0 === a[1] && 0 === a[2] && 1 === a[3]) return "translate(" + b(a[4]) + " " + b(a[5]) + ")"; return "matrix(" + b(a[0]) + " " + b(a[1]) + " " + b(a[2]) + " " + b(a[3]) + " " + b(a[4]) + " " + b(a[5]) + ")" } function L(a, b, g) { this.current = new v; this.transformMatrix = B; this.transformStack = []; this.extraStack = []; this.commonObjs = a; this.objs = b; this.embedFonts = this.pendingEOFill = !1; this.embeddedFonts = Object.create(null); this.cssStyle = null; this.forceDataSchema = !!g } var l = ["butt", "round", "square"], q = ["miter", "round", "bevel"], t = 0, y = 0; L.prototype = { save: function () { this.transformStack.push(this.transformMatrix); var a = this.current; this.extraStack.push(a); this.current = a.clone() }, restore: function () { this.transformMatrix = this.transformStack.pop(); this.current = this.extraStack.pop(); this.tgrp = document.createElementNS("http://www.w3.org/2000/svg", "svg:g"); this.tgrp.setAttributeNS(null, "transform", d(this.transformMatrix)); this.pgrp.appendChild(this.tgrp) }, group: function (a) { this.save(); this.executeOpTree(a); this.restore() }, loadDependencies: function (a) { var b = a.fnArray, g = b.length; a = a.argsArray; for (var e = this, d = 0; d < g; d++) if (f.dependency === b[d]) for (var n = a[d], c = 0, u = n.length; c < u; c++) { var l = n[c], v; v = "g_" === l.substring(0, 2) ? new Promise(function (a) { e.commonObjs.get(l, a) }) : new Promise(function (a) { e.objs.get(l, a) }); this.current.dependencies.push(v) } return Promise.all(this.current.dependencies) }, transform: function (a, b, g, e, h, f) { this.transformMatrix = x.transform(this.transformMatrix, [a, b, g, e, h, f]); this.tgrp = document.createElementNS("http://www.w3.org/2000/svg", "svg:g"); this.tgrp.setAttributeNS(null, "transform", d(this.transformMatrix)) }, getSVG: function (b, r) { this.svg = a(r.width, r.height); this.viewport = r; return this.loadDependencies(b).then(function () { this.transformMatrix = B; this.pgrp = document.createElementNS("http://www.w3.org/2000/svg", "svg:g"); this.pgrp.setAttributeNS(null, "transform", d(r.transform)); this.tgrp = document.createElementNS("http://www.w3.org/2000/svg", "svg:g"); this.tgrp.setAttributeNS(null, "transform", d(this.transformMatrix)); this.defs = document.createElementNS("http://www.w3.org/2000/svg", "svg:defs"); this.pgrp.appendChild(this.defs); this.pgrp.appendChild(this.tgrp); this.svg.appendChild(this.pgrp); var a = this.convertOpList(b); this.executeOpTree(a); return this.svg }.bind(this)) }, convertOpList: function (a) { var b = a.argsArray, g = a.fnArray, e = g.length, d = []; a = []; for (var n in f) d[f[n]] = n; for (n = 0; n < e; n++) { var c = g[n]; a.push({ fnId: c, fn: d[c], args: b[n] }) } b = []; g = []; e = a.length; for (d = 0; d < e; d++) "save" === a[d].fn ? (b.push({ fnId: 92, fn: "group", items: [] }), g.push(b), b = b[b.length - 1].items) : "restore" === a[d].fn ? b = g.pop() : b.push(a[d]); return b }, executeOpTree: function (a) { for (var b = a.length, d = 0; d < b; d++) { var e = a[d].fn, h = a[d].args; switch (a[d].fnId | 0) { case f.beginText: this.beginText(); break; case f.setLeading: this.setLeading(h); break; case f.setLeadingMoveText: this.setLeadingMoveText(h[0], h[1]); break; case f.setFont: this.setFont(h); break; case f.showText: this.showText(h[0]); break; case f.showSpacedText: this.showText(h[0]); break; case f.endText: this.endText(); break; case f.moveText: this.moveText(h[0], h[1]); break; case f.setCharSpacing: this.setCharSpacing(h[0]); break; case f.setWordSpacing: this.setWordSpacing(h[0]); break; case f.setHScale: this.setHScale(h[0]); break; case f.setTextMatrix: this.setTextMatrix(h[0], h[1], h[2], h[3], h[4], h[5]); break; case f.setLineWidth: this.setLineWidth(h[0]); break; case f.setLineJoin: this.setLineJoin(h[0]); break; case f.setLineCap: this.setLineCap(h[0]); break; case f.setMiterLimit: this.setMiterLimit(h[0]); break; case f.setFillRGBColor: this.setFillRGBColor(h[0], h[1], h[2]); break; case f.setStrokeRGBColor: this.setStrokeRGBColor(h[0], h[1], h[2]); break; case f.setDash: this.setDash(h[0], h[1]); break; case f.setGState: this.setGState(h[0]); break; case f.fill: this.fill(); break; case f.eoFill: this.eoFill(); break; case f.stroke: this.stroke(); break; case f.fillStroke: this.fillStroke(); break; case f.eoFillStroke: this.eoFillStroke(); break; case f.clip: this.clip("nonzero"); break; case f.eoClip: this.clip("evenodd"); break; case f.paintSolidColorImageMask: this.paintSolidColorImageMask(); break; case f.paintJpegXObject: this.paintJpegXObject(h[0], h[1], h[2]); break; case f.paintImageXObject: this.paintImageXObject(h[0]); break; case f.paintInlineImageXObject: this.paintInlineImageXObject(h[0]); break; case f.paintImageMaskXObject: this.paintImageMaskXObject(h[0]); break; case f.paintFormXObjectBegin: this.paintFormXObjectBegin(h[0], h[1]); break; case f.paintFormXObjectEnd: this.paintFormXObjectEnd(); break; case f.closePath: this.closePath(); break; case f.closeStroke: this.closeStroke(); break; case f.closeFillStroke: this.closeFillStroke(); break; case f.nextLine: this.nextLine(); break; case f.transform: this.transform(h[0], h[1], h[2], h[3], h[4], h[5]); break; case f.constructPath: this.constructPath(h[0], h[1]); break; case f.endPath: this.endPath(); break; case 92: this.group(a[d].items); break; default: E("Unimplemented method " + e) } } }, setWordSpacing: function (a) { this.current.wordSpacing = a }, setCharSpacing: function (a) { this.current.charSpacing = a }, nextLine: function () { this.moveText(0, this.current.leading) }, setTextMatrix: function (a, d, g, e, h, f) { var c = this.current; this.current.textMatrix = this.current.lineMatrix = [a, d, g, e, h, f]; this.current.x = this.current.lineX = 0; this.current.y = this.current.lineY = 0; c.xcoords = []; c.tspan = document.createElementNS("http://www.w3.org/2000/svg", "svg:tspan"); c.tspan.setAttributeNS(null, "font-family", c.fontFamily); c.tspan.setAttributeNS(null, "font-size", b(c.fontSize) + "px"); c.tspan.setAttributeNS(null, "y", b(-c.y)); c.txtElement = document.createElementNS("http://www.w3.org/2000/svg", "svg:text"); c.txtElement.appendChild(c.tspan) }, beginText: function () { this.current.x = this.current.lineX = 0; this.current.y = this.current.lineY = 0; this.current.textMatrix = B; this.current.lineMatrix = B; this.current.tspan = document.createElementNS("http://www.w3.org/2000/svg", "svg:tspan"); this.current.txtElement = document.createElementNS("http://www.w3.org/2000/svg", "svg:text"); this.current.txtgrp = document.createElementNS("http://www.w3.org/2000/svg", "svg:g"); this.current.xcoords = [] }, moveText: function (a, d) { var g = this.current; this.current.x = this.current.lineX += a; this.current.y = this.current.lineY += d; g.xcoords = []; g.tspan = document.createElementNS("http://www.w3.org/2000/svg", "svg:tspan"); g.tspan.setAttributeNS(null, "font-family", g.fontFamily); g.tspan.setAttributeNS(null, "font-size", b(g.fontSize) + "px"); g.tspan.setAttributeNS(null, "y", b(-g.y)) }, showText: function (a) { var r = this.current, g = r.font, e = r.fontSize; if (0 !== e) { var h = r.charSpacing, f = r.wordSpacing, c = r.fontDirection, u = r.textHScale * c, l = a.length, g = g.vertical, v = e * r.fontMatrix[0], t = 0, C; for (C = 0; C < l; ++C) { var q = a[C]; if (null === q) t += c * f; else if (D(q)) t += -q * e * .001; else { r.xcoords.push(r.x + t * u); var w = q.fontChar, t = t + (q.width * v + h * c); r.tspan.textContent += w } } g ? r.y -= t * u : r.x += t * u; r.tspan.setAttributeNS(null, "x", r.xcoords.map(b).join(" ")); r.tspan.setAttributeNS(null, "y", b(-r.y)); r.tspan.setAttributeNS(null, "font-family", r.fontFamily); r.tspan.setAttributeNS(null, "font-size", b(r.fontSize) + "px"); "normal" !== r.fontStyle && r.tspan.setAttributeNS(null, "font-style", r.fontStyle); "normal" !== r.fontWeight && r.tspan.setAttributeNS(null, "font-weight", r.fontWeight); "#000000" !== r.fillColor && r.tspan.setAttributeNS(null, "fill", r.fillColor); r.txtElement.setAttributeNS(null, "transform", d(r.textMatrix) + " scale(1, -1)"); r.txtElement.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space", "preserve"); r.txtElement.appendChild(r.tspan); r.txtgrp.appendChild(r.txtElement); this.tgrp.appendChild(r.txtElement) } }, setLeadingMoveText: function (a, b) { this.setLeading(-b); this.moveText(a, b) }, addFontStyle: function (a) { this.cssStyle || (this.cssStyle = document.createElementNS("http://www.w3.org/2000/svg", "svg:style"), this.cssStyle.setAttributeNS(null, "type", "text/css"), this.defs.appendChild(this.cssStyle)); var b = w(a.data, a.mimetype, this.forceDataSchema); this.cssStyle.textContent += '@font-face { font-family: "' + a.loadedName + '"; src: url(' + b + "); }\n" }, setFont: function (a) { var d = this.current, g = this.commonObjs.get(a[0]); a = a[1]; this.current.font = g; this.embedFonts && g.data && !this.embeddedFonts[g.loadedName] && (this.addFontStyle(g), this.embeddedFonts[g.loadedName] = g); d.fontMatrix = g.fontMatrix ? g.fontMatrix : m; var e = g.black ? g.bold ? "bolder" : "bold" : g.bold ? "bold" : "normal", h = g.italic ? "italic" : "normal"; 0 > a ? (a = -a, d.fontDirection = -1) : d.fontDirection = 1; d.fontSize = a; d.fontFamily = g.loadedName; d.fontWeight = e; d.fontStyle = h; d.tspan = document.createElementNS("http://www.w3.org/2000/svg", "svg:tspan"); d.tspan.setAttributeNS(null, "y", b(-d.y)); d.xcoords = [] }, endText: function () { this.current.pendingClip ? (this.cgrp.appendChild(this.tgrp), this.pgrp.appendChild(this.cgrp)) : this.pgrp.appendChild(this.tgrp); this.tgrp = document.createElementNS("http://www.w3.org/2000/svg", "svg:g"); this.tgrp.setAttributeNS(null, "transform", d(this.transformMatrix)) }, setLineWidth: function (a) { this.current.lineWidth = a }, setLineCap: function (a) { this.current.lineCap = l[a] }, setLineJoin: function (a) { this.current.lineJoin = q[a] }, setMiterLimit: function (a) { this.current.miterLimit = a }, setStrokeRGBColor: function (a, b, d) { a = x.makeCssRgb(a, b, d); this.current.strokeColor = a }, setFillRGBColor: function (a, b, d) { a = x.makeCssRgb(a, b, d); this.current.fillColor = a; this.current.tspan = document.createElementNS("http://www.w3.org/2000/svg", "svg:tspan"); this.current.xcoords = [] }, setDash: function (a, b) { this.current.dashArray = a; this.current.dashPhase = b }, constructPath: function (a, d) { var g = this.current, e = g.x, h = g.y; g.path = document.createElementNS("http://www.w3.org/2000/svg", "svg:path"); for (var u = [], c = a.length, l = 0, v = 0; l < c; l++) switch (a[l] | 0) { case f.rectangle: var e = d[v++], h = d[v++], t = d[v++], C = d[v++], t = e + t, C = h + C; u.push("M", b(e), b(h), "L", b(t), b(h), "L", b(t), b(C), "L", b(e), b(C), "Z"); break; case f.moveTo: e = d[v++]; h = d[v++]; u.push("M", b(e), b(h)); break; case f.lineTo: e = d[v++]; h = d[v++]; u.push("L", b(e), b(h)); break; case f.curveTo: e = d[v + 4]; h = d[v + 5]; u.push("C", b(d[v]), b(d[v + 1]), b(d[v + 2]), b(d[v + 3]), b(e), b(h)); v += 6; break; case f.curveTo2: e = d[v + 2]; h = d[v + 3]; u.push("C", b(e), b(h), b(d[v]), b(d[v + 1]), b(d[v + 2]), b(d[v + 3])); v += 4; break; case f.curveTo3: e = d[v + 2]; h = d[v + 3]; u.push("C", b(d[v]), b(d[v + 1]), b(e), b(h), b(e), b(h)); v += 4; break; case f.closePath: u.push("Z") } g.path.setAttributeNS(null, "d", u.join(" ")); g.path.setAttributeNS(null, "stroke-miterlimit", b(g.miterLimit)); g.path.setAttributeNS(null, "stroke-linecap", g.lineCap); g.path.setAttributeNS(null, "stroke-linejoin", g.lineJoin); g.path.setAttributeNS(null, "stroke-width", b(g.lineWidth) + "px"); g.path.setAttributeNS(null, "stroke-dasharray", g.dashArray.map(b).join(" ")); g.path.setAttributeNS(null, "stroke-dashoffset", b(g.dashPhase) + "px"); g.path.setAttributeNS(null, "fill", "none"); this.tgrp.appendChild(g.path); g.pendingClip ? (this.cgrp.appendChild(this.tgrp), this.pgrp.appendChild(this.cgrp)) : this.pgrp.appendChild(this.tgrp); g.element = g.path; g.setCurrentPoint(e, h) }, endPath: function () { this.current.pendingClip ? (this.cgrp.appendChild(this.tgrp), this.pgrp.appendChild(this.cgrp)) : this.pgrp.appendChild(this.tgrp); this.tgrp = document.createElementNS("http://www.w3.org/2000/svg", "svg:g"); this.tgrp.setAttributeNS(null, "transform", d(this.transformMatrix)) }, clip: function (a) { var b = this.current; b.clipId = "clippath" + t; t++; this.clippath = document.createElementNS("http://www.w3.org/2000/svg", "svg:clipPath"); this.clippath.setAttributeNS(null, "id", b.clipId); var g = b.element.cloneNode(); "evenodd" === a ? g.setAttributeNS(null, "clip-rule", "evenodd") : g.setAttributeNS(null, "clip-rule", "nonzero"); this.clippath.setAttributeNS(null, "transform", d(this.transformMatrix)); this.clippath.appendChild(g); this.defs.appendChild(this.clippath); b.pendingClip = !0; this.cgrp = document.createElementNS("http://www.w3.org/2000/svg", "svg:g"); this.cgrp.setAttributeNS(null, "clip-path", "url(#" + b.clipId + ")"); this.pgrp.appendChild(this.cgrp) }, closePath: function () { var a = this.current, b = a.path.getAttributeNS(null, "d"); a.path.setAttributeNS(null, "d", b + "Z") }, setLeading: function (a) { this.current.leading = -a }, setTextRise: function (a) { this.current.textRise = a }, setHScale: function (a) { this.current.textHScale = a / 100 }, setGState: function (a) { for (var b = 0, d = a.length; b < d; b++) { var e = a[b], h = e[1]; switch (e[0]) { case "LW": this.setLineWidth(h); break; case "LC": this.setLineCap(h); break; case "LJ": this.setLineJoin(h); break; case "ML": this.setMiterLimit(h); break; case "D": this.setDash(h[0], h[1]); break; case "Font": this.setFont(h) } } }, fill: function () { var a = this.current; a.element.setAttributeNS(null, "fill", a.fillColor) }, stroke: function () { var a = this.current; a.element.setAttributeNS(null, "stroke", a.strokeColor); a.element.setAttributeNS(null, "fill", "none") }, eoFill: function () { var a = this.current; a.element.setAttributeNS(null, "fill", a.fillColor); a.element.setAttributeNS(null, "fill-rule", "evenodd") }, fillStroke: function () { this.stroke(); this.fill() }, eoFillStroke: function () { this.current.element.setAttributeNS(null, "fill-rule", "evenodd"); this.fillStroke() }, closeStroke: function () { this.closePath(); this.stroke() }, closeFillStroke: function () { this.closePath(); this.fillStroke() }, paintSolidColorImageMask: function () { var a = this.current, b = document.createElementNS("http://www.w3.org/2000/svg", "svg:rect"); b.setAttributeNS(null, "x", "0"); b.setAttributeNS(null, "y", "0"); b.setAttributeNS(null, "width", "1px"); b.setAttributeNS(null, "height", "1px"); b.setAttributeNS(null, "fill", a.fillColor); this.tgrp.appendChild(b) }, paintJpegXObject: function (a, d, g) { var e = this.current; a = this.objs.get(a); var h = document.createElementNS("http://www.w3.org/2000/svg", "svg:image"); h.setAttributeNS("http://www.w3.org/1999/xlink", "xlink:href", a.src); h.setAttributeNS(null, "width", a.width + "px"); h.setAttributeNS(null, "height", a.height + "px"); h.setAttributeNS(null, "x", "0"); h.setAttributeNS(null, "y", b(-g)); h.setAttributeNS(null, "transform", "scale(" + b(1 / d) + " " + b(-1 / g) + ")"); this.tgrp.appendChild(h); e.pendingClip ? (this.cgrp.appendChild(this.tgrp), this.pgrp.appendChild(this.cgrp)) : this.pgrp.appendChild(this.tgrp) }, paintImageXObject: function (a) { (a = this.objs.get(a)) ? this.paintInlineImageXObject(a) : E("Dependent image isn't ready yet") }, paintInlineImageXObject: function (a, d) { var g = this.current, e = a.width, h = a.height, f = u(a, this.forceDataSchema), c = document.createElementNS("http://www.w3.org/2000/svg", "svg:rect"); c.setAttributeNS(null, "x", "0"); c.setAttributeNS(null, "y", "0"); c.setAttributeNS(null, "width", b(e)); c.setAttributeNS(null, "height", b(h)); g.element = c; this.clip("nonzero"); c = document.createElementNS("http://www.w3.org/2000/svg", "svg:image"); c.setAttributeNS("http://www.w3.org/1999/xlink", "xlink:href", f); c.setAttributeNS(null, "x", "0"); c.setAttributeNS(null, "y", b(-h)); c.setAttributeNS(null, "width", b(e) + "px"); c.setAttributeNS(null, "height", b(h) + "px"); c.setAttributeNS(null, "transform", "scale(" + b(1 / e) + " " + b(-1 / h) + ")"); d ? d.appendChild(c) : this.tgrp.appendChild(c); g.pendingClip ? (this.cgrp.appendChild(this.tgrp), this.pgrp.appendChild(this.cgrp)) : this.pgrp.appendChild(this.tgrp) }, paintImageMaskXObject: function (a) { var d = this.current, g = a.width, e = a.height, h = d.fillColor; d.maskId = "mask" + y++; var f = document.createElementNS("http://www.w3.org/2000/svg", "svg:mask"); f.setAttributeNS(null, "id", d.maskId); var c = document.createElementNS("http://www.w3.org/2000/svg", "svg:rect"); c.setAttributeNS(null, "x", "0"); c.setAttributeNS(null, "y", "0"); c.setAttributeNS(null, "width", b(g)); c.setAttributeNS(null, "height", b(e)); c.setAttributeNS(null, "fill", h); c.setAttributeNS(null, "mask", "url(#" + d.maskId + ")"); this.defs.appendChild(f); this.tgrp.appendChild(c); this.paintInlineImageXObject(a, f) }, paintFormXObjectBegin: function (a, d) { this.save(); J(a) && 6 === a.length && this.transform(a[0], a[1], a[2], a[3], a[4], a[5]); if (J(d) && 4 === d.length) { var g = d[2] - d[0], e = d[3] - d[1], h = document.createElementNS("http://www.w3.org/2000/svg", "svg:rect"); h.setAttributeNS(null, "x", d[0]); h.setAttributeNS(null, "y", d[1]); h.setAttributeNS(null, "width", b(g)); h.setAttributeNS(null, "height", b(e)); this.current.element = h; this.clip("nonzero"); this.endPath() } }, paintFormXObjectEnd: function () { this.restore() } }; return L }(); b.SVGGraphics = a }); (function (b, d) { d(b.pdfjsDisplayAnnotationLayer = {}, b.pdfjsSharedUtil, b.pdfjsDisplayDOMUtils) })(this, function (b, d, m) { function B() { } var A = d.AnnotationBorderStyleType, f = d.AnnotationType, x = d.Util, D = m.addLinkAttributes, J = m.LinkTarget, E = m.getFilenameFromUrl, w = d.warn, u = m.CustomStyle, v = m.getDefaultSetting; B.prototype = { create: function (b) { switch (b.data.annotationType) { case f.LINK: return new C(b); case f.TEXT: return new n(b); case f.WIDGET: return new z(b); case f.POPUP: return new L(b); case f.HIGHLIGHT: return new q(b); case f.UNDERLINE: return new t(b); case f.SQUIGGLY: return new y(b); case f.STRIKEOUT: return new k(b); case f.FILEATTACHMENT: return new r(b); default: return new a(b) } } }; var a = function () { function a(b, d) { this.isRenderable = d || !1; this.data = b.data; this.layer = b.layer; this.page = b.page; this.viewport = b.viewport; this.linkService = b.linkService; this.downloadManager = b.downloadManager; this.imageResourcesPath = b.imageResourcesPath; d && (this.container = this._createContainer()) } a.prototype = { _createContainer: function () { var a = this.data, b = this.page, d = this.viewport, c = document.createElement("section"), g = a.rect[2] - a.rect[0], k = a.rect[3] - a.rect[1]; c.setAttribute("data-annotation-id", a.id); b = x.normalizeRect([a.rect[0], b.view[3] - a.rect[1] + b.view[1], a.rect[2], b.view[3] - a.rect[3] + b.view[1]]); u.setProp("transform", c, "matrix(" + d.transform.join(",") + ")"); u.setProp("transformOrigin", c, -b[0] + "px " + -b[1] + "px"); if (0 < a.borderStyle.width) { c.style.borderWidth = a.borderStyle.width + "px"; a.borderStyle.style !== A.UNDERLINE && (g -= 2 * a.borderStyle.width, k -= 2 * a.borderStyle.width); var d = a.borderStyle.horizontalCornerRadius, f = a.borderStyle.verticalCornerRadius; (0 < d || 0 < f) && u.setProp("borderRadius", c, d + "px / " + f + "px"); switch (a.borderStyle.style) { case A.SOLID: c.style.borderStyle = "solid"; break; case A.DASHED: c.style.borderStyle = "dashed"; break; case A.BEVELED: w("Unimplemented border style: beveled"); break; case A.INSET: w("Unimplemented border style: inset"); break; case A.UNDERLINE: c.style.borderBottomStyle = "solid" } a.color ? c.style.borderColor = x.makeCssRgb(a.color[0] | 0, a.color[1] | 0, a.color[2] | 0) : c.style.borderWidth = 0 } c.style.left = b[0] + "px"; c.style.top = b[1] + "px"; c.style.width = g + "px"; c.style.height = k + "px"; return c }, _createPopup: function (a, b, d) { b || (b = document.createElement("div"), b.style.height = a.style.height, b.style.width = a.style.width, a.appendChild(b)); b = (new l({ container: a, trigger: b, color: d.color, title: d.title, contents: d.contents, hideWrapper: !0 })).render(); b.style.left = a.style.width; a.appendChild(b) }, render: function () { throw Error("Abstract method AnnotationElement.render called"); } }; return a }(), C = function () { function b(d) { a.call(this, d, !0) } x.inherit(b, a, { render: function () { this.container.className = "linkAnnotation"; var a = document.createElement("a"); D(a, { url: this.data.url, target: this.data.newWindow ? J.BLANK : void 0 }); this.data.url || (this.data.action ? this._bindNamedAction(a, this.data.action) : this._bindLink(a, this.data.dest || null)); this.container.appendChild(a); return this.container }, _bindLink: function (a, b) { var d = this; a.href = this.linkService.getDestinationHash(b); a.onclick = function () { b && d.linkService.navigateTo(b); return !1 }; b && (a.className = "internalLink") }, _bindNamedAction: function (a, b) { var d = this; a.href = this.linkService.getAnchorUrl(""); a.onclick = function () { d.linkService.executeNamedAction(b); return !1 }; a.className = "internalLink" } }); return b }(), n = function () { function b(d) { a.call(this, d, !!(d.data.hasPopup || d.data.title || d.data.contents)) } x.inherit(b, a, { render: function () { this.container.className = "textAnnotation"; var a = document.createElement("img"); a.style.height = this.container.style.height; a.style.width = this.container.style.width; a.src = this.imageResourcesPath + "annotation-" + this.data.name.toLowerCase() + ".svg"; a.alt = "[{{type}} Annotation]"; a.dataset.l10nId = "text_annotation_type"; a.dataset.l10nArgs = JSON.stringify({ type: this.data.name }); this.data.hasPopup || this._createPopup(this.container, a, this.data); this.container.appendChild(a); return this.container } }); return b }(), z = function () { function b(d) { a.call(this, d, !d.data.hasAppearance && !!d.data.fieldValue) } x.inherit(b, a, { render: function () { var a = document.createElement("div"); a.textContent = this.data.fieldValue; a.style.textAlign = ["left", "center", "right"][this.data.textAlignment]; a.style.verticalAlign = "middle"; a.style.display = "table-cell"; var b = this.data.fontRefName ? this.page.commonObjs.getData(this.data.fontRefName) : null; this._setTextStyle(a, b); this.container.appendChild(a); return this.container }, _setTextStyle: function (a, b) { var d = a.style; d.fontSize = this.data.fontSize + "px"; d.direction = 0 > this.data.fontDirection ? "rtl" : "ltr"; b && (d.fontWeight = b.black ? b.bold ? "900" : "bold" : b.bold ? "bold" : "normal", d.fontStyle = b.italic ? "italic" : "normal", d.fontFamily = (b.loadedName ? '"' + b.loadedName + '", ' : "") + (b.fallbackName || "Helvetica, sans-serif")) } }); return b }(), L = function () { function b(d) { a.call(this, d, !(!d.data.title && !d.data.contents)) } x.inherit(b, a, { render: function () { this.container.className = "popupAnnotation"; var a = this.layer.querySelector('[data-annotation-id="' + this.data.parentId + '"]'); if (!a) return this.container; var b = new l({ container: this.container, trigger: a, color: this.data.color, title: this.data.title, contents: this.data.contents }), d = parseFloat(a.style.left), c = parseFloat(a.style.width); u.setProp("transformOrigin", this.container, -(d + c) + "px -" + a.style.top); this.container.style.left = d + c + "px"; this.container.appendChild(b.render()); return this.container } }); return b }(), l = function () { function a(b) { this.container = b.container; this.trigger = b.trigger; this.color = b.color; this.title = b.title; this.contents = b.contents; this.hideWrapper = b.hideWrapper || !1; this.pinned = !1 } a.prototype = { render: function () { var a = document.createElement("div"); a.className = "popupWrapper"; this.hideElement = this.hideWrapper ? a : this.container; this.hideElement.setAttribute("hidden", !0); var b = document.createElement("div"); b.className = "popup"; var d = this.color; d && (b.style.backgroundColor = x.makeCssRgb(.7 * (255 - d[0]) + d[0] | 0, .7 * (255 - d[1]) + d[1] | 0, .7 * (255 - d[2]) + d[2] | 0)); var d = this._formatContents(this.contents), c = document.createElement("h1"); c.textContent = this.title; this.trigger.addEventListener("click", this._toggle.bind(this)); this.trigger.addEventListener("mouseover", this._show.bind(this, !1)); this.trigger.addEventListener("mouseout", this._hide.bind(this, !1)); b.addEventListener("click", this._hide.bind(this, !0)); b.appendChild(c); b.appendChild(d); a.appendChild(b); return a }, _formatContents: function (a) { var b = document.createElement("p"); a = a.split(/(?:\r\n?|\n)/); for (var d = 0, c = a.length; d < c; ++d) b.appendChild(document.createTextNode(a[d])), d < c - 1 && b.appendChild(document.createElement("br")); return b }, _toggle: function () { this.pinned ? this._hide(!0) : this._show(!0) }, _show: function (a) { a && (this.pinned = !0); this.hideElement.hasAttribute("hidden") && (this.hideElement.removeAttribute("hidden"), this.container.style.zIndex += 1) }, _hide: function (a) { a && (this.pinned = !1); this.hideElement.hasAttribute("hidden") || this.pinned || (this.hideElement.setAttribute("hidden", !0), --this.container.style.zIndex) } }; return a }(), q = function () { function b(d) { a.call(this, d, !!(d.data.hasPopup || d.data.title || d.data.contents)) } x.inherit(b, a, { render: function () { this.container.className = "highlightAnnotation"; this.data.hasPopup || this._createPopup(this.container, null, this.data); return this.container } }); return b }(), t = function () { function b(d) { a.call(this, d, !!(d.data.hasPopup || d.data.title || d.data.contents)) } x.inherit(b, a, { render: function () { this.container.className = "underlineAnnotation"; this.data.hasPopup || this._createPopup(this.container, null, this.data); return this.container } }); return b }(), y = function () { function b(d) { a.call(this, d, !!(d.data.hasPopup || d.data.title || d.data.contents)) } x.inherit(b, a, { render: function () { this.container.className = "squigglyAnnotation"; this.data.hasPopup || this._createPopup(this.container, null, this.data); return this.container } }); return b }(), k = function () { function b(d) { a.call(this, d, !!(d.data.hasPopup || d.data.title || d.data.contents)) } x.inherit(b, a, { render: function () { this.container.className = "strikeoutAnnotation"; this.data.hasPopup || this._createPopup(this.container, null, this.data); return this.container } }); return b }(), r = function () { function b(d) { a.call(this, d, !0); this.filename = E(d.data.file.filename); this.content = d.data.file.content } x.inherit(b, a, { render: function () { this.container.className = "fileAttachmentAnnotation"; var a = document.createElement("div"); a.style.height = this.container.style.height; a.style.width = this.container.style.width; a.addEventListener("dblclick", this._download.bind(this)); this.data.hasPopup || !this.data.title && !this.data.contents || this._createPopup(this.container, a, this.data); this.container.appendChild(a); return this.container }, _download: function () { this.downloadManager ? this.downloadManager.downloadData(this.content, this.filename, "") : w("Download cannot be started due to unavailable download manager") } }); return b }(); d = function () { return { render: function (a) { for (var b = new B, d = 0, k = a.annotations.length; d < k; d++) { var c = a.annotations[d]; c && (c = { data: c, layer: a.div, page: a.page, viewport: a.viewport, linkService: a.linkService, downloadManager: a.downloadManager, imageResourcesPath: a.imageResourcesPath || v("imageResourcesPath") }, c = b.create(c), c.isRenderable && a.div.appendChild(c.render())) } }, update: function (a) { for (var b = 0, d = a.annotations.length; b < d; b++) { var k = a.div.querySelector('[data-annotation-id="' + a.annotations[b].id + '"]'); k && u.setProp("transform", k, "matrix(" + a.viewport.transform.join(",") + ")") } a.div.removeAttribute("hidden") } } }(); b.AnnotationLayer = d }); (function (b, d) { d(b.pdfjsDisplayTextLayer = {}, b.pdfjsSharedUtil, b.pdfjsDisplayDOMUtils) })(this, function (b, d, m) { var B = d.Util, A = d.createPromiseCapability, f = m.CustomStyle, x = m.getDefaultSetting; d = function () { function b(d, f, a, C) { C = C[a.fontName]; var n = document.createElement("div"); d.push(n); if (w.test(a.str)) { var z = B.transform(f.transform, a.transform); d = Math.atan2(z[1], z[0]); C.vertical && (d += Math.PI / 2); var m = Math.sqrt(z[2] * z[2] + z[3] * z[3]), l = m; C.ascent ? l *= C.ascent : C.descent && (l *= 1 + C.descent); var q; 0 === d ? (q = z[4], z = z[5] - l) : (q = z[4] + l * Math.sin(d), z = z[5] - l * Math.cos(d)); n.style.left = q + "px"; n.style.top = z + "px"; n.style.fontSize = m + "px"; n.style.fontFamily = C.fontFamily; n.textContent = a.str; x("pdfBug") && (n.dataset.fontName = a.fontName); 0 !== d && (n.dataset.angle = 180 / Math.PI * d); 1 < a.str.length && (n.dataset.canvasWidth = C.vertical ? a.height * f.scale : a.width * f.scale) } else n.dataset.isWhitespace = !0 } function d(b) { if (!b._canceled) { var v = b._container, a = b._textDivs; b = b._capability; var C = a.length; if (!(1E5 < C)) { var n = document.createElement("canvas"); n.mozOpaque = !0; for (var n = n.getContext("2d", { alpha: !1 }), z, m, l = 0; l < C; l++) { var q = a[l]; if (void 0 === q.dataset.isWhitespace) { var t = q.style.fontSize, w = q.style.fontFamily; if (t !== z || w !== m) n.font = t + " " + w, z = t, m = w; t = n.measureText(q.textContent).width; 0 < t && (v.appendChild(q), t = void 0 !== q.dataset.canvasWidth ? "scaleX(" + q.dataset.canvasWidth / t + ")" : "", (w = q.dataset.angle) && (t = "rotate(" + w + "deg) " + t), t && f.setProp("transform", q, t)) } } } b.resolve() } } function m(b, d, a, f) { this._textContent = b; this._container = d; this._viewport = a; this._textDivs = f = f || []; this._canceled = !1; this._capability = A(); this._renderTimer = null } var w = /\S/; m.prototype = { get promise() { return this._capability.promise }, cancel: function () { this._canceled = !0; null !== this._renderTimer && (clearTimeout(this._renderTimer), this._renderTimer = null); this._capability.reject("canceled") }, _render: function (f) { for (var v = this._textContent.items, a = this._textContent.styles, C = this._textDivs, n = this._viewport, z = 0, m = v.length; z < m; z++) b(C, n, v[z], a); if (f) { var l = this; this._renderTimer = setTimeout(function () { d(l); l._renderTimer = null }, f) } else d(this) } }; return function (b) { var d = new m(b.textContent, b.container, b.viewport, b.textDivs); d._render(b.timeout); return d } }(); b.renderTextLayer = d }); (function (b, d) { d(b.pdfjsDisplayWebGL = {}, b.pdfjsSharedUtil, b.pdfjsDisplayDOMUtils) })(this, function (b, d, m) { var B = d.shadow, A = m.getDefaultSetting; d = function () { function b(a, d, f) { f = a.createShader(f); a.shaderSource(f, d); a.compileShader(f); if (!a.getShaderParameter(f, a.COMPILE_STATUS)) throw a = a.getShaderInfoLog(f), Error("Error during shader compilation: " + a); return f } function d(a, b) { for (var f = a.createProgram(), v = 0, u = b.length; v < u; ++v) a.attachShader(f, b[v]); a.linkProgram(f); if (!a.getProgramParameter(f, a.LINK_STATUS)) throw f = a.getProgramInfoLog(f), Error("Error during program linking: " + f); return f } function m(a, b, d) { a.activeTexture(d); d = a.createTexture(); a.bindTexture(a.TEXTURE_2D, d); a.texParameteri(a.TEXTURE_2D, a.TEXTURE_WRAP_S, a.CLAMP_TO_EDGE); a.texParameteri(a.TEXTURE_2D, a.TEXTURE_WRAP_T, a.CLAMP_TO_EDGE); a.texParameteri(a.TEXTURE_2D, a.TEXTURE_MIN_FILTER, a.NEAREST); a.texParameteri(a.TEXTURE_2D, a.TEXTURE_MAG_FILTER, a.NEAREST); a.texImage2D(a.TEXTURE_2D, 0, a.RGBA, a.RGBA, a.UNSIGNED_BYTE, b); return d } function D() { E || (w = document.createElement("canvas"), E = w.getContext("webgl", { premultipliedalpha: !1 })) } var E, w, u = null, v = null; return { get isEnabled() { if (A("disableWebGL")) return !1; var a = !1; try { D(), a = !!E } catch (b) { } return B(this, "isEnabled", a) }, composeSMask: function (a, v, n) { var z = a.width, L = a.height; if (!u) { var l, q; D(); l = w; w = null; q = E; E = null; var t = b(q, " attribute vec2 a_position; attribute vec2 a_texCoord; uniform vec2 u_resolution; varying vec2 v_texCoord; void main() { vec2 clipSpace = (a_position / u_resolution) * 2.0 - 1.0; gl_Position = vec4(clipSpace * vec2(1, -1), 0, 1); v_texCoord = a_texCoord; } ", q.VERTEX_SHADER), y = b(q, " precision mediump float; uniform vec4 u_backdrop; uniform int u_subtype; uniform sampler2D u_image; uniform sampler2D u_mask; varying vec2 v_texCoord; void main() { vec4 imageColor = texture2D(u_image, v_texCoord); vec4 maskColor = texture2D(u_mask, v_texCoord); if (u_backdrop.a > 0.0) { maskColor.rgb = maskColor.rgb * maskColor.a + u_backdrop.rgb * (1.0 - maskColor.a); } float lum; if (u_subtype == 0) { lum = maskColor.a; } else { lum = maskColor.r * 0.3 + maskColor.g * 0.59 + maskColor.b * 0.11; } imageColor.a *= lum; imageColor.rgb *= imageColor.a; gl_FragColor = imageColor; } ", q.FRAGMENT_SHADER), k = d(q, [t, y]); q.useProgram(k); t = {}; t.gl = q; t.canvas = l; t.resolutionLocation = q.getUniformLocation(k, "u_resolution"); t.positionLocation = q.getAttribLocation(k, "a_position"); t.backdropLocation = q.getUniformLocation(k, "u_backdrop"); t.subtypeLocation = q.getUniformLocation(k, "u_subtype"); l = q.getAttribLocation(k, "a_texCoord"); var y = q.getUniformLocation(k, "u_image"), k = q.getUniformLocation(k, "u_mask"), r = q.createBuffer(); q.bindBuffer(q.ARRAY_BUFFER, r); q.bufferData(q.ARRAY_BUFFER, new Float32Array([0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1]), q.STATIC_DRAW); q.enableVertexAttribArray(l); q.vertexAttribPointer(l, 2, q.FLOAT, !1, 0, 0); q.uniform1i(y, 0); q.uniform1i(k, 1); u = t } q = u; t = q.canvas; l = q.gl; t.width = z; t.height = L; l.viewport(0, 0, l.drawingBufferWidth, l.drawingBufferHeight); l.uniform2f(q.resolutionLocation, z, L); n.backdrop ? l.uniform4f(q.resolutionLocation, n.backdrop[0], n.backdrop[1], n.backdrop[2], 1) : l.uniform4f(q.resolutionLocation, 0, 0, 0, 0); l.uniform1i(q.subtypeLocation, "Luminosity" === n.subtype ? 1 : 0); a = m(l, a, l.TEXTURE0); v = m(l, v, l.TEXTURE1); n = l.createBuffer(); l.bindBuffer(l.ARRAY_BUFFER, n); l.bufferData(l.ARRAY_BUFFER, new Float32Array([0, 0, z, 0, 0, L, 0, L, z, 0, z, L]), l.STATIC_DRAW); l.enableVertexAttribArray(q.positionLocation); l.vertexAttribPointer(q.positionLocation, 2, l.FLOAT, !1, 0, 0); l.clearColor(0, 0, 0, 0); l.enable(l.BLEND); l.blendFunc(l.ONE, l.ONE_MINUS_SRC_ALPHA); l.clear(l.COLOR_BUFFER_BIT); l.drawArrays(l.TRIANGLES, 0, 6); l.flush(); l.deleteTexture(a); l.deleteTexture(v); l.deleteBuffer(n); return t }, drawFigures: function (a, u, n, m, L) { if (!v) { var l, q; D(); l = w; w = null; q = E; E = null; var t = b(q, " attribute vec2 a_position; attribute vec3 a_color; uniform vec2 u_resolution; uniform vec2 u_scale; uniform vec2 u_offset; varying vec4 v_color; void main() { vec2 position = (a_position + u_offset) * u_scale; vec2 clipSpace = (position / u_resolution) * 2.0 - 1.0; gl_Position = vec4(clipSpace * vec2(1, -1), 0, 1); v_color = vec4(a_color / 255.0, 1.0); } ", q.VERTEX_SHADER), y = b(q, " precision mediump float; varying vec4 v_color; void main() { gl_FragColor = v_color; } ", q.FRAGMENT_SHADER), t = d(q, [t, y]); q.useProgram(t); y = {}; y.gl = q; y.canvas = l; y.resolutionLocation = q.getUniformLocation(t, "u_resolution"); y.scaleLocation = q.getUniformLocation(t, "u_scale"); y.offsetLocation = q.getUniformLocation(t, "u_offset"); y.positionLocation = q.getAttribLocation(t, "a_position"); y.colorLocation = q.getAttribLocation(t, "a_color"); v = y } l = v; q = l.canvas; t = l.gl; q.width = a; q.height = u; t.viewport(0, 0, t.drawingBufferWidth, t.drawingBufferHeight); t.uniform2f(l.resolutionLocation, a, u); a = 0; var k, r, g; k = 0; for (r = m.length; k < r; k++) switch (m[k].type) { case "lattice": g = m[k].coords.length / m[k].verticesPerRow | 0; a += (g - 1) * (m[k].verticesPerRow - 1) * 6; break; case "triangles": a += m[k].coords.length } y = new Float32Array(2 * a); u = new Uint8Array(3 * a); var e = L.coords, h = L.colors, F = 0, c = 0; k = 0; for (r = m.length; k < r; k++) { g = m[k]; var B = g.coords, A = g.colors; switch (g.type) { case "lattice": var H = g.verticesPerRow; g = B.length / H | 0; for (var R = 1; R < g; R++) for (var M = R * H + 1, N = 1; N < H; N++, M++) y[F] = e[B[M - H - 1]], y[F + 1] = e[B[M - H - 1] + 1], y[F + 2] = e[B[M - H]], y[F + 3] = e[B[M - H] + 1], y[F + 4] = e[B[M - 1]], y[F + 5] = e[B[M - 1] + 1], u[c] = h[A[M - H - 1]], u[c + 1] = h[A[M - H - 1] + 1], u[c + 2] = h[A[M - H - 1] + 2], u[c + 3] = h[A[M - H]], u[c + 4] = h[A[M - H] + 1], u[c + 5] = h[A[M - H] + 2], u[c + 6] = h[A[M - 1]], u[c + 7] = h[A[M - 1] + 1], u[c + 8] = h[A[M - 1] + 2], y[F + 6] = y[F + 2], y[F + 7] = y[F + 3], y[F + 8] = y[F + 4], y[F + 9] = y[F + 5], y[F + 10] = e[B[M]], y[F + 11] = e[B[M] + 1], u[c + 9] = u[c + 3], u[c + 10] = u[c + 4], u[c + 11] = u[c + 5], u[c + 12] = u[c + 6], u[c + 13] = u[c + 7], u[c + 14] = u[c + 8], u[c + 15] = h[A[M]], u[c + 16] = h[A[M] + 1], u[c + 17] = h[A[M] + 2], F += 12, c += 18; break; case "triangles": for (g = 0, H = B.length; g < H; g++) y[F] = e[B[g]], y[F + 1] = e[B[g] + 1], u[c] = h[A[g]], u[c + 1] = h[A[g] + 1], u[c + 2] = h[A[g] + 2], F += 2, c += 3 } } n ? t.clearColor(n[0] / 255, n[1] / 255, n[2] / 255, 1) : t.clearColor(0, 0, 0, 0); t.clear(t.COLOR_BUFFER_BIT); n = t.createBuffer(); t.bindBuffer(t.ARRAY_BUFFER, n); t.bufferData(t.ARRAY_BUFFER, y, t.STATIC_DRAW); t.enableVertexAttribArray(l.positionLocation); t.vertexAttribPointer(l.positionLocation, 2, t.FLOAT, !1, 0, 0); m = t.createBuffer(); t.bindBuffer(t.ARRAY_BUFFER, m); t.bufferData(t.ARRAY_BUFFER, u, t.STATIC_DRAW); t.enableVertexAttribArray(l.colorLocation); t.vertexAttribPointer(l.colorLocation, 3, t.UNSIGNED_BYTE, !1, 0, 0); t.uniform2f(l.scaleLocation, L.scaleX, L.scaleY); t.uniform2f(l.offsetLocation, L.offsetX, L.offsetY); t.drawArrays(t.TRIANGLES, 0, a); t.flush(); t.deleteBuffer(n); t.deleteBuffer(m); return q }, clear: function () { u && u.canvas && (u.canvas.width = 0, u.canvas.height = 0); v && v.canvas && (v.canvas.width = 0, v.canvas.height = 0); v = u = null } } }(); b.WebGLUtils = d }); (function (b, d) { d(b.pdfjsDisplayPatternHelper = {}, b.pdfjsSharedUtil, b.pdfjsDisplayWebGL) })(this, function (b, d, m) { var B = d.Util, A = d.info, f = d.isArray, x = d.error, D = m.WebGLUtils, J = { RadialAxial: { fromIR: function (b) { var d = b[1], f = b[2], a = b[3], m = b[4], n = b[5], z = b[6]; return { type: "Pattern", getPattern: function (b) { var l; "axial" === d ? l = b.createLinearGradient(a[0], a[1], m[0], m[1]) : "radial" === d && (l = b.createRadialGradient(a[0], a[1], n, m[0], m[1], z)); b = 0; for (var q = f.length; b < q; ++b) { var t = f[b]; l.addColorStop(t[0], t[1]) } return l } } } } }, E = function () { function b(d, f, a, m, n, z, w, l) { var q = f.coords, t = f.colors, y = d.data; d = 4 * d.width; var k; q[a + 1] > q[m + 1] && (k = a, a = m, m = k, k = z, z = w, w = k); q[m + 1] > q[n + 1] && (k = m, m = n, n = k, k = w, w = l, l = k); q[a + 1] > q[m + 1] && (k = a, a = m, m = k, k = z, z = w, w = k); k = (q[a] + f.offsetX) * f.scaleX; a = (q[a + 1] + f.offsetY) * f.scaleY; var r = (q[m] + f.offsetX) * f.scaleX; m = (q[m + 1] + f.offsetY) * f.scaleY; var g = (q[n] + f.offsetX) * f.scaleX; f = (q[n + 1] + f.offsetY) * f.scaleY; if (!(a >= f)) { n = t[z]; q = t[z + 1]; z = t[z + 2]; var e = t[w], h = t[w + 1]; w = t[w + 2]; var A = t[l], c = t[l + 1]; l = t[l + 2]; for (var t = Math.round(f), B, x, H, R, M, N, Y, D, G, T = Math.round(a) ; T <= t; T++) { T < m ? (G = T < a ? 0 : a === m ? 1 : (a - T) / (a - m), B = k - (k - r) * G, x = n - (n - e) * G, H = q - (q - h) * G, R = z - (z - w) * G) : (G = T > f ? 1 : m === f ? 0 : (m - T) / (m - f), B = r - (r - g) * G, x = e - (e - A) * G, H = h - (h - c) * G, R = w - (w - l) * G); G = T < a ? 0 : T > f ? 1 : (a - T) / (a - f); M = k - (k - g) * G; N = n - (n - A) * G; Y = q - (q - c) * G; D = z - (z - l) * G; G = Math.round(Math.min(B, M)); for (var fa = Math.round(Math.max(B, M)), E = d * T + 4 * G, W = G; W <= fa; W++) G = (B - W) / (B - M), G = 0 > G ? 0 : 1 < G ? 1 : G, y[E++] = x - (x - N) * G | 0, y[E++] = H - (H - Y) * G | 0, y[E++] = R - (R - D) * G | 0, y[E++] = 255 } } } return function (d, f, a, m, n, z, B) { var l = Math.floor(d[0]), q = Math.floor(d[1]), t = Math.ceil(d[2]) - l; d = Math.ceil(d[3]) - q; var y = Math.min(Math.ceil(Math.abs(t * f[0] * 1.1)), 3E3); f = Math.min(Math.ceil(Math.abs(d * f[1] * 1.1)), 3E3); t /= y; d /= f; a = { coords: a, colors: m, offsetX: -l, offsetY: -q, scaleX: 1 / t, scaleY: 1 / d }; m = y + 4; var k = f + 4; if (D.isEnabled) n = D.drawFigures(y, f, z, n, a), B = B.getCanvas("mesh", m, k, !1), B.context.drawImage(n, 2, 2); else { B = B.getCanvas("mesh", m, k, !1); m = B.context; f = m.createImageData(y, f); if (z) for (var r = f.data, y = 0, k = r.length; y < k; y += 4) r[y] = z[0], r[y + 1] = z[1], r[y + 2] = z[2], r[y + 3] = 255; for (y = 0; y < n.length; y++) { z = f; var g = n[y], k = a, r = g.coords, e = g.colors, h = void 0, A = void 0; switch (g.type) { case "lattice": for (var g = g.verticesPerRow, A = Math.floor(r.length / g) - 1, c = g - 1, h = 0; h < A; h++) for (var E = h * g, J = 0; J < c; J++, E++) b(z, k, r[E], r[E + 1], r[E + g], e[E], e[E + 1], e[E + g]), b(z, k, r[E + g + 1], r[E + 1], r[E + g], e[E + g + 1], e[E + 1], e[E + g]); break; case "triangles": h = 0; for (A = r.length; h < A; h += 3) b(z, k, r[h], r[h + 1], r[h + 2], e[h], e[h + 1], e[h + 2]); break; default: x("illigal figure") } } m.putImageData(f, 2, 2) } n = B.canvas; return { canvas: n, offsetX: l - 2 * t, offsetY: q - 2 * d, scaleX: t, scaleY: d } } }(); J.Mesh = { fromIR: function (b) { var d = b[2], f = b[3], a = b[4], m = b[5], n = b[6], z = b[8]; return { type: "Pattern", getPattern: function (b, l, q) { var t; if (q) t = B.singularValueDecompose2dScale(b.mozCurrentTransform); else if (t = B.singularValueDecompose2dScale(l.baseTransform), n) { var w = B.singularValueDecompose2dScale(n); t = [t[0] * w[0], t[1] * w[1]] } t = E(m, t, d, f, a, q ? null : z, l.cachedCanvases); q || (b.setTransform.apply(b, l.baseTransform), n && b.transform.apply(b, n)); b.translate(t.offsetX, t.offsetY); b.scale(t.scaleX, t.scaleY); return b.createPattern(t.canvas, "no-repeat") } } } }; J.Dummy = { fromIR: function () { return { type: "Pattern", getPattern: function () { return "hotpink" } } } }; d = function () { function b(d, f, a, m, n) { this.operatorList = d[2]; this.matrix = d[3] || [1, 0, 0, 1, 0, 0]; this.bbox = d[4]; this.xstep = d[5]; this.ystep = d[6]; this.paintType = d[7]; this.tilingType = d[8]; this.color = f; this.canvasGraphicsFactory = m; this.baseTransform = n; this.type = "Pattern"; this.ctx = a } b.prototype = { createPatternCanvas: function (b) { var d = this.operatorList, a = this.bbox, f = this.xstep, n = this.ystep, m = this.paintType, w = this.color, l = this.canvasGraphicsFactory; A("TilingType: " + this.tilingType); var q = a[0], t = a[1], y = a[2], k = a[3], r = [q, t], g = [q + f, t + n], e = g[0] - r[0], g = g[1] - r[1], h = B.singularValueDecompose2dScale(this.matrix), x = B.singularValueDecompose2dScale(this.baseTransform), h = [h[0] * x[0], h[1] * x[1]], e = Math.min(Math.ceil(Math.abs(e * h[0])), 3E3), g = Math.min(Math.ceil(Math.abs(g * h[1])), 3E3), h = b.cachedCanvases.getCanvas("pattern", e, g, !0), x = h.context, l = l.createCanvasGraphics(x); l.groupLevel = b.groupLevel; this.setFillAndStrokeStyleToContext(x, m, w); this.setScale(e, g, f, n); this.transformToScale(l); l.transform.apply(l, [1, 0, 0, 1, -r[0], -r[1]]); this.clipBbox(l, a, q, t, y, k); l.executeOperatorList(d); return h.canvas }, setScale: function (b, d, a, f) { this.scale = [b / a, d / f] }, transformToScale: function (b) { var d = this.scale; b.transform.apply(b, [d[0], 0, 0, d[1], 0, 0]) }, scaleToContext: function () { var b = this.scale; this.ctx.scale(1 / b[0], 1 / b[1]) }, clipBbox: function (b, d, a, m, n, w) { d && f(d) && 4 === d.length && (b.ctx.rect(a, m, n - a, w - m), b.clip(), b.endPath()) }, setFillAndStrokeStyleToContext: function (b, d, a) { switch (d) { case 1: d = this.ctx; b.fillStyle = d.fillStyle; b.strokeStyle = d.strokeStyle; break; case 2: d = B.makeCssRgb(a[0], a[1], a[2]); b.fillStyle = d; b.strokeStyle = d; break; default: x("Unsupported paint type: " + d) } }, getPattern: function (b, d) { var a = this.createPatternCanvas(d); b = this.ctx; b.setTransform.apply(b, this.baseTransform); b.transform.apply(b, this.matrix); this.scaleToContext(); return b.createPattern(a, "repeat") } }; return b }(); b.getShadingPatternFromIR = function (b) { var d = J[b[0]]; d || x("Unknown IR type: " + b[0]); return d.fromIR(b) }; b.TilingPattern = d }); (function (b, d) { d(b.pdfjsDisplayCanvas = {}, b.pdfjsSharedUtil, b.pdfjsDisplayDOMUtils, b.pdfjsDisplayPatternHelper, b.pdfjsDisplayWebGL) })(this, function (b, d, m, B, A) { function f(a, b) { var c = document.createElement("canvas"); c.width = a; c.height = b; return c } function x(a) { a.mozCurrentTransform || (a._originalSave = a.save, a._originalRestore = a.restore, a._originalRotate = a.rotate, a._originalScale = a.scale, a._originalTranslate = a.translate, a._originalTransform = a.transform, a._originalSetTransform = a.setTransform, a._transformMatrix = a._transformMatrix || [1, 0, 0, 1, 0, 0], a._transformStack = [], Object.defineProperty(a, "mozCurrentTransform", { get: function () { return this._transformMatrix } }), Object.defineProperty(a, "mozCurrentTransformInverse", { get: function () { var a = this._transformMatrix, b = a[0], c = a[1], d = a[2], e = a[3], f = a[4], a = a[5], g = b * e - c * d, h = c * d - b * e; return [e / g, c / h, d / h, b / g, (e * f - d * a) / h, (c * f - b * a) / g] } }), a.save = function () { var a = this._transformMatrix; this._transformStack.push(a); this._transformMatrix = a.slice(0, 6); this._originalSave() }, a.restore = function () { var a = this._transformStack.pop(); a && (this._transformMatrix = a, this._originalRestore()) }, a.translate = function (a, b) { var c = this._transformMatrix; c[4] = c[0] * a + c[2] * b + c[4]; c[5] = c[1] * a + c[3] * b + c[5]; this._originalTranslate(a, b) }, a.scale = function (a, b) { var c = this._transformMatrix; c[0] *= a; c[1] *= a; c[2] *= b; c[3] *= b; this._originalScale(a, b) }, a.transform = function (b, c, d, e, f, g) { var h = this._transformMatrix; this._transformMatrix = [h[0] * b + h[2] * c, h[1] * b + h[3] * c, h[0] * d + h[2] * e, h[1] * d + h[3] * e, h[0] * f + h[2] * g + h[4], h[1] * f + h[3] * g + h[5]]; a._originalTransform(b, c, d, e, f, g) }, a.setTransform = function (b, c, d, e, f, g) { this._transformMatrix = [b, c, d, e, f, g]; a._originalSetTransform(b, c, d, e, f, g) }, a.rotate = function (a) { var b = Math.cos(a), c = Math.sin(a), d = this._transformMatrix; this._transformMatrix = [d[0] * b + d[2] * c, d[1] * b + d[3] * c, d[0] * -c + d[2] * b, d[1] * -c + d[3] * b, d[4], d[5]]; this._originalRotate(a) }) } function D(a) { var b = a.width, c = a.height, d, e, f = b + 1, g = new Uint8Array(f * (c + 1)), h = new Uint8Array([0, 2, 4, 0, 1, 0, 5, 4, 8, 10, 0, 8, 0, 2, 1, 0]), k = b + 7 & -8, n = a.data, m = new Uint8Array(k * c), l = 0; a = 0; for (d = n.length; a < d; a++) { e = 128; for (var O = n[a]; 0 < e;) m[l++] = O & e ? 0 : 255, e >>= 1 } l = n = 0; 0 !== m[l] && (g[0] = 1, ++n); for (d = 1; d < b; d++) m[l] !== m[l + 1] && (g[d] = m[l] ? 2 : 1, ++n), l++; 0 !== m[l] && (g[d] = 2, ++n); for (a = 1; a < c; a++) { l = a * k; e = a * f; m[l - k] !== m[l] && (g[e] = m[l] ? 1 : 8, ++n); O = (m[l] ? 4 : 0) + (m[l - k] ? 8 : 0); for (d = 1; d < b; d++) O = (O >> 2) + (m[l + 1] ? 4 : 0) + (m[l - k + 1] ? 8 : 0), h[O] && (g[e + d] = h[O], ++n), l++; m[l - k] !== m[l] && (g[e + d] = m[l] ? 2 : 4, ++n); if (1E3 < n) return null } l = k * (c - 1); e = a * f; 0 !== m[l] && (g[e] = 8, ++n); for (d = 1; d < b; d++) m[l] !== m[l + 1] && (g[e + d] = m[l] ? 4 : 8, ++n), l++; 0 !== m[l] && (g[e + d] = 4, ++n); if (1E3 < n) return null; var h = new Int32Array([0, f, -1, 0, -f, 0, 0, 0, 1]), I = []; for (a = 0; n && a <= c; a++) { k = a * f; for (m = k + b; k < m && !g[k];) k++; if (k !== m) { m = [k % f, a]; l = g[k]; d = k; do { e = h[l]; do k += e; while (!g[k]); e = g[k]; 5 !== e && 10 !== e ? (l = e, g[k] = 0) : (l = e & 51 * l >> 4, g[k] &= l >> 2 | l << 2); m.push(k % f); m.push(k / f | 0); --n } while (d !== k); I.push(m); --a } } return function (a) { a.save(); a.scale(1 / b, -1 / c); a.translate(0, -c); a.beginPath(); for (var d = 0, O = I.length; d < O; d++) { var e = I[d]; a.moveTo(e[0], e[1]); for (var f = 2, g = e.length; f < g; f += 2) a.lineTo(e[f], e[f + 1]) } a.fill(); a.beginPath(); a.restore() } } var J = d.FONT_IDENTITY_MATRIX, E = d.IDENTITY_MATRIX, w = d.ImageKind, u = d.OPS, v = d.TextRenderingMode, a = d.Uint32ArrayView, C = d.Util, n = d.assert, z = d.info, L = d.isNum, l = d.isArray, q = d.isLittleEndian, t = d.error, y = d.shadow, k = d.warn, r = B.TilingPattern, g = B.getShadingPatternFromIR, e = A.WebGLUtils, h = m.hasCanvasTypedArrays, F = { get value() { return y(F, "value", h()) } }, c = { get value() { return y(c, "value", q()) } }, P = function () { function a() { this.cache = Object.create(null) } a.prototype = { getCanvas: function (a, b, c, d) { void 0 !== this.cache[a] ? (a = this.cache[a], a.canvas.width = b, a.canvas.height = c, a.context.setTransform(1, 0, 0, 1, 0, 0)) : (b = f(b, c), c = b.getContext("2d"), d && x(c), this.cache[a] = a = { canvas: b, context: c }); return a }, clear: function () { for (var a in this.cache) { var b = this.cache[a]; b.canvas.width = 0; b.canvas.height = 0; delete this.cache[a] } } }; return a }(), da = function () { function a(b) { this.alphaIsShape = !1; this.fontSize = 0; this.fontSizeScale = 1; this.textMatrix = E; this.textMatrixScale = 1; this.fontMatrix = J; this.wordSpacing = this.charSpacing = this.lineY = this.lineX = this.y = this.x = this.leading = 0; this.textHScale = 1; this.textRenderingMode = v.FILL; this.textRise = 0; this.strokeColor = this.fillColor = "#000000"; this.patternFill = !1; this.lineWidth = this.strokeAlpha = this.fillAlpha = 1; this.resumeSMaskCtx = this.activeSMask = null; this.old = b } a.prototype = { clone: function () { return Object.create(this) }, setCurrentPoint: function (a, b) { this.x = a; this.y = b } }; return a }(); d = function () { function b(a, c, d, e) { this.ctx = a; this.current = new da; this.stateStack = []; this._geometryPathStack = []; this.pendingClip = null; this.pendingEOFill = !1; this.xobjs = this.res = null; this.commonObjs = c; this.objs = d; this.imageLayer = e; this.groupStack = []; this.baseTransform = this.processingType3 = null; this.baseTransformStack = []; this.groupLevel = 0; this.smaskStack = []; this.smaskCounter = 0; this.tempSMask = null; this.cachedCanvases = new P; a && x(a); this.cachedGetSinglePixelWidth = null } function d(b, I) { if ("undefined" !== typeof ImageData && I instanceof ImageData) b.putImageData(I, 0, 0); else { var e = I.height, f = I.width, g = e % 16, e = (e - g) / 16, h = 0 === g ? e : e + 1, k = b.createImageData(f, 16), S = 0, Q, p = I.data, K = k.data, l, m, n; if (I.kind === w.GRAYSCALE_1BPP) { var r = p.byteLength, K = F.value ? new Uint32Array(K.buffer) : new a(K), q = K.length, u = f + 7 >> 3, v = c.value || !F.value ? 4278190080 : 255; for (l = 0; l < h; l++) { n = l < e ? 16 : g; for (m = Q = 0; m < n; m++) { for (var z = r - S, y = 0, z = z > u ? f : 8 * z - 7, B = z & -8, A = 0, x = 0; y < B; y += 8) x = p[S++], K[Q++] = x & 128 ? 4294967295 : v, K[Q++] = x & 64 ? 4294967295 : v, K[Q++] = x & 32 ? 4294967295 : v, K[Q++] = x & 16 ? 4294967295 : v, K[Q++] = x & 8 ? 4294967295 : v, K[Q++] = x & 4 ? 4294967295 : v, K[Q++] = x & 2 ? 4294967295 : v, K[Q++] = x & 1 ? 4294967295 : v; for (; y < z; y++) 0 === A && (x = p[S++], A = 128), K[Q++] = x & A ? 4294967295 : v, A >>= 1 } for (; Q < q;) K[Q++] = 0; b.putImageData(k, 0, 16 * l) } } else if (I.kind === w.RGBA_32BPP) { m = 0; n = 64 * f; for (l = 0; l < e; l++) K.set(p.subarray(S, S + n)), S += n, b.putImageData(k, 0, m), m += 16; l < h && (K.set(p.subarray(S, S + f * g * 4)), b.putImageData(k, 0, m)) } else if (I.kind === w.RGB_24BPP) for (n = 16 * f, l = 0; l < h; l++) { l >= e && (n = g, n *= f); Q = 0; for (m = n; m--;) K[Q++] = p[S++], K[Q++] = p[S++], K[Q++] = p[S++], K[Q++] = 255; b.putImageData(k, 0, 16 * l) } else t("bad image kind: " + I.kind) } } function f(a, b) { for (var c = b.height, d = b.width, e = c % 16, c = (c - e) / 16, g = 0 === e ? c : c + 1, h = a.createImageData(d, 16), k = 0, l = b.data, p = h.data, m = 0; m < g; m++) { for (var n = m < c ? 16 : e, r = 3, t = 0; t < n; t++) for (var q = 0, u = 0; u < d; u++) { if (!q) var v = l[k++], q = 128; p[r] = v & q ? 0 : 255; r += 4; q >>= 1 } a.putImageData(h, 0, 16 * m) } } function h(a, b) { for (var c = "strokeStyle fillStyle fillRule globalAlpha lineWidth lineCap lineJoin miterLimit globalCompositeOperation font".split(" "), d = 0, e = c.length; d < e; d++) { var f = c[d]; void 0 !== a[f] && (b[f] = a[f]) } void 0 !== a.setLineDash ? (b.setLineDash(a.getLineDash()), b.lineDashOffset = a.lineDashOffset) : void 0 !== a.mozDashOffset && (b.mozDash = a.mozDash, b.mozDashOffset = a.mozDashOffset) } function m(a, b, c) { for (var d = a.length, e = 1 / 255, f = 3; f < d; f += 4) b[f] = b[f] * (c ? c[a[f]] : a[f]) * e | 0 } function q(a, b, c) { for (var d = a.length, e = 3; e < d; e += 4) { var f = 77 * a[e - 3] + 152 * a[e - 2] + 28 * a[e - 1]; b[e] = c ? b[e] * c[f >> 8] >> 8 : b[e] * f >> 16 } } function B(a, b, c) { var d = b.canvas, f = b.context; a.setTransform(b.scaleX, 0, 0, b.scaleY, b.offsetX, b.offsetY); var g = b.backdrop || null; if (!b.transferMap && e.isEnabled) c = e.composeSMask(c.canvas, d, { subtype: b.subtype, backdrop: g }), a.setTransform(1, 0, 0, 1, 0, 0), a.drawImage(c, b.offsetX, b.offsetY); else { var h = d.width, k = d.height, l = b.transferMap, p = !!g, n = p ? g[0] : 0, r = p ? g[1] : 0, g = p ? g[2] : 0; b = "Luminosity" === b.subtype ? q : m; for (var t = Math.min(k, Math.ceil(1048576 / h)), u = 0; u < k; u += t) { var v = Math.min(t, k - u), z = f.getImageData(0, u, h, v), v = c.getImageData(0, u, h, v); if (p) for (var w = z.data, y = n, A = r, x = g, C = w.length, U = 3; U < C; U += 4) { var E = w[U]; if (0 === E) w[U - 3] = y, w[U - 2] = A, w[U - 1] = x; else if (255 > E) { var D = 255 - E; w[U - 3] = w[U - 3] * E + y * D >> 8; w[U - 2] = w[U - 2] * E + A * D >> 8; w[U - 1] = w[U - 1] * E + x * D >> 8 } } b(z.data, v.data, l); f.putImageData(v, 0, u) } a.drawImage(d, 0, 0) } } var A = ["butt", "round", "square"], ba = ["miter", "round", "bevel"], aa = {}, W = {}; b.prototype = { beginDrawing: function (a, b, c) { var d = this.ctx.canvas.width, e = this.ctx.canvas.height; this.ctx.save(); this.ctx.fillStyle = "rgb(255, 255, 255)"; this.ctx.fillRect(0, 0, d, e); this.ctx.restore(); c && (c = this.cachedCanvases.getCanvas("transparent", d, e, !0), this.compositeCtx = this.ctx, this.transparentCanvas = c.canvas, this.ctx = c.context, this.ctx.save(), this.ctx.transform.apply(this.ctx, this.compositeCtx.mozCurrentTransform)); this.ctx.save(); a && this.ctx.transform.apply(this.ctx, a); this.ctx.transform.apply(this.ctx, b.transform); this.baseTransform = this.ctx.mozCurrentTransform.slice(); this.imageLayer && this.imageLayer.beginLayout() }, executeOperatorList: function (a, b, c, d) { var e = a.argsArray; a = a.fnArray; b = b || 0; var f = e.length; if (f === b) return b; for (var g = 10 < f - b && "function" === typeof c, h = g ? Date.now() + 15 : 0, k = 0, p = this.commonObjs, l = this.objs, m; ;) { if (void 0 !== d && b === d.nextBreakPoint) return d.breakIt(b, c), b; m = a[b]; if (m !== u.dependency) this[m].apply(this, e[b]); else { m = e[b]; for (var n = 0, r = m.length; n < r; n++) { var t = m[n], q = "g" === t[0] && "_" === t[1] ? p : l; if (!q.isResolved(t)) return q.get(t, c), b } } b++; if (b === f) return b; if (g && 10 < ++k) { if (Date.now() > h) return c(), b; k = 0 } } }, endDrawing: function () { null !== this.current.activeSMask && this.endSMaskGroup(); this.ctx.restore(); this.transparentCanvas && (this.ctx = this.compositeCtx, this.ctx.save(), this.ctx.setTransform(1, 0, 0, 1, 0, 0), this.ctx.drawImage(this.transparentCanvas, 0, 0), this.ctx.restore(), this.transparentCanvas = null); this.cachedCanvases.clear(); e.clear(); this.imageLayer && this.imageLayer.endLayout() }, setLineWidth: function (a) { this.current.lineWidth = a; this.ctx.lineWidth = a }, setLineCap: function (a) { this.ctx.lineCap = A[a] }, setLineJoin: function (a) { this.ctx.lineJoin = ba[a] }, setMiterLimit: function (a) { this.ctx.miterLimit = a }, setDash: function (a, b) { var c = this.ctx; void 0 !== c.setLineDash ? (c.setLineDash(a), c.lineDashOffset = b) : (c.mozDash = a, c.mozDashOffset = b) }, setRenderingIntent: function (a) { }, setFlatness: function (a) { }, setGState: function (a) { for (var b = 0, c = a.length; b < c; b++) { var d = a[b], e = d[1]; switch (d[0]) { case "LW": this.setLineWidth(e); break; case "LC": this.setLineCap(e); break; case "LJ": this.setLineJoin(e); break; case "ML": this.setMiterLimit(e); break; case "D": this.setDash(e[0], e[1]); break; case "RI": this.setRenderingIntent(e); break; case "FL": this.setFlatness(e); break; case "Font": this.setFont(e[0], e[1]); break; case "CA": this.current.strokeAlpha = d[1]; break; case "ca": this.current.fillAlpha = d[1]; this.ctx.globalAlpha = d[1]; break; case "BM": e && e.name && "Normal" !== e.name ? (d = e.name.replace(/([A-Z])/g, function (a) { return "-" + a.toLowerCase() }).substring(1), this.ctx.globalCompositeOperation = d, this.ctx.globalCompositeOperation !== d && k('globalCompositeOperation "' + d + '" is not supported')) : this.ctx.globalCompositeOperation = "source-over"; break; case "SMask": this.current.activeSMask && (0 < this.stateStack.length && this.stateStack[this.stateStack.length - 1].activeSMask === this.current.activeSMask ? this.suspendSMaskGroup() : this.endSMaskGroup()), this.current.activeSMask = e ? this.tempSMask : null, this.current.activeSMask && this.beginSMaskGroup(), this.tempSMask = null } } }, beginSMaskGroup: function () { var a = this.current.activeSMask, b = this.cachedCanvases.getCanvas("smaskGroupAt" + this.groupLevel, a.canvas.width, a.canvas.height, !0), c = this.ctx, d = c.mozCurrentTransform; this.ctx.save(); b = b.context; b.scale(1 / a.scaleX, 1 / a.scaleY); b.translate(-a.offsetX, -a.offsetY); b.transform.apply(b, d); a.startTransformInverse = b.mozCurrentTransformInverse; h(c, b); this.ctx = b; this.setGState([["BM", "Normal"], ["ca", 1], ["CA", 1]]); this.groupStack.push(c); this.groupLevel++ }, suspendSMaskGroup: function () { var a = this.ctx; this.groupLevel--; this.ctx = this.groupStack.pop(); B(this.ctx, this.current.activeSMask, a); this.ctx.restore(); this.ctx.save(); h(a, this.ctx); this.current.resumeSMaskCtx = a; var b = C.transform(this.current.activeSMask.startTransformInverse, a.mozCurrentTransform); this.ctx.transform.apply(this.ctx, b); a.save(); a.setTransform(1, 0, 0, 1, 0, 0); a.clearRect(0, 0, a.canvas.width, a.canvas.height); a.restore() }, resumeSMaskGroup: function () { var a = this.ctx; this.ctx = this.current.resumeSMaskCtx; this.groupStack.push(a); this.groupLevel++ }, endSMaskGroup: function () { var a = this.ctx; this.groupLevel--; this.ctx = this.groupStack.pop(); B(this.ctx, this.current.activeSMask, a); this.ctx.restore(); h(a, this.ctx); a = C.transform(this.current.activeSMask.startTransformInverse, a.mozCurrentTransform); this.ctx.transform.apply(this.ctx, a) }, save: function () { this.ctx.save(); var a = this.current; this.stateStack.push(a); this.current = a.clone(); this.current.resumeSMaskCtx = null; this.currentGeometryPath && -1 == this._geometryPathStack.indexOf(this.currentGeometryPath) && this._geometryPathStack.push(this.currentGeometryPath) }, restore: function () { this.current.resumeSMaskCtx && this.resumeSMaskGroup(); null === this.current.activeSMask || 0 !== this.stateStack.length && this.stateStack[this.stateStack.length - 1].activeSMask === this.current.activeSMask || this.endSMaskGroup(); 0 !== this.stateStack.length && (this.current = this.stateStack.pop(), this.ctx.restore(), this.cachedGetSinglePixelWidth = this.pendingClip = null, this.currentGeometryPath = this._geometryPathStack.pop()) }, transform: function (a, b, c, d, e, f) { this.ctx.transform(a, b, c, d, e, f); this.cachedGetSinglePixelWidth = null }, constructPath: function (a, b) { var c = this.ctx, d = this.current, e = new Path2D, f = []; this.currentGeometryPath || (this.currentGeometryPath = { canvasPath: [], svgPath: [] }); for (var g = d.x, h = d.y, k = 0, p = 0, m = a.length; k < m; k++) switch (a[k] | 0) { case u.rectangle: var g = b[p++], h = b[p++], l = b[p++], n = b[p++]; 0 === l && (l = this.getSinglePixelWidth()); 0 === n && (n = this.getSinglePixelWidth()); l = g + l; n = h + n; this.ctx.moveTo(g, h); e.moveTo(g - .1, h - .1); f.push("M", pf(g - .1), pf(h - .1)); this.ctx.lineTo(l, h); e.lineTo(l + .1, h - .1); f.push("L", pf(l + .1), pf(h - .1)); this.ctx.lineTo(l, n); e.lineTo(l + .1, n + .1); f.push("L", pf(l + .1), pf(n + .1)); this.ctx.lineTo(g, n); e.lineTo(g - .1, n + .1); f.push("L", pf(g - .1), pf(n + .1)); this.ctx.lineTo(g, h); e.lineTo(g - .1, h - .1); f.push("L", pf(g - .1), pf(h - .1)); this.ctx.closePath(); e.closePath(); f.push("Z"); break; case u.moveTo: g = b[p++]; h = b[p++]; c.moveTo(g, h); e.moveTo(g, h); f.push("M", pf(g), pf(h)); break; case u.lineTo: g = b[p++]; h = b[p++]; c.lineTo(g, h); e.lineTo(g, h); f.push("L", pf(g), pf(h)); break; case u.curveTo: g = b[p + 4]; h = b[p + 5]; c.bezierCurveTo(b[p], b[p + 1], b[p + 2], b[p + 3], g, h); e.bezierCurveTo(b[p], b[p + 1], b[p + 2], b[p + 3], g, h); f.push("C", pf(b[p]), pf(b[p + 1]), pf(b[p + 2]), pf(b[p + 3]), pf(g), pf(h)); p += 6; break; case u.curveTo2: c.bezierCurveTo(g, h, b[p], b[p + 1], b[p + 2], b[p + 3]); e.bezierCurveTo(g, h, b[p], b[p + 1], b[p + 2], b[p + 3]); f.push("C", pf(g), pf(h), pf(b[p]), pf(b[p + 1]), pf(b[p + 2]), pf(b[p + 3])); g = b[p + 2]; h = b[p + 3]; p += 4; break; case u.curveTo3: g = b[p + 2]; h = b[p + 3]; c.bezierCurveTo(b[p], b[p + 1], g, h, g, h); e.bezierCurveTo(b[p], b[p + 1], g, h, g, h); f.push("C", pf(b[p]), pf(b[p + 1]), pf(g), pf(h), pf(g), pf(h)); p += 4; break; case u.closePath: c.closePath(), e.closePath(), f.push("Z"), this.currentGeometryPath.canvasPath.push(e), this.currentGeometryPath.svgPath.push(f), e = new Path2D, f = [] } this.objs.geometryTextList && 0 < f.length && "C" == f[0] && f.splice(0, 0, "M " + d.x + " " + d.y); this.currentGeometryPath.canvasPath.push(e); this.currentGeometryPath.svgPath.push(f); this.currentGeometryPath && !this.currentGeometryPath.clipTest && (c = document.createElement("canvas"), c.width = this.ctx.canvas.width, c.height = this.ctx.canvas.height, this.currentGeometryPath.clipTest = c.getContext("2d")); d.setCurrentPoint(g, h) }, closePath: function () { this.ctx.closePath() }, stroke: function (a) { a = "undefined" !== typeof a ? a : !0; var b = this.ctx, c = this.current.strokeColor; b.lineWidth = Math.max(.65 * this.getSinglePixelWidth(), this.current.lineWidth); b.globalAlpha = this.current.strokeAlpha; c && c.hasOwnProperty("type") && "Pattern" === c.type ? (b.save(), b.strokeStyle = c.getPattern(b, this), b.stroke(), b.restore()) : b.stroke(); a && this.consumePath(); b.globalAlpha = this.current.fillAlpha }, closeStroke: function () { this.closePath(); this.stroke() }, fill: function (a) { a = "undefined" !== typeof a ? a : !0; var b = this.ctx, c = this.current.fillColor, d = !1; this.current.patternFill && (b.save(), this.baseTransform && b.setTransform.apply(b, this.baseTransform), b.fillStyle = c.getPattern(b, this), d = !0); this.pendingEOFill ? (void 0 !== b.mozFillRule ? (b.mozFillRule = "evenodd", b.fill(), b.mozFillRule = "nonzero") : b.fill("evenodd"), this.pendingEOFill = !1) : b.fill(); d && b.restore(); a && this.consumePath() }, eoFill: function () { this.pendingEOFill = !0; this.fill() }, fillStroke: function () { this.fill(!1); this.stroke(!1); this.consumePath() }, eoFillStroke: function () { this.pendingEOFill = !0; this.fillStroke() }, closeFillStroke: function () { this.closePath(); this.fillStroke() }, closeEOFillStroke: function () { this.pendingEOFill = !0; this.closePath(); this.fillStroke() }, endPath: function () { this.consumePath() }, clip: function () { this.pendingClip = aa; this.geometryClip("nonzero") }, eoClip: function () { this.pendingClip = W; this.geometryClip("evenodd") }, geometryClip: function (a) { if (this.objs.geometryTextList && this.currentGeometryPath) { this.currentGeometryPath.pendingGeometryClip = !0; var b = document.createElement("canvas"); b.width = this.ctx.canvas.width; b.height = this.ctx.canvas.height; this.currentGeometryPath.fillRule = a; this.currentGeometryPath.clipTest = b.getContext("2d"); a = this.ctx.mozCurrentTransform; this.currentGeometryPath.clipTest.mozCurrentTransform = a; this.currentGeometryPath.clipTest.setTransform(a[0], a[1], a[2], a[3], a[4], a[5]) } }, beginText: function () { this.current.textMatrix = E; this.current.textMatrixScale = 1; this.current.x = this.current.lineX = 0; this.current.y = this.current.lineY = 0 }, endText: function () { var a = this.pendingTextPaths, b = this.ctx; if (void 0 === a) b.beginPath(); else { b.save(); b.beginPath(); for (var c = 0; c < a.length; c++) { var d = a[c]; b.setTransform.apply(b, d.transform); b.translate(d.x, d.y); d.addToPath(b, d.fontSize) } b.restore(); b.clip(); b.beginPath(); delete this.pendingTextPaths } }, setCharSpacing: function (a) { this.current.charSpacing = a }, setWordSpacing: function (a) { this.current.wordSpacing = a }, setHScale: function (a) { this.current.textHScale = a / 100 }, setLeading: function (a) { this.current.leading = -a }, setFont: function (a, b) { var c = this.commonObjs.get(a), d = this.current; c || t("Can't find font for " + a); d.fontMatrix = c.fontMatrix ? c.fontMatrix : J; 0 !== d.fontMatrix[0] && 0 !== d.fontMatrix[3] || k("Invalid font matrix for font " + a); 0 > b ? (b = -b, d.fontDirection = -1) : d.fontDirection = 1; this.current.font = c; this.current.fontSize = b; if (!c.isType3Font) { var d = c.black ? c.bold ? "900" : "bold" : c.bold ? "bold" : "normal", e = c.italic ? "italic" : "normal", c = '"' + (c.loadedName || "sans-serif") + '", ' + c.fallbackName, f = 16 > b ? 16 : 100 < b ? 100 : b; this.current.fontSizeScale = b / f; this.ctx.font = e + " " + d + " " + f + "px " + c } }, setTextRenderingMode: function (a) { this.current.textRenderingMode = a }, setTextRise: function (a) { this.current.textRise = a }, moveText: function (a, b) { this.current.x = this.current.lineX += a; this.current.y = this.current.lineY += b }, setLeadingMoveText: function (a, b) { this.setLeading(-b); this.moveText(a, b) }, setTextMatrix: function (a, b, c, d, e, f) { this.current.textMatrix = [a, b, c, d, e, f]; this.current.textMatrixScale = Math.sqrt(a * a + b * b); this.current.x = this.current.lineX = 0; this.current.y = this.current.lineY = 0 }, nextLine: function () { this.moveText(0, this.current.leading) }, paintChar: function (a, b, c) { var d = this.ctx, e = this.current, f = e.font, g = e.textRenderingMode, e = e.fontSize / e.fontSizeScale, h = g & v.FILL_STROKE_MASK, g = !!(g & v.ADD_TO_PATH_FLAG), k; if (f.disableFontFace || g) k = f.getPathGenerator(this.commonObjs, a); f.disableFontFace ? (d.save(), d.translate(b, c), d.beginPath(), k(d, e), h !== v.FILL && h !== v.FILL_STROKE || d.fill(), h !== v.STROKE && h !== v.FILL_STROKE || d.stroke(), d.restore()) : (h !== v.FILL && h !== v.FILL_STROKE || d.fillText(a, b, c), h !== v.STROKE && h !== v.FILL_STROKE || d.strokeText(a, b, c)); g && (this.pendingTextPaths || (this.pendingTextPaths = [])).push({ transform: d.mozCurrentTransform, x: b, y: c, fontSize: e, addToPath: k }) }, get isFontSubpixelAAEnabled() { var a = document.createElement("canvas").getContext("2d"); a.scale(1.5, 1); a.fillText("I", 0, 10); for (var a = a.getImageData(0, 0, 10, 10).data, b = !1, c = 3; c < a.length; c += 4) if (0 < a[c] && 255 > a[c]) { b = !0; break } return y(this, "isFontSubpixelAAEnabled", b) }, createTextGeometry: function () { var a = {}, b = this.current.font, c = this.ctx.mozCurrentTransform, d = 0, e = 0; if (0 < this.groupStack.length) for (var f = 0; f < this.groupStack.length; f++) var g = this.groupStack[f].mozCurrentTransform, d = d + g[4], e = e + g[5]; var g = c[0], h = c[1], k = c[2], p = c[3], f = 0 <= g ? Math.sqrt(g * g + h * h) : -Math.sqrt(g * g + h * h), k = 0 <= p ? Math.sqrt(k * k + p * p) : -Math.sqrt(k * k + p * p), g = Math.atan2(h, g), h = c[5]; a.x = c[4]; a.y = h; a.groupOffsetX = d; a.groupOffsetY = e; a.hScale = f; a.vScale = k; a.angle = g; a.fontName = b.loadedName; a.fontFamily = b.fallbackName; a.fontSize = this.current.fontSize; a.ascent = b.ascent; a.descent = b.descent; return a }, pf: function (a) { if (a === (a | 0)) return a.toString(); a = a.toFixed(10); var b = a.length - 1; if ("0" !== a[b]) return a; do b--; while ("0" === a[b]); return a.substr(0, "." === a[b] ? b : b + 1) }, pushTextGeometry: function (a, b, c) { if (PDFJS.pushTextGeometries) { this.objs.geometryTextList && this.objs.geometryTextListCanvasWidth == this.ctx.canvas.width || (this.objs.geometryTextList = [], this.objs.geometryTextListCanvasWidth = this.ctx.canvas.width); var d = this.objs.geometryTextList; if (0 < d.length && 0 < d[d.length - 1].unicode.length && this.current.font.loadedName == d[d.length - 1].fontFamily && (d = this.objs.geometryTextList[this.objs.geometryTextList.length - 1].unicode.slice(-1).charCodeAt(0), 64257 == d || 64258 == d || 64259 == d || 64260 == d)) { a.unicode = a.unicode.trimLeft(); a.mixed = a.mixed.trimLeft(); a.chars = a.chars.trimLeft(); for (var d = a.xcoords.splice(0, 1), e = 0; e < a.xcoords.length; e++) a.xcoords[e].x -= d[0].w } if (0 != a.xcoords.length) { var f = this.current.fontSize * a.geom.vScale, d = 0 < this.objs.geometryTextList.length ? this.objs.geometryTextList[this.objs.geometryTextList.length - 1] : null, e = []; e.ascent = 0 != this.current.textMatrix[5] && 0 < this.current.font.ascent ? this.current.font.ascent : 1; e.height = f; e.width = a.canvasWidth * a.geom.hScale; e.fontFamily = this.current.font.loadedName || "sans-serif"; e.fontName = e.fontFamily; e.fontSize = this.ctx.font.substring(0, this.ctx.font.indexOf("px") + 2); e.bold = -1 < this.ctx.font.indexOf("bold"); e.italic = -1 < this.ctx.font.indexOf("italic"); e.left = 0 == a.geom.angle ? b + a.geom.groupOffsetX + a.geom.x : b + a.geom.x + a.geom.groupOffsetX + f * e.ascent * Math.sin(a.geom.angle); e.top = 0 == a.geom.angle ? c + a.geom.groupOffsetY + a.geom.y - f * e.ascent : c + a.geom.y + a.geom.groupOffsetY - f * e.ascent * Math.cos(a.geom.angle); e.text = a.unicode; e.readableText = a.unicode; e.mixed = a.mixed; e.chars = a.chars; e.charCodes = a.charCodes; e.angle = a.geom.angle; e.fontColor = this.current.fillColor; e.avgCharWidth = a.totalcharwidth / a.xcoords.length; e.left = Math.round(100 * e.left) / 100; e.top = Math.round(100 * e.top) / 100; e.width = Math.round(100 * e.width) / 100; e.height = Math.round(100 * e.height) / 100; b = d && d.chars.trim() == e.chars.trim() && d.left >= e.left - .5 && d.left < e.left + .5 && d.top >= e.top - .5 && d.top < e.top + .5 && d.fontColor == e.fontColor; d && e.text.length > d.text.length && e.text.indexOf(d.text); e.metrics = { X: e.left, Y: e.top, width: e.width, height: e.height, angle: e.angle, color: this.current.fillColor, hScale: a.geom.hScale }; e.metrics.left = e.metrics.X; e.metrics.top = e.metrics.Y; e.unicode = e.text; e.str = e.text; c = this.ctx.font; this.ctx.font = e.height + "px " + e.fontFamily; e.textMetrics = { geometryWidth: Math.round((a.xcoords[a.xcoords.length - 1].x - (a.offsetxcoord ? a.offsetxcoord.x + a.offsetxcoord.w : 0) + a.xcoords[a.xcoords.length - 1].w) * a.geom.hScale * 100) / 100, measuredWidth: Math.round(100 * this.ctx.measureText(e.text).width) / 100 }; e.textMetrics.scaleX = 0 != e.hStretch && Math.round(Math.abs(e.hStretch)) != e.textMetrics.geometryWidth; this.ctx.font = c; b && PDFJS.discardOverlappingText || this.objs.geometryTextList.push(e); b && (d.bold = !0) } } }, showText: function (a) { var b = this.current, c = b.font; if (c.isType3Font) return this.showType3Text(a); var d = b.fontSize; if (0 !== d) { var e = this.ctx, f = b.fontSizeScale, g = b.charSpacing, h = b.wordSpacing, k = b.fontDirection, p = b.textHScale * k, l = a.length, m = c.vertical, n = m ? 1 : -1, r = c.defaultVMetrics, t = d * b.fontMatrix[0], u, q = { unicode: "", mixed: "", str: "", chars: "", charCodes: [], length: 0, canvasWidth: 0, geom: {}, xcoords: [], totalcharwidth: 0 }, w = 0, z = b.textRenderingMode === v.FILL && !c.disableFontFace; e.save(); e.transform.apply(e, b.textMatrix); e.translate(b.x, b.y + b.textRise); b.patternFill && (e.fillStyle = b.fillColor.getPattern(e, this)); 0 < k ? (e.scale(p, -1), PDFJS.pushTextGeometries && (this.save(), e.scale(1, -1), u = this.createTextGeometry(), q.geom = u, this.restore())) : e.scale(p, 1); var y = b.lineWidth, A = b.textMatrixScale; if (0 === A || 0 === y) { if (A = b.textRenderingMode & v.FILL_STROKE_MASK, A === v.STROKE || A === v.FILL_STROKE) this.cachedGetSinglePixelWidth = null, y = .65 * this.getSinglePixelWidth() } else y /= A; PDFJS.pushTextGeometries && (u = this.createTextGeometry(), q.geom = u); 1 !== f && (e.scale(f, f), y /= f); e.lineWidth = y; for (A = y = 0; A < l; ++A) { var x = a[A]; if (L(x)) y += n * x * d / 1E3; else { var B = !1, C = (x.isSpace ? h : 0) + g, E = x.fontChar, D = x.accent, F, H, G = x.width; if (m) { var J; F = x.vmetric || r; J = x.vmetric ? F[1] : .5 * G; J = -J * t; H = F[2] * t; G = F ? -F[0] : G; F = J / f; H = (y + H) / f } else F = y / f, H = 0; c.remeasure && 0 < G && (J = 1E3 * e.measureText(E).width / d * f, G < J && this.isFontSubpixelAAEnabled ? (J = G / J, B = !0, e.save(), e.scale(J, 1), F /= J) : G !== J && (F += (G - J) / 2E3 * d / f)); if (x.isInFont || c.missingFile) z && !D ? PDFJS.disableTextDrawing || e.fillText(E, F, H) : (PDFJS.disableTextDrawing || this.paintChar(E, F, H), D && (F += D.offset.x / f, H -= D.offset.y / f, PDFJS.disableTextDrawing || this.paintChar(D.fontChar, F, H))); D = G * t + C * k; if (PDFJS.pushTextGeometries) { G = !1; if (this.objs.geometryTextList && this.currentGeometryPath && this.currentGeometryPath.canvasPath && this.currentGeometryPath.pendingGeometryClip) { F = this.currentGeometryPath.fillRule; "nonzero" != F && "evenodd" != F && (F = "nonzero"); G = !0; H = Math.round((y + D) * p * q.geom.hScale * 100) / 100; J = 0 != this.current.textMatrix[5] && 0 < this.current.font.ascent ? this.current.font.ascent : 1; for (var M = 0; M < this.currentGeometryPath.canvasPath.length; M++) this.currentGeometryPath.clipTest.isPointInPath(this.currentGeometryPath.canvasPath[M], u.x, u.y - J, F) && (G = !1), this.currentGeometryPath.clipTest.isPointInPath(this.currentGeometryPath.canvasPath[M], u.x + H, u.y - J, F) && (G = !1) } G ? (H = Math.round(y * p * q.geom.hScale * 100) / 100, w += H, q.offsetxcoord = { x: y * p, w: (D - C * k) * p, spacing: C * k * p }) : " " === x.unicode && 0 < q.length ? (q.unicode += x.unicode, q.chars += E, q.length++, q.canvasWidth += D - C * k, q.xcoords.push({ x: y * p, w: (D - C * k) * p, spacing: C * k * p, unicode: x.unicode, charCode: x.charCode }), q.totalcharwidth += D - C * k, this.pushTextGeometry(q, w, 0), q.canvasWidth = 0, q.unicode = "", q.xcoords = [], w = H = Math.round((y * p + (D - C * k) * p) * q.geom.hScale * 100) / 100, q.offsetxcoord = { x: y * p, w: (D - C * k) * p, spacing: C * k * p }) : (PDFJS.disableTextAsUnicode ? q.str += E : (G = x.unicode, "ff" == x.unicode ? (q.charCodes.push(x.charCode), G = String.fromCharCode(64256)) : "fi" == x.unicode ? (q.charCodes.push(x.charCode), G = String.fromCharCode(64257)) : "fl" == x.unicode ? (q.charCodes.push(x.charCode), G = String.fromCharCode(64258)) : "ffi" == x.unicode ? (q.charCodes.push(x.charCode), G = String.fromCharCode(64259)) : "ffl" == x.unicode ? (q.charCodes.push(x.charCode), G = String.fromCharCode(64260)) : "s t" == x.unicode ? (q.charCodes.push(x.charCode), G = String.fromCharCode(64261)) : "st" == x.unicode ? (q.charCodes.push(x.charCode), G = String.fromCharCode(64262)) : c.differences[x.charCode] && 1 == c.differences[x.charCode].length ? q.charCodes.push(c.differences[x.charCode].charCodeAt(0)) : q.charCodes.push(x.charCode), q.unicode += G), q.chars += E, q.length++, q.canvasWidth += D - C * k, q.xcoords.push({ x: y * p, w: (D - C * k) * p, spacing: C * k * p, unicode: x.unicode, charCode: x.charCode }), q.totalcharwidth += D - C * k) } y += D; B && e.restore() } } m ? b.y -= y * p : b.x += y * p; e.restore(); this.pushTextGeometry(q, w, 0) } }, showType3Text: function (a) { var b = this.ctx, c = this.current, d = c.font, e = c.fontSize, f = c.fontDirection, g = d.vertical ? 1 : -1, h = c.charSpacing, l = c.wordSpacing, p = c.textHScale * f, m = c.fontMatrix || J, n = a.length, q; if (c.textRenderingMode !== v.INVISIBLE && 0 !== e) { this.cachedGetSinglePixelWidth = null; b.save(); b.transform.apply(b, c.textMatrix); b.translate(c.x, c.y); b.scale(p, f); for (f = 0; f < n; ++f) if (q = a[f], L(q)) q = g * q * e / 1E3, this.ctx.translate(q, 0), c.x += q * p; else { var r = (q.isSpace ? l : 0) + h, t = d.charProcOperatorList[q.operatorListId]; t ? (this.processingType3 = q, this.save(), b.scale(e, e), b.transform.apply(b, m), this.executeOperatorList(t), this.restore(), q = C.applyTransform([q.width, 0], m)[0] * e + r, b.translate(q, 0), c.x += q * p) : k('Type3 character "' + q.operatorListId + '" is not available') } b.restore(); this.processingType3 = null } }, setCharWidth: function (a, b) { }, setCharWidthAndBounds: function (a, b, c, d, e, f) { this.ctx.rect(c, d, e - c, f - d); this.clip(); this.endPath() }, getColorN_Pattern: function (a) { if ("TilingPattern" === a[0]) { var c = a[1], d = this.baseTransform || this.ctx.mozCurrentTransform.slice(), e = this; a = new r(a, c, this.ctx, { createCanvasGraphics: function (a) { return new b(a, e.commonObjs, e.objs) } }, d) } else a = g(a); return a }, setStrokeColorN: function () { this.current.strokeColor = this.getColorN_Pattern(arguments) }, setFillColorN: function () { this.current.fillColor = this.getColorN_Pattern(arguments); this.current.patternFill = !0 }, setStrokeRGBColor: function (a, b, c) { a = C.makeCssRgb(a, b, c); this.ctx.strokeStyle = a; this.current.strokeColor = a }, setFillRGBColor: function (a, b, c) { a = C.makeCssRgb(a, b, c); this.ctx.fillStyle = a; this.current.fillColor = a; this.current.patternFill = !1 }, shadingFill: function (a) { var b = this.ctx; this.save(); a = g(a); b.fillStyle = a.getPattern(b, this, !0); var c = b.mozCurrentTransformInverse; if (c) { var b = b.canvas, d = b.width, e = b.height, b = C.applyTransform([0, 0], c); a = C.applyTransform([0, e], c); var f = C.applyTransform([d, 0], c), c = C.applyTransform([d, e], c), d = Math.min(b[0], a[0], f[0], c[0]), e = Math.min(b[1], a[1], f[1], c[1]); this.ctx.fillRect(d, e, Math.max(b[0], a[0], f[0], c[0]) - d, Math.max(b[1], a[1], f[1], c[1]) - e) } else this.ctx.fillRect(-1E10, -1E10, 2E10, 2E10); this.restore() }, beginInlineImage: function () { t("Should not call beginInlineImage") }, beginImageData: function () { t("Should not call beginImageData") }, paintFormXObjectBegin: function (a, b) { this.save(); this.baseTransformStack.push(this.baseTransform); l(a) && 6 === a.length && this.transform.apply(this, a); this.baseTransform = this.ctx.mozCurrentTransform; l(b) && 4 === b.length && (this.ctx.rect(b[0], b[1], b[2] - b[0], b[3] - b[1]), this.clip(), this.endPath()) }, paintFormXObjectEnd: function () { this.restore(); this.baseTransform = this.baseTransformStack.pop() }, beginGroup: function (a) { this.save(); var b = this.ctx; a.isolated || z("TODO: Support non-isolated groups."); a.knockout && k("Knockout groups not supported."); var c = b.mozCurrentTransform; a.matrix && b.transform.apply(b, a.matrix); n(a.bbox, "Bounding box is required."); var d = C.getAxialAlignedBoundingBox(a.bbox, b.mozCurrentTransform), d = C.intersect(d, [0, 0, b.canvas.width, b.canvas.height]) || [0, 0, 0, 0], e = Math.floor(d[0]), f = Math.floor(d[1]), g = Math.max(Math.ceil(d[2]) - e, 1), l = Math.max(Math.ceil(d[3]) - f, 1), m = d = 1; 4096 < g && (d = g / 4096, g = 4096); 4096 < l && (m = l / 4096, l = 4096); var p = "groupAt" + this.groupLevel; a.smask && (p += "_smask_" + this.smaskCounter++ % 2); g = this.cachedCanvases.getCanvas(p, g, l, !0); l = g.context; l.scale(1 / d, 1 / m); l.translate(-e, -f); l.transform.apply(l, c); a.smask ? this.smaskStack.push({ canvas: g.canvas, context: l, offsetX: e, offsetY: f, scaleX: d, scaleY: m, subtype: a.smask.subtype, backdrop: a.smask.backdrop, transferMap: a.smask.transferMap || null, startTransformInverse: null }) : (b.setTransform(1, 0, 0, 1, 0, 0), b.translate(e, f), b.scale(d, m)); h(b, l); this.ctx = l; this.setGState([["BM", "Normal"], ["ca", 1], ["CA", 1]]); this.groupStack.push(b); this.groupLevel++; this.current.activeSMask = null }, endGroup: function (a) { this.groupLevel--; var b = this.ctx; this.ctx = this.groupStack.pop(); void 0 !== this.ctx.imageSmoothingEnabled ? this.ctx.imageSmoothingEnabled = !1 : this.ctx.mozImageSmoothingEnabled = !1; a.smask ? this.tempSMask = this.smaskStack.pop() : this.ctx.drawImage(b.canvas, 0, 0); this.restore() }, beginAnnotations: function () { this.save(); this.current = new da; this.baseTransform && this.ctx.setTransform.apply(this.ctx, this.baseTransform) }, endAnnotations: function () { this.restore() }, beginAnnotation: function (a, b, c) { this.save(); l(a) && 4 === a.length && (this.ctx.rect(a[0], a[1], a[2] - a[0], a[3] - a[1]), this.clip(), this.endPath()); this.transform.apply(this, b); this.transform.apply(this, c) }, endAnnotation: function () { this.restore() }, paintJpegXObject: function (a, b, c) { var d = this.objs.get(a); if (d) { this.save(); var e = this.ctx; e.scale(1 / b, -1 / c); e.drawImage(d, 0, 0, d.width, d.height, 0, -c, b, c); this.imageLayer && (d = e.mozCurrentTransformInverse, e = this.getCanvasPosition(0, 0), this.imageLayer.appendImage({ objId: a, left: e[0], top: e[1], width: b / d[0], height: c / d[3] })); this.restore() } else k("Dependent image isn't ready yet") }, paintImageMaskXObject: function (a) { var b = this.ctx, c = a.width, d = a.height, e = this.current.fillColor, g = this.current.patternFill, h = this.processingType3; h && void 0 === h.compiled && (h.compiled = 1E3 >= c && 1E3 >= d ? D({ data: a.data, width: c, height: d }) : null); h && h.compiled ? h.compiled(b) : (b = this.cachedCanvases.getCanvas("maskCanvas", c, d), h = b.context, h.save(), f(h, a), h.globalCompositeOperation = "source-in", h.fillStyle = g ? e.getPattern(h, this) : e, h.fillRect(0, 0, c, d), h.restore(), this.paintInlineImageXObject(b.canvas)) }, paintImageMaskXObjectRepeat: function (a, b, c, d) { var e = a.width, g = a.height, h = this.current.fillColor, k = this.current.patternFill, l = this.cachedCanvases.getCanvas("maskCanvas", e, g), p = l.context; p.save(); f(p, a); p.globalCompositeOperation = "source-in"; p.fillStyle = k ? h.getPattern(p, this) : h; p.fillRect(0, 0, e, g); p.restore(); a = this.ctx; h = 0; for (k = d.length; h < k; h += 2) a.save(), a.transform(b, 0, 0, c, d[h], d[h + 1]), a.scale(1, -1), a.drawImage(l.canvas, 0, 0, e, g, 0, -1, 1, 1), a.restore() }, paintImageMaskXObjectGroup: function (a) { for (var b = this.ctx, c = this.current.fillColor, d = this.current.patternFill, e = 0, g = a.length; e < g; e++) { var h = a[e], k = h.width, l = h.height, p = this.cachedCanvases.getCanvas("maskCanvas", k, l), m = p.context; m.save(); f(m, h); m.globalCompositeOperation = "source-in"; m.fillStyle = d ? c.getPattern(m, this) : c; m.fillRect(0, 0, k, l); m.restore(); b.save(); b.transform.apply(b, h.transform); b.scale(1, -1); b.drawImage(p.canvas, 0, 0, k, l, 0, -1, 1, 1); b.restore() } }, paintImageXObject: function (a) { (a = this.objs.get(a)) ? this.paintInlineImageXObject(a) : k("Dependent image isn't ready yet") }, paintImageXObjectRepeat: function (a, b, c, d) { if (a = this.objs.get(a)) { for (var e = a.width, f = a.height, g = [], h = 0, l = d.length; h < l; h += 2) g.push({ transform: [b, 0, 0, c, d[h], d[h + 1]], x: 0, y: 0, w: e, h: f }); this.paintInlineImageXObjectGroup(a, g) } else k("Dependent image isn't ready yet") }, paintInlineImageXObject: function (a) { var b = a.width, c = a.height, e = this.ctx; this.save(); e.scale(1 / b, -1 / c); var f = e.mozCurrentTransformInverse, g = f[0], h = f[1], g = Math.max(Math.sqrt(g * g + h * h), 1), h = f[2], k = f[3], h = Math.max(Math.sqrt(h * h + k * k), 1), l; if (a instanceof HTMLElement || !a.data) k = a; else { l = this.cachedCanvases.getCanvas("inlineImage", b, c); var p = l.context; d(p, a); k = l.canvas } for (var m = b, n = c, q = "prescale1"; 2 < g && 1 < m || 2 < h && 1 < n;) { var r = m, t = n; 2 < g && 1 < m && (r = Math.ceil(m / 2), g /= m / r); 2 < h && 1 < n && (t = Math.ceil(n / 2), h /= n / t); l = this.cachedCanvases.getCanvas(q, r, t); p = l.context; p.clearRect(0, 0, r, t); p.drawImage(k, 0, 0, m, n, 0, 0, r, t); k = l.canvas; m = r; n = t; q = "prescale1" === q ? "prescale2" : "prescale1" } e.drawImage(k, 0, 0, m, n, 0, -c, b, c); this.imageLayer && (e = this.getCanvasPosition(0, -c), this.imageLayer.appendImage({ imgData: a, left: e[0], top: e[1], width: b / f[0], height: c / f[3] })); this.restore() }, paintInlineImageXObjectGroup: function (a, b) { var c = this.ctx, e = a.width, f = a.height, g = this.cachedCanvases.getCanvas("inlineImage", e, f); d(g.context, a); for (var h = 0, k = b.length; h < k; h++) { var l = b[h]; c.save(); c.transform.apply(c, l.transform); c.scale(1, -1); c.drawImage(g.canvas, l.x, l.y, l.w, l.h, 0, -1, 1, 1); this.imageLayer && (l = this.getCanvasPosition(l.x, l.y), this.imageLayer.appendImage({ imgData: a, left: l[0], top: l[1], width: e, height: f })); c.restore() } }, paintSolidColorImageMask: function () { this.ctx.fillRect(0, 0, 1, 1) }, paintXObject: function () { k("Unsupported 'paintXObject' command.") }, markPoint: function (a) { }, markPointProps: function (a, b) { }, beginMarkedContent: function (a) { }, beginMarkedContentProps: function (a, b) { }, endMarkedContent: function () { }, beginCompat: function () { }, endCompat: function () { }, consumePath: function () { var a = this.ctx; this.pendingClip && (this.pendingClip === W ? void 0 !== a.mozFillRule ? (a.mozFillRule = "evenodd", a.clip(), a.mozFillRule = "nonzero") : a.clip("evenodd") : a.clip(), this.pendingClip = null); a.beginPath() }, getSinglePixelWidth: function (a) { null === this.cachedGetSinglePixelWidth && (a = this.ctx.mozCurrentTransformInverse, this.cachedGetSinglePixelWidth = Math.sqrt(Math.max(a[0] * a[0] + a[1] * a[1], a[2] * a[2] + a[3] * a[3]))); return this.cachedGetSinglePixelWidth }, getCanvasPosition: function (a, b) { var c = this.ctx.mozCurrentTransform; return [c[0] * a + c[2] * b + c[4], c[1] * a + c[3] * b + c[5]] } }; for (var Z in u) b.prototype[u[Z]] = b.prototype[Z]; return b }(); b.CanvasGraphics = d; b.createScratchCanvas = f }); (function (b, d) { d(b.pdfjsDisplayAPI = {}, b.pdfjsSharedUtil, b.pdfjsDisplayFontLoader, b.pdfjsDisplayCanvas, b.pdfjsDisplayMetadata, b.pdfjsDisplayDOMUtils) })(this, function (b, d, m, B, A, f, x) { function D(a, b, c, d) { if (a.destroyed) return Promise.reject(Error("Worker was destroyed")); b.disableAutoFetch = N("disableAutoFetch"); b.disableStream = N("disableStream"); b.chunkedViewerLoading = !!c; c && (b.length = c.length, b.initialData = c.initialData); return a.messageHandler.sendWithPromise("GetDocRequest", { docId: d, source: b, disableRange: N("disableRange"), maxImageSize: N("maxImageSize"), cMapUrl: N("cMapUrl"), cMapPacked: N("cMapPacked"), disableFontFace: N("disableFontFace"), disableCreateObjectURL: N("disableCreateObjectURL"), postMessageTransfers: N("postMessageTransfers") && !G }).then(function (b) { if (a.destroyed) throw Error("Worker was destroyed"); return b }) } var J = d.InvalidPDFException, E = d.MessageHandler, w = d.MissingPDFException, u = d.PageViewport, v = d.PasswordResponses, a = d.PasswordException, C = d.StatTimer, n = d.UnexpectedResponseException, z = d.UnknownErrorException, L = d.Util, l = d.createPromiseCapability, q = d.error, t = d.deprecated, y = d.getVerbosityLevel, k = d.info, r = d.isArrayBuffer, g = d.isSameOrigin, e = d.loadJpegStream, h = d.stringToBytes, F = d.globalScope, c = d.warn, ca = m.FontFaceObject, da = m.FontLoader, H = B.CanvasGraphics, R = B.createScratchCanvas, M = A.Metadata, N = f.getDefaultSetting, Y = !1, ea, G = !1; d = !1; "undefined" === typeof window && (Y = !0, "undefined" === typeof require.ensure && (require.ensure = require("node-ensure")), d = !0); "undefined" !== typeof __webpack_require__ && (d = !0); "undefined" !== typeof requirejs && requirejs.toUrl && (ea = requirejs.toUrl("pdfjs-dist/build/pdf.worker.js")); m = "undefined" !== typeof requirejs && requirejs.load; var T = d ? function (a) { require.ensure([], function () { var b = require("./pdf.worker.js"); a(b.WorkerMessageHandler) }) } : m ? function (a) { requirejs(["pdfjs-dist/build/pdf.worker"], function (b) { a(b.WorkerMessageHandler) }) } : null, fa = function () { function a() { this._capability = l(); this._worker = this._transport = null; this.docId = "d" + b++; this.destroyed = !1; this.onUnsupportedFeature = this.onProgress = this.onPassword = null } var b = 0; a.prototype = { get promise() { return this._capability.promise }, destroy: function () { this.destroyed = !0; return (this._transport ? this._transport.destroy() : Promise.resolve()).then(function () { this._transport = null; this._worker && (this._worker.destroy(), this._worker = null) }.bind(this)) }, then: function (a, b) { return this.promise.then.apply(this.promise, arguments) } }; return a }(), aa = function () { function a(b, c) { this.length = b; this.initialData = c; this._rangeListeners = []; this._progressListeners = []; this._progressiveReadListeners = []; this._readyCapability = l() } a.prototype = { addRangeListener: function (a) { this._rangeListeners.push(a) }, addProgressListener: function (a) { this._progressListeners.push(a) }, addProgressiveReadListener: function (a) { this._progressiveReadListeners.push(a) }, onDataRange: function (a, b) { for (var c = this._rangeListeners, d = 0, e = c.length; d < e; ++d) c[d](a, b) }, onDataProgress: function (a) { this._readyCapability.promise.then(function () { for (var b = this._progressListeners, c = 0, d = b.length; c < d; ++c) b[c](a) }.bind(this)) }, onDataProgressiveRead: function (a) { this._readyCapability.promise.then(function () { for (var b = this._progressiveReadListeners, c = 0, d = b.length; c < d; ++c) b[c](a) }.bind(this)) }, transportReady: function () { this._readyCapability.resolve() }, requestDataRange: function (a, b) { throw Error("Abstract method PDFDataRangeTransport.requestDataRange"); }, abort: function () { } }; return a }(), W = function () { function a(b, c, d) { this.pdfInfo = b; this.transport = c; this.loadingTask = d } a.prototype = { get numPages() { return this.pdfInfo.numPages }, get fingerprint() { return this.pdfInfo.fingerprint }, getPage: function (a) { return this.transport.getPage(a) }, getPageIndex: function (a) { return this.transport.getPageIndex(a) }, getDestinations: function () { return this.transport.getDestinations() }, getDestination: function (a) { return this.transport.getDestination(a) }, getPageLabels: function () { return this.transport.getPageLabels() }, getAttachments: function () { return this.transport.getAttachments() }, getJavaScript: function () { return this.transport.getJavaScript() }, getOutline: function () { return this.transport.getOutline() }, getMetadata: function () { return this.transport.getMetadata() }, getData: function () { return this.transport.getData() }, getDownloadInfo: function () { return this.transport.downloadInfoCapability.promise }, getStats: function () { return this.transport.getStats() }, cleanup: function () { this.transport.startCleanup() }, destroy: function () { return this.loadingTask.destroy() } }; return a }(), Z = function () { function a(b, c, d) { this.pageIndex = b; this.pageInfo = c; this.transport = d; this.stats = new C; this.stats.enabled = N("enableStats"); this.commonObjs = d.commonObjs; this.objs = new ga; this.pendingCleanup = this.cleanupAfterRender = !1; this.intentStates = Object.create(null); this.destroyed = !1 } a.prototype = { get pageNumber() { return this.pageIndex + 1 }, get rotate() { return this.pageInfo.rotate }, get ref() { return this.pageInfo.ref }, get view() { return this.pageInfo.view }, getViewport: function (a, b) { 2 > arguments.length && (b = this.rotate); return new u(this.view, a, b, 0, 0) }, getAnnotations: function (a) { a = a && a.intent || null; this.annotationsPromise && this.annotationsIntent === a || (this.annotationsPromise = this.transport.getAnnotations(this.pageIndex, a), this.annotationsIntent = a); return this.annotationsPromise }, render: function (a) { function b(a) { var d = e.renderTasks.indexOf(f); 0 <= d && e.renderTasks.splice(d, 1); g.cleanupAfterRender && (g.pendingCleanup = !0); g._tryCleanup(); a ? f.capability.reject(a) : f.capability.resolve(); c.timeEnd("Rendering"); c.timeEnd("Overall") } var c = this.stats; c.time("Overall"); this.pendingCleanup = !1; var d = "print" === a.intent ? "print" : "display"; this.intentStates[d] || (this.intentStates[d] = Object.create(null)); var e = this.intentStates[d]; e.displayReadyCapability || (e.receivingOperatorList = !0, e.displayReadyCapability = l(), e.operatorList = { fnArray: [], argsArray: [], lastChunk: !1 }, this.stats.time("Page Request"), this.transport.messageHandler.send("RenderPageRequest", { pageIndex: this.pageNumber - 1, intent: d })); var f = new V(b, a, this.objs, this.commonObjs, e.operatorList, this.pageNumber); f.useRequestAnimationFrame = "print" !== d; e.renderTasks || (e.renderTasks = []); e.renderTasks.push(f); d = f.task; a.continueCallback && (t("render is used with continueCallback parameter"), d.onContinue = a.continueCallback); var g = this; e.displayReadyCapability.promise.then(function (a) { g.pendingCleanup ? b() : (c.time("Rendering"), f.initalizeGraphics(a), f.operatorListChanged()) }, function (a) { b(a) }); return d }, getOperatorList: function () { function a() { if (b.operatorList.lastChunk) { b.opListReadCapability.resolve(b.operatorList); var d = b.renderTasks.indexOf(c); 0 <= d && b.renderTasks.splice(d, 1) } } this.intentStates.oplist || (this.intentStates.oplist = Object.create(null)); var b = this.intentStates.oplist, c; b.opListReadCapability || (c = {}, c.operatorListChanged = a, b.receivingOperatorList = !0, b.opListReadCapability = l(), b.renderTasks = [], b.renderTasks.push(c), b.operatorList = { fnArray: [], argsArray: [], lastChunk: !1 }, this.transport.messageHandler.send("RenderPageRequest", { pageIndex: this.pageIndex, intent: "oplist" })); return b.opListReadCapability.promise }, getTextContent: function (a) { return this.transport.messageHandler.sendWithPromise("GetTextContent", { pageIndex: this.pageNumber - 1, normalizeWhitespace: a && a.normalizeWhitespace || !1 }) }, _destroy: function () { this.destroyed = !0; this.transport.pageCache[this.pageIndex] = null; var a = []; Object.keys(this.intentStates).forEach(function (b) { "oplist" !== b && this.intentStates[b].renderTasks.forEach(function (b) { var c = b.capability.promise["catch"](function () { }); a.push(c); b.cancel() }) }, this); this.objs.clear(); this.annotationsPromise = null; this.pendingCleanup = !1; return Promise.all(a) }, destroy: function () { t("page destroy method, use cleanup() instead"); this.cleanup() }, cleanup: function () { this.pendingCleanup = !0; this._tryCleanup() }, _tryCleanup: function () { this.pendingCleanup && !Object.keys(this.intentStates).some(function (a) { a = this.intentStates[a]; return 0 !== a.renderTasks.length || a.receivingOperatorList }, this) && (Object.keys(this.intentStates).forEach(function (a) { delete this.intentStates[a] }, this), this.objs.clear(), this.annotationsPromise = null, this.pendingCleanup = !1) }, _startRenderPage: function (a, b) { var c = this.intentStates[b]; c.displayReadyCapability && c.displayReadyCapability.resolve(a) }, _renderPageChunk: function (a, b) { var c = this.intentStates[b], d, e; d = 0; for (e = a.length; d < e; d++) c.operatorList.fnArray.push(a.fnArray[d]), c.operatorList.argsArray.push(a.argsArray[d]); c.operatorList.lastChunk = a.lastChunk; for (d = 0; d < c.renderTasks.length; d++) c.renderTasks[d].operatorListChanged(); a.lastChunk && (c.receivingOperatorList = !1, this._tryCleanup()) } }; return a }(), O = function () { function a() { if ("undefined" !== typeof ea) return ea; if (N("workerSrc")) return N("workerSrc"); if (P) return P.replace(/\.js$/i, ".worker.js"); q("No PDFJS.workerSrc specified") } function b() { h || (h = l(), (T || function (b) { L.loadScript(a(), function () { b(window.pdfjsDistBuildPdfWorker.WorkerMessageHandler) }) })(h.resolve)); return h.promise } function d(a) { return URL.createObjectURL(new Blob(["importScripts('" + a + "');"])) } function e(a) { this.name = a; this.destroyed = !1; this._readyCapability = l(); this._messageHandler = this._webWorker = this._port = null; this._initialize() } var f = 0, h; e.prototype = { get promise() { return this._readyCapability.promise }, get port() { return this._port }, get messageHandler() { return this._messageHandler }, _initialize: function () { if (!Y && !N("disableWorker") && "undefined" !== typeof Worker) { var b = a(); try { g(window.location.href, b) || (b = d((new URL(b, window.location)).href)); // var c = new Worker(b), e = new E("main", "worker", c), f = function () { var c = new Worker(openinfo.root + 'scripts/default/flowpaper/pdf.worker.min.js'), e = new E("main", "worker", c), f = function () { console.log(c); console.log(b); console.log(e); c.removeEventListener("error", h); e.destroy(); c.terminate(); this.destroyed ? this._readyCapability.reject(Error("Worker was destroyed")) : this._setupFakeWorker() }.bind(this), h = function (a) { this._webWorker || f() }.bind(this); c.addEventListener("error", h); e.on("test", function (a) { c.removeEventListener("error", h); this.destroyed ? f() : a && a.supportTypedArray ? (this._messageHandler = e, this._webWorker = this._port = c, a.supportTransfers || (G = !0), this._readyCapability.resolve(), e.send("configure", { verbosity: y() })) : (this._setupFakeWorker(), e.destroy(), c.terminate()) }.bind(this)); e.on("console_log", function (a) { console.log.apply(console, a) }); e.on("console_error", function (a) { console.error.apply(console, a) }); e.on("ready", function (a) { c.removeEventListener("error", h); if (this.destroyed) f(); else try { l() } catch (b) { this._setupFakeWorker() } }.bind(this)); var l = function () { var a = N("postMessageTransfers") && !G, a = new Uint8Array([a ? 255 : 0]); try { e.send("test", a, [a.buffer]) } catch (b) { k("Cannot use postMessage transfers"), a[0] = 0, e.send("test", a) } }; l(); return } catch (p) { k("The worker has been disabled.") } } this._setupFakeWorker() }, _setupFakeWorker: function () { Y || N("disableWorker") || (c("Setting up fake worker."), Y = !0); b().then(function (a) { if (this.destroyed) this._readyCapability.reject(Error("Worker was destroyed")); else { var b = { _listeners: [], postMessage: function (a) { var b = { data: a }; this._listeners.forEach(function (a) { a.call(this, b) }, this) }, addEventListener: function (a, b) { this._listeners.push(b) }, removeEventListener: function (a, b) { var c = this._listeners.indexOf(b); this._listeners.splice(c, 1) }, terminate: function () { } }; this._port = b; var c = "fake" + f++, d = new E(c + "_worker", c, b); a.setup(d, b); this._messageHandler = new E(c, c + "_worker", b); this._readyCapability.resolve() } }.bind(this)) }, destroy: function () { this.destroyed = !0; this._webWorker && (this._webWorker.terminate(), this._webWorker = null); this._port = null; this._messageHandler && (this._messageHandler.destroy(), this._messageHandler = null) } }; return e }(), I = function () { function b(a, c, d) { this.messageHandler = a; this.loadingTask = c; this.pdfDataRangeTransport = d; this.commonObjs = new ga; this.fontLoader = new da(c.docId); this.destroyed = !1; this.destroyCapability = null; this.pageCache = []; this.pagePromises = []; this.downloadInfoCapability = l(); this.setupMessageHandler() } b.prototype = { destroy: function () { if (this.destroyCapability) return this.destroyCapability.promise; this.destroyed = !0; this.destroyCapability = l(); var a = []; this.pageCache.forEach(function (b) { b && a.push(b._destroy()) }); this.pageCache = []; this.pagePromises = []; var b = this, c = this.messageHandler.sendWithPromise("Terminate", null); a.push(c); Promise.all(a).then(function () { b.fontLoader.clear(); b.pdfDataRangeTransport && (b.pdfDataRangeTransport.abort(), b.pdfDataRangeTransport = null); b.messageHandler && (b.messageHandler.destroy(), b.messageHandler = null); b.destroyCapability.resolve() }, this.destroyCapability.reject); return this.destroyCapability.promise }, setupMessageHandler: function () { function b(a) { d.send("UpdatePassword", a) } var d = this.messageHandler, f = this.pdfDataRangeTransport; f && (f.addRangeListener(function (a, b) { d.send("OnDataRange", { begin: a, chunk: b }) }), f.addProgressListener(function (a) { d.send("OnDataProgress", { loaded: a }) }), f.addProgressiveReadListener(function (a) { d.send("OnDataRange", { chunk: a }) }), d.on("RequestDataRange", function (a) { f.requestDataRange(a.begin, a.end) }, this)); d.on("GetDoc", function (a) { var b = a.pdfInfo; this.numPages = a.pdfInfo.numPages; a = this.loadingTask; this.pdfDocument = b = new W(b, this, a); a._capability.resolve(b) }, this); d.on("NeedPassword", function (c) { var d = this.loadingTask; if (d.onPassword) return d.onPassword(b, v.NEED_PASSWORD); d._capability.reject(new a(c.message, c.code)) }, this); d.on("IncorrectPassword", function (c) { var d = this.loadingTask; if (d.onPassword) return d.onPassword(b, v.INCORRECT_PASSWORD); d._capability.reject(new a(c.message, c.code)) }, this); d.on("InvalidPDF", function (a) { this.loadingTask._capability.reject(new J(a.message)) }, this); d.on("MissingPDF", function (a) { this.loadingTask._capability.reject(new w(a.message)) }, this); d.on("UnexpectedResponse", function (a) { this.loadingTask._capability.reject(new n(a.message, a.status)) }, this); d.on("UnknownError", function (a) { this.loadingTask._capability.reject(new z(a.message, a.details)) }, this); d.on("DataLoaded", function (a) { this.downloadInfoCapability.resolve(a) }, this); d.on("PDFManagerReady", function (a) { this.pdfDataRangeTransport && this.pdfDataRangeTransport.transportReady() }, this); d.on("StartRenderPage", function (a) { if (!this.destroyed) { var b = this.pageCache[a.pageIndex]; b.stats.timeEnd("Page Request"); b._startRenderPage(a.transparency, a.intent) } }, this); d.on("RenderPageChunk", function (a) { this.destroyed || this.pageCache[a.pageIndex]._renderPageChunk(a.operatorList, a.intent) }, this); d.on("commonobj", function (a) { if (!this.destroyed) { var b = a[0], d = a[1]; if (!this.commonObjs.hasData(b)) switch (d) { case "Font": a = a[2]; var e; if ("error" in a) { var f = a.error; c("Error during font loading: " + f); this.commonObjs.resolve(b, f); break } else d = null, N("pdfBug") && F.FontInspector && F.FontInspector.enabled && (d = { registerFont: function (a, b) { F.FontInspector.fontAdded(a, b) } }), e = new ca(a, { isEvalSuported: N("isEvalSupported"), disableFontFace: N("disableFontFace"), fontRegistry: d }); this.fontLoader.bind([e], function (a) { this.commonObjs.resolve(b, e) }.bind(this)); break; case "FontPath": this.commonObjs.resolve(b, a[2]); break; default: f("Got unknown common object type " + d) } } }, this); d.on("obj", function (a) { if (!this.destroyed) { var b = a[0], c = a[2], d = this.pageCache[a[1]]; if (!d.objs.hasData(b)) switch (c) { case "JpegStream": a = a[3]; e(b, a, d.objs); break; case "Image": a = a[3]; d.objs.resolve(b, a); a && "data" in a && 8E6 < a.data.length && (d.cleanupAfterRender = !0); break; default: q("Got unknown object type " + c) } } }, this); d.on("DocProgress", function (a) { if (!this.destroyed) { var b = this.loadingTask; if (b.onProgress) b.onProgress({ loaded: a.loaded, total: a.total }) } }, this); d.on("PageError", function (a) { if (!this.destroyed) { var b = this.pageCache[a.pageNum - 1].intentStates[a.intent]; b.displayReadyCapability ? b.displayReadyCapability.reject(a.error) : q(a.error); if (b.operatorList) for (b.operatorList.lastChunk = !0, a = 0; a < b.renderTasks.length; a++) b.renderTasks[a].operatorListChanged() } }, this); d.on("UnsupportedFeature", function (a) { if (!this.destroyed) { a = a.featureId; var b = this.loadingTask; if (b.onUnsupportedFeature) b.onUnsupportedFeature(a); ha.notify(a) } }, this); d.on("JpegDecode", function (a) { if (this.destroyed) return Promise.reject("Worker was terminated"); var b = a[0], c = a[1]; return 3 !== c && 1 !== c ? Promise.reject(Error("Only 3 components or 1 component can be returned")) : new Promise(function (a, d) { var e = new Image; e.onload = function () { var b = e.width, d = e.height, f = b * d, g = 4 * f, f = new Uint8Array(f * c), h = R(b, d).getContext("2d"); h.drawImage(e, 0, 0); var h = h.getImageData(0, 0, b, d).data, k, l; if (3 === c) for (l = k = 0; k < g; k += 4, l += 3) f[l] = h[k], f[l + 1] = h[k + 1], f[l + 2] = h[k + 2]; else if (1 === c) for (l = k = 0; k < g; k += 4, l++) f[l] = h[k]; a({ data: f, width: b, height: d }) }; e.onerror = function () { d(Error("JpegDecode failed to load image")) }; e.src = b }) }, this) }, getData: function () { return this.messageHandler.sendWithPromise("GetData", null) }, getPage: function (a, b) { if (0 >= a || a > this.numPages || (a | 0) !== a) return Promise.reject(Error("Invalid page request")); var c = a - 1; if (c in this.pagePromises) return this.pagePromises[c]; var d = this.messageHandler.sendWithPromise("GetPage", { pageIndex: c }).then(function (a) { if (this.destroyed) throw Error("Transport destroyed"); a = new Z(c, a, this); return this.pageCache[c] = a }.bind(this)); return this.pagePromises[c] = d }, getPageIndex: function (a) { return this.messageHandler.sendWithPromise("GetPageIndex", { ref: a }) }, getAnnotations: function (a, b) { return this.messageHandler.sendWithPromise("GetAnnotations", { pageIndex: a, intent: b }) }, getDestinations: function () { return this.messageHandler.sendWithPromise("GetDestinations", null) }, getDestination: function (a) { return this.messageHandler.sendWithPromise("GetDestination", { id: a }) }, getPageLabels: function () { return this.messageHandler.sendWithPromise("GetPageLabels", null) }, getAttachments: function () { return this.messageHandler.sendWithPromise("GetAttachments", null) }, getJavaScript: function () { return this.messageHandler.sendWithPromise("GetJavaScript", null) }, getOutline: function () { return this.messageHandler.sendWithPromise("GetOutline", null) }, getMetadata: function () { return this.messageHandler.sendWithPromise("GetMetadata", null).then(function (a) { return { info: a[0], metadata: a[1] ? new M(a[1]) : null } }) }, getStats: function () { return this.messageHandler.sendWithPromise("GetStats", null) }, startCleanup: function () { this.messageHandler.sendWithPromise("Cleanup", null).then(function () { for (var a = 0, b = this.pageCache.length; a < b; a++) { var c = this.pageCache[a]; c && c.cleanup() } this.commonObjs.clear(); this.fontLoader.clear() }.bind(this)) } }; return b }(), ga = function () { function a() { this.objs = Object.create(null) } a.prototype = { ensureObj: function (a) { if (this.objs[a]) return this.objs[a]; var b = { capability: l(), data: null, resolved: !1 }; return this.objs[a] = b }, get: function (a, b) { if (b) return this.ensureObj(a).capability.promise.then(b), null; var c = this.objs[a]; c && c.resolved || q("Requesting object that isn't resolved yet " + a); return c.data }, resolve: function (a, b) { var c = this.ensureObj(a); c.resolved = !0; c.data = b; c.capability.resolve(b) }, isResolved: function (a) { var b = this.objs; return b[a] ? b[a].resolved : !1 }, hasData: function (a) { return this.isResolved(a) }, getData: function (a) { var b = this.objs; return b[a] && b[a].resolved ? b[a].data : null }, clear: function () { this.objs = Object.create(null) } }; return a }(), ia = function () { function a(b) { this._internalRenderTask = b; this.onContinue = null } a.prototype = { get promise() { return this._internalRenderTask.capability.promise }, cancel: function () { this._internalRenderTask.cancel() }, then: function (a, b) { return this.promise.then.apply(this.promise, arguments) } }; return a }(), V = function () { function a(b, c, d, e, f, g) { this.callback = b; this.params = c; this.objs = d; this.commonObjs = e; this.operatorListIdx = null; this.operatorList = f; this.pageNumber = g; this.running = !1; this.graphicsReadyCallback = null; this.cancelled = this.useRequestAnimationFrame = this.graphicsReady = !1; this.capability = l(); this.task = new ia(this); this._continueBound = this._continue.bind(this); this._scheduleNextBound = this._scheduleNext.bind(this); this._nextBound = this._next.bind(this) } a.prototype = { initalizeGraphics: function (a) { if (!this.cancelled) { N("pdfBug") && F.StepperManager && F.StepperManager.enabled && (this.stepper = F.StepperManager.create(this.pageNumber - 1), this.stepper.init(this.operatorList), this.stepper.nextBreakPoint = this.stepper.getNextBreakPoint()); var b = this.params; this.gfx = new H(b.canvasContext, this.commonObjs, this.objs, b.imageLayer); this.gfx.beginDrawing(b.transform, b.viewport, a); this.operatorListIdx = 0; this.graphicsReady = !0; this.graphicsReadyCallback && this.graphicsReadyCallback() } }, cancel: function () { this.running = !1; this.cancelled = !0; this.callback("cancelled") }, operatorListChanged: function () { this.graphicsReady ? (this.stepper && this.stepper.updateOperatorList(this.operatorList), this.running || this._continue()) : this.graphicsReadyCallback || (this.graphicsReadyCallback = this._continueBound) }, _continue: function () { this.running = !0; this.cancelled || (this.task.onContinue ? this.task.onContinue.call(this.task, this._scheduleNextBound) : this._scheduleNext()) }, _scheduleNext: function () { this.useRequestAnimationFrame && "undefined" !== typeof window ? window.requestAnimationFrame(this._nextBound) : Promise.resolve(void 0).then(this._nextBound) }, _next: function () { this.cancelled || (this.operatorListIdx = this.gfx.executeOperatorList(this.operatorList, this.operatorListIdx, this._continueBound, this.stepper), this.operatorListIdx === this.operatorList.argsArray.length && (this.running = !1, this.operatorList.lastChunk && (this.gfx.endDrawing(), this.callback()))) } }; return a }(), ha = function () { var a = []; return { listen: function (b) { t("Global UnsupportedManager.listen is used: use PDFDocumentLoadingTask.onUnsupportedFeature instead"); a.push(b) }, notify: function (b) { for (var c = 0, d = a.length; c < d; c++) a[c](b) } } }(); b.version = "1.5.188"; b.build = "0e2d50f"; b.getDocument = function (a, b, c, d) { var e = new fa; 1 < arguments.length && t("getDocument is called with pdfDataRangeTransport, passwordCallback or progressCallback argument"); b && (b instanceof aa || (b = Object.create(b), b.length = a.length, b.initialData = a.initialData, b.abort || (b.abort = function () { })), a = Object.create(a), a.range = b); e.onPassword = c || null; e.onProgress = d || null; var f; "string" === typeof a ? f = { url: a } : r(a) ? f = { data: a } : a instanceof aa ? f = { range: a } : ("object" !== typeof a && q("Invalid parameter in getDocument, need either Uint8Array, string or a parameter object"), a.url || a.data || a.range || q("Invalid parameter object: need either .data, .range or .url"), f = a); var g = {}, k = null, l = null, m; for (m in f) if ("url" === m && "undefined" !== typeof window) g[m] = (new URL(f[m], window.location)).href; else if ("range" === m) k = f[m]; else if ("worker" === m) l = f[m]; else if ("data" !== m || f[m] instanceof Uint8Array) g[m] = f[m]; else { var n = f[m]; "string" === typeof n ? g[m] = h(n) : "object" !== typeof n || null === n || isNaN(n.length) ? r(n) ? g[m] = new Uint8Array(n) : q("Invalid PDF binary data: either typed array, string or array-like object is expected in the data property.") : g[m] = new Uint8Array(n) } g.rangeChunkSize = g.rangeChunkSize || 65536; l || (l = new O, e._worker = l); var u = e.docId; l.promise.then(function () { if (e.destroyed) throw Error("Loading aborted"); return D(l, g, k, u).then(function (a) { if (e.destroyed) throw Error("Loading aborted"); a = new E(u, a, l.port); var b = new I(a, e, k); e._transport = b; a.send("Ready", null) }) })["catch"](e._capability.reject); return e }; b.PDFDataRangeTransport = aa; b.PDFWorker = O; b.PDFDocumentProxy = W; b.PDFPageProxy = Z; b._UnsupportedManager = ha }); (function (b, d) { d(b.pdfjsDisplayGlobal = {}, b.pdfjsSharedUtil, b.pdfjsDisplayDOMUtils, b.pdfjsDisplayAPI, b.pdfjsDisplayAnnotationLayer, b.pdfjsDisplayTextLayer, b.pdfjsDisplayMetadata, b.pdfjsDisplaySVG) })(this, function (b, d, m, B, A, f, x, D) { var J = d.globalScope, E = d.deprecated, w = d.warn, u = m.LinkTarget, v = "undefined" === typeof window; J.PDFJS || (J.PDFJS = {}); var a = J.PDFJS; a.version = "1.5.188"; a.build = "0e2d50f"; a.pdfBug = !1; void 0 !== a.verbosity && d.setVerbosityLevel(a.verbosity); delete a.verbosity; Object.defineProperty(a, "verbosity", { get: function () { return d.getVerbosityLevel() }, set: function (a) { d.setVerbosityLevel(a) }, enumerable: !0, configurable: !0 }); a.VERBOSITY_LEVELS = d.VERBOSITY_LEVELS; a.OPS = d.OPS; a.UNSUPPORTED_FEATURES = d.UNSUPPORTED_FEATURES; a.isValidUrl = d.isValidUrl; a.shadow = d.shadow; a.createBlob = d.createBlob; a.createObjectURL = function (b, f) { return d.createObjectURL(b, f, a.disableCreateObjectURL) }; Object.defineProperty(a, "isLittleEndian", { configurable: !0, get: function () { var b = d.isLittleEndian(); return d.shadow(a, "isLittleEndian", b) } }); a.removeNullCharacters = d.removeNullCharacters; a.PasswordResponses = d.PasswordResponses; a.PasswordException = d.PasswordException; a.UnknownErrorException = d.UnknownErrorException; a.InvalidPDFException = d.InvalidPDFException; a.MissingPDFException = d.MissingPDFException; a.UnexpectedResponseException = d.UnexpectedResponseException; a.Util = d.Util; a.PageViewport = d.PageViewport; a.createPromiseCapability = d.createPromiseCapability; a.maxImageSize = void 0 === a.maxImageSize ? -1 : a.maxImageSize; a.cMapUrl = void 0 === a.cMapUrl ? null : a.cMapUrl; a.cMapPacked = void 0 === a.cMapPacked ? !1 : a.cMapPacked; a.disableFontFace = void 0 === a.disableFontFace ? !1 : a.disableFontFace; a.imageResourcesPath = void 0 === a.imageResourcesPath ? "" : a.imageResourcesPath; a.disableWorker = void 0 === a.disableWorker ? !1 : a.disableWorker; a.workerSrc = void 0 === a.workerSrc ? null : a.workerSrc; a.disableRange = void 0 === a.disableRange ? !1 : a.disableRange; a.disableStream = void 0 === a.disableStream ? !1 : a.disableStream; a.disableAutoFetch = void 0 === a.disableAutoFetch ? !1 : a.disableAutoFetch; a.pdfBug = void 0 === a.pdfBug ? !1 : a.pdfBug; a.postMessageTransfers = void 0 === a.postMessageTransfers ? !0 : a.postMessageTransfers; a.disableCreateObjectURL = void 0 === a.disableCreateObjectURL ? !1 : a.disableCreateObjectURL; a.disableWebGL = void 0 === a.disableWebGL ? !0 : a.disableWebGL; a.externalLinkTarget = void 0 === a.externalLinkTarget ? u.NONE : a.externalLinkTarget; a.externalLinkRel = void 0 === a.externalLinkRel ? "noreferrer" : a.externalLinkRel; a.isEvalSupported = void 0 === a.isEvalSupported ? !0 : a.isEvalSupported; var C = a.openExternalLinksInNewWindow; delete a.openExternalLinksInNewWindow; Object.defineProperty(a, "openExternalLinksInNewWindow", { get: function () { return a.externalLinkTarget === u.BLANK }, set: function (b) { b && E('PDFJS.openExternalLinksInNewWindow, please use "PDFJS.externalLinkTarget = PDFJS.LinkTarget.BLANK" instead.'); a.externalLinkTarget !== u.NONE ? w("PDFJS.externalLinkTarget is already initialized") : a.externalLinkTarget = b ? u.BLANK : u.NONE }, enumerable: !0, configurable: !0 }); C && (a.openExternalLinksInNewWindow = C); a.getDocument = B.getDocument; a.PDFDataRangeTransport = B.PDFDataRangeTransport; a.PDFWorker = B.PDFWorker; Object.defineProperty(a, "hasCanvasTypedArrays", { configurable: !0, get: function () { var b = m.hasCanvasTypedArrays(); return d.shadow(a, "hasCanvasTypedArrays", b) } }); a.CustomStyle = m.CustomStyle; a.LinkTarget = u; a.addLinkAttributes = m.addLinkAttributes; a.getFilenameFromUrl = m.getFilenameFromUrl; a.isExternalLinkTargetSet = m.isExternalLinkTargetSet; a.AnnotationLayer = A.AnnotationLayer; a.renderTextLayer = f.renderTextLayer; a.Metadata = x.Metadata; a.SVGGraphics = D.SVGGraphics; a.UnsupportedManager = B._UnsupportedManager; b.globalScope = J; b.isWorker = v; b.PDFJS = J.PDFJS }) }).call(D); m.PDFJS = D.pdfjsDisplayGlobal.PDFJS; m.build = D.pdfjsDisplayAPI.build; m.version = D.pdfjsDisplayAPI.version; m.getDocument = D.pdfjsDisplayAPI.getDocument; m.PDFDataRangeTransport = D.pdfjsDisplayAPI.PDFDataRangeTransport; m.PDFWorker = D.pdfjsDisplayAPI.PDFWorker; m.renderTextLayer = D.pdfjsDisplayTextLayer.renderTextLayer; m.AnnotationLayer = D.pdfjsDisplayAnnotationLayer.AnnotationLayer; m.CustomStyle = D.pdfjsDisplayDOMUtils.CustomStyle; m.PasswordResponses = D.pdfjsSharedUtil.PasswordResponses; m.InvalidPDFException = D.pdfjsSharedUtil.InvalidPDFException; m.MissingPDFException = D.pdfjsSharedUtil.MissingPDFException; m.SVGGraphics = D.pdfjsDisplaySVG.SVGGraphics; m.UnexpectedResponseException = D.pdfjsSharedUtil.UnexpectedResponseException; m.OPS = D.pdfjsSharedUtil.OPS; m.UNSUPPORTED_FEATURES = D.pdfjsSharedUtil.UNSUPPORTED_FEATURES; m.isValidUrl = D.pdfjsSharedUtil.isValidUrl; m.createObjectURL = D.pdfjsSharedUtil.createObjectURL; m.removeNullCharacters = D.pdfjsSharedUtil.removeNullCharacters; m.shadow = D.pdfjsSharedUtil.shadow; m.createBlob = D.pdfjsSharedUtil.createBlob; m.getFilenameFromUrl = D.pdfjsDisplayDOMUtils.getFilenameFromUrl; m.addLinkAttributes = D.pdfjsDisplayDOMUtils.addLinkAttributes });