jspdf-autotable
Advanced tools
Comparing version 3.2.9 to 3.2.10
/*! | ||
* | ||
* jsPDF AutoTable plugin v3.2.9 | ||
* jsPDF AutoTable plugin v3.2.10 | ||
* | ||
@@ -17,2 +17,2 @@ * Copyright (c) 2014 Simon Bengtsson, https://github.com/simonbengtsson/jsPDF-AutoTable | ||
@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={},n=0;n<10;n++)e["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(e).map(function(t){return e[t]}).join(""))return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach(function(t){o[t]=t}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch(t){return!1}}()?Object.assign:function(t,e){for(var n,o,r=function(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}(t),i=1;i<arguments.length;i++){for(var l in n=Object(arguments[i]))d.call(n,l)&&(r[l]=n[l]);if(s){o=s(n);for(var a=0;a<o.length;a++)u.call(n,o[a])&&(r[o[a]]=n[o[a]])}}return r}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var f=n(13),g=n(0);function a(t,e,n,o){var r=[];if(!e)return r;for(var i=0;i<e.rows.length;i++){for(var l=e.rows[i],a=[],s=o?f.parseCss(l,g.default().scaleFactor(),["cellPadding","lineWidth","lineColor"]):{},d=0;d<l.cells.length;d++){var u=l.cells[d],c=t.getComputedStyle(u);if(n||"none"!==c.display){var h=o?f.parseCss(u,g.default().scaleFactor()):{};a.push({rowSpan:u.rowSpan,colSpan:u.colSpan,styles:o?h:null,_element:u,content:p(u)})}}0<a.length&&(n||"none"!==s.display)&&(a._element=l,r.push(a))}return r}function p(t){var e=t.cloneNode(!0);return e.innerHTML=e.innerHTML.replace(/\n/g,"").replace(/ +/g," "),e.innerHTML=e.innerHTML.split("<br>").map(function(t){return t.trim()}).join("\n"),e.innerText||e.textContent||""}e.parseHtml=function(t,e,n){var o;if(void 0===e&&(e=!1),void 0===n&&(n=!1),o="string"==typeof t?window.document.querySelector(t):t){for(var r=a(window,o.tHead,e,n),i=[],l=0;l<o.tBodies.length;l++)i=i.concat(a(window,o.tBodies[l],e,n));return{head:r,body:i,foot:a(window,o.tFoot,e,n)}}console.error("Html table could not be found with input: ",t)}},function(t,e){t.exports=n},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(9),r=n(11),i=n(12),l=n(0);n(15);var a=n(1),s=n(6),d=n(7);d.API.autoTable=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];l.setupState(this);var n=i.parseInput(t);return r.calculateWidths(n),o.drawTable(n),n.finalY=n.cursor.y,this.previousAutoTable=n,this.lastAutoTable=n,this.autoTable.previous=n,a.applyUserStyles(),l.resetState(),this},d.API.lastAutoTable=!1,d.API.previousAutoTable=!1,d.API.autoTable.previous=!1,d.API.autoTableSetDefaults=function(t){return l.setDefaults(t,this),this},d.autoTableSetDefaults=function(t,e){return l.setDefaults(t,e),this},d.API.autoTableHtmlToJson=function(t,e){if(e=e||!1,!(t&&t instanceof HTMLTableElement))return console.error("A HTMLTableElement has to be sent to autoTableHtmlToJson"),null;var n=s.parseHtml(t,e,!1),o=n.head,r=n.body,i=n.foot;return{columns:o[0]||r[0]||i[0],rows:r,data:r}},d.API.autoTableEndPosY=function(){console.error("Use of deprecated function: autoTableEndPosY. Use doc.previousAutoTable.finalY instead.");var t=this.previousAutoTable;return t.cursor&&"number"==typeof t.cursor.y?t.cursor.y:0},d.API.autoTableAddPageContent=function(t){return console.error("Use of deprecated function: autoTableAddPageContent. Use jsPDF.autoTableSetDefaults({didDrawPage: () => {}}) instead."),d.API.autoTable.globalDefaults||(d.API.autoTable.globalDefaults={}),d.API.autoTable.globalDefaults.addPageContent=t,this},d.API.autoTableAddPage=function(){return console.error("Use of deprecated function: autoTableAddPage. Use doc.addPage()"),this.addPage(),this}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var m=n(2),a=n(1),v=n(4),b=n(0),w=n(5);function l(t,e,n){var o,r,i,l,a,s=new v.Row(t.raw,-1,t.section);s.spansMultiplePages=!0,t.spansMultiplePages=!0,t.height=0;for(var d=t.maxCellHeight=0,u=n.columns;d<u.length;d++){var c=u[d];if(y=t.cells[c.index]){Array.isArray(y.text)||(y.text=[y.text]);var h=new v.Cell(y.raw,{},y.section);(h=w(h,y)).textPos=w({},y.textPos),h.text=[];var f=(r=e,void 0,i=(o=y).styles.fontSize/b.default().scaleFactor()*m.FONT_ROW_RATIO,l=o.padding("vertical"),a=Math.floor((r-l)/i),Math.max(0,a));y.text.length>f&&(h.text=y.text.splice(f,y.text.length)),y.contentHeight=y.getContentHeight(),y.contentHeight>t.height&&(t.height=y.contentHeight,t.maxCellHeight=y.contentHeight),h.contentHeight=h.getContentHeight(),h.contentHeight>s.height&&(s.height=h.contentHeight,s.maxCellHeight=h.contentHeight),s.cells[c.index]=h}}for(var g=0,p=n.columns;g<p.length;g++){var y;c=p[g];(h=s.cells[c.index])&&(h.height=s.height),(y=t.cells[c.index])&&(y.height=t.height)}return s}function s(n,t,e){var o=b.default().pageHeight()-(e.margin("top")-e.margin("bottom")),r=n.getMinimumRowHeight()<t;if(n.getMinimumRowHeight()>o)return console.error("Will not be able to print row "+n.index+" correctly since it's minimum height is larger than page height"),!0;var i=0<e.columns.filter(function(t){var e=n.cells[t.index];return!!e&&1<e.rowSpan}).length;return r&&(n.maxCellHeight>o?(i&&console.error("The content of row "+n.index+" will not be drawn correctly since drawing rows with a height larger than the page height and has cells with rowspans is not supported."),!0):!i&&"avoid"!==e.settings.rowPageBreak)}function d(t){var e=b.default().table;e.cursor.x=e.margin("left"),t.y=e.cursor.y,t.x=e.cursor.x;for(var n=0,o=e.columns;n<o.length;n++){var r=o[n],i=t.cells[r.index];if(i)if(a.applyStyles(i.styles),i.x=e.cursor.x,i.y=t.y,"top"===i.styles.valign?i.textPos.y=e.cursor.y+i.padding("top"):"bottom"===i.styles.valign?i.textPos.y=e.cursor.y+i.height-i.padding("bottom"):i.textPos.y=e.cursor.y+i.height/2,"right"===i.styles.halign?i.textPos.x=i.x+i.width-i.padding("right"):"center"===i.styles.halign?i.textPos.x=i.x+i.width/2:i.textPos.x=i.x+i.padding("left"),!1!==e.callCellHooks(e.cellHooks.willDrawCell,i,t,r)){var l=a.getFillStyle(i.styles);l&&b.default().doc.rect(i.x,e.cursor.y,i.width,i.height,l),b.default().doc.autoTableText(i.text,i.textPos.x,i.textPos.y,{halign:i.styles.halign,valign:i.styles.valign,maxWidth:Math.ceil(i.width-i.padding("left")-i.padding("right"))}),e.callCellHooks(e.cellHooks.didDrawCell,i,t,r),e.cursor.x+=r.width}else e.cursor.x+=r.width;else e.cursor.x+=r.width}e.cursor.y+=t.height}function u(t){var e=b.default().table,n=e.margin("bottom"),o=e.settings.showFoot;return(!0===o||"everyPage"===o||"lastPage"===o&&t)&&(n+=e.footHeight),b.default().pageHeight()-e.cursor.y-n}function c(){var t=b.default().table;a.applyUserStyles(),!0!==t.settings.showFoot&&"everyPage"!==t.settings.showFoot||t.foot.forEach(function(t){return d(t)}),t.finalY=t.cursor.y,t.callEndPageHooks(),a.addTableBorder(),o(b.default().doc),t.pageNumber++,t.cursor={x:t.margin("left"),y:t.margin("top")},t.pageStartX=t.cursor.x,t.pageStartY=t.cursor.y,!0!==t.settings.showHead&&"everyPage"!==t.settings.showHead||t.head.forEach(function(t){return d(t)})}function o(t){var e=b.default().pageNumber();t.setPage(e+1),b.default().pageNumber()===e&&t.addPage()}e.drawTable=function(n){var t=n.settings;n.cursor={x:n.margin("left"),y:null==t.startY?n.margin("top"):t.startY};var e=t.startY+n.margin("bottom")+n.headHeight+n.footHeight;"avoid"===t.pageBreak&&(e+=n.height),("always"===t.pageBreak||null!=t.startY&&!1!==t.startY&&e>b.default().pageHeight())&&(o(b.default().doc),n.cursor.y=n.margin("top")),n.pageStartX=n.cursor.x,n.pageStartY=n.cursor.y,n.startPageNumber=b.default().pageNumber(),a.applyUserStyles(),!0!==t.showHead&&"firstPage"!==t.showHead&&"everyPage"!==t.showHead||n.head.forEach(function(t){return d(t)}),a.applyUserStyles(),n.body.forEach(function(t,e){!function t(e,n){var o=b.default().table;var r=u(n);if(e.canEntireRowFit(r))d(e);else if(s(e,r,o)){var i=l(e,r,o);d(e),c(),t(i,n)}else c(),t(e,n)}(t,e===n.body.length-1)}),a.applyUserStyles(),!0!==t.showFoot&&"lastPage"!==t.showFoot&&"everyPage"!==t.showFoot||n.foot.forEach(function(t){return d(t)}),a.addTableBorder(),n.callEndPageHooks()},e.addPage=c},function(t,e,n){"use strict";var o,r=this&&this.__extends||(o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),l=(Object.defineProperty(a.prototype,"pageCount",{get:function(){return this.pageNumber},enumerable:!0,configurable:!0}),a);function a(){var t=i.default().table;this.table=t,this.pageNumber=t.pageNumber,this.settings=t.settings,this.cursor=t.cursor,this.doc=i.default().doc}e.HookData=l;var s,d=(r(u,s=l),u);function u(t,e,n){var o=s.call(this)||this;return o.cell=t,o.row=e,o.column=n,o.section=e.section,o}e.CellHookData=d},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var c=n(1),p=n(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 too wide and can't fit page"),function t(e,n,o){var r=n-o;for(var i=0;i<e.length;i++){for(var l=e[i],a=l.wrappedWidth/o,s=r*a,d=l.wrappedWidth+s,u=!1,c=0,h=p.default().table.allRows();c<h.length;c++){var f=h[c],g=f.cells[l.index];if(g&&"number"==typeof g.styles.cellWidth){u=!0;break}}if(d<l.minWidth||u){l.width=l.minWidth+1/p.default().scaleFactor(),o-=l.wrappedWidth,n-=l.width,e.splice(i,1),t(e,n,o);break}l.width=d}}(t.columns.slice(0),t.width,t.wrappedWidth),function(t){for(var e=t.allRows(),n=0;n<e.length;n++)for(var o=e[n],r=null,i=0,l=0,a=0;a<t.columns.length;a++){var s=t.columns[a],d=null;if(1<(l-=1)&&t.columns[a+1])i+=s.width,delete o.cells[s.index];else{if(r)d=r,delete o.cells[s.index],r=null;else{if(!(d=o.cells[s.index]))continue;if(l=d.colSpan,i=0,1<d.colSpan){r=d,i+=s.width;continue}}d.width=s.width+i}}}(t),function(t){for(var e={count:0,height:0},n=0,o=t.allRows();n<o.length;n++){for(var r=o[n],i=0,l=t.columns;i<l.length;i++){var a=l[i],s=r.cells[a.index];if(s){c.applyStyles(s.styles);var d=s.width-s.padding("horizontal");"linebreak"===s.styles.overflow?s.text=p.default().doc.splitTextToSize(s.text,d+1/(p.default().scaleFactor()||1),{fontSize:s.styles.fontSize}):"ellipsize"===s.styles.overflow?s.text=c.ellipsize(s.text,d,s.styles):"hidden"===s.styles.overflow?s.text=c.ellipsize(s.text,d,s.styles,""):"function"==typeof s.styles.overflow&&(s.text=s.styles.overflow(s.text,d)),s.contentHeight=s.getContentHeight(),s.styles.minCellHeight>s.contentHeight&&(s.contentHeight=s.styles.minCellHeight);var u=s.contentHeight/s.rowSpan;1<s.rowSpan&&e.count*e.height<u*s.rowSpan?e={height:u,count:s.rowSpan}:e&&0<e.count&&e.height>u&&(u=e.height),u>r.height&&(r.height=u,r.maxCellHeight=u)}}e.count--}}(t),function(t){for(var e={},n=1,o=t.allRows(),r=0;r<o.length;r++){for(var i=o[r],l=0,a=t.columns;l<a.length;l++){var s=a[l],d=e[s.index];if(1<n)n--,delete i.cells[s.index];else if(d)d.cell.height+=i.height,d.cell.height>i.maxCellHeight&&(d.row.maxCellHeight=d.cell.height),n=d.cell.colSpan,delete i.cells[s.index],d.left--,d.left<=1&&delete e[s.index];else{var u=i.cells[s.index];if(!u)continue;if(u.height=i.height,1<u.rowSpan){var c=o.length-r,h=u.rowSpan>c?c:u.rowSpan;e[s.index]={cell:u,left:h,row:i}}}}"head"===i.section&&(t.headHeight+=i.maxCellHeight),"foot"===i.section&&(t.footHeight+=i.maxCellHeight),t.height+=i.height}}(t)}},function(t,e,n){"use strict";var C=this&&this.__spreadArrays||function(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var o=Array(t),r=0;for(e=0;e<n;e++)for(var i=arguments[e],l=0,a=i.length;l<a;l++,r++)o[r]=i[l];return o};Object.defineProperty(e,"__esModule",{value:!0});var W=n(4),H=n(2),m=n(6),O=n(3),v=n(1),T=n(0),b=n(14);e.parseInput=function(t){var e=function(t){{if(1===t.length)return t[0];var e=t[2]||{};return e.body=t[1],e.columns=t[0],e.columns.forEach(function(t){"object"==typeof t&&null==t.header&&(t.header=t.title)}),e}}(t),n=[T.getGlobalOptions(),T.getDocumentOptions(),e];b.default(n);var o=new W.Table;(T.default().table=o).id=e.tableId;var r=T.default().doc;o.userStyles={textColor:r.getTextColor?r.getTextColor():0,fontSize:r.internal.getFontSize(),fontStyle:r.internal.getFont().fontStyle,font:r.internal.getFont().fontName};for(var i=function(e){var t=n.map(function(t){return t[e]||{}});o.styles[e]=O.assign.apply(void 0,C([{}],t))},l=0,a=Object.keys(o.styles);l<a.length;l++){i(a[l])}for(var s=0,d=n;s<d.length;s++)for(var u=d[s],c=0,h=Object.keys(o.cellHooks);c<h.length;c++){var f=h[c];u&&"function"==typeof u[f]&&o.cellHooks[f].push(u[f])}o.settings=O.assign.apply(void 0,C([{},H.defaultConfig()],n)),o.settings.margin=v.marginOrPadding(o.settings.margin,H.defaultConfig().margin),"auto"===o.settings.theme&&(o.settings.theme=o.settings.useCss?"plain":"striped"),!1===o.settings.startY&&delete o.settings.startY;var g=T.default().doc.previousAutoTable,p=g&&g.startPageNumber+g.pageNumber-1===T.default().pageNumber();null==o.settings.startY&&p&&(o.settings.startY=g.finalY+20/T.default().scaleFactor());var y={};return o.settings.html&&(y=m.parseHtml(o.settings.html,o.settings.includeHiddenHtml,o.settings.useCss)||{}),o.settings.head=y.head||o.settings.head||[],o.settings.body=y.body||o.settings.body||[],o.settings.foot=y.foot||o.settings.foot||[],function(P){var n=P.settings;P.columns=function(t){{if(t.columns)return t.columns.map(function(t,e){var n=t.dataKey||t.key||e;return new W.Column(n,t,e)});var r=t.head[0]||t.body[0]||t.foot[0]||[],i=[];return Object.keys(r).filter(function(t){return"_element"!==t}).forEach(function(t){for(var e=r[t]&&r[t].colSpan?r[t].colSpan:1,n=0;n<e;n++){var o=void 0;o=Array.isArray(r)?i.length:t+(0<n?"_"+n:""),i.push(new W.Column(o,o,i.length))}}),i}}(n);for(var t=function(x){var S={},t=n[x];if(0===t.length&&n.columns&&"body"!==x){var e=function(t,o){var r={};return t.columns.forEach(function(t){var e=t.raw;if("head"===o){var n=e&&e.header?e.header:e;n&&(r[t.dataKey]=n)}else"foot"===o&&e.footer&&(r[t.dataKey]=e.footer)}),0<Object.keys(r).length?r:null}(P,x);e&&t.push(e)}t.forEach(function(t,e){var n=0,o=new W.Row(t,e,x);P[x].push(o);for(var r,i,l,a,s,d,u,c,h,f=0,g=0,p=0,y=P.columns;p<y.length;p++){var m=y[p];if(null==S[m.index]||0===S[m.index].left)if(0===g){var v=void 0;v=Array.isArray(t)?t[m.index-f-n]:t[m.dataKey];var b=(r=x,i=m,l=e,void 0,a=T.default().table,s=H.getTheme(a.settings.theme),d=[s.table,s[r],a.styles.styles,a.styles[r+"Styles"]],u=a.styles.columnStyles[i.dataKey]||a.styles.columnStyles[i.index]||{},c="body"===r?u:{},h="body"===r&&l%2==0?O.assign({},s.alternateRow,a.styles.alternateRowStyles):{},O.assign.apply(void 0,C([H.defaultStyles()],C(d,[h,c])))),w=new W.Cell(v,b,x);o.cells[m.dataKey]=w,g=(o.cells[m.index]=w).colSpan-1,S[m.index]={left:w.rowSpan-1,times:g}}else g--,f++;else S[m.index].left--,g=S[m.index].times,n++}})},e=0,o=["head","body","foot"];e<o.length;e++){t(o[e])}P.allRows().forEach(function(t){for(var e=0,n=P.columns;e<n.length;e++){var o=n[e],r=t.cells[o.index];if(r)if(P.callCellHooks(P.cellHooks.didParseCell,r,t,o),r.contentWidth=r.padding("horizontal")+v.getStringWidth(r.text,r.styles),"number"==typeof r.styles.cellWidth)r.minWidth=r.styles.cellWidth,r.wrappedWidth=r.styles.cellWidth;else if("wrap"===r.styles.cellWidth)r.minWidth=r.contentWidth,r.wrappedWidth=r.contentWidth;else{var i=10/T.default().scaleFactor();r.minWidth=r.styles.minCellWidth||i,r.wrappedWidth=r.contentWidth,r.minWidth>r.wrappedWidth&&(r.wrappedWidth=r.minWidth)}}}),P.allRows().forEach(function(t){for(var e=0,n=P.columns;e<n.length;e++){var o=n[e],r=t.cells[o.index];if(r&&1===r.colSpan)r.wrappedWidth>o.wrappedWidth&&(o.wrappedWidth=r.wrappedWidth),r.minWidth>o.minWidth&&(o.minWidth=r.minWidth);else{var i=(P.styles.columnStyles[o.dataKey]||P.styles.columnStyles[o.index]||{}).cellWidth;i&&(o.minWidth=i,o.wrappedWidth=i)}r&&(1<r.colSpan&&!o.minWidth&&(o.minWidth=r.minWidth),1<r.colSpan&&!o.wrappedWidth&&(o.wrappedWidth=r.minWidth),P.callCellHooks(P.cellHooks.didParseCell,r,t,o))}})}(o),o.minWidth=o.columns.reduce(function(t,e){return t+e.minWidth},0),o.wrappedWidth=o.columns.reduce(function(t,e){return t+e.wrappedWidth},0),"number"==typeof o.settings.tableWidth?o.width=o.settings.tableWidth:"wrap"===o.settings.tableWidth?o.width=o.wrappedWidth:o.width=T.default().pageWidth()-o.margin("left")-o.margin("right"),o}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a=n(1),s=n(0);function d(t,e){var n=function t(e,n){if(!e)return null;var o=window.getComputedStyle(e)[n];return"rgba(0, 0, 0, 0)"===o||"transparent"===o||"initial"===o||"inherit"===o?t(e.parentElement,n):o}(t,e);if(!n)return null;var o=n.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d*\.?\d*))?\)$/);if(!o||!Array.isArray(o))return null;var r=[parseInt(o[1]),parseInt(o[2]),parseInt(o[3])];return 0===parseInt(o[4])||isNaN(r[0])||isNaN(r[1])||isNaN(r[2])?null:r}e.parseCss=function(t,e,o){void 0===o&&(o=[]);var r={},n=window.getComputedStyle(t);function i(t,e,n){void 0===n&&(n=[]),0!==n.length&&-1===n.indexOf(e)||-1!==o.indexOf(t)||0!==e&&!e||(r[t]=e)}i("fillColor",d(t,"backgroundColor")),i("fontStyle",function(t){var e="";("bold"===t.fontWeight||"bolder"===t.fontWeight||700<=parseInt(t.fontWeight))&&(e+="bold");"italic"!==t.fontStyle&&"oblique"!==t.fontStyle||(e+="italic");return e}(n)),i("textColor",d(t,"color")),i("halign",n.textAlign,["left","right","center","justify"]),i("valign",n.verticalAlign,["middle","bottom","top"]),i("fontSize",parseInt(n.fontSize||"")/(96/72)),i("cellPadding",function(t,e,n,o){if(!t)return null;var r=96/(72/o),i=(parseInt(n)-parseInt(e))/o/2,l=t.split(" ").map(function(t){return parseInt(t)/r});l=a.marginOrPadding(l,0),i>l.top&&(l.top=i);i>l.bottom&&(l.bottom=i);return l}(n.padding,n.fontSize,n.lineHeight,e)),i("lineWidth",parseInt(n.borderTopWidth||"")/(96/72)/e),i("lineColor",d(t,"borderTopColor"));var l=(n.fontFamily||"").toLowerCase();return s.default().doc.getFontList()[l]&&i("font",l),r}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var l=n(1);function a(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(o){o&&"object"!=typeof o&&console.error("The options parameter should be of type object, is: "+typeof o),void 0!==o.extendWidth&&(o.tableWidth=o.extendWidth?"auto":"wrap",console.error("Use of deprecated option: extendWidth, use tableWidth instead.")),void 0!==o.margins&&(void 0===o.margin&&(o.margin=o.margins),console.error("Use of deprecated option: margins, use margin instead.")),o.startY&&"number"!=typeof o.startY&&(console.error("Invalid value for startY option",o.startY),delete o.startY),!o.didDrawPage&&(o.afterPageContent||o.beforePageContent||o.afterPageAdd)&&(console.error("The afterPageContent, beforePageContent and afterPageAdd hooks are deprecated. Use didDrawPage instead"),o.didDrawPage=function(t){l.applyUserStyles(),o.beforePageContent&&o.beforePageContent(t),l.applyUserStyles(),o.afterPageContent&&o.afterPageContent(t),l.applyUserStyles(),o.afterPageAdd&&1<t.pageNumber&&t.afterPageAdd(t),l.applyUserStyles()}),["createdHeaderCell","drawHeaderRow","drawRow","drawHeaderCell"].forEach(function(t){o[t]&&console.error('The "'+t+'" hook has changed in version 3.0, check the changelog for how to migrate.')}),[["showFoot","showFooter"],["showHead","showHeader"],["didDrawPage","addPageContent"],["didParseCell","createdCell"],["headStyles","headerStyles"]].forEach(function(t){var e=t[0],n=t[1];o[n]&&(console.error("Use of deprecated option "+n+". Use "+e+" instead"),o[e]=o[n])}),[["padding","cellPadding"],["lineHeight","rowHeight"],"fontSize","overflow"].forEach(function(t){var e="string"==typeof t?t:t[0],n="string"==typeof t?t:t[1];void 0!==o[e]&&(void 0===o.styles[n]&&(o.styles[n]=o[e]),console.error("Use of deprecated option: "+e+", use the style "+n+" instead."))});for(var t=0,e=["styles","bodyStyles","headStyles","footStyles"];t<e.length;t++){a(o[e[t]]||{})}for(var n=o.columnStyles||{},r=0,i=Object.keys(n);r<i.length;r++){a(n[i[r]]||{})}},n=0,o=t;n<o.length;n++){e(o[n])}}},function(t,e,n){n(7).API.autoTableText=function(t,e,n,o){o=o||{};"number"==typeof e&&"number"==typeof n||console.error("The x and y parameters are required. Missing for text: ",t);var r=this.internal.scaleFactor,i=this.internal.getFontSize()/r,l=null,a=1;if("middle"!==o.valign&&"bottom"!==o.valign&&"center"!==o.halign&&"right"!==o.halign||(a=(l="string"==typeof t?t.split(/\r\n|\r|\n/g):t).length||1),n+=i*(2-1.15),"middle"===o.valign?n-=a/2*i*1.15:"bottom"===o.valign&&(n-=a*i*1.15),"center"===o.halign||"right"===o.halign){var s=i;if("center"===o.halign&&(s*=.5),1<=a){for(var d=0;d<l.length;d++)this.text(l[d],e-this.getStringUnitWidth(l[d])*s,n),n+=1.15*i;return this}e-=this.getStringUnitWidth(t)*s}return"justify"===o.halign?this.text(t,e,n,{maxWidth:o.maxWidth||100,align:"justify"}):this.text(t,e,n),this}}],r.c=i,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},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 n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},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=8);function r(t){if(i[t])return i[t].exports;var e=i[t]={i:t,l:!1,exports:{}};return o[t].call(e.exports,e,e.exports,r),e.l=!0,e.exports}var o,i}); | ||
*/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={},n=0;n<10;n++)e["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(e).map(function(t){return e[t]}).join(""))return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach(function(t){o[t]=t}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch(t){return!1}}()?Object.assign:function(t,e){for(var n,o,r=function(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}(t),i=1;i<arguments.length;i++){for(var l in n=Object(arguments[i]))d.call(n,l)&&(r[l]=n[l]);if(s){o=s(n);for(var a=0;a<o.length;a++)u.call(n,o[a])&&(r[o[a]]=n[o[a]])}}return r}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var f=n(13),g=n(0);function a(t,e,n,o){var r=[];if(!e)return r;for(var i=0;i<e.rows.length;i++){for(var l=e.rows[i],a=[],s=o?f.parseCss(l,g.default().scaleFactor(),["cellPadding","lineWidth","lineColor"]):{},d=0;d<l.cells.length;d++){var u=l.cells[d],c=t.getComputedStyle(u);if(n||"none"!==c.display){var h=o?f.parseCss(u,g.default().scaleFactor()):{};a.push({rowSpan:u.rowSpan,colSpan:u.colSpan,styles:o?h:null,_element:u,content:p(u)})}}0<a.length&&(n||"none"!==s.display)&&(a._element=l,r.push(a))}return r}function p(t){var e=t.cloneNode(!0);return e.innerHTML=e.innerHTML.replace(/\n/g,"").replace(/ +/g," "),e.innerHTML=e.innerHTML.split("<br>").map(function(t){return t.trim()}).join("\n"),e.innerText||e.textContent||""}e.parseHtml=function(t,e,n){var o;if(void 0===e&&(e=!1),void 0===n&&(n=!1),o="string"==typeof t?window.document.querySelector(t):t){for(var r=a(window,o.tHead,e,n),i=[],l=0;l<o.tBodies.length;l++)i=i.concat(a(window,o.tBodies[l],e,n));return{head:r,body:i,foot:a(window,o.tFoot,e,n)}}console.error("Html table could not be found with input: ",t)}},function(t,e){t.exports=n},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(9),r=n(11),i=n(12),l=n(0);n(15);var a=n(1),s=n(6),d=n(7);d.API.autoTable=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];l.setupState(this);var n=i.parseInput(t);return r.calculateWidths(n),o.drawTable(n),n.finalY=n.cursor.y,this.previousAutoTable=n,this.lastAutoTable=n,this.autoTable.previous=n,a.applyUserStyles(),l.resetState(),this},d.API.lastAutoTable=!1,d.API.previousAutoTable=!1,d.API.autoTable.previous=!1,d.API.autoTableSetDefaults=function(t){return l.setDefaults(t,this),this},d.autoTableSetDefaults=function(t,e){return l.setDefaults(t,e),this},d.API.autoTableHtmlToJson=function(t,e){if(e=e||!1,!(t&&t instanceof HTMLTableElement))return console.error("A HTMLTableElement has to be sent to autoTableHtmlToJson"),null;var n=s.parseHtml(t,e,!1),o=n.head,r=n.body,i=n.foot;return{columns:o[0]||r[0]||i[0],rows:r,data:r}},d.API.autoTableEndPosY=function(){console.error("Use of deprecated function: autoTableEndPosY. Use doc.previousAutoTable.finalY instead.");var t=this.previousAutoTable;return t.cursor&&"number"==typeof t.cursor.y?t.cursor.y:0},d.API.autoTableAddPageContent=function(t){return console.error("Use of deprecated function: autoTableAddPageContent. Use jsPDF.autoTableSetDefaults({didDrawPage: () => {}}) instead."),d.API.autoTable.globalDefaults||(d.API.autoTable.globalDefaults={}),d.API.autoTable.globalDefaults.addPageContent=t,this},d.API.autoTableAddPage=function(){return console.error("Use of deprecated function: autoTableAddPage. Use doc.addPage()"),this.addPage(),this}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var m=n(2),a=n(1),v=n(4),b=n(0),w=n(5);function l(t,e,n){var o,r,i,l,a,s=new v.Row(t.raw,-1,t.section);s.spansMultiplePages=!0,t.spansMultiplePages=!0,t.height=0;for(var d=t.maxCellHeight=0,u=n.columns;d<u.length;d++){var c=u[d];if(y=t.cells[c.index]){Array.isArray(y.text)||(y.text=[y.text]);var h=new v.Cell(y.raw,{},y.section);(h=w(h,y)).textPos=w({},y.textPos),h.text=[];var f=(r=e,void 0,i=(o=y).styles.fontSize/b.default().scaleFactor()*m.FONT_ROW_RATIO,l=o.padding("vertical"),a=Math.floor((r-l)/i),Math.max(0,a));y.text.length>f&&(h.text=y.text.splice(f,y.text.length)),y.contentHeight=y.getContentHeight(),y.contentHeight>t.height&&(t.height=y.contentHeight,t.maxCellHeight=y.contentHeight),h.contentHeight=h.getContentHeight(),h.contentHeight>s.height&&(s.height=h.contentHeight,s.maxCellHeight=h.contentHeight),s.cells[c.index]=h}}for(var g=0,p=n.columns;g<p.length;g++){var y;c=p[g];(h=s.cells[c.index])&&(h.height=s.height),(y=t.cells[c.index])&&(y.height=t.height)}return s}function s(n,t,e){var o=b.default().pageHeight()-(e.margin("top")-e.margin("bottom")),r=n.getMinimumRowHeight()<t;if(n.getMinimumRowHeight()>o)return console.error("Will not be able to print row "+n.index+" correctly since it's minimum height is larger than page height"),!0;var i=0<e.columns.filter(function(t){var e=n.cells[t.index];return!!e&&1<e.rowSpan}).length;return r&&(n.maxCellHeight>o?(i&&console.error("The content of row "+n.index+" will not be drawn correctly since drawing rows with a height larger than the page height and has cells with rowspans is not supported."),!0):!i&&"avoid"!==e.settings.rowPageBreak)}function d(t){var e=b.default().table;e.cursor.x=e.margin("left"),t.y=e.cursor.y,t.x=e.cursor.x;for(var n=0,o=e.columns;n<o.length;n++){var r=o[n],i=t.cells[r.index];if(i)if(a.applyStyles(i.styles),i.x=e.cursor.x,i.y=t.y,"top"===i.styles.valign?i.textPos.y=e.cursor.y+i.padding("top"):"bottom"===i.styles.valign?i.textPos.y=e.cursor.y+i.height-i.padding("bottom"):i.textPos.y=e.cursor.y+i.height/2,"right"===i.styles.halign?i.textPos.x=i.x+i.width-i.padding("right"):"center"===i.styles.halign?i.textPos.x=i.x+i.width/2:i.textPos.x=i.x+i.padding("left"),!1!==e.callCellHooks(e.cellHooks.willDrawCell,i,t,r)){var l=a.getFillStyle(i.styles);l&&b.default().doc.rect(i.x,e.cursor.y,i.width,i.height,l),b.default().doc.autoTableText(i.text,i.textPos.x,i.textPos.y,{halign:i.styles.halign,valign:i.styles.valign,maxWidth:Math.ceil(i.width-i.padding("left")-i.padding("right"))}),e.callCellHooks(e.cellHooks.didDrawCell,i,t,r),e.cursor.x+=r.width}else e.cursor.x+=r.width;else e.cursor.x+=r.width}e.cursor.y+=t.height}function u(t){var e=b.default().table,n=e.margin("bottom"),o=e.settings.showFoot;return(!0===o||"everyPage"===o||"lastPage"===o&&t)&&(n+=e.footHeight),b.default().pageHeight()-e.cursor.y-n}function c(){var t=b.default().table;a.applyUserStyles(),!0!==t.settings.showFoot&&"everyPage"!==t.settings.showFoot||t.foot.forEach(function(t){return d(t)}),t.finalY=t.cursor.y,t.callEndPageHooks(),a.addTableBorder(),o(b.default().doc),t.pageNumber++,t.cursor={x:t.margin("left"),y:t.margin("top")},t.pageStartX=t.cursor.x,t.pageStartY=t.cursor.y,!0!==t.settings.showHead&&"everyPage"!==t.settings.showHead||t.head.forEach(function(t){return d(t)})}function o(t){var e=b.default().pageNumber();t.setPage(e+1),b.default().pageNumber()===e&&t.addPage()}e.drawTable=function(n){var t=n.settings;n.cursor={x:n.margin("left"),y:null==t.startY?n.margin("top"):t.startY};var e=t.startY+n.margin("bottom")+n.headHeight+n.footHeight;"avoid"===t.pageBreak&&(e+=n.height),("always"===t.pageBreak||null!=t.startY&&!1!==t.startY&&e>b.default().pageHeight())&&(o(b.default().doc),n.cursor.y=n.margin("top")),n.pageStartX=n.cursor.x,n.pageStartY=n.cursor.y,n.startPageNumber=b.default().pageNumber(),a.applyUserStyles(),!0!==t.showHead&&"firstPage"!==t.showHead&&"everyPage"!==t.showHead||n.head.forEach(function(t){return d(t)}),a.applyUserStyles(),n.body.forEach(function(t,e){!function t(e,n){var o=b.default().table;var r=u(n);if(e.canEntireRowFit(r))d(e);else if(s(e,r,o)){var i=l(e,r,o);d(e),c(),t(i,n)}else c(),t(e,n)}(t,e===n.body.length-1)}),a.applyUserStyles(),!0!==t.showFoot&&"lastPage"!==t.showFoot&&"everyPage"!==t.showFoot||n.foot.forEach(function(t){return d(t)}),a.addTableBorder(),n.callEndPageHooks()},e.addPage=c},function(t,e,n){"use strict";var o,r=this&&this.__extends||(o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),l=(Object.defineProperty(a.prototype,"pageCount",{get:function(){return this.pageNumber},enumerable:!0,configurable:!0}),a);function a(){var t=i.default().table;this.table=t,this.pageNumber=t.pageNumber,this.settings=t.settings,this.cursor=t.cursor,this.doc=i.default().doc}e.HookData=l;var s,d=(r(u,s=l),u);function u(t,e,n){var o=s.call(this)||this;return o.cell=t,o.row=e,o.column=n,o.section=e.section,o}e.CellHookData=d},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var c=n(1),p=n(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 too wide and can't fit page"),function t(e,n,o){var r=n-o;for(var i=0;i<e.length;i++){for(var l=e[i],a=l.wrappedWidth/o,s=r*a,d=l.wrappedWidth+s,u=!1,c=0,h=p.default().table.allRows();c<h.length;c++){var f=h[c],g=f.cells[l.index];if(g&&"number"==typeof g.styles.cellWidth){u=!0;break}}if(d<l.minWidth||u){l.width=l.minWidth+1/p.default().scaleFactor(),o-=l.wrappedWidth,n-=l.width,e.splice(i,1),t(e,n,o);break}l.width=d}}(t.columns.slice(0),t.width,t.wrappedWidth),function(t){for(var e=t.allRows(),n=0;n<e.length;n++)for(var o=e[n],r=null,i=0,l=0,a=0;a<t.columns.length;a++){var s=t.columns[a],d=null;if(1<(l-=1)&&t.columns[a+1])i+=s.width,delete o.cells[s.index];else{if(r)d=r,delete o.cells[s.index],r=null;else{if(!(d=o.cells[s.index]))continue;if(l=d.colSpan,i=0,1<d.colSpan){r=d,i+=s.width;continue}}d.width=s.width+i}}}(t),function(t){for(var e={count:0,height:0},n=0,o=t.allRows();n<o.length;n++){for(var r=o[n],i=0,l=t.columns;i<l.length;i++){var a=l[i],s=r.cells[a.index];if(s){c.applyStyles(s.styles);var d=s.width-s.padding("horizontal");"linebreak"===s.styles.overflow?s.text=p.default().doc.splitTextToSize(s.text,d+1/(p.default().scaleFactor()||1),{fontSize:s.styles.fontSize}):"ellipsize"===s.styles.overflow?s.text=c.ellipsize(s.text,d,s.styles):"hidden"===s.styles.overflow?s.text=c.ellipsize(s.text,d,s.styles,""):"function"==typeof s.styles.overflow&&(s.text=s.styles.overflow(s.text,d)),s.contentHeight=s.getContentHeight(),s.styles.minCellHeight>s.contentHeight&&(s.contentHeight=s.styles.minCellHeight);var u=s.contentHeight/s.rowSpan;1<s.rowSpan&&e.count*e.height<u*s.rowSpan?e={height:u,count:s.rowSpan}:e&&0<e.count&&e.height>u&&(u=e.height),u>r.height&&(r.height=u,r.maxCellHeight=u)}}e.count--}}(t),function(t){for(var e={},n=1,o=t.allRows(),r=0;r<o.length;r++){for(var i=o[r],l=0,a=t.columns;l<a.length;l++){var s=a[l],d=e[s.index];if(1<n)n--,delete i.cells[s.index];else if(d)d.cell.height+=i.height,d.cell.height>i.maxCellHeight&&(d.row.maxCellHeight=d.cell.height),n=d.cell.colSpan,delete i.cells[s.index],d.left--,d.left<=1&&delete e[s.index];else{var u=i.cells[s.index];if(!u)continue;if(u.height=i.height,1<u.rowSpan){var c=o.length-r,h=u.rowSpan>c?c:u.rowSpan;e[s.index]={cell:u,left:h,row:i}}}}"head"===i.section&&(t.headHeight+=i.maxCellHeight),"foot"===i.section&&(t.footHeight+=i.maxCellHeight),t.height+=i.height}}(t)}},function(t,e,n){"use strict";var C=this&&this.__spreadArrays||function(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var o=Array(t),r=0;for(e=0;e<n;e++)for(var i=arguments[e],l=0,a=i.length;l<a;l++,r++)o[r]=i[l];return o};Object.defineProperty(e,"__esModule",{value:!0});var W=n(4),H=n(2),m=n(6),O=n(3),v=n(1),T=n(0),b=n(14);e.parseInput=function(t){var e=function(t){{if(1===t.length)return t[0];var e=t[2]||{};return e.body=t[1],e.columns=t[0],e.columns.forEach(function(t){"object"==typeof t&&null==t.header&&(t.header=t.title)}),e}}(t),n=[T.getGlobalOptions(),T.getDocumentOptions(),e];b.default(n);var o=new W.Table;(T.default().table=o).id=e.tableId;var r=T.default().doc;o.userStyles={textColor:r.getTextColor?r.getTextColor():0,fontSize:r.internal.getFontSize(),fontStyle:r.internal.getFont().fontStyle,font:r.internal.getFont().fontName};for(var i=function(e){var t=n.map(function(t){return t[e]||{}});o.styles[e]=O.assign.apply(void 0,C([{}],t))},l=0,a=Object.keys(o.styles);l<a.length;l++){i(a[l])}for(var s=0,d=n;s<d.length;s++)for(var u=d[s],c=0,h=Object.keys(o.cellHooks);c<h.length;c++){var f=h[c];u&&"function"==typeof u[f]&&o.cellHooks[f].push(u[f])}o.settings=O.assign.apply(void 0,C([{},H.defaultConfig()],n)),o.settings.margin=v.marginOrPadding(o.settings.margin,H.defaultConfig().margin),"auto"===o.settings.theme&&(o.settings.theme=o.settings.useCss?"plain":"striped"),!1===o.settings.startY&&delete o.settings.startY;var g=T.default().doc.previousAutoTable,p=g&&g.startPageNumber+g.pageNumber-1===T.default().pageNumber();null==o.settings.startY&&p&&(o.settings.startY=g.finalY+20/T.default().scaleFactor());var y={};return o.settings.html&&(y=m.parseHtml(o.settings.html,o.settings.includeHiddenHtml,o.settings.useCss)||{}),o.settings.head=y.head||o.settings.head||[],o.settings.body=y.body||o.settings.body||[],o.settings.foot=y.foot||o.settings.foot||[],function(P){var n=P.settings;P.columns=function(t){{if(t.columns)return t.columns.map(function(t,e){var n=t.dataKey||t.key||e;return new W.Column(n,t,e)});var r=t.head[0]||t.body[0]||t.foot[0]||[],i=[];return Object.keys(r).filter(function(t){return"_element"!==t}).forEach(function(t){for(var e=r[t]&&r[t].colSpan?r[t].colSpan:1,n=0;n<e;n++){var o=void 0;o=Array.isArray(r)?i.length:t+(0<n?"_"+n:""),i.push(new W.Column(o,o,i.length))}}),i}}(n);for(var t=function(x){var S={},t=n[x];if(0===t.length&&n.columns&&"body"!==x){var e=function(t,o){var r={};return t.columns.forEach(function(t){var e=t.raw;if("head"===o){var n=e&&e.header?e.header:e;n&&(r[t.dataKey]=n)}else"foot"===o&&e.footer&&(r[t.dataKey]=e.footer)}),0<Object.keys(r).length?r:null}(P,x);e&&t.push(e)}t.forEach(function(t,e){var n=0,o=new W.Row(t,e,x);P[x].push(o);for(var r,i,l,a,s,d,u,c,h,f=0,g=0,p=0,y=P.columns;p<y.length;p++){var m=y[p];if(null==S[m.index]||0===S[m.index].left)if(0===g){var v=void 0;v=Array.isArray(t)?t[m.index-f-n]:t[m.dataKey];var b=(r=x,i=m,l=e,void 0,a=T.default().table,s=H.getTheme(a.settings.theme),d=[s.table,s[r],a.styles.styles,a.styles[r+"Styles"]],u=a.styles.columnStyles[i.dataKey]||a.styles.columnStyles[i.index]||{},c="body"===r?u:{},h="body"===r&&l%2==0?O.assign({},s.alternateRow,a.styles.alternateRowStyles):{},O.assign.apply(void 0,C([H.defaultStyles()],C(d,[h,c])))),w=new W.Cell(v,b,x);o.cells[m.dataKey]=w,g=(o.cells[m.index]=w).colSpan-1,S[m.index]={left:w.rowSpan-1,times:g}}else g--,f++;else S[m.index].left--,g=S[m.index].times,n++}})},e=0,o=["head","body","foot"];e<o.length;e++){t(o[e])}P.allRows().forEach(function(t){for(var e=0,n=P.columns;e<n.length;e++){var o=n[e],r=t.cells[o.index];if(r)if(P.callCellHooks(P.cellHooks.didParseCell,r,t,o),r.contentWidth=r.padding("horizontal")+v.getStringWidth(r.text,r.styles),"number"==typeof r.styles.cellWidth)r.minWidth=r.styles.cellWidth,r.wrappedWidth=r.styles.cellWidth;else if("wrap"===r.styles.cellWidth)r.minWidth=r.contentWidth,r.wrappedWidth=r.contentWidth;else{var i=10/T.default().scaleFactor();r.minWidth=r.styles.minCellWidth||i,r.wrappedWidth=r.contentWidth,r.minWidth>r.wrappedWidth&&(r.wrappedWidth=r.minWidth)}}}),P.allRows().forEach(function(t){for(var e=0,n=P.columns;e<n.length;e++){var o=n[e],r=t.cells[o.index];if(r&&1===r.colSpan)r.wrappedWidth>o.wrappedWidth&&(o.wrappedWidth=r.wrappedWidth),r.minWidth>o.minWidth&&(o.minWidth=r.minWidth);else{var i=(P.styles.columnStyles[o.dataKey]||P.styles.columnStyles[o.index]||{}).cellWidth;i&&"number"==typeof i&&(o.minWidth=i,o.wrappedWidth=i)}r&&(1<r.colSpan&&!o.minWidth&&(o.minWidth=r.minWidth),1<r.colSpan&&!o.wrappedWidth&&(o.wrappedWidth=r.minWidth),P.callCellHooks(P.cellHooks.didParseCell,r,t,o))}})}(o),o.minWidth=o.columns.reduce(function(t,e){return t+e.minWidth},0),o.wrappedWidth=o.columns.reduce(function(t,e){return t+e.wrappedWidth},0),"number"==typeof o.settings.tableWidth?o.width=o.settings.tableWidth:"wrap"===o.settings.tableWidth?o.width=o.wrappedWidth:o.width=T.default().pageWidth()-o.margin("left")-o.margin("right"),o}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a=n(1),s=n(0);function d(t,e){var n=function t(e,n){if(!e)return null;var o=window.getComputedStyle(e)[n];return"rgba(0, 0, 0, 0)"===o||"transparent"===o||"initial"===o||"inherit"===o?t(e.parentElement,n):o}(t,e);if(!n)return null;var o=n.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d*\.?\d*))?\)$/);if(!o||!Array.isArray(o))return null;var r=[parseInt(o[1]),parseInt(o[2]),parseInt(o[3])];return 0===parseInt(o[4])||isNaN(r[0])||isNaN(r[1])||isNaN(r[2])?null:r}e.parseCss=function(t,e,o){void 0===o&&(o=[]);var r={},n=window.getComputedStyle(t);function i(t,e,n){void 0===n&&(n=[]),0!==n.length&&-1===n.indexOf(e)||-1!==o.indexOf(t)||0!==e&&!e||(r[t]=e)}i("fillColor",d(t,"backgroundColor")),i("fontStyle",function(t){var e="";("bold"===t.fontWeight||"bolder"===t.fontWeight||700<=parseInt(t.fontWeight))&&(e+="bold");"italic"!==t.fontStyle&&"oblique"!==t.fontStyle||(e+="italic");return e}(n)),i("textColor",d(t,"color")),i("halign",n.textAlign,["left","right","center","justify"]),i("valign",n.verticalAlign,["middle","bottom","top"]),i("fontSize",parseInt(n.fontSize||"")/(96/72)),i("cellPadding",function(t,e,n,o){if(!t)return null;var r=96/(72/o),i=(parseInt(n)-parseInt(e))/o/2,l=t.split(" ").map(function(t){return parseInt(t)/r});l=a.marginOrPadding(l,0),i>l.top&&(l.top=i);i>l.bottom&&(l.bottom=i);return l}(n.padding,n.fontSize,n.lineHeight,e)),i("lineWidth",parseInt(n.borderTopWidth||"")/(96/72)/e),i("lineColor",d(t,"borderTopColor"));var l=(n.fontFamily||"").toLowerCase();return s.default().doc.getFontList()[l]&&i("font",l),r}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var l=n(1);function a(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(o){o&&"object"!=typeof o&&console.error("The options parameter should be of type object, is: "+typeof o),void 0!==o.extendWidth&&(o.tableWidth=o.extendWidth?"auto":"wrap",console.error("Use of deprecated option: extendWidth, use tableWidth instead.")),void 0!==o.margins&&(void 0===o.margin&&(o.margin=o.margins),console.error("Use of deprecated option: margins, use margin instead.")),o.startY&&"number"!=typeof o.startY&&(console.error("Invalid value for startY option",o.startY),delete o.startY),!o.didDrawPage&&(o.afterPageContent||o.beforePageContent||o.afterPageAdd)&&(console.error("The afterPageContent, beforePageContent and afterPageAdd hooks are deprecated. Use didDrawPage instead"),o.didDrawPage=function(t){l.applyUserStyles(),o.beforePageContent&&o.beforePageContent(t),l.applyUserStyles(),o.afterPageContent&&o.afterPageContent(t),l.applyUserStyles(),o.afterPageAdd&&1<t.pageNumber&&t.afterPageAdd(t),l.applyUserStyles()}),["createdHeaderCell","drawHeaderRow","drawRow","drawHeaderCell"].forEach(function(t){o[t]&&console.error('The "'+t+'" hook has changed in version 3.0, check the changelog for how to migrate.')}),[["showFoot","showFooter"],["showHead","showHeader"],["didDrawPage","addPageContent"],["didParseCell","createdCell"],["headStyles","headerStyles"]].forEach(function(t){var e=t[0],n=t[1];o[n]&&(console.error("Use of deprecated option "+n+". Use "+e+" instead"),o[e]=o[n])}),[["padding","cellPadding"],["lineHeight","rowHeight"],"fontSize","overflow"].forEach(function(t){var e="string"==typeof t?t:t[0],n="string"==typeof t?t:t[1];void 0!==o[e]&&(void 0===o.styles[n]&&(o.styles[n]=o[e]),console.error("Use of deprecated option: "+e+", use the style "+n+" instead."))});for(var t=0,e=["styles","bodyStyles","headStyles","footStyles"];t<e.length;t++){a(o[e[t]]||{})}for(var n=o.columnStyles||{},r=0,i=Object.keys(n);r<i.length;r++){a(n[i[r]]||{})}},n=0,o=t;n<o.length;n++){e(o[n])}}},function(t,e,n){n(7).API.autoTableText=function(t,e,n,o){o=o||{};"number"==typeof e&&"number"==typeof n||console.error("The x and y parameters are required. Missing for text: ",t);var r=this.internal.scaleFactor,i=this.internal.getFontSize()/r,l=null,a=1;if("middle"!==o.valign&&"bottom"!==o.valign&&"center"!==o.halign&&"right"!==o.halign||(a=(l="string"==typeof t?t.split(/\r\n|\r|\n/g):t).length||1),n+=i*(2-1.15),"middle"===o.valign?n-=a/2*i*1.15:"bottom"===o.valign&&(n-=a*i*1.15),"center"===o.halign||"right"===o.halign){var s=i;if("center"===o.halign&&(s*=.5),1<=a){for(var d=0;d<l.length;d++)this.text(l[d],e-this.getStringUnitWidth(l[d])*s,n),n+=1.15*i;return this}e-=this.getStringUnitWidth(t)*s}return"justify"===o.halign?this.text(t,e,n,{maxWidth:o.maxWidth||100,align:"justify"}):this.text(t,e,n),this}}],r.c=i,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},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 n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},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=8);function r(t){if(i[t])return i[t].exports;var e=i[t]={i:t,l:!1,exports:{}};return o[t].call(e.exports,e,e.exports,r),e.l=!0,e.exports}var o,i}); |
{ | ||
"name": "jspdf-autotable", | ||
"version": "3.2.9", | ||
"version": "3.2.10", | ||
"description": "Generate pdf tables with javascript (jsPDF plugin)", | ||
@@ -5,0 +5,0 @@ "main": "dist/jspdf.plugin.autotable.js", |
Sorry, the diff of this file is too big to display
122412