Browse Source

新增表格参数(导出方式&导出文件类型)

RuoYi 3 years ago
parent
commit
1b7c5258f5

+ 0 - 119
ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/export/bootstrap-table-export.js

@@ -1,119 +0,0 @@
-/**
- * @author zhixin wen <wenzhixin2010@gmail.com>
- * extensions: https://github.com/kayalshri/tableExport.jquery.plugin
- */
-
-(function ($) {
-    'use strict';
-    var sprintf = $.fn.bootstrapTable.utils.sprintf;
-
-    var TYPE_NAME = {
-        csv: 'CSV',
-        txt: 'TXT',
-        doc: 'Word',
-        excel: 'Excel'
-    };
-
-    $.extend($.fn.bootstrapTable.defaults, {
-        showExport: false,
-        exportDataType: 'all', // basic, all, selected
-        exportTypes: ['csv', 'txt', 'doc', 'excel'],
-        exportOptions: {
-        	ignoreColumn: [0]  //忽略列索引
-        }
-    });
-
-    $.extend($.fn.bootstrapTable.defaults.icons, {
-        export: 'glyphicon glyphicon-save'
-    });
-
-    $.extend($.fn.bootstrapTable.locales, {
-        formatExport: function () {
-            return '导出';
-        }
-    });
-    $.extend($.fn.bootstrapTable.defaults, $.fn.bootstrapTable.locales);
-
-    var BootstrapTable = $.fn.bootstrapTable.Constructor,
-        _initToolbar = BootstrapTable.prototype.initToolbar;
-
-    BootstrapTable.prototype.initToolbar = function () {
-        this.showToolbar = this.options.showExport;
-
-        _initToolbar.apply(this, Array.prototype.slice.apply(arguments));
-
-        if (this.options.showExport) {
-            var that = this,
-                $btnGroup = this.$toolbar.find('>.btn-group'),
-                $export = $btnGroup.find('div.export');
-
-            if (!$export.length) {
-                $export = $([
-                    '<div class="export btn-group">',
-                        '<button class="btn' +
-                            sprintf(' btn-%s', this.options.buttonsClass) +
-                            sprintf(' btn-%s', this.options.iconSize) +
-                            ' dropdown-toggle" ' +
-                            'title="' + this.options.formatExport() + '" ' +
-                            'data-toggle="dropdown" type="button">',
-                            sprintf('<i class="%s %s"></i> ', this.options.iconsPrefix, this.options.icons.export),
-                            '<span class="caret"></span>',
-                        '</button>',
-                        '<ul class="dropdown-menu" role="menu">',
-                        '</ul>',
-                    '</div>'].join('')).appendTo($btnGroup);
-
-                var $menu = $export.find('.dropdown-menu'),
-                    exportTypes = this.options.exportTypes;
-
-                if (typeof this.options.exportTypes === 'string') {
-                    var types = this.options.exportTypes.slice(1, -1).replace(/ /g, '').split(',');
-
-                    exportTypes = [];
-                    $.each(types, function (i, value) {
-                        exportTypes.push(value.slice(1, -1));
-                    });
-                }
-                $.each(exportTypes, function (i, type) {
-                    if (TYPE_NAME.hasOwnProperty(type)) {
-                        $menu.append(['<li data-type="' + type + '">',
-                                '<a href="javascript:void(0)">',
-                                    TYPE_NAME[type],
-                                '</a>',
-                            '</li>'].join(''));
-                    }
-                });
-
-                $menu.find('li').click(function () {
-                    var type = $(this).data('type'),
-                        doExport = function () {
-                            that.$el.tableExport($.extend({}, that.options.exportOptions, {
-                                type: type,
-                                escape: false
-                            }));
-                        };
-
-                    if (that.options.exportDataType === 'all' && that.options.pagination) {
-                        that.$el.one(that.options.sidePagination === 'server' ? 'post-body.bs.table' : 'page-change.bs.table', function () {
-                            doExport();
-                            that.togglePagination();
-                        });
-                        that.togglePagination();
-                    } else if (that.options.exportDataType === 'selected') {
-                        //修改sidePagination属性为server无法导出选中数据
-                    	var trs = that.$body.children(); 
-                    	for (var i = 0; i < trs.length; i++) {
-                    	    var $this = $(trs[i]);
-                    	    if(!$this.find(sprintf('[name="%s"]',that.options.selectItemName)).prop('checked')){
-                    	      $this['hide']();
-                    	 }}
-                    	doExport();
-                    	that.getRowsHidden(true);
-                    } else {
-                        doExport();
-                    }
-                });
-            }
-        }
-    };
-})(jQuery);

File diff suppressed because it is too large
+ 9 - 0
ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/export/bootstrap-table-export.min.js


+ 0 - 2257
ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/export/tableExport.js

@@ -1,2257 +0,0 @@
-/**
- * @preserve tableExport.jquery.plugin
- *
- * Version 1.9.8
- *
- * Copyright (c) 2015-2017 hhurz, https://github.com/hhurz
- *
- * Original Work Copyright (c) 2014 Giri Raj
- *
- * Licensed under the MIT License
- **/
-
-(function ($) {
-  $.fn.tableExport = function (options) {
-      var defaults = {
-        consoleLog:        false,
-        csvEnclosure:      '"',
-        csvSeparator:      ',',
-        csvUseBOM:         true,
-        displayTableName:  false,
-        escape:            false,
-        excelFileFormat:   'xlshtml',     // xmlss = XML Spreadsheet 2003 file format (XMLSS), xlshtml = Excel 2000 html format
-        excelRTL:          false,         // true = Set Excel option 'DisplayRightToLeft'
-        excelstyles:       [],            // e.g. ['border-bottom', 'border-top', 'border-left', 'border-right']
-        exportHiddenCells: false,         // true = speed up export of large tables with hidden cells (hidden cells will be exported !)
-        fileName:          'export',
-        htmlContent:       false,
-        ignoreColumn:      [],
-        ignoreRow:         [],
-        jsonScope:         'all',         // head, data, all
-        jspdf: {
-          orientation:  'p',
-          unit:         'pt',
-          format:       'a4',             // jspdf page format or 'bestfit' for autmatic paper format selection
-          margins:      {left: 20, right: 10, top: 10, bottom: 10},
-          onDocCreated: null,
-          autotable: {
-            styles: {
-              cellPadding: 2,
-              rowHeight:   12,
-              fontSize:    8,
-              fillColor:   255,           // color value or 'inherit' to use css background-color from html table
-              textColor:   50,            // color value or 'inherit' to use css color from html table
-              fontStyle:   'normal',      // normal, bold, italic, bolditalic or 'inherit' to use css font-weight and fonst-style from html table
-              overflow:    'ellipsize',   // visible, hidden, ellipsize or linebreak
-              halign:      'left',        // left, center, right
-              valign:      'middle'       // top, middle, bottom
-            },
-            headerStyles: {
-              fillColor: [52, 73, 94],
-              textColor: 255,
-              fontStyle: 'bold',
-              halign:    'center'
-            },
-            alternateRowStyles: {
-              fillColor: 245
-            },
-            tableExport: {
-              doc:               null,    // jsPDF doc object. If set, an already created doc will be used to export to
-              onAfterAutotable:  null,
-              onBeforeAutotable: null,
-              onAutotableText:   null,
-              onTable:           null,
-              outputImages:      true
-            }
-          }
-        },
-        numbers: {
-          html: {
-            decimalMark:        '.',
-            thousandsSeparator: ','
-          },
-          output: {                       // set output: false to keep number format in exported output
-            decimalMark:        '.',
-            thousandsSeparator: ','
-          }
-        },
-        onCellData:        null,
-        onCellHtmlData:    null,
-        onIgnoreRow:       null,          // onIgnoreRow($tr, rowIndex): function should return true to not export a row
-        onMsoNumberFormat: null,          // Excel 2000 html format only. See readme.md for more information about msonumberformat
-        outputMode:        'file',        // 'file', 'string', 'base64' or 'window' (experimental)
-        pdfmake: {
-          enabled: false,                 // true: use pdfmake instead of jspdf and jspdf-autotable (experimental)
-          docDefinition: {
-            pageOrientation: 'portrait',  // 'portrait' or 'landscape'
-            defaultStyle: {
-              font: 'Roboto'              // default is 'Roboto', for arabic font set this option to 'Mirza' and include mirza_fonts.js
-            }
-          },
-          fonts: {}
-        },
-        tbodySelector:     'tr',
-        tfootSelector:     'tr',          // set empty ('') to prevent export of tfoot rows
-        theadSelector:     'tr',
-        tableName:         'Table',
-        type:              'csv',         // 'csv', 'tsv', 'txt', 'sql', 'json', 'xml', 'excel', 'doc', 'png' or 'pdf'
-        worksheetName:     ''
-      };
-
-      var FONT_ROW_RATIO = 1.15;
-      var el             = this;
-      var DownloadEvt    = null;
-      var $hrows         = [];
-      var $rows          = [];
-      var rowIndex       = 0;
-      var trData         = '';
-      var colNames       = [];
-      var ranges         = [];
-      var blob;
-      var $hiddenTableElements = [];
-      var checkCellVisibilty = false;
-
-      $.extend(true, defaults, options);
-
-      colNames = GetColumnNames(el);
-
-      if ( defaults.type == 'csv' || defaults.type == 'tsv' || defaults.type == 'txt' ) {
-
-        var csvData   = "";
-        var rowlength = 0;
-        ranges        = [];
-        rowIndex      = 0;
-
-        function csvString (cell, rowIndex, colIndex) {
-          var result = '';
-
-          if ( cell !== null ) {
-            var dataString = parseString(cell, rowIndex, colIndex);
-
-            var csvValue = (dataString === null || dataString === '') ? '' : dataString.toString();
-
-            if ( defaults.type == 'tsv' ) {
-              if ( dataString instanceof Date )
-                dataString.toLocaleString();
-
-              // According to http://www.iana.org/assignments/media-types/text/tab-separated-values
-              // are fields that contain tabs not allowable in tsv encoding
-              result = replaceAll(csvValue, '\t', ' ');
-            }
-            else {
-              // Takes a string and encapsulates it (by default in double-quotes) if it
-              // contains the csv field separator, spaces, or linebreaks.
-              if ( dataString instanceof Date )
-                result = defaults.csvEnclosure + dataString.toLocaleString() + defaults.csvEnclosure;
-              else {
-                result = replaceAll(csvValue, defaults.csvEnclosure, defaults.csvEnclosure + defaults.csvEnclosure);
-
-                if ( result.indexOf(defaults.csvSeparator) >= 0 || /[\r\n ]/g.test(result) )
-                  result = defaults.csvEnclosure + result + defaults.csvEnclosure;
-              }
-            }
-          }
-
-          return result;
-        }
-
-        var CollectCsvData = function ($rows, rowselector, length) {
-
-          $rows.each(function () {
-            trData = "";
-            ForEachVisibleCell(this, rowselector, rowIndex, length + $rows.length,
-              function (cell, row, col) {
-                trData += csvString(cell, row, col) + (defaults.type == 'tsv' ? '\t' : defaults.csvSeparator);
-              });
-            trData = $.trim(trData).substring(0, trData.length - 1);
-            if ( trData.length > 0 ) {
-
-              if ( csvData.length > 0 )
-                csvData += "\n";
-
-              csvData += trData;
-            }
-            rowIndex++;
-          });
-
-          return $rows.length;
-        };
-
-        rowlength += CollectCsvData($(el).find('thead').first().find(defaults.theadSelector), 'th,td', rowlength);
-        findTablePart($(el),'tbody').each(function () {
-          rowlength += CollectCsvData(findRows($(this), defaults.tbodySelector), 'td,th', rowlength);
-        });
-        if ( defaults.tfootSelector.length )
-          CollectCsvData($(el).find('tfoot').first().find(defaults.tfootSelector), 'td,th', rowlength);
-
-        csvData += "\n";
-
-        //output
-        if ( defaults.consoleLog === true )
-          console.log(csvData);
-
-        if ( defaults.outputMode === 'string' )
-          return csvData;
-
-        if ( defaults.outputMode === 'base64' )
-          return base64encode(csvData);
-
-        if ( defaults.outputMode === 'window' ) {
-          downloadFile(false, 'data:text/' + (defaults.type == 'csv' ? 'csv' : 'plain') + ';charset=utf-8,', csvData);
-          return;
-        }
-
-        try {
-          blob = new Blob([csvData], {type: "text/" + (defaults.type == 'csv' ? 'csv' : 'plain') + ";charset=utf-8"});
-          saveAs(blob, defaults.fileName + '.' + defaults.type, (defaults.type != 'csv' || defaults.csvUseBOM === false));
-        }
-        catch (e) {
-          downloadFile(defaults.fileName + '.' + defaults.type,
-            'data:text/' + (defaults.type == 'csv' ? 'csv' : 'plain') + ';charset=utf-8,' + ((defaults.type == 'csv' && defaults.csvUseBOM) ? '\ufeff' : ''),
-            csvData);
-        }
-
-      } else if ( defaults.type == 'sql' ) {
-
-        // Header
-        rowIndex = 0;
-        ranges   = [];
-        var tdData = "INSERT INTO `" + defaults.tableName + "` (";
-        $hrows     = $(el).find('thead').first().find(defaults.theadSelector);
-        $hrows.each(function () {
-          ForEachVisibleCell(this, 'th,td', rowIndex, $hrows.length,
-            function (cell, row, col) {
-              tdData += "'" + parseString(cell, row, col) + "',";
-            });
-          rowIndex++;
-          tdData = $.trim(tdData).substring(0, tdData.length - 1);
-        });
-        tdData += ") VALUES ";
-
-        // Data
-        $rows = collectRows ($(el));
-        $($rows).each(function () {
-          trData = "";
-          ForEachVisibleCell(this, 'td,th', rowIndex, $hrows.length + $rows.length,
-            function (cell, row, col) {
-              trData += "'" + parseString(cell, row, col) + "',";
-            });
-          if ( trData.length > 3 ) {
-            tdData += "(" + trData;
-            tdData = $.trim(tdData).substring(0, tdData.length - 1);
-            tdData += "),";
-          }
-          rowIndex++;
-        });
-
-        tdData = $.trim(tdData).substring(0, tdData.length - 1);
-        tdData += ";";
-
-        // Output
-        if ( defaults.consoleLog === true )
-          console.log(tdData);
-
-        if ( defaults.outputMode === 'string' )
-          return tdData;
-
-        if ( defaults.outputMode === 'base64' )
-          return base64encode(tdData);
-
-        try {
-          blob = new Blob([tdData], {type: "text/plain;charset=utf-8"});
-          saveAs(blob, defaults.fileName + '.sql');
-        }
-        catch (e) {
-          downloadFile(defaults.fileName + '.sql',
-            'data:application/sql;charset=utf-8,',
-            tdData);
-        }
-
-      } else if ( defaults.type == 'json' ) {
-        var jsonHeaderArray = [];
-        ranges = [];
-        $hrows = $(el).find('thead').first().find(defaults.theadSelector);
-        $hrows.each(function () {
-          var jsonArrayTd = [];
-
-          ForEachVisibleCell(this, 'th,td', rowIndex, $hrows.length,
-            function (cell, row, col) {
-              jsonArrayTd.push(parseString(cell, row, col));
-            });
-          jsonHeaderArray.push(jsonArrayTd);
-        });
-
-        // Data
-        var jsonArray = [];
-
-        $rows = collectRows ($(el));
-        $($rows).each(function () {
-          var jsonObjectTd = {};
-          var colIndex = 0;
-
-          ForEachVisibleCell(this, 'td,th', rowIndex, $hrows.length + $rows.length,
-            function (cell, row, col) {
-              if ( jsonHeaderArray.length ) {
-                jsonObjectTd[jsonHeaderArray[jsonHeaderArray.length - 1][colIndex]] = parseString(cell, row, col);
-              } else {
-                jsonObjectTd[colIndex] = parseString(cell, row, col);
-              }
-              colIndex++;
-            });
-          if ( $.isEmptyObject(jsonObjectTd) === false )
-            jsonArray.push(jsonObjectTd);
-
-          rowIndex++;
-        });
-
-        var sdata = "";
-
-        if ( defaults.jsonScope == 'head' )
-          sdata = JSON.stringify(jsonHeaderArray);
-        else if ( defaults.jsonScope == 'data' )
-          sdata = JSON.stringify(jsonArray);
-        else // all
-          sdata = JSON.stringify({header: jsonHeaderArray, data: jsonArray});
-
-        if ( defaults.consoleLog === true )
-          console.log(sdata);
-
-        if ( defaults.outputMode === 'string' )
-          return sdata;
-
-        if ( defaults.outputMode === 'base64' )
-          return base64encode(sdata);
-
-        try {
-          blob = new Blob([sdata], {type: "application/json;charset=utf-8"});
-          saveAs(blob, defaults.fileName + '.json');
-        }
-        catch (e) {
-          downloadFile(defaults.fileName + '.json',
-            'data:application/json;charset=utf-8;base64,',
-            sdata);
-        }
-
-      } else if ( defaults.type === 'xml' ) {
-        rowIndex = 0;
-        ranges   = [];
-        var xml  = '<?xml version="1.0" encoding="utf-8"?>';
-        xml += '<tabledata><fields>';
-
-        // Header
-        $hrows = $(el).find('thead').first().find(defaults.theadSelector);
-        $hrows.each(function () {
-
-          ForEachVisibleCell(this, 'th,td', rowIndex, $hrows.length,
-            function (cell, row, col) {
-              xml += "<field>" + parseString(cell, row, col) + "</field>";
-            });
-          rowIndex++;
-        });
-        xml += '</fields><data>';
-
-        // Data
-        var rowCount = 1;
-
-        $rows = collectRows ($(el));
-        $($rows).each(function () {
-          var colCount = 1;
-          trData       = "";
-          ForEachVisibleCell(this, 'td,th', rowIndex, $hrows.length + $rows.length,
-            function (cell, row, col) {
-              trData += "<column-" + colCount + ">" + parseString(cell, row, col) + "</column-" + colCount + ">";
-              colCount++;
-            });
-          if ( trData.length > 0 && trData != "<column-1></column-1>" ) {
-            xml += '<row id="' + rowCount + '">' + trData + '</row>';
-            rowCount++;
-          }
-
-          rowIndex++;
-        });
-        xml += '</data></tabledata>';
-
-        // Output
-        if ( defaults.consoleLog === true )
-          console.log(xml);
-
-        if ( defaults.outputMode === 'string' )
-          return xml;
-
-        if ( defaults.outputMode === 'base64' )
-          return base64encode(xml);
-
-        try {
-          blob = new Blob([xml], {type: "application/xml;charset=utf-8"});
-          saveAs(blob, defaults.fileName + '.xml');
-        }
-        catch (e) {
-          downloadFile(defaults.fileName + '.xml',
-            'data:application/xml;charset=utf-8;base64,',
-            xml);
-        }
-      }
-      else if ( defaults.type === 'excel' && defaults.excelFileFormat === 'xmlss' ) {
-        var docDatas = [];
-        var docNames = [];
-
-        $(el).filter(function () {
-          return isVisible($(this));
-        }).each(function () {
-          var $table  = $(this);
-
-          var ssName = '';
-          if ( typeof defaults.worksheetName === 'string' && defaults.worksheetName.length )
-            ssName = defaults.worksheetName + ' ' + (docNames.length + 1);
-          else if ( typeof defaults.worksheetName[docNames.length] !== 'undefined' )
-            ssName = defaults.worksheetName[docNames.length];
-          if ( ! ssName.length )
-            ssName = $table.find('caption').text() || '';
-          if ( ! ssName.length )
-            ssName = 'Table ' + (docNames.length + 1);
-          ssName = $.trim(ssName.replace(/[\\\/[\]*:?'"]/g,'').substring(0,31));
-
-          docNames.push($('<div />').text(ssName).html());
-
-          if ( defaults.exportHiddenCells === false ) {
-            $hiddenTableElements = $table.find("tr, th, td").filter(":hidden");
-            checkCellVisibilty = $hiddenTableElements.length > 0;
-          }
-
-          rowIndex = 0;
-          colNames = GetColumnNames(this);
-          docData  = '<Table>\r';
-
-          function CollectXmlssData ($rows, rowselector, length) {
-            var spans = [];
-
-            $($rows).each(function () {
-              var ssIndex = 0;
-              var nCols = 0;
-              trData   = "";
-
-              ForEachVisibleCell(this, 'td,th', rowIndex, length + $rows.length,
-                function (cell, row, col) {
-                  if ( cell !== null ) {
-                    var style = "";
-                    var data  = parseString(cell, row, col);
-                    var type  = "String";
-
-                    if ( jQuery.isNumeric(data) !== false ) {
-                      type = "Number";
-                    }
-                    else {
-                      var number = parsePercent(data);
-                      if ( number !== false ) {
-                        data  = number;
-                        type  = "Number";
-                        style += ' ss:StyleID="pct1"';
-                      }
-                    }
-
-                    if ( type !== "Number" )
-                      data = data.replace(/\n/g, '<br>');
-
-                    var colspan = parseInt(cell.getAttribute('colspan'));
-                    var rowspan = parseInt(cell.getAttribute('rowspan'));
-
-                    // Skip spans
-                    $.each(spans, function () {
-                      var range = this;
-                      if ( rowIndex >= range.s.r && rowIndex <= range.e.r && nCols >= range.s.c && nCols <= range.e.c ) {
-                        for ( var i = 0; i <= range.e.c - range.s.c; ++i ) {
-                          nCols++;
-                          ssIndex++;
-                        }
-                      }
-                    });
-
-                    // Handle Row Span
-                    if ( rowspan || colspan ) {
-                      rowspan = rowspan || 1;
-                      colspan = colspan || 1;
-                      spans.push({
-                        s: {r: rowIndex, c: nCols},
-                        e: {r: rowIndex + rowspan - 1, c: nCols + colspan - 1}
-                      });
-                    }
-
-                    // Handle Colspan
-                    if ( colspan > 1 ) {
-                      style += ' ss:MergeAcross="' + (colspan-1) + '"';
-                      nCols += (colspan - 1);
-                    }
-
-                    if ( rowspan > 1 ) {
-                      style += ' ss:MergeDown="' + (rowspan-1) + '" ss:StyleID="rsp1"';
-                    }
-
-                    if ( ssIndex > 0 ) {
-                      style += ' ss:Index="' + (nCols+1) + '"';
-                      ssIndex = 0;
-                    }
-
-                    trData += '<Cell' + style + '><Data ss:Type="' + type + '">' +
-                      $('<div />').text(data).html() +
-                      '</Data></Cell>\r';
-                    nCols++;
-                  }
-                });
-              if ( trData.length > 0 )
-                docData += '<Row ss:AutoFitHeight="0">\r' + trData + '</Row>\r';
-              rowIndex++;
-            });
-
-            return $rows.length;
-          }
-
-          var rowLength = 0;
-          rowLength += CollectXmlssData ($table.find('thead').first().find(defaults.theadSelector), 'th,td', rowLength);
-          CollectXmlssData (collectRows ($table), 'td,th', rowLength);
-
-          docData += '</Table>\r';
-          docDatas.push(docData);
-
-          if ( defaults.consoleLog === true )
-            console.log(docData);
-        });
-
-        var count = {};
-        var firstOccurences = {};
-        var item, itemCount;
-        for (var n = 0, c = docNames.length; n < c; n++)
-        {
-          item = docNames[n];
-          itemCount = count[item];
-          itemCount = count[item] = (itemCount == null ? 1 : itemCount + 1);
-
-          if( itemCount == 2 )
-            docNames[firstOccurences[item]] = docNames[firstOccurences[item]].substring(0,29) + "-1";
-          if( count[ item ] > 1 )
-            docNames[n] = docNames[n].substring(0,29) + "-" + count[item];
-          else
-            firstOccurences[item] = n;
-        }
-
-        var CreationDate = new Date().toISOString();
-        var xmlssDocFile = '<?xml version="1.0" encoding="UTF-8"?>\r' +
-                           '<?mso-application progid="Excel.Sheet"?>\r' +
-                           '<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"\r' +
-                           ' xmlns:o="urn:schemas-microsoft-com:office:office"\r' +
-                           ' xmlns:x="urn:schemas-microsoft-com:office:excel"\r' +
-                           ' xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"\r' +
-                           ' xmlns:html="http://www.w3.org/TR/REC-html40">\r' +
-                              '<DocumentProperties xmlns="urn:schemas-microsoft-com:office:office">\r' +
-                              '  <Created>' + CreationDate + '</Created>\r' +
-                              '</DocumentProperties>\r' +
-                              '<OfficeDocumentSettings xmlns="urn:schemas-microsoft-com:office:office">\r' +
-                              '  <AllowPNG/>\r' +
-                              '</OfficeDocumentSettings>\r' +
-                              '<ExcelWorkbook xmlns="urn:schemas-microsoft-com:office:excel">\r' +
-                              '  <WindowHeight>9000</WindowHeight>\r' +
-                              '  <WindowWidth>13860</WindowWidth>\r' +
-                              '  <WindowTopX>0</WindowTopX>\r' +
-                              '  <WindowTopY>0</WindowTopY>\r' +
-                              '  <ProtectStructure>False</ProtectStructure>\r' +
-                              '  <ProtectWindows>False</ProtectWindows>\r' +
-                              '</ExcelWorkbook>\r' +
-                              '<Styles>\r' +
-                              '  <Style ss:ID="Default" ss:Name="Normal">\r' +
-                              '    <Alignment ss:Vertical="Bottom"/>\r' +
-                              '    <Borders/>\r' +
-                              '    <Font/>\r' +
-                              '    <Interior/>\r' +
-                              '    <NumberFormat/>\r' +
-                              '    <Protection/>\r' +
-                              '  </Style>\r' +
-                              '  <Style ss:ID="rsp1">\r' +
-                              '    <Alignment ss:Vertical="Center"/>\r' +
-                              '  </Style>\r' +
-                              '  <Style ss:ID="pct1">\r' +
-                              '    <NumberFormat ss:Format="Percent"/>\r' +
-                              '  </Style>\r' +
-                              '</Styles>\r';
-
-        for ( var j = 0; j < docDatas.length; j++ ) {
-          xmlssDocFile += '<Worksheet ss:Name="' + docNames[j] + '" ss:RightToLeft="' + (defaults.excelRTL ? '1' : '0') + '">\r' +
-                            docDatas[j];
-          if (defaults.excelRTL) {
-            xmlssDocFile += '<WorksheetOptions xmlns="urn:schemas-microsoft-com:office:excel">\r' +
-                              '<DisplayRightToLeft/>\r' +
-                            '</WorksheetOptions>\r';
-          }
-          else
-            xmlssDocFile += '<WorksheetOptions xmlns="urn:schemas-microsoft-com:office:excel"/>\r';
-          xmlssDocFile += '</Worksheet>\r';
-        }
-
-        xmlssDocFile += '</Workbook>\r';
-
-        if ( defaults.consoleLog === true )
-          console.log(xmlssDocFile);
-
-        if ( defaults.outputMode === 'string' )
-          return xmlssDocFile;
-
-        if ( defaults.outputMode === 'base64' )
-          return base64encode(xmlssDocFile);
-
-        try {
-          blob = new Blob([xmlssDocFile], {type: "application/xml;charset=utf-8"});
-          saveAs(blob, defaults.fileName + '.xml');
-        }
-        catch (e) {
-          downloadFile(defaults.fileName + '.xml',
-            'data:application/xml;charset=utf-8;base64,',
-            xmlssDocFile);
-        }
-      }
-      else if ( defaults.type == 'excel' || defaults.type == 'xls' || defaults.type == 'word' || defaults.type == 'doc' ) {
-
-        var MSDocType   = (defaults.type == 'excel' || defaults.type == 'xls') ? 'excel' : 'word';
-        var MSDocExt    = (MSDocType == 'excel') ? 'xls' : 'doc';
-        var MSDocSchema = 'xmlns:x="urn:schemas-microsoft-com:office:' + MSDocType + '"';
-        var docData     = '';
-        var docName     = '';
-
-        $(el).filter(function () {
-          return isVisible($(this));
-        }).each(function () {
-          var $table = $(this);
-
-          if (docName === '') {
-            docName = defaults.worksheetName || $table.find('caption').text() || 'Table';
-            docName = $.trim(docName.replace(/[\\\/[\]*:?'"]/g, '').substring(0, 31));
-          }
-
-          if ( defaults.exportHiddenCells === false ) {
-            $hiddenTableElements = $table.find("tr, th, td").filter(":hidden");
-            checkCellVisibilty = $hiddenTableElements.length > 0;
-          }
-
-          rowIndex = 0;
-          ranges   = [];
-          colNames = GetColumnNames(this);
-
-          // Header
-          docData += '<table><thead>';
-          $hrows = $table.find('thead').first().find(defaults.theadSelector);
-          $hrows.each(function () {
-            trData = "";
-            ForEachVisibleCell(this, 'th,td', rowIndex, $hrows.length,
-              function (cell, row, col) {
-                if ( cell !== null ) {
-                  var thstyle = '';
-                  trData += '<th';
-                  for ( var styles in defaults.excelstyles ) {
-                    if ( defaults.excelstyles.hasOwnProperty(styles) ) {
-                      var thcss = $(cell).css(defaults.excelstyles[styles]);
-                      if ( thcss !== '' && thcss != '0px none rgb(0, 0, 0)' && thcss != 'rgba(0, 0, 0, 0)' ) {
-                        thstyle += (thstyle === '') ? 'style="' : ';';
-                        thstyle += defaults.excelstyles[styles] + ':' + thcss;
-                      }
-                    }
-                  }
-                  if ( thstyle !== '' )
-                    trData += ' ' + thstyle + '"';
-
-                  var tdcolspan = $(cell).data("tableexport-colspan");
-                  if ( typeof tdcolspan == 'undefined' && $(cell).is("[colspan]") )
-                    tdcolspan = $(cell).attr('colspan');
-                  if ( typeof tdcolspan !== 'undefined' && tdcolspan !== '' )
-                    trData += ' colspan="' + tdcolspan + '"';
-                    
-                  var tdrowspan = $(cell).data("tableexport-rowspan");
-                  if ( typeof tdrowspan == 'undefined' && $(cell).is("[rowspan]") )
-                    tdrowspan = $(cell).attr('rowspan');
-                  if ( typeof tdrowspan !== 'undefined' && tdrowspan !== '' )
-                    trData += ' rowspan="' + tdrowspan + '"';
-
-                  trData += '>' + parseString(cell, row, col) + '</th>';
-                }
-              });
-            if ( trData.length > 0 )
-              docData += '<tr>' + trData + '</tr>';
-            rowIndex++;
-          });
-          docData += '</thead><tbody>';
-
-          // Data
-          $rows = collectRows ($table);
-          $($rows).each(function () {
-            var $row = $(this);
-            trData   = "";
-            ForEachVisibleCell(this, 'td,th', rowIndex, $hrows.length + $rows.length,
-              function (cell, row, col) {
-                if ( cell !== null ) {
-                  var tdvalue = parseString(cell, row, col);
-                  var tdstyle = '';
-                  var tdcss   = $(cell).data("tableexport-msonumberformat");
-
-                  if ( typeof tdcss == 'undefined' && typeof defaults.onMsoNumberFormat === 'function' )
-                    tdcss = defaults.onMsoNumberFormat(cell, row, col);
-
-                  if ( typeof tdcss != 'undefined' && tdcss !== '' )
-                    tdstyle = 'style="mso-number-format:\'' + tdcss + '\'';
-
-                  for ( var cssStyle in defaults.excelstyles ) {
-                    if ( defaults.excelstyles.hasOwnProperty(cssStyle) ) {
-                      tdcss = $(cell).css(defaults.excelstyles[cssStyle]);
-                      if ( tdcss === '' )
-                        tdcss = $row.css(defaults.excelstyles[cssStyle]);
-
-                      if ( tdcss !== '' && tdcss != '0px none rgb(0, 0, 0)' && tdcss != 'rgba(0, 0, 0, 0)' ) {
-                        tdstyle += (tdstyle === '') ? 'style="' : ';';
-                        tdstyle += defaults.excelstyles[cssStyle] + ':' + tdcss;
-                      }
-                    }
-                  }
-                  trData += '<td';
-                  if ( tdstyle !== '' )
-                    trData += ' ' + tdstyle + '"';
-
-                  var tdcolspan = $(cell).data("tableexport-colspan");
-                  if ( typeof tdcolspan == 'undefined' && $(cell).is("[colspan]") )
-                    tdcolspan = $(cell).attr('colspan');
-                  if ( typeof tdcolspan !== 'undefined' && tdcolspan !== '' )
-                    trData += ' colspan="' + tdcolspan + '"';
-                    
-                  var tdrowspan = $(cell).data("tableexport-rowspan");
-                  if ( typeof tdrowspan == 'undefined' && $(cell).is("[rowspan]") )
-                    tdrowspan = $(cell).attr('rowspan');
-                  if ( typeof tdrowspan !== 'undefined' && tdrowspan !== '' )
-                    trData += ' rowspan="' + tdrowspan + '"';
-
-                  if ( typeof tdvalue === 'string' && tdvalue != '' )
-                    tdvalue = tdvalue.replace(/\n/g, '<br>');
-
-                  trData += '>' + tdvalue + '</td>';
-                }
-              });
-            if ( trData.length > 0 )
-              docData += '<tr>' + trData + '</tr>';
-            rowIndex++;
-          });
-
-          if ( defaults.displayTableName )
-            docData += '<tr><td></td></tr><tr><td></td></tr><tr><td>' + parseString($('<p>' + defaults.tableName + '</p>')) + '</td></tr>';
-
-          docData += '</tbody></table>';
-
-          if ( defaults.consoleLog === true )
-            console.log(docData);
-        });
-
-        //noinspection XmlUnusedNamespaceDeclaration
-        var docFile = '<html xmlns:o="urn:schemas-microsoft-com:office:office" ' + MSDocSchema + ' xmlns="http://www.w3.org/TR/REC-html40">';
-        docFile += '<meta http-equiv="content-type" content="application/vnd.ms-' + MSDocType + '; charset=UTF-8">';
-        docFile += "<head>";
-        if (MSDocType === 'excel') {
-          docFile += "<!--[if gte mso 9]>";
-          docFile += "<xml>";
-          docFile += "<x:ExcelWorkbook>";
-          docFile += "<x:ExcelWorksheets>";
-          docFile += "<x:ExcelWorksheet>";
-          docFile += "<x:Name>";
-          docFile += docName;
-          docFile += "</x:Name>";
-          docFile += "<x:WorksheetOptions>";
-          docFile += "<x:DisplayGridlines/>";
-          if (defaults.excelRTL)
-            docFile += "<x:DisplayRightToLeft/>";
-          docFile += "</x:WorksheetOptions>";
-          docFile += "</x:ExcelWorksheet>";
-          docFile += "</x:ExcelWorksheets>";
-          docFile += "</x:ExcelWorkbook>";
-          docFile += "</xml>";
-          docFile += "<![endif]-->";
-        }
-        docFile += "<style>br {mso-data-placement:same-cell;}</style>";
-        docFile += "</head>";
-        docFile += "<body>";
-        docFile += docData;
-        docFile += "</body>";
-        docFile += "</html>";
-
-        if ( defaults.consoleLog === true )
-          console.log(docFile);
-
-        if ( defaults.outputMode === 'string' )
-          return docFile;
-
-        if ( defaults.outputMode === 'base64' )
-          return base64encode(docFile);
-
-        try {
-          blob = new Blob([docFile], {type: 'application/vnd.ms-' + defaults.type});
-          saveAs(blob, defaults.fileName + '.' + MSDocExt);
-        }
-        catch (e) {
-          downloadFile(defaults.fileName + '.' + MSDocExt,
-                       'data:application/vnd.ms-' + MSDocType + ';base64,',
-                       docFile);
-        }
-
-      } else if ( defaults.type == 'xlsx' ) {
-
-        var data  = [];
-        var spans = [];
-        rowIndex  = 0;
-
-        $rows = $(el).find('thead').first().find(defaults.theadSelector).toArray();
-        $rows.push.apply($rows, collectRows ($(el)));
-
-        $($rows).each(function () {
-          var cols = [];
-          ForEachVisibleCell(this, 'th,td', rowIndex, $rows.length,
-            function (cell, row, col) {
-              if ( typeof cell !== 'undefined' && cell !== null ) {
-
-                var cellValue = parseString(cell, row, col);
-
-                var colspan = parseInt(cell.getAttribute('colspan'));
-                var rowspan = parseInt(cell.getAttribute('rowspan'));
-
-                // Skip span ranges
-                $.each(spans, function () {
-                  var range = this;
-                  if ( rowIndex >= range.s.r && rowIndex <= range.e.r && cols.length >= range.s.c && cols.length <= range.e.c ) {
-                    for ( var i = 0; i <= range.e.c - range.s.c; ++i )
-                      cols.push(null);
-                  }
-                });
-
-                // Handle Row Span
-                if ( rowspan || colspan ) {
-                  rowspan = rowspan || 1;
-                  colspan = colspan || 1;
-                  spans.push({
-                    s: {r: rowIndex, c: cols.length},
-                    e: {r: rowIndex + rowspan - 1, c: cols.length + colspan - 1}
-                  });
-                }
-
-                // Handle Value
-                if ( typeof defaults.onCellData !== 'function' ) {
-
-                  // Type conversion
-                  if ( cellValue !== "" && cellValue == +cellValue )
-                    cellValue = +cellValue;
-                }
-                cols.push(cellValue !== "" ? cellValue : null);
-
-                // Handle Colspan
-                if ( colspan )
-                  for ( var k = 0; k < colspan - 1; ++k )
-                    cols.push(null);
-              }
-            });
-          data.push(cols);
-          rowIndex++;
-        });
-
-        //noinspection JSPotentiallyInvalidConstructorUsage
-        var wb = new jx_Workbook(),
-            ws = jx_createSheet(data);
-
-        // add span ranges to worksheet
-        ws['!merges'] = spans;
-
-        // add worksheet to workbook
-        wb.SheetNames.push(defaults.worksheetName);
-        wb.Sheets[defaults.worksheetName] = ws;
-
-        var wbout = XLSX.write(wb, {bookType: defaults.type, bookSST: false, type: 'binary'});
-
-        try {
-          blob = new Blob([jx_s2ab(wbout)], {type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=UTF-8'});
-          saveAs(blob, defaults.fileName + '.' + defaults.type);
-        }
-        catch (e) {
-          downloadFile(defaults.fileName + '.' + defaults.type,
-            'data:application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=UTF-8,',
-            jx_s2ab(wbout));
-        }
-
-      } else if ( defaults.type == 'png' ) {
-        //html2canvas($(el)[0], {
-        //  onrendered: function (canvas) {
-        html2canvas($(el)[0]).then(
-          function (canvas) {
-
-            var image      = canvas.toDataURL();
-            var byteString = atob(image.substring(22)); // remove data stuff
-            var buffer     = new ArrayBuffer(byteString.length);
-            var intArray   = new Uint8Array(buffer);
-
-            for ( var i = 0; i < byteString.length; i++ )
-              intArray[i] = byteString.charCodeAt(i);
-
-            if ( defaults.consoleLog === true )
-              console.log(byteString);
-
-            if ( defaults.outputMode === 'string' )
-              return byteString;
-
-            if ( defaults.outputMode === 'base64' )
-              return base64encode(image);
-
-            if ( defaults.outputMode === 'window' ) {
-              window.open(image);
-              return;
-            }
-
-            try {
-              blob = new Blob([buffer], {type: "image/png"});
-              saveAs(blob, defaults.fileName + '.png');
-            }
-            catch (e) {
-              downloadFile(defaults.fileName + '.png', 'data:image/png,', blob);
-            }
-            //}
-          });
-
-      } else if ( defaults.type == 'pdf' ) {
-
-        if ( defaults.pdfmake.enabled === true ) {
-          // pdf output using pdfmake
-          // https://github.com/bpampuch/pdfmake
-
-          var widths = [];
-          var body   = [];
-          rowIndex   = 0;
-          ranges     = [];
-
-          var CollectPdfmakeData = function ($rows, colselector, length) {
-            var rlength = 0;
-
-            $($rows).each(function () {
-              var r = [];
-
-              ForEachVisibleCell(this, colselector, rowIndex, length,
-                function (cell, row, col) {
-                  if ( typeof cell !== 'undefined' && cell !== null ) {
-
-                    var colspan = parseInt(cell.getAttribute('colspan'));
-                    var rowspan = parseInt(cell.getAttribute('rowspan'));
-
-                    var cellValue = parseString(cell, row, col) || " ";
-
-                    if ( colspan > 1 || rowspan > 1 ) {
-                      colspan = colspan || 1;
-                      rowspan = rowspan || 1;
-                      r.push({colSpan: colspan, rowSpan: rowspan, text: cellValue});
-                    }
-                    else
-                      r.push(cellValue);
-                  }
-                  else
-                    r.push(" ");
-                });
-
-              if ( r.length )
-                body.push(r);
-
-              if ( rlength < r.length )
-                rlength = r.length;
-
-              rowIndex++;
-            });
-
-            return rlength;
-          };
-
-          $hrows = $(this).find('thead').first().find(defaults.theadSelector);
-
-          var colcount = CollectPdfmakeData($hrows, 'th,td', $hrows.length);
-
-          for ( var i = widths.length; i < colcount; i++ )
-            widths.push("*");
-
-          // Data
-          $rows = collectRows ($(this));
-
-          CollectPdfmakeData($rows, 'th,td', $hrows.length + $rows.length);
-
-          var docDefinition = {
-            content: [{
-              table: {
-                headerRows: $hrows.length,
-                widths:     widths,
-                body:       body
-              }
-            }]
-          };
-
-          $.extend(true, docDefinition, defaults.pdfmake.docDefinition);
-
-          pdfMake.fonts = {
-            Roboto: {
-              normal:      'Roboto-Regular.ttf',
-              bold:        'Roboto-Medium.ttf',
-              italics:     'Roboto-Italic.ttf',
-              bolditalics: 'Roboto-MediumItalic.ttf'
-            }
-          };
-
-          $.extend(true, pdfMake.fonts, defaults.pdfmake.fonts);
-
-          pdfMake.createPdf(docDefinition).getBuffer(function (buffer) {
-
-            try {
-              var blob = new Blob([buffer], {type: "application/pdf"});
-              saveAs(blob, defaults.fileName + '.pdf');
-            }
-            catch (e) {
-              downloadFile(defaults.fileName + '.pdf',
-                'data:application/pdf;base64,',
-                buffer);
-            }
-          });
-
-        }
-        else if ( defaults.jspdf.autotable === false ) {
-          // pdf output using jsPDF's core html support
-
-          var addHtmlOptions = {
-            dim:       {
-              w: getPropertyUnitValue($(el).first().get(0), 'width', 'mm'),
-              h: getPropertyUnitValue($(el).first().get(0), 'height', 'mm')
-            },
-            pagesplit: false
-          };
-
-          var doc = new jsPDF(defaults.jspdf.orientation, defaults.jspdf.unit, defaults.jspdf.format);
-          doc.addHTML($(el).first(),
-            defaults.jspdf.margins.left,
-            defaults.jspdf.margins.top,
-            addHtmlOptions,
-            function () {
-              jsPdfOutput(doc, false);
-            });
-          //delete doc;
-        }
-        else {
-          // pdf output using jsPDF AutoTable plugin
-          // https://github.com/simonbengtsson/jsPDF-AutoTable
-
-          var teOptions = defaults.jspdf.autotable.tableExport;
-
-          // When setting jspdf.format to 'bestfit' tableExport tries to choose
-          // the minimum required paper format and orientation in which the table
-          // (or tables in multitable mode) completely fits without column adjustment
-          if ( typeof defaults.jspdf.format === 'string' && defaults.jspdf.format.toLowerCase() === 'bestfit' ) {
-            var pageFormats = {
-              '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]
-            };
-            var rk = '', ro = '';
-            var mw = 0;
-
-            $(el).each(function () {
-              if ( isVisible($(this)) ) {
-                var w = getPropertyUnitValue($(this).get(0), 'width', 'pt');
-
-                if ( w > mw ) {
-                  if ( w > pageFormats.a0[0] ) {
-                    rk = 'a0';
-                    ro = 'l';
-                  }
-                  for ( var key in pageFormats ) {
-                    if ( pageFormats.hasOwnProperty(key) ) {
-                      if ( pageFormats[key][1] > w ) {
-                        rk = key;
-                        ro = 'l';
-                        if ( pageFormats[key][0] > w )
-                          ro = 'p';
-                      }
-                    }
-                  }
-                  mw = w;
-                }
-              }
-            });
-            defaults.jspdf.format      = (rk === '' ? 'a4' : rk);
-            defaults.jspdf.orientation = (ro === '' ? 'w' : ro);
-          }
-
-          // The jsPDF doc object is stored in defaults.jspdf.autotable.tableExport,
-          // thus it can be accessed from any callback function
-          if ( teOptions.doc == null ) {
-            teOptions.doc = new jsPDF(defaults.jspdf.orientation,
-              defaults.jspdf.unit,
-              defaults.jspdf.format);
-
-            if ( typeof defaults.jspdf.onDocCreated === 'function' )
-              defaults.jspdf.onDocCreated(teOptions.doc);
-          }
-
-          if ( teOptions.outputImages === true )
-            teOptions.images = {};
-
-          if ( typeof teOptions.images != 'undefined' ) {
-            $(el).filter(function () {
-              return isVisible($(this));
-            }).each(function () {
-              var rowCount = 0;
-              ranges       = [];
-
-              if ( defaults.exportHiddenCells === false ) {
-                $hiddenTableElements = $(this).find("tr, th, td").filter(":hidden");
-                checkCellVisibilty = $hiddenTableElements.length > 0;
-              }
-
-              $hrows = $(this).find('thead').find(defaults.theadSelector);
-              $rows = collectRows ($(this));
-
-              $($rows).each(function () {
-                ForEachVisibleCell(this, 'td,th', $hrows.length + rowCount, $hrows.length + $rows.length,
-                  function (cell) {
-                    if ( typeof cell !== 'undefined' && cell !== null ) {
-                      var kids = $(cell).children();
-                      if ( typeof kids != 'undefined' && kids.length > 0 )
-                        collectImages(cell, kids, teOptions);
-                    }
-                  });
-                rowCount++;
-              });
-            });
-
-            $hrows = [];
-            $rows  = [];
-          }
-
-          loadImages(teOptions, function () {
-            $(el).filter(function () {
-              return isVisible($(this));
-            }).each(function () {
-              var colKey;
-              rowIndex = 0;
-              ranges   = [];
-
-              if ( defaults.exportHiddenCells === false ) {
-                $hiddenTableElements = $(this).find("tr, th, td").filter(":hidden");
-                checkCellVisibilty = $hiddenTableElements.length > 0;
-              }
-
-              colNames = GetColumnNames(this);
-
-              teOptions.columns    = [];
-              teOptions.rows       = [];
-              teOptions.rowoptions = {};
-
-              // onTable: optional callback function for every matching table that can be used
-              // to modify the tableExport options or to skip the output of a particular table
-              // if the table selector targets multiple tables
-              if ( typeof teOptions.onTable === 'function' )
-                if ( teOptions.onTable($(this), defaults) === false )
-                  return true; // continue to next iteration step (table)
-
-              // each table works with an own copy of AutoTable options
-              defaults.jspdf.autotable.tableExport = null;  // avoid deep recursion error
-              var atOptions                        = $.extend(true, {}, defaults.jspdf.autotable);
-              defaults.jspdf.autotable.tableExport = teOptions;
-
-              atOptions.margin = {};
-              $.extend(true, atOptions.margin, defaults.jspdf.margins);
-              atOptions.tableExport = teOptions;
-
-              // Fix jsPDF Autotable's row height calculation
-              if ( typeof atOptions.beforePageContent !== 'function' ) {
-                atOptions.beforePageContent = function (data) {
-                  if ( data.pageCount == 1 ) {
-                    var all = data.table.rows.concat(data.table.headerRow);
-                    $.each(all, function () {
-                      var row = this;
-                      if ( row.height > 0 ) {
-                        row.height += (2 - FONT_ROW_RATIO) / 2 * row.styles.fontSize;
-                        data.table.height += (2 - FONT_ROW_RATIO) / 2 * row.styles.fontSize;
-                      }
-                    });
-                  }
-                };
-              }
-
-              if ( typeof atOptions.createdHeaderCell !== 'function' ) {
-                // apply some original css styles to pdf header cells
-                atOptions.createdHeaderCell = function (cell, data) {
-
-                  // jsPDF AutoTable plugin v2.0.14 fix: each cell needs its own styles object
-                  cell.styles = $.extend({}, data.row.styles);
-
-                  if ( typeof teOptions.columns [data.column.dataKey] != 'undefined' ) {
-                    var col = teOptions.columns [data.column.dataKey];
-
-                    if ( typeof col.rect != 'undefined' ) {
-                      var rh;
-
-                      cell.contentWidth = col.rect.width;
-
-                      if ( typeof teOptions.heightRatio == 'undefined' || teOptions.heightRatio === 0 ) {
-                        if ( data.row.raw [data.column.dataKey].rowspan )
-                          rh = data.row.raw [data.column.dataKey].rect.height / data.row.raw [data.column.dataKey].rowspan;
-                        else
-                          rh = data.row.raw [data.column.dataKey].rect.height;
-
-                        teOptions.heightRatio = cell.styles.rowHeight / rh;
-                      }
-
-                      rh = data.row.raw [data.column.dataKey].rect.height * teOptions.heightRatio;
-                      if ( rh > cell.styles.rowHeight )
-                        cell.styles.rowHeight = rh;
-                    }
-
-                    if ( typeof col.style != 'undefined' && col.style.hidden !== true ) {
-                      cell.styles.halign = col.style.align;
-                      if ( atOptions.styles.fillColor === 'inherit' )
-                        cell.styles.fillColor = col.style.bcolor;
-                      if ( atOptions.styles.textColor === 'inherit' )
-                        cell.styles.textColor = col.style.color;
-                      if ( atOptions.styles.fontStyle === 'inherit' )
-                        cell.styles.fontStyle = col.style.fstyle;
-                    }
-                  }
-                };
-              }
-
-              if ( typeof atOptions.createdCell !== 'function' ) {
-                // apply some original css styles to pdf table cells
-                atOptions.createdCell = function (cell, data) {
-                  var rowopt = teOptions.rowoptions [data.row.index + ":" + data.column.dataKey];
-
-                  if ( typeof rowopt != 'undefined' &&
-                    typeof rowopt.style != 'undefined' &&
-                    rowopt.style.hidden !== true ) {
-                    cell.styles.halign = rowopt.style.align;
-                    if ( atOptions.styles.fillColor === 'inherit' )
-                      cell.styles.fillColor = rowopt.style.bcolor;
-                    if ( atOptions.styles.textColor === 'inherit' )
-                      cell.styles.textColor = rowopt.style.color;
-                    if ( atOptions.styles.fontStyle === 'inherit' )
-                      cell.styles.fontStyle = rowopt.style.fstyle;
-                  }
-                };
-              }
-
-              if ( typeof atOptions.drawHeaderCell !== 'function' ) {
-                atOptions.drawHeaderCell = function (cell, data) {
-                  var colopt = teOptions.columns [data.column.dataKey];
-
-                  if ( (colopt.style.hasOwnProperty("hidden") !== true || colopt.style.hidden !== true) &&
-                    colopt.rowIndex >= 0 )
-                    return prepareAutoTableText(cell, data, colopt);
-                  else
-                    return false; // cell is hidden
-                };
-              }
-
-              if ( typeof atOptions.drawCell !== 'function' ) {
-                atOptions.drawCell = function (cell, data) {
-                  var rowopt = teOptions.rowoptions [data.row.index + ":" + data.column.dataKey];
-                  if ( prepareAutoTableText(cell, data, rowopt) ) {
-
-                    teOptions.doc.rect(cell.x, cell.y, cell.width, cell.height, cell.styles.fillStyle);
-
-                    if ( typeof rowopt != 'undefined' && typeof rowopt.kids != 'undefined' && rowopt.kids.length > 0 ) {
-
-                      var dh = cell.height / rowopt.rect.height;
-                      if ( dh > teOptions.dh || typeof teOptions.dh == 'undefined' )
-                        teOptions.dh = dh;
-                      teOptions.dw = cell.width / rowopt.rect.width;
-
-                      var y = cell.textPos.y;
-                      drawAutotableElements(cell, rowopt.kids, teOptions);
-                      cell.textPos.y = y;
-                      drawAutotableText(cell, rowopt.kids, teOptions);
-                    }
-                    else
-                      drawAutotableText(cell, {}, teOptions);
-                  }
-                  return false;
-                };
-              }
-
-              // collect header and data rows
-              teOptions.headerrows = [];
-              $hrows = $(this).find('thead').find(defaults.theadSelector);
-              $hrows.each(function () {
-                colKey = 0;
-                teOptions.headerrows[rowIndex] = [];
-
-                ForEachVisibleCell(this, 'th,td', rowIndex, $hrows.length,
-                  function (cell, row, col) {
-                    var obj      = getCellStyles(cell);
-                    obj.title    = parseString(cell, row, col);
-                    obj.key      = colKey++;
-                    obj.rowIndex = rowIndex;
-                    teOptions.headerrows[rowIndex].push(obj);
-                  });
-                rowIndex++;
-              });
-
-              if ( rowIndex > 0 ) {
-                // iterate through last row
-                var lastrow = rowIndex - 1;
-                while ( lastrow >= 0 ) {
-                  $.each(teOptions.headerrows[lastrow], function () {
-                    var obj = this;
-
-                    if ( lastrow > 0 && this.rect === null )
-                      obj = teOptions.headerrows[lastrow - 1][this.key];
-
-                    if ( obj !== null && obj.rowIndex >= 0 &&
-                      (obj.style.hasOwnProperty("hidden") !== true || obj.style.hidden !== true) )
-                      teOptions.columns.push(obj);
-                  });
-
-                  lastrow = (teOptions.columns.length > 0) ? -1 : lastrow - 1;
-                }
-              }
-
-              var rowCount = 0;
-              $rows        = [];
-              $rows = collectRows ($(this));
-              $($rows).each(function () {
-                var rowData = [];
-                colKey      = 0;
-
-                ForEachVisibleCell(this, 'td,th', rowIndex, $hrows.length + $rows.length,
-                  function (cell, row, col) {
-                    var obj;
-
-                    if ( typeof teOptions.columns[colKey] === 'undefined' ) {
-                      // jsPDF-Autotable needs columns. Thus define hidden ones for tables without thead
-                      obj = {
-                        title: '',
-                        key:   colKey,
-                        style: {
-                          hidden: true
-                        }
-                      };
-                      teOptions.columns.push(obj);
-                    }
-                    if ( typeof cell !== 'undefined' && cell !== null ) {
-                      obj = getCellStyles(cell);
-                      obj.kids = $(cell).children();
-                      teOptions.rowoptions [rowCount + ":" + colKey++] = obj;
-                    }
-                    else {
-                      obj = $.extend(true, {}, teOptions.rowoptions [rowCount + ":" + (colKey - 1)]);
-                      obj.colspan = -1;
-                      teOptions.rowoptions [rowCount + ":" + colKey++] = obj;
-                    }
-
-                    rowData.push(parseString(cell, row, col));
-                  });
-                if ( rowData.length ) {
-                  teOptions.rows.push(rowData);
-                  rowCount++;
-                }
-                rowIndex++;
-              });
-
-              // onBeforeAutotable: optional callback function before calling
-              // jsPDF AutoTable that can be used to modify the AutoTable options
-              if ( typeof teOptions.onBeforeAutotable === 'function' )
-                teOptions.onBeforeAutotable($(this), teOptions.columns, teOptions.rows, atOptions);
-
-              teOptions.doc.autoTable(teOptions.columns, teOptions.rows, atOptions);
-
-              // onAfterAutotable: optional callback function after returning
-              // from jsPDF AutoTable that can be used to modify the AutoTable options
-              if ( typeof teOptions.onAfterAutotable === 'function' )
-                teOptions.onAfterAutotable($(this), atOptions);
-
-              // set the start position for the next table (in case there is one)
-              defaults.jspdf.autotable.startY = teOptions.doc.autoTableEndPosY() + atOptions.margin.top;
-
-            });
-
-            jsPdfOutput(teOptions.doc, (typeof teOptions.images != 'undefined' && jQuery.isEmptyObject(teOptions.images) === false));
-
-            if ( typeof teOptions.headerrows != 'undefined' )
-              teOptions.headerrows.length = 0;
-            if ( typeof teOptions.columns != 'undefined' )
-              teOptions.columns.length = 0;
-            if ( typeof teOptions.rows != 'undefined' )
-              teOptions.rows.length = 0;
-            delete teOptions.doc;
-            teOptions.doc = null;
-          });
-        }
-      }
-
-      /*
-      function FindColObject (objects, colIndex, rowIndex) {
-        var result = null;
-        $.each(objects, function () {
-          if ( this.rowIndex == rowIndex && this.key == colIndex ) {
-            result = this;
-            return false;
-          }
-        });
-        return result;
-      }
-      */
-      function collectRows ($table) {
-        var result = [];
-        findTablePart($table,'tbody').each(function () {
-          result.push.apply(result, findRows($(this), defaults.tbodySelector).toArray());
-        });
-        if ( defaults.tfootSelector.length ) {
-          findTablePart($table,'tfoot').each(function () {
-            result.push.apply(result, findRows($(this), defaults.tfootSelector).toArray());
-          });
-        }
-        return result;
-      }
-
-      function findTablePart ($table, type) {
-        var tl = $table.parents('table').length;
-        return $table.find(type).filter (function () {
-          return $(this).closest('table').parents('table').length === tl;
-        });
-      }
-
-      function findRows ($tpart, rowSelector) {
-        return $tpart.find(rowSelector).filter (function () {
-          return $(this).find('table').length === 0 && $(this).parents('table').length === 1;
-        });
-      }
-
-      function GetColumnNames (table) {
-        var result = [];
-        $(table).find('thead').first().find('th').each(function (index, el) {
-          if ( $(el).attr("data-field") !== undefined )
-            result[index] = $(el).attr("data-field");
-          else
-            result[index] = index.toString();
-        });
-        return result;
-      }
-
-      function isVisible ($element) {
-        var isCell = typeof $element[0].cellIndex !== 'undefined';
-        var isRow = typeof $element[0].rowIndex !== 'undefined';
-        var isElementVisible = (isCell || isRow) ? isTableElementVisible($element) : $element.is(':visible');
-        var tableexportDisplay = $element.data("tableexport-display");
-
-        if (isCell && tableexportDisplay != 'none' && tableexportDisplay != 'always') {
-          $element = $($element[0].parentNode);
-          isRow = typeof $element[0].rowIndex !== 'undefined';
-          tableexportDisplay = $element.data("tableexport-display");
-        }
-        if (isRow && tableexportDisplay != 'none' && tableexportDisplay != 'always') {
-          tableexportDisplay = $element.closest('table').data("tableexport-display");
-        }
-
-        return tableexportDisplay !== 'none' && (isElementVisible == true || tableexportDisplay == 'always');
-      }
-
-      function isTableElementVisible ($element) {
-        var hiddenEls = [];
-
-        if ( checkCellVisibilty ) {
-          hiddenEls = $hiddenTableElements.filter (function () {
-            var found = false;
-
-            if (this.nodeType == $element[0].nodeType) {
-              if (typeof this.rowIndex !== 'undefined' && this.rowIndex == $element[0].rowIndex)
-                found = true;
-              else if (typeof this.cellIndex !== 'undefined' && this.cellIndex == $element[0].cellIndex &&
-                       typeof this.parentNode.rowIndex !== 'undefined' &&
-                       typeof $element[0].parentNode.rowIndex !== 'undefined' &&
-                       this.parentNode.rowIndex == $element[0].parentNode.rowIndex)
-                found = true;
-            }
-            return found;
-          });
-        }
-        return (checkCellVisibilty == false || hiddenEls.length == 0);
-      }
-
-      function isColumnIgnored ($cell, rowLength, colIndex) {
-        var result = false;
-
-        if (isVisible($cell)) {
-          if ( defaults.ignoreColumn.length > 0 ) {
-            if ( $.inArray(colIndex, defaults.ignoreColumn) != -1 ||
-              $.inArray(colIndex - rowLength, defaults.ignoreColumn) != -1 ||
-              (colNames.length > colIndex && typeof colNames[colIndex] != 'undefined' &&
-              $.inArray(colNames[colIndex], defaults.ignoreColumn) != -1) )
-              result = true;
-          }
-        }
-        else
-          result = true;
-
-        return result;
-      }
-
-      function ForEachVisibleCell (tableRow, selector, rowIndex, rowCount, cellcallback) {
-        if ( typeof (cellcallback) === 'function' ) {
-          var ignoreRow = false;
-
-          if (typeof defaults.onIgnoreRow === 'function')
-            ignoreRow = defaults.onIgnoreRow($(tableRow), rowIndex);
-
-          if (ignoreRow === false &&
-              $.inArray(rowIndex, defaults.ignoreRow) == -1 &&
-              $.inArray(rowIndex - rowCount, defaults.ignoreRow) == -1 &&
-              isVisible($(tableRow))) {
-
-            var $cells = $(tableRow).find(selector);
-            var cellCount = 0;
-
-            $cells.each(function (colIndex) {
-              var $cell = $(this);
-              var c;
-              var colspan = parseInt(this.getAttribute('colspan'));
-              var rowspan = parseInt(this.getAttribute('rowspan'));
-
-              // Skip ranges
-              $.each(ranges, function () {
-                var range = this;
-                if ( rowIndex >= range.s.r && rowIndex <= range.e.r && cellCount >= range.s.c && cellCount <= range.e.c ) {
-                  for ( c = 0; c <= range.e.c - range.s.c; ++c )
-                    cellcallback(null, rowIndex, cellCount++);
-                }
-              });
-
-              if ( isColumnIgnored($cell, $cells.length, colIndex) === false ) {
-                // Handle Row Span
-                if ( rowspan || colspan ) {
-                  rowspan = rowspan || 1;
-                  colspan = colspan || 1;
-                  ranges.push({
-                    s: {r: rowIndex, c: cellCount},
-                    e: {r: rowIndex + rowspan - 1, c: cellCount + colspan - 1}
-                  });
-                }
-
-                // Handle Value
-                cellcallback(this, rowIndex, cellCount++);
-              }
-
-              // Handle Colspan
-              if ( colspan )
-                for ( c = 0; c < colspan - 1; ++c )
-                  cellcallback(null, rowIndex, cellCount++);
-            });
-
-            // Skip ranges
-            $.each(ranges, function () {
-              var range = this;
-              if ( rowIndex >= range.s.r && rowIndex <= range.e.r && cellCount >= range.s.c && cellCount <= range.e.c ) {
-                for ( c = 0; c <= range.e.c - range.s.c; ++c )
-                  cellcallback(null, rowIndex, cellCount++);
-              }
-            });
-          }
-        }
-      }
-
-      function jsPdfOutput (doc, hasimages) {
-        if ( defaults.consoleLog === true )
-          console.log(doc.output());
-
-        if ( defaults.outputMode === 'string' )
-          return doc.output();
-
-        if ( defaults.outputMode === 'base64' )
-          return base64encode(doc.output());
-
-        if ( defaults.outputMode === 'window' ) {
-          window.URL = window.URL || window.webkitURL;
-          window.open(window.URL.createObjectURL(doc.output("blob")));
-          return;
-        }
-
-        try {
-          var blob = doc.output('blob');
-          saveAs(blob, defaults.fileName + '.pdf');
-        }
-        catch (e) {
-          downloadFile(defaults.fileName + '.pdf',
-            'data:application/pdf' + (hasimages ? '' : ';base64') + ',',
-            hasimages ? doc.output('blob') : doc.output());
-        }
-      }
-
-      function prepareAutoTableText (cell, data, cellopt) {
-        var cs = 0;
-        if ( typeof cellopt !== 'undefined' )
-          cs = cellopt.colspan;
-
-        if ( cs >= 0 ) {
-          // colspan handling
-          var cellWidth = cell.width;
-          var textPosX  = cell.textPos.x;
-          var i         = data.table.columns.indexOf(data.column);
-
-          for ( var c = 1; c < cs; c++ ) {
-            var column = data.table.columns[i + c];
-            cellWidth += column.width;
-          }
-
-          if ( cs > 1 ) {
-            if ( cell.styles.halign === 'right' )
-              textPosX = cell.textPos.x + cellWidth - cell.width;
-            else if ( cell.styles.halign === 'center' )
-              textPosX = cell.textPos.x + (cellWidth - cell.width) / 2;
-          }
-
-          cell.width     = cellWidth;
-          cell.textPos.x = textPosX;
-
-          if ( typeof cellopt !== 'undefined' && cellopt.rowspan > 1 )
-            cell.height = cell.height * cellopt.rowspan;
-
-          // fix jsPDF's calculation of text position
-          if ( cell.styles.valign === 'middle' || cell.styles.valign === 'bottom' ) {
-            var splittedText = typeof cell.text === 'string' ? cell.text.split(/\r\n|\r|\n/g) : cell.text;
-            var lineCount    = splittedText.length || 1;
-            if ( lineCount > 2 )
-              cell.textPos.y -= ((2 - FONT_ROW_RATIO) / 2 * data.row.styles.fontSize) * (lineCount - 2) / 3;
-          }
-          return true;
-        }
-        else
-          return false; // cell is hidden (colspan = -1), don't draw it
-      }
-
-      function collectImages (cell, elements, teOptions) {
-        if ( typeof teOptions.images != 'undefined' ) {
-          elements.each(function () {
-            var kids = $(this).children();
-
-            if ( $(this).is("img") ) {
-              var hash = strHashCode(this.src);
-
-              teOptions.images[hash] = {
-                url: this.src,
-                src: this.src
-              };
-            }
-
-            if ( typeof kids != 'undefined' && kids.length > 0 )
-              collectImages(cell, kids, teOptions);
-          });
-        }
-      }
-
-      function loadImages (teOptions, callback) {
-        var i;
-        var imageCount = 0;
-        var x          = 0;
-
-        function done () {
-          callback(imageCount);
-        }
-
-        function loadImage (image) {
-          if ( !image.url )
-            return;
-          var img         = new Image();
-          imageCount      = ++x;
-          img.crossOrigin = 'Anonymous';
-          img.onerror     = img.onload = function () {
-            if ( img.complete ) {
-
-              if ( img.src.indexOf('data:image/') === 0 ) {
-                img.width  = image.width || img.width || 0;
-                img.height = image.height || img.height || 0;
-              }
-
-              if ( img.width + img.height ) {
-                var canvas = document.createElement("canvas");
-                var ctx    = canvas.getContext("2d");
-
-                canvas.width  = img.width;
-                canvas.height = img.height;
-                ctx.drawImage(img, 0, 0);
-
-                image.src = canvas.toDataURL("image/jpeg");
-              }
-            }
-            if ( !--x )
-              done();
-          };
-          img.src = image.url;
-        }
-
-        if ( typeof teOptions.images != 'undefined' ) {
-          for ( i in teOptions.images )
-            if ( teOptions.images.hasOwnProperty(i) )
-              loadImage(teOptions.images[i]);
-        }
-
-        return x || done();
-      }
-
-      function drawAutotableElements (cell, elements, teOptions) {
-        elements.each(function () {
-          var kids = $(this).children();
-          var uy   = 0;
-
-          if ( $(this).is("div") ) {
-            var bcolor = rgb2array(getStyle(this, 'background-color'), [255, 255, 255]);
-            var lcolor = rgb2array(getStyle(this, 'border-top-color'), [0, 0, 0]);
-            var lwidth = getPropertyUnitValue(this, 'border-top-width', defaults.jspdf.unit);
-
-            var r  = this.getBoundingClientRect();
-            var ux = this.offsetLeft * teOptions.dw;
-                uy = this.offsetTop * teOptions.dh;
-            var uw = r.width * teOptions.dw;
-            var uh = r.height * teOptions.dh;
-
-            teOptions.doc.setDrawColor.apply(undefined, lcolor);
-            teOptions.doc.setFillColor.apply(undefined, bcolor);
-            teOptions.doc.setLineWidth(lwidth);
-            teOptions.doc.rect(cell.x + ux, cell.y + uy, uw, uh, lwidth ? "FD" : "F");
-          }
-          else if ( $(this).is("img") ) {
-            if ( typeof teOptions.images != 'undefined' ) {
-              var hash  = strHashCode(this.src);
-              var image = teOptions.images[hash];
-
-              if ( typeof image != 'undefined' ) {
-
-                var arCell    = cell.width / cell.height;
-                var arImg     = this.width / this.height;
-                var imgWidth  = cell.width;
-                var imgHeight = cell.height;
-                var px2pt     = 0.264583 * 72 / 25.4;
-
-                if ( arImg <= arCell ) {
-                  imgHeight = Math.min(cell.height, this.height);
-                  imgWidth  = this.width * imgHeight / this.height;
-                }
-                else if ( arImg > arCell ) {
-                  imgWidth  = Math.min(cell.width, this.width);
-                  imgHeight = this.height * imgWidth / this.width;
-                }
-
-                imgWidth *= px2pt;
-                imgHeight *= px2pt;
-
-                if ( imgHeight < cell.height )
-                  uy = (cell.height - imgHeight) / 2;
-
-                try {
-                  teOptions.doc.addImage(image.src, cell.textPos.x, cell.y + uy, imgWidth, imgHeight);
-                }
-                catch (e) {
-                  // TODO: IE -> convert png to jpeg
-                }
-                cell.textPos.x += imgWidth;
-              }
-            }
-          }
-
-          if ( typeof kids != 'undefined' && kids.length > 0 )
-            drawAutotableElements(cell, kids, teOptions);
-        });
-      }
-
-      function drawAutotableText (cell, texttags, teOptions) {
-        if ( typeof teOptions.onAutotableText === 'function' ) {
-          teOptions.onAutotableText(teOptions.doc, cell, texttags);
-        }
-        else {
-          var x     = cell.textPos.x;
-          var y     = cell.textPos.y;
-          var style = {halign: cell.styles.halign, valign: cell.styles.valign};
-
-          if ( texttags.length ) {
-            var tag = texttags[0];
-            while ( tag.previousSibling )
-              tag = tag.previousSibling;
-
-            var b = false, i = false;
-
-            while ( tag ) {
-              var txt = tag.innerText || tag.textContent || "";
-
-              txt = ((txt.length && txt[0] == " ") ? " " : "") +
-                $.trim(txt) +
-                ((txt.length > 1 && txt[txt.length - 1] == " ") ? " " : "");
-
-              if ( $(tag).is("br") ) {
-                x = cell.textPos.x;
-                y += teOptions.doc.internal.getFontSize();
-              }
-
-              if ( $(tag).is("b") )
-                b = true;
-              else if ( $(tag).is("i") )
-                i = true;
-
-              if ( b || i )
-                teOptions.doc.setFontType((b && i) ? "bolditalic" : b ? "bold" : "italic");
-
-              var w = teOptions.doc.getStringUnitWidth(txt) * teOptions.doc.internal.getFontSize();
-
-              if ( w ) {
-                if ( cell.styles.overflow === 'linebreak' &&
-                  x > cell.textPos.x && (x + w) > (cell.textPos.x + cell.width) ) {
-                  var chars = ".,!%*;:=-";
-                  if ( chars.indexOf(txt.charAt(0)) >= 0 ) {
-                    var s = txt.charAt(0);
-                    w     = teOptions.doc.getStringUnitWidth(s) * teOptions.doc.internal.getFontSize();
-                    if ( (x + w) <= (cell.textPos.x + cell.width) ) {
-                      teOptions.doc.autoTableText(s, x, y, style);
-                      txt = txt.substring(1, txt.length);
-                    }
-                    w = teOptions.doc.getStringUnitWidth(txt) * teOptions.doc.internal.getFontSize();
-                  }
-                  x = cell.textPos.x;
-                  y += teOptions.doc.internal.getFontSize();
-                }
-
-                while ( txt.length && (x + w) > (cell.textPos.x + cell.width) ) {
-                  txt = txt.substring(0, txt.length - 1);
-                  w   = teOptions.doc.getStringUnitWidth(txt) * teOptions.doc.internal.getFontSize();
-                }
-
-                teOptions.doc.autoTableText(txt, x, y, style);
-                x += w;
-              }
-
-              if ( b || i ) {
-                if ( $(tag).is("b") )
-                  b = false;
-                else if ( $(tag).is("i") )
-                  i = false;
-
-                teOptions.doc.setFontType((!b && !i) ? "normal" : b ? "bold" : "italic");
-              }
-
-              tag = tag.nextSibling;
-            }
-            cell.textPos.x = x;
-            cell.textPos.y = y;
-          }
-          else {
-            teOptions.doc.autoTableText(cell.text, cell.textPos.x, cell.textPos.y, style);
-          }
-        }
-      }
-
-      function escapeRegExp (string) {
-        return string.replace(/([.*+?^=!:${}()|\[\]\/\\])/g, "\\$1");
-      }
-
-      function replaceAll (string, find, replace) {
-        return string.replace(new RegExp(escapeRegExp(find), 'g'), replace);
-      }
-
-      function parseNumber (value) {
-        value = value || "0";
-        value = replaceAll(value, defaults.numbers.html.thousandsSeparator, '');
-        value = replaceAll(value, defaults.numbers.html.decimalMark, '.');
-
-        return typeof value === "number" || jQuery.isNumeric(value) !== false ? value : false;
-      }
-
-      function parsePercent (value) {
-        if ( value.indexOf("%") > -1 ) {
-          value = parseNumber(value.replace(/%/g, ""));
-          if ( value !== false )
-            value = value / 100;
-        }
-        else
-          value = false;
-        return value;
-      }
-
-      function parseString (cell, rowIndex, colIndex) {
-        var result = '';
-
-        if ( cell !== null ) {
-          var $cell = $(cell);
-          var htmlData;
-
-          if ( $cell[0].hasAttribute("data-tableexport-value") ) {
-            htmlData = $cell.data("tableexport-value");
-            htmlData = htmlData ? htmlData + '' : ''
-          }
-          else {
-            htmlData = $cell.html();
-
-            if ( typeof defaults.onCellHtmlData === 'function' )
-              htmlData = defaults.onCellHtmlData($cell, rowIndex, colIndex, htmlData);
-            else if ( htmlData != '' ) {
-              var html      = $.parseHTML(htmlData);
-              var inputidx  = 0;
-              var selectidx = 0;
-
-              htmlData = '';
-              $.each(html, function () {
-                if ( $(this).is("input") )
-                  htmlData += $cell.find('input').eq(inputidx++).val();
-                else if ( $(this).is("select") )
-                  htmlData += $cell.find('select option:selected').eq(selectidx++).text();
-                else {
-                  if ( typeof $(this).html() === 'undefined' )
-                    htmlData += $(this).text();
-                  else if ( jQuery().bootstrapTable === undefined ||
-                    ($(this).hasClass('filterControl') !== true &&
-                     $(cell).parents('.detail-view').length === 0) )
-                    htmlData += $(this).html();
-                }
-              });
-            }
-          }
-
-          if ( defaults.htmlContent === true ) {
-            result = $.trim(htmlData);
-          }
-          else if ( htmlData && htmlData != '' ) {
-            var cellFormat = $(cell).data("tableexport-cellformat");
-
-            if ( cellFormat != '' ) {
-              var text   = htmlData.replace(/\n/g, '\u2028').replace(/<br\s*[\/]?>/gi, '\u2060');
-              var obj    = $('<div/>').html(text).contents();
-              var number = false;
-              text       = '';
-              $.each(obj.text().split("\u2028"), function (i, v) {
-                if ( i > 0 )
-                  text += " ";
-                text += $.trim(v);
-              });
-
-              $.each(text.split("\u2060"), function (i, v) {
-                if ( i > 0 )
-                  result += "\n";
-                result += $.trim(v).replace(/\u00AD/g, ""); // remove soft hyphens
-              });
-
-              if ( defaults.type == 'json' ||
-                   (defaults.type === 'excel' && defaults.excelFileFormat === 'xmlss') ||
-                    defaults.numbers.output === false ) {
-                number = parseNumber(result);
-
-                if ( number !== false )
-                  result = Number(number);
-              }
-              else if ( defaults.numbers.html.decimalMark != defaults.numbers.output.decimalMark ||
-                        defaults.numbers.html.thousandsSeparator != defaults.numbers.output.thousandsSeparator ) {
-                number = parseNumber(result);
-
-                if ( number !== false ) {
-                  var frac = ("" + number.substr(number < 0 ? 1 : 0)).split('.');
-                  if ( frac.length == 1 )
-                    frac[1] = "";
-                  var mod = frac[0].length > 3 ? frac[0].length % 3 : 0;
-
-                  result = (number < 0 ? "-" : "") +
-                    (defaults.numbers.output.thousandsSeparator ? ((mod ? frac[0].substr(0, mod) + defaults.numbers.output.thousandsSeparator : "") + frac[0].substr(mod).replace(/(\d{3})(?=\d)/g, "$1" + defaults.numbers.output.thousandsSeparator)) : frac[0]) +
-                    (frac[1].length ? defaults.numbers.output.decimalMark + frac[1] : "");
-                }
-              }
-            }
-            else
-              result = htmlData;
-          }
-
-          if ( defaults.escape === true ) {
-            //noinspection JSDeprecatedSymbols
-            result = escape(result);
-          }
-
-          if ( typeof defaults.onCellData === 'function' ) {
-            result = defaults.onCellData($cell, rowIndex, colIndex, result);
-          }
-        }
-
-        return result;
-      }
-
-      //noinspection JSUnusedLocalSymbols
-      function hyphenate (a, b, c) {
-        return b + "-" + c.toLowerCase();
-      }
-
-      function rgb2array (rgb_string, default_result) {
-        var re     = /^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/;
-        var bits   = re.exec(rgb_string);
-        var result = default_result;
-        if ( bits )
-          result = [parseInt(bits[1]), parseInt(bits[2]), parseInt(bits[3])];
-        return result;
-      }
-
-      function getCellStyles (cell) {
-        var a  = getStyle(cell, 'text-align');
-        var fw = getStyle(cell, 'font-weight');
-        var fs = getStyle(cell, 'font-style');
-        var f  = '';
-        if ( a == 'start' )
-          a = getStyle(cell, 'direction') == 'rtl' ? 'right' : 'left';
-        if ( fw >= 700 )
-          f = 'bold';
-        if ( fs == 'italic' )
-          f += fs;
-        if ( f === '' )
-          f = 'normal';
-
-        var result = {
-          style:   {
-            align:  a,
-            bcolor: rgb2array(getStyle(cell, 'background-color'), [255, 255, 255]),
-            color:  rgb2array(getStyle(cell, 'color'), [0, 0, 0]),
-            fstyle: f
-          },
-          colspan: (parseInt($(cell).attr('colspan')) || 0),
-          rowspan: (parseInt($(cell).attr('rowspan')) || 0)
-        };
-
-        if ( cell !== null ) {
-          var r       = cell.getBoundingClientRect();
-          result.rect = {
-            width:  r.width,
-            height: r.height
-          };
-        }
-
-        return result;
-      }
-
-      // get computed style property
-      function getStyle (target, prop) {
-        try {
-          if ( window.getComputedStyle ) { // gecko and webkit
-            prop = prop.replace(/([a-z])([A-Z])/, hyphenate);  // requires hyphenated, not camel
-            return window.getComputedStyle(target, null).getPropertyValue(prop);
-          }
-          if ( target.currentStyle ) { // ie
-            return target.currentStyle[prop];
-          }
-          return target.style[prop];
-        }
-        catch (e) {
-        }
-        return "";
-      }
-
-      function getUnitValue (parent, value, unit) {
-        var baseline = 100;  // any number serves
-
-        var temp              = document.createElement("div");  // create temporary element
-        temp.style.overflow   = "hidden";  // in case baseline is set too low
-        temp.style.visibility = "hidden";  // no need to show it
-
-        parent.appendChild(temp); // insert it into the parent for em, ex and %
-
-        temp.style.width = baseline + unit;
-        var factor       = baseline / temp.offsetWidth;
-
-        parent.removeChild(temp);  // clean up
-
-        return (value * factor);
-      }
-
-      function getPropertyUnitValue (target, prop, unit) {
-        var value = getStyle(target, prop);  // get the computed style value
-
-        var numeric = value.match(/\d+/);  // get the numeric component
-        if ( numeric !== null ) {
-          numeric = numeric[0];  // get the string
-
-          return getUnitValue(target.parentElement, numeric, unit);
-        }
-        return 0;
-      }
-
-      function jx_Workbook () {
-        if ( !(this instanceof jx_Workbook) ) {
-          //noinspection JSPotentiallyInvalidConstructorUsage
-          return new jx_Workbook();
-        }
-        this.SheetNames = [];
-        this.Sheets     = {};
-      }
-
-      function jx_s2ab (s) {
-        var buf  = new ArrayBuffer(s.length);
-        var view = new Uint8Array(buf);
-        for ( var i = 0; i != s.length; ++i ) view[i] = s.charCodeAt(i) & 0xFF;
-        return buf;
-      }
-
-      function jx_datenum (v, date1904) {
-        if ( date1904 ) v += 1462;
-        var epoch = Date.parse(v);
-        return (epoch - new Date(Date.UTC(1899, 11, 30))) / (24 * 60 * 60 * 1000);
-      }
-
-      function jx_createSheet (data) {
-        var ws    = {};
-        var range = {s: {c: 10000000, r: 10000000}, e: {c: 0, r: 0}};
-        for ( var R = 0; R != data.length; ++R ) {
-          for ( var C = 0; C != data[R].length; ++C ) {
-            if ( range.s.r > R ) range.s.r = R;
-            if ( range.s.c > C ) range.s.c = C;
-            if ( range.e.r < R ) range.e.r = R;
-            if ( range.e.c < C ) range.e.c = C;
-            var cell = {v: data[R][C]};
-            if ( cell.v === null ) continue;
-            var cell_ref = XLSX.utils.encode_cell({c: C, r: R});
-
-            if ( typeof cell.v === 'number' ) cell.t = 'n';
-            else if ( typeof cell.v === 'boolean' ) cell.t = 'b';
-            else if ( cell.v instanceof Date ) {
-              cell.t = 'n';
-              cell.z = XLSX.SSF._table[14];
-              cell.v = jx_datenum(cell.v);
-            }
-            else cell.t = 's';
-            ws[cell_ref] = cell;
-          }
-        }
-
-        if ( range.s.c < 10000000 ) ws['!ref'] = XLSX.utils.encode_range(range);
-        return ws;
-      }
-
-      function strHashCode (str) {
-        var hash = 0, i, chr, len;
-        if ( str.length === 0 ) return hash;
-        for ( i = 0, len = str.length; i < len; i++ ) {
-          chr  = str.charCodeAt(i);
-          hash = ((hash << 5) - hash) + chr;
-          hash |= 0; // Convert to 32bit integer
-        }
-        return hash;
-      }
-
-      function downloadFile (filename, header, data) {
-        var ua = window.navigator.userAgent;
-        if ( filename !== false && window.navigator.msSaveOrOpenBlob ) {
-          //noinspection JSUnresolvedFunction
-          window.navigator.msSaveOrOpenBlob(new Blob([data]), filename);
-        }
-        else if ( filename !== false && (ua.indexOf("MSIE ") > 0 || !!ua.match(/Trident.*rv\:11\./)) ) {
-          // Internet Explorer (<= 9) workaround by Darryl (https://github.com/dawiong/tableExport.jquery.plugin)
-          // based on sampopes answer on http://stackoverflow.com/questions/22317951
-          // ! Not working for json and pdf format !
-          var frame = document.createElement("iframe");
-
-          if ( frame ) {
-            document.body.appendChild(frame);
-            frame.setAttribute("style", "display:none");
-            frame.contentDocument.open("txt/plain", "replace");
-            frame.contentDocument.write(data);
-            frame.contentDocument.close();
-            frame.contentDocument.focus();
-
-            var extension = filename.substr((filename.lastIndexOf('.') +1));
-            switch(extension) {
-              case 'doc': case 'json': case 'png': case 'pdf': case 'xls': case 'xlsx':
-                filename += ".txt";
-                break;
-            }
-            frame.contentDocument.execCommand("SaveAs", true, filename);
-            document.body.removeChild(frame);
-          }
-        }
-        else {
-          var DownloadLink = document.createElement('a');
-
-          if ( DownloadLink ) {
-            var blobUrl = null;
-
-            DownloadLink.style.display = 'none';
-            if ( filename !== false )
-              DownloadLink.download = filename;
-            else
-              DownloadLink.target = '_blank';
-
-            if ( typeof data == 'object' ) {
-              window.URL = window.URL || window.webkitURL;
-              blobUrl = window.URL.createObjectURL(data);
-              DownloadLink.href = blobUrl;
-            }
-            else if ( header.toLowerCase().indexOf("base64,") >= 0 )
-              DownloadLink.href = header + base64encode(data);
-            else
-              DownloadLink.href = header + encodeURIComponent(data);
-
-            document.body.appendChild(DownloadLink);
-
-            if ( document.createEvent ) {
-              if ( DownloadEvt === null )
-                DownloadEvt = document.createEvent('MouseEvents');
-
-              DownloadEvt.initEvent('click', true, false);
-              DownloadLink.dispatchEvent(DownloadEvt);
-            }
-            else if ( document.createEventObject )
-              DownloadLink.fireEvent('onclick');
-            else if ( typeof DownloadLink.onclick == 'function' )
-              DownloadLink.onclick();
-
-            setTimeout(function(){
-              if ( blobUrl )
-                window.URL.revokeObjectURL(blobUrl);
-              document.body.removeChild(DownloadLink);
-            }, 100);
-          }
-        }
-      }
-
-      function utf8Encode (text) {
-        if (typeof text === 'string') {
-          text = text.replace(/\x0d\x0a/g, "\x0a");
-          var utftext = "";
-          for ( var n = 0; n < text.length; n++ ) {
-            var c = text.charCodeAt(n);
-            if ( c < 128 ) {
-              utftext += String.fromCharCode(c);
-            }
-            else if ( (c > 127) && (c < 2048) ) {
-              utftext += String.fromCharCode((c >> 6) | 192);
-              utftext += String.fromCharCode((c & 63) | 128);
-            }
-            else {
-              utftext += String.fromCharCode((c >> 12) | 224);
-              utftext += String.fromCharCode(((c >> 6) & 63) | 128);
-              utftext += String.fromCharCode((c & 63) | 128);
-            }
-          }
-          return utftext;
-        }
-        return text;
-      }
-
-      function base64encode (input) {
-        var chr1, chr2, chr3, enc1, enc2, enc3, enc4;
-        var keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
-        var output = "";
-        var i      = 0;
-        input      = utf8Encode(input);
-        while ( i < input.length ) {
-          chr1 = input.charCodeAt(i++);
-          chr2 = input.charCodeAt(i++);
-          chr3 = input.charCodeAt(i++);
-          enc1 = chr1 >> 2;
-          enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);
-          enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);
-          enc4 = chr3 & 63;
-          if ( isNaN(chr2) ) {
-            enc3 = enc4 = 64;
-          } else if ( isNaN(chr3) ) {
-            enc4 = 64;
-          }
-          output = output +
-            keyStr.charAt(enc1) + keyStr.charAt(enc2) +
-            keyStr.charAt(enc3) + keyStr.charAt(enc4);
-        }
-        return output;
-      }
-
-      return this;
-    }
-})(jQuery);

+ 92 - 0
ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/export/tableExport.min.js

@@ -0,0 +1,92 @@
+/*
+ tableExport.jquery.plugin
+ Version 1.10.24
+ Copyright (c) 2015-2021 hhurz, https://github.com/hhurz/tableExport.jquery.plugin
+ Based on https://github.com/kayalshri/tableExport.jquery.plugin
+ Licensed under the MIT License
+*/
+var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.findInternal=function(d,k,y){d instanceof String&&(d=String(d));for(var C=d.length,v=0;v<C;v++){var R=d[v];if(k.call(y,R,v,d))return{i:v,v:R}}return{i:-1,v:void 0}};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(d,k,y){d!=Array.prototype&&d!=Object.prototype&&(d[k]=y.value)};
+$jscomp.getGlobal=function(d){return"undefined"!=typeof window&&window===d?d:"undefined"!=typeof global&&null!=global?global:d};$jscomp.global=$jscomp.getGlobal(this);$jscomp.polyfill=function(d,k,y,C){if(k){y=$jscomp.global;d=d.split(".");for(C=0;C<d.length-1;C++){var v=d[C];v in y||(y[v]={});y=y[v]}d=d[d.length-1];C=y[d];k=k(C);k!=C&&null!=k&&$jscomp.defineProperty(y,d,{configurable:!0,writable:!0,value:k})}};
+$jscomp.polyfill("Array.prototype.find",function(d){return d?d:function(d,y){return $jscomp.findInternal(this,d,y).v}},"es6","es3");
+(function(d){d.fn.tableExport=function(k){function y(b){var c=[];v(b,"thead").each(function(){c.push.apply(c,v(d(this),a.theadSelector).toArray())});return c}function C(b){var c=[];v(b,"tbody").each(function(){c.push.apply(c,v(d(this),a.tbodySelector).toArray())});a.tfootSelector.length&&v(b,"tfoot").each(function(){c.push.apply(c,v(d(this),a.tfootSelector).toArray())});return c}function v(b,a){var c=b[0].tagName,q=b.parents(c).length;return b.find(a).filter(function(){return q===d(this).closest(c).parents(c).length})}
+function R(b){var a=[],e=0,q=0,f=0;d(b).find("thead").first().find("th").each(function(b,c){b=void 0!==d(c).attr("data-field");"undefined"!==typeof c.parentNode.rowIndex&&q!==c.parentNode.rowIndex&&(q=c.parentNode.rowIndex,e=f=0);var h=J(c);for(e+=h?h:1;f<e;)a[f]=b?d(c).attr("data-field"):f.toString(),f++});return a}function I(b){var a="undefined"!==typeof b[0].rowIndex,e=!1===a&&"undefined"!==typeof b[0].cellIndex,q=e||a?Ja(b):b.is(":visible"),f=b.attr("data-tableexport-display");e&&"none"!==f&&
+"always"!==f&&(b=d(b[0].parentNode),a="undefined"!==typeof b[0].rowIndex,f=b.attr("data-tableexport-display"));a&&"none"!==f&&"always"!==f&&(f=b.closest("table").attr("data-tableexport-display"));return"none"!==f&&(!0===q||"always"===f)}function Ja(b){var a=[];V&&(a=K.filter(function(){var a=!1;this.nodeType===b[0].nodeType&&("undefined"!==typeof this.rowIndex&&this.rowIndex===b[0].rowIndex?a=!0:"undefined"!==typeof this.cellIndex&&this.cellIndex===b[0].cellIndex&&"undefined"!==typeof this.parentNode.rowIndex&&
+"undefined"!==typeof b[0].parentNode.rowIndex&&this.parentNode.rowIndex===b[0].parentNode.rowIndex&&(a=!0));return a}));return!1===V||0===a.length}function ta(b,c,e){var q=!1;I(b)?0<a.ignoreColumn.length&&(-1!==d.inArray(e,a.ignoreColumn)||-1!==d.inArray(e-c,a.ignoreColumn)||S.length>e&&"undefined"!==typeof S[e]&&-1!==d.inArray(S[e],a.ignoreColumn))&&(q=!0):q=!0;return q}function E(b,c,e,q,f){if("function"===typeof f){var h=!1;"function"===typeof a.onIgnoreRow&&(h=a.onIgnoreRow(d(b),e));if(!1===h&&
+(0===a.ignoreRow.length||-1===d.inArray(e,a.ignoreRow)&&-1===d.inArray(e-q,a.ignoreRow))&&I(d(b))){b=v(d(b),c);var n=b.length,l=0,u=0;b.each(function(){var b=d(this),a=J(this),c=T(this),h;d.each(G,function(){if(e>this.s.r&&e<=this.e.r&&l>=this.s.c&&l<=this.e.c)for(h=0;h<=this.e.c-this.s.c;++h)n++,u++,f(null,e,l++)});if(c||a)a=a||1,G.push({s:{r:e,c:l},e:{r:e+(c||1)-1,c:l+a-1}});!1===ta(b,n,u++)&&f(this,e,l++);if(1<a)for(h=0;h<a-1;++h)u++,f(null,e,l++)});d.each(G,function(){if(e>=this.s.r&&e<=this.e.r&&
+l>=this.s.c&&l<=this.e.c)for(ea=0;ea<=this.e.c-this.s.c;++ea)f(null,e,l++)})}}}function ua(b,a,e,d){if("undefined"!==typeof d.images&&(e=d.images[e],"undefined"!==typeof e)){a=a.getBoundingClientRect();var c=b.width/b.height,h=a.width/a.height,q=b.width,l=b.height,u=19.049976/25.4,g=0;h<=c?(l=Math.min(b.height,a.height),q=a.width*l/a.height):h>c&&(q=Math.min(b.width,a.width),l=a.height*q/a.width);q*=u;l*=u;l<b.height&&(g=(b.height-l)/2);try{d.doc.addImage(e.src,b.textPos.x,b.y+g,q,l)}catch(Pa){}b.textPos.x+=
+q}}function va(b,c){if("string"===a.outputMode)return b.output();if("base64"===a.outputMode)return L(b.output());if("window"===a.outputMode)window.URL=window.URL||window.webkitURL,window.open(window.URL.createObjectURL(b.output("blob")));else try{var e=b.output("blob");saveAs(e,a.fileName+".pdf")}catch(q){ka(a.fileName+".pdf","data:application/pdf"+(c?"":";base64")+",",c?b.output("blob"):b.output())}}function wa(b,a,e){var c=0;"undefined"!==typeof e&&(c=e.colspan);if(0<=c){for(var f=b.width,d=b.textPos.x,
+n=a.table.columns.indexOf(a.column),l=1;l<c;l++)f+=a.table.columns[n+l].width;1<c&&("right"===b.styles.halign?d=b.textPos.x+f-b.width:"center"===b.styles.halign&&(d=b.textPos.x+(f-b.width)/2));b.width=f;b.textPos.x=d;"undefined"!==typeof e&&1<e.rowspan&&(b.height*=e.rowspan);if("middle"===b.styles.valign||"bottom"===b.styles.valign)e=("string"===typeof b.text?b.text.split(/\r\n|\r|\n/g):b.text).length||1,2<e&&(b.textPos.y-=(2-1.15)/2*a.row.styles.fontSize*(e-2)/3);return!0}return!1}function xa(b,
+a,e){"undefined"!==typeof b&&null!==b&&(b.hasAttribute("data-tableexport-canvas")?(a=(new Date).getTime(),d(b).attr("data-tableexport-canvas",a),e.images[a]={url:'[data-tableexport-canvas="'+a+'"]',src:null}):"undefined"!==a&&null!=a&&a.each(function(){if(d(this).is("img")){var a=ya(this.src);e.images[a]={url:this.src,src:this.src}}xa(b,d(this).children(),e)}))}function Ka(b,a){function c(b){if(b.url)if(b.src){var c=new Image;q=++f;c.crossOrigin="Anonymous";c.onerror=c.onload=function(){if(c.complete&&
+(0===c.src.indexOf("data:image/")&&(c.width=b.width||c.width||0,c.height=b.height||c.height||0),c.width+c.height)){var e=document.createElement("canvas"),d=e.getContext("2d");e.width=c.width;e.height=c.height;d.drawImage(c,0,0);b.src=e.toDataURL("image/png")}--f||a(q)};c.src=b.url}else{var e=d(b.url);e.length&&(q=++f,html2canvas(e[0]).then(function(c){b.src=c.toDataURL("image/png");--f||a(q)}))}}var q=0,f=0;if("undefined"!==typeof b.images)for(var h in b.images)b.images.hasOwnProperty(h)&&c(b.images[h]);
+(b=f)||(a(q),b=void 0);return b}function za(b,c,e){c.each(function(){if(d(this).is("div")){var c=fa(M(this,"background-color"),[255,255,255]),f=fa(M(this,"border-top-color"),[0,0,0]),h=ha(this,"border-top-width",a.jspdf.unit),n=this.getBoundingClientRect(),l=this.offsetLeft*e.wScaleFactor,u=this.offsetTop*e.hScaleFactor,g=n.width*e.wScaleFactor;n=n.height*e.hScaleFactor;e.doc.setDrawColor.apply(void 0,f);e.doc.setFillColor.apply(void 0,c);e.doc.setLineWidth(h);e.doc.rect(b.x+l,b.y+u,g,n,h?"FD":"F")}else d(this).is("img")&&
+(c=ya(this.src),ua(b,this,c,e));za(b,d(this).children(),e)})}function Aa(b,c,e){if("function"===typeof e.onAutotableText)e.onAutotableText(e.doc,b,c);else{var q=b.textPos.x,f=b.textPos.y,h={halign:b.styles.halign,valign:b.styles.valign};if(c.length){for(c=c[0];c.previousSibling;)c=c.previousSibling;for(var n=!1,l=!1;c;){var u=c.innerText||c.textContent||"",g=u.length&&" "===u[0]?" ":"",k=1<u.length&&" "===u[u.length-1]?" ":"";!0!==a.preserve.leadingWS&&(u=g+la(u));!0!==a.preserve.trailingWS&&(u=ma(u)+
+k);d(c).is("br")&&(q=b.textPos.x,f+=e.doc.internal.getFontSize());d(c).is("b")?n=!0:d(c).is("i")&&(l=!0);(n||l)&&e.doc.setFontType(n&&l?"bolditalic":n?"bold":"italic");if(g=e.doc.getStringUnitWidth(u)*e.doc.internal.getFontSize()){"linebreak"===b.styles.overflow&&q>b.textPos.x&&q+g>b.textPos.x+b.width&&(0<=".,!%*;:=-".indexOf(u.charAt(0))&&(k=u.charAt(0),g=e.doc.getStringUnitWidth(k)*e.doc.internal.getFontSize(),q+g<=b.textPos.x+b.width&&(e.doc.autoTableText(k,q,f,h),u=u.substring(1,u.length)),g=
+e.doc.getStringUnitWidth(u)*e.doc.internal.getFontSize()),q=b.textPos.x,f+=e.doc.internal.getFontSize());if("visible"!==b.styles.overflow)for(;u.length&&q+g>b.textPos.x+b.width;)u=u.substring(0,u.length-1),g=e.doc.getStringUnitWidth(u)*e.doc.internal.getFontSize();e.doc.autoTableText(u,q,f,h);q+=g}if(n||l)d(c).is("b")?n=!1:d(c).is("i")&&(l=!1),e.doc.setFontType(n||l?n?"bold":"italic":"normal");c=c.nextSibling}b.textPos.x=q;b.textPos.y=f}else e.doc.autoTableText(b.text,b.textPos.x,b.textPos.y,h)}}
+function W(b,a,e){return null==b?"":b.toString().replace(new RegExp(null==a?"":a.toString().replace(/([.*+?^=!:${}()|\[\]\/\\])/g,"\\$1"),"g"),e)}function la(b){return null==b?"":b.toString().replace(/^\s+/,"")}function ma(b){return null==b?"":b.toString().replace(/\s+$/,"")}function La(b){if(0===a.date.html.length)return!1;a.date.pattern.lastIndex=0;var c=a.date.pattern.exec(b);if(null==c)return!1;b=+c[a.date.match_y];if(0>b||8099<b)return!1;var e=1*c[a.date.match_m];c=1*c[a.date.match_d];if(!isFinite(c))return!1;
+var d=new Date(b,e-1,c,0,0,0);return d.getFullYear()===b&&d.getMonth()===e-1&&d.getDate()===c?new Date(Date.UTC(b,e-1,c,0,0,0)):!1}function na(b){b=b||"0";""!==a.numbers.html.thousandsSeparator&&(b=W(b,a.numbers.html.thousandsSeparator,""));"."!==a.numbers.html.decimalMark&&(b=W(b,a.numbers.html.decimalMark,"."));return"number"===typeof b||!1!==jQuery.isNumeric(b)?b:!1}function Ma(b){-1<b.indexOf("%")?(b=na(b.replace(/%/g,"")),!1!==b&&(b/=100)):b=!1;return b}function D(b,c,e,q){var f="",h="text";
+if(null!==b){var n=d(b);n.removeData("teUserDefText");if(n[0].hasAttribute("data-tableexport-canvas"))var l="";else if(n[0].hasAttribute("data-tableexport-value"))l=(l=n.attr("data-tableexport-value"))?l+"":"",n.data("teUserDefText",1);else if(l=n.html(),"function"===typeof a.onCellHtmlData)l=a.onCellHtmlData(n,c,e,l),n.data("teUserDefText",1);else if(""!==l){b=d.parseHTML(l);var g=0,k=0;l="";d.each(b,function(){if(d(this).is("input"))l+=n.find("input").eq(g++).val();else if(d(this).is("select"))l+=
+n.find("select option:selected").eq(k++).text();else if(d(this).is("br"))l+="<br>";else{if("undefined"===typeof d(this).html())l+=d(this).text();else if(void 0===jQuery().bootstrapTable||!1===d(this).hasClass("fht-cell")&&!1===d(this).hasClass("filterControl")&&0===n.parents(".detail-view").length)l+=d(this).html();if(d(this).is("a")){var b=n.find("a").attr("href")||"";f="function"===typeof a.onCellHtmlHyperlink?f+a.onCellHtmlHyperlink(n,c,e,b,l):"href"===a.htmlHyperlink?f+b:f+l;l=""}}})}if(l&&""!==
+l&&!0===a.htmlContent)f=d.trim(l);else if(l&&""!==l)if(""!==n.attr("data-tableexport-cellformat")){var m=l.replace(/\n/g,"\u2028").replace(/(<\s*br([^>]*)>)/gi,"\u2060"),p=d("<div/>").html(m).contents();b=!1;m="";d.each(p.text().split("\u2028"),function(b,c){0<b&&(m+=" ");!0!==a.preserve.leadingWS&&(c=la(c));m+=!0!==a.preserve.trailingWS?ma(c):c});d.each(m.split("\u2060"),function(b,c){0<b&&(f+="\n");!0!==a.preserve.leadingWS&&(c=la(c));!0!==a.preserve.trailingWS&&(c=ma(c));f+=c.replace(/\u00AD/g,
+"")});f=f.replace(/\u00A0/g," ");if("json"===a.type||"excel"===a.type&&"xmlss"===a.mso.fileFormat||!1===a.numbers.output)b=na(f),!1!==b&&(h="number",f=Number(b));else if(a.numbers.html.decimalMark!==a.numbers.output.decimalMark||a.numbers.html.thousandsSeparator!==a.numbers.output.thousandsSeparator)if(b=na(f),!1!==b){p=(""+b.substr(0>b?1:0)).split(".");1===p.length&&(p[1]="");var t=3<p[0].length?p[0].length%3:0;h="number";f=(0>b?"-":"")+(a.numbers.output.thousandsSeparator?(t?p[0].substr(0,t)+a.numbers.output.thousandsSeparator:
+"")+p[0].substr(t).replace(/(\d{3})(?=\d)/g,"$1"+a.numbers.output.thousandsSeparator):p[0])+(p[1].length?a.numbers.output.decimalMark+p[1]:"")}}else f=l;!0===a.escape&&(f=escape(f));"function"===typeof a.onCellData&&(f=a.onCellData(n,c,e,f,h),n.data("teUserDefText",1))}void 0!==q&&(q.type=h);return f}function Ba(b){return 0<b.length&&!0===a.preventInjection&&0<="=+-@".indexOf(b.charAt(0))?"'"+b:b}function Na(b,a,e){return a+"-"+e.toLowerCase()}function fa(b,a){(b=/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/.exec(b))&&
+(a=[parseInt(b[1]),parseInt(b[2]),parseInt(b[3])]);return a}function Ca(b){var a=M(b,"text-align"),e=M(b,"font-weight"),d=M(b,"font-style"),f="";"start"===a&&(a="rtl"===M(b,"direction")?"right":"left");700<=e&&(f="bold");"italic"===d&&(f+=d);""===f&&(f="normal");a={style:{align:a,bcolor:fa(M(b,"background-color"),[255,255,255]),color:fa(M(b,"color"),[0,0,0]),fstyle:f},colspan:J(b),rowspan:T(b)};null!==b&&(b=b.getBoundingClientRect(),a.rect={width:b.width,height:b.height});return a}function J(b){var a=
+d(b).attr("data-tableexport-colspan");"undefined"===typeof a&&d(b).is("[colspan]")&&(a=d(b).attr("colspan"));return parseInt(a)||0}function T(b){var a=d(b).attr("data-tableexport-rowspan");"undefined"===typeof a&&d(b).is("[rowspan]")&&(a=d(b).attr("rowspan"));return parseInt(a)||0}function M(a,c){try{return window.getComputedStyle?(c=c.replace(/([a-z])([A-Z])/,Na),window.getComputedStyle(a,null).getPropertyValue(c)):a.currentStyle?a.currentStyle[c]:a.style[c]}catch(e){}return""}function ha(a,c,e){c=
+M(a,c).match(/\d+/);if(null!==c){c=c[0];a=a.parentElement;var b=document.createElement("div");b.style.overflow="hidden";b.style.visibility="hidden";a.appendChild(b);b.style.width=100+e;e=100/b.offsetWidth;a.removeChild(b);return c*e}return 0}function Oa(a){for(var b=new ArrayBuffer(a.length),e=new Uint8Array(b),d=0;d!==a.length;++d)e[d]=a.charCodeAt(d)&255;return b}function oa(a){var b=a.c,e="";for(++b;b;b=Math.floor((b-1)/26))e=String.fromCharCode((b-1)%26+65)+e;return e+(""+(a.r+1))}function pa(a,
+c){if("undefined"===typeof c||"number"===typeof c)return pa(a.s,a.e);"string"!==typeof a&&(a=oa(a));"string"!==typeof c&&(c=oa(c));return a===c?a:a+":"+c}function Da(a,c){var b=Number(a);if(isFinite(b))return b;var d=1;""!==c.thousandsSeparator&&(a=a.replace(new RegExp("([\\d])"+c.thousandsSeparator+"([\\d])","g"),"$1$2"));"."!==c.decimalMark&&(a=a.replace(new RegExp("([\\d])"+c.decimalMark+"([\\d])","g"),"$1.$2"));a=a.replace(/[$]/g,"").replace(/[%]/g,function(){d*=100;return""});if(isFinite(b=Number(a)))return b/
+d;a=a.replace(/[(](.*)[)]/,function(a,b){d=-d;return b});return isFinite(b=Number(a))?b/d:b}function ya(a){var b=0,d;if(0===a.length)return b;var q=0;for(d=a.length;q<d;q++){var f=a.charCodeAt(q);b=(b<<5)-b+f;b|=0}return b}function N(b,c,d,q,f,h){var e=!0;"function"===typeof a.onBeforeSaveToFile&&(e=a.onBeforeSaveToFile(b,c,d,q,f),"boolean"!==typeof e&&(e=!0));if(e)try{if(Ea=new Blob([b],{type:d+";charset="+q}),saveAs(Ea,c,!1===h),"function"===typeof a.onAfterSaveToFile)a.onAfterSaveToFile(b,c)}catch(l){ka(c,
+"data:"+d+(q.length?";charset="+q:"")+(f.length?";"+f:"")+",",h?"\ufeff"+b:b)}}function ka(b,c,d){var e=window.navigator.userAgent;if(!1!==b&&window.navigator.msSaveOrOpenBlob)window.navigator.msSaveOrOpenBlob(new Blob([d]),b);else if(!1!==b&&(0<e.indexOf("MSIE ")||e.match(/Trident.*rv\:11\./))){if(c=document.createElement("iframe")){document.body.appendChild(c);c.setAttribute("style","display:none");c.contentDocument.open("txt/plain","replace");c.contentDocument.write(d);c.contentDocument.close();
+c.contentWindow.focus();switch(b.substr(b.lastIndexOf(".")+1)){case "doc":case "json":case "png":case "pdf":case "xls":case "xlsx":b+=".txt"}c.contentDocument.execCommand("SaveAs",!0,b);document.body.removeChild(c)}}else{var f=document.createElement("a");if(f){var h=null;f.style.display="none";!1!==b?f.download=b:f.target="_blank";"object"===typeof d?(window.URL=window.URL||window.webkitURL,e=[],e.push(d),h=window.URL.createObjectURL(new Blob(e,{type:c})),f.href=h):0<=c.toLowerCase().indexOf("base64,")?
+f.href=c+L(d):f.href=c+encodeURIComponent(d);document.body.appendChild(f);if(document.createEvent)null===ia&&(ia=document.createEvent("MouseEvents")),ia.initEvent("click",!0,!1),f.dispatchEvent(ia);else if(document.createEventObject)f.fireEvent("onclick");else if("function"===typeof f.onclick)f.onclick();setTimeout(function(){h&&window.URL.revokeObjectURL(h);document.body.removeChild(f);if("function"===typeof a.onAfterSaveToFile)a.onAfterSaveToFile(d,b)},100)}}}function L(a){var b,d="",q=0;if("string"===
+typeof a){a=a.replace(/\x0d\x0a/g,"\n");var f="";for(b=0;b<a.length;b++){var h=a.charCodeAt(b);128>h?f+=String.fromCharCode(h):(127<h&&2048>h?f+=String.fromCharCode(h>>6|192):(f+=String.fromCharCode(h>>12|224),f+=String.fromCharCode(h>>6&63|128)),f+=String.fromCharCode(h&63|128))}a=f}for(;q<a.length;){var n=a.charCodeAt(q++);f=a.charCodeAt(q++);b=a.charCodeAt(q++);h=n>>2;n=(n&3)<<4|f>>4;var l=(f&15)<<2|b>>6;var g=b&63;isNaN(f)?l=g=64:isNaN(b)&&(g=64);d=d+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(h)+
+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(n)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(l)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(g)}return d}var a={csvEnclosure:'"',csvSeparator:",",csvUseBOM:!0,date:{html:"dd/mm/yyyy"},displayTableName:!1,escape:!1,exportHiddenCells:!1,fileName:"tableExport",htmlContent:!1,htmlHyperlink:"content",ignoreColumn:[],ignoreRow:[],jsonScope:"all",jspdf:{orientation:"p",
+unit:"pt",format:"a4",margins:{left:20,right:10,top:10,bottom:10},onDocCreated:null,autotable:{styles:{cellPadding:2,rowHeight:12,fontSize:8,fillColor:255,textColor:50,fontStyle:"normal",overflow:"ellipsize",halign:"inherit",valign:"middle"},headerStyles:{fillColor:[52,73,94],textColor:255,fontStyle:"bold",halign:"inherit",valign:"middle"},alternateRowStyles:{fillColor:245},tableExport:{doc:null,onAfterAutotable:null,onBeforeAutotable:null,onAutotableText:null,onTable:null,outputImages:!0}}},mso:{fileFormat:"xlshtml",
+onMsoNumberFormat:null,pageFormat:"a4",pageOrientation:"portrait",rtl:!1,styles:[],worksheetName:"",xslx:{formatId:{date:14,numbers:2}}},numbers:{html:{decimalMark:".",thousandsSeparator:","},output:{decimalMark:".",thousandsSeparator:","}},onAfterSaveToFile:null,onBeforeSaveToFile:null,onCellData:null,onCellHtmlData:null,onCellHtmlHyperlink:null,onIgnoreRow:null,onTableExportBegin:null,onTableExportEnd:null,outputMode:"file",pdfmake:{enabled:!1,docDefinition:{pageSize:"A4",pageOrientation:"portrait",
+styles:{header:{background:"#34495E",color:"#FFFFFF",bold:!0,alignment:"center",fillColor:"#34495E"},alternateRow:{fillColor:"#f5f5f5"}},defaultStyle:{color:"#000000",fontSize:8,font:"Roboto"}},fonts:{}},preserve:{leadingWS:!1,trailingWS:!1},preventInjection:!0,sql:{tableEnclosure:"`",columnEnclosure:"`"},tbodySelector:"tr",tfootSelector:"tr",theadSelector:"tr",tableName:"Table",type:"csv"},O={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],dl:[311.81,623.62],letter:[612,792],"government-letter":[576,756],legal:[612,1008],"junior-legal":[576,360],ledger:[1224,792],tabloid:[792,1224],"credit-card":[153,243]},B=this,ia=null,r=[],w=[],p=0,t="",S=[],G=[],Ea,K=[],V=!1;d.extend(!0,a,k);"xlsx"===a.type&&(a.mso.fileFormat=a.type,a.type="excel");"undefined"!==typeof a.excelFileFormat&&"undefined"===a.mso.fileFormat&&(a.mso.fileFormat=a.excelFileFormat);"undefined"!==typeof a.excelPageFormat&&"undefined"===a.mso.pageFormat&&
+(a.mso.pageFormat=a.excelPageFormat);"undefined"!==typeof a.excelPageOrientation&&"undefined"===a.mso.pageOrientation&&(a.mso.pageOrientation=a.excelPageOrientation);"undefined"!==typeof a.excelRTL&&"undefined"===a.mso.rtl&&(a.mso.rtl=a.excelRTL);"undefined"!==typeof a.excelstyles&&"undefined"===a.mso.styles&&(a.mso.styles=a.excelstyles);"undefined"!==typeof a.onMsoNumberFormat&&"undefined"===a.mso.onMsoNumberFormat&&(a.mso.onMsoNumberFormat=a.onMsoNumberFormat);"undefined"!==typeof a.worksheetName&&
+"undefined"===a.mso.worksheetName&&(a.mso.worksheetName=a.worksheetName);a.mso.pageOrientation="l"===a.mso.pageOrientation.substr(0,1)?"landscape":"portrait";a.date.html=a.date.html||"";if(a.date.html.length){k=[];k.dd="(3[01]|[12][0-9]|0?[1-9])";k.mm="(1[012]|0?[1-9])";k.yyyy="((?:1[6-9]|2[0-2])\\d{2})";k.yy="(\\d{2})";var z=a.date.html.match(/[^a-zA-Z0-9]/)[0];z=a.date.html.toLowerCase().split(z);a.date.regex="^\\s*";a.date.regex+=k[z[0]];a.date.regex+="(.)";a.date.regex+=k[z[1]];a.date.regex+=
+"\\2";a.date.regex+=k[z[2]];a.date.regex+="\\s*$";a.date.pattern=new RegExp(a.date.regex,"g");k=z.indexOf("dd")+1;a.date.match_d=k+(1<k?1:0);k=z.indexOf("mm")+1;a.date.match_m=k+(1<k?1:0);k=(0<=z.indexOf("yyyy")?z.indexOf("yyyy"):z.indexOf("yy"))+1;a.date.match_y=k+(1<k?1:0)}S=R(B);if("function"===typeof a.onTableExportBegin)a.onTableExportBegin();if("csv"===a.type||"tsv"===a.type||"txt"===a.type){var P="",Z=0;G=[];p=0;var qa=function(b,c,e){b.each(function(){t="";E(this,c,p,e+b.length,function(b,
+c,d){var e=t,f="";if(null!==b)if(b=D(b,c,d),c=null===b||""===b?"":b.toString(),"tsv"===a.type)b instanceof Date&&b.toLocaleString(),f=W(c,"\t"," ");else if(b instanceof Date)f=a.csvEnclosure+b.toLocaleString()+a.csvEnclosure;else if(f=Ba(c),f=W(f,a.csvEnclosure,a.csvEnclosure+a.csvEnclosure),0<=f.indexOf(a.csvSeparator)||/[\r\n ]/g.test(f))f=a.csvEnclosure+f+a.csvEnclosure;t=e+(f+("tsv"===a.type?"\t":a.csvSeparator))});t=d.trim(t).substring(0,t.length-1);0<t.length&&(0<P.length&&(P+="\n"),P+=t);p++});
+return b.length};Z+=qa(d(B).find("thead").first().find(a.theadSelector),"th,td",Z);v(d(B),"tbody").each(function(){Z+=qa(v(d(this),a.tbodySelector),"td,th",Z)});a.tfootSelector.length&&qa(d(B).find("tfoot").first().find(a.tfootSelector),"td,th",Z);P+="\n";if("string"===a.outputMode)return P;if("base64"===a.outputMode)return L(P);if("window"===a.outputMode){ka(!1,"data:text/"+("csv"===a.type?"csv":"plain")+";charset=utf-8,",P);return}N(P,a.fileName+"."+a.type,"text/"+("csv"===a.type?"csv":"plain"),
+"utf-8","","csv"===a.type&&a.csvUseBOM)}else if("sql"===a.type){p=0;G=[];var A="INSERT INTO "+a.sql.tableEnclosure+a.tableName+a.sql.tableEnclosure+" (";r=y(d(B));d(r).each(function(){E(this,"th,td",p,r.length,function(b,c,d){b=D(b,c,d)||"";-1<b.indexOf(a.sql.columnEnclosure)&&(b=W(b.toString(),a.sql.columnEnclosure,a.sql.columnEnclosure+a.sql.columnEnclosure));A+=a.sql.columnEnclosure+b+a.sql.columnEnclosure+","});p++;A=d.trim(A).substring(0,A.length-1)});A+=") VALUES ";w=C(d(B));d(w).each(function(){t=
+"";E(this,"td,th",p,r.length+w.length,function(a,c,d){a=D(a,c,d)||"";-1<a.indexOf("'")&&(a=W(a.toString(),"'","''"));t+="'"+a+"',"});3<t.length&&(A+="("+t,A=d.trim(A).substring(0,A.length-1),A+="),");p++});A=d.trim(A).substring(0,A.length-1);A+=";";if("string"===a.outputMode)return A;if("base64"===a.outputMode)return L(A);N(A,a.fileName+".sql","application/sql","utf-8","",!1)}else if("json"===a.type){var X=[];G=[];r=y(d(B));d(r).each(function(){var a=[];E(this,"th,td",p,r.length,function(b,d,g){a.push(D(b,
+d,g))});X.push(a)});var ra=[];w=C(d(B));d(w).each(function(){var a={},c=0;E(this,"td,th",p,r.length+w.length,function(b,d,f){X.length?a[X[X.length-1][c]]=D(b,d,f):a[c]=D(b,d,f);c++});!1===d.isEmptyObject(a)&&ra.push(a);p++});k="head"===a.jsonScope?JSON.stringify(X):"data"===a.jsonScope?JSON.stringify(ra):JSON.stringify({header:X,data:ra});if("string"===a.outputMode)return k;if("base64"===a.outputMode)return L(k);N(k,a.fileName+".json","application/json","utf-8","base64",!1)}else if("xml"===a.type){p=
+0;G=[];var Q='<?xml version="1.0" encoding="utf-8"?>';Q+="<tabledata><fields>";r=y(d(B));d(r).each(function(){E(this,"th,td",p,r.length,function(a,d,e){Q+="<field>"+D(a,d,e)+"</field>"});p++});Q+="</fields><data>";var Fa=1;w=C(d(B));d(w).each(function(){var a=1;t="";E(this,"td,th",p,r.length+w.length,function(b,d,g){t+="<column-"+a+">"+D(b,d,g)+"</column-"+a+">";a++});0<t.length&&"<column-1></column-1>"!==t&&(Q+='<row id="'+Fa+'">'+t+"</row>",Fa++);p++});Q+="</data></tabledata>";if("string"===a.outputMode)return Q;
+if("base64"===a.outputMode)return L(Q);N(Q,a.fileName+".xml","application/xml","utf-8","base64",!1)}else if("excel"===a.type&&"xmlss"===a.mso.fileFormat){var sa=[],F=[];d(B).filter(function(){return I(d(this))}).each(function(){function b(a,b,c){var f=[];d(a).each(function(){var b=0,e=0;t="";E(this,"td,th",p,c+a.length,function(a,c,h){if(null!==a){var l="";c=D(a,c,h);h="String";if(!1!==jQuery.isNumeric(c))h="Number";else{var n=Ma(c);!1!==n&&(c=n,h="Number",l+=' ss:StyleID="pct1"')}"Number"!==h&&(c=
+c.replace(/\n/g,"<br>"));n=J(a);a=T(a);d.each(f,function(){if(p>=this.s.r&&p<=this.e.r&&e>=this.s.c&&e<=this.e.c)for(var a=0;a<=this.e.c-this.s.c;++a)e++,b++});if(a||n)a=a||1,n=n||1,f.push({s:{r:p,c:e},e:{r:p+a-1,c:e+n-1}});1<n&&(l+=' ss:MergeAcross="'+(n-1)+'"',e+=n-1);1<a&&(l+=' ss:MergeDown="'+(a-1)+'" ss:StyleID="rsp1"');0<b&&(l+=' ss:Index="'+(e+1)+'"',b=0);t+="<Cell"+l+'><Data ss:Type="'+h+'">'+d("<div />").text(c).html()+"</Data></Cell>\r";e++}});0<t.length&&(H+='<Row ss:AutoFitHeight="0">\r'+
+t+"</Row>\r");p++});return a.length}var c=d(this),e="";"string"===typeof a.mso.worksheetName&&a.mso.worksheetName.length?e=a.mso.worksheetName+" "+(F.length+1):"undefined"!==typeof a.mso.worksheetName[F.length]&&(e=a.mso.worksheetName[F.length]);e.length||(e=c.find("caption").text()||"");e.length||(e="Table "+(F.length+1));e=d.trim(e.replace(/[\\\/[\]*:?'"]/g,"").substring(0,31));F.push(d("<div />").text(e).html());!1===a.exportHiddenCells&&(K=c.find("tr, th, td").filter(":hidden"),V=0<K.length);
+p=0;S=R(this);H="<Table>\r";e=b(y(c),"th,td",0);b(C(c),"td,th",e);H+="</Table>\r";sa.push(H)});k={};z={};for(var m,aa,Y=0,ea=F.length;Y<ea;Y++)m=F[Y],aa=k[m],aa=k[m]=null==aa?1:aa+1,2===aa&&(F[z[m]]=F[z[m]].substring(0,29)+"-1"),1<k[m]?F[Y]=F[Y].substring(0,29)+"-"+k[m]:z[m]=Y;k='<?xml version="1.0" encoding="UTF-8"?>\r<?mso-application progid="Excel.Sheet"?>\r<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"\r xmlns:o="urn:schemas-microsoft-com:office:office"\r xmlns:x="urn:schemas-microsoft-com:office:excel"\r xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"\r xmlns:html="http://www.w3.org/TR/REC-html40">\r<DocumentProperties xmlns="urn:schemas-microsoft-com:office:office">\r  <Created>'+
+(new Date).toISOString()+'</Created>\r</DocumentProperties>\r<OfficeDocumentSettings xmlns="urn:schemas-microsoft-com:office:office">\r  <AllowPNG/>\r</OfficeDocumentSettings>\r<ExcelWorkbook xmlns="urn:schemas-microsoft-com:office:excel">\r  <WindowHeight>9000</WindowHeight>\r  <WindowWidth>13860</WindowWidth>\r  <WindowTopX>0</WindowTopX>\r  <WindowTopY>0</WindowTopY>\r  <ProtectStructure>False</ProtectStructure>\r  <ProtectWindows>False</ProtectWindows>\r</ExcelWorkbook>\r<Styles>\r  <Style ss:ID="Default" ss:Name="Normal">\r    <Alignment ss:Vertical="Bottom"/>\r    <Borders/>\r    <Font/>\r    <Interior/>\r    <NumberFormat/>\r    <Protection/>\r  </Style>\r  <Style ss:ID="rsp1">\r    <Alignment ss:Vertical="Center"/>\r  </Style>\r  <Style ss:ID="pct1">\r    <NumberFormat ss:Format="Percent"/>\r  </Style>\r</Styles>\r';
+for(z=0;z<sa.length;z++)k+='<Worksheet ss:Name="'+F[z]+'" ss:RightToLeft="'+(a.mso.rtl?"1":"0")+'">\r'+sa[z],k=a.mso.rtl?k+'<WorksheetOptions xmlns="urn:schemas-microsoft-com:office:excel">\r<DisplayRightToLeft/>\r</WorksheetOptions>\r':k+'<WorksheetOptions xmlns="urn:schemas-microsoft-com:office:excel"/>\r',k+="</Worksheet>\r";k+="</Workbook>\r";if("string"===a.outputMode)return k;if("base64"===a.outputMode)return L(k);N(k,a.fileName+".xml","application/xml","utf-8","base64",!1)}else if("excel"===
+a.type&&"xlsx"===a.mso.fileFormat){var ba=[],Ga=XLSX.utils.book_new();d(B).filter(function(){return I(d(this))}).each(function(){for(var b=d(this),c={},e=this.getElementsByTagName("tr"),g={s:{r:0,c:0},e:{r:0,c:0}},f=[],h,n=[],l=0,u=0,k,m,p,t,r,w=XLSX.SSF.get_table();l<e.length&&1E7>u;++l)if(k=e[l],m=!1,"function"===typeof a.onIgnoreRow&&(m=a.onIgnoreRow(d(k),l)),!0!==m&&(0===a.ignoreRow.length||-1===d.inArray(l,a.ignoreRow)&&-1===d.inArray(l-e.length,a.ignoreRow))&&!1!==I(d(k))){var y=k.children,
+B=0;for(k=0;k<y.length;++k)r=y[k],t=+J(r)||1,B+=t;var z=0;for(k=m=0;k<y.length;++k)if(r=y[k],t=+J(r)||1,h=k+z,!ta(d(r),B,h+(h<m?m-h:0))){z+=t-1;for(h=0;h<f.length;++h){var v=f[h];v.s.c==m&&v.s.r<=u&&u<=v.e.r&&(m=v.e.c+1,h=-1)}(0<(p=+T(r))||1<t)&&f.push({s:{r:u,c:m},e:{r:u+(p||1)-1,c:m+t-1}});var C={type:""};h=D(r,l,k+z,C);v={t:"s",v:h};var A="";if(""!==(d(r).attr("data-tableexport-cellformat")||"")){var x=parseInt(d(r).attr("data-tableexport-xlsxformatid")||0);0===x&&"function"===typeof a.mso.xslx.formatId.numbers&&
+(x=a.mso.xslx.formatId.numbers(d(r),l,k+z));0===x&&"function"===typeof a.mso.xslx.formatId.date&&(x=a.mso.xslx.formatId.date(d(r),l,k+z));if(49===x||"@"===x)A="s";else if("number"===C.type||0<x&&14>x||36<x&&41>x||48===x)A="n";else if("date"===C.type||13<x&&37>x||44<x&&48>x||56===x)A="d"}else A="s";if(null!=h)if(0===h.length)v.t="z";else if(0!==h.trim().length)if("s"===A)d(r).find("a").length&&(h="href"!==a.htmlHyperlink?h:"",v={f:'=HYPERLINK("'+d(r).find("a").attr("href")+(h.length?'","'+h:"")+'")'});
+else if("function"===C.type)v={f:h};else if("TRUE"===h)v={t:"b",v:!0};else if("FALSE"===h)v={t:"b",v:!1};else if("n"===A||isFinite(Da(h,a.numbers.output))){if(r=Da(h,a.numbers.output),0===x&&"function"!==typeof a.mso.xslx.formatId.numbers&&(x=a.mso.xslx.formatId.numbers),isFinite(r)||isFinite(h))v={t:"n",v:isFinite(r)?r:h,z:"string"===typeof x?x:x in w?w[x]:"0.00"}}else if(!1!==(r=La(h))||"d"===A)0===x&&"function"!==typeof a.mso.xslx.formatId.date&&(x=a.mso.xslx.formatId.date),v={t:"d",v:!1!==r?r:
+h,z:"string"===typeof x?x:x in w?w[x]:"m/d/yy"};c[oa({c:m,r:u})]=v;g.e.c<m&&(g.e.c=m);m+=t}++u}f.length&&(c["!merges"]=f);n.length&&(c["!rows"]=n);g.e.r=u-1;c["!ref"]=pa(g);1E7<=u&&(c["!fullref"]=pa((g.e.r=e.length-l+u-1,g)));e="";"string"===typeof a.mso.worksheetName&&a.mso.worksheetName.length?e=a.mso.worksheetName+" "+(ba.length+1):"undefined"!==typeof a.mso.worksheetName[ba.length]&&(e=a.mso.worksheetName[ba.length]);e.length||(e=b.find("caption").text()||"");e.length||(e="Table "+(ba.length+
+1));e=d.trim(e.replace(/[\\\/[\]*:?'"]/g,"").substring(0,31));ba.push(e);XLSX.utils.book_append_sheet(Ga,c,e)});k=XLSX.write(Ga,{type:"binary",bookType:a.mso.fileFormat,bookSST:!1});N(Oa(k),a.fileName+"."+a.mso.fileFormat,"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","UTF-8","",!1)}else if("excel"===a.type||"xls"===a.type||"word"===a.type||"doc"===a.type){k="excel"===a.type||"xls"===a.type?"excel":"word";z="excel"===k?"xls":"doc";m='xmlns:x="urn:schemas-microsoft-com:office:'+
+k+'"';var H="",ca="";d(B).filter(function(){return I(d(this))}).each(function(){var b=d(this);""===ca&&(ca=a.mso.worksheetName||b.find("caption").text()||"Table",ca=d.trim(ca.replace(/[\\\/[\]*:?'"]/g,"").substring(0,31)));!1===a.exportHiddenCells&&(K=b.find("tr, th, td").filter(":hidden"),V=0<K.length);p=0;G=[];S=R(this);H+="<table><thead>";r=y(b);d(r).each(function(){var b=d(this);t="";E(this,"th,td",p,r.length,function(d,c,f){if(null!==d){var e="";t+="<th";if(a.mso.styles.length){var n=document.defaultView.getComputedStyle(d,
+null),l=document.defaultView.getComputedStyle(b[0],null),g;for(g in a.mso.styles){var k=n[a.mso.styles[g]];""===k&&(k=l[a.mso.styles[g]]);""!==k&&"0px none rgb(0, 0, 0)"!==k&&"rgba(0, 0, 0, 0)"!==k&&(e+=""===e?'style="':";",e+=a.mso.styles[g]+":"+k)}}""!==e&&(t+=" "+e+'"');e=J(d);0<e&&(t+=' colspan="'+e+'"');e=T(d);0<e&&(t+=' rowspan="'+e+'"');t+=">"+D(d,c,f)+"</th>"}});0<t.length&&(H+="<tr>"+t+"</tr>");p++});H+="</thead><tbody>";w=C(b);d(w).each(function(){var b=d(this);t="";E(this,"td,th",p,r.length+
+w.length,function(c,g,f){if(null!==c){var e=D(c,g,f),n="",l=d(c).attr("data-tableexport-msonumberformat");"undefined"===typeof l&&"function"===typeof a.mso.onMsoNumberFormat&&(l=a.mso.onMsoNumberFormat(c,g,f));"undefined"!==typeof l&&""!==l&&(n="style=\"mso-number-format:'"+l+"'");if(a.mso.styles.length){g=document.defaultView.getComputedStyle(c,null);f=document.defaultView.getComputedStyle(b[0],null);for(var k in a.mso.styles)l=g[a.mso.styles[k]],""===l&&(l=f[a.mso.styles[k]]),""!==l&&"0px none rgb(0, 0, 0)"!==
+l&&"rgba(0, 0, 0, 0)"!==l&&(n+=""===n?'style="':";",n+=a.mso.styles[k]+":"+l)}t+="<td";""!==n&&(t+=" "+n+'"');n=J(c);0<n&&(t+=' colspan="'+n+'"');c=T(c);0<c&&(t+=' rowspan="'+c+'"');"string"===typeof e&&""!==e&&(e=Ba(e),e=e.replace(/\n/g,"<br>"));t+=">"+e+"</td>"}});0<t.length&&(H+="<tr>"+t+"</tr>");p++});a.displayTableName&&(H+="<tr><td></td></tr><tr><td></td></tr><tr><td>"+D(d("<p>"+a.tableName+"</p>"))+"</td></tr>");H+="</tbody></table>"});m='<html xmlns:o="urn:schemas-microsoft-com:office:office" '+
+m+' xmlns="http://www.w3.org/TR/REC-html40">'+('<meta http-equiv="content-type" content="application/vnd.ms-'+k+'; charset=UTF-8">')+"<head>";"excel"===k&&(m+="\x3c!--[if gte mso 9]>",m+="<xml>",m+="<x:ExcelWorkbook>",m+="<x:ExcelWorksheets>",m+="<x:ExcelWorksheet>",m+="<x:Name>",m+=ca,m+="</x:Name>",m+="<x:WorksheetOptions>",m+="<x:DisplayGridlines/>",a.mso.rtl&&(m+="<x:DisplayRightToLeft/>"),m+="</x:WorksheetOptions>",m+="</x:ExcelWorksheet>",m+="</x:ExcelWorksheets>",m+="</x:ExcelWorkbook>",m+=
+"</xml>",m+="<![endif]--\x3e");m+="<style>";m+="@page { size:"+a.mso.pageOrientation+"; mso-page-orientation:"+a.mso.pageOrientation+"; }";m+="@page Section1 {size:"+O[a.mso.pageFormat][0]+"pt "+O[a.mso.pageFormat][1]+"pt";m+="; margin:1.0in 1.25in 1.0in 1.25in;mso-header-margin:.5in;mso-footer-margin:.5in;mso-paper-source:0;}";m+="div.Section1 {page:Section1;}";m+="@page Section2 {size:"+O[a.mso.pageFormat][1]+"pt "+O[a.mso.pageFormat][0]+"pt";m+=";mso-page-orientation:"+a.mso.pageOrientation+";margin:1.25in 1.0in 1.25in 1.0in;mso-header-margin:.5in;mso-footer-margin:.5in;mso-paper-source:0;}";
+m+="div.Section2 {page:Section2;}";m+="br {mso-data-placement:same-cell;}";m+="</style>";m+="</head>";m+="<body>";m+='<div class="Section'+("landscape"===a.mso.pageOrientation?"2":"1")+'">';m+=H;m+="</div>";m+="</body>";m+="</html>";if("string"===a.outputMode)return m;if("base64"===a.outputMode)return L(m);N(m,a.fileName+"."+z,"application/vnd.ms-"+k,"","base64",!1)}else if("png"===a.type)html2canvas(d(B)[0]).then(function(b){b=b.toDataURL();for(var c=atob(b.substring(22)),d=new ArrayBuffer(c.length),
+g=new Uint8Array(d),f=0;f<c.length;f++)g[f]=c.charCodeAt(f);if("string"===a.outputMode)return c;if("base64"===a.outputMode)return L(b);"window"===a.outputMode?window.open(b):N(d,a.fileName+".png","image/png","","",!1)});else if("pdf"===a.type)if(!0===a.pdfmake.enabled){var U={content:[]};d.extend(!0,U,a.pdfmake.docDefinition);G=[];d(B).filter(function(){return I(d(this))}).each(function(){var b=d(this),c=[],e=[];p=0;var g=function(a,b,c){var f=0;d(a).each(function(){var a=[];E(this,b,p,c,function(c,
+d,f){if("undefined"!==typeof c&&null!==c){var e=J(c),h=T(c);c={text:D(c,d,f)||" "};if(1<e||1<h)c.colSpan=e||1,c.rowSpan=h||1}else c={text:" "};0<=b.indexOf("th")&&(c.style="header");a.push(c)});for(var d=a.length;d<c;d++)a.push("");a.length&&e.push(a);f<a.length&&(f=a.length);p++});return f};r=y(b);for(var f=g(r,"th,td",r.length),h=c.length;h<f;h++)c.push("*");w=C(b);f=g(w,"td",r.length+w.length);for(h=c.length;h<f;h++)c.push("*");U.content.push({table:{headerRows:r.length?r.length:null,widths:c,
+body:e},layout:{layout:"noBorders",hLineStyle:function(a,b){return 0},vLineWidth:function(a,b){return 0},hLineColor:function(b,c){return b<c.table.headerRows?a.pdfmake.docDefinition.styles.header.background:a.pdfmake.docDefinition.styles.alternateRow.fillColor},vLineColor:function(b,c){return b<c.table.headerRows?a.pdfmake.docDefinition.styles.header.background:a.pdfmake.docDefinition.styles.alternateRow.fillColor},fillColor:function(b,c,d){return 0===b%2?a.pdfmake.docDefinition.styles.alternateRow.fillColor:
+null}},pageBreak:U.content.length?"before":void 0})});"undefined"!==typeof pdfMake&&"undefined"!==typeof pdfMake.createPdf&&(pdfMake.fonts={Roboto:{normal:"Roboto-Regular.ttf",bold:"Roboto-Medium.ttf",italics:"Roboto-Italic.ttf",bolditalics:"Roboto-MediumItalic.ttf"}},pdfMake.vfs.hasOwnProperty("Mirza-Regular.ttf")?(U.defaultStyle.font="Mirza",d.extend(!0,pdfMake.fonts,{Mirza:{normal:"Mirza-Regular.ttf",bold:"Mirza-Bold.ttf",italics:"Mirza-Medium.ttf",bolditalics:"Mirza-SemiBold.ttf"}})):pdfMake.vfs.hasOwnProperty("gbsn00lp.ttf")?
+(U.defaultStyle.font="gbsn00lp",d.extend(!0,pdfMake.fonts,{gbsn00lp:{normal:"gbsn00lp.ttf",bold:"gbsn00lp.ttf",italics:"gbsn00lp.ttf",bolditalics:"gbsn00lp.ttf"}})):pdfMake.vfs.hasOwnProperty("ZCOOLXiaoWei-Regular.ttf")&&(U.defaultStyle.font="ZCOOLXiaoWei",d.extend(!0,pdfMake.fonts,{ZCOOLXiaoWei:{normal:"ZCOOLXiaoWei-Regular.ttf",bold:"ZCOOLXiaoWei-Regular.ttf",italics:"ZCOOLXiaoWei-Regular.ttf",bolditalics:"ZCOOLXiaoWei-Regular.ttf"}})),d.extend(!0,pdfMake.fonts,a.pdfmake.fonts),pdfMake.createPdf(U).getBuffer(function(b){N(b,
+a.fileName+".pdf","application/pdf","","",!1)}))}else if(!1===a.jspdf.autotable){k={dim:{w:ha(d(B).first().get(0),"width","mm"),h:ha(d(B).first().get(0),"height","mm")},pagesplit:!1};var Ha=new jsPDF(a.jspdf.orientation,a.jspdf.unit,a.jspdf.format);Ha.addHTML(d(B).first(),a.jspdf.margins.left,a.jspdf.margins.top,k,function(){va(Ha,!1)})}else{var g=a.jspdf.autotable.tableExport;if("string"===typeof a.jspdf.format&&"bestfit"===a.jspdf.format.toLowerCase()){var ja="",da="",Ia=0;d(B).each(function(){if(I(d(this))){var a=
+ha(d(this).get(0),"width","pt");if(a>Ia){a>O.a0[0]&&(ja="a0",da="l");for(var c in O)O.hasOwnProperty(c)&&O[c][1]>a&&(ja=c,da="l",O[c][0]>a&&(da="p"));Ia=a}}});a.jspdf.format=""===ja?"a4":ja;a.jspdf.orientation=""===da?"w":da}if(null==g.doc&&(g.doc=new jsPDF(a.jspdf.orientation,a.jspdf.unit,a.jspdf.format),g.wScaleFactor=1,g.hScaleFactor=1,"function"===typeof a.jspdf.onDocCreated))a.jspdf.onDocCreated(g.doc);!0===g.outputImages&&(g.images={});"undefined"!==typeof g.images&&(d(B).filter(function(){return I(d(this))}).each(function(){var b=
+0;G=[];!1===a.exportHiddenCells&&(K=d(this).find("tr, th, td").filter(":hidden"),V=0<K.length);r=y(d(this));w=C(d(this));d(w).each(function(){E(this,"td,th",r.length+b,r.length+w.length,function(a){xa(a,d(a).children(),g)});b++})}),r=[],w=[]);Ka(g,function(){d(B).filter(function(){return I(d(this))}).each(function(){var b;p=0;G=[];!1===a.exportHiddenCells&&(K=d(this).find("tr, th, td").filter(":hidden"),V=0<K.length);S=R(this);g.columns=[];g.rows=[];g.teCells={};if("function"===typeof g.onTable&&
+!1===g.onTable(d(this),a))return!0;a.jspdf.autotable.tableExport=null;var c=d.extend(!0,{},a.jspdf.autotable);a.jspdf.autotable.tableExport=g;c.margin={};d.extend(!0,c.margin,a.jspdf.margins);c.tableExport=g;"function"!==typeof c.beforePageContent&&(c.beforePageContent=function(a){if(1===a.pageCount){var b=a.table.rows.concat(a.table.headerRow);d.each(b,function(){0<this.height&&(this.height+=(2-1.15)/2*this.styles.fontSize,a.table.height+=(2-1.15)/2*this.styles.fontSize)})}});"function"!==typeof c.createdHeaderCell&&
+(c.createdHeaderCell=function(a,b){a.styles=d.extend({},b.row.styles);if("undefined"!==typeof g.columns[b.column.dataKey]){var e=g.columns[b.column.dataKey];if("undefined"!==typeof e.rect){a.contentWidth=e.rect.width;if("undefined"===typeof g.heightRatio||0===g.heightRatio){var f=b.row.raw[b.column.dataKey].rowspan?b.row.raw[b.column.dataKey].rect.height/b.row.raw[b.column.dataKey].rowspan:b.row.raw[b.column.dataKey].rect.height;g.heightRatio=a.styles.rowHeight/f}f=b.row.raw[b.column.dataKey].rect.height*
+g.heightRatio;f>a.styles.rowHeight&&(a.styles.rowHeight=f)}a.styles.halign="inherit"===c.headerStyles.halign?"center":c.headerStyles.halign;a.styles.valign=c.headerStyles.valign;"undefined"!==typeof e.style&&!0!==e.style.hidden&&("inherit"===c.headerStyles.halign&&(a.styles.halign=e.style.align),"inherit"===c.styles.fillColor&&(a.styles.fillColor=e.style.bcolor),"inherit"===c.styles.textColor&&(a.styles.textColor=e.style.color),"inherit"===c.styles.fontStyle&&(a.styles.fontStyle=e.style.fstyle))}});
+"function"!==typeof c.createdCell&&(c.createdCell=function(a,b){b=g.teCells[b.row.index+":"+b.column.dataKey];a.styles.halign="inherit"===c.styles.halign?"center":c.styles.halign;a.styles.valign=c.styles.valign;"undefined"!==typeof b&&"undefined"!==typeof b.style&&!0!==b.style.hidden&&("inherit"===c.styles.halign&&(a.styles.halign=b.style.align),"inherit"===c.styles.fillColor&&(a.styles.fillColor=b.style.bcolor),"inherit"===c.styles.textColor&&(a.styles.textColor=b.style.color),"inherit"===c.styles.fontStyle&&
+(a.styles.fontStyle=b.style.fstyle))});"function"!==typeof c.drawHeaderCell&&(c.drawHeaderCell=function(a,b){var c=g.columns[b.column.dataKey];return(!0!==c.style.hasOwnProperty("hidden")||!0!==c.style.hidden)&&0<=c.rowIndex?wa(a,b,c):!1});"function"!==typeof c.drawCell&&(c.drawCell=function(a,b){var c=g.teCells[b.row.index+":"+b.column.dataKey];if(!0!==("undefined"!==typeof c&&c.isCanvas))wa(a,b,c)&&(g.doc.rect(a.x,a.y,a.width,a.height,a.styles.fillStyle),"undefined"===typeof c||"undefined"!==typeof c.hasUserDefText&&
+!0===c.hasUserDefText||"undefined"===typeof c.elements||!c.elements.length?Aa(a,{},g):(b=a.height/c.rect.height,b>g.hScaleFactor&&(g.hScaleFactor=b),g.wScaleFactor=a.width/c.rect.width,b=a.textPos.y,za(a,c.elements,g),a.textPos.y=b,Aa(a,c.elements,g)));else{c=c.elements[0];var e=d(c).attr("data-tableexport-canvas"),f=c.getBoundingClientRect();a.width=f.width*g.wScaleFactor;a.height=f.height*g.hScaleFactor;b.row.height=a.height;ua(a,c,e,g)}return!1});g.headerrows=[];r=y(d(this));d(r).each(function(){b=
+0;g.headerrows[p]=[];E(this,"th,td",p,r.length,function(a,c,d){var e=Ca(a);e.title=D(a,c,d);e.key=b++;e.rowIndex=p;g.headerrows[p].push(e)});p++});if(0<p)for(var e=p-1;0<=e;)d.each(g.headerrows[e],function(){var a=this;0<e&&null===this.rect&&(a=g.headerrows[e-1][this.key]);null!==a&&0<=a.rowIndex&&(!0!==a.style.hasOwnProperty("hidden")||!0!==a.style.hidden)&&g.columns.push(a)}),e=0<g.columns.length?-1:e-1;var k=0;w=[];w=C(d(this));d(w).each(function(){var a=[];b=0;E(this,"td,th",p,r.length+w.length,
+function(c,e,f){if("undefined"===typeof g.columns[b]){var h={title:"",key:b,style:{hidden:!0}};g.columns.push(h)}a.push(D(c,e,f));"undefined"!==typeof c&&null!==c?(h=Ca(c),h.isCanvas=c.hasAttribute("data-tableexport-canvas"),h.elements=h.isCanvas?d(c):d(c).children(),"undefined"!==typeof d(c).data("teUserDefText")&&(h.hasUserDefText=!0)):(h=d.extend(!0,{},g.teCells[k+":"+(b-1)]),h.colspan=-1);g.teCells[k+":"+b++]=h});a.length&&(g.rows.push(a),k++);p++});if("function"===typeof g.onBeforeAutotable)g.onBeforeAutotable(d(this),
+g.columns,g.rows,c);g.doc.autoTable(g.columns,g.rows,c);if("function"===typeof g.onAfterAutotable)g.onAfterAutotable(d(this),c);a.jspdf.autotable.startY=g.doc.autoTableEndPosY()+c.margin.top});va(g.doc,"undefined"!==typeof g.images&&!1===jQuery.isEmptyObject(g.images));"undefined"!==typeof g.headerrows&&(g.headerrows.length=0);"undefined"!==typeof g.columns&&(g.columns.length=0);"undefined"!==typeof g.rows&&(g.rows.length=0);delete g.doc;g.doc=null})}if("function"===typeof a.onTableExportEnd)a.onTableExportEnd();
+return this}})(jQuery);

+ 4 - 0
ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js

@@ -61,6 +61,8 @@ var table = {
                     showColumns: true,
                     showToggle: true,
                     showExport: false,
+                    exportDataType: 'all',
+                    exportTypes: ['csv', 'txt', 'doc', 'excel'],
                     clickToSelect: false,
                     singleSelect: false,
                     mobileResponsive: true,
@@ -142,6 +144,8 @@ var table = {
                     responseHandler: $.table.responseHandler,           // 在加载服务器发送来的数据之前处理函数
                     onLoadSuccess: $.table.onLoadSuccess,               // 当所有数据被加载时触发处理函数
                     exportOptions: options.exportOptions,               // 前端导出忽略列索引
+                    exportDataType: options.exportDataType,             // 导出方式(默认all:导出所有数据;basic:导出当前页的数据;selected:导出选中的数据)
+                    exportTypes: options.exportTypes,                   // 导出文件类型 (json、xml、png、csv、txt、sql、doc、excel、xlsx、powerpoint、pdf)
                     printPageBuilder: options.printPageBuilder,         // 自定义打印页面模板
                     detailFormatter: options.detailFormatter,           // 在行下面展示其他数据列表
                 });

+ 5 - 1
ruoyi-admin/src/main/resources/templates/demo/table/export.html

@@ -25,9 +25,13 @@
 		        showToggle: false,
 		        showColumns: false,
 		        showExport: true,
+		        exportDataType: 'selected', // 导出选择数据
+		        exportTypes: ['json', 'xml', 'csv', 'txt', 'sql', 'excel'], // 导出的文件类型
 		        exportOptions: {
-		        	ignoreColumn: [0, 8]  //忽略第一列和最后一列
+		        	fileName: '用户数据',    // 文件名称设置
+		        	ignoreColumn: [0, 8]    // 忽略第一列和最后一列
 		        },
+		        clickToSelect: true,
                 columns: [{
 		            checkbox: true
 		        },

+ 2 - 2
ruoyi-admin/src/main/resources/templates/include.html

@@ -199,8 +199,8 @@
 
 <!-- 表格导出插件 -->
 <div th:fragment="bootstrap-table-export-js">
-	<script th:src="@{/ajax/libs/bootstrap-table/extensions/export/bootstrap-table-export.js}"></script>
-	<script th:src="@{/ajax/libs/bootstrap-table/extensions/export/tableExport.js}"></script>
+	<script th:src="@{/ajax/libs/bootstrap-table/extensions/export/bootstrap-table-export.min.js?v=20210523}"></script>
+	<script th:src="@{/ajax/libs/bootstrap-table/extensions/export/tableExport.min.js?v=20210523}"></script>
 </div>
 
 <!-- 表格冻结列插件 -->

Some files were not shown because too many files changed in this diff