From c2f07a2e0dd6cbfc2d6748501709e53b04b4de17 Mon Sep 17 00:00:00 2001 From: Simon Bengtsson Date: Fri, 12 Jul 2019 10:08:12 +0200 Subject: [PATCH] 3.1.2 --- dist/index.d.ts | 4 +++- dist/jspdf.plugin.autotable.js | 4 ++-- dist/jspdf.plugin.autotable.min.js | 6 +++--- package-lock.json | 2 +- package.json | 2 +- 5 files changed, 10 insertions(+), 8 deletions(-) diff --git a/dist/index.d.ts b/dist/index.d.ts index 7452d371..9a9af7c7 100644 --- a/dist/index.d.ts +++ b/dist/index.d.ts @@ -186,4 +186,6 @@ export interface ColumnDataConfig extends BaseConfig { export interface HTMLConfig extends BaseConfig { html: string | HTMLElement; } -export declare type autoTable = (options: UserOptions) => void; \ No newline at end of file +export declare type autoTable = (options: UserOptions) => void; + +export {}; diff --git a/dist/jspdf.plugin.autotable.js b/dist/jspdf.plugin.autotable.js index c37164ea..301fefe7 100644 --- a/dist/jspdf.plugin.autotable.js +++ b/dist/jspdf.plugin.autotable.js @@ -1,6 +1,6 @@ /*! * - * jsPDF AutoTable plugin v3.1.1 + * jsPDF AutoTable plugin v3.1.2 * * Copyright (c) 2014 Simon Bengtsson, https://github.com/simonbengtsson/jsPDF-AutoTable * Licensed under the MIT License. @@ -605,7 +605,7 @@ var Cell = /** @class */ (function () { var fromHtml = typeof window === 'object' && window.HTMLElement && content instanceof window.HTMLElement; this.raw = fromHtml ? content : raw; if (content && fromHtml) { - text = (content.innerText || '').replace(/' '+/g, ' ').trim(); + text = (content.innerText || content.textContent || '').replace(/' '+/g, ' ').trim(); } else { // Stringify 0 and false, but not undefined or null diff --git a/dist/jspdf.plugin.autotable.min.js b/dist/jspdf.plugin.autotable.min.js index 1f3280ed..0cb238b1 100644 --- a/dist/jspdf.plugin.autotable.min.js +++ b/dist/jspdf.plugin.autotable.min.js @@ -1,6 +1,6 @@ /*! * - * jsPDF AutoTable plugin v3.1.1 + * jsPDF AutoTable plugin v3.1.2 * * Copyright (c) 2014 Simon Bengtsson, https://github.com/simonbengtsson/jsPDF-AutoTable * Licensed under the MIT License. @@ -9,9 +9,9 @@ * * /if (typeof window === 'object') window.jspdfAutoTableVersion = '" + newVersion + "';/*" * */ -!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e(require("jspdf"));else if("function"==typeof define&&define.amd)define(["jspdf"],e);else{var o="object"==typeof exports?e(require("jspdf")):e(t.jsPDF);for(var n in o)("object"==typeof exports?exports:t)[n]=o[n]}}(window,function(o){return function(o){var n={};function r(t){if(n[t])return n[t].exports;var e=n[t]={i:t,l:!1,exports:{}};return o[t].call(e.exports,e,e.exports,r),e.l=!0,e.exports}return r.m=o,r.c=n,r.d=function(t,e,o){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(r.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)r.d(o,n,function(t){return e[t]}.bind(null,n));return o},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=7)}([function(t,o,e){"use strict";Object.defineProperty(o,"__esModule",{value:!0});var n,r=null,l=null;o.globalDefaults={},o.documentDefaults={},o.default=function(){return l},o.getGlobalOptions=function(){return o.globalDefaults},o.getDocumentOptions=function(){return o.documentDefaults};var a=function(){function t(t){this.doc=t}return t.prototype.pageHeight=function(){return this.pageSize().height},t.prototype.pageWidth=function(){return this.pageSize().width},t.prototype.pageSize=function(){var t=this.doc.internal.pageSize;return null==t.width&&(t={width:t.getWidth(),height:t.getHeight()}),t},t.prototype.scaleFactor=function(){return this.doc.internal.scaleFactor},t.prototype.pageNumber=function(){return this.doc.internal.getCurrentPageInfo().pageNumber},t}();o.setupState=function(t){n=l,l=new a(t),t!==r&&(r=t,o.documentDefaults={})},o.resetState=function(){l=n},o.setDefaults=function(t,e){void 0===e&&(e=null),e?(o.documentDefaults=t||{},r=e):o.globalDefaults=t||{}}},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=o(2),i=o(0),r=o(3);function s(t,e){var o=e.fontSize/i.default().scaleFactor();a(e),t=Array.isArray(t)?t:[t];var n=0;t.forEach(function(t){var e=i.default().doc.getStringUnitWidth(t);n=s(t,r))return t;for(;nthis.wrappedWidth&&(this.wrappedWidth=this.minWidth)}}return t.prototype.padding=function(t){var e=s.marginOrPadding(this.styles.cellPadding,s.styles([]).cellPadding);return"vertical"===t?e.top+e.bottom:"horizontal"===t?e.left+e.right:e[t]},t}();e.Cell=c;var h=function(t,e,o){this.preferredWidth=0,this.minWidth=0,this.wrappedWidth=0,this.width=0,this.dataKey=t,this.raw=e,this.index=o};e.Column=h},function(t,e,o){"use strict"; +!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e(require("jspdf"));else if("function"==typeof define&&define.amd)define(["jspdf"],e);else{var o="object"==typeof exports?e(require("jspdf")):e(t.jsPDF);for(var n in o)("object"==typeof exports?exports:t)[n]=o[n]}}(window,function(o){return l={},r.m=n=[function(t,o,e){"use strict";Object.defineProperty(o,"__esModule",{value:!0});var n,r=null,l=null;o.globalDefaults={},o.documentDefaults={},o.default=function(){return l},o.getGlobalOptions=function(){return o.globalDefaults},o.getDocumentOptions=function(){return o.documentDefaults};var a=(i.prototype.pageHeight=function(){return this.pageSize().height},i.prototype.pageWidth=function(){return this.pageSize().width},i.prototype.pageSize=function(){var t=this.doc.internal.pageSize;return null==t.width&&(t={width:t.getWidth(),height:t.getHeight()}),t},i.prototype.scaleFactor=function(){return this.doc.internal.scaleFactor},i.prototype.pageNumber=function(){return this.doc.internal.getCurrentPageInfo().pageNumber},i);function i(t){this.doc=t}o.setupState=function(t){n=l,l=new a(t),t!==r&&(r=t,o.documentDefaults={})},o.resetState=function(){l=n},o.setDefaults=function(t,e){void 0===e&&(e=null),e?(o.documentDefaults=t||{},r=e):o.globalDefaults=t||{}}},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=o(2),i=o(0),r=o(3);function s(t,e){var o=e.fontSize/i.default().scaleFactor();a(e),t=Array.isArray(t)?t:[t];var n=0;t.forEach(function(t){var e=i.default().doc.getStringUnitWidth(t);n=s(t,r))return t;for(;nthis.wrappedWidth&&(this.wrappedWidth=this.minWidth)}}e.Cell=f;function p(t,e,o){this.preferredWidth=0,this.minWidth=0,this.wrappedWidth=0,this.width=0,this.dataKey=t,this.raw=e,this.index=o}e.Column=p},function(t,e,o){"use strict"; /* object-assign (c) Sindre Sorhus @license MIT -*/var s=Object.getOwnPropertySymbols,d=Object.prototype.hasOwnProperty,u=Object.prototype.propertyIsEnumerable;t.exports=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},o=0;o<10;o++)e["_"+String.fromCharCode(o)]=o;if("0123456789"!==Object.getOwnPropertyNames(e).map(function(t){return e[t]}).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach(function(t){n[t]=t}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(t){return!1}}()?Object.assign:function(t,e){for(var o,n,r=function(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}(t),l=1;l {}}) instead."),s.API.autoTable.globalDefaults||(s.API.autoTable.globalDefaults={}),s.API.autoTable.globalDefaults.addPageContent=t,this},s.API.autoTableAddPage=function(){return console.error("Use of deprecated function: autoTableAddPage. Use doc.addPage()"),this.addPage(),this}},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var v=o(2),i=o(1),m=o(4),w=o(0),n=o(5);function r(e,t,o){var n,r,l,a,i={},s=w.default().table,d=function(t){var e=w.default().table,o=e.margin("bottom"),n=e.settings.showFoot;(!0===n||"everyPage"===n||"lastPage"===n&&t)&&(o+=e.footHeight);return w.default().pageHeight()-e.cursor.y-o}(t);if(dl)))C(o);else{e.spansMultiplePages=!0;for(var u=0;up){i[c.dataKey]=h.text.splice(p,h.text.length);var y=Math.floor(h.text.length*f);1===h.rowSpan&&(e.height=Math.min(e.height,y));var b=new m.Cell(h,h.styles,h.section);b.height=h.height,b.width=h.width,b.text=i[c.dataKey],o.cells[c.dataKey]=b}else h.height>d&&(o.cells[c.dataKey]=new m.Cell(h,h.styles,h.section),o.cells[c.dataKey].height=h.height,o.cells[c.dataKey].width=h.width,o.cells[c.dataKey].text=[]);h.height=Math.min(d,h.height)}}}S(e),o&&0!==Object.keys(o.cells).length&&Object.keys(o.cells).forEach(function(t){o.cells[t].height-=e.height})}function S(t){var e=w.default().table;e.cursor.x=e.margin("left"),t.y=e.cursor.y,t.x=e.cursor.x,e.cursor.x=e.margin("left"),t.y=e.cursor.y,t.x=e.cursor.x;for(var o=0,n=e.columns;ow.default().pageHeight())&&(l(w.default().doc),o.cursor.y=o.margin("top")),o.pageStartX=o.cursor.x,o.pageStartY=o.cursor.y,o.startPageNumber=w.default().pageNumber();var n=new m.Row([],0,"body");n.index=-1,i.applyUserStyles(),!0!==t.showHead&&"firstPage"!==t.showHead&&"everyPage"!==t.showHead||o.head.forEach(function(t){return S(t)}),i.applyUserStyles(),o.body.forEach(function(t,e){r(t,e===o.body.length-1,n)}),i.applyUserStyles(),!0!==t.showFoot&&"lastPage"!==t.showFoot&&"everyPage"!==t.showFoot||o.foot.forEach(function(t){return S(t)}),i.addTableBorder(),o.callEndPageHooks()},e.addPage=C},function(t,e,o){"use strict";var n,l=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)});Object.defineProperty(e,"__esModule",{value:!0});var r=o(0),a=function(){function t(){var t=r.default().table;this.table=t,this.pageNumber=t.pageNumber,this.settings=t.settings,this.cursor=t.cursor,this.doc=r.default().doc}return Object.defineProperty(t.prototype,"pageCount",{get:function(){return this.pageNumber},enumerable:!0,configurable:!0}),t}(),i=function(r){function t(t,e,o){var n=r.call(this)||this;return n.cell=t,n.row=e,n.column=o,n.section=e.section,n}return l(t,r),t}(e.HookData=a);e.CellHookData=i},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var f=o(2),g=o(1),p=o(0);e.calculateWidths=function(t){10/p.default().scaleFactor()*t.columns.length>t.width?console.error("Columns could not fit on page"):t.minWidth>t.width&&console.error("Column widths to wide and can't fit page"),function t(e,o,n){for(var r=0;r=l.minWidth)){l.width=l.minWidth+1/p.default().scaleFactor(),n-=l.wrappedWidth,e.splice(r,1),t(e,o,n);break}l.width=s}}(t.columns.slice(0),t.width-t.wrappedWidth,t.wrappedWidth),function(t){for(var e=t.allRows(),o=0;os.contentHeight&&(s.contentHeight=s.styles.minCellHeight);var h=s.contentHeight/s.rowSpan;1h&&(h=e.height),h>r.height&&(r.height=h,r.maxCellHeight=h,r.maxCellLineCount=u)}}e.count--}}(t),function(t){for(var e={},o=1,n=t.allRows(),r=0;rl.maxCellHeight&&(d.row.maxCellHeight=d.cell.height,d.row.maxCellLineCount=Array.isArray(d.cell.text)?d.cell.text.length:1),o=d.cell.colSpan,delete l.cells[s.dataKey],d.left--,d.left<=1&&delete e[s.dataKey];else{var u=l.cells[s.dataKey];if(!u)continue;if(u.height=l.height,1c?c:u.rowSpan;e[s.dataKey]={cell:u,left:h,row:l}}}}"head"===l.section&&(t.headHeight+=l.maxCellHeight),"foot"===l.section&&(t.footHeight+=l.maxCellHeight),t.height+=l.height}}(t)}},function(t,e,o){"use strict";var b=this&&this.__assign||function(){return(b=Object.assign||function(t){for(var e,o=1,n=arguments.length;on.wrappedWidth&&(n.wrappedWidth=r.wrappedWidth),r.minWidth>n.minWidth&&(n.minWidth=r.minWidth))}})}(n),n.minWidth=n.columns.reduce(function(t,e){return t+e.minWidth},0),n.wrappedWidth=n.columns.reduce(function(t,e){return t+e.wrappedWidth},0),"number"==typeof n.settings.tableWidth?n.width=n.settings.tableWidth:"wrap"===n.settings.tableWidth?n.width=n.wrappedWidth:n.width=O.default().pageWidth()-n.margin("left")-n.margin("right"),n}},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var f=o(13),g=o(0);function i(t,e,o,n){var r=[];if(!e)return r;for(var l=0;la.top&&(a.top=l),l>a.bottom&&(a.bottom=l),a}(o.padding,o.fontSize,o.lineHeight,e)),l("lineWidth",parseInt(o.borderWidth||"")/(96/72)/e),l("font",(o.fontFamily||"").toLowerCase()),r;var a,i}},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a=o(1);function i(t){t.rowHeight?(console.error("Use of deprecated style rowHeight. It is renamed to minCellHeight."),t.minCellHeight||(t.minCellHeight=t.rowHeight)):t.columnWidth&&(console.error("Use of deprecated style columnWidth. It is renamed to cellWidth."),t.cellWidth||(t.cellWidth=t.columnWidth))}e.default=function(t){for(var e=function(n){n&&"object"!=typeof n&&console.error("The options parameter should be of type object, is: "+typeof n),void 0!==n.extendWidth&&(n.tableWidth=n.extendWidth?"auto":"wrap",console.error("Use of deprecated option: extendWidth, use tableWidth instead.")),void 0!==n.margins&&(void 0===n.margin&&(n.margin=n.margins),console.error("Use of deprecated option: margins, use margin instead.")),!n.didDrawPage&&(n.afterPageContent||n.beforePageContent||n.afterPageAdd)&&(console.error("The afterPageContent, beforePageContent and afterPageAdd hooks are deprecated. Use didDrawPage instead"),n.didDrawPage=function(t){a.applyUserStyles(),n.beforePageContent&&n.beforePageContent(t),a.applyUserStyles(),n.afterPageContent&&n.afterPageContent(t),a.applyUserStyles(),n.afterPageAdd&&1 {}}) instead."),s.API.autoTable.globalDefaults||(s.API.autoTable.globalDefaults={}),s.API.autoTable.globalDefaults.addPageContent=t,this},s.API.autoTableAddPage=function(){return console.error("Use of deprecated function: autoTableAddPage. Use doc.addPage()"),this.addPage(),this}},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var g=o(2),i=o(1),p=o(4),y=o(0),n=o(5);function r(e,t,o){var n={},r=y.default().table,l=function(t){var e=y.default().table,o=e.margin("bottom"),n=e.settings.showFoot;(!0===n||"everyPage"===n||"lastPage"===n&&t)&&(o+=e.footHeight);return y.default().pageHeight()-e.cursor.y-o}(t);if(lo}(e))v(o);else{e.spansMultiplePages=!0;for(var a=0;ac){n[i.dataKey]=s.text.splice(c,s.text.length);var h=Math.floor(s.text.length*d);1===s.rowSpan&&(e.height=Math.min(e.height,h));var f=new p.Cell(s,s.styles,s.section);f.height=s.height,f.width=s.width,f.text=n[i.dataKey],o.cells[i.dataKey]=f}else s.height>l&&(o.cells[i.dataKey]=new p.Cell(s,s.styles,s.section),o.cells[i.dataKey].height=s.height,o.cells[i.dataKey].width=s.width,o.cells[i.dataKey].text=[]);s.height=Math.min(l,s.height)}}}b(e),o&&0!==Object.keys(o.cells).length&&Object.keys(o.cells).forEach(function(t){o.cells[t].height-=e.height})}function b(t){var e=y.default().table;e.cursor.x=e.margin("left"),t.y=e.cursor.y,t.x=e.cursor.x,e.cursor.x=e.margin("left"),t.y=e.cursor.y,t.x=e.cursor.x;for(var o=0,n=e.columns;oy.default().pageHeight())&&(l(y.default().doc),o.cursor.y=o.margin("top")),o.pageStartX=o.cursor.x,o.pageStartY=o.cursor.y,o.startPageNumber=y.default().pageNumber();var n=new p.Row([],0,"body");n.index=-1,i.applyUserStyles(),!0!==t.showHead&&"firstPage"!==t.showHead&&"everyPage"!==t.showHead||o.head.forEach(function(t){return b(t)}),i.applyUserStyles(),o.body.forEach(function(t,e){r(t,e===o.body.length-1,n)}),i.applyUserStyles(),!0!==t.showFoot&&"lastPage"!==t.showFoot&&"everyPage"!==t.showFoot||o.foot.forEach(function(t){return b(t)}),i.addTableBorder(),o.callEndPageHooks()},e.addPage=v},function(t,e,o){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)});Object.defineProperty(e,"__esModule",{value:!0});var l=o(0),a=(Object.defineProperty(i.prototype,"pageCount",{get:function(){return this.pageNumber},enumerable:!0,configurable:!0}),i);function i(){var t=l.default().table;this.table=t,this.pageNumber=t.pageNumber,this.settings=t.settings,this.cursor=t.cursor,this.doc=l.default().doc}e.HookData=a;var s,d=(r(u,s=a),u);function u(t,e,o){var n=s.call(this)||this;return n.cell=t,n.row=e,n.column=o,n.section=e.section,n}e.CellHookData=d},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var f=o(2),g=o(1),p=o(0);e.calculateWidths=function(t){10/p.default().scaleFactor()*t.columns.length>t.width?console.error("Columns could not fit on page"):t.minWidth>t.width&&console.error("Column widths to wide and can't fit page"),function t(e,o,n){for(var r=0;r=l.minWidth)){l.width=l.minWidth+1/p.default().scaleFactor(),n-=l.wrappedWidth,e.splice(r,1),t(e,o,n);break}l.width=s}}(t.columns.slice(0),t.width-t.wrappedWidth,t.wrappedWidth),function(t){for(var e=t.allRows(),o=0;os.contentHeight&&(s.contentHeight=s.styles.minCellHeight);var h=s.contentHeight/s.rowSpan;1h&&(h=e.height),h>r.height&&(r.height=h,r.maxCellHeight=h,r.maxCellLineCount=u)}}e.count--}}(t),function(t){for(var e={},o=1,n=t.allRows(),r=0;rl.maxCellHeight&&(d.row.maxCellHeight=d.cell.height,d.row.maxCellLineCount=Array.isArray(d.cell.text)?d.cell.text.length:1),o=d.cell.colSpan,delete l.cells[s.dataKey],d.left--,d.left<=1&&delete e[s.dataKey];else{var u=l.cells[s.dataKey];if(!u)continue;if(u.height=l.height,1c?c:u.rowSpan;e[s.dataKey]={cell:u,left:h,row:l}}}}"head"===l.section&&(t.headHeight+=l.maxCellHeight),"foot"===l.section&&(t.footHeight+=l.maxCellHeight),t.height+=l.height}}(t)}},function(t,e,o){"use strict";var b=this&&this.__assign||function(){return(b=Object.assign||function(t){for(var e,o=1,n=arguments.length;on.wrappedWidth&&(n.wrappedWidth=r.wrappedWidth),r.minWidth>n.minWidth&&(n.minWidth=r.minWidth))}})}(n),n.minWidth=n.columns.reduce(function(t,e){return t+e.minWidth},0),n.wrappedWidth=n.columns.reduce(function(t,e){return t+e.wrappedWidth},0),"number"==typeof n.settings.tableWidth?n.width=n.settings.tableWidth:"wrap"===n.settings.tableWidth?n.width=n.wrappedWidth:n.width=O.default().pageWidth()-n.margin("left")-n.margin("right"),n}},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var f=o(13),g=o(0);function i(t,e,o,n){var r=[];if(!e)return r;for(var l=0;la.top&&(a.top=l);l>a.bottom&&(a.bottom=l);return a}(o.padding,o.fontSize,o.lineHeight,e)),l("lineWidth",parseInt(o.borderWidth||"")/(96/72)/e),l("font",(o.fontFamily||"").toLowerCase()),r}},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a=o(1);function i(t){t.rowHeight?(console.error("Use of deprecated style rowHeight. It is renamed to minCellHeight."),t.minCellHeight||(t.minCellHeight=t.rowHeight)):t.columnWidth&&(console.error("Use of deprecated style columnWidth. It is renamed to cellWidth."),t.cellWidth||(t.cellWidth=t.columnWidth))}e.default=function(t){for(var e=function(n){n&&"object"!=typeof n&&console.error("The options parameter should be of type object, is: "+typeof n),void 0!==n.extendWidth&&(n.tableWidth=n.extendWidth?"auto":"wrap",console.error("Use of deprecated option: extendWidth, use tableWidth instead.")),void 0!==n.margins&&(void 0===n.margin&&(n.margin=n.margins),console.error("Use of deprecated option: margins, use margin instead.")),!n.didDrawPage&&(n.afterPageContent||n.beforePageContent||n.afterPageAdd)&&(console.error("The afterPageContent, beforePageContent and afterPageAdd hooks are deprecated. Use didDrawPage instead"),n.didDrawPage=function(t){a.applyUserStyles(),n.beforePageContent&&n.beforePageContent(t),a.applyUserStyles(),n.afterPageContent&&n.afterPageContent(t),a.applyUserStyles(),n.afterPageAdd&&1