"),this.options.cardView&&h.push(f('',this.header.fields.length)),!this.options.cardView&&this.options.detailView&&(h.push("
"),j(null,this.options.detailFilter,[c,b])&&h.push('',f(' ',this.options.iconsPrefix,this.options.icons.detailOpen)," "),h.push(" ")),a.each(this.header.fields,function(d,m){var o="",p=n(b,m,e.options.escape),q="",r="",s={},t="",u=e.header.classes[d],v="",w="",x="",y="",z=e.columns[d];
+!function(a){"use strict";var b=3;try{b=parseInt(a.fn.dropdown.Constructor.VERSION,10)}catch(c){}var d={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:'
%s ',pageDropdownHtml:['"],pageDropdownItemHtml:'
%s '},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:'
%s ',pageDropdownHtml:['"],pageDropdownItemHtml:'
%s '}}[b],e=null,f=function(a){var b=arguments,c=!0,d=1;return a=a.replace(/%s/g,function(){var a=b[d++];return"undefined"==typeof a?(c=!1,""):a}),c?a:""},g=function(b,c,d,e){var f="";return a.each(b,function(a,b){return b[c]===e?(f=b[d],!1):!0}),f},h=function(b){var c,d,e,f=0,g=[];for(c=0;c
d;d++)g[c][d]=!1;for(c=0;ce;e++)g[c+e][k]=!0;for(e=0;j>e;e++)g[c][k+e]=!0}},i=function(){if(null===e){var b,c,d=a("
").addClass("fixed-table-scroll-inner"),f=a("
").addClass("fixed-table-scroll-outer");f.append(d),a("body").append(f),b=d[0].offsetWidth,f.css("overflow","scroll"),c=d[0].offsetWidth,b===c&&(c=f[0].clientWidth),f.remove(),e=b-c}return e},j=function(b,c,d,e){var g=c;if("string"==typeof c){var h=c.split(".");h.length>1?(g=window,a.each(h,function(a,b){g=g[b]})):g=window[c]}return"object"==typeof g?g:"function"==typeof g?g.apply(b,d||[]):!g&&"string"==typeof c&&f.apply(this,[c].concat(d))?f.apply(this,[c].concat(d)):e},k=function(b,c,d){var e=Object.getOwnPropertyNames||function(a){var b=[];for(var c in a)a.hasOwnProperty(c)&&b.push(c);return b},f=e(b),g=e(c),h="";if(d&&f.length!==g.length)return!1;for(var i=0;i-1&&b[h]!==c[h])return!1;return!0},l=function(a){return"string"==typeof a?a.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'").replace(/`/g,"`"):a},m=function(a){for(var b in a){var c=b.split(/(?=[A-Z])/).join("-").toLowerCase();c!==b&&(a[c]=a[b],delete a[b])}return a},n=function(a,b,c){var d=a;if("string"!=typeof b||a.hasOwnProperty(b))return c?l(a[b]):a[b];var e=b.split(".");for(var f in e)e.hasOwnProperty(f)&&(d=d&&d[e[f]]);return c?l(d):d},o=function(){return!!(navigator.userAgent.indexOf("MSIE ")>0||navigator.userAgent.match(/Trident.*rv\:11\./))},p=function(){Object.keys||(Object.keys=function(){var a=Object.prototype.hasOwnProperty,b=!{toString:null}.propertyIsEnumerable("toString"),c=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],d=c.length;return function(e){if("object"!=typeof e&&("function"!=typeof e||null===e))throw new TypeError("Object.keys called on non-object");var f,g,h=[];for(f in e)a.call(e,f)&&h.push(f);if(b)for(g=0;d>g;g++)a.call(e,c[g])&&h.push(c[g]);return h}}())},q=function(b,c){this.options=c,this.$el=a(b),this.$el_=this.$el.clone(),this.timeoutId_=0,this.timeoutFooter_=0,this.init()};q.DEFAULTS={classes:"table table-hover",sortClass:void 0,locale:void 0,height:void 0,undefinedText:"-",sortName:void 0,sortOrder:"asc",sortStable:!1,rememberOrder:!1,striped:!1,columns:[[]],data:[],totalField:"total",dataField:"rows",method:"get",url:void 0,ajax:void 0,cache:!0,contentType:"application/json",dataType:"json",ajaxOptions:{},queryParams:function(a){return a},queryParamsType:"limit",responseHandler:function(a){return a},pagination:!1,onlyInfoPagination:!1,paginationLoop:!0,sidePagination:"client",totalRows:0,pageNumber:1,pageSize:10,pageList:[10,25,50,100],paginationHAlign:"right",paginationVAlign:"bottom",paginationDetailHAlign:"left",paginationPreText:"‹",paginationNextText:"›",search:!1,searchOnEnterKey:!1,strictSearch:!1,searchAlign:"right",selectItemName:"btSelectItem",showHeader:!0,showFooter:!1,showColumns:!1,showPaginationSwitch:!1,showRefresh:!1,showToggle:!1,showFullscreen:!1,smartDisplay:!0,escape:!1,minimumCountColumns:1,idField:void 0,uniqueId:void 0,cardView:!1,detailView:!1,detailFormatter:function(){return""},detailFilter:function(){return!0},trimOnSearch:!0,clickToSelect:!1,singleSelect:!1,toolbar:void 0,toolbarAlign:"left",buttonsToolbar:void 0,buttonsAlign:"right",checkboxHeader:!0,sortable:!0,silentSort:!0,maintainSelected:!1,searchTimeOut:500,searchText:"",iconSize:void 0,buttonsClass:d.buttonsClass,iconsPrefix:d.iconsPrefix,icons:d.icons,customSearch:a.noop,customSort:a.noop,ignoreClickToSelectOn:function(b){return a.inArray(b.tagName,["A","BUTTON"])},rowStyle:function(){return{}},rowAttributes:function(){return{}},footerStyle:function(){return{}},onAll:function(){return!1},onClickCell:function(){return!1},onDblClickCell:function(){return!1},onClickRow:function(){return!1},onDblClickRow:function(){return!1},onSort:function(){return!1},onCheck:function(){return!1},onUncheck:function(){return!1},onCheckAll:function(){return!1},onUncheckAll:function(){return!1},onCheckSome:function(){return!1},onUncheckSome:function(){return!1},onLoadSuccess:function(){return!1},onLoadError:function(){return!1},onColumnSwitch:function(){return!1},onPageChange:function(){return!1},onSearch:function(){return!1},onToggle:function(){return!1},onPreBody:function(){return!1},onPostBody:function(){return!1},onPostHeader:function(){return!1},onExpandRow:function(){return!1},onCollapseRow:function(){return!1},onRefreshOptions:function(){return!1},onRefresh:function(){return!1},onResetView:function(){return!1},onScrollBody:function(){return!1}},q.LOCALES={},q.LOCALES["en-US"]=q.LOCALES.en={formatLoadingMessage:function(){return"Loading, please wait..."},formatRecordsPerPage:function(a){return f("%s rows per page",a)},formatShowingRows:function(a,b,c){return f("Showing %s to %s of %s rows",a,b,c)},formatDetailPagination:function(a){return f("Showing %s rows",a)},formatSearch:function(){return"Search"},formatNoMatches:function(){return"No matching records found"},formatPaginationSwitch:function(){return"Hide/Show pagination"},formatRefresh:function(){return"Refresh"},formatToggle:function(){return"Toggle"},formatFullscreen:function(){return"Fullscreen"},formatColumns:function(){return"Columns"},formatAllRows:function(){return"All"}},a.extend(q.DEFAULTS,q.LOCALES["en-US"]),q.COLUMN_DEFAULTS={radio:!1,checkbox:!1,checkboxEnabled:!0,field:void 0,title:void 0,titleTooltip:void 0,"class":void 0,align:void 0,halign:void 0,falign:void 0,valign:void 0,width:void 0,sortable:!1,order:"asc",visible:!0,switchable:!0,clickToSelect:!0,formatter:void 0,footerFormatter:void 0,events:void 0,sorter:void 0,sortName:void 0,cellStyle:void 0,searchable:!0,searchFormatter:!0,cardVisible:!0,escape:!1,showSelectTitle:!1},q.EVENTS={"all.bs.table":"onAll","click-cell.bs.table":"onClickCell","dbl-click-cell.bs.table":"onDblClickCell","click-row.bs.table":"onClickRow","dbl-click-row.bs.table":"onDblClickRow","sort.bs.table":"onSort","check.bs.table":"onCheck","uncheck.bs.table":"onUncheck","check-all.bs.table":"onCheckAll","uncheck-all.bs.table":"onUncheckAll","check-some.bs.table":"onCheckSome","uncheck-some.bs.table":"onUncheckSome","load-success.bs.table":"onLoadSuccess","load-error.bs.table":"onLoadError","column-switch.bs.table":"onColumnSwitch","page-change.bs.table":"onPageChange","search.bs.table":"onSearch","toggle.bs.table":"onToggle","pre-body.bs.table":"onPreBody","post-body.bs.table":"onPostBody","post-header.bs.table":"onPostHeader","expand-row.bs.table":"onExpandRow","collapse-row.bs.table":"onCollapseRow","refresh-options.bs.table":"onRefreshOptions","reset-view.bs.table":"onResetView","refresh.bs.table":"onRefresh","scroll-body.bs.table":"onScrollBody"},q.prototype.init=function(){this.initLocale(),this.initContainer(),this.initTable(),this.initHeader(),this.initData(),this.initHiddenRows(),this.initFooter(),this.initToolbar(),this.initPagination(),this.initBody(),this.initSearchText(),this.initServer()},q.prototype.initLocale=function(){if(this.options.locale){var b=this.options.locale.split(/-|_/);b[0].toLowerCase(),b[1]&&b[1].toUpperCase(),a.fn.bootstrapTable.locales[this.options.locale]?a.extend(this.options,a.fn.bootstrapTable.locales[this.options.locale]):a.fn.bootstrapTable.locales[b.join("-")]?a.extend(this.options,a.fn.bootstrapTable.locales[b.join("-")]):a.fn.bootstrapTable.locales[b[0]]&&a.extend(this.options,a.fn.bootstrapTable.locales[b[0]])}},q.prototype.initContainer=function(){this.$container=a(['','
',"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.$toolbar=this.options.buttonsToolbar?a("body").find(this.options.buttonsToolbar):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!==a.inArray("table-no-bordered",this.options.classes.split(" "))&&this.$tableContainer.addClass("table-no-bordered")},q.prototype.initTable=function(){var b=this,c=[],d=[];if(this.$header=this.$el.find(">thead"),this.$header.length||(this.$header=a(" ").appendTo(this.$el)),this.$header.find("tr").each(function(){var b=[];a(this).find("th").each(function(){"undefined"!=typeof a(this).data("field")&&a(this).data("field",a(this).data("field")+""),b.push(a.extend({},{title:a(this).html(),"class":a(this).attr("class"),titleTooltip:a(this).attr("title"),rowspan:a(this).attr("rowspan")?+a(this).attr("rowspan"):void 0,colspan:a(this).attr("colspan")?+a(this).attr("colspan"):void 0},a(this).data()))}),c.push(b)}),a.isArray(this.options.columns[0])||(this.options.columns=[this.options.columns]),this.options.columns=a.extend(!0,[],c,this.options.columns),this.columns=[],this.fieldsColumnsIndex=[],h(this.options.columns),a.each(this.options.columns,function(c,d){a.each(d,function(d,e){e=a.extend({},q.COLUMN_DEFAULTS,e),"undefined"!=typeof e.fieldIndex&&(b.columns[e.fieldIndex]=e,b.fieldsColumnsIndex[e.field]=e.fieldIndex),b.options.columns[c][d]=e})}),!this.options.data.length){var e=[];this.$el.find(">tbody>tr").each(function(c){var f={};f._id=a(this).attr("id"),f._class=a(this).attr("class"),f._data=m(a(this).data()),a(this).find(">td").each(function(d){for(var g,h,i=a(this),j=+i.attr("colspan")||1,k=+i.attr("rowspan")||1;e[c]&&e[c][d];d++);for(g=d;d+j>g;g++)for(h=c;c+k>h;h++)e[h]||(e[h]=[]),e[h][g]=!0;var l=b.columns[d].field;f[l]=a(this).html(),f["_"+l+"_id"]=a(this).attr("id"),f["_"+l+"_class"]=a(this).attr("class"),f["_"+l+"_rowspan"]=a(this).attr("rowspan"),f["_"+l+"_colspan"]=a(this).attr("colspan"),f["_"+l+"_title"]=a(this).attr("title"),f["_"+l+"_data"]=m(a(this).data())}),d.push(f)}),this.options.data=d,d.length&&(this.fromHtml=!0)}},q.prototype.initHeader=function(){var b=this,c={},d=[];this.header={fields:[],styles:[],classes:[],formatters:[],events:[],sorters:[],sortNames:[],cellStyles:[],searchables:[]},a.each(this.options.columns,function(e,g){d.push(""),0===e&&!b.options.cardView&&b.options.detailView&&d.push(f('
',b.options.columns.length)),a.each(g,function(a,e){var g="",h="",i="",j="",k=f(' class="%s"',e["class"]),m=(b.options.sortOrder||e.order,"px"),n=e.width;if(void 0===e.width||b.options.cardView||"string"==typeof e.width&&-1!==e.width.indexOf("%")&&(m="%"),e.width&&"string"==typeof e.width&&(n=e.width.replace("%","").replace("px","")),h=f("text-align: %s; ",e.halign?e.halign:e.align),i=f("text-align: %s; ",e.align),j=f("vertical-align: %s; ",e.valign),j+=f("width: %s; ",!e.checkbox&&!e.radio||n?n?n+m:void 0:e.showSelectTitle?void 0:"36px"),"undefined"!=typeof e.fieldIndex){if(b.header.fields[e.fieldIndex]=e.field,b.header.styles[e.fieldIndex]=i+j,b.header.classes[e.fieldIndex]=k,b.header.formatters[e.fieldIndex]=e.formatter,b.header.events[e.fieldIndex]=e.events,b.header.sorters[e.fieldIndex]=e.sorter,b.header.sortNames[e.fieldIndex]=e.sortName,b.header.cellStyles[e.fieldIndex]=e.cellStyle,b.header.searchables[e.fieldIndex]=e.searchable,!e.visible)return;if(b.options.cardView&&!e.cardVisible)return;c[e.field]=e}d.push(""),d.push(f('',b.options.sortable&&e.sortable?"sortable both":"")),g=b.options.escape?l(e.title):e.title;var o=g;e.checkbox&&(g="",!b.options.singleSelect&&b.options.checkboxHeader&&(g=' '),b.header.stateField=e.field),e.radio&&(g="",b.header.stateField=e.field,b.options.singleSelect=!0),!g&&e.showSelectTitle&&(g+=o),d.push(g),d.push("
"),d.push('
'),d.push(""),d.push(" ")}),d.push(" ")}),this.$header.html(d.join("")),this.$header.find("th[data-field]").each(function(){a(this).data(c[a(this).data("field")])}),this.$container.off("click",".th-inner").on("click",".th-inner",function(c){var d=a(this);return b.options.detailView&&!d.parent().hasClass("bs-checkbox")&&d.closest(".bootstrap-table")[0]!==b.$container[0]?!1:void(b.options.sortable&&d.parent().data().sortable&&b.onSort(c))}),this.$header.children().children().off("keypress").on("keypress",function(c){if(b.options.sortable&&a(this).data().sortable){var d=c.keyCode||c.which;13==d&&b.onSort(c)}}),a(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(),a(window).on("resize.bootstrap-table",a.proxy(this.resetWidth,this))),this.$selectAll=this.$header.find('[name="btSelectAll"]'),this.$selectAll.off("click").on("click",function(){var c=a(this).prop("checked");b[c?"checkAll":"uncheckAll"](),b.updateSelected()})},q.prototype.initFooter=function(){!this.options.showFooter||this.options.cardView?this.$tableFooter.hide():this.$tableFooter.show()},q.prototype.initData=function(a,b){this.options.data="append"===b?this.options.data.concat(a):"prepend"===b?[].concat(a).concat(this.options.data):a||this.options.data,this.data=this.options.data,"server"!==this.options.sidePagination&&this.initSort()},q.prototype.initSort=function(){var b=this,c=this.options.sortName,d="desc"===this.options.sortOrder?-1:1,e=a.inArray(this.options.sortName,this.header.fields),g=0;return this.options.customSort!==a.noop?void this.options.customSort.apply(this,[this.options.sortName,this.options.sortOrder]):void(-1!==e&&(this.options.sortStable&&a.each(this.data,function(a,b){b._position=a}),this.data.sort(function(f,g){b.header.sortNames[e]&&(c=b.header.sortNames[e]);var h=n(f,c,b.options.escape),i=n(g,c,b.options.escape),k=j(b.header,b.header.sorters[e],[h,i,f,g]);return void 0!==k?b.options.sortStable&&0===k?f._position-g._position:d*k:((void 0===h||null===h)&&(h=""),(void 0===i||null===i)&&(i=""),b.options.sortStable&&h===i?(h=f._position,i=g._position,f._position-g._position):a.isNumeric(h)&&a.isNumeric(i)?(h=parseFloat(h),i=parseFloat(i),i>h?-1*d:d):h===i?0:("string"!=typeof h&&(h=h.toString()),-1===h.localeCompare(i)?-1*d:d))}),void 0!==this.options.sortClass&&(clearTimeout(g),g=setTimeout(function(){b.$el.removeClass(b.options.sortClass);var a=b.$header.find(f('[data-field="%s"]',b.options.sortName).index()+1);b.$el.find(f("tr td:nth-child(%s)",a)).addClass(b.options.sortClass)},250))))},q.prototype.onSort=function(b){var c="keypress"===b.type?a(b.currentTarget):a(b.currentTarget).parent(),d=this.$header.find("th").eq(c.index());return this.$header.add(this.$header_).find("span.order").remove(),this.options.sortName===c.data("field")?this.options.sortOrder="asc"===this.options.sortOrder?"desc":"asc":(this.options.sortName=c.data("field"),this.options.sortOrder=this.options.rememberOrder?"asc"===c.data("order")?"desc":"asc":this.columns[this.fieldsColumnsIndex[c.data("field")]].order),this.trigger("sort",this.options.sortName,this.options.sortOrder),c.add(d).data("order",this.options.sortOrder),this.getCaret(),"server"===this.options.sidePagination?void this.initServer(this.options.silentSort):(this.initSort(),void this.initBody())},q.prototype.initToolbar=function(){var b,c,e=this,g=[],h=0,i=0;this.$toolbar.find(".bs-bars").children().length&&a("body").append(a(this.options.toolbar)),this.$toolbar.html(""),("string"==typeof this.options.toolbar||"object"==typeof this.options.toolbar)&&a(f('
',d.pullClass,this.options.toolbarAlign)).appendTo(this.$toolbar).append(a(this.options.toolbar)),g=[f('',this.options.buttonsAlign,d.pullClass,this.options.buttonsAlign)],"string"==typeof this.options.icons&&(this.options.icons=j(null,this.options.icons)),this.options.showPaginationSwitch&&g.push(f('
',this.options.formatPaginationSwitch()),f(' ',this.options.iconsPrefix,this.options.icons.paginationSwitchDown)," "),this.options.showFullscreen&&this.$toolbar.find('button[name="fullscreen"]').off("click").on("click",a.proxy(this.toggleFullscreen,this)),this.options.showRefresh&&g.push(f('
',this.options.formatRefresh()),f(' ',this.options.iconsPrefix,this.options.icons.refresh)," "),this.options.showToggle&&g.push(f('
',this.options.formatToggle()),f(' ',this.options.iconsPrefix,this.options.icons.toggleOff)," "),this.options.showFullscreen&&g.push(f('
',this.options.formatFullscreen()),f(' ',this.options.iconsPrefix,this.options.icons.fullscreen)," "),this.options.showColumns&&(g.push(f('
',this.options.formatColumns()),'',f(' ',this.options.iconsPrefix,this.options.icons.columns),' '," ",d.toobarDropdowHtml[0]),a.each(this.columns,function(a,b){if(!(b.radio||b.checkbox||e.options.cardView&&!b.cardVisible)){var c=b.visible?' checked="checked"':"";b.switchable&&(g.push(f(d.toobarDropdowItemHtml,f(' %s',b.field,a,c,b.title))),i++)}}),g.push(d.toobarDropdowHtml[1],"
")),g.push("
"),(this.showToolbar||g.length>2)&&this.$toolbar.append(g.join("")),this.options.showPaginationSwitch&&this.$toolbar.find('button[name="paginationSwitch"]').off("click").on("click",a.proxy(this.togglePagination,this)),this.options.showRefresh&&this.$toolbar.find('button[name="refresh"]').off("click").on("click",a.proxy(this.refresh,this)),this.options.showToggle&&this.$toolbar.find('button[name="toggle"]').off("click").on("click",function(){e.toggleView()}),this.options.showColumns&&(b=this.$toolbar.find(".keep-open"),i<=this.options.minimumCountColumns&&b.find("input").prop("disabled",!0),b.find("li").off("click").on("click",function(a){a.stopImmediatePropagation()}),b.find("input").off("click").on("click",function(){var b=a(this);e.toggleColumn(a(this).val(),b.prop("checked"),!1),e.trigger("column-switch",a(this).data("field"),b.prop("checked"))})),this.options.search&&(g=[],g.push(f('',d.pullClass,this.options.searchAlign),f(' ',this.options.formatSearch()),"
"),this.$toolbar.append(g.join("")),c=this.$toolbar.find(".search input"),c.off("keyup drop blur").on("keyup drop blur",function(b){e.options.searchOnEnterKey&&13!==b.keyCode||a.inArray(b.keyCode,[37,38,39,40])>-1||(clearTimeout(h),h=setTimeout(function(){e.onSearch(b)},e.options.searchTimeOut))}),o()&&c.off("mouseup").on("mouseup",function(a){clearTimeout(h),h=setTimeout(function(){e.onSearch(a)},e.options.searchTimeOut)}))},q.prototype.onSearch=function(b){var c=a.trim(a(b.currentTarget).val());this.options.trimOnSearch&&a(b.currentTarget).val()!==c&&a(b.currentTarget).val(c),c!==this.searchText&&(this.searchText=c,this.options.searchText=c,this.options.pageNumber=1,this.initSearch(),b.firedByInitSearchText?"client"===this.options.sidePagination&&this.updatePagination():this.updatePagination(),this.trigger("search",c))},q.prototype.initSearch=function(){var b=this;if("server"!==this.options.sidePagination){if(this.options.customSearch!==a.noop)return void window[this.options.customSearch].apply(this,[this.searchText]);var c=this.searchText&&(this.options.escape?l(this.searchText):this.searchText).toLowerCase(),d=a.isEmptyObject(this.filterColumns)?null:this.filterColumns;this.data=d?a.grep(this.options.data,function(b){for(var c in d)if(a.isArray(d[c])&&-1===a.inArray(b[c],d[c])||!a.isArray(d[c])&&b[c]!==d[c])return!1;return!0}):this.options.data,this.data=c?a.grep(this.data,function(d,e){for(var f=0;f-1&&(m=!0)}this.totalPages=~~((this.options.totalRows-1)/this.options.pageSize)+1,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),l.push(f('",f('")}this.$pagination.html(l.join("")),this.options.onlyInfoPagination||(g=this.$pagination.find(".page-list a"),h=this.$pagination.find(".page-pre"),i=this.$pagination.find(".page-next"),j=this.$pagination.find(".page-item").not(".page-next, .page-pre"),this.options.smartDisplay&&(this.totalPages<=1&&this.$pagination.find("div.pagination").hide(),(o.length<2||this.options.totalRows<=o[0])&&this.$pagination.find("span.page-list").hide(),this.$pagination[this.getData().length?"show":"hide"]()),this.options.paginationLoop||(1===this.options.pageNumber&&h.addClass("disabled"),this.options.pageNumber===this.totalPages&&i.addClass("disabled")),m&&(this.options.pageSize=this.options.formatAllRows()),g.off("click").on("click",a.proxy(this.onPageListChange,this)),h.off("click").on("click",a.proxy(this.onPagePre,this)),i.off("click").on("click",a.proxy(this.onPageNext,this)),j.off("click").on("click",a.proxy(this.onPageNumber,this)))},q.prototype.updatePagination=function(b){b&&a(b.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))},q.prototype.onPageListChange=function(b){b.preventDefault();var c=a(b.currentTarget);return c.parent().addClass("active").siblings().removeClass("active"),this.options.pageSize=c.text().toUpperCase()===this.options.formatAllRows().toUpperCase()?this.options.formatAllRows():+c.text(),this.$toolbar.find(".page-size").text(this.options.pageSize),this.updatePagination(b),!1},q.prototype.onPagePre=function(a){return a.preventDefault(),this.options.pageNumber-1===0?this.options.pageNumber=this.options.totalPages:this.options.pageNumber--,this.updatePagination(a),!1},q.prototype.onPageNext=function(a){return a.preventDefault(),this.options.pageNumber+1>this.options.totalPages?this.options.pageNumber=1:this.options.pageNumber++,this.updatePagination(a),!1},q.prototype.onPageNumber=function(b){return b.preventDefault(),this.options.pageNumber!==+a(b.currentTarget).text()?(this.options.pageNumber=+a(b.currentTarget).text(),this.updatePagination(b),!1):void 0},q.prototype.initRow=function(b,c){var d,e=this,h=[],i={},k=[],m="",o={},p=[];if(!(a.inArray(b,this.hiddenRows)>-1)){if(i=j(this.options,this.options.rowStyle,[b,c],i),i&&i.css)for(d in i.css)k.push(d+": "+i.css[d]);if(o=j(this.options,this.options.rowAttributes,[b,c],o))for(d in o)p.push(f('%s="%s"',d,l(o[d])));return b._data&&!a.isEmptyObject(b._data)&&a.each(b._data,function(a,b){"index"!==a&&(m+=f(' data-%s="%s"',a,b))}),h.push(""),this.options.cardView&&h.push(f('',this.header.fields.length)),!this.options.cardView&&this.options.detailView&&(h.push("
"),j(null,this.options.detailFilter,[c,b])&&h.push('',f(' ',this.options.iconsPrefix,this.options.icons.detailOpen)," "),h.push(" ")),a.each(this.header.fields,function(d,m){var o="",p=n(b,m,e.options.escape),q="",r="",s={},t="",u=e.header.classes[d],v="",w="",x="",y="",z=e.columns[d];
if((!e.fromHtml||"undefined"!=typeof p||z.checkbox||z.radio)&&z.visible&&(!e.options.cardView||z.cardVisible)){if(z.escape&&(p=l(p)),i=f('style="%s"',k.concat(e.header.styles[d]).join("; ")),b["_"+m+"_id"]&&(t=f(' id="%s"',b["_"+m+"_id"])),b["_"+m+"_class"]&&(u=f(' class="%s"',b["_"+m+"_class"])),b["_"+m+"_rowspan"]&&(w=f(' rowspan="%s"',b["_"+m+"_rowspan"])),b["_"+m+"_colspan"]&&(x=f(' colspan="%s"',b["_"+m+"_colspan"])),b["_"+m+"_title"]&&(y=f(' title="%s"',b["_"+m+"_title"])),s=j(e.header,e.header.cellStyles[d],[p,b,c,m],s),s.classes&&(u=f(' class="%s"',s.classes)),s.css){var A=[];for(var B in s.css)A.push(B+": "+s.css[B]);i=f('style="%s"',A.concat(e.header.styles[d]).join("; "))}q=j(z,e.header.formatters[d],[p,b,c,m],p),b["_"+m+"_data"]&&!a.isEmptyObject(b["_"+m+"_data"])&&a.each(b["_"+m+"_data"],function(a,b){"index"!==a&&(v+=f(' data-%s="%s"',a,b))}),z.checkbox||z.radio?(r=z.checkbox?"checkbox":r,r=z.radio?"radio":r,o=[f(e.options.cardView?'
':'
',z["class"]||"")," ",e.header.formatters[d]&&"string"==typeof q?q:"",e.options.cardView?"":" "].join(""),b[e.header.stateField]=q===!0||!!p||q&&q.checked):(q="undefined"==typeof q||null===q?e.options.undefinedText:q,o=e.options.cardView?['
',e.options.showHeader?f('%s ',i,g(e.columns,"field","title",m)):"",f('%s ',q),"
"].join(""):[f("
",t,u,i,v,w,x,y),q," "].join(""),e.options.cardView&&e.options.smartDisplay&&""===q&&(o='
')),h.push(o)}}),this.options.cardView&&h.push("
"),h.push(" "),h.join(" ")}},q.prototype.initBody=function(b){var c=this,d=this.getData();this.trigger("pre-body",d),this.$body=this.$el.find(">tbody"),this.$body.length||(this.$body=a(" ").appendTo(this.$el)),this.options.pagination&&"server"!==this.options.sidePagination||(this.pageFrom=1,this.pageTo=d.length);for(var e,g=a(document.createDocumentFragment()),h=this.pageFrom-1;h'+f('%s ',this.$header.find("th").length,this.options.formatNoMatches())+" "),this.$body.html(g),b||this.scrollTo(0),this.$body.find("> tr[data-index] > td").off("click dblclick").on("click dblclick",function(b){var d=a(this),e=d.parent(),g=c.data[e.data("index")],h=d[0].cellIndex,i=c.getVisibleFields(),j=i[c.options.detailView&&!c.options.cardView?h-1:h],k=c.columns[c.fieldsColumnsIndex[j]],l=n(g,j,c.options.escape);if(!d.find(".detail-icon").length&&(c.trigger("click"===b.type?"click-cell":"dbl-click-cell",j,l,g,d),c.trigger("click"===b.type?"click-row":"dbl-click-row",g,e,j),"click"===b.type&&c.options.clickToSelect&&k.clickToSelect&&c.options.ignoreClickToSelectOn(b.target))){var m=e.find(f('[name="%s"]',c.options.selectItemName));m.length&&m[0].click()}}),this.$body.find("> tr[data-index] > td > .detail-icon").off("click").on("click",function(b){b.preventDefault();var e=a(this),g=e.parent().parent(),h=g.data("index"),i=d[h];if(g.next().is("tr.detail-view"))e.find("i").attr("class",f("%s %s",c.options.iconsPrefix,c.options.icons.detailOpen)),c.trigger("collapse-row",h,i,g.next()),g.next().remove();else{e.find("i").attr("class",f("%s %s",c.options.iconsPrefix,c.options.icons.detailClose)),g.after(f('