react-jquery-datatables
Version:
React, DataTables.net (aka jQuery DataTables), fork of https://github.com/carlosrocha/react-data-components
6 lines • 452 kB
JavaScript
/* eslint-disable */"use strict";!(function(t){function e(r){if(n[r])return n[r].exports;var i=n[r] = {exports:{},id:r,loaded:!1};return t[r].call(i.exports,i,i.exports,e),i.loaded = !0,i.exports;}var n={};return e.m = t,e.c = n,e.p = "",e(0);})([function(t,e,n){(function(e){t.exports = e.pdfMake = n(1);}).call(e,(function(){return this;})());},function(t,e,n){(function(e){"use strict";function r(t,e,n){this.docDefinition = t,this.fonts = e || a,this.vfs = n;}var i=n(2),o=n(3),a={Roboto:{normal:"Roboto-Regular.ttf",bold:"Roboto-Medium.ttf",italics:"Roboto-Italic.ttf",bolditalics:"Roboto-Italic.ttf"}};r.prototype._createDoc = function(t,n){var r=new i(this.fonts);r.fs.bindFS(this.vfs);var o,a=r.createPdfKitDocument(this.docDefinition,t),s=[];a.on("data",function(t){s.push(t);}),a.on("end",function(){o = e.concat(s),n(o,a._pdfMakePages);}),a.end();},r.prototype._getPages = function(t,e){if(!e)throw "getBuffer is an async method and needs a callback argument";this._createDoc(t,function(t,n){e(n);});},r.prototype.open = function(t){var e=window.open("","_blank");try{this.getDataUrl(function(t){e.location.href = t;});}catch(n) {throw (e.close(),n);}},r.prototype.print = function(){this.getDataUrl(function(t){var e=document.createElement("iframe");e.style.position = "absolute",e.style.left = "-99999px",e.src = t,e.onload = function(){function t(){document.body.removeChild(e),document.removeEventListener("click",t);}document.addEventListener("click",t,!1);},document.body.appendChild(e);},{autoPrint:!0});},r.prototype.download = function(t,e){"function" == typeof t && (e = t,t = null),t = t || "file.pdf",this.getBuffer(function(n){o(new Blob([n],{type:"application/pdf"}),t),"function" == typeof e && e();});},r.prototype.getBase64 = function(t,e){if(!t)throw "getBase64 is an async method and needs a callback argument";this._createDoc(e,function(e){t(e.toString("base64"));});},r.prototype.getDataUrl = function(t,e){if(!t)throw "getDataUrl is an async method and needs a callback argument";this._createDoc(e,function(e){t("data:application/pdf;base64," + e.toString("base64"));});},r.prototype.getBuffer = function(t,e){if(!t)throw "getBuffer is an async method and needs a callback argument";this._createDoc(e,function(e){t(e);});},t.exports = {createPdf:function createPdf(t){return new r(t,window.pdfMake.fonts,window.pdfMake.vfs);}};}).call(e,n(4).Buffer);},function(t,e,n){"use strict";function r(t){this.fontDescriptors = t;}function i(t){if(!t)return null;if("number" == typeof t || t instanceof Number)t = {left:t,right:t,top:t,bottom:t};else if(t instanceof Array)if(2 === t.length)t = {left:t[0],top:t[1],right:t[0],bottom:t[1]};else {if(4 !== t.length)throw "Invalid pageMargins definition";t = {left:t[0],top:t[1],right:t[2],bottom:t[3]};}return t;}function o(t){t.registerTableLayouts({noBorders:{hLineWidth:function hLineWidth(t){return 0;},vLineWidth:function vLineWidth(t){return 0;},paddingLeft:function paddingLeft(t){return t && 4 || 0;},paddingRight:function paddingRight(t,e){return t < e.table.widths.length - 1?4:0;}},headerLineOnly:{hLineWidth:function hLineWidth(t,e){return 0 === t || t === e.table.body.length?0:t === e.table.headerRows?2:0;},vLineWidth:function vLineWidth(t){return 0;},paddingLeft:function paddingLeft(t){return 0 === t?0:8;},paddingRight:function paddingRight(t,e){return t === e.table.widths.length - 1?0:8;}},lightHorizontalLines:{hLineWidth:function hLineWidth(t,e){return 0 === t || t === e.table.body.length?0:t === e.table.headerRows?2:1;},vLineWidth:function vLineWidth(t){return 0;},hLineColor:function hLineColor(t){return 1 === t?"black":"#aaa";},paddingLeft:function paddingLeft(t){return 0 === t?0:8;},paddingRight:function paddingRight(t,e){return t === e.table.widths.length - 1?0:8;}}});}function a(t){if("string" == typeof t || t instanceof String){var e=y[t.toUpperCase()];if(!e)throw "Page size " + t + " not recognized";return {width:e[0],height:e[1]};}return t;}function s(t){this.isString = !0,this.toString = function(){return t;};}function h(t,e){var n=e.options.size[0] > e.options.size[1]?"landscape":"portrait";if(t.pageSize.orientation !== n){var r=e.options.size[0],i=e.options.size[1];e.options.size = [i,r];}}function u(t,e,n){n._pdfMakePages = t;for(var r=0;r < t.length;r++) {r > 0 && (h(t[r],n),n.addPage(n.options));for(var i=t[r],o=0,a=i.items.length;a > o;o++) {var s=i.items[o];switch(s.type){case "vector":f(s.item,n);break;case "line":l(s.item,s.item.x,s.item.y,n);break;case "image":d(s.item,s.item.x,s.item.y,n);}}i.watermark && c(i,n),e.setFontRefsToPdfDoc();}}function l(t,e,n,r){e = e || 0,n = n || 0;var i=t.getAscenderHeight();_.drawBackground(t,e,n,r);for(var o=0,a=t.inlines.length;a > o;o++) {var s=t.inlines[o];r.fill(s.color || "black"),r.save(),r.transform(1,0,0,-1,0,r.page.height);var h=s.font.encode(s.text);r.addContent("BT"),r.addContent("" + (e + s.x) + " " + (r.page.height - n - i) + " Td"),r.addContent("/" + h.fontId + " " + s.fontSize + " Tf"),r.addContent("<" + h.encodedText + "> Tj"),r.addContent("ET"),r.restore();}_.drawDecorations(t,e,n,r);}function c(t,e){var n=t.watermark;e.fill("black"),e.opacity(.6),e.save(),e.transform(1,0,0,-1,0,e.page.height);var r=180 * Math.atan2(e.page.height,e.page.width) / Math.PI;e.rotate(r,{origin:[e.page.width / 2,e.page.height / 2]});var i=n.font.encode(n.text);e.addContent("BT"),e.addContent("" + (e.page.width / 2 - n.size.size.width / 2) + " " + (e.page.height / 2 - n.size.size.height / 4) + " Td"),e.addContent("/" + i.fontId + " " + n.size.fontSize + " Tf"),e.addContent("<" + i.encodedText + "> Tj"),e.addContent("ET"),e.restore();}function f(t,e){switch((e.lineWidth(t.lineWidth || 1),t.dash?e.dash(t.dash.length,{space:t.dash.space || t.dash.length}):e.undash(),e.fillOpacity(t.fillOpacity || 1),e.strokeOpacity(t.strokeOpacity || 1),e.lineJoin(t.lineJoin || "miter"),t.type)){case "ellipse":e.ellipse(t.x,t.y,t.r1,t.r2);break;case "rect":t.r?e.roundedRect(t.x,t.y,t.w,t.h,t.r):e.rect(t.x,t.y,t.w,t.h);break;case "line":e.moveTo(t.x1,t.y1),e.lineTo(t.x2,t.y2);break;case "polyline":if(0 === t.points.length)break;e.moveTo(t.points[0].x,t.points[0].y);for(var n=1,r=t.points.length;r > n;n++) e.lineTo(t.points[n].x,t.points[n].y);if(t.points.length > 1){var i=t.points[0],o=t.points[t.points.length - 1];(t.closePath || i.x === o.x && i.y === o.y) && e.closePath();}}t.color && t.lineColor?e.fillAndStroke(t.color,t.lineColor):t.color?e.fill(t.color):e.stroke(t.lineColor || "black");}function d(t,e,n,r){r.image(t.image,t.x,t.y,{width:t._width,height:t._height});}var p=(n(11),n(5)),g=n(6),v=n(28),m=n(12),y=n(7),w=n(8),_=n(9),p=n(5);r.prototype.createPdfKitDocument = function(t,e){e = e || {};var n=a(t.pageSize || "a4");"landscape" === t.pageOrientation && (n = {width:n.height,height:n.width}),n.orientation = "landscape" === t.pageOrientation?t.pageOrientation:"portrait",this.pdfKitDoc = new v({size:[n.width,n.height],compress:!1}),this.pdfKitDoc.info.Producer = "pdfmake",this.pdfKitDoc.info.Creator = "pdfmake",this.fontProvider = new p(this.fontDescriptors,this.pdfKitDoc),t.images = t.images || {};var r=new g(n,i(t.pageMargins || 40),new w(this.pdfKitDoc,t.images));o(r),e.tableLayouts && r.registerTableLayouts(e.tableLayouts);var h=r.layoutDocument(t.content,this.fontProvider,t.styles || {},t.defaultStyle || {fontSize:12,font:"Roboto"},t.background,t.header,t.footer,t.images,t.watermark,t.pageBreakBefore);if((u(h,this.fontProvider,this.pdfKitDoc),e.autoPrint)){var l=this.pdfKitDoc.ref({S:"JavaScript",JS:new s("this.print\\(true\\);")}),c=this.pdfKitDoc.ref({Names:[new s("EmbeddedJS"),new m(this.pdfKitDoc,l.id)]});l.end(),c.end(),this.pdfKitDoc._root.data.Names = {JavaScript:new m(this.pdfKitDoc,c.id)};}return this.pdfKitDoc;};t.exports = r,r.prototype.fs = n(10);},function(t,e,n){var r,i;(function(t){ /*! @source http://purl.eligrey.com/github/FileSaver.js/blob/master/FileSaver.js */var o=o || "undefined" != typeof navigator && navigator.msSaveOrOpenBlob && navigator.msSaveOrOpenBlob.bind(navigator) || (function(t){"use strict";if("undefined" == typeof navigator || !/MSIE [1-9]\./.test(navigator.userAgent)){var e=t.document,n=function n(){return t.URL || t.webkitURL || t;},r=e.createElementNS("http://www.w3.org/1999/xhtml","a"),i=("download" in r),o=function o(n){var r=e.createEvent("MouseEvents");r.initMouseEvent("click",!0,!1,t,0,0,0,0,0,!1,!1,!1,!1,0,null),n.dispatchEvent(r);},a=t.webkitRequestFileSystem,s=t.requestFileSystem || a || t.mozRequestFileSystem,h=function h(e){(t.setImmediate || t.setTimeout)(function(){throw e;},0);},u="application/octet-stream",l=0,c=10,f=function f(e){var r=function r(){"string" == typeof e?n().revokeObjectURL(e):e.remove();};t.chrome?r():setTimeout(r,c);},d=function d(t,e,n){e = [].concat(e);for(var r=e.length;r--;) {var i=t["on" + e[r]];if("function" == typeof i)try{i.call(t,n || t);}catch(o) {h(o);}}},p=function p(e,h){var c,p,g,v=this,m=e.type,y=!1,w=function w(){d(v,"writestart progress write writeend".split(" "));},_=function _(){if(((y || !c) && (c = n().createObjectURL(e)),p))p.location.href = c;else {var r=t.open(c,"_blank");void 0 == r && "undefined" != typeof safari && (t.location.href = c);}v.readyState = v.DONE,w(),f(c);},b=function b(t){return function(){return v.readyState !== v.DONE?t.apply(this,arguments):void 0;};},x={create:!0,exclusive:!1};return v.readyState = v.INIT,h || (h = "download"),i?(c = n().createObjectURL(e),r.href = c,r.download = h,o(r),v.readyState = v.DONE,w(),void f(c)):(t.chrome && m && m !== u && (g = e.slice || e.webkitSlice,e = g.call(e,0,e.size,u),y = !0),a && "download" !== h && (h += ".download"),(m === u || a) && (p = t),s?(l += e.size,void s(t.TEMPORARY,l,b(function(t){t.root.getDirectory("saved",x,b(function(t){var n=function n(){t.getFile(h,x,b(function(t){t.createWriter(b(function(n){n.onwriteend = function(e){p.location.href = t.toURL(),v.readyState = v.DONE,d(v,"writeend",e),f(t);},n.onerror = function(){var t=n.error;t.code !== t.ABORT_ERR && _();},"writestart progress write abort".split(" ").forEach(function(t){n["on" + t] = v["on" + t];}),n.write(e),v.abort = function(){n.abort(),v.readyState = v.DONE;},v.readyState = v.WRITING;}),_);}),_);};t.getFile(h,{create:!1},b(function(t){t.remove(),n();}),b(function(t){t.code === t.NOT_FOUND_ERR?n():_();}));}),_);}),_)):void _());},g=p.prototype,v=function v(t,e){return new p(t,e);};return g.abort = function(){var t=this;t.readyState = t.DONE,d(t,"abort");},g.readyState = g.INIT = 0,g.WRITING = 1,g.DONE = 2,g.error = g.onwritestart = g.onprogress = g.onwrite = g.onabort = g.onerror = g.onwriteend = null,v;}})("undefined" != typeof self && self || "undefined" != typeof window && window || this.content);"undefined" != typeof t && null !== t?t.exports = o:null !== n(13) && null != n(14) && (r = [],i = (function(){return o;}).apply(e,r),!(void 0 !== i && (t.exports = i)));}).call(e,n(15)(t));},function(t,e,n){(function(t){function t(e){return this instanceof t?(this.length = 0,this.parent = void 0,"number" == typeof e?r(this,e):"string" == typeof e?i(this,e,arguments.length > 1?arguments[1]:"utf8"):o(this,e)):arguments.length > 1?new t(e,arguments[1]):new t(e);}function r(e,n){if((e = c(e,0 > n?0:0 | f(n)),!t.TYPED_ARRAY_SUPPORT))for(var r=0;n > r;r++) e[r] = 0;return e;}function i(t,e,n){("string" != typeof n || "" === n) && (n = "utf8");var r=0 | p(e,n);return t = c(t,r),t.write(e,n),t;}function o(e,n){if(t.isBuffer(n))return a(e,n);if(G(n))return s(e,n);if(null == n)throw new TypeError("must start with number, buffer, array or string");return "undefined" != typeof ArrayBuffer && n.buffer instanceof ArrayBuffer?h(e,n):n.length?u(e,n):l(e,n);}function a(t,e){var n=0 | f(e.length);return t = c(t,n),e.copy(t,0,0,n),t;}function s(t,e){var n=0 | f(e.length);t = c(t,n);for(var r=0;n > r;r += 1) t[r] = 255 & e[r];return t;}function h(t,e){var n=0 | f(e.length);t = c(t,n);for(var r=0;n > r;r += 1) t[r] = 255 & e[r];return t;}function u(t,e){var n=0 | f(e.length);t = c(t,n);for(var r=0;n > r;r += 1) t[r] = 255 & e[r];return t;}function l(t,e){var n,r=0;"Buffer" === e.type && G(e.data) && (n = e.data,r = 0 | f(n.length)),t = c(t,r);for(var i=0;r > i;i += 1) t[i] = 255 & n[i];return t;}function c(e,n){t.TYPED_ARRAY_SUPPORT?e = t._augment(new Uint8Array(n)):(e.length = n,e._isBuffer = !0);var r=0 !== n && n <= t.poolSize >>> 1;return r && (e.parent = Y),e;}function f(t){if(t >= q)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x" + q.toString(16) + " bytes");return 0 | t;}function d(e,n){if(!(this instanceof d))return new d(e,n);var r=new t(e,n);return delete r.parent,r;}function p(t,e){if(("string" != typeof t && (t = String(t)),0 === t.length))return 0;switch(e || "utf8"){case "ascii":case "binary":case "raw":return t.length;case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":return 2 * t.length;case "hex":return t.length >>> 1;case "utf8":case "utf-8":return P(t).length;case "base64":return W(t).length;default:return t.length;}}function g(t,e,n,r){n = Number(n) || 0;var i=t.length - n;r?(r = Number(r),r > i && (r = i)):r = i;var o=e.length;if(o % 2 !== 0)throw new Error("Invalid hex string");r > o / 2 && (r = o / 2);for(var a=0;r > a;a++) {var s=parseInt(e.substr(2 * a,2),16);if(isNaN(s))throw new Error("Invalid hex string");t[n + a] = s;}return a;}function v(t,e,n,r){return N(P(e,t.length - n),t,n,r);}function m(t,e,n,r){return N(F(e),t,n,r);}function y(t,e,n,r){return m(t,e,n,r);}function w(t,e,n,r){return N(W(e),t,n,r);}function _(t,e,n,r){return N(z(e,t.length - n),t,n,r);}function b(t,e,n){return H.fromByteArray(0 === e && n === t.length?t:t.slice(e,n));}function x(t,e,n){var r="",i="";n = Math.min(t.length,n);for(var o=e;n > o;o++) t[o] <= 127?(r += j(i) + String.fromCharCode(t[o]),i = ""):i += "%" + t[o].toString(16);return r + j(i);}function S(t,e,n){var r="";n = Math.min(t.length,n);for(var i=e;n > i;i++) r += String.fromCharCode(127 & t[i]);return r;}function k(t,e,n){var r="";n = Math.min(t.length,n);for(var i=e;n > i;i++) r += String.fromCharCode(t[i]);return r;}function E(t,e,n){var r=t.length;(!e || 0 > e) && (e = 0),(!n || 0 > n || n > r) && (n = r);for(var i="",o=e;n > o;o++) i += U(t[o]);return i;}function C(t,e,n){for(var r=t.slice(e,n),i="",o=0;o < r.length;o += 2) i += String.fromCharCode(r[o] + 256 * r[o + 1]);return i;}function I(t,e,n){if(t % 1 !== 0 || 0 > t)throw new RangeError("offset is not uint");if(t + e > n)throw new RangeError("Trying to access beyond buffer length");}function A(e,n,r,i,o,a){if(!t.isBuffer(e))throw new TypeError("buffer must be a Buffer instance");if(n > o || a > n)throw new RangeError("value is out of bounds");if(r + i > e.length)throw new RangeError("index out of range");}function L(t,e,n,r){0 > e && (e = 65535 + e + 1);for(var i=0,o=Math.min(t.length - n,2);o > i;i++) t[n + i] = (e & 255 << 8 * (r?i:1 - i)) >>> 8 * (r?i:1 - i);}function R(t,e,n,r){0 > e && (e = 4294967295 + e + 1);for(var i=0,o=Math.min(t.length - n,4);o > i;i++) t[n + i] = e >>> 8 * (r?i:3 - i) & 255;}function B(t,e,n,r,i,o){if(e > i || o > e)throw new RangeError("value is out of bounds");if(n + r > t.length)throw new RangeError("index out of range");if(0 > n)throw new RangeError("index out of range");}function T(t,e,n,r,i){return i || B(t,e,n,4,3.4028234663852886e38,-3.4028234663852886e38),Z.write(t,e,n,r,23,4),n + 4;}function M(t,e,n,r,i){return i || B(t,e,n,8,1.7976931348623157e308,-1.7976931348623157e308),Z.write(t,e,n,r,52,8),n + 8;}function O(t){if((t = D(t).replace(X,""),t.length < 2))return "";for(;t.length % 4 !== 0;) t += "=";return t;}function D(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"");}function U(t){return 16 > t?"0" + t.toString(16):t.toString(16);}function P(t,e){e = e || 1 / 0;for(var n,r=t.length,i=null,o=[],a=0;r > a;a++) {if((n = t.charCodeAt(a),n > 55295 && 57344 > n)){if(!i){if(n > 56319){(e -= 3) > -1 && o.push(239,191,189);continue;}if(a + 1 === r){(e -= 3) > -1 && o.push(239,191,189);continue;}i = n;continue;}if(56320 > n){(e -= 3) > -1 && o.push(239,191,189),i = n;continue;}n = i - 55296 << 10 | n - 56320 | 65536,i = null;}else i && ((e -= 3) > -1 && o.push(239,191,189),i = null);if(128 > n){if((e -= 1) < 0)break;o.push(n);}else if(2048 > n){if((e -= 2) < 0)break;o.push(n >> 6 | 192,63 & n | 128);}else if(65536 > n){if((e -= 3) < 0)break;o.push(n >> 12 | 224,n >> 6 & 63 | 128,63 & n | 128);}else {if(!(2097152 > n))throw new Error("Invalid code point");if((e -= 4) < 0)break;o.push(n >> 18 | 240,n >> 12 & 63 | 128,n >> 6 & 63 | 128,63 & n | 128);}}return o;}function F(t){for(var e=[],n=0;n < t.length;n++) e.push(255 & t.charCodeAt(n));return e;}function z(t,e){for(var n,r,i,o=[],a=0;a < t.length && !((e -= 2) < 0);a++) n = t.charCodeAt(a),r = n >> 8,i = n % 256,o.push(i),o.push(r);return o;}function W(t){return H.toByteArray(O(t));}function N(t,e,n,r){for(var i=0;r > i && !(i + n >= e.length || i >= t.length);i++) e[i + n] = t[i];return i;}function j(t){try{return decodeURIComponent(t);}catch(e) {return String.fromCharCode(65533);}} /*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
* @license MIT
*/var H=n(31),Z=n(29),G=n(30);e.Buffer = t,e.SlowBuffer = d,e.INSPECT_MAX_BYTES = 50,t.poolSize = 8192;var q=1073741823,Y={};t.TYPED_ARRAY_SUPPORT = (function(){try{var t=new ArrayBuffer(0),e=new Uint8Array(t);return e.foo = function(){return 42;},42 === e.foo() && "function" == typeof e.subarray && 0 === new Uint8Array(1).subarray(1,1).byteLength;}catch(n) {return !1;}})(),t.isBuffer = function(t){return !(null == t || !t._isBuffer);},t.compare = function(e,n){if(!t.isBuffer(e) || !t.isBuffer(n))throw new TypeError("Arguments must be Buffers");if(e === n)return 0;for(var r=e.length,i=n.length,o=0,a=Math.min(r,i);a > o && e[o] === n[o];) ++o;return o !== a && (r = e[o],i = n[o]),i > r?-1:r > i?1:0;},t.isEncoding = function(t){switch(String(t).toLowerCase()){case "hex":case "utf8":case "utf-8":case "ascii":case "binary":case "base64":case "raw":case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":return !0;default:return !1;}},t.concat = function(e,n){if(!G(e))throw new TypeError("list argument must be an Array of Buffers.");if(0 === e.length)return new t(0);if(1 === e.length)return e[0];var r;if(void 0 === n)for(n = 0,r = 0;r < e.length;r++) n += e[r].length;var i=new t(n),o=0;for(r = 0;r < e.length;r++) {var a=e[r];a.copy(i,o),o += a.length;}return i;},t.byteLength = p,t.prototype.length = void 0,t.prototype.parent = void 0,t.prototype.toString = function(t,e,n){var r=!1;if((e = 0 | e,n = void 0 === n || n === 1 / 0?this.length:0 | n,t || (t = "utf8"),0 > e && (e = 0),n > this.length && (n = this.length),e >= n))return "";for(;;) switch(t){case "hex":return E(this,e,n);case "utf8":case "utf-8":return x(this,e,n);case "ascii":return S(this,e,n);case "binary":return k(this,e,n);case "base64":return b(this,e,n);case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":return C(this,e,n);default:if(r)throw new TypeError("Unknown encoding: " + t);t = (t + "").toLowerCase(),r = !0;}},t.prototype.equals = function(e){if(!t.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this === e?!0:0 === t.compare(this,e);},t.prototype.inspect = function(){var t="",n=e.INSPECT_MAX_BYTES;return this.length > 0 && (t = this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length > n && (t += " ... ")),"<Buffer " + t + ">";},t.prototype.compare = function(e){if(!t.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this === e?0:t.compare(this,e);},t.prototype.indexOf = function(e,n){function r(t,e,n){for(var r=-1,i=0;n + i < t.length;i++) if(t[n + i] === e[-1 === r?0:i - r]){if((-1 === r && (r = i),i - r + 1 === e.length))return n + r;}else r = -1;return -1;}if((n > 2147483647?n = 2147483647:-2147483648 > n && (n = -2147483648),n >>= 0,0 === this.length))return -1;if(n >= this.length)return -1;if((0 > n && (n = Math.max(this.length + n,0)),"string" == typeof e))return 0 === e.length?-1:String.prototype.indexOf.call(this,e,n);if(t.isBuffer(e))return r(this,e,n);if("number" == typeof e)return t.TYPED_ARRAY_SUPPORT && "function" === Uint8Array.prototype.indexOf?Uint8Array.prototype.indexOf.call(this,e,n):r(this,[e],n);throw new TypeError("val must be string, number or Buffer");},t.prototype.get = function(t){return this.readUInt8(t);},t.prototype.set = function(t,e){return this.writeUInt8(t,e);},t.prototype.write = function(t,e,n,r){if(void 0 === e)r = "utf8",n = this.length,e = 0;else if(void 0 === n && "string" == typeof e)r = e,n = this.length,e = 0;else if(isFinite(e))e = 0 | e,isFinite(n)?(n = 0 | n,void 0 === r && (r = "utf8")):(r = n,n = void 0);else {var i=r;r = e,e = 0 | n,n = i;}var o=this.length - e;if(((void 0 === n || n > o) && (n = o),t.length > 0 && (0 > n || 0 > e) || e > this.length))throw new RangeError("attempt to write outside buffer bounds");r || (r = "utf8");for(var a=!1;;) switch(r){case "hex":return g(this,t,e,n);case "utf8":case "utf-8":return v(this,t,e,n);case "ascii":return m(this,t,e,n);case "binary":return y(this,t,e,n);case "base64":return w(this,t,e,n);case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":return _(this,t,e,n);default:if(a)throw new TypeError("Unknown encoding: " + r);r = ("" + r).toLowerCase(),a = !0;}},t.prototype.toJSON = function(){return {type:"Buffer",data:Array.prototype.slice.call(this._arr || this,0)};},t.prototype.slice = function(e,n){var r=this.length;e = ~ ~e,n = void 0 === n?r:~ ~n,0 > e?(e += r,0 > e && (e = 0)):e > r && (e = r),0 > n?(n += r,0 > n && (n = 0)):n > r && (n = r),e > n && (n = e);var i;if(t.TYPED_ARRAY_SUPPORT)i = t._augment(this.subarray(e,n));else {var o=n - e;i = new t(o,void 0);for(var a=0;o > a;a++) i[a] = this[a + e];}return i.length && (i.parent = this.parent || this),i;},t.prototype.readUIntLE = function(t,e,n){t = 0 | t,e = 0 | e,n || I(t,e,this.length);for(var r=this[t],i=1,o=0;++o < e && (i *= 256);) r += this[t + o] * i;return r;},t.prototype.readUIntBE = function(t,e,n){t = 0 | t,e = 0 | e,n || I(t,e,this.length);for(var r=this[t + --e],i=1;e > 0 && (i *= 256);) r += this[t + --e] * i;return r;},t.prototype.readUInt8 = function(t,e){return e || I(t,1,this.length),this[t];},t.prototype.readUInt16LE = function(t,e){return e || I(t,2,this.length),this[t] | this[t + 1] << 8;},t.prototype.readUInt16BE = function(t,e){return e || I(t,2,this.length),this[t] << 8 | this[t + 1];},t.prototype.readUInt32LE = function(t,e){return e || I(t,4,this.length),(this[t] | this[t + 1] << 8 | this[t + 2] << 16) + 16777216 * this[t + 3];},t.prototype.readUInt32BE = function(t,e){return e || I(t,4,this.length),16777216 * this[t] + (this[t + 1] << 16 | this[t + 2] << 8 | this[t + 3]);},t.prototype.readIntLE = function(t,e,n){t = 0 | t,e = 0 | e,n || I(t,e,this.length);for(var r=this[t],i=1,o=0;++o < e && (i *= 256);) r += this[t + o] * i;return i *= 128,r >= i && (r -= Math.pow(2,8 * e)),r;},t.prototype.readIntBE = function(t,e,n){t = 0 | t,e = 0 | e,n || I(t,e,this.length);for(var r=e,i=1,o=this[t + --r];r > 0 && (i *= 256);) o += this[t + --r] * i;return i *= 128,o >= i && (o -= Math.pow(2,8 * e)),o;},t.prototype.readInt8 = function(t,e){return e || I(t,1,this.length),128 & this[t]?-1 * (255 - this[t] + 1):this[t];},t.prototype.readInt16LE = function(t,e){e || I(t,2,this.length);var n=this[t] | this[t + 1] << 8;return 32768 & n?4294901760 | n:n;},t.prototype.readInt16BE = function(t,e){e || I(t,2,this.length);var n=this[t + 1] | this[t] << 8;return 32768 & n?4294901760 | n:n;},t.prototype.readInt32LE = function(t,e){return e || I(t,4,this.length),this[t] | this[t + 1] << 8 | this[t + 2] << 16 | this[t + 3] << 24;},t.prototype.readInt32BE = function(t,e){return e || I(t,4,this.length),this[t] << 24 | this[t + 1] << 16 | this[t + 2] << 8 | this[t + 3];},t.prototype.readFloatLE = function(t,e){return e || I(t,4,this.length),Z.read(this,t,!0,23,4);},t.prototype.readFloatBE = function(t,e){return e || I(t,4,this.length),Z.read(this,t,!1,23,4);},t.prototype.readDoubleLE = function(t,e){return e || I(t,8,this.length),Z.read(this,t,!0,52,8);},t.prototype.readDoubleBE = function(t,e){return e || I(t,8,this.length),Z.read(this,t,!1,52,8);},t.prototype.writeUIntLE = function(t,e,n,r){t = +t,e = 0 | e,n = 0 | n,r || A(this,t,e,n,Math.pow(2,8 * n),0);var i=1,o=0;for(this[e] = 255 & t;++o < n && (i *= 256);) this[e + o] = t / i & 255;return e + n;},t.prototype.writeUIntBE = function(t,e,n,r){t = +t,e = 0 | e,n = 0 | n,r || A(this,t,e,n,Math.pow(2,8 * n),0);var i=n - 1,o=1;for(this[e + i] = 255 & t;--i >= 0 && (o *= 256);) this[e + i] = t / o & 255;return e + n;},t.prototype.writeUInt8 = function(e,n,r){return e = +e,n = 0 | n,r || A(this,e,n,1,255,0),t.TYPED_ARRAY_SUPPORT || (e = Math.floor(e)),this[n] = e,n + 1;},t.prototype.writeUInt16LE = function(e,n,r){return e = +e,n = 0 | n,r || A(this,e,n,2,65535,0),t.TYPED_ARRAY_SUPPORT?(this[n] = e,this[n + 1] = e >>> 8):L(this,e,n,!0),n + 2;},t.prototype.writeUInt16BE = function(e,n,r){return e = +e,n = 0 | n,r || A(this,e,n,2,65535,0),t.TYPED_ARRAY_SUPPORT?(this[n] = e >>> 8,this[n + 1] = e):L(this,e,n,!1),n + 2;},t.prototype.writeUInt32LE = function(e,n,r){return e = +e,n = 0 | n,r || A(this,e,n,4,4294967295,0),t.TYPED_ARRAY_SUPPORT?(this[n + 3] = e >>> 24,this[n + 2] = e >>> 16,this[n + 1] = e >>> 8,this[n] = e):R(this,e,n,!0),n + 4;},t.prototype.writeUInt32BE = function(e,n,r){return e = +e,n = 0 | n,r || A(this,e,n,4,4294967295,0),t.TYPED_ARRAY_SUPPORT?(this[n] = e >>> 24,this[n + 1] = e >>> 16,this[n + 2] = e >>> 8,this[n + 3] = e):R(this,e,n,!1),n + 4;},t.prototype.writeIntLE = function(t,e,n,r){if((t = +t,e = 0 | e,!r)){var i=Math.pow(2,8 * n - 1);A(this,t,e,n,i - 1,-i);}var o=0,a=1,s=0 > t?1:0;for(this[e] = 255 & t;++o < n && (a *= 256);) this[e + o] = (t / a >> 0) - s & 255;return e + n;},t.prototype.writeIntBE = function(t,e,n,r){if((t = +t,e = 0 | e,!r)){var i=Math.pow(2,8 * n - 1);A(this,t,e,n,i - 1,-i);}var o=n - 1,a=1,s=0 > t?1:0;for(this[e + o] = 255 & t;--o >= 0 && (a *= 256);) this[e + o] = (t / a >> 0) - s & 255;return e + n;},t.prototype.writeInt8 = function(e,n,r){return e = +e,n = 0 | n,r || A(this,e,n,1,127,-128),t.TYPED_ARRAY_SUPPORT || (e = Math.floor(e)),0 > e && (e = 255 + e + 1),this[n] = e,n + 1;},t.prototype.writeInt16LE = function(e,n,r){return e = +e,n = 0 | n,r || A(this,e,n,2,32767,-32768),t.TYPED_ARRAY_SUPPORT?(this[n] = e,this[n + 1] = e >>> 8):L(this,e,n,!0),n + 2;},t.prototype.writeInt16BE = function(e,n,r){return e = +e,n = 0 | n,r || A(this,e,n,2,32767,-32768),t.TYPED_ARRAY_SUPPORT?(this[n] = e >>> 8,this[n + 1] = e):L(this,e,n,!1),n + 2;},t.prototype.writeInt32LE = function(e,n,r){return e = +e,n = 0 | n,r || A(this,e,n,4,2147483647,-2147483648),t.TYPED_ARRAY_SUPPORT?(this[n] = e,this[n + 1] = e >>> 8,this[n + 2] = e >>> 16,this[n + 3] = e >>> 24):R(this,e,n,!0),n + 4;},t.prototype.writeInt32BE = function(e,n,r){return e = +e,n = 0 | n,r || A(this,e,n,4,2147483647,-2147483648),0 > e && (e = 4294967295 + e + 1),t.TYPED_ARRAY_SUPPORT?(this[n] = e >>> 24,this[n + 1] = e >>> 16,this[n + 2] = e >>> 8,this[n + 3] = e):R(this,e,n,!1),n + 4;},t.prototype.writeFloatLE = function(t,e,n){return T(this,t,e,!0,n);},t.prototype.writeFloatBE = function(t,e,n){return T(this,t,e,!1,n);},t.prototype.writeDoubleLE = function(t,e,n){return M(this,t,e,!0,n);},t.prototype.writeDoubleBE = function(t,e,n){return M(this,t,e,!1,n);},t.prototype.copy = function(e,n,r,i){if((r || (r = 0),i || 0 === i || (i = this.length),n >= e.length && (n = e.length),n || (n = 0),i > 0 && r > i && (i = r),i === r))return 0;if(0 === e.length || 0 === this.length)return 0;if(0 > n)throw new RangeError("targetStart out of bounds");if(0 > r || r >= this.length)throw new RangeError("sourceStart out of bounds");if(0 > i)throw new RangeError("sourceEnd out of bounds");i > this.length && (i = this.length),e.length - n < i - r && (i = e.length - n + r);var o=i - r;if(1e3 > o || !t.TYPED_ARRAY_SUPPORT)for(var a=0;o > a;a++) e[a + n] = this[a + r];else e._set(this.subarray(r,r + o),n);return o;},t.prototype.fill = function(t,e,n){if((t || (t = 0),e || (e = 0),n || (n = this.length),e > n))throw new RangeError("end < start");if(n !== e && 0 !== this.length){if(0 > e || e >= this.length)throw new RangeError("start out of bounds");if(0 > n || n > this.length)throw new RangeError("end out of bounds");var r;if("number" == typeof t)for(r = e;n > r;r++) this[r] = t;else {var i=P(t.toString()),o=i.length;for(r = e;n > r;r++) this[r] = i[r % o];}return this;}},t.prototype.toArrayBuffer = function(){if("undefined" != typeof Uint8Array){if(t.TYPED_ARRAY_SUPPORT)return new t(this).buffer;for(var e=new Uint8Array(this.length),n=0,r=e.length;r > n;n += 1) e[n] = this[n];return e.buffer;}throw new TypeError("Buffer.toArrayBuffer not supported in this browser");};var K=t.prototype;t._augment = function(e){return e.constructor = t,e._isBuffer = !0,e._set = e.set,e.get = K.get,e.set = K.set,e.write = K.write,e.toString = K.toString,e.toLocaleString = K.toString,e.toJSON = K.toJSON,e.equals = K.equals,e.compare = K.compare,e.indexOf = K.indexOf,e.copy = K.copy,e.slice = K.slice,e.readUIntLE = K.readUIntLE,e.readUIntBE = K.readUIntBE,e.readUInt8 = K.readUInt8,e.readUInt16LE = K.readUInt16LE,e.readUInt16BE = K.readUInt16BE,e.readUInt32LE = K.readUInt32LE,e.readUInt32BE = K.readUInt32BE,e.readIntLE = K.readIntLE,e.readIntBE = K.readIntBE,e.readInt8 = K.readInt8,e.readInt16LE = K.readInt16LE,e.readInt16BE = K.readInt16BE,e.readInt32LE = K.readInt32LE,e.readInt32BE = K.readInt32BE,e.readFloatLE = K.readFloatLE,e.readFloatBE = K.readFloatBE,e.readDoubleLE = K.readDoubleLE,e.readDoubleBE = K.readDoubleBE,e.writeUInt8 = K.writeUInt8,e.writeUIntLE = K.writeUIntLE,e.writeUIntBE = K.writeUIntBE,e.writeUInt16LE = K.writeUInt16LE,e.writeUInt16BE = K.writeUInt16BE,e.writeUInt32LE = K.writeUInt32LE,e.writeUInt32BE = K.writeUInt32BE,e.writeIntLE = K.writeIntLE,e.writeIntBE = K.writeIntBE,e.writeInt8 = K.writeInt8,e.writeInt16LE = K.writeInt16LE,e.writeInt16BE = K.writeInt16BE,e.writeInt32LE = K.writeInt32LE,e.writeInt32BE = K.writeInt32BE,e.writeFloatLE = K.writeFloatLE,e.writeFloatBE = K.writeFloatBE,e.writeDoubleLE = K.writeDoubleLE,e.writeDoubleBE = K.writeDoubleBE,e.fill = K.fill,e.inspect = K.inspect,e.toArrayBuffer = K.toArrayBuffer,e;};var X=/[^+\/0-9A-z\-]/g;}).call(e,n(4).Buffer);},function(t,e,n){"use strict";function r(t,e){var n="normal";return t && e?n = "bolditalics":t?n = "bold":e && (n = "italics"),n;}function i(t,e){this.fonts = {},this.pdfDoc = e,this.fontWrappers = {};for(var n in t) if(t.hasOwnProperty(n)){var r=t[n];this.fonts[n] = {normal:r.normal,bold:r.bold,italics:r.italics,bolditalics:r.bolditalics};}}var o=n(11),a=n(16);i.prototype.provideFont = function(t,e,n){if(!this.fonts[t])return this.pdfDoc._font;var i=r(e,n);return this.fontWrappers[t] = this.fontWrappers[t] || {},this.fontWrappers[t][i] || (this.fontWrappers[t][i] = new a(this.pdfDoc,this.fonts[t][i],t + "(" + i + ")")),this.fontWrappers[t][i];},i.prototype.setFontRefsToPdfDoc = function(){var t=this;o.each(t.fontWrappers,function(e){o.each(e,function(e){o.each(e.pdfFonts,function(e){t.pdfDoc.page.fonts[e.id] || (t.pdfDoc.page.fonts[e.id] = e.ref());});});});},t.exports = i;},function(t,e,n){"use strict";function r(t,e){a.each(e,function(e){t.push(e);});}function i(t,e,n){this.pageSize = t,this.pageMargins = e,this.tracker = new s(),this.imageMeasure = n,this.tableLayouts = {};}function o(t){var e=t.x,n=t.y;t.positions = [],a.each(t.canvas,function(t){var e=t.x,n=t.y;t.resetXY = function(){t.x = e,t.y = n;};}),t.resetXY = function(){t.x = e,t.y = n,a.each(t.canvas,function(t){t.resetXY();});};}var a=n(11),s=n(18),h=n(19),u=n(20),l=n(21),c=n(22),f=n(23),d=n(24),p=n(25).pack,g=n(25).offsetVector,v=n(25).fontStringify,m=n(25).isFunction,y=n(26),w=n(27);i.prototype.registerTableLayouts = function(t){this.tableLayouts = p(this.tableLayouts,t);},i.prototype.layoutDocument = function(t,e,n,r,i,o,s,u,l,c){function f(t,e){return t = a.reject(t,function(t){return a.isEmpty(t.positions);}),a.each(t,function(t){var n=a.pick(t,["id","text","ul","ol","table","image","qr","canvas","columns","headlineLevel","style","pageBreak","pageOrientation","width","height"]);n.startPosition = a.first(t.positions),n.pageNumbers = a.chain(t.positions).map("pageNumber").uniq().value(),n.pages = e.length,n.stack = a.isArray(t.stack),t.nodeInfo = n;}),a.any(t,function(t,e,n){if("before" !== t.pageBreak && !t.pageBreakCalculated){t.pageBreakCalculated = !0;var r=a.first(t.nodeInfo.pageNumbers),i=a.chain(n).drop(e + 1).filter(function(t){return a.contains(t.nodeInfo.pageNumbers,r);}).value(),o=a.chain(n).drop(e + 1).filter(function(t){return a.contains(t.nodeInfo.pageNumbers,r + 1);}).value(),s=a.chain(n).take(e).filter(function(t){return a.contains(t.nodeInfo.pageNumbers,r);}).value();if(c(t.nodeInfo,a.map(i,"nodeInfo"),a.map(o,"nodeInfo"),a.map(s,"nodeInfo")))return t.pageBreak = "before",!0;}});}function d(t){a.each(t.linearNodeList,function(t){t.resetXY();});}m(c) || (c = function(){return !1;}),this.docMeasure = new h(e,n,r,this.imageMeasure,this.tableLayouts,u);for(var p=this.tryLayoutDocument(t,e,n,r,i,o,s,u,l);f(p.linearNodeList,p.pages);) d(p),p = this.tryLayoutDocument(t,e,n,r,i,o,s,u,l);return p.pages;},i.prototype.tryLayoutDocument = function(t,e,n,r,i,o,a,s,h,c){this.linearNodeList = [],t = this.docMeasure.measureDocument(t),this.writer = new l(new u(this.pageSize,this.pageMargins),this.tracker);var f=this;return this.writer.context().tracker.startTracking("pageAdded",function(){f.addBackground(i);}),this.addBackground(i),this.processNode(t),this.addHeadersAndFooters(o,a),null != h && this.addWatermark(h,e),{pages:this.writer.context().pages,linearNodeList:this.linearNodeList};},i.prototype.addBackground = function(t){var e=m(t)?t:function(){return t;},n=e(this.writer.context().page + 1);if(n){var r=this.writer.context().getCurrentPage().pageSize;this.writer.beginUnbreakableBlock(r.width,r.height),this.processNode(this.docMeasure.measureDocument(n)),this.writer.commitUnbreakableBlock(0,0);}},i.prototype.addStaticRepeatable = function(t,e){this.addDynamicRepeatable(function(){return t;},e);},i.prototype.addDynamicRepeatable = function(t,e){for(var n=this.writer.context().pages,r=0,i=n.length;i > r;r++) {this.writer.context().page = r;var o=t(r + 1,i);if(o){var a=e(this.writer.context().getCurrentPage().pageSize,this.pageMargins);this.writer.beginUnbreakableBlock(a.width,a.height),this.processNode(this.docMeasure.measureDocument(o)),this.writer.commitUnbreakableBlock(a.x,a.y);}}},i.prototype.addHeadersAndFooters = function(t,e){var n=function n(t,e){return {x:0,y:0,width:t.width,height:e.top};},r=function r(t,e){return {x:0,y:t.height - e.bottom,width:t.width,height:e.bottom};};m(t)?this.addDynamicRepeatable(t,n):t && this.addStaticRepeatable(t,n),m(e)?this.addDynamicRepeatable(e,r):e && this.addStaticRepeatable(e,r);},i.prototype.addWatermark = function(t,e){function n(t,e,n){for(var r,i=t.width,o=t.height,a=.8 * Math.sqrt(i * i + o * o),s=new y(n),h=new w(),u=0,l=1e3,c=(u + l) / 2;Math.abs(u - l) > 1;) h.push({fontSize:c}),r = s.sizeOfString(e,h),r.width > a?(l = c,c = (u + l) / 2):r.width < a && (u = c,c = (u + l) / 2),h.pop();return {size:r,fontSize:c};}for(var r=Object.getOwnPropertyNames(e.fonts)[0],i={text:t,font:e.provideFont(e[r],!1,!1),size:n(this.pageSize,t,e)},o=this.writer.context().pages,a=0,s=o.length;s > a;a++) o[a].watermark = i;},i.prototype.processNode = function(t){function e(e){var r=t._margin;"before" === t.pageBreak && n.writer.moveToNextPage(t.pageOrientation),r && (n.writer.context().moveDown(r[1]),n.writer.context().addMargin(r[0],r[2])),e(),r && (n.writer.context().addMargin(-r[0],-r[2]),n.writer.context().moveDown(r[3])),"after" === t.pageBreak && n.writer.moveToNextPage(t.pageOrientation);}var n=this;this.linearNodeList.push(t),o(t),e(function(){var e=t.absolutePosition;if((e && (n.writer.context().beginDetachedBlock(),n.writer.context().moveTo(e.x || 0,e.y || 0)),t.stack))n.processVerticalContainer(t);else if(t.columns)n.processColumns(t);else if(t.ul)n.processList(!1,t);else if(t.ol)n.processList(!0,t);else if(t.table)n.processTable(t);else if(void 0 !== t.text)n.processLeaf(t);else if(t.image)n.processImage(t);else if(t.canvas)n.processCanvas(t);else if(t.qr)n.processQr(t);else if(!t._span)throw "Unrecognized document structure: " + JSON.stringify(t,v);e && n.writer.context().endDetachedBlock();});},i.prototype.processVerticalContainer = function(t){var e=this;t.stack.forEach(function(n){e.processNode(n),r(t.positions,n.positions);});},i.prototype.processColumns = function(t){function e(t){if(!t)return null;var e=[];e.push(0);for(var r=n.length - 1;r > 0;r--) e.push(t);return e;}var n=t.columns,i=this.writer.context().availableWidth,o=e(t._gap);o && (i -= (o.length - 1) * t._gap),c.buildColumnWidths(n,i);var a=this.processRow(n,n,o);r(t.positions,a.positions);},i.prototype.processRow = function(t,e,n,i,o){function a(t){for(var e,n=0,r=l.length;r > n;n++) {var i=l[n];if(i.prevPage === t.prevPage){e = i;break;}}e || (e = t,l.push(e)),e.prevY = Math.max(e.prevY,t.prevY),e.y = Math.min(e.y,t.y);}function s(t){return n && n.length > t?n[t]:0;}function h(t,e){if(t.rowSpan && t.rowSpan > 1){var n=o + t.rowSpan - 1;if(n >= i.length)throw "Row span for column " + e + " (with indexes starting from 0) exceeded row count";return i[n][e];}return null;}var u=this,l=[],c=[];return this.tracker.auto("pageChanged",a,function(){e = e || t,u.writer.context().beginColumnGroup();for(var i=0,o=t.length;o > i;i++) {var a=t[i],l=e[i]._calcWidth,f=s(i);if(a.colSpan && a.colSpan > 1)for(var d=1;d < a.colSpan;d++) l += e[++i]._calcWidth + n[i];u.writer.context().beginColumn(l,f,h(a,i)),a._span?a._columnEndingContext && u.writer.context().markEnding(a):(u.processNode(a),r(c,a.positions));}u.writer.context().completeColumnGroup();}),{pageBreaks:l,positions:c};},i.prototype.processList = function(t,e){function n(t){if(s){var e=s;if((s = null,e.canvas)){var n=e.canvas[0];g(n,-e._minWidth,0),i.writer.addVector(n);}else {var r=new d(i.pageSize.width);r.addInline(e._inlines[0]),r.x = -e._minWidth,r.y = t.getAscenderHeight() - r.getAscenderHeight(),i.writer.addLine(r,!0);}}}var i=this,o=t?e.ol:e.ul,a=e._gapSize;this.writer.context().addMargin(a.width);var s;this.tracker.auto("lineAdded",n,function(){o.forEach(function(t){s = t.listMarker,i.processNode(t),r(e.positions,t.positions);});}),this.writer.context().addMargin(-a.width);},i.prototype.processTable = function(t){var e=new f(t);e.beginTable(this.writer);for(var n=0,i=t.table.body.length;i > n;n++) {e.beginRow(n,this.writer);var o=this.processRow(t.table.body[n],t.table.widths,t._offsets.offsets,t.table.body,n);r(t.positions,o.positions),e.endRow(n,this.writer,o.pageBreaks);}e.endTable(this.writer);},i.prototype.processLeaf = function(t){for(var e=this.buildNextLine(t);e;) {var n=this.writer.addLine(e);t.positions.push(n),e = this.buildNextLine(t);}},i.prototype.buildNextLine = function(t){if(!t._inlines || 0 === t._inlines.length)return null;for(var e=new d(this.writer.context().availableWidth);t._inlines && t._inlines.length > 0 && e.hasEnoughSpaceForInline(t._inlines[0]);) e.addInline(t._inlines.shift());return e.lastLineInParagraph = 0 === t._inlines.length,e;},i.prototype.processImage = function(t){var e=this.writer.addImage(t);t.positions.push(e);},i.prototype.processCanvas = function(t){var e=t._minHeight;this.writer.context().availableHeight < e && this.writer.moveToNextPage(),t.canvas.forEach(function(e){var n=this.writer.addVector(e);t.positions.push(n);},this),this.writer.context().moveDown(e);},i.prototype.processQr = function(t){var e=this.writer.addQr(t);t.positions.push(e);},t.exports = i;},function(t,e,n){t.exports = {"4A0":[4767.87,6740.79],"2A0":[3370.39,4767.87],A0:[2383.94,3370.39],A1:[1683.78,2383.94],A2:[1190.55,1683.78],A3:[841.89,1190.55],A4:[595.28,841.89],A5:[419.53,595.28],A6:[297.64,419.53],A7:[209.76,297.64],A8:[147.4,209.76],A9:[104.88,147.4],A10:[73.7,104.88],B0:[2834.65,4008.19],B1:[2004.09,2834.65],B2:[1417.32,2004.09],B3:[1000.63,1417.32],B4:[708.66,1000.63],B5:[498.9,708.66],B6:[354.33,498.9],B7:[249.45,354.33],B8:[175.75,249.45],B9:[124.72,175.75],B10:[87.87,124.72],C0:[2599.37,3676.54],C1:[1836.85,2599.37],C2:[1298.27,1836.85],C3:[918.43,1298.27],C4:[649.13,918.43],C5:[459.21,649.13],C6:[323.15,459.21],C7:[229.61,323.15],C8:[161.57,229.61],C9:[113.39,161.57],C10:[79.37,113.39],RA0:[2437.8,3458.27],RA1:[1729.13,2437.8],RA2:[1218.9,1729.13],RA3:[864.57,1218.9],RA4:[609.45,864.57],SRA0:[2551.18,3628.35],SRA1:[1814.17,2551.18],SRA2:[1275.59,1814.17],SRA3:[907.09,1275.59],SRA4:[637.8,907.09],EXECUTIVE:[521.86,756],FOLIO:[612,936],LEGAL:[612,1008],LETTER:[612,792],TABLOID:[792,1224]};},function(t,e,n){(function(e){"use strict";function r(t,e){this.pdfDoc = t,this.imageDictionary = e || {};}var i=(n(28),n(17));r.prototype.measureImage = function(t){function n(t){var n=a.imageDictionary[t];if(!n)return t;var r=n.indexOf("base64,");if(0 > r)throw "invalid image format, images dictionary should contain dataURL entries";return new e(n.substring(r + 7),"base64");}var r,o,a=this;return this.pdfDoc._imageRegistry[t]?r = this.pdfDoc._imageRegistry[t]:(o = "I" + ++this.pdfDoc._imageCount,r = i.open(n(t),o),r.embed(this.pdfDoc),this.pdfDoc._imageRegistry[t] = r),{width:r.width,height:r.height};},t.exports = r;}).call(e,n(4).Buffer);},function(t,e,n){"use strict";function r(t){for(var e=[],n=null,r=0,i=t.inlines.length;i > r;r++) {var o=t.inlines[r],a=o.decoration;if(a){var s=o.decorationColor || o.color || "black",h=o.decorationStyle || "solid";a = Array.isArray(a)?a:[a];for(var u=0,l=a.length;l > u;u++) {var c=a[u];n && c === n.decoration && h === n.decorationStyle && s === n.decorationColor && "lineThrough" !== c?n.inlines.push(o):(n = {line:t,decoration:c,decorationColor:s,decorationStyle:h,inlines:[o]},e.push(n));}}else n = null;}return e;}function i(t,e,n,r){function i(){for(var e=0,n=0,r=t.inlines.length;r > n;n++) {var i=t.inlines[n];e = i.fontSize > e?n:e;}return t.inlines[e];}function o(){for(var e=0,n=0,r=t.inlines.length;r > n;n++) e += t.inlines[n].width;return e;}var a=t.inlines[0],s=i(),h=o(),u=t.line.getAscenderHeight(),l=s.font.ascender / 1e3 * s.fontSize,c=s.height,f=c - l,d=.5 + .12 * Math.floor(Math.max(s.fontSize - 8,0) / 2);switch(t.decoration){case "underline":n += u + .45 * f;break;case "overline":n += u - .85 * l;break;case "lineThrough":n += u - .25 * l;break;default:throw "Unkown decoration : " + t.decoration;}if((r.save(),"double" === t.decorationStyle)){var p=Math.max(.5,2 * d);r.fillColor(t.decorationColor).rect(e + a.x,n - d / 2,h,d / 2).fill().rect(e + a.x,n + p - d / 2,h,d / 2).fill();}else if("dashed" === t.decorationStyle){var g=Math.ceil(h / 6.8),v=e + a.x;r.rect(v,n,h,d).clip(),r.fillColor(t.decorationColor);for(var m=0;g > m;m++) r.rect(v,n - d / 2,3.96,d).fill(),v += 6.8;}else if("dotted" === t.decorationStyle){var y=Math.ceil(h / (3 * d)),w=e + a.x;r.rect(w,n,h,d).clip(),r.fillColor(t.decorationColor);for(var _=0;y > _;_++) r.rect(w,n - d / 2,d,d).fill(),w += 3 * d;}else if("wavy" === t.decorationStyle){var b=.7,x=1,S=Math.ceil(h / (2 * b)) + 1,k=e + a.x - 1;r.rect(e + a.x,n - x,h,n + x).clip(),r.lineWidth(.24),r.moveTo(k,n);for(var E=0;S > E;E++) r.bezierCurveTo(k + b,n - x,k + 2 * b,n - x,k + 3 * b,n).bezierCurveTo(k + 4 * b,n + x,k + 5 * b,n + x,k + 6 * b,n),k += 6 * b;r.stroke(t.decorationColor);}else r.fillColor(t.decorationColor).rect(e + a.x,n - d / 2,h,d).fill();r.restore();}function o(t,e,n,o){for(var a=r(t),s=0,h=a.length;h > s;s++) i(a[s],e,n,o);}function a(t,e,n,r){for(var i=t.getHeight(),o=0,a=t.inlines.length;a > o;o++) {var s=t.inlines[o];s.background && r.fillColor(s.background).rect(e + s.x,n,s.width,i).fill();}}t.exports = {drawBackground:a,drawDecorations:o};},function(t,e,n){(function(e,n){"use strict";function r(){this.fileSystem = {},this.baseSystem = {};}function i(t){return 0 === t.indexOf(n) && (t = t.substring(n.length)),0 === t.indexOf("/") && (t = t.substring(1)),t;}r.prototype.readFileSync = function(t){t = i(t);var n=this.baseSystem[t];return n?new e(n,"base64"):this.fileSystem[t];},r.prototype.writeFileSync = function(t,e){this.fileSystem[i(t)] = e;},r.prototype.bindFS = function(t){this.baseSystem = t;},t.exports = new r();}).call(e,n(4).Buffer,"/");},function(t,e,n){var r;(function(t,i){(function(){function o(t,e){if(t !== e){var n=t === t,r=e === e;if(t > e || !n || "undefined" == typeof t && r)return 1;if(e > t || !r || "undefined" == typeof e && n)return -1;}return 0;}function a(t,e,n){if(e !== e)return m(t,n);for(var r=(n || 0) - 1,i=t.length;++r < i;) if(t[r] === e)return r;return -1;}function s(t,e){var n=t.length;for(t.sort(e);n--;) t[n] = t[n].value;return t;}function h(t){return "string" == typeof t?t:null == t?"":t + "";}function u(t){return t.charCodeAt(0);}function l(t,e){for(var n=-1,r=t.length;++n < r && e.indexOf(t.charAt(n)) > -1;);return n;}function c(t,e){for(var n=t.length;n-- && e.indexOf(t.charAt(n)) > -1;);return n;}function f(t,e){return o(t.criteria,e.criteria) || t.index - e.index;}function d(t,e){for(var n=-1,r=t.criteria,i=e.criteria,a=r.length;++n < a;) {var s=o(r[n],i[n]);if(s)return s;}return t.index - e.index;}function p(t){return Ht[t];}function g(t){return Zt[t];}function v(t){return "\\" + Yt[t];}function m(t,e,n){for(var r=t.length,i=n?e || r:(e || 0) - 1;n?i--:++i < r;) {var o=t[i];if(o !== o)return i;}return -1;}function y(t){return t && "object" == typeof t || !1;}function w(t){return 160 >= t && t >= 9 && 13 >= t || 32 == t || 160 == t || 5760 == t || 6158 == t || t >= 8192 && (8202 >= t || 8232 == t || 8233 == t || 8239 == t || 8287 == t || 12288 == t || 65279 == t);}function _(t,e){for(var n=-1,r=t.length,i=-1,o=[];++n < r;) t[n] === e && (t[n] = G,o[++i] = n);return o;}function b(t,e){for(var n,r=-1,i=t.length,o=-1,a=[];++r < i;) {var s=t[r],h=e?e(s,r,t):s;r && n === h || (n = h,a[++o] = s);}return a;}function x(t){for(var e=-1,n=t.length;++e < n && w(t.charCodeAt(e)););return e;}function S(t){for(var e=t.length;e-- && w(t.charCodeAt(e)););return e;}function k(t){return Gt[t];}function E(t){function e(t){if(y(t) && !ja(t)){if(t instanceof n)return t;if(qo.call(t,"__wrapped__"))return new n(t.__wrapped__,t.__chain__,Vt(t.__actions__));}return new n(t);}function n(t,e,n){this.__actions__ = n || [],this.__chain__ = !!e,this.__wrapped__ = t;}function r(t){this.actions = null,this.dir = 1,this.dropCount = 0,this.filtered = !1,this.iteratees = null,this.takeCount = xa,this.views = null,this.wrapped = t;}function i(){var t=this.actions,e=this.iteratees,n=this.views,i=new r(this.wrapped);return i.actions = t?Vt(t):null,i.dir = this.dir,i.dropCount = this.dropCount,i.filtered = this.filtered,i.iteratees = e?Vt(e):null,i.takeCount = this.takeCount,i.views = n?Vt(n):null,i;}function w(){if(this.filtered){var t=new r(this);t.dir = -1,t.filtered = !0;}else t = this.clone(),t.dir *= -1;return t;}function J(){var t=this.wrapped.value();if(!ja(t))return qe(t,this.actions);var e=this.dir,n=0 > e,r=vn(0,t.length,this.views),i=r.start,o=r.end,a=o - i,s=this.dropCount,h=va(a,this.takeCount - s),u=n?o:i - 1,l=this.iteratees,c=l?l.length:0,f=0,d=[];t: for(;a-- && h > f;) {u += e;for(var p=-1,g=t[u];++p < c;) {var v=l[p],m=v.iteratee,y=m(g,u,t),w=v.type;if(w == j)g = y;else if(!y){if(w == N)continue t;break t;}}s?s--:d[f++] = g;}return d;}function nt(){this.__data__ = {};}function it(t){return this.has(t) && delete this.__data__[t];}function Ht(t){return "__proto__" == t?C:this.__data__[t];}function Zt(t){return "__proto__" != t && qo.call(this.__data__,t);}function Gt(t,e){return "__proto__" != t && (this.__data__[t] = e),this;}function qt(t){var e=t?t.length:0;for(this.data = {hash:fa(null),set:new oa()};e--;) this.push(t[e]);}function Yt(t,e){var n=t.data,r="string" == typeof e || _i(e)?n.set.has(e):n.hash[e];return r?0:-1;}function Xt(t){var e=this.data;"string" == typeof t || _i(t)?e.set.add(t):e.hash[t] = !0;}function Vt(t,e){var n=-1,r=t.length;for(e || (e = Bo(r));++n < r;) e[n] = t[n];return e;}function $t(t,e){for(var n=-1,r=t.length;++n < r && e(t[n],n,t) !== !1;);return t;}function Qt(t,e){for(var n=t.length;n-- && e(t[n],n,t) !== !1;);return t;}function te(t,e){for(var n=-1,r=t.length;++n < r;) if(!e(t[n],n,t))return !1;return !0;}function ee(t,e){for(var n=-1,r=t.length,i=-1,o=[];++n < r;) {var a=t[n];e(a,n,t) && (o[++i] = a);}return o;}function ne(t,e){for(var n=-1,r=t.length,i=Bo(r);++n < r;) i[n] = e(t[n],n,t);return i;}function re(t){for(var e=-1,n=t.length,r=ba;++e < n;) {var i=t[e];i > r && (r = i);}return r;}function ie(t){for(var e=-1,n=t.length,r=xa;++e < n;) {var i=t[e];r > i && (r = i);}return r;}function oe(t,e,n,r){var i=-1,o=t.length;for(r && o && (n = t[++i]);++i < o;) n = e(n,t[i],i,t);return n;}function ae(t,e,n,r){var i=t.length;for(r && i && (n = t[--i]);i--;) n = e(n,t[i],i,t);return n;}function se(t,e){for(var n=-1,r=t.length;++n < r;) if(e(t[n],n,t))return !0;return !1;}function he(t,e){return "undefined" == typeof t?e:t;}function ue(t,e,n,r){return "undefined" != typeof t && qo.call(r,n)?t:e;}function le(t,e,n){var r=qa(e);if(!n)return fe(e,t,r);for(var i=-1,o=r.length;++i < o;) {var a=r[i],s=t[a],h=n(s,e[a],a,t,e);(h === h?h === s:s !== s) && ("undefined" != typeof s || a in t) || (t[a] = h);}return t;}function ce(t,e){for(var n=-1,r=t.length,i=Sn(r),o=e.length,a=Bo(o);++n < o;) {var s=e[n];i?(s = parseFloat(s),a[n] = bn(s,r)?t[s]:C):a[n] = t[s];}return a;}function fe(t,e,n){n || (n = e,e = {});for(var r=-1,i=n.length;++r < i;) {var o=n[r];e[o] = t[o];}return e;}function de(t,e){for(var n=-1,r=e.length;++n < r;) {var i=e[n];t[i] = un(t[i],A,t);}return t;}function pe(t,e,n){var r=typeof t;return "function" == r?"undefined" != typeof e && _n(t)?Xe(t,e,n):t:null == t?bo:"object" == r?De(t):Fe(t + "");}function ge(t,e,n,r,i,o,a){var s;if((n && (s = i?n(t,r,i):