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