function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}!function(t){"use strict";var e=3;try{e=parseInt(t.fn.dropdown.Constructor.VERSION,10)}catch(t){}var n={3:{buttonsClass:"default",iconsPrefix:"glyphicon",icons:{paginationSwitchDown:"glyphicon-collapse-down icon-chevron-down",paginationSwitchUp:"glyphicon-collapse-up icon-chevron-up",refresh:"glyphicon-refresh icon-refresh",toggleOff:"glyphicon-list-alt icon-list-alt",toggleOn:"glyphicon-list-alt icon-list-alt",columns:"glyphicon-th icon-th",detailOpen:"glyphicon-plus icon-plus",detailClose:"glyphicon-minus icon-minus",fullscreen:"glyphicon-fullscreen"},pullClass:"pull",toobarDropdowHtml:['"],toobarDropdowItemHtml:'
  • ',pageDropdownHtml:['"],pageDropdownItemHtml:''},4:{buttonsClass:"secondary",iconsPrefix:"fa",icons:{paginationSwitchDown:"fa-toggle-down",paginationSwitchUp:"fa-toggle-up",refresh:"fa-refresh",toggleOff:"fa-toggle-off",toggleOn:"fa-toggle-on",columns:"fa-th-list",detailOpen:"fa-plus",detailClose:"fa-minus",fullscreen:"fa-arrows-alt"},pullClass:"float",toobarDropdowHtml:['"],toobarDropdowItemHtml:'',pageDropdownHtml:['"],pageDropdownItemHtml:'%s'}}[e],i=null,o=function(t){var e=arguments,n=!0,i=1;return t=t.replace(/%s/g,function(){var t=e[i++];return void 0===t?(n=!1,""):t}),n?t:""},r=function(e,n,i,o){var r="";return t.each(e,function(t,e){return e[n]!==o||(r=e[i],!1)}),r},s=function(e){var n,i,o,r=0,s=[];for(n=0;n").addClass("fixed-table-scroll-inner"),r=t("
    ").addClass("fixed-table-scroll-outer");r.append(o),t("body").append(r),e=o[0].offsetWidth,r.css("overflow","scroll"),n=o[0].offsetWidth,e===n&&(n=r[0].clientWidth),r.remove(),i=e-n}return i},l=function(e,n,i,r){var s=n;if("string"==typeof n){var a=n.split(".");a.length>1?(s=window,t.each(a,function(t,e){s=s[e]})):s=window[n]}return"object"==typeof s?s:"function"==typeof s?s.apply(e,i||[]):!s&&"string"==typeof n&&o.apply(this,[n].concat(i))?o.apply(this,[n].concat(i)):r},c=function(e,n,i){var o=Object.getOwnPropertyNames||function(t){var e=[];for(var n in t)t.hasOwnProperty(n)&&e.push(n);return e},r=o(e),s=o(n),a="";if(i&&r.length!==s.length)return!1;for(var l=0;l-1&&e[a]!==n[a])return!1;return!0},h=function(t){return"string"==typeof t?t.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'").replace(/`/g,"`"):t},u=function(t){for(var e in t){var n=e.split(/(?=[A-Z])/).join("-").toLowerCase();n!==e&&(t[n]=t[e],delete t[e])}return t},d=function(t,e,n){var i=t;if("string"!=typeof e||t.hasOwnProperty(e))return n?h(t[e]):t[e];var o=e.split(".");for(var r in o)o.hasOwnProperty(r)&&(i=i&&i[o[r]]);return n?h(i):i},p=function(){return!!(navigator.userAgent.indexOf("MSIE ")>0||navigator.userAgent.match(/Trident.*rv\:11\./))},f=function(){Object.keys||(Object.keys=function(){var t=Object.prototype.hasOwnProperty,e=!{toString:null}.propertyIsEnumerable("toString"),n=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],i=n.length;return function(o){if("object"!=typeof o&&("function"!=typeof o||null===o))throw new TypeError("Object.keys called on non-object");var r,s,a=[];for(r in o)t.call(o,r)&&a.push(r);if(e)for(s=0;s','
    ',"top"===this.options.paginationVAlign||"both"===this.options.paginationVAlign?'
    ':"",'
    ','
    ','
    ','
    ',this.options.formatLoadingMessage(),"
    ","
    ",'',"
    ","bottom"===this.options.paginationVAlign||"both"===this.options.paginationVAlign?'
    ':"","
    "].join("")),this.$container.insertAfter(this.$el),this.$tableContainer=this.$container.find(".fixed-table-container"),this.$tableHeader=this.$container.find(".fixed-table-header"),this.$tableBody=this.$container.find(".fixed-table-body"),this.$tableLoading=this.$container.find(".fixed-table-loading"),this.$tableFooter=this.$container.find(".fixed-table-footer"),this.options.buttonsToolbar?this.$toolbar=t("body").find(this.options.buttonsToolbar):this.$toolbar=this.$container.find(".fixed-table-toolbar"),this.$pagination=this.$container.find(".fixed-table-pagination"),this.$tableBody.append(this.$el),this.$container.after('
    '),this.$el.addClass(this.options.classes),this.options.striped&&this.$el.addClass("table-striped"),-1!==t.inArray("table-no-bordered",this.options.classes.split(" "))&&this.$tableContainer.addClass("table-no-bordered")},g.prototype.initTable=function(){var e=this,n=[],i=[];if(this.$header=this.$el.find(">thead"),this.$header.length||(this.$header=t("").appendTo(this.$el)),this.$header.find("tr").each(function(){var e=[];t(this).find("th").each(function(){void 0!==t(this).data("field")&&t(this).data("field",t(this).data("field")+""),e.push(t.extend({},{title:t(this).html(),class:t(this).attr("class"),titleTooltip:t(this).attr("title"),rowspan:t(this).attr("rowspan")?+t(this).attr("rowspan"):void 0,colspan:t(this).attr("colspan")?+t(this).attr("colspan"):void 0},t(this).data()))}),n.push(e)}),t.isArray(this.options.columns[0])||(this.options.columns=[this.options.columns]),this.options.columns=t.extend(!0,[],n,this.options.columns),this.columns=[],this.fieldsColumnsIndex=[],s(this.options.columns),t.each(this.options.columns,function(n,i){t.each(i,function(i,o){o=t.extend({},g.COLUMN_DEFAULTS,o),void 0!==o.fieldIndex&&(e.columns[o.fieldIndex]=o,e.fieldsColumnsIndex[o.field]=o.fieldIndex),e.options.columns[n][i]=o})}),!this.options.data.length){var o=[];this.$el.find(">tbody>tr").each(function(n){var r={};r._id=t(this).attr("id"),r._class=t(this).attr("class"),r._data=u(t(this).data()),t(this).find(">td").each(function(i){for(var s,a,l=t(this),c=+l.attr("colspan")||1,h=+l.attr("rowspan")||1;o[n]&&o[n][i];i++);for(s=i;s"),0===r&&!e.options.cardView&&e.options.detailView&&i.push(o('
    ',e.options.columns.length)),t.each(s,function(t,r){var s="",a="",l="",c="",u=o(' class="%s"',r.class),d=(e.options.sortOrder||r.order,"px"),p=r.width;if(void 0===r.width||e.options.cardView||"string"==typeof r.width&&-1!==r.width.indexOf("%")&&(d="%"),r.width&&"string"==typeof r.width&&(p=r.width.replace("%","").replace("px","")),a=o("text-align: %s; ",r.halign?r.halign:r.align),l=o("text-align: %s; ",r.align),c=o("vertical-align: %s; ",r.valign),c+=o("width: %s; ",!r.checkbox&&!r.radio||p?p?p+d:void 0:r.showSelectTitle?void 0:"36px"),void 0!==r.fieldIndex){if(e.header.fields[r.fieldIndex]=r.field,e.header.styles[r.fieldIndex]=l+c,e.header.classes[r.fieldIndex]=u,e.header.formatters[r.fieldIndex]=r.formatter,e.header.events[r.fieldIndex]=r.events,e.header.sorters[r.fieldIndex]=r.sorter,e.header.sortNames[r.fieldIndex]=r.sortName,e.header.cellStyles[r.fieldIndex]=r.cellStyle,e.header.searchables[r.fieldIndex]=r.searchable,!r.visible)return;if(e.options.cardView&&!r.cardVisible)return;n[r.field]=r}i.push(""),i.push(o('
    ',e.options.sortable&&r.sortable?"sortable both":"")),s=e.options.escape?h(r.title):r.title;var f=s;r.checkbox&&(s="",!e.options.singleSelect&&e.options.checkboxHeader&&(s=''),e.header.stateField=r.field),r.radio&&(s="",e.header.stateField=r.field,e.options.singleSelect=!0),!s&&r.showSelectTitle&&(s+=f),i.push(s),i.push("
    "),i.push('
    '),i.push(""),i.push("")}),i.push("")}),this.$header.html(i.join("")),this.$header.find("th[data-field]").each(function(e){t(this).data(n[t(this).data("field")])}),this.$container.off("click",".th-inner").on("click",".th-inner",function(n){var i=t(this);if(e.options.detailView&&!i.parent().hasClass("bs-checkbox")&&i.closest(".bootstrap-table")[0]!==e.$container[0])return!1;e.options.sortable&&i.parent().data().sortable&&e.onSort(n)}),this.$header.children().children().off("keypress").on("keypress",function(n){if(e.options.sortable&&t(this).data().sortable){13==(n.keyCode||n.which)&&e.onSort(n)}}),t(window).off("resize.bootstrap-table"),!this.options.showHeader||this.options.cardView?(this.$header.hide(),this.$tableHeader.hide(),this.$tableLoading.css("top",0)):(this.$header.show(),this.$tableHeader.show(),this.$tableLoading.css("top",this.$header.outerHeight()+1),this.getCaret(),t(window).on("resize.bootstrap-table",t.proxy(this.resetWidth,this))),this.$selectAll=this.$header.find('[name="btSelectAll"]'),this.$selectAll.off("click").on("click",function(){var n=t(this).prop("checked");e[n?"checkAll":"uncheckAll"](),e.updateSelected()})},g.prototype.initFooter=function(){!this.options.showFooter||this.options.cardView?this.$tableFooter.hide():this.$tableFooter.show()},g.prototype.initData=function(t,e){this.options.data="append"===e?this.options.data.concat(t):"prepend"===e?[].concat(t).concat(this.options.data):t||this.options.data,this.data=this.options.data,"server"!==this.options.sidePagination&&this.initSort()},g.prototype.initSort=function(){var e=this,n=this.options.sortName,i="desc"===this.options.sortOrder?-1:1,r=t.inArray(this.options.sortName,this.header.fields),s=0;if(this.options.customSort!==t.noop)return void this.options.customSort.apply(this,[this.options.sortName,this.options.sortOrder]);-1!==r&&(this.options.sortStable&&t.each(this.data,function(t,e){e._position=t}),this.data.sort(function(o,s){e.header.sortNames[r]&&(n=e.header.sortNames[r]);var a=d(o,n,e.options.escape),c=d(s,n,e.options.escape),h=l(e.header,e.header.sorters[r],[a,c,o,s]);return void 0!==h?e.options.sortStable&&0===h?o._position-s._position:i*h:(void 0!==a&&null!==a||(a=""),void 0!==c&&null!==c||(c=""),e.options.sortStable&&a===c?(a=o._position,c=s._position,o._position-s._position):t.isNumeric(a)&&t.isNumeric(c)?(a=parseFloat(a),c=parseFloat(c),a',n.pullClass,this.options.toolbarAlign)).appendTo(this.$toolbar).append(t(this.options.toolbar)),s=[o('
    ',this.options.buttonsAlign,n.pullClass,this.options.buttonsAlign)],"string"==typeof this.options.icons&&(this.options.icons=l(null,this.options.icons)),this.options.showPaginationSwitch&&s.push(o('"),this.options.showFullscreen&&this.$toolbar.find('button[name="fullscreen"]').off("click").on("click",t.proxy(this.toggleFullscreen,this)),this.options.showRefresh&&s.push(o('"),this.options.showToggle&&s.push(o('"),this.options.showFullscreen&&s.push(o('"),this.options.showColumns&&(s.push(o('
    ',this.options.formatColumns()),'",n.toobarDropdowHtml[0]),t.each(this.columns,function(t,e){if(!e.radio&&!e.checkbox&&(!r.options.cardView||e.cardVisible)){var i=e.visible?' checked="checked"':"";e.switchable&&(s.push(o(n.toobarDropdowItemHtml,o(' %s',e.field,t,i,e.title))),c++)}}),s.push(n.toobarDropdowHtml[1],"
    ")),s.push("
    "),(this.showToolbar||s.length>2)&&this.$toolbar.append(s.join("")),this.options.showPaginationSwitch&&this.$toolbar.find('button[name="paginationSwitch"]').off("click").on("click",t.proxy(this.togglePagination,this)),this.options.showRefresh&&this.$toolbar.find('button[name="refresh"]').off("click").on("click",t.proxy(this.refresh,this)),this.options.showToggle&&this.$toolbar.find('button[name="toggle"]').off("click").on("click",function(){r.toggleView()}),this.options.showColumns&&(e=this.$toolbar.find(".keep-open"),c<=this.options.minimumCountColumns&&e.find("input").prop("disabled",!0),e.find("li").off("click").on("click",function(t){t.stopImmediatePropagation()}),e.find("input").off("click").on("click",function(){var e=t(this);r.toggleColumn(t(this).val(),e.prop("checked"),!1),r.trigger("column-switch",t(this).data("field"),e.prop("checked"))})),this.options.search&&(s=[],s.push(o('"),this.$toolbar.append(s.join("")),i=this.$toolbar.find(".search input"),i.off("keyup drop blur").on("keyup drop blur",function(e){r.options.searchOnEnterKey&&13!==e.keyCode||t.inArray(e.keyCode,[37,38,39,40])>-1||(clearTimeout(a),a=setTimeout(function(){r.onSearch(e)},r.options.searchTimeOut))}),p()&&i.off("mouseup").on("mouseup",function(t){clearTimeout(a),a=setTimeout(function(){r.onSearch(t)},r.options.searchTimeOut)}))},g.prototype.onSearch=function(e){var n=t.trim(t(e.currentTarget).val());this.options.trimOnSearch&&t(e.currentTarget).val()!==n&&t(e.currentTarget).val(n),n!==this.searchText&&(this.searchText=n,this.options.searchText=n,this.options.pageNumber=1,this.initSearch(),e.firedByInitSearchText?"client"===this.options.sidePagination&&this.updatePagination():this.updatePagination(),this.trigger("search",n))},g.prototype.initSearch=function(){var e=this;if("server"!==this.options.sidePagination){if(this.options.customSearch!==t.noop)return void window[this.options.customSearch].apply(this,[this.searchText]);var n=this.searchText&&(this.options.escape?h(this.searchText):this.searchText).toLowerCase(),i=t.isEmptyObject(this.filterColumns)?null:this.filterColumns;this.data=i?t.grep(this.options.data,function(e,n){for(var o in i)if(t.isArray(i[o])&&-1===t.inArray(e[o],i[o])||!t.isArray(i[o])&&e[o]!==i[o])return!1;return!0}):this.options.data,this.data=n?t.grep(this.data,function(i,o){for(var r=0;r-1&&(d=!0)}this.totalPages=1+~~((this.options.totalRows-1)/this.options.pageSize),this.options.totalPages=this.totalPages}if(this.totalPages>0&&this.options.pageNumber>this.totalPages&&(this.options.pageNumber=this.totalPages),this.pageFrom=(this.options.pageNumber-1)*this.options.pageSize+1,this.pageTo=this.options.pageNumber*this.options.pageSize,this.pageTo>this.options.totalRows&&(this.pageTo=this.options.totalRows),u.push(o('
    ',n.pullClass,this.options.paginationDetailHAlign),'',this.options.onlyInfoPagination?this.options.formatDetailPagination(this.options.totalRows):this.options.formatShowingRows(this.pageFrom,this.pageTo,this.options.totalRows),""),!this.options.onlyInfoPagination){u.push('');var m=[o('',"top"===this.options.paginationVAlign||"both"===this.options.paginationVAlign?"dropdown":"dropup"),'",n.pageDropdownHtml[0]];if("string"==typeof this.options.pageList){var y=this.options.pageList.replace("[","").replace("]","").replace(/ /g,"").split(",");f=[],t.each(y,function(t,e){f.push(e.toUpperCase()===h.options.formatAllRows().toUpperCase()||"UNLIMITED"===e.toUpperCase()?h.options.formatAllRows():+e)})}for(t.each(f,function(t,e){if(!h.options.smartDisplay||0===t||f[t-1]"),u.push(this.options.formatRecordsPerPage(m.join(""))),u.push(""),u.push("
    ",o('")}this.$pagination.html(u.join("")),this.options.onlyInfoPagination||(s=this.$pagination.find(".page-list a"),a=this.$pagination.find(".page-pre"),l=this.$pagination.find(".page-next"),c=this.$pagination.find(".page-item").not(".page-next, .page-pre"),this.options.smartDisplay&&(this.totalPages<=1&&this.$pagination.find("div.pagination").hide(),(f.length<2||this.options.totalRows<=f[0])&&this.$pagination.find("span.page-list").hide(),this.$pagination[this.getData().length?"show":"hide"]()),this.options.paginationLoop||(1===this.options.pageNumber&&a.addClass("disabled"),this.options.pageNumber===this.totalPages&&l.addClass("disabled")),d&&(this.options.pageSize=this.options.formatAllRows()),s.off("click").on("click",t.proxy(this.onPageListChange,this)),a.off("click").on("click",t.proxy(this.onPagePre,this)),l.off("click").on("click",t.proxy(this.onPageNext,this)),c.off("click").on("click",t.proxy(this.onPageNumber,this)))},g.prototype.updatePagination=function(e){e&&t(e.currentTarget).hasClass("disabled")||(this.options.maintainSelected||this.resetRows(),this.initPagination(),"server"===this.options.sidePagination?this.initServer():this.initBody(),this.trigger("page-change",this.options.pageNumber,this.options.pageSize))},g.prototype.onPageListChange=function(e){e.preventDefault();var n=t(e.currentTarget);return n.parent().addClass("active").siblings().removeClass("active"),this.options.pageSize=n.text().toUpperCase()===this.options.formatAllRows().toUpperCase()?this.options.formatAllRows():+n.text(),this.$toolbar.find(".page-size").text(this.options.pageSize),this.updatePagination(e),!1},g.prototype.onPagePre=function(t){return t.preventDefault(),this.options.pageNumber-1==0?this.options.pageNumber=this.options.totalPages:this.options.pageNumber--,this.updatePagination(t),!1},g.prototype.onPageNext=function(t){return t.preventDefault(),this.options.pageNumber+1>this.options.totalPages?this.options.pageNumber=1:this.options.pageNumber++,this.updatePagination(t),!1},g.prototype.onPageNumber=function(e){if(e.preventDefault(),this.options.pageNumber!==+t(e.currentTarget).text())return this.options.pageNumber=+t(e.currentTarget).text(),this.updatePagination(e),!1},g.prototype.initRow=function(e,n,i,s){var a,c=this,u=[],p={},f=[],g="",m={},y=[];if(!(t.inArray(e,this.hiddenRows)>-1)){if((p=l(this.options,this.options.rowStyle,[e,n],p))&&p.css)for(a in p.css)f.push(a+": "+p.css[a]);if(m=l(this.options,this.options.rowAttributes,[e,n],m))for(a in m)y.push(o('%s="%s"',a,h(m[a])));return e._data&&!t.isEmptyObject(e._data)&&t.each(e._data,function(t,e){"index"!==t&&(g+=o(' data-%s="%s"',t,e))}),u.push(""),this.options.cardView&&u.push(o('
    ',this.header.fields.length)),!this.options.cardView&&this.options.detailView&&(u.push(""),l(null,this.options.detailFilter,[n,e])&&u.push('',o('',this.options.iconsPrefix,this.options.icons.detailOpen),""),u.push("")), t.each(this.header.fields,function(i,s){var a="",g=d(e,s,c.options.escape),m="",y="",w={},b="",v=c.header.classes[i],x="",k="",S="",C="",_=c.columns[i];if((!c.fromHtml||void 0!==g||_.checkbox||_.radio)&&_.visible&&(!c.options.cardView||_.cardVisible)){if(_.escape&&(g=h(g)),p=o('style="%s"',f.concat(c.header.styles[i]).join("; ")),e["_"+s+"_id"]&&(b=o(' id="%s"',e["_"+s+"_id"])),e["_"+s+"_class"]&&(v=o(' class="%s"',e["_"+s+"_class"])),e["_"+s+"_rowspan"]&&(k=o(' rowspan="%s"',e["_"+s+"_rowspan"])),e["_"+s+"_colspan"]&&(S=o(' colspan="%s"',e["_"+s+"_colspan"])),e["_"+s+"_title"]&&(C=o(' title="%s"',e["_"+s+"_title"])),w=l(c.header,c.header.cellStyles[i],[g,e,n,s],w),w.classes&&(v=o(' class="%s"',w.classes)),w.css){var T=[];for(var A in w.css)T.push(A+": "+w.css[A]);p=o('style="%s"',T.concat(c.header.styles[i]).join("; "))}m=l(_,c.header.formatters[i],[g,e,n,s],g),e["_"+s+"_data"]&&!t.isEmptyObject(e["_"+s+"_data"])&&t.each(e["_"+s+"_data"],function(t,e){"index"!==t&&(x+=o(' data-%s="%s"',t,e))}),_.checkbox||_.radio?(y=_.checkbox?"checkbox":y,y=_.radio?"radio":y,a=[o(c.options.cardView?'
    ':'',_.class||""),"",c.header.formatters[i]&&"string"==typeof m?m:"",c.options.cardView?"
    ":""].join(""),e[c.header.stateField]=!0===m||!!g||m&&m.checked):(m=void 0===m||null===m?c.options.undefinedText:m,a=c.options.cardView?['
    ',c.options.showHeader?o('%s',p,r(c.columns,"field","title",s)):"",o('%s',m),"
    "].join(""):[o("",b,v,p,x,k,S,C),m,""].join(""),c.options.cardView&&c.options.smartDisplay&&""===m&&(a='
    ')),u.push(a)}}),this.options.cardView&&u.push("
    "),u.push(""),u.join(" ")}},g.prototype.initBody=function(e){var n=this,i=this.getData();this.trigger("pre-body",i),this.$body=this.$el.find(">tbody"),this.$body.length||(this.$body=t("").appendTo(this.$el)),this.options.pagination&&"server"!==this.options.sidePagination||(this.pageFrom=1,this.pageTo=i.length);for(var r,s=t(document.createDocumentFragment()),a=this.pageFrom-1;a'+o('%s',this.$header.find("th").length,this.options.formatNoMatches())+""),this.$body.html(s),e||this.scrollTo(0),this.$body.find("> tr[data-index] > td").off("click dblclick").on("click dblclick",function(e){var i=t(this),r=i.parent(),s=n.data[r.data("index")],a=i[0].cellIndex,l=n.getVisibleFields(),c=l[n.options.detailView&&!n.options.cardView?a-1:a],h=n.columns[n.fieldsColumnsIndex[c]],u=d(s,c,n.options.escape);if(!i.find(".detail-icon").length&&(n.trigger("click"===e.type?"click-cell":"dbl-click-cell",c,u,s,i),n.trigger("click"===e.type?"click-row":"dbl-click-row",s,r,c),"click"===e.type&&n.options.clickToSelect&&h.clickToSelect&&n.options.ignoreClickToSelectOn(e.target))){var p=r.find(o('[name="%s"]',n.options.selectItemName));p.length&&p[0].click()}}),this.$body.find("> tr[data-index] > td > .detail-icon").off("click").on("click",function(e){e.preventDefault();var r=t(this),s=r.parent().parent(),a=s.data("index"),c=i[a];if(s.next().is("tr.detail-view"))r.find("i").attr("class",o("%s %s",n.options.iconsPrefix,n.options.icons.detailOpen)),n.trigger("collapse-row",a,c,s.next()),s.next().remove();else{r.find("i").attr("class",o("%s %s",n.options.iconsPrefix,n.options.icons.detailClose)),s.after(o('',s.find("td").length));var h=s.next().find("td"),u=l(n.options,n.options.detailFormatter,[a,c,h],"");1===h.length&&h.append(u),n.trigger("expand-row",a,c,h)}return n.resetView(),!1}),this.$selectItem=this.$body.find(o('[name="%s"]',this.options.selectItemName)),this.$selectItem.off("click").on("click",function(e){e.stopImmediatePropagation();var i=t(this),o=i.prop("checked"),r=n.data[i.data("index")];(t(this).is(":radio")||n.options.singleSelect)&&t.each(n.options.data,function(t,e){e[n.header.stateField]=!1}),r[n.header.stateField]=o,n.options.singleSelect&&(n.$selectItem.not(this).each(function(){n.data[t(this).data("index")][n.header.stateField]=!1}),n.$selectItem.filter(":checked").not(this).prop("checked",!1)),n.updateSelected(),n.trigger(o?"check":"uncheck",r,i)}),t.each(this.header.events,function(e,i){if(i){"string"==typeof i&&(i=l(null,i));var o=n.header.fields[e],r=t.inArray(o,n.getVisibleFields());if(-1!==r){n.options.detailView&&!n.options.cardView&&(r+=1);for(var s in i)n.$body.find(">tr:not(.no-records-found)").each(function(){var e=t(this),a=e.find(n.options.cardView?".card-view":"td").eq(r),l=s.indexOf(" "),c=s.substring(0,l),h=s.substring(l+1),u=i[s];a.find(h).off(c).on(c,function(t){var i=e.data("index"),r=n.data[i],s=r[o];u.apply(this,[t,s,r,i])})})}}}),this.updateSelected(),this.resetView(),this.trigger("post-body",i)},g.prototype.initServer=function(e,n,i){var o,r=this,s={},a=t.inArray(this.options.sortName,this.header.fields),c={searchText:this.searchText,sortName:this.options.sortName,sortOrder:this.options.sortOrder};this.header.sortNames[a]&&(c.sortName=this.header.sortNames[a]),this.options.pagination&&"server"===this.options.sidePagination&&(c.pageSize=this.options.pageSize===this.options.formatAllRows()?this.options.totalRows:this.options.pageSize,c.pageNumber=this.options.pageNumber),(i||this.options.url||this.options.ajax)&&("limit"===this.options.queryParamsType&&(c={search:c.searchText,sort:c.sortName,order:c.sortOrder},this.options.pagination&&"server"===this.options.sidePagination&&(c.offset=this.options.pageSize===this.options.formatAllRows()?0:this.options.pageSize*(this.options.pageNumber-1),c.limit=this.options.pageSize===this.options.formatAllRows()?this.options.totalRows:this.options.pageSize,0===c.limit&&delete c.limit)),t.isEmptyObject(this.filterColumnsPartial)||(c.filter=JSON.stringify(this.filterColumnsPartial,null)),s=l(this.options,this.options.queryParams,[c],s),t.extend(s,n||{}),!1!==s&&(e||this.$tableLoading.show(),o=t.extend({},l(null,this.options.ajaxOptions),{type:this.options.method,url:i||this.options.url,data:"application/json"===this.options.contentType&&"post"===this.options.method?JSON.stringify(s):s,cache:this.options.cache,contentType:this.options.contentType,dataType:this.options.dataType,success:function(t){t=l(r.options,r.options.responseHandler,[t],t),r.load(t),r.trigger("load-success",t),e||r.$tableLoading.hide()},error:function(t){var n=[];"server"===r.options.sidePagination&&(n={},n[r.options.totalField]=0,n[r.options.dataField]=[]),r.load(n),r.trigger("load-error",t.status,t),e||r.$tableLoading.hide()}}),this.options.ajax?l(this,this.options.ajax,[o],null):(this._xhr&&4!==this._xhr.readyState&&this._xhr.abort(),this._xhr=t.ajax(o))))},g.prototype.initSearchText=function(){if(this.options.search&&(this.searchText="",""!==this.options.searchText)){var t=this.$toolbar.find(".search input");t.val(this.options.searchText),this.onSearch({currentTarget:t,firedByInitSearchText:!0})}},g.prototype.getCaret=function(){var e=this;t.each(this.$header.find("th"),function(n,i){t(i).find(".sortable").removeClass("desc asc").addClass(t(i).data("field")===e.options.sortName?e.options.sortOrder:"both")})},g.prototype.updateSelected=function(){var e=this.$selectItem.filter(":enabled").length&&this.$selectItem.filter(":enabled").length===this.$selectItem.filter(":enabled").filter(":checked").length;this.$selectAll.add(this.$selectAll_).prop("checked",e),this.$selectItem.each(function(){t(this).closest("tr")[t(this).prop("checked")?"addClass":"removeClass"]("selected")})},g.prototype.updateRows=function(){var e=this;this.$selectItem.each(function(){e.data[t(this).data("index")][e.header.stateField]=t(this).prop("checked")})},g.prototype.resetRows=function(){var e=this;t.each(this.data,function(t,n){e.$selectAll.prop("checked",!1),e.$selectItem.prop("checked",!1),e.header.stateField&&(n[e.header.stateField]=!1)}),this.initHiddenRows()},g.prototype.trigger=function(e){var n=Array.prototype.slice.call(arguments,1);e+=".bs.table",this.options[g.EVENTS[e]].apply(this.options,n),this.$el.trigger(t.Event(e),n),this.options.onAll(e,n),this.$el.trigger(t.Event("all.bs.table"),[e,n])},g.prototype.resetHeader=function(){clearTimeout(this.timeoutId_),this.timeoutId_=setTimeout(t.proxy(this.fitHeader,this),this.$el.is(":hidden")?100:0)},g.prototype.fitHeader=function(){var e,n,i,r,s=this;if(s.$el.is(":hidden"))return void(s.timeoutId_=setTimeout(t.proxy(s.fitHeader,s),100));if(e=this.$tableBody.get(0),n=e.scrollWidth>e.clientWidth&&e.scrollHeight>e.clientHeight+this.$header.outerHeight()?a():0,this.$el.css("margin-top",-this.$header.outerHeight()),i=t(":focus"),i.length>0){var l=i.parents("th");if(l.length>0){var c=l.attr("data-field");if(void 0!==c){var h=this.$header.find("[data-field='"+c+"']");h.length>0&&h.find(":input").addClass("focus-temp")}}}this.$header_=this.$header.clone(!0,!0),this.$selectAll_=this.$header_.find('[name="btSelectAll"]'),this.$tableHeader.css({"margin-right":n}).find("table").css("width",this.$el.outerWidth()).html("").attr("class",this.$el.attr("class")).append(this.$header_),r=t(".focus-temp:visible:eq(0)"),r.length>0&&(r.focus(),this.$header.find(".focus-temp").removeClass("focus-temp")),this.$header.find("th[data-field]").each(function(e){s.$header_.find(o('th[data-field="%s"]',t(this).data("field"))).data(t(this).data())});var u=this.getVisibleFields(),d=this.$header_.find("th");this.$body.find(">tr:first-child:not(.no-records-found) > *").each(function(e){var n=t(this),i=e;if(s.options.detailView&&!s.options.cardView&&(0===e&&s.$header_.find("th.detail").find(".fht-cell").width(n.innerWidth()),i=e-1),-1!==i){var r=s.$header_.find(o('th[data-field="%s"]',u[i]));r.length>1&&(r=t(d[n[0].cellIndex]));var a=r.width()-r.find(".fht-cell").width();r.find(".fht-cell").width(n.innerWidth()-a)}}),this.horizontalScroll(),this.trigger("post-header")},g.prototype.resetFooter=function(){var e=this,n=e.getData(),i=[];this.options.showFooter&&!this.options.cardView&&(!this.options.cardView&&this.options.detailView&&i.push('
     
    '),t.each(this.columns,function(t,r){var s,a="",c="",h=[],u={},d=o(' class="%s"',r.class);if(r.visible&&(!e.options.cardView||r.cardVisible)){if(a=o("text-align: %s; ",r.falign?r.falign:r.align),c=o("vertical-align: %s; ",r.valign),(u=l(null,e.options.footerStyle))&&u.css)for(s in u.css)h.push(s+": "+u.css[s]);i.push(""),i.push('
    '),i.push(l(r,r.footerFormatter,[n]," ")||" "),i.push("
    "),i.push('
    '),i.push(""),i.push("")}}),this.$tableFooter.find("tr").html(i.join("")),this.$tableFooter.show(),clearTimeout(this.timeoutFooter_),this.timeoutFooter_=setTimeout(t.proxy(this.fitFooter,this),this.$el.is(":hidden")?100:0))},g.prototype.fitFooter=function(){var e,n,i;if(clearTimeout(this.timeoutFooter_),this.$el.is(":hidden"))return void(this.timeoutFooter_=setTimeout(t.proxy(this.fitFooter,this),100));n=this.$el.css("width"),i=n>this.$tableBody.width()?a():0,this.$tableFooter.css({"margin-right":i}).find("table").css("width",n).attr("class",this.$el.attr("class")),e=this.$tableFooter.find("td"),this.$body.find(">tr:first-child:not(.no-records-found) > *").each(function(n){var i=t(this);e.eq(n).find(".fht-cell").width(i.innerWidth())}),this.horizontalScroll()},g.prototype.horizontalScroll=function(){var e=this;e.trigger("scroll-body"),this.$tableBody.off("scroll").on("scroll",function(){e.options.showHeader&&e.options.height&&e.$tableHeader.scrollLeft(t(this).scrollLeft()),e.options.showFooter&&!e.options.cardView&&e.$tableFooter.scrollLeft(t(this).scrollLeft())})},g.prototype.toggleColumn=function(t,e,n){if(-1!==t&&(this.columns[t].visible=e,this.initHeader(),this.initSearch(),this.initPagination(),this.initBody(),this.options.showColumns)){var i=this.$toolbar.find(".keep-open input").prop("disabled",!1);n&&i.filter(o('[value="%s"]',t)).prop("checked",e),i.filter(":checked").length<=this.options.minimumCountColumns&&i.filter(":checked").prop("disabled",!0)}},g.prototype.getVisibleFields=function(){var e=this,n=[];return t.each(this.header.fields,function(t,i){e.columns[e.fieldsColumnsIndex[i]].visible&&n.push(i)}),n},g.prototype.resetView=function(t){var e=0;if(t&&t.height&&(this.options.height=t.height),this.$selectAll.prop("checked",this.$selectItem.length>0&&this.$selectItem.length===this.$selectItem.filter(":checked").length),this.options.height){var n=this.$toolbar.outerHeight(!0),i=this.$pagination.outerHeight(!0),o=this.options.height-n-i;this.$tableContainer.css("height",o+"px")}if(this.options.cardView)return this.$el.css("margin-top","0"),this.$tableContainer.css("padding-bottom","0"),void this.$tableFooter.hide();this.options.showHeader&&this.options.height?(this.$tableHeader.show(),this.resetHeader(),e+=this.$header.outerHeight()):(this.$tableHeader.hide(),this.trigger("post-header")),this.options.showFooter&&(this.resetFooter(),this.options.height&&(e+=this.$tableFooter.outerHeight()+1)),this.getCaret(),this.$tableContainer.css("padding-bottom",e+"px"),this.trigger("reset-view")},g.prototype.getData=function(e){var n=this.options.data;return!this.searchText&&!this.options.sortName&&t.isEmptyObject(this.filterColumns)&&t.isEmptyObject(this.filterColumnsPartial)||(n=this.data),e?n.slice(this.pageFrom-1,this.pageTo):n},g.prototype.load=function(e){var n=!1;this.options.pagination&&"server"===this.options.sidePagination?(this.options.totalRows=e[this.options.totalField],n=e.fixedScroll,e=e[this.options.dataField]):t.isArray(e)||(n=e.fixedScroll,e=e.data),this.initData(e),this.initSearch(),this.initPagination(),this.initBody(n)},g.prototype.append=function(t){this.initData(t,"append"),this.initSearch(),this.initPagination(),this.initSort(),this.initBody(!0)},g.prototype.prepend=function(t){this.initData(t,"prepend"),this.initSearch(),this.initPagination(),this.initSort(),this.initBody(!0)},g.prototype.remove=function(e){var n,i,o=this.options.data.length;if(e.hasOwnProperty("field")&&e.hasOwnProperty("values")){for(n=o-1;n>=0;n--)i=this.options.data[n],i.hasOwnProperty(e.field)&&-1!==t.inArray(i[e.field],e.values)&&(this.options.data.splice(n,1),"server"===this.options.sidePagination&&(this.options.totalRows-=1));o!==this.options.data.length&&(this.initSearch(),this.initPagination(),this.initSort(),this.initBody(!0))}},g.prototype.removeAll=function(){this.options.data.length>0&&(this.options.data.splice(0,this.options.data.length),this.initSearch(),this.initPagination(),this.initBody(!0))},g.prototype.getRowByUniqueId=function(t){var e,n,i,o=this.options.uniqueId,r=this.options.data.length,s=null;for(e=r-1;e>=0;e--){if(n=this.options.data[e],n.hasOwnProperty(o))i=n[o];else{if(!n._data.hasOwnProperty(o))continue;i=n._data[o]}if("string"==typeof i?t=t.toString():"number"==typeof i&&(Number(i)===i&&i%1==0?t=parseInt(t):i===Number(i)&&0!==i&&(t=parseFloat(t))),i===t){s=n;break}}return s},g.prototype.removeByUniqueId=function(t){var e=this.options.data.length,n=this.getRowByUniqueId(t);n&&this.options.data.splice(this.options.data.indexOf(n),1),e!==this.options.data.length&&(this.initSearch(),this.initPagination(),this.initBody(!0))},g.prototype.updateByUniqueId=function(e){var n=this,i=t.isArray(e)?e:[e];t.each(i,function(e,i){var o;i.hasOwnProperty("id")&&i.hasOwnProperty("row")&&-1!==(o=t.inArray(n.getRowByUniqueId(i.id),n.options.data))&&t.extend(n.options.data[o],i.row)}),this.initSearch(),this.initPagination(),this.initSort(),this.initBody(!0)},g.prototype.refreshColumnTitle=function(e){if(e.hasOwnProperty("field")&&e.hasOwnProperty("title")&&(this.columns[this.fieldsColumnsIndex[e.field]].title=this.options.escape?h(e.title):e.title,this.columns[this.fieldsColumnsIndex[e.field]].visible)){(void 0!==this.options.height?this.$tableHeader:this.$header).find("th[data-field]").each(function(n){if(t(this).data("field")===e.field)return t(t(this).find(".th-inner")[0]).text(e.title),!1})}},g.prototype.insertRow=function(t){t.hasOwnProperty("index")&&t.hasOwnProperty("row")&&(this.options.data.splice(t.index,0,t.row),this.initSearch(),this.initPagination(),this.initSort(),this.initBody(!0))},g.prototype.updateRow=function(e){var n=this,i=t.isArray(e)?e:[e];t.each(i,function(e,i){i.hasOwnProperty("index")&&i.hasOwnProperty("row")&&t.extend(n.options.data[i.index],i.row)}),this.initSearch(),this.initPagination(),this.initSort(),this.initBody(!0)},g.prototype.initHiddenRows=function(){this.hiddenRows=[]},g.prototype.showRow=function(t){this.toggleRow(t,!0)},g.prototype.hideRow=function(t){this.toggleRow(t,!1)},g.prototype.toggleRow=function(e,n){var i,o;e.hasOwnProperty("index")?i=this.getData()[e.index]:e.hasOwnProperty("uniqueId")&&(i=this.getRowByUniqueId(e.uniqueId)),i&&(o=t.inArray(i,this.hiddenRows),n||-1!==o?n&&o>-1&&this.hiddenRows.splice(o,1):this.hiddenRows.push(i),this.initBody(!0))},g.prototype.getHiddenRows=function(e){var n=this,i=this.getData(),o=[];return t.each(i,function(e,i){t.inArray(i,n.hiddenRows)>-1&&o.push(i)}),this.hiddenRows=o,o},g.prototype.mergeCells=function(e){var n,i,o,r=e.index,s=t.inArray(e.field,this.getVisibleFields()),a=e.rowspan||1,l=e.colspan||1,c=this.$body.find(">tr");if(this.options.detailView&&!this.options.cardView&&(s+=1),o=c.eq(r).find(">td").eq(s),!(r<0||s<0||r>=this.data.length)){for(n=r;ntd").eq(i).hide();o.attr("rowspan",a).attr("colspan",l).show()}},g.prototype.updateCell=function(t){t.hasOwnProperty("index")&&t.hasOwnProperty("field")&&t.hasOwnProperty("value")&&(this.data[t.index][t.field]=t.value,!1!==t.reinit&&(this.initSort(),this.initBody(!0)))},g.prototype.updateCellById=function(e){var n=this;if(e.hasOwnProperty("id")&&e.hasOwnProperty("field")&&e.hasOwnProperty("value")){var i=t.isArray(e)?e:[e];t.each(i,function(e,i){var o;-1!==(o=t.inArray(n.getRowByUniqueId(i.id),n.options.data))&&(n.data[o][i.field]=i.value)}),!1!==e.reinit&&(this.initSort(),this.initBody(!0))}},g.prototype.getOptions=function(){return t.extend(!0,{},this.options)},g.prototype.getSelections=function(){var e=this;return t.grep(this.options.data,function(t){return!0===t[e.header.stateField]})},g.prototype.getAllSelections=function(){var e=this;return t.grep(this.options.data,function(t){return t[e.header.stateField]})},g.prototype.checkAll=function(){this.checkAll_(!0)},g.prototype.uncheckAll=function(){this.checkAll_(!1)},g.prototype.checkInvert=function(){var e=this,n=e.$selectItem.filter(":enabled"),i=n.filter(":checked");n.each(function(){t(this).prop("checked",!t(this).prop("checked"))}),e.updateRows(),e.updateSelected(),e.trigger("uncheck-some",i),i=e.getSelections(),e.trigger("check-some",i)},g.prototype.checkAll_=function(t){var e;t||(e=this.getSelections()),this.$selectAll.add(this.$selectAll_).prop("checked",t),this.$selectItem.filter(":enabled").prop("checked",t),this.updateRows(),t&&(e=this.getSelections()),this.trigger(t?"check-all":"uncheck-all",e)},g.prototype.check=function(t){this.check_(!0,t)},g.prototype.uncheck=function(t){this.check_(!1,t)},g.prototype.check_=function(t,e){var n=this.$selectItem.filter(o('[data-index="%s"]',e)).prop("checked",t);this.data[e][this.header.stateField]=t,this.updateSelected(),this.trigger(t?"check":"uncheck",this.data[e],n)},g.prototype.checkBy=function(t){this.checkBy_(!0,t)},g.prototype.uncheckBy=function(t){this.checkBy_(!1,t)},g.prototype.checkBy_=function(e,n){if(n.hasOwnProperty("field")&&n.hasOwnProperty("values")){var i=this,r=[];t.each(this.options.data,function(s,a){if(!a.hasOwnProperty(n.field))return!1;if(-1!==t.inArray(a[n.field],n.values)){var l=i.$selectItem.filter(":enabled").filter(o('[data-index="%s"]',s)).prop("checked",e);a[i.header.stateField]=e,r.push(a),i.trigger(e?"check":"uncheck",a,l)}}),this.updateSelected(),this.trigger(e?"check-some":"uncheck-some",r)}},g.prototype.destroy=function(){this.$el.insertBefore(this.$container),t(this.options.toolbar).insertBefore(this.$el),this.$container.next().remove(),this.$container.remove(),this.$el.html(this.$el_.html()).css("margin-top","0").attr("class",this.$el_.attr("class")||"")},g.prototype.showLoading=function(){this.$tableLoading.show()},g.prototype.hideLoading=function(){this.$tableLoading.hide()},g.prototype.togglePagination=function(){this.options.pagination=!this.options.pagination;var t=this.$toolbar.find('button[name="paginationSwitch"] i');this.options.pagination?t.attr("class",this.options.iconsPrefix+" "+this.options.icons.paginationSwitchDown):t.attr("class",this.options.iconsPrefix+" "+this.options.icons.paginationSwitchUp),this.updatePagination()},g.prototype.toggleFullscreen=function(){this.$el.closest(".bootstrap-table").toggleClass("fullscreen")},g.prototype.refresh=function(t){t&&t.url&&(this.options.url=t.url),t&&t.pageNumber&&(this.options.pageNumber=t.pageNumber),t&&t.pageSize&&(this.options.pageSize=t.pageSize),this.initServer(t&&t.silent,t&&t.query,t&&t.url),this.trigger("refresh",t)},g.prototype.resetWidth=function(){this.options.showHeader&&this.options.height&&this.fitHeader(),this.options.showFooter&&!this.options.cardView&&this.fitFooter()},g.prototype.showColumn=function(t){this.toggleColumn(this.fieldsColumnsIndex[t],!0,!0)},g.prototype.hideColumn=function(t){this.toggleColumn(this.fieldsColumnsIndex[t],!1,!0)},g.prototype.getHiddenColumns=function(){return t.grep(this.columns,function(t){return!t.visible})},g.prototype.getVisibleColumns=function(){return t.grep(this.columns,function(t){return t.visible})},g.prototype.toggleAllColumns=function(e){var n=this;if(t.each(this.columns,function(t,i){n.columns[t].visible=e}),this.initHeader(),this.initSearch(),this.initPagination(),this.initBody(),this.options.showColumns){var i=this.$toolbar.find(".keep-open input").prop("disabled",!1);i.filter(":checked").length<=this.options.minimumCountColumns&&i.filter(":checked").prop("disabled",!0)}},g.prototype.showAllColumns=function(){this.toggleAllColumns(!0)},g.prototype.hideAllColumns=function(){this.toggleAllColumns(!1)},g.prototype.filterBy=function(e){this.filterColumns=t.isEmptyObject(e)?{}:e,this.options.pageNumber=1,this.initSearch(),this.updatePagination()},g.prototype.scrollTo=function(t){if("string"==typeof t&&(t="bottom"===t?this.$tableBody[0].scrollHeight:0),"number"==typeof t&&this.$tableBody.scrollTop(t),void 0===t)return this.$tableBody.scrollTop()},g.prototype.getScrollPosition=function(){return this.scrollTo()},g.prototype.selectPage=function(t){t>0&&t<=this.options.totalPages&&(this.options.pageNumber=t,this.updatePagination())},g.prototype.prevPage=function(){this.options.pageNumber>1&&(this.options.pageNumber--,this.updatePagination())},g.prototype.nextPage=function(){this.options.pageNumber tr[data-index="%s"]',e));n.next().is("tr.detail-view")===!t&&n.find("> td > .detail-icon").click()},g.prototype.expandRow=function(t){this.expandRow_(!0,t)},g.prototype.collapseRow=function(t){this.expandRow_(!1,t)},g.prototype.expandAllRows=function(e){if(e){var n=this.$body.find(o('> tr[data-index="%s"]',0)),i=this,r=null,s=!1,a=-1;if(n.next().is("tr.detail-view")?n.next().next().is("tr.detail-view")||(n.next().find(".detail-icon").click(),s=!0):(n.find("> td > .detail-icon").click(),s=!0),s)try{a=setInterval(function(){r=i.$body.find("tr.detail-view").last().find(".detail-icon"),r.length>0?r.click():clearInterval(a)},1)}catch(t){clearInterval(a)}}else for(var l=this.$body.children(),c=0;c.btn-group"),s=r.find("div.export");if(!s.length){s=t(['
    ','",'","
    "].join("")).appendTo(r);var a=s.find(".dropdown-menu"),l=this.options.exportTypes;if("string"==typeof this.options.exportTypes){var c=this.options.exportTypes.slice(1,-1).replace(/ /g,"").split(",");l=[],t.each(c,function(t,e){l.push(e.slice(1,-1))})}t.each(l,function(t,e){n.hasOwnProperty(e)&&a.append(['
  • ','',n[e],"","
  • "].join(""))}),a.find("li").click(function(){var e=t(this).data("type"),n=function(){if(i.options.exportFooter){var n=i.getData(),o=i.$tableFooter.find("tr").first(),r={},s=[];t.each(o.children(),function(e,n){var o=t(n).children(".th-inner").first().html();r[i.columns[e].field]=" "==o?null:o,s.push(o)}),i.append(r);var a=i.$body.children().last();t.each(a.children(),function(e,n){t(n).html(s[e])})}i.$el.tableExport(t.extend({},i.options.exportOptions,{type:e,escape:!1})),i.options.exportFooter&&i.load(n)},o=i.header.stateField;if("all"===i.options.exportDataType&&i.options.pagination)i.$el.one("server"===i.options.sidePagination?"post-body.bs.table":"page-change.bs.table",function(){o&&i.hideColumn(o),n(),i.togglePagination()}),i.togglePagination();else if("selected"===i.options.exportDataType){var r=i.getData(),s=i.getSelections();if(!s.length)return;if("server"===i.options.sidePagination){var a={total:i.options.totalRows};a[i.options.dataField]=r,r=a;var l={total:s.length};l[i.options.dataField]=s,s=l}i.load(s),o&&i.hideColumn(o),n(),i.load(r)}else o&&i.hideColumn(o),n();o&&i.showColumn(o)})}}}}(jQuery),function(t){"use strict";var e={sortOrder:"bs.table.sortOrder",sortName:"bs.table.sortName",pageNumber:"bs.table.pageNumber",pageList:"bs.table.pageList",columns:"bs.table.columns",searchText:"bs.table.searchText",filterControl:"bs.table.filterControl"},n=function(t){var e=t.$header;return t.options.height&&(e=t.$tableHeader),e},i=function(t){var e="select, input";return t.options.height&&(e="table select, table input"),e},o=function(){return!!navigator.cookieEnabled},r=function(t,e){for(var n=-1,i=0;i127&&i<2048?(e+=String.fromCharCode(i>>6|192),e+=String.fromCharCode(63&i|128)):(e+=String.fromCharCode(i>>12|224),e+=String.fromCharCode(i>>6&63|128),e+=String.fromCharCode(63&i|128))}return e}function n(t){var n,o,r,s,a,l,c,h="",u=0;for(t=e(t);u>2,a=(3&n)<<4|o>>4,l=(15&o)<<2|r>>6,c=63&r,isNaN(o)?l=c=64:isNaN(r)&&(c=64),h=h+i.charAt(s)+i.charAt(a)+i.charAt(l)+i.charAt(c);return h}var i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";return{encode:function(t){return n(t)}}}(jQuery),function(t){t.fn.tableExport=function(e){function n(e){var n=[];return i(e,"tbody").each(function(){n.push.apply(n,o(t(this),L.tbodySelector).toArray())}),L.tfootSelector.length&&i(e,"tfoot").each(function(){n.push.apply(n,o(t(this),L.tfootSelector).toArray())}),n}function i(e,n){var i=e.parents("table").length;return e.find(n).filter(function(){return t(this).closest("table").parents("table").length===i})}function o(e,n){return e.find(n).filter(function(){return 0===L.maxNestedTables||t(this).find("table").length0&&(-1!==t.inArray(i,L.ignoreColumn)||-1!==t.inArray(i-n,L.ignoreColumn)||Y.length>i&&void 0!==Y[i]&&-1!==t.inArray(Y[i],L.ignoreColumn))&&(o=!0):o=!0,o}function c(e,n,i,o,r){if("function"==typeof r){var a=!1;if("function"==typeof L.onIgnoreRow&&(a=L.onIgnoreRow(t(e),i)),!1===a&&-1===t.inArray(i,L.ignoreRow)&&-1===t.inArray(i-o,L.ignoreRow)&&s(t(e))){var c=t(e).find(n),h=0;c.each(function(e){var n,o=t(this),s=T(this),a=A(this);if(t.each(G,function(){var t=this;if(i>=t.s.r&&i<=t.e.r&&h>=t.s.c&&h<=t.e.c)for(n=0;n<=t.e.c-t.s.c;++n)r(null,i,h++)}),!1===l(o,c.length,e)&&((a||s)&&(a=a||1,s=s||1,G.push({s:{r:i,c:h},e:{r:i+a-1,c:h+s-1}})),r(this,i,h++)),s)for(n=0;n=t.s.r&&i<=t.e.r&&h>=t.s.c&&h<=t.e.c)for(gt=0;gt<=t.e.c-t.s.c;++gt)r(null,i,h++)})}}}function h(t,e){if("string"===L.outputMode)return t.output();if("base64"===L.outputMode)return D(t.output());if("window"===L.outputMode)return window.URL=window.URL||window.webkitURL,void window.open(window.URL.createObjectURL(t.output("blob")));try{var n=t.output("blob");saveAs(n,L.fileName+".pdf")}catch(n){N(L.fileName+".pdf","data:application/pdf"+(e?"":";base64")+",",e?t.output("blob"):t.output())}}function u(t,e,n){var i=0;if(void 0!==n&&(i=n.colspan),i>=0){for(var o=t.width,r=t.textPos.x,s=e.table.columns.indexOf(e.column),a=1;a1&&("right"===t.styles.halign?r=t.textPos.x+o-t.width:"center"===t.styles.halign&&(r=t.textPos.x+(o-t.width)/2)),t.width=o,t.textPos.x=r,void 0!==n&&n.rowspan>1&&(t.height=t.height*n.rowspan),"middle"===t.styles.valign||"bottom"===t.styles.valign){var l="string"==typeof t.text?t.text.split(/\r\n|\r|\n/g):t.text,c=l.length||1;c>2&&(t.textPos.y-=(2-M)/2*e.row.styles.fontSize*(c-2)/3)}return!0}return!1}function d(e,n,i){void 0!==i.images&&n.each(function(){var n=t(this).children();if(t(this).is("img")){var o=q(this.src);i.images[o]={url:this.src,src:this.src}}void 0!==n&&n.length>0&&d(e,n,i)})}function p(e,n,i){n.each(function(){var n=t(this).children(),o=0;if(t(this).is("div")){var r=C(P(this,"background-color"),[255,255,255]),s=C(P(this,"border-top-color"),[0,0,0]),a=O(this,"border-top-width",L.jspdf.unit),l=this.getBoundingClientRect(),c=this.offsetLeft*i.dw;o=this.offsetTop*i.dh;var h=l.width*i.dw,u=l.height*i.dh;i.doc.setDrawColor.apply(void 0,s),i.doc.setFillColor.apply(void 0,r),i.doc.setLineWidth(a),i.doc.rect(e.x+c,e.y+o,h,u,a?"FD":"F")}else if(t(this).is("img")&&void 0!==i.images){var d=q(this.src),f=i.images[d];if(void 0!==f){var g=e.width/e.height,m=this.width/this.height,y=e.width,w=e.height;m<=g?(w=Math.min(e.height,this.height),y=this.width*w/this.height):m>g&&(y=Math.min(e.width,this.width),w=this.height*y/this.width),y*=19.049976/25.4,w*=19.049976/25.4,w0&&p(e,n,i)})}function f(e,n,i){if("function"==typeof i.onAutotableText)i.onAutotableText(i.doc,e,n);else{var o=e.textPos.x,r=e.textPos.y,s={halign:e.styles.halign,valign:e.styles.valign};if(n.length){for(var a=n[0];a.previousSibling;)a=a.previousSibling;for(var l=!1,c=!1;a;){var h=a.innerText||a.textContent||"",u=h.length&&" "===h[0]?" ":"",d=h.length>1&&" "===h[h.length-1]?" ":"";!0!==L.preserve.leadingWS&&(h=u+y(h)),!0!==L.preserve.trailingWS&&(h=w(h)+d),t(a).is("br")&&(o=e.textPos.x,r+=i.doc.internal.getFontSize()),t(a).is("b")?l=!0:t(a).is("i")&&(c=!0),(l||c)&&i.doc.setFontType(l&&c?"bolditalic":l?"bold":"italic");var p=i.doc.getStringUnitWidth(h)*i.doc.internal.getFontSize();if(p){if("linebreak"===e.styles.overflow&&o>e.textPos.x&&o+p>e.textPos.x+e.width){if(".,!%*;:=-".indexOf(h.charAt(0))>=0){var f=h.charAt(0);p=i.doc.getStringUnitWidth(f)*i.doc.internal.getFontSize(),o+p<=e.textPos.x+e.width&&(i.doc.autoTableText(f,o,r,s),h=h.substring(1,h.length)),p=i.doc.getStringUnitWidth(h)*i.doc.internal.getFontSize()}o=e.textPos.x,r+=i.doc.internal.getFontSize()}if("visible"!==e.styles.overflow)for(;h.length&&o+p>e.textPos.x+e.width;)h=h.substring(0,h.length-1),p=i.doc.getStringUnitWidth(h)*i.doc.internal.getFontSize();i.doc.autoTableText(h,o,r,s),o+=p}(l||c)&&(t(a).is("b")?l=!1:t(a).is("i")&&(c=!1),i.doc.setFontType(l||c?l?"bold":"italic":"normal")),a=a.nextSibling}e.textPos.x=o,e.textPos.y=r}else i.doc.autoTableText(e.text,e.textPos.x,e.textPos.y,s)}}function g(t){return null==t?"":t.toString().replace(/([.*+?^=!:${}()|\[\]\/\\])/g,"\\$1")}function m(t,e,n){return null==t?"":t.toString().replace(new RegExp(g(e),"g"),n)}function y(t){return null==t?"":t.toString().replace(/^\s+/,"")}function w(t){return null==t?"":t.toString().replace(/\s+$/,"")}function b(t){return t=t||"0",t=m(t,L.numbers.html.thousandsSeparator,""),("number"==typeof(t=m(t,L.numbers.html.decimalMark,"."))||!1!==jQuery.isNumeric(t))&&t}function v(t){return t.indexOf("%")>-1?!1!==(t=b(t.replace(/%/g,"")))&&(t/=100):t=!1,t}function x(e,n,i){var o="";if(null!==e){var r,s=t(e);if(s[0].hasAttribute("data-tableexport-value"))r=s.data("tableexport-value"),r=r?r+"":"";else if(r=s.html(),"function"==typeof L.onCellHtmlData)r=L.onCellHtmlData(s,n,i,r);else if(""!==r){var a=t.parseHTML(r),l=0,c=0;r="",t.each(a,function(){t(this).is("input")?r+=s.find("input").eq(l++).val():t(this).is("select")?r+=s.find("select option:selected").eq(c++).text():t(this).is("br")?r+="
    ":void 0===t(this).html()?r+=t(this).text():(void 0===jQuery().bootstrapTable||!0!==t(this).hasClass("filterControl")&&0===t(e).parents(".detail-view").length)&&(r+=t(this).html())})}if(!0===L.htmlContent)o=t.trim(r);else if(r&&""!==r){var h=t(e).data("tableexport-cellformat");if(""!==h){var u=r.replace(/\n/g,"\u2028").replace(//gi,"⁠"),d=t("
    ").html(u).contents(),p=!1;if(u="",t.each(d.text().split("\u2028"),function(t,e){t>0&&(u+=" "),!0!==L.preserve.leadingWS&&(e=y(e)),u+=!0!==L.preserve.trailingWS?w(e):e}),t.each(u.split("⁠"),function(t,e){t>0&&(o+="\n"),!0!==L.preserve.leadingWS&&(e=y(e)),!0!==L.preserve.trailingWS&&(e=w(e)),o+=e.replace(/\u00AD/g,"")}),o=o.replace(/\u00A0/g," "),"json"===L.type||"excel"===L.type&&"xmlss"===L.mso.fileFormat||!1===L.numbers.output)!1!==(p=b(o))&&(o=Number(p));else if((L.numbers.html.decimalMark!==L.numbers.output.decimalMark||L.numbers.html.thousandsSeparator!==L.numbers.output.thousandsSeparator)&&!1!==(p=b(o))){var f=(""+p.substr(p<0?1:0)).split(".");1===f.length&&(f[1]="");var g=f[0].length>3?f[0].length%3:0;o=(p<0?"-":"")+(L.numbers.output.thousandsSeparator?(g?f[0].substr(0,g)+L.numbers.output.thousandsSeparator:"")+f[0].substr(g).replace(/(\d{3})(?=\d)/g,"$1"+L.numbers.output.thousandsSeparator):f[0])+(f[1].length?L.numbers.output.decimalMark+f[1]:"")}}else o=r}!0===L.escape&&(o=escape(o)),"function"==typeof L.onCellData&&(o=L.onCellData(s,n,i,o))}return o}function k(t){if(t.length>0&&!0===L.preventInjection){if("=+-@".indexOf(t.charAt(0))>=0)return"'"+t}return t}function S(t,e,n){return e+"-"+n.toLowerCase()}function C(t,e){var n=/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,i=n.exec(t),o=e;return i&&(o=[parseInt(i[1]),parseInt(i[2]),parseInt(i[3])]),o}function _(t){var e=P(t,"text-align"),n=P(t,"font-weight"),i=P(t,"font-style"),o="";"start"===e&&(e="rtl"===P(t,"direction")?"right":"left"),n>=700&&(o="bold"),"italic"===i&&(o+=i),""===o&&(o="normal");var r={style:{align:e,bcolor:C(P(t,"background-color"),[255,255,255]),color:C(P(t,"color"),[0,0,0]),fstyle:o},colspan:T(t),rowspan:A(t)};if(null!==t){var s=t.getBoundingClientRect();r.rect={width:s.width,height:s.height}}return r}function T(e){var n=t(e).data("tableexport-colspan");return void 0===n&&t(e).is("[colspan]")&&(n=t(e).attr("colspan")),parseInt(n)||0}function A(e){var n=t(e).data("tableexport-rowspan");return void 0===n&&t(e).is("[rowspan]")&&(n=t(e).attr("rowspan")),parseInt(n)||0}function P(t,e){try{return window.getComputedStyle?(e=e.replace(/([a-z])([A-Z])/,S),window.getComputedStyle(t,null).getPropertyValue(e)):t.currentStyle?t.currentStyle[e]:t.style[e]}catch(t){}return""}function I(t,e,n){var i=document.createElement("div");i.style.overflow="hidden",i.style.visibility="hidden",t.appendChild(i),i.style.width=100+n;var o=100/i.offsetWidth;return t.removeChild(i),e*o}function O(t,e,n){var i=P(t,e),o=i.match(/\d+/);return null!==o?(o=o[0],I(t.parentElement,o,n)):0}function E(){if(!(this instanceof E))return new E;this.SheetNames=[],this.Sheets={}}function F(t){for(var e=new ArrayBuffer(t.length),n=new Uint8Array(e),i=0;i!==t.length;++i)n[i]=255&t.charCodeAt(i);return e}function R(t,e){return e&&(t+=1462),(Date.parse(t)-new Date(Date.UTC(1899,11,30)))/864e5}function q(t){var e,n,i,o=0;if(0===t.length)return o;for(e=0,i=t.length;e0||i.match(/Trident.*rv\:11\./))){var o=document.createElement("iframe");if(o){document.body.appendChild(o),o.setAttribute("style","display:none"),o.contentDocument.open("txt/plain","replace"),o.contentDocument.write(n),o.contentDocument.close(),o.contentDocument.focus();var r=t.substr(t.lastIndexOf(".")+1);switch(r){case"doc":case"json":case"png":case"pdf":case"xls":case"xlsx":t+=".txt"}o.contentDocument.execCommand("SaveAs",!0,t),document.body.removeChild(o)}}else{var s=document.createElement("a");if(s){var a=null;s.style.display="none",!1!==t?s.download=t:s.target="_blank","object"==typeof n?(window.URL=window.URL||window.webkitURL,a=window.URL.createObjectURL(n),s.href=a):e.toLowerCase().indexOf("base64,")>=0?s.href=e+D(n):s.href=e+encodeURIComponent(n),document.body.appendChild(s),document.createEvent?(null===H&&(H=document.createEvent("MouseEvents")),H.initEvent("click",!0,!1),s.dispatchEvent(H)):document.createEventObject?s.fireEvent("onclick"):"function"==typeof s.onclick&&s.onclick(),setTimeout(function(){a&&window.URL.revokeObjectURL(a),document.body.removeChild(s)},100)}}}function B(t){if("string"==typeof t){t=t.replace(/\x0d\x0a/g,"\n");for(var e="",n=0;n127&&i<2048?(e+=String.fromCharCode(i>>6|192),e+=String.fromCharCode(63&i|128)):(e+=String.fromCharCode(i>>12|224),e+=String.fromCharCode(i>>6&63|128),e+=String.fromCharCode(63&i|128))}return e}return t}function D(t){var e,n,i,o,r,s,a,l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",c="",h=0;for(t=B(t);h>2,r=(3&e)<<4|n>>4,s=(15&n)<<2|i>>6,a=63&i,isNaN(n)?s=a=64:isNaN(i)&&(a=64),c=c+l.charAt(o)+l.charAt(r)+l.charAt(s)+l.charAt(a);return c}var j,L={csvEnclosure:'"',csvSeparator:",",csvUseBOM:!0,displayTableName:!1,escape:!1,exportHiddenCells:!1,fileName:"tableExport",htmlContent:!1,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}}},maxNestedTables:1,mso:{fileFormat:"xlshtml",onMsoNumberFormat:null,pageFormat:"a4",pageOrientation:"portrait",rtl:!1,styles:[],worksheetName:""},numbers:{html:{decimalMark:".",thousandsSeparator:","},output:{decimalMark:".",thousandsSeparator:","}},onCellData:null,onCellHtmlData:null,onIgnoreRow:null,outputMode:"file",pdfmake:{enabled:!1,docDefinition:{pageOrientation:"portrait",defaultStyle:{font:"Roboto"}},fonts:{}},preserve:{leadingWS:!1,trailingWS:!1},preventInjection:!0,tbodySelector:"tr",tfootSelector:"tr",theadSelector:"tr",tableName:"Table",type:"csv"},z={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]},M=1.15,U=this,H=null,W=[],$=[],V=0,X="",Y=[],G=[],J=[],K=!1;if(t.extend(!0,L,e),"xlsx"===L.type&&(L.mso.fileFormat=L.type,L.type="excel"),void 0!==L.excelFileFormat&&"undefined"===L.mso.fileFormat&&(L.mso.fileFormat=L.excelFileFormat),void 0!==L.excelPageFormat&&"undefined"===L.mso.pageFormat&&(L.mso.pageFormat=L.excelPageFormat),void 0!==L.excelPageOrientation&&"undefined"===L.mso.pageOrientation&&(L.mso.pageOrientation=L.excelPageOrientation),void 0!==L.excelRTL&&"undefined"===L.mso.rtl&&(L.mso.rtl=L.excelRTL),void 0!==L.excelstyles&&"undefined"===L.mso.styles&&(L.mso.styles=L.excelstyles),void 0!==L.onMsoNumberFormat&&"undefined"===L.mso.onMsoNumberFormat&&(L.mso.onMsoNumberFormat=L.onMsoNumberFormat),void 0!==L.worksheetName&&"undefined"===L.mso.worksheetName&&(L.mso.worksheetName=L.worksheetName),L.mso.pageOrientation="l"===L.mso.pageOrientation.substr(0,1)?"landscape":"portrait",L.maxNestedTables=L.maxNestedTables>=0?L.maxNestedTables:1,Y=r(U),"csv"===L.type||"tsv"===L.type||"txt"===L.type){var Q="",Z=0;G=[],V=0;var tt=function(t,e,n){var i="";if(null!==t){var o=x(t,e,n),r=null===o||""===o?"":o.toString();"tsv"===L.type?(o instanceof Date&&o.toLocaleString(),i=m(r,"\t"," ")):o instanceof Date?i=L.csvEnclosure+o.toLocaleString()+L.csvEnclosure:(i=k(r),i=m(i,L.csvEnclosure,L.csvEnclosure+L.csvEnclosure),(i.indexOf(L.csvSeparator)>=0||/[\r\n ]/g.test(i))&&(i=L.csvEnclosure+i+L.csvEnclosure))}return i},et=function(e,n,i){return e.each(function(){X="",c(this,n,V,i+e.length,function(t,e,n){X+=tt(t,e,n)+("tsv"===L.type?"\t":L.csvSeparator)}),X=t.trim(X).substring(0,X.length-1),X.length>0&&(Q.length>0&&(Q+="\n"),Q+=X),V++}),e.length};if(Z+=et(t(U).find("thead").first().find(L.theadSelector),"th,td",Z),i(t(U),"tbody").each(function(){Z+=et(o(t(this),L.tbodySelector),"td,th",Z)}),L.tfootSelector.length&&et(t(U).find("tfoot").first().find(L.tfootSelector),"td,th",Z),Q+="\n","string"===L.outputMode)return Q;if("base64"===L.outputMode)return D(Q);if("window"===L.outputMode)return void N(!1,"data:text/"+("csv"===L.type?"csv":"plain")+";charset=utf-8,",Q);try{j=new Blob([Q],{type:"text/"+("csv"===L.type?"csv":"plain")+";charset=utf-8"}),saveAs(j,L.fileName+"."+L.type,"csv"!==L.type||!1===L.csvUseBOM)}catch(t){N(L.fileName+"."+L.type,"data:text/"+("csv"===L.type?"csv":"plain")+";charset=utf-8,"+("csv"===L.type&&L.csvUseBOM?"\ufeff":""),Q)}}else if("sql"===L.type){V=0,G=[];var nt="INSERT INTO `"+L.tableName+"` (";if(W=t(U).find("thead").first().find(L.theadSelector),W.each(function(){c(this,"th,td",V,W.length,function(t,e,n){nt+="'"+x(t,e,n)+"',"}),V++,nt=t.trim(nt).substring(0,nt.length-1)}),nt+=") VALUES ",$=n(t(U)),t($).each(function(){X="",c(this,"td,th",V,W.length+$.length,function(t,e,n){X+="'"+x(t,e,n)+"',"}),X.length>3&&(nt+="("+X,nt=t.trim(nt).substring(0,nt.length-1),nt+="),"),V++}),nt=t.trim(nt).substring(0,nt.length-1),nt+=";","string"===L.outputMode)return nt;if("base64"===L.outputMode)return D(nt);try{j=new Blob([nt],{type:"text/plain;charset=utf-8"}),saveAs(j,L.fileName+".sql")}catch(t){N(L.fileName+".sql","data:application/sql;charset=utf-8,",nt)}}else if("json"===L.type){var it=[];G=[],W=t(U).find("thead").first().find(L.theadSelector),W.each(function(){var t=[];c(this,"th,td",V,W.length,function(e,n,i){t.push(x(e,n,i))}),it.push(t)});var ot=[];$=n(t(U)),t($).each(function(){var e={},n=0;c(this,"td,th",V,W.length+$.length,function(t,i,o){it.length?e[it[it.length-1][n]]=x(t,i,o):e[n]=x(t,i,o),n++}),!1===t.isEmptyObject(e)&&ot.push(e),V++});var rt="";if(rt="head"===L.jsonScope?JSON.stringify(it):"data"===L.jsonScope?JSON.stringify(ot):JSON.stringify({header:it,data:ot}),"string"===L.outputMode)return rt;if("base64"===L.outputMode)return D(rt);try{j=new Blob([rt],{type:"application/json;charset=utf-8"}),saveAs(j,L.fileName+".json")}catch(t){N(L.fileName+".json","data:application/json;charset=utf-8;base64,",rt)}}else if("xml"===L.type){V=0,G=[];var st='';st+="",W=t(U).find("thead").first().find(L.theadSelector),W.each(function(){c(this,"th,td",V,W.length,function(t,e,n){st+=""+x(t,e,n)+""}),V++}),st+="";var at=1;if($=n(t(U)),t($).each(function(){var t=1;X="",c(this,"td,th",V,W.length+$.length,function(e,n,i){X+=""+x(e,n,i)+"",t++}),X.length>0&&""!==X&&(st+=''+X+"",at++),V++}),st+="","string"===L.outputMode)return st;if("base64"===L.outputMode)return D(st);try{j=new Blob([st],{type:"application/xml;charset=utf-8"}),saveAs(j,L.fileName+".xml")}catch(t){N(L.fileName+".xml","data:application/xml;charset=utf-8;base64,",st)}}else if("excel"===L.type&&"xmlss"===L.mso.fileFormat){var lt=[],ct=[];t(U).filter(function(){return s(t(this))}).each(function(){function e(e,n,i){var o=[];return t(e).each(function(){var n=0,r=0;X="",c(this,"td,th",V,i+e.length,function(e,i,s){if(null!==e){var a="",l=x(e,i,s),c="String";if(!1!==jQuery.isNumeric(l))c="Number";else{var h=v(l);!1!==h&&(l=h,c="Number",a+=' ss:StyleID="pct1"')}"Number"!==c&&(l=l.replace(/\n/g,"
    "));var u=T(e),d=A(e);t.each(o,function(){var t=this;if(V>=t.s.r&&V<=t.e.r&&r>=t.s.c&&r<=t.e.c)for(var e=0;e<=t.e.c-t.s.c;++e)r++,n++}),(d||u)&&(d=d||1,u=u||1,o.push({s:{r:V,c:r},e:{r:V+d-1,c:r+u-1}})),u>1&&(a+=' ss:MergeAcross="'+(u-1)+'"',r+=u-1),d>1&&(a+=' ss:MergeDown="'+(d-1)+'" ss:StyleID="rsp1"'),n>0&&(a+=' ss:Index="'+(r+1)+'"',n=0),X+="'+t("
    ").text(l).html()+"\r",r++}}),X.length>0&&(At+='\r'+X+"\r"),V++}),e.length}var i=t(this),o="";"string"==typeof L.mso.worksheetName&&L.mso.worksheetName.length?o=L.mso.worksheetName+" "+(ct.length+1):void 0!==L.mso.worksheetName[ct.length]&&(o=L.mso.worksheetName[ct.length]),o.length||(o=i.find("caption").text()||""),o.length||(o="Table "+(ct.length+1)),o=t.trim(o.replace(/[\\\/[\]*:?'"]/g,"").substring(0,31)),ct.push(t("
    ").text(o).html()),!1===L.exportHiddenCells&&(J=i.find("tr, th, td").filter(":hidden"),K=J.length>0),V=0,Y=r(this),At="\r";var s=0;s+=e(i.find("thead").first().find(L.theadSelector),"th,td",s),e(n(i),"td,th",s),At+="
    \r",lt.push(At)});for(var ht,ut,dt={},pt={},ft=0,gt=ct.length;ft1?ct[ft]=ct[ft].substring(0,29)+"-"+dt[ht]:pt[ht]=ft;for(var mt=(new Date).toISOString(),yt='\r\r\r\r '+mt+'\r\r\r \r\r\r 9000\r 13860\r 0\r 0\r False\r False\r\r\r \r \r \r\r',wt=0;wt\r'+lt[wt],L.mso.rtl?yt+='\r\r\r':yt+='\r',yt+="\r";if(yt+="\r","string"===L.outputMode)return yt;if("base64"===L.outputMode)return D(yt);try{j=new Blob([yt],{type:"application/xml;charset=utf-8"}),saveAs(j,L.fileName+".xml")}catch(t){N(L.fileName+".xml","data:application/xml;charset=utf-8;base64,",yt)}}else if("excel"===L.type&&"xlsx"===L.mso.fileFormat){var bt=[],vt=[];V=0,$=t(U).find("thead").first().find(L.theadSelector).toArray(),$.push.apply($,n(t(U))),t($).each(function(){var e=[];c(this,"th,td",V,$.length,function(n,i,o){if(void 0!==n&&null!==n){var r=x(n,i,o),s=T(n),a=A(n);if(t.each(vt,function(){var t=this;if(V>=t.s.r&&V<=t.e.r&&e.length>=t.s.c&&e.length<=t.e.c)for(var n=0;n<=t.e.c-t.s.c;++n)e.push(null)}),(a||s)&&(a=a||1,s=s||1,vt.push({s:{r:V,c:e.length},e:{r:V+a-1,c:e.length+s-1}})),"function"!=typeof L.onCellData&&""!==r&&r===+r&&(r=+r),e.push(""!==r?r:null),s)for(var l=0;li&&(n.s.r=i),n.s.c>o&&(n.s.c=o),n.e.r0),V=0,G=[],Y=r(this),At+="",W=e.find("thead").first().find(L.theadSelector),W.each(function(){X="",c(this,"th,td",V,W.length,function(e,n,i){if(null!==e){var o="";X+="0&&(X+=' colspan="'+a+'"');var l=A(e);l>0&&(X+=' rowspan="'+l+'"'),X+=">"+x(e,n,i)+""}}),X.length>0&&(At+=""+X+""),V++}),At+="",$=n(e),t($).each(function(){var e=t(this);X="",c(this,"td,th",V,W.length+$.length,function(n,i,o){if(null!==n){var r=x(n,i,o),s="",a=t(n).data("tableexport-msonumberformat");void 0===a&&"function"==typeof L.mso.onMsoNumberFormat&&(a=L.mso.onMsoNumberFormat(n,i,o)),void 0!==a&&""!==a&&(s="style=\"mso-number-format:'"+a+"'");for(var l in L.mso.styles)L.mso.styles.hasOwnProperty(l)&&(a=t(n).css(L.mso.styles[l]),""===a&&(a=e.css(L.mso.styles[l])),""!==a&&"0px none rgb(0, 0, 0)"!==a&&"rgba(0, 0, 0, 0)"!==a&&(s+=""===s?'style="':";",s+=L.mso.styles[l]+":"+a));X+="0&&(X+=' colspan="'+c+'"');var h=A(n);h>0&&(X+=' rowspan="'+h+'"'),"string"==typeof r&&""!==r&&(r=k(r),r=r.replace(/\n/g,"
    ")),X+=">"+r+""}}),X.length>0&&(At+="
    "+X+""),V++}), L.displayTableName&&(At+=""),At+="
    "+x(t("

    "+L.tableName+"

    "))+"
    "});var It='';if(It+='',It+="","excel"===Ct&&(It+="\x3c!--[if gte mso 9]>",It+="",It+="",It+="",It+="",It+="",It+=Pt,It+="",It+="",It+="",L.mso.rtl&&(It+=""),It+="",It+="",It+="",It+="",It+="",It+="",It+="@page { size:"+L.mso.pageOrientation+"; mso-page-orientation:"+L.mso.pageOrientation+"; }",It+="@page Section1 {size:"+z[L.mso.pageFormat][0]+"pt "+z[L.mso.pageFormat][1]+"pt",It+="; margin:1.0in 1.25in 1.0in 1.25in;mso-header-margin:.5in;mso-footer-margin:.5in;mso-paper-source:0;}",It+="div.Section1 {page:Section1;}",It+="@page Section2 {size:"+z[L.mso.pageFormat][1]+"pt "+z[L.mso.pageFormat][0]+"pt",It+=";mso-page-orientation:"+L.mso.pageOrientation+";margin:1.25in 1.0in 1.25in 1.0in;mso-header-margin:.5in;mso-footer-margin:.5in;mso-paper-source:0;}",It+="div.Section2 {page:Section2;}",It+="br {mso-data-placement:same-cell;}",It+="",It+="",It+="",It+='
    ',It+=At,It+="
    ",It+="",It+="","string"===L.outputMode)return It;if("base64"===L.outputMode)return D(It);try{j=new Blob([It],{type:"application/vnd.ms-"+L.type}),saveAs(j,L.fileName+"."+_t)}catch(t){N(L.fileName+"."+_t,"data:application/vnd.ms-"+Ct+";base64,",It)}}else if("png"===L.type)html2canvas(t(U)[0]).then(function(t){for(var e=t.toDataURL(),n=atob(e.substring(22)),i=new ArrayBuffer(n.length),o=new Uint8Array(i),r=0;r1||r>1?(o=o||1,r=r||1,t.push({colSpan:o,rowSpan:r,text:s})):t.push(s)}else t.push(" ")}),t.length&&Et.push(t),oMt){e>z.a0[0]&&(Lt="a0",zt="l");for(var n in z)z.hasOwnProperty(n)&&z[n][1]>e&&(Lt=n,zt="l",z[n][0]>e&&(zt="p"));Mt=e}}}),L.jspdf.format=""===Lt?"a4":Lt,L.jspdf.orientation=""===zt?"w":zt}null==jt.doc&&(jt.doc=new jsPDF(L.jspdf.orientation,L.jspdf.unit,L.jspdf.format),"function"==typeof L.jspdf.onDocCreated&&L.jspdf.onDocCreated(jt.doc)),!0===jt.outputImages&&(jt.images={}),void 0!==jt.images&&(t(U).filter(function(){return s(t(this))}).each(function(){var e=0;G=[],!1===L.exportHiddenCells&&(J=t(this).find("tr, th, td").filter(":hidden"),K=J.length>0),W=t(this).find("thead").find(L.theadSelector),$=n(t(this)),t($).each(function(){c(this,"td,th",W.length+e,W.length+$.length,function(e){if(void 0!==e&&null!==e){var n=t(e).children();void 0!==n&&n.length>0&&d(e,n,jt)}}),e++})}),W=[],$=[]),function(t,e){function n(){e(o)}var i,o=0,r=0;if(void 0!==t.images)for(i in t.images)t.images.hasOwnProperty(i)&&function(t){if(t.url){var e=new Image;o=++r,e.crossOrigin="Anonymous",e.onerror=e.onload=function(){if(e.complete&&(0===e.src.indexOf("data:image/")&&(e.width=t.width||e.width||0,e.height=t.height||e.height||0),e.width+e.height)){var i=document.createElement("canvas"),o=i.getContext("2d");i.width=e.width,i.height=e.height,o.drawImage(e,0,0),t.src=i.toDataURL("image/jpeg")}--r||n()},e.src=t.url}}(t.images[i]);r||n()}(jt,function(){t(U).filter(function(){return s(t(this))}).each(function(){var e;if(V=0,G=[],!1===L.exportHiddenCells&&(J=t(this).find("tr, th, td").filter(":hidden"),K=J.length>0),Y=r(this),jt.columns=[],jt.rows=[],jt.rowoptions={},"function"==typeof jt.onTable&&!1===jt.onTable(t(this),L))return!0;L.jspdf.autotable.tableExport=null;var i=t.extend(!0,{},L.jspdf.autotable);if(L.jspdf.autotable.tableExport=jt,i.margin={},t.extend(!0,i.margin,L.jspdf.margins),i.tableExport=jt,"function"!=typeof i.beforePageContent&&(i.beforePageContent=function(e){if(1===e.pageCount){var n=e.table.rows.concat(e.table.headerRow);t.each(n,function(){var t=this;t.height>0&&(t.height+=(2-M)/2*t.styles.fontSize,e.table.height+=(2-M)/2*t.styles.fontSize)})}}),"function"!=typeof i.createdHeaderCell&&(i.createdHeaderCell=function(e,n){if(e.styles=t.extend({},n.row.styles),void 0!==jt.columns[n.column.dataKey]){var o=jt.columns[n.column.dataKey];if(void 0!==o.rect){var r;e.contentWidth=o.rect.width,void 0!==jt.heightRatio&&0!==jt.heightRatio||(r=n.row.raw[n.column.dataKey].rowspan?n.row.raw[n.column.dataKey].rect.height/n.row.raw[n.column.dataKey].rowspan:n.row.raw[n.column.dataKey].rect.height,jt.heightRatio=e.styles.rowHeight/r),r=n.row.raw[n.column.dataKey].rect.height*jt.heightRatio,r>e.styles.rowHeight&&(e.styles.rowHeight=r)}e.styles.halign="inherit"===i.headerStyles.halign?"center":i.headerStyles.halign,e.styles.valign=i.headerStyles.valign,void 0!==o.style&&!0!==o.style.hidden&&("inherit"===i.headerStyles.halign&&(e.styles.halign=o.style.align),"inherit"===i.styles.fillColor&&(e.styles.fillColor=o.style.bcolor),"inherit"===i.styles.textColor&&(e.styles.textColor=o.style.color),"inherit"===i.styles.fontStyle&&(e.styles.fontStyle=o.style.fstyle))}}),"function"!=typeof i.createdCell&&(i.createdCell=function(t,e){var n=jt.rowoptions[e.row.index+":"+e.column.dataKey];t.styles.halign="inherit"===i.styles.halign?"center":i.styles.halign,t.styles.valign=i.styles.valign,void 0!==n&&void 0!==n.style&&!0!==n.style.hidden&&("inherit"===i.styles.halign&&(t.styles.halign=n.style.align),"inherit"===i.styles.fillColor&&(t.styles.fillColor=n.style.bcolor),"inherit"===i.styles.textColor&&(t.styles.textColor=n.style.color),"inherit"===i.styles.fontStyle&&(t.styles.fontStyle=n.style.fstyle))}),"function"!=typeof i.drawHeaderCell&&(i.drawHeaderCell=function(t,e){var n=jt.columns[e.column.dataKey];return(!0!==n.style.hasOwnProperty("hidden")||!0!==n.style.hidden)&&n.rowIndex>=0&&u(t,e,n)}),"function"!=typeof i.drawCell&&(i.drawCell=function(t,e){var n=jt.rowoptions[e.row.index+":"+e.column.dataKey];if(u(t,e,n))if(jt.doc.rect(t.x,t.y,t.width,t.height,t.styles.fillStyle),void 0!==n&&void 0!==n.kids&&n.kids.length>0){var i=t.height/n.rect.height;(i>jt.dh||void 0===jt.dh)&&(jt.dh=i),jt.dw=t.width/n.rect.width;var o=t.textPos.y;p(t,n.kids,jt),t.textPos.y=o,f(t,n.kids,jt)}else f(t,{},jt);return!1}),jt.headerrows=[],W=t(this).find("thead").find(L.theadSelector),W.each(function(){e=0,jt.headerrows[V]=[],c(this,"th,td",V,W.length,function(t,n,i){var o=_(t);o.title=x(t,n,i),o.key=e++,o.rowIndex=V,jt.headerrows[V].push(o)}),V++}),V>0)for(var o=V-1;o>=0;)t.each(jt.headerrows[o],function(){var t=this;o>0&&null===this.rect&&(t=jt.headerrows[o-1][this.key]),null!==t&&t.rowIndex>=0&&(!0!==t.style.hasOwnProperty("hidden")||!0!==t.style.hidden)&&jt.columns.push(t)}),o=jt.columns.length>0?-1:o-1;var s=0;$=[],$=n(t(this)),t($).each(function(){var n=[];e=0,c(this,"td,th",V,W.length+$.length,function(i,o,r){var a;void 0===jt.columns[e]&&(a={title:"",key:e,style:{hidden:!0}},jt.columns.push(a)),void 0!==i&&null!==i?(a=_(i),a.kids=t(i).children(),jt.rowoptions[s+":"+e++]=a):(a=t.extend(!0,{},jt.rowoptions[s+":"+(e-1)]),a.colspan=-1,jt.rowoptions[s+":"+e++]=a),n.push(x(i,o,r))}),n.length&&(jt.rows.push(n),s++),V++}),"function"==typeof jt.onBeforeAutotable&&jt.onBeforeAutotable(t(this),jt.columns,jt.rows,i),jt.doc.autoTable(jt.columns,jt.rows,i),"function"==typeof jt.onAfterAutotable&&jt.onAfterAutotable(t(this),i),L.jspdf.autotable.startY=jt.doc.autoTableEndPosY()+i.margin.top}),h(jt.doc,void 0!==jt.images&&!1===jQuery.isEmptyObject(jt.images)),void 0!==jt.headerrows&&(jt.headerrows.length=0),void 0!==jt.columns&&(jt.columns.length=0),void 0!==jt.rows&&(jt.rows.length=0),delete jt.doc,jt.doc=null})}return this}}(jQuery),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.jspdf=e()}(this,function(){"use strict";var t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e=(function(){function t(t){this.value=t}function e(e){function n(t,e){return new Promise(function(n,o){var a={key:t,arg:e,resolve:n,reject:o,next:null};s?s=s.next=a:(r=s=a,i(t,e))})}function i(n,r){try{var s=e[n](r),a=s.value;a instanceof t?Promise.resolve(a.value).then(function(t){i("next",t)},function(t){i("throw",t)}):o(s.done?"return":"normal",s.value)}catch(t){o("throw",t)}}function o(t,e){switch(t){case"return":r.resolve({value:e,done:!0});break;case"throw":r.reject(e);break;default:r.resolve({value:e,done:!1})}r=r.next,r?i(r.key,r.arg):s=null}var r,s;this._invoke=n,"function"!=typeof e.return&&(this.return=void 0)}"function"==typeof Symbol&&Symbol.asyncIterator&&(e.prototype[Symbol.asyncIterator]=function(){return this}),e.prototype.next=function(t){return this._invoke("next",t)},e.prototype.throw=function(t){return this._invoke("throw",t)},e.prototype.return=function(t){return this._invoke("return",t)}}(),function(e){function n(t){var n={};this.subscribe=function(t,e,i){if("function"!=typeof e)return!1;n.hasOwnProperty(t)||(n[t]={});var o=Math.random().toString(35);return n[t][o]=[e,!!i],o},this.unsubscribe=function(t){for(var e in n)if(n[e][t])return delete n[e][t],!0;return!1},this.publish=function(i){if(n.hasOwnProperty(i)){var o=Array.prototype.slice.call(arguments,1),r=[];for(var s in n[i]){var a=n[i][s];try{a[0].apply(t,o)}catch(t){e.console&&console.error("jsPDF PubSub Error",t.message,t)}a[1]&&r.push(s)}r.length&&r.forEach(this.unsubscribe)}}}function o(l,c,h,u){var d={};"object"===(void 0===l?"undefined":t(l))&&(d=l,l=d.orientation,c=d.unit||c,h=d.format||h,u=d.compress||d.compressPdf||u),c=c||"mm",h=h||"a4",l=(""+(l||"P")).toLowerCase();var p,f,g,m,y,w,b,v,x,k=((""+h).toLowerCase(),!!u&&"function"==typeof Uint8Array),S=d.textColor||"0 g",C=d.drawColor||"0 G",_=d.fontSize||16,T=d.lineHeight||1.15,A=d.lineWidth||.200025,P=2,I=!1,O=[],E={},F={},R=0,q=[],N=[],B=[],D=[],j=[],L=0,z=0,M=0,U={title:"",subject:"",author:"",keywords:"",creator:""},H={},W=new n(H),$=function(t){return t.toFixed(2)},V=function(t){return t.toFixed(3)},X=function(t){return("0"+parseInt(t)).slice(-2)},Y=function(t){I?q[m].push(t):(M+=t.length+1,D.push(t))},G=function(){return P++,O[P]=M,Y(P+" 0 obj"),P},J=function(){var t=2*q.length+1;t+=j.length;var e={objId:t,content:""};return j.push(e),e},K=function(){return P++,O[P]=function(){return M},P},Q=function(t){O[t]=M},Z=function(t){Y("stream"),Y(t),Y("endstream")},tt=function(){var t,n,i,r,a,l,c,h,u,d=[];for(c=e.adler32cs||o.adler32cs,k&&void 0===c&&(k=!1),t=1;t<=R;t++){if(d.push(G()),h=(y=B[t].width)*f,u=(w=B[t].height)*f,Y("<>"),Y("endobj"),n=q[t].join("\n"),G(),k){for(i=[],r=n.length;r--;)i[r]=n.charCodeAt(r);l=c.from(n),a=new s(6),a.append(new Uint8Array(i)),n=a.flush(),i=new Uint8Array(n.length+6),i.set(new Uint8Array([120,156])),i.set(n,2),i.set(new Uint8Array([255&l,l>>8&255,l>>16&255,l>>24&255]),n.length+2),n=String.fromCharCode.apply(null,i),Y("<>")}else Y("<>");Z(n),Y("endobj")}O[1]=M,Y("1 0 obj"),Y("<>"),Y("endobj"),W.publish("postPutPages")},et=function(t){t.objectNumber=G(),Y("<>"),Y("endobj")},nt=function(){for(var t in E)E.hasOwnProperty(t)&&et(E[t])},it=function(){W.publish("putXobjectDict")},ot=function(){Y("/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]"),Y("/Font <<");for(var t in E)E.hasOwnProperty(t)&&Y("/"+t+" "+E[t].objectNumber+" 0 R");Y(">>"),Y("/XObject <<"),it(),Y(">>")},rt=function(){nt(),W.publish("putResources"),O[2]=M,Y("2 0 obj"),Y("<<"),ot(),Y(">>"),Y("endobj"),W.publish("postPutResources")},st=function(){W.publish("putAdditionalObjects");for(var t=0;t>8&&(l=!0);t=a.join("")}for(n=t.length;void 0===l&&0!==n;)t.charCodeAt(n-1)>>8&&(l=!0),n--;if(!l)return t;for(a=e.noBOM?[]:[254,255],n=0,i=t.length;n>8)>>8)throw new Error("Character at position "+n+" of string '"+t+"' exceeds 16bits. Cannot be encoded into UCS-2 BE");a.push(h),a.push(c-(h<<8))}return String.fromCharCode.apply(void 0,a)},ht=function(t,e){return ct(t,e).replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},ut=function(){Y("/Producer (jsPDF "+o.version+")");for(var t in U)U.hasOwnProperty(t)&&U[t]&&Y("/"+t.substr(0,1).toUpperCase()+t.substr(1)+" ("+ht(U[t])+")");var e=new Date,n=e.getTimezoneOffset(),i=n<0?"+":"-",r=Math.floor(Math.abs(n/60)),s=Math.abs(n%60),a=[i,X(r),"'",X(s),"'"].join("");Y(["/CreationDate (D:",e.getFullYear(),X(e.getMonth()+1),X(e.getDate()),X(e.getHours()),X(e.getMinutes()),X(e.getSeconds()),a,")"].join(""))},dt=function(){switch(Y("/Type /Catalog"),Y("/Pages 1 0 R"),v||(v="fullwidth"),v){case"fullwidth":Y("/OpenAction [3 0 R /FitH null]");break;case"fullheight":Y("/OpenAction [3 0 R /FitV null]");break;case"fullpage":Y("/OpenAction [3 0 R /Fit]");break;case"original":Y("/OpenAction [3 0 R /XYZ null null 1]");break;default:var t=""+v;"%"===t.substr(t.length-1)&&(v=parseInt(v)/100),"number"==typeof v&&Y("/OpenAction [3 0 R /XYZ null null "+$(v)+"]")}switch(x||(x="continuous"),x){case"continuous":Y("/PageLayout /OneColumn");break;case"single":Y("/PageLayout /SinglePage");break;case"two":case"twoleft":Y("/PageLayout /TwoColumnLeft");break;case"tworight":Y("/PageLayout /TwoColumnRight")}b&&Y("/PageMode /"+b),W.publish("putCatalog")},pt=function(){Y("/Size "+(P+1)),Y("/Root "+P+" 0 R"),Y("/Info "+(P-1)+" 0 R")},ft=function(t,e){var n="string"==typeof e&&e.toLowerCase();if("string"==typeof t){var i=t.toLowerCase();a.hasOwnProperty(i)&&(t=a[i][0]/f,e=a[i][1]/f)}if(Array.isArray(t)&&(e=t[1],t=t[0]),n){switch(n.substr(0,1)){case"l":e>t&&(n="s");break;case"p":t>e&&(n="s")}"s"===n&&(g=t,t=e,e=g)}I=!0,q[++R]=[],B[R]={width:Number(t)||y,height:Number(e)||w},N[R]={},yt(R)},gt=function(){ft.apply(this,arguments),Y($(A*f)+" w"),Y(C),0!==L&&Y(L+" J"),0!==z&&Y(z+" j"),W.publish("addPage",{pageNumber:R})},mt=function(t){t>0&&t<=R&&(q.splice(t,1),B.splice(t,1),R--,m>R&&(m=R),this.setPage(m))},yt=function(t){t>0&&t<=R&&(m=t,y=B[t].width,w=B[t].height)},wt=function(t,e){var n;switch(t=void 0!==t?t:E[p].fontName,e=void 0!==e?e:E[p].fontStyle,void 0!==t&&(t=t.toLowerCase()),t){case"sans-serif":case"verdana":case"arial":case"helvetica":t="helvetica";break;case"fixed":case"monospace":case"terminal":case"courier":t="courier";break;case"serif":case"cursive":case"fantasy":default:t="times"}try{n=F[t][e]}catch(t){}return n||null==(n=F.times[e])&&(n=F.times.normal),n},bt=function(){I=!1,P=2,M=0,D=[],O=[],j=[],W.publish("buildDocument"),Y("%PDF-"+r),tt(),st(),rt(),G(),Y("<<"),ut(),Y(">>"),Y("endobj"),G(),Y("<<"),dt(),Y(">>"),Y("endobj");var t,e=M,n="0000000000";for(Y("xref"),Y("0 "+(P+1)),Y(n+" 65535 f "),t=1;t<=P;t++){var i=O[t];Y("function"==typeof i?(n+O[t]()).slice(-10)+" 00000 n ":(n+O[t]).slice(-10)+" 00000 n ")}return Y("trailer"),Y("<<"),pt(),Y(">>"),Y("startxref"),Y(""+e),Y("%%EOF"),I=!0,D.join("\n")},vt=function(t){var e="S";return"F"===t?e="f":"FD"===t||"DF"===t?e="B":"f"!==t&&"f*"!==t&&"B"!==t&&"B*"!==t||(e=t),e},xt=function(){for(var t=bt(),e=t.length,n=new ArrayBuffer(e),i=new Uint8Array(n);e--;)i[e]=t.charCodeAt(e);return n},kt=function(){return new Blob([xt()],{type:"application/pdf"})},St=function(t){return t.foo=function(){try{return t.apply(this,arguments)}catch(t){var n=t.stack||"";~n.indexOf(" at ")&&(n=n.split(" at ")[1]);var i="Error in function "+n.split("\n")[0].split("<")[0]+": "+t.message;if(!e.console)throw new Error(i);e.console.error(i,t),e.alert&&alert(i)}},t.foo.bar=t,t.foo}(function(t,n){var o="dataur"===(""+t).substr(0,6)?"data:application/pdf;base64,"+btoa(bt()):0;switch(t){case void 0:return bt();case"save":if(navigator.getUserMedia&&(void 0===e.URL||void 0===e.URL.createObjectURL))return H.output("dataurlnewwindow");i(kt(),n),"function"==typeof i.unload&&e.setTimeout&&setTimeout(i.unload,911);break;case"arraybuffer":return xt();case"blob":return kt();case"bloburi":case"bloburl":return e.URL&&e.URL.createObjectURL(kt())||void 0;case"datauristring":case"dataurlstring":return o;case"dataurlnewwindow":var r=e.open(o);if(r||"undefined"==typeof safari)return r;case"datauri":case"dataurl":return e.document.location.href=o;default:throw new Error('Output type "'+t+'" is not supported.')}});switch(c){case"pt":f=1;break;case"mm":f=72/25.4000508;break;case"cm":f=72/2.54000508;break;case"in":f=72;break;case"px":f=96/72;break;case"pc":case"em":f=12;break;case"ex":f=6;break;default:throw"Invalid unit: "+c}H.internal={pdfEscape:ht,getStyle:vt,getFont:function(){return E[wt.apply(H,arguments)]},getFontSize:function(){return _},getLineHeight:function(){return _*T},write:function(t){Y(1===arguments.length?t:Array.prototype.join.call(arguments," "))},getCoordinateString:function(t){return $(t*f)},getVerticalCoordinateString:function(t){return $((w-t)*f)},collections:{},newObject:G,newAdditionalObject:J,newObjectDeferred:K,newObjectDeferredBegin:Q,putStream:Z,events:W,scaleFactor:f,pageSize:{get width(){return y},get height(){return w}},output:function(t,e){return St(t,e)},getNumberOfPages:function(){return q.length-1},pages:q,out:Y,f2:$,getPageInfo:function(t){return{objId:2*(t-1)+3,pageNumber:t,pageContext:N[t]}},getCurrentPageInfo:function(){return{objId:2*(m-1)+3,pageNumber:m,pageContext:N[m]}},getPDFVersion:function(){return r}},H.addPage=function(){return gt.apply(this,arguments),this},H.setPage=function(){return yt.apply(this,arguments),this},H.insertPage=function(t){return this.addPage(),this.movePage(m,t),this},H.movePage=function(t,e){if(t>e){for(var n=q[t],i=B[t],o=N[t],r=t;r>e;r--)q[r]=q[r-1],B[r]=B[r-1],N[r]=N[r-1];q[e]=n,B[e]=i,N[e]=o,this.setPage(e)}else if(t>16&255,e=i>>8&255,n=255&i}return S=0===t&&0===e&&0===n||void 0===e?V(t/255)+" g":[V(t/255),V(e/255),V(n/255),"rg"].join(" "),this},H.CapJoinStyles={0:0,butt:0,but:0,miter:0,1:1,round:1,rounded:1,circle:1,2:2,projecting:2,project:2,square:2,bevel:2},H.setLineCap=function(t){var e=this.CapJoinStyles[t];if(void 0===e)throw new Error("Line cap style of '"+t+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return L=e,Y(e+" J"),this},H.setLineJoin=function(t){var e=this.CapJoinStyles[t];if(void 0===e)throw new Error("Line join style of '"+t+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return z=e,Y(e+" j"),this},H.output=St,H.save=function(t){H.output("save",t)};for(var Ct in o.API)o.API.hasOwnProperty(Ct)&&("events"===Ct&&o.API.events.length?function(t,e){var n,i,o;for(o=e.length-1;-1!==o;o--)n=e[o][0],i=e[o][1],t.subscribe.apply(t,[n].concat("function"==typeof i?[i]:i))}(W,o.API.events):H[Ct]=o.API[Ct]);return function(){for(var t="helvetica",e="times",n="courier",i="normal",o="bold",r="italic",s="bolditalic",a=[["Helvetica",t,i],["Helvetica-Bold",t,o],["Helvetica-Oblique",t,r],["Helvetica-BoldOblique",t,s],["Courier",n,i],["Courier-Bold",n,o],["Courier-Oblique",n,r],["Courier-BoldOblique",n,s],["Times-Roman",e,i],["Times-Bold",e,o],["Times-Italic",e,r],["Times-BoldItalic",e,s],["ZapfDingbats","zapfdingbats"]],l=0,c=a.length;l>\n",this.acroformPlugin.xForms.push(a)}if(o.appearanceStreamContent){s+="/AP << ";for(var l in o.appearanceStreamContent){var c=o.appearanceStreamContent[l];if(s+="/"+l+" ",s+="<< ",Object.keys(c).length>=1||Array.isArray(c))for(var i in c){var h=c[i];"function"==typeof h&&(h=h.call(this,o)),s+="/"+i+" "+h+" ",this.acroformPlugin.xForms.indexOf(h)>=0||this.acroformPlugin.xForms.push(h)}else{var h=c;"function"==typeof h&&(h=h.call(this,o)),s+="/"+i+" "+h+" \n",this.acroformPlugin.xForms.indexOf(h)>=0||this.acroformPlugin.xForms.push(h)}s+=" >>\n"}s+=">>\n"}s+=">>\nendobj\n",this.internal.out(s)}e&&u.call(this,this.acroformPlugin.xForms)},u=function(t){for(var e in t){var n=e,i=t[e];this.internal.newObjectDeferredBegin(i&&i.objId);var o="";o+=i?i.getString():"",this.internal.out(o),delete t[n]}};t.addField=function(t){return t instanceof n.TextField?p.call(this,t):t instanceof n.ChoiceField?f.call(this,t):t instanceof n.Button?d.call(this,t):t instanceof n.ChildClass?a.call(this,t):t&&a.call(this,t),t.page=this.acroformPlugin.internal.getCurrentPageInfo().pageNumber,this};var d=function(t){var t=t||new n.Field;t.FT="/Btn";var e=t.Ff||0 ;t.pushbutton&&(e=n.internal.setBitPosition(e,17),delete t.pushbutton),t.radio&&(e=n.internal.setBitPosition(e,16),delete t.radio),t.noToggleToOff&&(e=n.internal.setBitPosition(e,15)),t.Ff=e,a.call(this,t)},p=function(t){var t=t||new n.Field;t.FT="/Tx";var e=t.Ff||0;t.multiline&&(e|=4096),t.password&&(e|=8192),t.fileSelect&&(e|=1<<20),t.doNotSpellCheck&&(e|=1<<22),t.doNotScroll&&(e|=1<<23),t.Ff=t.Ff||e,a.call(this,t)},f=function(t){var e=t||new n.Field;e.FT="/Ch";var i=e.Ff||0;e.combo&&(i=n.internal.setBitPosition(i,18),delete e.combo),e.edit&&(i=n.internal.setBitPosition(i,19),delete e.edit),e.sort&&(i=n.internal.setBitPosition(i,20),delete e.sort),e.multiSelect&&this.internal.getPDFVersion()>=1.4&&(i=n.internal.setBitPosition(i,22),delete e.multiSelect),e.doNotSpellCheck&&this.internal.getPDFVersion()>=1.4&&(i=n.internal.setBitPosition(i,23),delete e.doNotSpellCheck),e.Ff=i,a.call(this,e)}})(e.API);var n=window.AcroForm;n.internal={},n.createFormXObject=function(t){var e=new n.FormXObject,i=n.Appearance.internal.getHeight(t)||0,o=n.Appearance.internal.getWidth(t)||0;return e.BBox=[0,0,o,i],e},n.Appearance={CheckBox:{createAppearanceStream:function(){return{N:{On:n.Appearance.CheckBox.YesNormal},D:{On:n.Appearance.CheckBox.YesPushDown,Off:n.Appearance.CheckBox.OffPushDown}}},createMK:function(){return"<< /CA (3)>>"},YesPushDown:function(t){var e=n.createFormXObject(t),i="";t.Q=1;var o=n.internal.calculateX(t,"3","ZapfDingbats",50);return i+="0.749023 g\n 0 0 "+n.Appearance.internal.getWidth(t)+" "+n.Appearance.internal.getHeight(t)+" re\n f\n BMC\n q\n 0 0 1 rg\n /F13 "+o.fontSize+" Tf 0 g\n BT\n",i+=o.text,i+="ET\n Q\n EMC\n",e.stream=i,e},YesNormal:function(t){var e=n.createFormXObject(t),i="";t.Q=1;var o=n.internal.calculateX(t,"3","ZapfDingbats",.9*n.Appearance.internal.getHeight(t));return i+="1 g\n0 0 "+n.Appearance.internal.getWidth(t)+" "+n.Appearance.internal.getHeight(t)+" re\nf\nq\n0 0 1 rg\n0 0 "+(n.Appearance.internal.getWidth(t)-1)+" "+(n.Appearance.internal.getHeight(t)-1)+" re\nW\nn\n0 g\nBT\n/F13 "+o.fontSize+" Tf 0 g\n",i+=o.text,i+="ET\n Q\n",e.stream=i,e},OffPushDown:function(t){var e=n.createFormXObject(t),i="";return i+="0.749023 g\n 0 0 "+n.Appearance.internal.getWidth(t)+" "+n.Appearance.internal.getHeight(t)+" re\n f\n",e.stream=i,e}},RadioButton:{Circle:{createAppearanceStream:function(t){var e={D:{Off:n.Appearance.RadioButton.Circle.OffPushDown},N:{}};return e.N[t]=n.Appearance.RadioButton.Circle.YesNormal,e.D[t]=n.Appearance.RadioButton.Circle.YesPushDown,e},createMK:function(){return"<< /CA (l)>>"},YesNormal:function(t){var e=n.createFormXObject(t),i="",o=n.Appearance.internal.getWidth(t)<=n.Appearance.internal.getHeight(t)?n.Appearance.internal.getWidth(t)/4:n.Appearance.internal.getHeight(t)/4;o*=.9;var r=n.Appearance.internal.Bezier_C;return i+="q\n1 0 0 1 "+n.Appearance.internal.getWidth(t)/2+" "+n.Appearance.internal.getHeight(t)/2+" cm\n"+o+" 0 m\n"+o+" "+o*r+" "+o*r+" "+o+" 0 "+o+" c\n-"+o*r+" "+o+" -"+o+" "+o*r+" -"+o+" 0 c\n-"+o+" -"+o*r+" -"+o*r+" -"+o+" 0 -"+o+" c\n"+o*r+" -"+o+" "+o+" -"+o*r+" "+o+" 0 c\nf\nQ\n",e.stream=i,e},YesPushDown:function(t){var e=n.createFormXObject(t),i="",o=n.Appearance.internal.getWidth(t)<=n.Appearance.internal.getHeight(t)?n.Appearance.internal.getWidth(t)/4:n.Appearance.internal.getHeight(t)/4;o*=.9;var r=2*o,s=r*n.Appearance.internal.Bezier_C,a=o*n.Appearance.internal.Bezier_C;return i+="0.749023 g\n q\n 1 0 0 1 "+n.Appearance.internal.getWidth(t)/2+" "+n.Appearance.internal.getHeight(t)/2+" cm\n"+r+" 0 m\n"+r+" "+s+" "+s+" "+r+" 0 "+r+" c\n-"+s+" "+r+" -"+r+" "+s+" -"+r+" 0 c\n-"+r+" -"+s+" -"+s+" -"+r+" 0 -"+r+" c\n"+s+" -"+r+" "+r+" -"+s+" "+r+" 0 c\n f\n Q\n 0 g\n q\n 1 0 0 1 "+n.Appearance.internal.getWidth(t)/2+" "+n.Appearance.internal.getHeight(t)/2+" cm\n"+o+" 0 m\n"+o+" "+a+" "+a+" "+o+" 0 "+o+" c\n-"+a+" "+o+" -"+o+" "+a+" -"+o+" 0 c\n-"+o+" -"+a+" -"+a+" -"+o+" 0 -"+o+" c\n"+a+" -"+o+" "+o+" -"+a+" "+o+" 0 c\n f\n Q\n",e.stream=i,e},OffPushDown:function(t){var e=n.createFormXObject(t),i="",o=n.Appearance.internal.getWidth(t)<=n.Appearance.internal.getHeight(t)?n.Appearance.internal.getWidth(t)/4:n.Appearance.internal.getHeight(t)/4;o*=.9;var r=2*o,s=r*n.Appearance.internal.Bezier_C;return i+="0.749023 g\n q\n 1 0 0 1 "+n.Appearance.internal.getWidth(t)/2+" "+n.Appearance.internal.getHeight(t)/2+" cm\n"+r+" 0 m\n"+r+" "+s+" "+s+" "+r+" 0 "+r+" c\n-"+s+" "+r+" -"+r+" "+s+" -"+r+" 0 c\n-"+r+" -"+s+" -"+s+" -"+r+" 0 -"+r+" c\n"+s+" -"+r+" "+r+" -"+s+" "+r+" 0 c\n f\n Q\n",e.stream=i,e}},Cross:{createAppearanceStream:function(t){var e={D:{Off:n.Appearance.RadioButton.Cross.OffPushDown},N:{}};return e.N[t]=n.Appearance.RadioButton.Cross.YesNormal,e.D[t]=n.Appearance.RadioButton.Cross.YesPushDown,e},createMK:function(){return"<< /CA (8)>>"},YesNormal:function(t){var e=n.createFormXObject(t),i="",o=n.Appearance.internal.calculateCross(t);return i+="q\n 1 1 "+(n.Appearance.internal.getWidth(t)-2)+" "+(n.Appearance.internal.getHeight(t)-2)+" re\n W\n n\n "+o.x1.x+" "+o.x1.y+" m\n "+o.x2.x+" "+o.x2.y+" l\n "+o.x4.x+" "+o.x4.y+" m\n "+o.x3.x+" "+o.x3.y+" l\n s\n Q\n",e.stream=i,e},YesPushDown:function(t){var e=n.createFormXObject(t),i=n.Appearance.internal.calculateCross(t),o="";return o+="0.749023 g\n 0 0 "+n.Appearance.internal.getWidth(t)+" "+n.Appearance.internal.getHeight(t)+" re\n f\n q\n 1 1 "+(n.Appearance.internal.getWidth(t)-2)+" "+(n.Appearance.internal.getHeight(t)-2)+" re\n W\n n\n "+i.x1.x+" "+i.x1.y+" m\n "+i.x2.x+" "+i.x2.y+" l\n "+i.x4.x+" "+i.x4.y+" m\n "+i.x3.x+" "+i.x3.y+" l\n s\n Q\n",e.stream=o,e},OffPushDown:function(t){var e=n.createFormXObject(t),i="";return i+="0.749023 g\n 0 0 "+n.Appearance.internal.getWidth(t)+" "+n.Appearance.internal.getHeight(t)+" re\n f\n",e.stream=i,e}}},createDefaultAppearanceStream:function(t){var e="";return e+="/Helv 0 Tf 0 g"}},n.Appearance.internal={Bezier_C:.551915024494,calculateCross:function(t){var e=n.Appearance.internal.getWidth(t),i=n.Appearance.internal.getHeight(t),o=function(t,e){return t>e?e:t}(e,i);return{x1:{x:(e-o)/2,y:(i-o)/2+o},x2:{x:(e-o)/2+o,y:(i-o)/2},x3:{x:(e-o)/2,y:(i-o)/2},x4:{x:(e-o)/2+o,y:(i-o)/2+o}}}},n.Appearance.internal.getWidth=function(t){return t.Rect[2]},n.Appearance.internal.getHeight=function(t){return t.Rect[3]},n.internal.inherit=function(t,e){Object.create,t.prototype=Object.create(e.prototype),t.prototype.constructor=t},n.internal.arrayToPdfArray=function(t){if(Array.isArray(t)){var e=" [";for(var n in t){e+=t[n].toString(),e+=n>\n",this.stream&&(t+="stream\n",t+=this.stream,t+="endstream\n"),t+="endobj\n"},n.PDFObject.prototype.getContent=function(){var t="";return t+=function(t){var e="",i=Object.keys(t).filter(function(t){return"content"!=t&&"appearanceStreamContent"!=t&&"_"!=t.substring(0,1)});for(var o in i){var r=i[o],s=t[r];s&&(e+=Array.isArray(s)?"/"+r+" "+n.internal.arrayToPdfArray(s)+"\n":s instanceof n.PDFObject?"/"+r+" "+s.objId+" 0 R\n":"/"+r+" "+s+"\n")}return e}(this)},n.FormXObject=function(){n.PDFObject.call(this),this.Type="/XObject",this.Subtype="/Form",this.FormType=1,this.BBox,this.Matrix,this.Resources="2 0 R",this.PieceInfo;var t;Object.defineProperty(this,"Length",{enumerable:!0,get:function(){return void 0!==t?t.length:0}}),Object.defineProperty(this,"stream",{enumerable:!1,set:function(e){t=e},get:function(){return t||null}})},n.internal.inherit(n.FormXObject,n.PDFObject),n.AcroFormDictionary=function(){n.PDFObject.call(this);var t=[];Object.defineProperty(this,"Kids",{enumerable:!1,configurable:!0,get:function(){return t.length>0?t:void 0}}),Object.defineProperty(this,"Fields",{enumerable:!0,configurable:!0,get:function(){return t}}),this.DA},n.internal.inherit(n.AcroFormDictionary,n.PDFObject),n.Field=function(){n.PDFObject.call(this);var t;Object.defineProperty(this,"Rect",{enumerable:!0,configurable:!1,get:function(){if(t){return t}},set:function(e){t=e}});var e="";Object.defineProperty(this,"FT",{enumerable:!0,set:function(t){e=t},get:function(){return e}});var i;Object.defineProperty(this,"T",{enumerable:!0,configurable:!1,set:function(t){i=t},get:function(){if(!i||i.length<1){if(this instanceof n.ChildClass)return;return"(FieldObject"+n.Field.FieldNum+++")"}return"("==i.substring(0,1)&&i.substring(i.length-1)?i:"("+i+")"}});var o;Object.defineProperty(this,"DA",{enumerable:!0,get:function(){if(o)return"("+o+")"},set:function(t){o=t}});var r;Object.defineProperty(this,"DV",{enumerable:!0,configurable:!0,get:function(){if(r)return r},set:function(t){r=t}}),Object.defineProperty(this,"Type",{enumerable:!0,get:function(){return this.hasAnnotation?"/Annot":null}}),Object.defineProperty(this,"Subtype",{enumerable:!0,get:function(){return this.hasAnnotation?"/Widget":null}}),this.BG,Object.defineProperty(this,"hasAnnotation",{enumerable:!1,get:function(){return!!(this.Rect||this.BC||this.BG)}}),Object.defineProperty(this,"hasAppearanceStream",{enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(this,"page",{enumerable:!1,configurable:!0,writable:!0})},n.Field.FieldNum=0,n.internal.inherit(n.Field,n.PDFObject),n.ChoiceField=function(){n.Field.call(this),this.FT="/Ch",this.Opt=[],this.V="()",this.TI=0,this.combo=!1,Object.defineProperty(this,"edit",{enumerable:!0,set:function(t){1==t?(this._edit=!0,this.combo=!0):this._edit=!1},get:function(){return!!this._edit&&this._edit},configurable:!1}),this.hasAppearanceStream=!0,Object.defineProperty(this,"V",{get:function(){n.internal.toPdfString()}})},n.internal.inherit(n.ChoiceField,n.Field),window.ChoiceField=n.ChoiceField,n.ListBox=function(){n.ChoiceField.call(this)},n.internal.inherit(n.ListBox,n.ChoiceField),window.ListBox=n.ListBox,n.ComboBox=function(){n.ListBox.call(this),this.combo=!0},n.internal.inherit(n.ComboBox,n.ListBox),window.ComboBox=n.ComboBox,n.EditBox=function(){n.ComboBox.call(this),this.edit=!0},n.internal.inherit(n.EditBox,n.ComboBox),window.EditBox=n.EditBox,n.Button=function(){n.Field.call(this),this.FT="/Btn"},n.internal.inherit(n.Button,n.Field),window.Button=n.Button,n.PushButton=function(){n.Button.call(this),this.pushbutton=!0},n.internal.inherit(n.PushButton,n.Button),window.PushButton=n.PushButton,n.RadioButton=function(){n.Button.call(this),this.radio=!0;var t=[];Object.defineProperty(this,"Kids",{enumerable:!0,get:function(){if(t.length>0)return t}}),Object.defineProperty(this,"__Kids",{get:function(){return t}});var e;Object.defineProperty(this,"noToggleToOff",{enumerable:!1,get:function(){return e},set:function(t){e=t}})},n.internal.inherit(n.RadioButton,n.Button),window.RadioButton=n.RadioButton,n.ChildClass=function(t,e){n.Field.call(this),this.Parent=t,this._AppearanceType=n.Appearance.RadioButton.Circle,this.appearanceStreamContent=this._AppearanceType.createAppearanceStream(e),this.F=n.internal.setBitPosition(this.F,3,1),this.MK=this._AppearanceType.createMK(),this.AS="/Off",this._Name=e},n.internal.inherit(n.ChildClass,n.Field),n.RadioButton.prototype.setAppearance=function(t){if(!("createAppearanceStream"in t&&"createMK"in t))return void console.log("Couldn't assign Appearance to RadioButton. Appearance was Invalid!");for(var e in this.__Kids){var n=this.__Kids[e];n.appearanceStreamContent=t.createAppearanceStream(n._Name),n.MK=t.createMK()}},n.RadioButton.prototype.createOption=function(t){var i=this,o=(this.__Kids.length,new n.ChildClass(i,t));return this.__Kids.push(o),e.API.addField(o),o},n.CheckBox=function(){Button.call(this),this.appearanceStreamContent=n.Appearance.CheckBox.createAppearanceStream(),this.MK=n.Appearance.CheckBox.createMK(),this.AS="/On",this.V="/On"},n.internal.inherit(n.CheckBox,n.Button),window.CheckBox=n.CheckBox,n.TextField=function(){n.Field.call(this),this.DA=n.Appearance.createDefaultAppearanceStream(),this.F=4;var t;Object.defineProperty(this,"V",{get:function(){return t?"("+t+")":t},enumerable:!0,set:function(e){t=e}});var e;Object.defineProperty(this,"DV",{get:function(){return e?"("+e+")":e},enumerable:!0,set:function(t){e=t}});var i=!1;Object.defineProperty(this,"multiline",{enumerable:!1,get:function(){return i},set:function(t){i=t}});var o=!1;Object.defineProperty(this,"MaxLen",{enumerable:!0,get:function(){return o},set:function(t){o=t}}),Object.defineProperty(this,"hasAppearanceStream",{enumerable:!1,get:function(){return this.V||this.DV}})},n.internal.inherit(n.TextField,n.Field),window.TextField=n.TextField,n.PasswordField=function(){TextField.call(this),Object.defineProperty(this,"password",{value:!0,enumerable:!1,configurable:!1,writable:!1})},n.internal.inherit(n.PasswordField,n.TextField),window.PasswordField=n.PasswordField,n.internal.calculateFontSpace=function(t,e,i){var i=i||"helvetica",o=n.internal.calculateFontSpace.canvas||(n.internal.calculateFontSpace.canvas=document.createElement("canvas")),r=o.getContext("2d");r.save();var s=e+" "+i;r.font=s;var a=r.measureText(t);r.fontcolor="black";var r=o.getContext("2d");return a.height=1.5*r.measureText("3").width,r.restore(),a.width,a},n.internal.calculateX=function(t,e,i,o){var o=o||12,i=i||"helvetica",r={text:"",fontSize:""};e="("==e.substr(0,1)?e.substr(1):e,e=")"==e.substr(e.length-1)?e.substr(0,e.length-1):e;var s=e.split(" "),a=o,l=n.Appearance.internal.getHeight(t)||0;l=l<0?-l:l;var c=n.Appearance.internal.getWidth(t)||0;c=c<0?-c:c;a++;t:for(;;){var e="";a--;var h=n.internal.calculateFontSpace("3",a+"px",i).height,u=t.multiline?l-a:(l-h)/2;u+=2;var d=-2,p=u,f=0,g=0,m=0;if(0==a){a=12,e="(...) Tj\n",e+="% Width of Text: "+n.internal.calculateFontSpace(e,"1px").width+", FieldWidth:"+c+"\n";break}m=n.internal.calculateFontSpace(s[0]+" ",a+"px",i).width;var y="",w=0;for(var b in s){y+=s[b]+" ",y=" "==y.substr(y.length-1)?y.substr(0,y.length-1):y;var v=parseInt(b);m=n.internal.calculateFontSpace(y+" ",a+"px",i).width;var x=function(t,e,o){if(t+1=s.length-1;if(!x||k){if(x||k){if(k)g=v;else if(t.multiline&&(h+2)*(w+2)+2>l)continue t}else{if(!t.multiline)continue t;if((h+2)*(w+2)+2>l)continue t;g=v}for(var S="",C=f;C<=g;C++)S+=s[C]+" ";switch(S=" "==S.substr(S.length-1)?S.substr(0,S.length-1):S,m=n.internal.calculateFontSpace(S,a+"px",i).width,t.Q){case 2:d=c-m-2;break;case 1:d=(c-m)/2;break;case 0:default:d=2}e+=d+" "+p+" Td\n",e+="("+S+") Tj\n",e+=-d+" 0 Td\n",p=-(a+2),d,m=0,f=g+1,w++,y=""}else y+=" "}break}return r.text=e,r.fontSize=a,r},n.internal.calculateAppearanceStream=function(t){if(t.appearanceStreamContent)return t.appearanceStreamContent;if(t.V||t.DV){var e="",i=t.V||t.DV,o=n.internal.calculateX(t,i);e+="/Tx BMC\nq\n/F1 "+o.fontSize+" Tf\n1 0 0 1 0 0 Tm\n",e+="BT\n",e+=o.text,e+="ET\n",e+="Q\nEMC\n";var r=new n.createFormXObject(t);return r.stream=e,r}},n.internal.calculateCoordinates=function(t,e,i,o){var r={};if(this.internal){var s=function(t){return t*this.internal.scaleFactor};Array.isArray(t)?(t[0]=n.scale(t[0]),t[1]=n.scale(t[1]),t[2]=n.scale(t[2]),t[3]=n.scale(t[3]),r.lowerLeft_X=t[0]||0,r.lowerLeft_Y=s.call(this,this.internal.pageSize.height)-t[3]-t[1]||0,r.upperRight_X=t[0]+t[2]||0,r.upperRight_Y=s.call(this,this.internal.pageSize.height)-t[1]||0):(t=n.scale(t),e=n.scale(e),i=n.scale(i),o=n.scale(o),r.lowerLeft_X=t||0,r.lowerLeft_Y=this.internal.pageSize.height-e||0,r.upperRight_X=t+i||0,r.upperRight_Y=this.internal.pageSize.height-e+o||0)}else Array.isArray(t)?(r.lowerLeft_X=t[0]||0,r.lowerLeft_Y=t[1]||0,r.upperRight_X=t[0]+t[2]||0,r.upperRight_Y=t[1]+t[3]||0):(r.lowerLeft_X=t||0,r.lowerLeft_Y=e||0,r.upperRight_X=t+i||0,r.upperRight_Y=e+o||0);return[r.lowerLeft_X,r.lowerLeft_Y,r.upperRight_X,r.upperRight_Y]},n.internal.calculateColor=function(t,e,n){var i=new Array(3);return i.r=0|t,i.g=0|e,i.b=0|n,i},n.internal.getBitPosition=function(t,e){t=t||0;var n=1;return n<<=e-1,t|n},n.internal.setBitPosition=function(t,e,n){t=t||0,n=n||1;var i=1;if(i<<=e-1,1==n)var t=t|i;else var t=t&~i;return t},function(t){t.addHTML=function(t,e,n,i,o){if("undefined"==typeof html2canvas&&"undefined"==typeof rasterizeHTML)throw new Error("You need either https://github.com/niklasvh/html2canvas or https://github.com/cburgmer/rasterizeHTML.js");"number"!=typeof e&&(i=e,o=n),"function"==typeof i&&(o=i,i=null);var r=this.internal,s=r.scaleFactor,a=r.pageSize.width,l=r.pageSize.height;if(i=i||{},i.onrendered=function(t){e=parseInt(e)||0,n=parseInt(n)||0;var r=i.dim||{},c=r.h||0,h=r.w||Math.min(a,t.width/s)-e,u="JPEG";if(i.format&&(u=i.format),t.height>l&&i.pagesplit){var d=function(){for(var i=0;;){var r=document.createElement("canvas");r.width=Math.min(a*s,t.width),r.height=Math.min(l*s,t.height-i);r.getContext("2d").drawImage(t,0,i,t.width,r.height,0,0,r.width,r.height);var c=[r,e,i?0:n,r.width/s,r.height/s,u,null,"SLOW"];if(this.addImage.apply(this,c),(i+=r.height)>=t.height)break;this.addPage()}o(h,i,null,c)}.bind(this);if("CANVAS"===t.nodeName){var p=new Image;p.onload=d,p.src=t.toDataURL("image/png"),t=p}else d()}else{var f=Math.random().toString(35),g=[t,e,n,h,c,u,f,"SLOW"];this.addImage.apply(this,g),o(h,c,f,g)}}.bind(this),"undefined"!=typeof html2canvas&&!i.rstz)return html2canvas(t,i);if("undefined"!=typeof rasterizeHTML){var c="drawDocument";return"string"==typeof t&&(c=/^http/.test(t)?"drawURL":"drawHTML"),i.width=i.width||a*s,rasterizeHTML[c](t,void 0,i).then(function(t){i.onrendered(t.image)},function(t){o(null,t)})}return null}}(e.API),function(e){var n="addImage_",i=["jpeg","jpg","png"],o=function t(e){var n=this.internal.newObject(),i=this.internal.write,o=this.internal.putStream;if(e.n=n,i("<>"),"trns"in e&&e.trns.constructor==Array){for(var r="",s=0,a=e.trns.length;s>"),o(e.data),i("endobj"),"smask"in e){var l="/Predictor "+e.p+" /Colors 1 /BitsPerComponent "+e.bpc+" /Columns "+e.w,c={w:e.w,h:e.h,cs:"DeviceGray",bpc:e.bpc,dp:l,data:e.smask};"f"in e&&(c.f=e.f),t.call(this,c)}e.cs===this.color_spaces.INDEXED&&(this.internal.newObject(),i("<< /Length "+e.pal.length+">>"),o(this.arrayBufferToBinaryString(new Uint8Array(e.pal))),i("endobj"))},r=function(){var t=this.internal.collections[n+"images"];for(var e in t)o.call(this,t[e])},s=function(){var t,e=this.internal.collections[n+"images"],i=this.internal.write;for(var o in e)t=e[o],i("/I"+t.i,t.n,"0","R")},a=function(t){return t&&"string"==typeof t&&(t=t.toUpperCase()),t in e.image_compression?t:e.image_compression.NONE},l=function(){var t=this.internal.collections[n+"images"];return t||(this.internal.collections[n+"images"]=t={},this.internal.events.subscribe("putResources",r),this.internal.events.subscribe("putXobjectDict",s)),t},c=function(t){var e=0;return t&&(e=Object.keys?Object.keys(t).length:function(t){var e=0;for(var n in t)t.hasOwnProperty(n)&&e++;return e}(t)),e},h=function(t){return void 0===t||null===t},u=function(t){return"string"==typeof t&&e.sHashCode(t)},d=function(t){return-1===i.indexOf(t)},p=function(t){return"function"!=typeof e["process"+t.toUpperCase()]},f=function(e){return"object"===(void 0===e?"undefined":t(e))&&1===e.nodeType},g=function(e,n,i){if("IMG"===e.nodeName&&e.hasAttribute("src")){var o=""+e.getAttribute("src");if(!i&&0===o.indexOf("data:image/"))return o;!n&&/\.png(?:[?#].*)?$/i.test(o)&&(n="png")}if("CANVAS"===e.nodeName)var r=e;else{var r=document.createElement("canvas");r.width=e.clientWidth||e.width,r.height=e.clientHeight||e.height;var s=r.getContext("2d");if(!s)throw"addImage requires canvas to be supported by browser.";if(i){var a,l,c,h,u,d,p,f,g=Math.PI/180;"object"===(void 0===i?"undefined":t(i))&&(a=i.x,l=i.y,c=i.bg,i=i.angle),f=i*g,h=Math.abs(Math.cos(f)),u=Math.abs(Math.sin(f)),d=r.width,p=r.height,r.width=p*u+d*h,r.height=p*h+d*u,isNaN(a)&&(a=r.width/2),isNaN(l)&&(l=r.height/2),s.clearRect(0,0,r.width,r.height),s.fillStyle=c||"white",s.fillRect(0,0,r.width,r.height),s.save(),s.translate(a,l),s.rotate(f),s.drawImage(e,-d/2,-p/2),s.rotate(-f),s.translate(-a,-l),s.restore()}else s.drawImage(e,0,0,r.width,r.height)}return r.toDataURL("png"==(""+n).toLowerCase()?"image/png":"image/jpeg")},m=function(t,e){var n;if(e)for(var i in e)if(t===e[i].alias){n=e[i];break}return n},y=function(t,e,n){return t||e||(t=-96,e=-96),t<0&&(t=-1*n.w*72/t/this.internal.scaleFactor),e<0&&(e=-1*n.h*72/e/this.internal.scaleFactor),0===t&&(t=e*n.w/n.h),0===e&&(e=t*n.h/n.w),[t,e]},w=function(t,e,n,i,o,r,s){var a=y.call(this,n,i,o),l=this.internal.getCoordinateString,c=this.internal.getVerticalCoordinateString;n=a[0],i=a[1],s[r]=o,this.internal.write("q",l(n),"0 0",l(i),l(t),c(e+i),"cm /I"+o.i,"Do Q")};e.color_spaces={DEVICE_RGB:"DeviceRGB",DEVICE_GRAY:"DeviceGray",DEVICE_CMYK:"DeviceCMYK",CAL_GREY:"CalGray",CAL_RGB:"CalRGB",LAB:"Lab",ICC_BASED:"ICCBased",INDEXED:"Indexed",PATTERN:"Pattern",SEPARATION:"Separation",DEVICE_N:"DeviceN"},e.decode={DCT_DECODE:"DCTDecode",FLATE_DECODE:"FlateDecode",LZW_DECODE:"LZWDecode",JPX_DECODE:"JPXDecode",JBIG2_DECODE:"JBIG2Decode",ASCII85_DECODE:"ASCII85Decode",ASCII_HEX_DECODE:"ASCIIHexDecode",RUN_LENGTH_DECODE:"RunLengthDecode",CCITT_FAX_DECODE:"CCITTFaxDecode"},e.image_compression={NONE:"NONE",FAST:"FAST",MEDIUM:"MEDIUM",SLOW:"SLOW"},e.sHashCode=function(t){return Array.prototype.reduce&&t.split("").reduce(function(t,e){return(t=(t<<5)-t+e.charCodeAt(0))&t},0)},e.isString=function(t){return"string"==typeof t},e.extractInfoFromBase64DataURI=function(t){return/^data:([\w]+?\/([\w]+?));base64,(.+?)$/g.exec(t)},e.supportsArrayBuffer=function(){return"undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array},e.isArrayBuffer=function(t){return!!this.supportsArrayBuffer()&&t instanceof ArrayBuffer},e.isArrayBufferView=function(t){return!!this.supportsArrayBuffer()&&"undefined"!=typeof Uint32Array&&(t instanceof Int8Array||t instanceof Uint8Array||"undefined"!=typeof Uint8ClampedArray&&t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array)},e.binaryStringToUint8Array=function(t){for(var e=t.length,n=new Uint8Array(e),i=0;i>18,n=(258048&r)>>12,i=(4032&r)>>6,o=63&r,s+=a[e]+a[n]+a[i]+a[o];return 1==h?(r=l[u],e=(252&r)>>2,n=(3&r)<<4,s+=a[e]+a[n]+"=="):2==h&&(r=l[u]<<8|l[u+1],e=(64512&r)>>10,n=(1008&r)>>4,i=(15&r)<<2,s+=a[e]+a[n]+a[i]+"="),s},e.createImageInfo=function(t,e,n,i,o,r,s,a,l,c,h,u,d){var p={alias:a,w:e,h:n,cs:i,bpc:o,i:s,data:t};return r&&(p.f=r),l&&(p.dp=l),c&&(p.trns=c),h&&(p.pal=h),u&&(p.smask=u),d&&(p.p=d),p},e.addImage=function(e,n,o,r,s,y,b,v,x){if("string"!=typeof n){var k=y;y=s,s=r,r=o,o=n,n=k}if("object"===(void 0===e?"undefined":t(e))&&!f(e)&&"imageData"in e){var S=e;e=S.imageData,n=S.format||n,o=S.x||o||0,r=S.y||r||0,s=S.w||s,y=S.h||y,b=S.alias||b,v=S.compression||v,x=S.rotation||S.angle||x}if(isNaN(o)||isNaN(r))throw console.error("jsPDF.addImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addImage");var C,_=l.call(this);if(!(C=m(e,_))){var T;if(f(e)&&(e=g(e,n,x)),h(b)&&(b=u(e)),!(C=m(b,_))){if(this.isString(e)){var A=this.extractInfoFromBase64DataURI(e);A?(n=A[2],e=atob(A[3])):137===e.charCodeAt(0)&&80===e.charCodeAt(1)&&78===e.charCodeAt(2)&&71===e.charCodeAt(3)&&(n="png")}if(n=(n||"JPEG").toLowerCase(),d(n))throw new Error("addImage currently only supports formats "+i+", not '"+n+"'");if(p(n))throw new Error("please ensure that the plugin for '"+n+"' support is added");if(this.supportsArrayBuffer()&&(e instanceof Uint8Array||(T=e,e=this.binaryStringToUint8Array(e))),!(C=this["process"+n.toUpperCase()](e,c(_),b,a(v),T)))throw new Error("An unkwown error occurred whilst processing the image")}}return w.call(this,o,r,s,y,C,C.i,_),this};var b=function(t){var e,n,i;if(255===!t.charCodeAt(0)||216===!t.charCodeAt(1)||255===!t.charCodeAt(2)||224===!t.charCodeAt(3)||!t.charCodeAt(6)==="J".charCodeAt(0)||!t.charCodeAt(7)==="F".charCodeAt(0)||!t.charCodeAt(8)==="I".charCodeAt(0)||!t.charCodeAt(9)==="F".charCodeAt(0)||0===!t.charCodeAt(10))throw new Error("getJpegSize requires a binary string jpeg file");for(var o=256*t.charCodeAt(4)+t.charCodeAt(5),r=4,s=t.length;r7)return e=x(t,a+5),n=(e[2]<<8)+e[3],i=(e[0]<<8)+e[1],o=e[4],{width:n,height:i,numcomponents:o};a+=2}throw new Error("getJpegSizeFromBytes could not find the size of the image")},x=function(t,e){return t.subarray(e,e+5)};e.processJPEG=function(t,e,n,i,o){var r,s=this.color_spaces.DEVICE_RGB,a=this.decode.DCT_DECODE;return this.isString(t)?(r=b(t),this.createImageInfo(t,r[0],r[1],1==r[3]?this.color_spaces.DEVICE_GRAY:s,8,a,e,n)):(this.isArrayBuffer(t)&&(t=new Uint8Array(t)),this.isArrayBufferView(t)?(r=v(t),t=o||this.arrayBufferToBinaryString(t),this.createImageInfo(t,r.width,r.height,1==r.numcomponents?this.color_spaces.DEVICE_GRAY:s,8,a,e,n)):null)},e.processJPG=function(){return this.processJPEG.apply(this,arguments)}}(e.API),function(t){var n={annotations:[],f2:function(t){return t.toFixed(2)},notEmpty:function(t){if(void 0!==t&&""!=t)return!0}};e.API.annotationPlugin=n,e.API.events.push(["addPage",function(t){this.annotationPlugin.annotations[t.pageNumber]=[]}]),t.events.push(["putPage",function(t){for(var e=this.annotationPlugin.annotations[t.pageNumber],i=!1,o=0;o>",h.content=y;var f=h.objId+" 0 R",p="/Rect ["+s((r.bounds.x+30)*a)+" "+s(l-(r.bounds.y+r.bounds.h)*a)+" "+s((r.bounds.x+r.bounds.w+30)*a)+" "+s((l-r.bounds.y)*a)+"] ";y="<>";else if(r.options.pageNumber){var t=this.internal.getPageInfo(r.options.pageNumber);switch(y="<>",this.internal.write(y))}}this.internal.write("]")}}]),t.createAnnotation=function(t){switch(t.type){case"link":this.link(t.bounds.x,t.bounds.y,t.bounds.w,t.bounds.h,t);break;case"text":case"freetext":this.annotationPlugin.annotations[this.internal.getCurrentPageInfo().pageNumber].push(t)}},t.link=function(t,e,n,i,o){this.annotationPlugin.annotations[this.internal.getCurrentPageInfo().pageNumber].push({x:t,y:e,w:n,h:i,options:o,type:"link"})},t.link=function(t,e,n,i,o){this.annotationPlugin.annotations[this.internal.getCurrentPageInfo().pageNumber].push({x:t,y:e,w:n,h:i,options:o,type:"link"})},t.textWithLink=function(t,e,n,i){var o=this.getTextWidth(t),r=this.internal.getLineHeight();return this.text(t,e,n),n+=.2*r,this.link(e,n-r,o,r,i),o},t.getTextWidth=function(t){var e=this.internal.getFontSize();return this.getStringUnitWidth(t)*e/this.internal.scaleFactor},t.getLineHeight=function(){return this.internal.getLineHeight()}}(e.API),function(t){t.autoPrint=function(){var t;return this.internal.events.subscribe("postPutResources",function(){t=this.internal.newObject(),this.internal.write("<< /S/Named /Type/Action /N/Print >>","endobj")}),this.internal.events.subscribe("putCatalog",function(){this.internal.write("/OpenAction "+t+" 0 R")}),this}}(e.API),function(t){t.events.push(["initialized",function(){this.canvas.pdf=this}]),t.canvas={getContext:function(t){return this.pdf.context2d._canvas=this,this.pdf.context2d},style:{}},Object.defineProperty(t.canvas,"width",{get:function(){return this._width},set:function(t){this._width=t,this.getContext("2d").pageWrapX=t+1}}), Object.defineProperty(t.canvas,"height",{get:function(){return this._height},set:function(t){this._height=t,this.getContext("2d").pageWrapY=t+1}})}(e.API),function(t){var e,n,i,o,r={x:void 0,y:void 0,w:void 0,h:void 0,ln:void 0},s=1,a=function(t,e,n,i,o){r={x:t,y:e,w:n,h:i,ln:o}},l=function(){return r},c={left:0,top:0,bottom:0};t.setHeaderFunction=function(t){o=t},t.getTextDimensions=function(t){e=this.internal.getFont().fontName,n=this.table_font_size||this.internal.getFontSize(),i=this.internal.getFont().fontStyle;var o,r,s=19.049976/25.4;r=document.createElement("font"),r.id="jsPDFCell";try{r.style.fontStyle=i}catch(t){r.style.fontWeight=i}r.style.fontName=e,r.style.fontSize=n+"pt";try{r.textContent=t}catch(e){r.innerText=t}return document.body.appendChild(r),o={w:(r.offsetWidth+1)*s,h:(r.offsetHeight+1)*s},document.body.removeChild(r),o},t.cellAddPage=function(){var t=this.margins||c;this.addPage(),a(t.left,t.top,void 0,void 0),s+=1},t.cellInitialize=function(){r={x:void 0,y:void 0,w:void 0,h:void 0,ln:void 0},s=1},t.cell=function(t,e,n,i,o,r,s){var h=l(),u=!1;if(void 0!==h.ln)if(h.ln===r)t=h.x+h.w,e=h.y;else{var d=this.margins||c;h.y+h.h+i+13>=this.internal.pageSize.height-d.bottom&&(this.cellAddPage(),u=!0,this.printHeaders&&this.tableHeaderRow&&this.printHeaderRow(r,!0)),e=l().y+l().h,u&&(e=23)}if(void 0!==o[0])if(this.printingHeaderRow?this.rect(t,e,n,i,"FD"):this.rect(t,e,n,i),"right"===s){o instanceof Array||(o=[o]);for(var p=0;pr&&(r=o);return r},t.table=function(e,n,i,o,a){if(!i)throw"No data for PDF table";var l,h,u,d,p,f,g,m,y,w,b=[],v=[],x={},k={},S=[],C=[],_=!1,T=!0,A=12,P=c;if(P.width=this.internal.pageSize.width,a&&(!0===a.autoSize&&(_=!0),!1===a.printHeaders&&(T=!1),a.fontSize&&(A=a.fontSize),a.css&&void 0!==a.css["font-size"]&&(A=16*a.css["font-size"]),a.margins&&(P=a.margins)),this.lnMod=0,r={x:void 0,y:void 0,w:void 0,h:void 0,ln:void 0},s=1,this.printHeaders=T,this.margins=P,this.setFontSize(A),this.table_font_size=A,void 0===o||null===o)b=Object.keys(i[0]);else if(o[0]&&"string"!=typeof o[0]){for(h=0,u=o.length;ho&&(o=s)}return o},t.setTableHeaderRow=function(t){this.tableHeaderRow=t},t.printHeaderRow=function(t,e){if(!this.tableHeaderRow)throw"Property tableHeaderRow does not exist.";var n,i,r,l;if(this.printingHeaderRow=!0,void 0!==o){var c=o(this,s);a(c[0],c[1],c[2],c[3],-1)}this.setFontStyle("bold");var h=[];for(r=0,l=this.tableHeaderRow.length;r0&&this.setTableHeaderRow(h),this.setFontStyle("normal"),this.printingHeaderRow=!1}}(e.API),function(t){function e(){this._isStrokeTransparent=!1,this._strokeOpacity=1,this.strokeStyle="#000000",this.fillStyle="#000000",this._isFillTransparent=!1,this._fillOpacity=1,this.font="12pt times",this.textBaseline="alphabetic",this.textAlign="start",this.lineWidth=1,this.lineJoin="miter",this.lineCap="butt",this._transform=[1,0,0,1,0,0],this.globalCompositeOperation="normal",this.globalAlpha=1,this._clip_path=[],this.ignoreClearRect=!1,this.copy=function(t){this._isStrokeTransparent=t._isStrokeTransparent,this._strokeOpacity=t._strokeOpacity,this.strokeStyle=t.strokeStyle,this._isFillTransparent=t._isFillTransparent,this._fillOpacity=t._fillOpacity,this.fillStyle=t.fillStyle,this.font=t.font,this.lineWidth=t.lineWidth,this.lineJoin=t.lineJoin,this.lineCap=t.lineCap,this.textBaseline=t.textBaseline,this.textAlign=t.textAlign,this._fontSize=t._fontSize,this._transform=t._transform.slice(0),this.globalCompositeOperation=t.globalCompositeOperation,this.globalAlpha=t.globalAlpha,this._clip_path=t._clip_path.slice(0),this.ignoreClearRect=t.ignoreClearRect}}t.events.push(["initialized",function(){this.context2d.pdf=this,this.context2d.internal.pdf=this,this.context2d.ctx=new e,this.context2d.ctxStack=[],this.context2d.path=[]}]),t.context2d={pageWrapXEnabled:!1,pageWrapYEnabled:!1,pageWrapX:9999999,pageWrapY:9999999,ctx:new e,f2:function(t){return t.toFixed(2)},fillRect:function(t,e,n,i){if(!this._isFillTransparent()){t=this._wrapX(t),e=this._wrapY(e);var o=this._matrix_map_rect(this.ctx._transform,{x:t,y:e,w:n,h:i});this.pdf.rect(o.x,o.y,o.w,o.h,"f")}},strokeRect:function(t,e,n,i){if(!this._isStrokeTransparent()){t=this._wrapX(t),e=this._wrapY(e);var o=this._matrix_map_rect(this.ctx._transform,{x:t,y:e,w:n,h:i});this.pdf.rect(o.x,o.y,o.w,o.h,"s")}},clearRect:function(t,e,n,i){if(!this.ctx.ignoreClearRect){t=this._wrapX(t),e=this._wrapY(e);var o=this._matrix_map_rect(this.ctx._transform,{x:t,y:e,w:n,h:i});this.save(),this.setFillStyle("#ffffff"),this.pdf.rect(o.x,o.y,o.w,o.h,"f"),this.restore()}},save:function(){this.ctx._fontSize=this.pdf.internal.getFontSize();var t=new e;t.copy(this.ctx),this.ctxStack.push(this.ctx),this.ctx=t},restore:function(){this.ctx=this.ctxStack.pop(),this.setFillStyle(this.ctx.fillStyle),this.setStrokeStyle(this.ctx.strokeStyle),this.setFont(this.ctx.font),this.pdf.setFontSize(this.ctx._fontSize),this.setLineCap(this.ctx.lineCap),this.setLineWidth(this.ctx.lineWidth),this.setLineJoin(this.ctx.lineJoin)},rect:function(t,e,n,i){this.moveTo(t,e),this.lineTo(t+n,e),this.lineTo(t+n,e+i),this.lineTo(t,e+i),this.lineTo(t,e),this.closePath()},beginPath:function(){this.path=[]},closePath:function(){this.path.push({type:"close"})},_getRgba:function(t){var e={};if(this.internal.rxTransparent.test(t))e.r=0,e.g=0,e.b=0,e.a=0;else{var n=this.internal.rxRgb.exec(t);null!=n?(e.r=parseInt(n[1]),e.g=parseInt(n[2]),e.b=parseInt(n[3]),e.a=1):(n=this.internal.rxRgba.exec(t),null!=n?(e.r=parseInt(n[1]),e.g=parseInt(n[2]),e.b=parseInt(n[3]),e.a=parseFloat(n[4])):(e.a=1,"#"!=t.charAt(0)&&((t=o.colorNameToHex(t))||(t="#000000")),4===t.length?(e.r=t.substring(1,2),e.r+=r,e.g=t.substring(2,3),e.g+=g,e.b=t.substring(3,4),e.b+=b):(e.r=t.substring(1,3),e.g=t.substring(3,5),e.b=t.substring(5,7)),e.r=parseInt(e.r,16),e.g=parseInt(e.g,16),e.b=parseInt(e.b,16)))}return e.style=t,e},setFillStyle:function(t){var e,n,i,r;if(this.internal.rxTransparent.test(t))e=0,n=0,i=0,r=0;else{var s=this.internal.rxRgb.exec(t);null!=s?(e=parseInt(s[1]),n=parseInt(s[2]),i=parseInt(s[3]),r=1):(s=this.internal.rxRgba.exec(t),null!=s?(e=parseInt(s[1]),n=parseInt(s[2]),i=parseInt(s[3]),r=parseFloat(s[4])):(r=1,"#"!=t.charAt(0)&&((t=o.colorNameToHex(t))||(t="#000000")),4===t.length?(e=t.substring(1,2),e+=e,n=t.substring(2,3),n+=n,i=t.substring(3,4),i+=i):(e=t.substring(1,3),n=t.substring(3,5),i=t.substring(5,7)),e=parseInt(e,16),n=parseInt(n,16),i=parseInt(i,16)))}this.ctx.fillStyle=t,this.ctx._isFillTransparent=0==r,this.ctx._fillOpacity=r,this.pdf.setFillColor(e,n,i,{a:r}),this.pdf.setTextColor(e,n,i,{a:r})},setStrokeStyle:function(t){var e=this._getRgba(t);this.ctx.strokeStyle=e.style,this.ctx._isStrokeTransparent=0==e.a,this.ctx._strokeOpacity=e.a,0===e.a?this.pdf.setDrawColor(255,255,255):(e.a,this.pdf.setDrawColor(e.r,e.g,e.b))},fillText:function(t,e,n,i){if(!this._isFillTransparent()){e=this._wrapX(e),n=this._wrapY(n);var o=this._matrix_map_point(this.ctx._transform,[e,n]);e=o[0],n=o[1];var r=this._matrix_rotation(this.ctx._transform),s=57.2958*r;if(this.ctx._clip_path.length>0){var a;a=window.outIntercept?"group"===window.outIntercept.type?window.outIntercept.stream:window.outIntercept:this.internal.getCurrentPage(),a.push("q");var l=this.path;this.path=this.ctx._clip_path,this.ctx._clip_path=[],this._fill(null,!0),this.ctx._clip_path=this.path,this.path=l}var c;if((c=this.pdf.hotfix&&this.pdf.hotfix.scale_text?this._getTransform()[0]:1)<.01)this.pdf.text(t,e,this._getBaseline(n),null,s);else{var h=this.pdf.internal.getFontSize();this.pdf.setFontSize(h*c),this.pdf.text(t,e,this._getBaseline(n),null,s),this.pdf.setFontSize(h)}this.ctx._clip_path.length>0&&a.push("Q")}},strokeText:function(t,e,n,i){if(!this._isStrokeTransparent()){e=this._wrapX(e),n=this._wrapY(n);var o=this._matrix_map_point(this.ctx._transform,[e,n]);e=o[0],n=o[1];var r=this._matrix_rotation(this.ctx._transform),s=57.2958*r;if(this.ctx._clip_path.length>0){var a;a=window.outIntercept?"group"===window.outIntercept.type?window.outIntercept.stream:window.outIntercept:this.internal.getCurrentPage(),a.push("q");var l=this.path;this.path=this.ctx._clip_path,this.ctx._clip_path=[],this._fill(null,!0),this.ctx._clip_path=this.path,this.path=l}var c;if(1===(c=this.pdf.hotfix&&this.pdf.hotfix.scale_text?this._getTransform()[0]:1))this.pdf.text(t,e,this._getBaseline(n),{stroke:!0},s);else{var h=this.pdf.internal.getFontSize();this.pdf.setFontSize(h*c),this.pdf.text(t,e,this._getBaseline(n),{stroke:!0},s),this.pdf.setFontSize(h)}this.ctx._clip_path.length>0&&a.push("Q")}},setFont:function(t){this.ctx.font=t;var e=/\s*(\w+)\s+(\w+)\s+(\w+)\s+([\d\.]+)(px|pt|em)\s+(.*)?/;if(null!=(u=e.exec(t))){var n=u[1],i=(u[2],u[3]),o=u[4],r=u[5],s=u[6];o="px"===r?Math.floor(parseFloat(o)):"em"===r?Math.floor(parseFloat(o)*this.pdf.getFontSize()):Math.floor(parseFloat(o)),this.pdf.setFontSize(o),"bold"===i||"700"===i?this.pdf.setFontStyle("bold"):"italic"===n?this.pdf.setFontStyle("italic"):this.pdf.setFontStyle("normal");var a,l=s,c=l.toLowerCase().split(/\s*,\s*/);a=-1!=c.indexOf("arial")?"Arial":-1!=c.indexOf("verdana")?"Verdana":-1!=c.indexOf("helvetica")?"Helvetica":-1!=c.indexOf("sans-serif")?"sans-serif":-1!=c.indexOf("fixed")?"Fixed":-1!=c.indexOf("monospace")?"Monospace":-1!=c.indexOf("terminal")?"Terminal":-1!=c.indexOf("courier")?"Courier":-1!=c.indexOf("times")?"Times":-1!=c.indexOf("cursive")?"Cursive":-1!=c.indexOf("fantasy")?"Fantasy":(c.indexOf("serif"),"Serif");var h;h="bold"===i?"bold":"normal",this.pdf.setFont(a,h)}else{var e=/(\d+)(pt|px|em)\s+(\w+)\s*(\w+)?/,u=e.exec(t);if(null!=u){var d=u[1],l=(u[2],u[3]),h=u[4];h||(h="normal"),d="em"===r?Math.floor(parseFloat(o)*this.pdf.getFontSize()):Math.floor(parseFloat(d)),this.pdf.setFontSize(d),this.pdf.setFont(l,h)}}},setTextBaseline:function(t){this.ctx.textBaseline=t},getTextBaseline:function(){return this.ctx.textBaseline},setTextAlign:function(t){this.ctx.textAlign=t},getTextAlign:function(){return this.ctx.textAlign},setLineWidth:function(t){this.ctx.lineWidth=t,this.pdf.setLineWidth(t)},setLineCap:function(t){this.ctx.lineCap=t,this.pdf.setLineCap(t)},setLineJoin:function(t){this.ctx.lineJoin=t,this.pdf.setLineJoin(t)},moveTo:function(t,e){t=this._wrapX(t),e=this._wrapY(e);var n=this._matrix_map_point(this.ctx._transform,[t,e]);t=n[0],e=n[1];var i={type:"mt",x:t,y:e};this.path.push(i)},_wrapX:function(t){return this.pageWrapXEnabled?t%this.pageWrapX:t},_wrapY:function(t){return this.pageWrapYEnabled?(this._gotoPage(this._page(t)),(t-this.lastBreak)%this.pageWrapY):t},transform:function(t,e,n,i,o,r){this.ctx._transform=[t,e,n,i,o,r]},setTransform:function(t,e,n,i,o,r){this.ctx._transform=[t,e,n,i,o,r]},_getTransform:function(){return this.ctx._transform},lastBreak:0,pageBreaks:[],_page:function(t){if(this.pageWrapYEnabled){this.lastBreak=0;for(var e=0,n=0,i=0;i=this.pageBreaks[i]){e++,0===this.lastBreak&&n++;var o=this.pageBreaks[i]-this.lastBreak;this.lastBreak=this.pageBreaks[i];var r=Math.floor(o/this.pageWrapY);n+=r}if(0===this.lastBreak){var r=Math.floor(t/this.pageWrapY)+1;n+=r}return n+e}return this.pdf.internal.getCurrentPageInfo().pageNumber},_gotoPage:function(t){},lineTo:function(t,e){t=this._wrapX(t),e=this._wrapY(e);var n=this._matrix_map_point(this.ctx._transform,[t,e]);t=n[0],e=n[1];var i={type:"lt",x:t,y:e};this.path.push(i)},bezierCurveTo:function(t,e,n,i,o,r){t=this._wrapX(t),e=this._wrapY(e),n=this._wrapX(n),i=this._wrapY(i),o=this._wrapX(o),r=this._wrapY(r);var s;s=this._matrix_map_point(this.ctx._transform,[o,r]),o=s[0],r=s[1],s=this._matrix_map_point(this.ctx._transform,[t,e]),t=s[0],e=s[1],s=this._matrix_map_point(this.ctx._transform,[n,i]),n=s[0],i=s[1];var a={type:"bct",x1:t,y1:e,x2:n,y2:i,x:o,y:r};this.path.push(a)},quadraticCurveTo:function(t,e,n,i){t=this._wrapX(t),e=this._wrapY(e),n=this._wrapX(n),i=this._wrapY(i);var o;o=this._matrix_map_point(this.ctx._transform,[n,i]),n=o[0],i=o[1],o=this._matrix_map_point(this.ctx._transform,[t,e]),t=o[0],e=o[1];var r={type:"qct",x1:t,y1:e,x:n,y:i};this.path.push(r)},arc:function(t,e,n,i,o,r){if(t=this._wrapX(t),e=this._wrapY(e),!this._matrix_is_identity(this.ctx._transform)){var s=this._matrix_map_point(this.ctx._transform,[t,e]);t=s[0],e=s[1];var a=this._matrix_map_point(this.ctx._transform,[0,0]),l=this._matrix_map_point(this.ctx._transform,[0,n]);n=Math.sqrt(Math.pow(l[0]-a[0],2)+Math.pow(l[1]-a[1],2))}var c={type:"arc",x:t,y:e,radius:n,startAngle:i,endAngle:o,anticlockwise:r};this.path.push(c)},drawImage:function(t,e,n,i,o,r,s,a,l){void 0!==r&&(e=r,n=s,i=a,o=l),e=this._wrapX(e),n=this._wrapY(n);var c,h=this._matrix_map_rect(this.ctx._transform,{x:e,y:n,w:i,h:o}),u=(this._matrix_map_rect(this.ctx._transform,{x:r,y:s,w:a,h:l}),/data:image\/(\w+).*/i),d=u.exec(t);c=null!=d?d[1]:"png",this.pdf.addImage(t,c,h.x,h.y,h.w,h.h)},_matrix_multiply:function(t,e){var n=e[0],i=e[1],o=e[2],r=e[3],s=e[4],a=e[5],l=n*t[0]+i*t[2],c=o*t[0]+r*t[2],h=s*t[0]+a*t[2]+t[4];return i=n*t[1]+i*t[3],r=o*t[1]+r*t[3],a=s*t[1]+a*t[3]+t[5],n=l,o=c,s=h,[n,i,o,r,s,a]},_matrix_rotation:function(t){return Math.atan2(t[2],t[0])},_matrix_decompose:function(t){var e=t[0],n=t[1],i=t[2],o=t[3],r=Math.sqrt(e*e+n*n);e/=r,n/=r;var s=e*i+n*o;i-=e*s,o-=n*s;var a=Math.sqrt(i*i+o*o);return i/=a,o/=a,s/=a,e*o0){var t;t=window.outIntercept?"group"===window.outIntercept.type?window.outIntercept.stream:window.outIntercept:this.internal.getCurrentPage(),t.push("q");var e=this.path;this.path=this.ctx._clip_path,this.ctx._clip_path=[],this._stroke(!0),this.ctx._clip_path=this.path,this.path=e,this._stroke(!1),t.push("Q")}else this._stroke(!1)},_stroke:function(t){if(t||!this._isStrokeTransparent()){for(var e=[],n=this.path,i=0;i0){var e;e=window.outIntercept?"group"===window.outIntercept.type?window.outIntercept.stream:window.outIntercept:this.internal.getCurrentPage(),e.push("q");var n=this.path;this.path=this.ctx._clip_path,this.ctx._clip_path=[],this._fill(t,!0),this.ctx._clip_path=this.path,this.path=n,this._fill(t,!1),e.push("Q")}else this._fill(t,!1)},_fill:function(t,e){if(!this._isFillTransparent()){var i,o="function"==typeof this.pdf.internal.newObject2;i=window.outIntercept?"group"===window.outIntercept.type?window.outIntercept.stream:window.outIntercept:this.internal.getCurrentPage();var r=[],s=window.outIntercept;if(o)switch(this.ctx.globalCompositeOperation){case"normal":case"source-over":break;case"destination-in":case"destination-out":var a=this.pdf.internal.newStreamObject(),l=this.pdf.internal.newObject2();l.push("<>"),l.push(">>");var c="MASK"+l.objId;this.pdf.internal.addGraphicsState(c,l.objId);var h="/"+c+" gs";i.splice(0,0,"q"),i.splice(1,0,h),i.push("Q"),window.outIntercept=a;break;default:var u="/"+this.pdf.internal.blendModeMap[this.ctx.globalCompositeOperation.toUpperCase()];u&&this.pdf.internal.out(u+" gs")}var d=this.ctx.globalAlpha;if(this.ctx._fillOpacity<1&&(d=this.ctx._fillOpacity),o){var p=this.pdf.internal.newObject2();p.push("<>");var c="GS_O_"+p.objId;this.pdf.internal.addGraphicsState(c,p.objId),this.pdf.internal.out("/"+c+" gs")}for(var f=this.path,g=0;g>"),e.push(">>");var n="MASK"+e.objId;this.pdf.internal.addGraphicsState(n,e.objId);var i="/"+n+" gs";this.pdf.internal.out(i)},clip:function(){if(this.ctx._clip_path.length>0)for(var t=0;to)&&(s%=o),s<0&&(s=o+s);e>n;)e-=o;var a=Math.abs(n-e);a1e-5;){var u=c*Math.min(a,r),d=h+u;l.push(this.createSmallArc(t,h,d)),a-=Math.abs(d-h),h=d}return l},n.internal.getCurrentPage=function(){return this.pdf.internal.pages[this.pdf.internal.getCurrentPageInfo().pageNumber]},n.internal.createSmallArc=function(t,e,n){var i=(n-e)/2,o=t*Math.cos(i),r=t*Math.sin(i),s=o,a=-r,l=s*s+a*a,c=l+s*o+a*r,h=4/3*(Math.sqrt(2*l*c)-c)/(s*r-a*o),u=s-h*a,d=a+h*s,p=u,f=-d,g=i+e,m=Math.cos(g),y=Math.sin(g);return{x1:t*Math.cos(e),y1:t*Math.sin(e),x2:u*m-d*y,y2:u*y+d*m,x3:p*m-f*y,y3:p*y+f*m,x4:t*Math.cos(n),y4:t*Math.sin(n)}}}(e.API),function(e){var n,i,r,s,a,l,c,h,u,d,p,f,g,m,y,w,b,v,x,k;n=function(){function t(){}return function(e){return t.prototype=e,new t}}(),d=function(t){var e,n,i,o,r,s,a;for(n=0,i=t.length,e=void 0,o=!1,s=!1;!o&&n!==i;)e=t[n]=t[n].trimLeft(),e&&(o=!0),n++;for(n=i-1;i&&!s&&-1!==n;)e=t[n]=t[n].trimRight(),e&&(s=!0),n--;for(r=/\s+$/g,a=!0,n=0;n!==i;)"\u2028"!=t[n]&&(e=t[n].replace(/\s+/g," "),a&&(e=e.trimLeft()),e&&(a=r.test(e)),t[n]=e),n++;return t},p=function(t,e,n,i){return this.pdf=t,this.x=e,this.y=n,this.settings=i,this.watchFunctions=[],this.init(),this},f=function(t){var e,n,i;for(e=void 0,i=t.split(","),n=i.shift();!e&&n;)e=r[n.trim().toLowerCase()],n=i.shift();return e},g=function(t){t="auto"===t?"0px":t,t.indexOf("em")>-1&&!isNaN(Number(t.replace("em","")))&&(t=18.719*Number(t.replace("em",""))+"px"),t.indexOf("pt")>-1&&!isNaN(Number(t.replace("pt","")))&&(t=1.333*Number(t.replace("pt",""))+"px");var e,n,i;return n=void 0,e=16,(i=m[t])?i:(i={"xx-small":9,"x-small":11,small:13,medium:16,large:19,"x-large":23,"xx-large":28,auto:0}[{css_line_height_string:t}],i!==n?m[t]=i/e:(i=parseFloat(t))?m[t]=i/e:(i=t.match(/([\d\.]+)(px)/),3===i.length?m[t]=parseFloat(i[1])/e:m[t]=1))},u=function(t){var e,n,i;return i=function(t){var e;return e=function(t){return document.defaultView&&document.defaultView.getComputedStyle?document.defaultView.getComputedStyle(t,null):t.currentStyle?t.currentStyle:t.style}(t),function(t){return t=t.replace(/-\D/g,function(t){return t.charAt(1).toUpperCase()}),e[t]}}(t),e={},n=void 0,e["font-family"]=f(i("font-family"))||"times",e["font-style"]=s[i("font-style")]||"normal",e["text-align"]=a[i("text-align")]||"left",n=l[i("font-weight")]||"normal","bold"===n&&("normal"===e["font-style"]?e["font-style"]=n:e["font-style"]=n+e["font-style"]),e["font-size"]=g(i("font-size"))||1,e["line-height"]=g(i("line-height"))||1,e.display="inline"===i("display")?"inline":"block",n="block"===e.display,e["margin-top"]=n&&g(i("margin-top"))||0,e["margin-bottom"]=n&&g(i("margin-bottom"))||0,e["padding-top"]=n&&g(i("padding-top"))||0,e["padding-bottom"]=n&&g(i("padding-bottom"))||0,e["margin-left"]=n&&g(i("margin-left"))||0,e["margin-right"]=n&&g(i("margin-right"))||0,e["padding-left"]=n&&g(i("padding-left"))||0,e["padding-right"]=n&&g(i("padding-right"))||0,e["page-break-before"]=i("page-break-before")||"auto",e.float=c[i("cssFloat")]||"none",e.clear=h[i("clear")]||"none",e.color=i("color"),e},y=function(t,e,n){var i,o,r,s;if(r=!1,o=void 0,s=void 0,void 0,i=n["#"+t.id])if("function"==typeof i)r=i(t,e);else for(o=0,s=i.length;!r&&o!==s;)r=i[o](t,e),o++;if(i=n[t.nodeName],!r&&i)if("function"==typeof i)r=i(t,e);else for(o=0,s=i.length;!r&&o!==s;)r=i[o](t,e),o++;return r},k=function(t,e){var n,i,o,r,s,a,l,c,h;for(n=[],i=[],o=0,h=t.rows[0].cells.length,l=t.clientWidth;oo.pdf.margins_doc.top&&(o.pdf.addPage(),o.y=o.pdf.margins_doc.top,o.executeWatchFunctions(s));var I=u(s),O=o.x,E=12/o.pdf.internal.scaleFactor,F=(I["margin-left"]+I["padding-left"])*E,R=(I["margin-right"]+I["padding-right"])*E,q=(I["margin-top"]+I["padding-top"])*E,N=(I["margin-bottom"]+I["padding-bottom"])*E;O+=void 0!==I.float&&"right"===I.float?o.settings.width-s.width-R:F,o.pdf.addImage(A,O,o.y+q,s.width,s.height),A=void 0,"right"===I.float||"left"===I.float?(o.watchFunctions.push(function(t,e,n,i){return o.y>=e?(o.x+=t,o.settings.width+=n,!0):!!(i&&1===i.nodeType&&!S[i.nodeName]&&o.x+i.width>o.pdf.margins_doc.left+o.pdf.margins_doc.width)&&(o.x+=t,o.y=e,o.settings.width+=n,!0)}.bind(this,"left"===I.float?-s.width-F-R:0,o.y+s.height+q+N,s.width)),o.watchFunctions.push(function(t,e,n){return!(o.y0){o=o[0];var r=e.pdf.internal.write,s=e.y;e.pdf.internal.write=function(){},i(o,e,n);var a=Math.ceil(e.y-s)+5;e.y=s,e.pdf.internal.write=r,e.pdf.margins_doc.bottom+=a;for(var l=function(t){ var r=void 0!==t?t.pageNumber:1,s=e.y;e.y=e.pdf.internal.pageSize.height-e.pdf.margins_doc.bottom,e.pdf.margins_doc.bottom-=a;for(var l=o.getElementsByTagName("span"),c=0;c-1&&(l[c].innerHTML=r),(" "+l[c].className+" ").replace(/[\n\t]/g," ").indexOf(" totalPages ")>-1&&(l[c].innerHTML="###jsPDFVarTotalPages###");i(o,e,n),e.pdf.margins_doc.bottom+=a,e.y=s},c=o.getElementsByTagName("span"),h=0;h-1&&e.pdf.internal.events.subscribe("htmlRenderingFinished",e.pdf.putTotalPages.bind(e.pdf,"###jsPDFVarTotalPages###"),!0);e.pdf.internal.events.subscribe("addPage",l,!1),l(),S.FOOTER=1}},x=function(t,e,n,o,r,s){if(!e)return!1;"string"==typeof e||e.parentNode||(e=""+e.innerHTML),"string"==typeof e&&(e=function(t){var e,n,i,o;return i="jsPDFhtmlText"+Date.now().toString()+(1e3*Math.random()).toFixed(0),o="position: absolute !important;clip: rect(1px 1px 1px 1px); /* IE6, IE7 */clip: rect(1px, 1px, 1px, 1px);padding:0 !important;border:0 !important;height: 1px !important;width: 1px !important; top:auto;left:-100px;overflow: hidden;",n=document.createElement("div"),n.style.cssText=o,n.innerHTML='