mirror of
https://github.com/Mottie/tablesorter.git
synced 2024-11-15 23:54:22 +00:00
2 lines
94 KiB
JavaScript
2 lines
94 KiB
JavaScript
/*! tablesorter (FORK) - updated 2018-06-16 (v2.30.6)*/
|
||
!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof module&&"object"==typeof module.exports?module.exports=e(require("jquery")):e(jQuery)}(function(e){return function(e){"use strict";var t=e.tablesorter={version:"2.30.6",parsers:[],widgets:[],defaults:{theme:"default",widthFixed:!1,showProcessing:!1,headerTemplate:"{content}",onRenderTemplate:null,onRenderHeader:null,cancelSelection:!0,tabIndex:!0,dateFormat:"mmddyyyy",sortMultiSortKey:"shiftKey",sortResetKey:"ctrlKey",usNumberFormat:!0,delayInit:!1,serverSideSorting:!1,resort:!0,headers:{},ignoreCase:!0,sortForce:null,sortList:[],sortAppend:null,sortStable:!1,sortInitialOrder:"asc",sortLocaleCompare:!1,sortReset:!1,sortRestart:!1,emptyTo:"bottom",stringTo:"max",duplicateSpan:!0,textExtraction:"basic",textAttribute:"data-text",textSorter:null,numberSorter:null,initWidgets:!0,widgetClass:"widget-{name}",widgets:[],widgetOptions:{zebra:["even","odd"]},initialized:null,tableClass:"",cssAsc:"",cssDesc:"",cssNone:"",cssHeader:"",cssHeaderRow:"",cssProcessing:"",cssChildRow:"tablesorter-childRow",cssInfoBlock:"tablesorter-infoOnly",cssNoSort:"tablesorter-noSort",cssIgnoreRow:"tablesorter-ignoreRow",cssIcon:"tablesorter-icon",cssIconNone:"",cssIconAsc:"",cssIconDesc:"",cssIconDisabled:"",pointerClick:"click",pointerDown:"mousedown",pointerUp:"mouseup",selectorHeaders:"> thead th, > thead td",selectorSort:"th, td",selectorRemove:".remove-me",debug:!1,headerList:[],empties:{},strings:{},parsers:[],globalize:0,imgAttr:0},css:{table:"tablesorter",cssHasChild:"tablesorter-hasChildRow",childRow:"tablesorter-childRow",colgroup:"tablesorter-colgroup",header:"tablesorter-header",headerRow:"tablesorter-headerRow",headerIn:"tablesorter-header-inner",icon:"tablesorter-icon",processing:"tablesorter-processing",sortAsc:"tablesorter-headerAsc",sortDesc:"tablesorter-headerDesc",sortNone:"tablesorter-headerUnSorted"},language:{sortAsc:"Ascending sort applied, ",sortDesc:"Descending sort applied, ",sortNone:"No sort applied, ",sortDisabled:"sorting is disabled",nextAsc:"activate to apply an ascending sort",nextDesc:"activate to apply a descending sort",nextNone:"activate to remove the sort"},regex:{templateContent:/\{content\}/g,templateIcon:/\{icon\}/g,templateName:/\{name\}/i,spaces:/\s+/g,nonWord:/\W/g,formElements:/(input|select|button|textarea)/i,chunk:/(^([+\-]?(?:\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?)?$|^0x[0-9a-f]+$|\d+)/gi,chunks:/(^\\0|\\0$)/,hex:/^0x[0-9a-f]+$/i,comma:/,/g,digitNonUS:/[\s|\.]/g,digitNegativeTest:/^\s*\([.\d]+\)/,digitNegativeReplace:/^\s*\(([.\d]+)\)/,digitTest:/^[\-+(]?\d+[)]?$/,digitReplace:/[,.'"\s]/g},string:{max:1,min:-1,emptymin:1,emptymax:-1,zero:0,none:0,"null":0,top:!0,bottom:!1},keyCodes:{enter:13},dates:{},instanceMethods:{},setup:function(r,a){if(r&&r.tHead&&0!==r.tBodies.length&&!0!==r.hasInitialized){var i="",s=e(r),o=e.metadata;r.hasInitialized=!1,r.isProcessing=!0,r.config=a,e.data(r,"tablesorter",a),t.debug(a,"core")&&(console[console.group?"group":"log"]("Initializing tablesorter v"+t.version),e.data(r,"startoveralltimer",new Date)),a.supportsDataObject=function(e){return e[0]=parseInt(e[0],10),e[0]>1||1===e[0]&&parseInt(e[1],10)>=4}(e.fn.jquery.split(".")),a.emptyTo=a.emptyTo.toLowerCase(),a.stringTo=a.stringTo.toLowerCase(),a.last={sortList:[],clickedIndex:-1},/tablesorter\-/.test(s.attr("class"))||(i=""!==a.theme?" tablesorter-"+a.theme:""),a.namespace?a.namespace="."+a.namespace.replace(t.regex.nonWord,""):a.namespace=".tablesorter"+Math.random().toString(16).slice(2),a.table=r,a.$table=s.addClass(t.css.table+" "+a.tableClass+i+" "+a.namespace.slice(1)).attr("role","grid"),a.$headers=s.find(a.selectorHeaders),a.$table.children().children("tr").attr("role","row"),a.$tbodies=s.children("tbody:not(."+a.cssInfoBlock+")").attr({"aria-live":"polite","aria-relevant":"all"}),a.$table.children("caption").length&&((i=a.$table.children("caption")[0]).id||(i.id=a.namespace.slice(1)+"caption"),a.$table.attr("aria-labelledby",i.id)),a.widgetInit={},a.textExtraction=a.$table.attr("data-text-extraction")||a.textExtraction||"basic",t.buildHeaders(a),t.fixColumnWidth(r),t.addWidgetFromClass(r),t.applyWidgetOptions(r),t.setupParsers(a),a.totalRows=0,a.debug&&t.validateOptions(a),a.delayInit||t.buildCache(a),t.bindEvents(r,a.$headers,!0),t.bindMethods(a),a.supportsDataObject&&void 0!==s.data().sortlist?a.sortList=s.data().sortlist:o&&s.metadata()&&s.metadata().sortlist&&(a.sortList=s.metadata().sortlist),t.applyWidget(r,!0),a.sortList.length>0?t.sortOn(a,a.sortList,{},!a.initWidgets):(t.setHeadersCss(a),a.initWidgets&&t.applyWidget(r,!1)),a.showProcessing&&s.unbind("sortBegin"+a.namespace+" sortEnd"+a.namespace).bind("sortBegin"+a.namespace+" sortEnd"+a.namespace,function(e){clearTimeout(a.timerProcessing),t.isProcessing(r),"sortBegin"===e.type&&(a.timerProcessing=setTimeout(function(){t.isProcessing(r,!0)},500))}),r.hasInitialized=!0,r.isProcessing=!1,t.debug(a,"core")&&(console.log("Overall initialization time:"+t.benchmark(e.data(r,"startoveralltimer"))),t.debug(a,"core")&&console.groupEnd&&console.groupEnd()),s.triggerHandler("tablesorter-initialized",r),"function"==typeof a.initialized&&a.initialized(r)}else t.debug(a,"core")&&(r.hasInitialized?console.warn("Stopping initialization. Tablesorter has already been initialized"):console.error("Stopping initialization! No table, thead or tbody",r))},bindMethods:function(r){var a=r.$table,i=r.namespace,s="sortReset update updateRows updateAll updateHeaders addRows updateCell updateComplete sorton appendCache updateCache applyWidgetId applyWidgets refreshWidgets destroy mouseup mouseleave ".split(" ").join(i+" ");a.unbind(s.replace(t.regex.spaces," ")).bind("sortReset"+i,function(e,r){e.stopPropagation(),t.sortReset(this.config,function(e){e.isApplyingWidgets?setTimeout(function(){t.applyWidget(e,"",r)},100):t.applyWidget(e,"",r)})}).bind("updateAll"+i,function(e,r,a){e.stopPropagation(),t.updateAll(this.config,r,a)}).bind("update"+i+" updateRows"+i,function(e,r,a){e.stopPropagation(),t.update(this.config,r,a)}).bind("updateHeaders"+i,function(e,r){e.stopPropagation(),t.updateHeaders(this.config,r)}).bind("updateCell"+i,function(e,r,a,i){e.stopPropagation(),t.updateCell(this.config,r,a,i)}).bind("addRows"+i,function(e,r,a,i){e.stopPropagation(),t.addRows(this.config,r,a,i)}).bind("updateComplete"+i,function(){this.isUpdating=!1}).bind("sorton"+i,function(e,r,a,i){e.stopPropagation(),t.sortOn(this.config,r,a,i)}).bind("appendCache"+i,function(r,a,i){r.stopPropagation(),t.appendCache(this.config,i),e.isFunction(a)&&a(this)}).bind("updateCache"+i,function(e,r,a){e.stopPropagation(),t.updateCache(this.config,r,a)}).bind("applyWidgetId"+i,function(e,r){e.stopPropagation(),t.applyWidgetId(this,r)}).bind("applyWidgets"+i,function(e,r){e.stopPropagation(),t.applyWidget(this,!1,r)}).bind("refreshWidgets"+i,function(e,r,a){e.stopPropagation(),t.refreshWidgets(this,r,a)}).bind("removeWidget"+i,function(e,r,a){e.stopPropagation(),t.removeWidget(this,r,a)}).bind("destroy"+i,function(e,r,a){e.stopPropagation(),t.destroy(this,r,a)}).bind("resetToLoadState"+i,function(a){a.stopPropagation(),t.removeWidget(this,!0,!1);var i=e.extend(!0,{},r.originalSettings);(r=e.extend(!0,{},t.defaults,i)).originalSettings=i,this.hasInitialized=!1,t.setup(this,r)})},bindEvents:function(r,a,i){var s,o=(r=e(r)[0]).config,n=o.namespace,l=null;!0!==i&&(a.addClass(n.slice(1)+"_extra_headers"),(s=t.getClosest(a,"table")).length&&"TABLE"===s[0].nodeName&&s[0]!==r&&e(s[0]).addClass(n.slice(1)+"_extra_table")),s=(o.pointerDown+" "+o.pointerUp+" "+o.pointerClick+" sort keyup ").replace(t.regex.spaces," ").split(" ").join(n+" "),a.find(o.selectorSort).add(a.filter(o.selectorSort)).unbind(s).bind(s,function(r,a){var i,s,n,c=e(r.target),d=" "+r.type+" ";if(!(1!==(r.which||r.button)&&!d.match(" "+o.pointerClick+" | sort | keyup ")||" keyup "===d&&r.which!==t.keyCodes.enter||d.match(" "+o.pointerClick+" ")&&void 0!==r.which||d.match(" "+o.pointerUp+" ")&&l!==r.target&&!0!==a)){if(d.match(" "+o.pointerDown+" "))return l=r.target,void("1"===(n=c.jquery.split("."))[0]&&n[1]<4&&r.preventDefault());if(l=null,i=t.getClosest(e(this),"."+t.css.header),t.regex.formElements.test(r.target.nodeName)||c.hasClass(o.cssNoSort)||c.parents("."+o.cssNoSort).length>0||i.hasClass("sorter-false")||c.parents("button").length>0)return!o.cancelSelection;o.delayInit&&t.isEmptyObject(o.cache)&&t.buildCache(o),o.last.clickedIndex=i.attr("data-column")||i.index(),(s=o.$headerIndexed[o.last.clickedIndex][0])&&!s.sortDisabled&&t.initSort(o,s,r)}}),o.cancelSelection&&a.attr("unselectable","on").bind("selectstart",!1).css({"user-select":"none",MozUserSelect:"none"})},buildHeaders:function(r){var a,i,s,o;for(r.headerList=[],r.headerContent=[],r.sortVars=[],t.debug(r,"core")&&(s=new Date),r.columns=t.computeColumnIndex(r.$table.children("thead, tfoot").children("tr")),i=r.cssIcon?'<i class="'+(r.cssIcon===t.css.icon?t.css.icon:r.cssIcon+" "+t.css.icon)+'"></i>':"",r.$headers=e(e.map(r.$table.find(r.selectorHeaders),function(a,s){var o,n,l,c,d,f=e(a);if(!t.getClosest(f,"tr").hasClass(r.cssIgnoreRow))return/(th|td)/i.test(a.nodeName)||(d=t.getClosest(f,"th, td"),f.attr("data-column",d.attr("data-column"))),o=t.getColumnData(r.table,r.headers,s,!0),r.headerContent[s]=f.html(),""===r.headerTemplate||f.find("."+t.css.headerIn).length||(c=r.headerTemplate.replace(t.regex.templateContent,f.html()).replace(t.regex.templateIcon,f.find("."+t.css.icon).length?"":i),r.onRenderTemplate&&(n=r.onRenderTemplate.apply(f,[s,c]))&&"string"==typeof n&&(c=n),f.html('<div class="'+t.css.headerIn+'">'+c+"</div>")),r.onRenderHeader&&r.onRenderHeader.apply(f,[s,r,r.$table]),l=parseInt(f.attr("data-column"),10),a.column=l,d=t.getOrder(t.getData(f,o,"sortInitialOrder")||r.sortInitialOrder),r.sortVars[l]={count:-1,order:d?r.sortReset?[1,0,2]:[1,0]:r.sortReset?[0,1,2]:[0,1],lockedOrder:!1},void 0!==(d=t.getData(f,o,"lockedOrder")||!1)&&!1!==d&&(r.sortVars[l].lockedOrder=!0,r.sortVars[l].order=t.getOrder(d)?[1,1]:[0,0]),r.headerList[s]=a,f.addClass(t.css.header+" "+r.cssHeader),t.getClosest(f,"tr").addClass(t.css.headerRow+" "+r.cssHeaderRow).attr("role","row"),r.tabIndex&&f.attr("tabindex",0),a})),r.$headerIndexed=[],o=0;o<r.columns;o++)t.isEmptyObject(r.sortVars[o])&&(r.sortVars[o]={}),a=r.$headers.filter('[data-column="'+o+'"]'),r.$headerIndexed[o]=a.length?a.not(".sorter-false").length?a.not(".sorter-false").filter(":last"):a.filter(":last"):e();r.$table.find(r.selectorHeaders).attr({scope:"col",role:"columnheader"}),t.updateHeader(r),t.debug(r,"core")&&(console.log("Built headers:"+t.benchmark(s)),console.log(r.$headers))},addInstanceMethods:function(r){e.extend(t.instanceMethods,r)},setupParsers:function(e,r){var a,i,s,o,n,l,c,d,f,u,g,p,h,m,b=e.table,y=0,v=t.debug(e,"core"),w={};if(e.$tbodies=e.$table.children("tbody:not(."+e.cssInfoBlock+")"),h=void 0===r?e.$tbodies:r,0===(m=h.length))return v?console.warn("Warning: *Empty table!* Not building a parser cache"):"";for(v&&(p=new Date,console[console.group?"group":"log"]("Detecting parsers for each column")),i={extractors:[],parsers:[]};y<m;){if((a=h[y].rows).length)for(n=0,o=e.columns,l=0;l<o;l++){if((c=e.$headerIndexed[n])&&c.length&&(d=t.getColumnData(b,e.headers,n),g=t.getParserById(t.getData(c,d,"extractor")),u=t.getParserById(t.getData(c,d,"sorter")),f="false"===t.getData(c,d,"parser"),e.empties[n]=(t.getData(c,d,"empty")||e.emptyTo||(e.emptyToBottom?"bottom":"top")).toLowerCase(),e.strings[n]=(t.getData(c,d,"string")||e.stringTo||"max").toLowerCase(),f&&(u=t.getParserById("no-parser")),g||(g=!1),u||(u=t.detectParserForColumn(e,a,-1,n)),v&&(w["("+n+") "+c.text()]={parser:u.id,extractor:g?g.id:"none",string:e.strings[n],empty:e.empties[n]}),i.parsers[n]=u,i.extractors[n]=g,(s=c[0].colSpan-1)>0))for(n+=s,o+=s;s+1>0;)i.parsers[n-s]=u,i.extractors[n-s]=g,s--;n++}y+=i.parsers.length?m:1}v&&(t.isEmptyObject(w)?console.warn(" No parsers detected!"):console[console.table?"table":"log"](w),console.log("Completed detecting parsers"+t.benchmark(p)),console.groupEnd&&console.groupEnd()),e.parsers=i.parsers,e.extractors=i.extractors},addParser:function(e){var r,a=t.parsers.length,i=!0;for(r=0;r<a;r++)t.parsers[r].id.toLowerCase()===e.id.toLowerCase()&&(i=!1);i&&(t.parsers[t.parsers.length]=e)},getParserById:function(e){if("false"==e)return!1;var r,a=t.parsers.length;for(r=0;r<a;r++)if(t.parsers[r].id.toLowerCase()===e.toString().toLowerCase())return t.parsers[r];return!1},detectParserForColumn:function(r,a,i,s){for(var o,n,l,c=t.parsers.length,d=!1,f="",u=t.debug(r,"core"),g=!0;""===f&&g;)(l=a[++i])&&i<50?l.className.indexOf(t.cssIgnoreRow)<0&&(d=a[i].cells[s],f=t.getElementText(r,d,s),n=e(d),u&&console.log("Checking if value was empty on row "+i+", column: "+s+': "'+f+'"')):g=!1;for(;--c>=0;)if((o=t.parsers[c])&&"text"!==o.id&&o.is&&o.is(f,r.table,d,n))return o;return t.getParserById("text")},getElementText:function(r,a,i){if(!a)return"";var s,o=r.textExtraction||"",n=a.jquery?a:e(a);return"string"==typeof o?"basic"===o&&void 0!==(s=n.attr(r.textAttribute))?e.trim(s):e.trim(a.textContent||n.text()):"function"==typeof o?e.trim(o(n[0],r.table,i)):"function"==typeof(s=t.getColumnData(r.table,o,i))?e.trim(s(n[0],r.table,i)):e.trim(n[0].textContent||n.text())},getParsedText:function(e,r,a,i){void 0===i&&(i=t.getElementText(e,r,a));var s=""+i,o=e.parsers[a],n=e.extractors[a];return o&&(n&&"function"==typeof n.format&&(i=n.format(i,e.table,r,a)),s="no-parser"===o.id?"":o.format(""+i,e.table,r,a),e.ignoreCase&&"string"==typeof s&&(s=s.toLowerCase())),s},buildCache:function(r,a,i){var s,o,n,l,c,d,f,u,g,p,h,m,b,y,v,w,x,C,_,$,S,z,F=r.table,R=r.parsers,T=t.debug(r,"core");if(r.$tbodies=r.$table.children("tbody:not(."+r.cssInfoBlock+")"),f=void 0===i?r.$tbodies:i,r.cache={},r.totalRows=0,!R)return T?console.warn("Warning: *Empty table!* Not building a cache"):"";for(T&&(m=new Date),r.showProcessing&&t.isProcessing(F,!0),d=0;d<f.length;d++){for(w=[],s=r.cache[d]={normalized:[]},b=f[d]&&f[d].rows.length||0,l=0;l<b;++l)if(y={child:[],raw:[]},u=e(f[d].rows[l]),g=[],!u.hasClass(r.selectorRemove.slice(1)))if(u.hasClass(r.cssChildRow)&&0!==l)for(S=s.normalized.length-1,(v=s.normalized[S][r.columns]).$row=v.$row.add(u),u.prev().hasClass(r.cssChildRow)||u.prev().addClass(t.css.cssHasChild),p=u.children("th, td"),S=v.child.length,v.child[S]=[],C=0,$=r.columns,c=0;c<$;c++)(h=p[c])&&(v.child[S][c]=t.getParsedText(r,h,c),(x=p[c].colSpan-1)>0&&(C+=x,$+=x)),C++;else{for(y.$row=u,y.order=l,C=0,$=r.columns,c=0;c<$;++c){if((h=u[0].cells[c])&&C<r.columns&&(!(_=void 0!==R[C])&&T&&console.warn("No parser found for row: "+l+", column: "+c+'; cell containing: "'+e(h).text()+'"; does it have a header?'),o=t.getElementText(r,h,C),y.raw[C]=o,n=t.getParsedText(r,h,C,o),g[C]=n,_&&"numeric"===(R[C].type||"").toLowerCase()&&(w[C]=Math.max(Math.abs(n)||0,w[C]||0)),(x=h.colSpan-1)>0)){for(z=0;z<=x;)n=r.duplicateSpan||0===z?o:"string"!=typeof r.textExtraction?t.getElementText(r,h,C+z)||"":"",y.raw[C+z]=n,g[C+z]=n,z++;C+=x,$+=x}C++}g[r.columns]=y,s.normalized[s.normalized.length]=g}s.colMax=w,r.totalRows+=s.normalized.length}if(r.showProcessing&&t.isProcessing(F),T){for(S=Math.min(5,r.cache[0].normalized.length),console[console.group?"group":"log"]("Building cache for "+r.totalRows+" rows (showing "+S+" rows in log) and "+r.columns+" columns"+t.benchmark(m)),o={},c=0;c<r.columns;c++)for(C=0;C<S;C++)o["row: "+C]||(o["row: "+C]={}),o["row: "+C][r.$headerIndexed[c].text()]=r.cache[0].normalized[C][c];console[console.table?"table":"log"](o),console.groupEnd&&console.groupEnd()}e.isFunction(a)&&a(F)},getColumnText:function(r,a,i,s){var o,n,l,c,d,f,u,g,p,h,m="function"==typeof i,b="all"===a,y={raw:[],parsed:[],$cell:[]},v=(r=e(r)[0]).config;if(!t.isEmptyObject(v)){for(d=v.$tbodies.length,o=0;o<d;o++)for(f=(l=v.cache[o].normalized).length,n=0;n<f;n++)c=l[n],s&&!c[v.columns].$row.is(s)||(h=!0,g=b?c.slice(0,v.columns):c[a],c=c[v.columns],u=b?c.raw:c.raw[a],p=b?c.$row.children():c.$row.children().eq(a),m&&(h=i({tbodyIndex:o,rowIndex:n,parsed:g,raw:u,$row:c.$row,$cell:p})),!1!==h&&(y.parsed[y.parsed.length]=g,y.raw[y.raw.length]=u,y.$cell[y.$cell.length]=p));return y}t.debug(v,"core")&&console.warn("No cache found - aborting getColumnText function!")},setHeadersCss:function(r){var a,i,s=r.sortList,o=s.length,n=t.css.sortNone+" "+r.cssNone,l=[t.css.sortAsc+" "+r.cssAsc,t.css.sortDesc+" "+r.cssDesc],c=[r.cssIconAsc,r.cssIconDesc,r.cssIconNone],d=["ascending","descending"],f=function(e,r){e.removeClass(n).addClass(l[r]).attr("aria-sort",d[r]).find("."+t.css.icon).removeClass(c[2]).addClass(c[r])},u=r.$table.find("tfoot tr").children("td, th").add(e(r.namespace+"_extra_headers")).removeClass(l.join(" ")),g=r.$headers.add(e("thead "+r.namespace+"_extra_headers")).removeClass(l.join(" ")).addClass(n).attr("aria-sort","none").find("."+t.css.icon).removeClass(c.join(" ")).end();for(g.not(".sorter-false").find("."+t.css.icon).addClass(c[2]),r.cssIconDisabled&&g.filter(".sorter-false").find("."+t.css.icon).addClass(r.cssIconDisabled),a=0;a<o;a++)if(2!==s[a][1]){if(g=r.$headers.filter(function(e){for(var a=!0,i=r.$headers.eq(e),s=parseInt(i.attr("data-column"),10),o=s+t.getClosest(i,"th, td")[0].colSpan;s<o;s++)a=!!a&&(a||t.isValueInArray(s,r.sortList)>-1);return a}),(g=g.not(".sorter-false").filter('[data-column="'+s[a][0]+'"]'+(1===o?":last":""))).length)for(i=0;i<g.length;i++)g[i].sortDisabled||f(g.eq(i),s[a][1]);u.length&&f(u.filter('[data-column="'+s[a][0]+'"]'),s[a][1])}for(o=r.$headers.length,a=0;a<o;a++)t.setColumnAriaLabel(r,r.$headers.eq(a))},getClosest:function(t,r){return e.fn.closest?t.closest(r):t.is(r)?t:t.parents(r).filter(":first")},setColumnAriaLabel:function(r,a,i){if(a.length){var s=parseInt(a.attr("data-column"),10),o=r.sortVars[s],n=a.hasClass(t.css.sortAsc)?"sortAsc":a.hasClass(t.css.sortDesc)?"sortDesc":"sortNone",l=e.trim(a.text())+": "+t.language[n];a.hasClass("sorter-false")||!1===i?l+=t.language.sortDisabled:(n=(o.count+1)%o.order.length,i=o.order[n],l+=t.language[0===i?"nextAsc":1===i?"nextDesc":"nextNone"]),a.attr("aria-label",l)}},updateHeader:function(e){var r,a,i,s,o=e.table,n=e.$headers.length;for(r=0;r<n;r++)i=e.$headers.eq(r),s=t.getColumnData(o,e.headers,r,!0),a="false"===t.getData(i,s,"sorter")||"false"===t.getData(i,s,"parser"),t.setColumnSort(e,i,a)},setColumnSort:function(e,t,r){var a=e.table.id;t[0].sortDisabled=r,t[r?"addClass":"removeClass"]("sorter-false").attr("aria-disabled",""+r),e.tabIndex&&(r?t.removeAttr("tabindex"):t.attr("tabindex","0")),a&&(r?t.removeAttr("aria-controls"):t.attr("aria-controls",a))},updateHeaderSortCount:function(r,a){var i,s,o,n,l,c,d,f,u=a||r.sortList,g=u.length;for(r.sortList=[],n=0;n<g;n++)if(d=u[n],(i=parseInt(d[0],10))<r.columns){switch(r.sortVars[i].order||(f=t.getOrder(r.sortInitialOrder)?r.sortReset?[1,0,2]:[1,0]:r.sortReset?[0,1,2]:[0,1],r.sortVars[i].order=f,r.sortVars[i].count=0),f=r.sortVars[i].order,s=(""+d[1]).match(/^(1|d|s|o|n)/),s=s?s[0]:""){case"1":case"d":s=1;break;case"s":s=l||0;break;case"o":s=0===(c=f[(l||0)%f.length])?1:1===c?0:2;break;case"n":s=f[++r.sortVars[i].count%f.length];break;default:s=0}l=0===n?s:l,o=[i,parseInt(s,10)||0],r.sortList[r.sortList.length]=o,s=e.inArray(o[1],f),r.sortVars[i].count=s>=0?s:o[1]%f.length}},updateAll:function(e,r,a){var i=e.table;i.isUpdating=!0,t.refreshWidgets(i,!0,!0),t.buildHeaders(e),t.bindEvents(i,e.$headers,!0),t.bindMethods(e),t.commonUpdate(e,r,a)},update:function(e,r,a){e.table.isUpdating=!0,t.updateHeader(e),t.commonUpdate(e,r,a)},updateHeaders:function(e,r){e.table.isUpdating=!0,t.buildHeaders(e),t.bindEvents(e.table,e.$headers,!0),t.resortComplete(e,r)},updateCell:function(r,a,i,s){if(e(a).closest("tr").hasClass(r.cssChildRow))console.warn('Tablesorter Warning! "updateCell" for child row content has been disabled, use "update" instead');else{if(t.isEmptyObject(r.cache))return t.updateHeader(r),void t.commonUpdate(r,i,s);r.table.isUpdating=!0,r.$table.find(r.selectorRemove).remove();var o,n,l,c,d,f,u=r.$tbodies,g=e(a),p=u.index(t.getClosest(g,"tbody")),h=r.cache[p],m=t.getClosest(g,"tr");if(a=g[0],u.length&&p>=0){if(l=u.eq(p).find("tr").not("."+r.cssChildRow).index(m),d=h.normalized[l],(f=m[0].cells.length)!==r.columns)for(c=0,o=!1,n=0;n<f;n++)o||m[0].cells[n]===a?o=!0:c+=m[0].cells[n].colSpan;else c=g.index();o=t.getElementText(r,a,c),d[r.columns].raw[c]=o,o=t.getParsedText(r,a,c,o),d[c]=o,"numeric"===(r.parsers[c].type||"").toLowerCase()&&(h.colMax[c]=Math.max(Math.abs(o)||0,h.colMax[c]||0)),!1!==(o="undefined"!==i?i:r.resort)?t.checkResort(r,o,s):t.resortComplete(r,s)}else t.debug(r,"core")&&console.error("updateCell aborted, tbody missing or not within the indicated table"),r.table.isUpdating=!1}},addRows:function(r,a,i,s){var o,n,l,c,d,f,u,g,p,h,m,b,y,v="string"==typeof a&&1===r.$tbodies.length&&/<tr/.test(a||""),w=r.table;if(v)a=e(a),r.$tbodies.append(a);else if(!(a&&a instanceof e&&t.getClosest(a,"table")[0]===r.table))return t.debug(r,"core")&&console.error("addRows method requires (1) a jQuery selector reference to rows that have already been added to the table, or (2) row HTML string to be added to a table with only one tbody"),!1;if(w.isUpdating=!0,t.isEmptyObject(r.cache))t.updateHeader(r),t.commonUpdate(r,i,s);else{for(d=a.filter("tr").attr("role","row").length,l=r.$tbodies.index(a.parents("tbody").filter(":first")),r.parsers&&r.parsers.length||t.setupParsers(r),c=0;c<d;c++){for(p=0,u=a[c].cells.length,g=r.cache[l].normalized.length,m=[],h={child:[],raw:[],$row:a.eq(c),order:g},f=0;f<u;f++)b=a[c].cells[f],o=t.getElementText(r,b,p),h.raw[p]=o,n=t.getParsedText(r,b,p,o),m[p]=n,"numeric"===(r.parsers[p].type||"").toLowerCase()&&(r.cache[l].colMax[p]=Math.max(Math.abs(n)||0,r.cache[l].colMax[p]||0)),(y=b.colSpan-1)>0&&(p+=y),p++;m[r.columns]=h,r.cache[l].normalized[g]=m}t.checkResort(r,i,s)}},updateCache:function(e,r,a){e.parsers&&e.parsers.length||t.setupParsers(e,a),t.buildCache(e,r,a)},appendCache:function(e,r){var a,i,s,o,n,l,c,d=e.table,f=e.$tbodies,u=[],g=e.cache;if(t.isEmptyObject(g))return e.appender?e.appender(d,u):d.isUpdating?e.$table.triggerHandler("updateComplete",d):"";for(t.debug(e,"core")&&(c=new Date),l=0;l<f.length;l++)if((s=f.eq(l)).length){for(o=t.processTbody(d,s,!0),i=(a=g[l].normalized).length,n=0;n<i;n++)u[u.length]=a[n][e.columns].$row,e.appender&&(!e.pager||e.pager.removeRows||e.pager.ajax)||o.append(a[n][e.columns].$row);t.processTbody(d,o,!1)}e.appender&&e.appender(d,u),t.debug(e,"core")&&console.log("Rebuilt table"+t.benchmark(c)),r||e.appender||t.applyWidget(d),d.isUpdating&&e.$table.triggerHandler("updateComplete",d)},commonUpdate:function(e,r,a){e.$table.find(e.selectorRemove).remove(),t.setupParsers(e),t.buildCache(e),t.checkResort(e,r,a)},initSort:function(r,a,i){if(r.table.isUpdating)return setTimeout(function(){t.initSort(r,a,i)},50);var s,o,n,l,c,d,f,u=!i[r.sortMultiSortKey],g=r.table,p=r.$headers.length,h=t.getClosest(e(a),"th, td"),m=parseInt(h.attr("data-column"),10),b=r.sortVars[m].order;if(h=h[0],r.$table.triggerHandler("sortStart",g),d=(r.sortVars[m].count+1)%b.length,r.sortVars[m].count=i[r.sortResetKey]?2:d,r.sortRestart)for(n=0;n<p;n++)f=r.$headers.eq(n),m!==(d=parseInt(f.attr("data-column"),10))&&(u||f.hasClass(t.css.sortNone))&&(r.sortVars[d].count=-1);if(u){if(r.sortList=[],r.last.sortList=[],null!==r.sortForce)for(s=r.sortForce,o=0;o<s.length;o++)s[o][0]!==m&&(r.sortList[r.sortList.length]=s[o]);if((l=b[r.sortVars[m].count])<2&&(r.sortList[r.sortList.length]=[m,l],h.colSpan>1))for(o=1;o<h.colSpan;o++)r.sortList[r.sortList.length]=[m+o,l],r.sortVars[m+o].count=e.inArray(l,b)}else if(r.sortList=e.extend([],r.last.sortList),t.isValueInArray(m,r.sortList)>=0)for(o=0;o<r.sortList.length;o++)(d=r.sortList[o])[0]===m&&(d[1]=b[r.sortVars[m].count],2===d[1]&&(r.sortList.splice(o,1),r.sortVars[m].count=-1));else if((l=b[r.sortVars[m].count])<2&&(r.sortList[r.sortList.length]=[m,l],h.colSpan>1))for(o=1;o<h.colSpan;o++)r.sortList[r.sortList.length]=[m+o,l],r.sortVars[m+o].count=e.inArray(l,b);if(r.last.sortList=e.extend([],r.sortList),r.sortList.length&&r.sortAppend&&(s=e.isArray(r.sortAppend)?r.sortAppend:r.sortAppend[r.sortList[0][0]],!t.isEmptyObject(s)))for(o=0;o<s.length;o++)if(s[o][0]!==m&&t.isValueInArray(s[o][0],r.sortList)<0){if(l=s[o][1],c=(""+l).match(/^(a|d|s|o|n)/))switch(d=r.sortList[0][1],c[0]){case"d":l=1;break;case"s":l=d;break;case"o":l=0===d?1:0;break;case"n":l=(d+1)%b.length;break;default:l=0}r.sortList[r.sortList.length]=[s[o][0],l]}r.$table.triggerHandler("sortBegin",g),setTimeout(function(){t.setHeadersCss(r),t.multisort(r),t.appendCache(r),r.$table.triggerHandler("sortBeforeEnd",g),r.$table.triggerHandler("sortEnd",g)},1)},multisort:function(e){var r,a,i,s,o=e.table,n=[],l=0,c=e.textSorter||"",d=e.sortList,f=d.length,u=e.$tbodies.length;if(!e.serverSideSorting&&!t.isEmptyObject(e.cache)){if(t.debug(e,"core")&&(a=new Date),"object"==typeof c)for(i=e.columns;i--;)"function"==typeof(s=t.getColumnData(o,c,i))&&(n[i]=s);for(r=0;r<u;r++)i=e.cache[r].colMax,e.cache[r].normalized.sort(function(r,a){var s,u,g,p,h,m,b;for(s=0;s<f;s++){if(g=d[s][0],p=d[s][1],l=0===p,e.sortStable&&r[g]===a[g]&&1===f)return r[e.columns].order-a[e.columns].order;if(u=/n/i.test(t.getSortType(e.parsers,g)),u&&e.strings[g]?(u="boolean"==typeof t.string[e.strings[g]]?(l?1:-1)*(t.string[e.strings[g]]?-1:1):e.strings[g]?t.string[e.strings[g]]||0:0,h=e.numberSorter?e.numberSorter(r[g],a[g],l,i[g],o):t["sortNumeric"+(l?"Asc":"Desc")](r[g],a[g],u,i[g],g,e)):(m=l?r:a,b=l?a:r,h="function"==typeof c?c(m[g],b[g],l,g,o):"function"==typeof n[g]?n[g](m[g],b[g],l,g,o):t["sortNatural"+(l?"Asc":"Desc")](r[g],a[g],g,e)),h)return h}return r[e.columns].order-a[e.columns].order});t.debug(e,"core")&&console.log("Applying sort "+d.toString()+t.benchmark(a))}},resortComplete:function(t,r){t.table.isUpdating&&t.$table.triggerHandler("updateComplete",t.table),e.isFunction(r)&&r(t.table)},checkResort:function(r,a,i){var s=e.isArray(a)?a:r.sortList;!1===(void 0===a?r.resort:a)||r.serverSideSorting||r.table.isProcessing?(t.resortComplete(r,i),t.applyWidget(r.table,!1)):s.length?t.sortOn(r,s,function(){t.resortComplete(r,i)},!0):t.sortReset(r,function(){t.resortComplete(r,i),t.applyWidget(r.table,!1)})},sortOn:function(r,a,i,s){var o=r.table;r.$table.triggerHandler("sortStart",o),t.updateHeaderSortCount(r,a),t.setHeadersCss(r),r.delayInit&&t.isEmptyObject(r.cache)&&t.buildCache(r),r.$table.triggerHandler("sortBegin",o),t.multisort(r),t.appendCache(r,s),r.$table.triggerHandler("sortBeforeEnd",o),r.$table.triggerHandler("sortEnd",o),t.applyWidget(o),e.isFunction(i)&&i(o)},sortReset:function(r,a){r.sortList=[],t.setHeadersCss(r),t.multisort(r),t.appendCache(r);var i;for(i=0;i<r.columns;i++)r.sortVars[i].count=-1;e.isFunction(a)&&a(r.table)},getSortType:function(e,t){return e&&e[t]?e[t].type||"":""},getOrder:function(e){return/^d/i.test(e)||1===e},sortNatural:function(e,r){if(e===r)return 0;e=e.toString(),r=r.toString();var a,i,s,o,n,l,c=t.regex;if(c.hex.test(r)){if(a=parseInt((e||"").match(c.hex),16),i=parseInt((r||"").match(c.hex),16),a<i)return-1;if(a>i)return 1}for(a=(e||"").replace(c.chunk,"\\0$1\\0").replace(c.chunks,"").split("\\0"),i=(r||"").replace(c.chunk,"\\0$1\\0").replace(c.chunks,"").split("\\0"),l=Math.max(a.length,i.length),n=0;n<l;n++){if(s=isNaN(a[n])?a[n]||0:parseFloat(a[n])||0,o=isNaN(i[n])?i[n]||0:parseFloat(i[n])||0,isNaN(s)!==isNaN(o))return isNaN(s)?1:-1;if(typeof s!=typeof o&&(s+="",o+=""),s<o)return-1;if(s>o)return 1}return 0},sortNaturalAsc:function(e,r,a,i){if(e===r)return 0;var s=t.string[i.empties[a]||i.emptyTo];return""===e&&0!==s?"boolean"==typeof s?s?-1:1:-s||-1:""===r&&0!==s?"boolean"==typeof s?s?1:-1:s||1:t.sortNatural(e,r)},sortNaturalDesc:function(e,r,a,i){if(e===r)return 0;var s=t.string[i.empties[a]||i.emptyTo];return""===e&&0!==s?"boolean"==typeof s?s?-1:1:s||1:""===r&&0!==s?"boolean"==typeof s?s?1:-1:-s||-1:t.sortNatural(r,e)},sortText:function(e,t){return e>t?1:e<t?-1:0},getTextValue:function(e,t,r){if(r){var a,i=e?e.length:0,s=r+t;for(a=0;a<i;a++)s+=e.charCodeAt(a);return t*s}return 0},sortNumericAsc:function(e,r,a,i,s,o){if(e===r)return 0;var n=t.string[o.empties[s]||o.emptyTo];return""===e&&0!==n?"boolean"==typeof n?n?-1:1:-n||-1:""===r&&0!==n?"boolean"==typeof n?n?1:-1:n||1:(isNaN(e)&&(e=t.getTextValue(e,a,i)),isNaN(r)&&(r=t.getTextValue(r,a,i)),e-r)},sortNumericDesc:function(e,r,a,i,s,o){if(e===r)return 0;var n=t.string[o.empties[s]||o.emptyTo];return""===e&&0!==n?"boolean"==typeof n?n?-1:1:n||1:""===r&&0!==n?"boolean"==typeof n?n?1:-1:-n||-1:(isNaN(e)&&(e=t.getTextValue(e,a,i)),isNaN(r)&&(r=t.getTextValue(r,a,i)),r-e)},sortNumeric:function(e,t){return e-t},addWidget:function(e){e.id&&!t.isEmptyObject(t.getWidgetById(e.id))&&console.warn('"'+e.id+'" widget was loaded more than once!'),t.widgets[t.widgets.length]=e},hasWidget:function(t,r){return(t=e(t)).length&&t[0].config&&t[0].config.widgetInit[r]||!1},getWidgetById:function(e){var r,a,i=t.widgets.length;for(r=0;r<i;r++)if((a=t.widgets[r])&&a.id&&a.id.toLowerCase()===e.toLowerCase())return a},applyWidgetOptions:function(r){var a,i,s,o=r.config,n=o.widgets.length;if(n)for(a=0;a<n;a++)(i=t.getWidgetById(o.widgets[a]))&&i.options&&(s=e.extend(!0,{},i.options),o.widgetOptions=e.extend(!0,s,o.widgetOptions),e.extend(!0,t.defaults.widgetOptions,i.options))},addWidgetFromClass:function(e){var r,a,i=e.config,s="^"+i.widgetClass.replace(t.regex.templateName,"(\\S+)+")+"$",o=new RegExp(s,"g"),n=(e.className||"").split(t.regex.spaces);if(n.length)for(r=n.length,a=0;a<r;a++)n[a].match(o)&&(i.widgets[i.widgets.length]=n[a].replace(o,"$1"))},applyWidgetId:function(r,a,i){var s,o,n,l=(r=e(r)[0]).config,c=l.widgetOptions,d=t.debug(l,"core"),f=t.getWidgetById(a);f&&(n=f.id,s=!1,e.inArray(n,l.widgets)<0&&(l.widgets[l.widgets.length]=n),d&&(o=new Date),!i&&l.widgetInit[n]||(l.widgetInit[n]=!0,r.hasInitialized&&t.applyWidgetOptions(r),"function"==typeof f.init&&(s=!0,d&&console[console.group?"group":"log"]("Initializing "+n+" widget"),f.init(r,f,l,c))),i||"function"!=typeof f.format||(s=!0,d&&console[console.group?"group":"log"]("Updating "+n+" widget"),f.format(r,l,c,!1)),d&&s&&(console.log("Completed "+(i?"initializing ":"applying ")+n+" widget"+t.benchmark(o)),console.groupEnd&&console.groupEnd()))},applyWidget:function(r,a,i){var s,o,n,l,c,d=(r=e(r)[0]).config,f=t.debug(d,"core"),u=[];if(!1===a||!r.hasInitialized||!r.isApplyingWidgets&&!r.isUpdating){if(f&&(c=new Date),t.addWidgetFromClass(r),clearTimeout(d.timerReady),d.widgets.length){for(r.isApplyingWidgets=!0,d.widgets=e.grep(d.widgets,function(t,r){return e.inArray(t,d.widgets)===r}),o=(n=d.widgets||[]).length,s=0;s<o;s++)(l=t.getWidgetById(n[s]))&&l.id?(l.priority||(l.priority=10),u[s]=l):f&&console.warn('"'+n[s]+'" was enabled, but the widget code has not been loaded!');for(u.sort(function(e,t){return e.priority<t.priority?-1:e.priority===t.priority?0:1}),o=u.length,f&&console[console.group?"group":"log"]("Start "+(a?"initializing":"applying")+" widgets"),s=0;s<o;s++)(l=u[s])&&l.id&&t.applyWidgetId(r,l.id,a);f&&console.groupEnd&&console.groupEnd()}d.timerReady=setTimeout(function(){r.isApplyingWidgets=!1,e.data(r,"lastWidgetApplication",new Date),d.$table.triggerHandler("tablesorter-ready"),a||"function"!=typeof i||i(r),f&&(l=d.widgets.length,console.log("Completed "+(!0===a?"initializing ":"applying ")+l+" widget"+(1!==l?"s":"")+t.benchmark(c)))},10)}},removeWidget:function(r,a,i){var s,o,n,l,c=(r=e(r)[0]).config;if(!0===a)for(a=[],l=t.widgets.length,n=0;n<l;n++)(o=t.widgets[n])&&o.id&&(a[a.length]=o.id);else a=(e.isArray(a)?a.join(","):a||"").toLowerCase().split(/[\s,]+/);for(l=a.length,s=0;s<l;s++)o=t.getWidgetById(a[s]),(n=e.inArray(a[s],c.widgets))>=0&&!0!==i&&c.widgets.splice(n,1),o&&o.remove&&(t.debug(c,"core")&&console.log((i?"Refreshing":"Removing")+' "'+a[s]+'" widget'),o.remove(r,c,c.widgetOptions,i),c.widgetInit[a[s]]=!1);c.$table.triggerHandler("widgetRemoveEnd",r)},refreshWidgets:function(r,a,i){var s,o,n=(r=e(r)[0]).config.widgets,l=t.widgets,c=l.length,d=[],f=function(t){e(t).triggerHandler("refreshComplete")};for(s=0;s<c;s++)(o=l[s])&&o.id&&(a||e.inArray(o.id,n)<0)&&(d[d.length]=o.id);t.removeWidget(r,d.join(","),!0),!0!==i?(t.applyWidget(r,a||!1,f),a&&t.applyWidget(r,!1,f)):f(r)},benchmark:function(e){return" ("+((new Date).getTime()-e.getTime())+" ms)"},log:function(){console.log(arguments)},debug:function(e,t){return e&&(!0===e.debug||"string"==typeof e.debug&&e.debug.indexOf(t)>-1)},isEmptyObject:function(e){for(var t in e)return!1;return!0},isValueInArray:function(e,t){var r,a=t&&t.length||0;for(r=0;r<a;r++)if(t[r][0]===e)return r;return-1},formatFloat:function(r,a){if("string"!=typeof r||""===r)return r;var i;return r=(a&&a.config?!1!==a.config.usNumberFormat:void 0===a||a)?r.replace(t.regex.comma,""):r.replace(t.regex.digitNonUS,"").replace(t.regex.comma,"."),t.regex.digitNegativeTest.test(r)&&(r=r.replace(t.regex.digitNegativeReplace,"-$1")),i=parseFloat(r),isNaN(i)?e.trim(r):i},isDigit:function(e){return isNaN(e)?t.regex.digitTest.test(e.toString().replace(t.regex.digitReplace,"")):""!==e},computeColumnIndex:function(r,a){var i,s,o,n,l,c,d,f,u,g,p=a&&a.columns||0,h=[],m=new Array(p);for(i=0;i<r.length;i++)for(c=r[i].cells,s=0;s<c.length;s++){for(d=i,f=(l=c[s]).rowSpan||1,u=l.colSpan||1,void 0===h[d]&&(h[d]=[]),o=0;o<h[d].length+1;o++)if(void 0===h[d][o]){g=o;break}for(p&&l.cellIndex===g||(l.setAttribute?l.setAttribute("data-column",g):e(l).attr("data-column",g)),o=d;o<d+f;o++)for(void 0===h[o]&&(h[o]=[]),m=h[o],n=g;n<g+u;n++)m[n]="x"}return t.checkColumnCount(r,h,m.length),m.length},checkColumnCount:function(e,t,r){var a,i,s=!0,o=[];for(a=0;a<t.length;a++)if(t[a]&&(i=t[a].length,t[a].length!==r)){s=!1;break}s||(e.each(function(e,t){var r=t.parentElement.nodeName;o.indexOf(r)<0&&o.push(r)}),console.error("Invalid or incorrect number of columns in the "+o.join(" or ")+"; expected "+r+", but found "+i+" columns"))},fixColumnWidth:function(r){var a,i,s,o,n,l=(r=e(r)[0]).config,c=l.$table.children("colgroup");if(c.length&&c.hasClass(t.css.colgroup)&&c.remove(),l.widthFixed&&0===l.$table.children("colgroup").length){for(c=e('<colgroup class="'+t.css.colgroup+'">'),a=l.$table.width(),o=(s=l.$tbodies.find("tr:first").children(":visible")).length,n=0;n<o;n++)i=parseInt(s.eq(n).width()/a*1e3,10)/10+"%",c.append(e("<col>").css("width",i));l.$table.prepend(c)}},getData:function(t,r,a){var i,s,o="",n=e(t);return n.length?(i=!!e.metadata&&n.metadata(),s=" "+(n.attr("class")||""),void 0!==n.data(a)||void 0!==n.data(a.toLowerCase())?o+=n.data(a)||n.data(a.toLowerCase()):i&&void 0!==i[a]?o+=i[a]:r&&void 0!==r[a]?o+=r[a]:" "!==s&&s.match(" "+a+"-")&&(o=s.match(new RegExp("\\s"+a+"-([\\w-]+)"))[1]||""),e.trim(o)):""},getColumnData:function(t,r,a,i,s){if("object"!=typeof r||null===r)return r;var o,n=(t=e(t)[0]).config,l=s||n.$headers,c=n.$headerIndexed&&n.$headerIndexed[a]||l.find('[data-column="'+a+'"]:last');if(void 0!==r[a])return i?r[a]:r[l.index(c)];for(o in r)if("string"==typeof o&&c.filter(o).add(c.find(o)).length)return r[o]},isProcessing:function(r,a,i){var s=(r=e(r))[0].config,o=i||r.find("."+t.css.header);a?(void 0!==i&&s.sortList.length>0&&(o=o.filter(function(){return!this.sortDisabled&&t.isValueInArray(parseFloat(e(this).attr("data-column")),s.sortList)>=0})),r.add(o).addClass(t.css.processing+" "+s.cssProcessing)):r.add(o).removeClass(t.css.processing+" "+s.cssProcessing)},processTbody:function(t,r,a){if(t=e(t)[0],a)return t.isProcessing=!0,r.before('<colgroup class="tablesorter-savemyplace"/>'),e.fn.detach?r.detach():r.remove();var i=e(t).find("colgroup.tablesorter-savemyplace");r.insertAfter(i),i.remove(),t.isProcessing=!1},clearTableBody:function(t){e(t)[0].config.$tbodies.children().detach()},characterEquivalents:{a:"áàâãäąå",A:"ÁÀÂÃÄĄÅ",c:"çćč",C:"ÇĆČ",e:"éèêëěę",E:"ÉÈÊËĚĘ",i:"íìİîïı",I:"ÍÌİÎÏ",o:"óòôõöō",O:"ÓÒÔÕÖŌ",ss:"ß",SS:"ẞ",u:"úùûüů",U:"ÚÙÛÜŮ"},replaceAccents:function(e){var r,a="[",i=t.characterEquivalents;if(!t.characterRegex){t.characterRegexArray={};for(r in i)"string"==typeof r&&(a+=i[r],t.characterRegexArray[r]=new RegExp("["+i[r]+"]","g"));t.characterRegex=new RegExp(a+"]")}if(t.characterRegex.test(e))for(r in i)"string"==typeof r&&(e=e.replace(t.characterRegexArray[r],r));return e},validateOptions:function(r){var a,i,s,o,n="headers sortForce sortList sortAppend widgets".split(" "),l=r.originalSettings;if(l){t.debug(r,"core")&&(o=new Date);for(a in l)if("undefined"===(s=typeof t.defaults[a]))console.warn('Tablesorter Warning! "table.config.'+a+'" option not recognized');else if("object"===s)for(i in l[a])s=t.defaults[a]&&typeof t.defaults[a][i],e.inArray(a,n)<0&&"undefined"===s&&console.warn('Tablesorter Warning! "table.config.'+a+"."+i+'" option not recognized');t.debug(r,"core")&&console.log("validate options time:"+t.benchmark(o))}},restoreHeaders:function(r){var a,i,s=e(r)[0].config,o=s.$table.find(s.selectorHeaders),n=o.length;for(a=0;a<n;a++)(i=o.eq(a)).find("."+t.css.headerIn).length&&i.html(s.headerContent[a])},destroy:function(r,a,i){if((r=e(r)[0]).hasInitialized){t.removeWidget(r,!0,!1);var s,o=e(r),n=r.config,l=o.find("thead:first"),c=l.find("tr."+t.css.headerRow).removeClass(t.css.headerRow+" "+n.cssHeaderRow),d=o.find("tfoot:first > tr").children("th, td");!1===a&&e.inArray("uitheme",n.widgets)>=0&&(o.triggerHandler("applyWidgetId",["uitheme"]),o.triggerHandler("applyWidgetId",["zebra"])),l.find("tr").not(c).remove(),s="sortReset update updateRows updateAll updateHeaders updateCell addRows updateComplete sorton appendCache updateCache applyWidgetId applyWidgets refreshWidgets removeWidget destroy mouseup mouseleave "+"keypress sortBegin sortEnd resetToLoadState ".split(" ").join(n.namespace+" "),o.removeData("tablesorter").unbind(s.replace(t.regex.spaces," ")),n.$headers.add(d).removeClass([t.css.header,n.cssHeader,n.cssAsc,n.cssDesc,t.css.sortAsc,t.css.sortDesc,t.css.sortNone].join(" ")).removeAttr("data-column").removeAttr("aria-label").attr("aria-disabled","true"),c.find(n.selectorSort).unbind("mousedown mouseup keypress ".split(" ").join(n.namespace+" ").replace(t.regex.spaces," ")),t.restoreHeaders(r),o.toggleClass(t.css.table+" "+n.tableClass+" tablesorter-"+n.theme,!1===a),o.removeClass(n.namespace.slice(1)),r.hasInitialized=!1,delete r.config.cache,"function"==typeof i&&i(r),t.debug(n,"core")&&console.log("tablesorter has been removed")}}};e.fn.tablesorter=function(r){return this.each(function(){var a=this,i=e.extend(!0,{},t.defaults,r,t.instanceMethods);i.originalSettings=r,!a.hasInitialized&&t.buildTable&&"TABLE"!==this.nodeName?t.buildTable(a,i):t.setup(a,i)})},window.console&&window.console.log||(t.logs=[],console={},console.log=console.warn=console.error=console.table=function(){var e=arguments.length>1?arguments:arguments[0];t.logs[t.logs.length]={date:Date.now(),log:e}}),t.addParser({id:"no-parser",is:function(){return!1},format:function(){return""},type:"text"}),t.addParser({id:"text",is:function(){return!0},format:function(r,a){var i=a.config;return r&&(r=e.trim(i.ignoreCase?r.toLocaleLowerCase():r),r=i.sortLocaleCompare?t.replaceAccents(r):r),r},type:"text"}),t.regex.nondigit=/[^\w,. \-()]/g,t.addParser({id:"digit",is:function(e){return t.isDigit(e)},format:function(r,a){var i=t.formatFloat((r||"").replace(t.regex.nondigit,""),a);return r&&"number"==typeof i?i:r?e.trim(r&&a.config.ignoreCase?r.toLocaleLowerCase():r):r},type:"numeric"}),t.regex.currencyReplace=/[+\-,. ]/g,t.regex.currencyTest=/^\(?\d+[\u00a3$\u20ac\u00a4\u00a5\u00a2?.]|[\u00a3$\u20ac\u00a4\u00a5\u00a2?.]\d+\)?$/,t.addParser({id:"currency",is:function(e){return e=(e||"").replace(t.regex.currencyReplace,""),t.regex.currencyTest.test(e)},format:function(r,a){var i=t.formatFloat((r||"").replace(t.regex.nondigit,""),a);return r&&"number"==typeof i?i:r?e.trim(r&&a.config.ignoreCase?r.toLocaleLowerCase():r):r},type:"numeric"}),t.regex.urlProtocolTest=/^(https?|ftp|file):\/\//,t.regex.urlProtocolReplace=/(https?|ftp|file):\/\/(www\.)?/,t.addParser({id:"url",is:function(e){return t.regex.urlProtocolTest.test(e)},format:function(r){return r?e.trim(r.replace(t.regex.urlProtocolReplace,"")):r},type:"text"}),t.regex.dash=/-/g,t.regex.isoDate=/^\d{4}[\/\-]\d{1,2}[\/\-]\d{1,2}/,t.addParser({id:"isoDate",is:function(e){return t.regex.isoDate.test(e)},format:function(e){var r=e?new Date(e.replace(t.regex.dash,"/")):e;return r instanceof Date&&isFinite(r)?r.getTime():e},type:"numeric"}),t.regex.percent=/%/g,t.regex.percentTest=/(\d\s*?%|%\s*?\d)/,t.addParser({id:"percent",is:function(e){return t.regex.percentTest.test(e)&&e.length<15},format:function(e,r){return e?t.formatFloat(e.replace(t.regex.percent,""),r):e},type:"numeric"}),t.addParser({id:"image",is:function(e,t,r,a){return a.find("img").length>0},format:function(t,r,a){return e(a).find("img").attr(r.config.imgAttr||"alt")||t},parsed:!0,type:"text"}),t.regex.dateReplace=/(\S)([AP]M)$/i,t.regex.usLongDateTest1=/^[A-Z]{3,10}\.?\s+\d{1,2},?\s+(\d{4})(\s+\d{1,2}:\d{2}(:\d{2})?(\s+[AP]M)?)?$/i,t.regex.usLongDateTest2=/^\d{1,2}\s+[A-Z]{3,10}\s+\d{4}/i,t.addParser({id:"usLongDate",is:function(e){return t.regex.usLongDateTest1.test(e)||t.regex.usLongDateTest2.test(e)},format:function(e){var r=e?new Date(e.replace(t.regex.dateReplace,"$1 $2")):e;return r instanceof Date&&isFinite(r)?r.getTime():e},type:"numeric"}),t.regex.shortDateTest=/(^\d{1,2}[\/\s]\d{1,2}[\/\s]\d{4})|(^\d{4}[\/\s]\d{1,2}[\/\s]\d{1,2})/,t.regex.shortDateReplace=/[\-.,]/g,t.regex.shortDateXXY=/(\d{1,2})[\/\s](\d{1,2})[\/\s](\d{4})/,t.regex.shortDateYMD=/(\d{4})[\/\s](\d{1,2})[\/\s](\d{1,2})/,t.convertFormat=function(e,r){e=(e||"").replace(t.regex.spaces," ").replace(t.regex.shortDateReplace,"/"),"mmddyyyy"===r?e=e.replace(t.regex.shortDateXXY,"$3/$1/$2"):"ddmmyyyy"===r?e=e.replace(t.regex.shortDateXXY,"$3/$2/$1"):"yyyymmdd"===r&&(e=e.replace(t.regex.shortDateYMD,"$1/$2/$3"));var a=new Date(e);return a instanceof Date&&isFinite(a)?a.getTime():""},t.addParser({id:"shortDate",is:function(e){return e=(e||"").replace(t.regex.spaces," ").replace(t.regex.shortDateReplace,"/"),t.regex.shortDateTest.test(e)},format:function(e,r,a,i){if(e){var s=r.config,o=s.$headerIndexed[i],n=o.length&&o.data("dateFormat")||t.getData(o,t.getColumnData(r,s.headers,i),"dateFormat")||s.dateFormat;return o.length&&o.data("dateFormat",n),t.convertFormat(e,n)||e}return e},type:"numeric"}),t.regex.timeTest=/^(0?[1-9]|1[0-2]):([0-5]\d)(\s[AP]M)$|^((?:[01]\d|[2][0-4]):[0-5]\d)$/i,t.regex.timeMatch=/(0?[1-9]|1[0-2]):([0-5]\d)(\s[AP]M)|((?:[01]\d|[2][0-4]):[0-5]\d)/i,t.addParser({id:"time",is:function(e){return t.regex.timeTest.test(e)},format:function(e){var r,a=(e||"").match(t.regex.timeMatch),i=new Date(e),s=e&&(null!==a?a[0]:"00:00 AM"),o=s?new Date("2000/01/01 "+s.replace(t.regex.dateReplace,"$1 $2")):s;return o instanceof Date&&isFinite(o)?(r=i instanceof Date&&isFinite(i)?i.getTime():0,r?parseFloat(o.getTime()+"."+i.getTime()):o.getTime()):e},type:"numeric"}),t.addParser({id:"metadata",is:function(){return!1},format:function(t,r,a){var i=r.config,s=i.parserMetadataName?i.parserMetadataName:"sortValue";return e(a).metadata()[s]},type:"numeric"}),t.addWidget({id:"zebra",priority:90,format:function(t,r,a){var i,s,o,n,l,c,d,f=new RegExp(r.cssChildRow,"i"),u=r.$tbodies.add(e(r.namespace+"_extra_table").children("tbody:not(."+r.cssInfoBlock+")"));for(l=0;l<u.length;l++)for(o=0,d=(i=u.eq(l).children("tr:visible").not(r.selectorRemove)).length,c=0;c<d;c++)s=i.eq(c),f.test(s[0].className)||o++,n=o%2==0,s.removeClass(a.zebra[n?1:0]).addClass(a.zebra[n?0:1])},remove:function(e,r,a,i){if(!i){var s,o,n=r.$tbodies,l=(a.zebra||["even","odd"]).join(" ");for(s=0;s<n.length;s++)(o=t.processTbody(e,n.eq(s),!0)).children().removeClass(l),t.processTbody(e,o,!1)}}})}(e),function(e,t,r){"use strict";var a=e.tablesorter||{};e.extend(!0,a.defaults,{fixedUrl:"",widgetOptions:{storage_fixedUrl:"",storage_group:"",storage_page:"",storage_storageType:"",storage_tableId:"",storage_useSessionStorage:""}}),a.storage=function(i,s,o,n){var l,c,d,f=!1,u={},g=(i=e(i)[0]).config,p=g&&g.widgetOptions,h=a.debug(g,"storage"),m=(n&&n.storageType||p&&p.storage_storageType).toString().charAt(0).toLowerCase(),b=m?"":n&&n.useSessionStorage||p&&p.storage_useSessionStorage,y=e(i),v=n&&n.id||y.attr(n&&n.group||p&&p.storage_group||"data-table-group")||p&&p.storage_tableId||i.id||e(".tablesorter").index(y),w=n&&n.url||y.attr(n&&n.page||p&&p.storage_page||"data-table-page")||p&&p.storage_fixedUrl||g&&g.fixedUrl||t.location.pathname;if("c"!==m&&(m="s"===m||b?"sessionStorage":"localStorage")in t)try{t[m].setItem("_tmptest","temp"),f=!0,t[m].removeItem("_tmptest")}catch(e){console.warn(m+" is not supported in this browser")}if(h&&console.log("Storage >> Using",f?m:"cookies"),e.parseJSON&&(f?u=e.parseJSON(t[m][s]||"null")||{}:(c=r.cookie.split(/[;\s|=]/),u=0!==(l=e.inArray(s,c)+1)?e.parseJSON(c[l]||"null")||{}:{})),void 0===o||!t.JSON||!JSON.hasOwnProperty("stringify"))return u&&u[w]?u[w][v]:"";u[w]||(u[w]={}),u[w][v]=o,f?t[m][s]=JSON.stringify(u):((d=new Date).setTime(d.getTime()+31536e6),r.cookie=s+"="+JSON.stringify(u).replace(/\"/g,'"')+"; expires="+d.toGMTString()+"; path=/")}}(e,window,document),function(e){"use strict";var t=e.tablesorter||{};t.themes={bootstrap:{table:"table table-bordered table-striped",caption:"caption",header:"bootstrap-header",sortNone:"",sortAsc:"",sortDesc:"",active:"",hover:"",icons:"",iconSortNone:"bootstrap-icon-unsorted",iconSortAsc:"glyphicon glyphicon-chevron-up",iconSortDesc:"glyphicon glyphicon-chevron-down",filterRow:"",footerRow:"",footerCells:"",even:"",odd:""},jui:{table:"ui-widget ui-widget-content ui-corner-all",caption:"ui-widget-content",header:"ui-widget-header ui-corner-all ui-state-default",sortNone:"",sortAsc:"",sortDesc:"",active:"ui-state-active",hover:"ui-state-hover",icons:"ui-icon",iconSortNone:"ui-icon-carat-2-n-s ui-icon-caret-2-n-s",iconSortAsc:"ui-icon-carat-1-n ui-icon-caret-1-n",iconSortDesc:"ui-icon-carat-1-s ui-icon-caret-1-s",filterRow:"",footerRow:"",footerCells:"",even:"ui-widget-content",odd:"ui-state-default"}},e.extend(t.css,{wrapper:"tablesorter-wrapper"}),t.addWidget({id:"uitheme",priority:10,format:function(r,a,i){var s,o,n,l,c,d,f,u,g,p,h,m,b,y=t.themes,v=a.$table.add(e(a.namespace+"_extra_table")),w=a.$headers.add(e(a.namespace+"_extra_headers")),x=a.theme||"jui",C=y[x]||{},_=e.trim([C.sortNone,C.sortDesc,C.sortAsc,C.active].join(" ")),$=e.trim([C.iconSortNone,C.iconSortDesc,C.iconSortAsc].join(" ")),S=t.debug(a,"uitheme");for(S&&(c=new Date),v.hasClass("tablesorter-"+x)&&a.theme===a.appliedTheme&&i.uitheme_applied||(i.uitheme_applied=!0,p=y[a.appliedTheme]||{},h=(b=!e.isEmptyObject(p))?[p.sortNone,p.sortDesc,p.sortAsc,p.active].join(" "):"",m=b?[p.iconSortNone,p.iconSortDesc,p.iconSortAsc].join(" "):"",b&&(i.zebra[0]=e.trim(" "+i.zebra[0].replace(" "+p.even,"")),i.zebra[1]=e.trim(" "+i.zebra[1].replace(" "+p.odd,"")),a.$tbodies.children().removeClass([p.even,p.odd].join(" "))),C.even&&(i.zebra[0]+=" "+C.even),C.odd&&(i.zebra[1]+=" "+C.odd),v.children("caption").removeClass(p.caption||"").addClass(C.caption),u=v.removeClass((a.appliedTheme?"tablesorter-"+(a.appliedTheme||""):"")+" "+(p.table||"")).addClass("tablesorter-"+x+" "+(C.table||"")).children("tfoot"),a.appliedTheme=a.theme,u.length&&u.children("tr").removeClass(p.footerRow||"").addClass(C.footerRow).children("th, td").removeClass(p.footerCells||"").addClass(C.footerCells),w.removeClass((b?[p.header,p.hover,h].join(" "):"")||"").addClass(C.header).not(".sorter-false").unbind("mouseenter.tsuitheme mouseleave.tsuitheme").bind("mouseenter.tsuitheme mouseleave.tsuitheme",function(t){e(this)["mouseenter"===t.type?"addClass":"removeClass"](C.hover||"")}),w.each(function(){var r=e(this);r.find("."+t.css.wrapper).length||r.wrapInner('<div class="'+t.css.wrapper+'" style="position:relative;height:100%;width:100%"></div>')}),a.cssIcon&&w.find("."+t.css.icon).removeClass(b?[p.icons,m].join(" "):"").addClass(C.icons||""),t.hasWidget(a.table,"filter")&&(o=function(){v.children("thead").children("."+t.css.filterRow).removeClass(b?p.filterRow||"":"").addClass(C.filterRow||"")},i.filter_initialized?o():v.one("filterInit",function(){o()}))),s=0;s<a.columns;s++)d=a.$headers.add(e(a.namespace+"_extra_headers")).not(".sorter-false").filter('[data-column="'+s+'"]'),f=t.css.icon?d.find("."+t.css.icon):e(),(g=w.not(".sorter-false").filter('[data-column="'+s+'"]:last')).length&&(d.removeClass(_),f.removeClass($),g[0].sortDisabled?f.removeClass(C.icons||""):(n=C.sortNone,l=C.iconSortNone,g.hasClass(t.css.sortAsc)?(n=[C.sortAsc,C.active].join(" "),l=C.iconSortAsc):g.hasClass(t.css.sortDesc)&&(n=[C.sortDesc,C.active].join(" "),l=C.iconSortDesc),d.addClass(n),f.addClass(l||"")));S&&console.log("uitheme >> Applied "+x+" theme"+t.benchmark(c))},remove:function(e,r,a,i){if(a.uitheme_applied){var s=r.$table,o=r.appliedTheme||"jui",n=t.themes[o]||t.themes.jui,l=s.children("thead").children(),c=n.sortNone+" "+n.sortDesc+" "+n.sortAsc,d=n.iconSortNone+" "+n.iconSortDesc+" "+n.iconSortAsc;s.removeClass("tablesorter-"+o+" "+n.table),a.uitheme_applied=!1,i||(s.find(t.css.header).removeClass(n.header),l.unbind("mouseenter.tsuitheme mouseleave.tsuitheme").removeClass(n.hover+" "+c+" "+n.active).filter("."+t.css.filterRow).removeClass(n.filterRow),l.find("."+t.css.icon).removeClass(n.icons+" "+d))}}})}(e),function(e){"use strict";var t=e.tablesorter||{};t.addWidget({id:"columns",priority:65,options:{columns:["primary","secondary","tertiary"]},format:function(r,a,i){var s,o,n,l,c,d,f,u,g=a.$table,p=a.$tbodies,h=a.sortList,m=h.length,b=i&&i.columns||["primary","secondary","tertiary"],y=b.length-1;for(f=b.join(" "),o=0;o<p.length;o++)(n=(s=t.processTbody(r,p.eq(o),!0)).children("tr")).each(function(){if(c=e(this),"none"!==this.style.display&&(d=c.children().removeClass(f),h&&h[0]&&(d.eq(h[0][0]).addClass(b[0]),m>1)))for(u=1;u<m;u++)d.eq(h[u][0]).addClass(b[u]||b[y])}),t.processTbody(r,s,!1);if(l=!1!==i.columns_thead?["thead tr"]:[],!1!==i.columns_tfoot&&l.push("tfoot tr"),l.length&&(n=g.find(l.join(",")).children().removeClass(f),m))for(u=0;u<m;u++)n.filter('[data-column="'+h[u][0]+'"]').addClass(b[u]||b[y])},remove:function(r,a,i){var s,o,n=a.$tbodies,l=(i.columns||["primary","secondary","tertiary"]).join(" ");for(a.$headers.removeClass(l),a.$table.children("tfoot").children("tr").children("th, td").removeClass(l),s=0;s<n.length;s++)(o=t.processTbody(r,n.eq(s),!0)).children("tr").each(function(){e(this).children().removeClass(l)}),t.processTbody(r,o,!1)}})}(e),function(e){"use strict";var t,r,a=e.tablesorter||{},i=a.css,s=a.keyCodes;e.extend(i,{filterRow:"tablesorter-filter-row",filter:"tablesorter-filter",filterDisabled:"disabled",filterRowHide:"hideme"}),e.extend(s,{backSpace:8,escape:27,space:32,left:37,down:40}),a.addWidget({id:"filter",priority:50,options:{filter_cellFilter:"",filter_childRows:!1,filter_childByColumn:!1,filter_childWithSibs:!0,filter_columnAnyMatch:!0,filter_columnFilters:!0,filter_cssFilter:"",filter_defaultAttrib:"data-value",filter_defaultFilter:{},filter_excludeFilter:{},filter_external:"",filter_filteredRow:"filtered",filter_filterLabel:'Filter "{{label}}" column by...',filter_formatter:null,filter_functions:null,filter_hideEmpty:!0,filter_hideFilters:!1,filter_ignoreCase:!0,filter_liveSearch:!0,filter_matchType:{input:"exact",select:"exact"},filter_onlyAvail:"filter-onlyAvail",filter_placeholder:{search:"",select:""},filter_reset:null,filter_resetOnEsc:!0,filter_saveFilters:!1,filter_searchDelay:300,filter_searchFiltered:!0,filter_selectSource:null,filter_selectSourceSeparator:"|",filter_serversideFiltering:!1,filter_startsWith:!1,filter_useParsedData:!1},format:function(e,r,a){r.$table.hasClass("hasFilters")||t.init(e,r,a)},remove:function(t,r,s,o){var n,l,c=r.$table,d=r.$tbodies,f="addRows updateCell update updateRows updateComplete appendCache filterReset filterAndSortReset filterFomatterUpdate filterEnd search stickyHeadersInit ".split(" ").join(r.namespace+"filter ");if(c.removeClass("hasFilters").unbind(f.replace(a.regex.spaces," ")).find("."+i.filterRow).remove(),s.filter_initialized=!1,!o){for(n=0;n<d.length;n++)(l=a.processTbody(t,d.eq(n),!0)).children().removeClass(s.filter_filteredRow).show(),a.processTbody(t,l,!1);s.filter_reset&&e(document).undelegate(s.filter_reset,"click"+r.namespace+"filter")}}}),t=a.filter={regex:{regex:/^\/((?:\\\/|[^\/])+)\/([migyu]{0,5})?$/,child:/tablesorter-childRow/,filtered:/filtered/,type:/undefined|number/,exact:/(^[\"\'=]+)|([\"\'=]+$)/g,operators:/[<>=]/g,query:"(q|query)",wild01:/\?/g,wild0More:/\*/g,quote:/\"/g,isNeg1:/(>=?\s*-\d)/,isNeg2:/(<=?\s*\d)/},types:{or:function(a,i,s){if((r.orTest.test(i.iFilter)||r.orSplit.test(i.filter))&&!r.regex.test(i.filter)){var o,n,l,c,d=e.extend({},i),f=i.filter.split(r.orSplit),u=i.iFilter.split(r.orSplit),g=f.length;for(o=0;o<g;o++){d.nestedFilters=!0,d.filter=""+(t.parseFilter(a,f[o],i)||""),d.iFilter=""+(t.parseFilter(a,u[o],i)||""),l="("+(t.parseFilter(a,d.filter,i)||"")+")";try{if(c=new RegExp(i.isMatch?l:"^"+l+"$",a.widgetOptions.filter_ignoreCase?"i":""),n=c.test(d.exact)||t.processTypes(a,d,s))return n}catch(e){return null}}return n||!1}return null},and:function(a,i,s){if(r.andTest.test(i.filter)){var o,n,l,c,d=e.extend({},i),f=i.filter.split(r.andSplit),u=i.iFilter.split(r.andSplit),g=f.length;for(o=0;o<g;o++){d.nestedFilters=!0,d.filter=""+(t.parseFilter(a,f[o],i)||""),d.iFilter=""+(t.parseFilter(a,u[o],i)||""),c=("("+(t.parseFilter(a,d.filter,i)||"")+")").replace(r.wild01,"\\S{1}").replace(r.wild0More,"\\S*");try{l=new RegExp(i.isMatch?c:"^"+c+"$",a.widgetOptions.filter_ignoreCase?"i":"").test(d.exact)||t.processTypes(a,d,s),n=0===o?l:n&&l}catch(e){return null}}return n||!1}return null},regex:function(e,t){if(r.regex.test(t.filter)){var a,i=t.filter_regexCache[t.index]||r.regex.exec(t.filter),s=i instanceof RegExp;try{s||(t.filter_regexCache[t.index]=i=new RegExp(i[1],i[2])),a=i.test(t.exact)}catch(e){a=!1}return a}return null},operators:function(i,s){if(r.operTest.test(s.iFilter)&&""!==s.iExact){var o,n,l,c=i.table,d=s.parsed[s.index],f=a.formatFloat(s.iFilter.replace(r.operators,""),c),u=i.parsers[s.index]||{},g=f;return(d||"numeric"===u.type)&&(l=e.trim(""+s.iFilter.replace(r.operators,"")),f="number"!=typeof(n=t.parseFilter(i,l,s,!0))||""===n||isNaN(n)?f:n),!d&&"numeric"!==u.type||isNaN(f)||void 0===s.cache?(l=isNaN(s.iExact)?s.iExact.replace(a.regex.nondigit,""):s.iExact,o=a.formatFloat(l,c)):o=s.cache,r.gtTest.test(s.iFilter)?n=r.gteTest.test(s.iFilter)?o>=f:o>f:r.ltTest.test(s.iFilter)&&(n=r.lteTest.test(s.iFilter)?o<=f:o<f),n||""!==g||(n=!0),n}return null},notMatch:function(a,i){if(r.notTest.test(i.iFilter)){var s,o=i.iFilter.replace("!",""),n=t.parseFilter(a,o,i)||"";return r.exact.test(n)?""===(n=n.replace(r.exact,""))||e.trim(n)!==i.iExact:(s=i.iExact.search(e.trim(n)),""===n||(i.anyMatch?s<0:!(a.widgetOptions.filter_startsWith?0===s:s>=0)))}return null},exact:function(a,i){if(r.exact.test(i.iFilter)){var s=i.iFilter.replace(r.exact,""),o=t.parseFilter(a,s,i)||"";return i.anyMatch?e.inArray(o,i.rowArray)>=0:o==i.iExact}return null},range:function(e,i){if(r.toTest.test(i.iFilter)){var s,o,n,l,c=e.table,d=i.index,f=i.parsed[d],u=i.iFilter.split(r.toSplit);return o=u[0].replace(a.regex.nondigit,"")||"",n=a.formatFloat(t.parseFilter(e,o,i),c),o=u[1].replace(a.regex.nondigit,"")||"",l=a.formatFloat(t.parseFilter(e,o,i),c),(f||"numeric"===e.parsers[d].type)&&(n=""===(s=e.parsers[d].format(""+u[0],c,e.$headers.eq(d),d))||isNaN(s)?n:s,l=""===(s=e.parsers[d].format(""+u[1],c,e.$headers.eq(d),d))||isNaN(s)?l:s),!f&&"numeric"!==e.parsers[d].type||isNaN(n)||isNaN(l)?(o=isNaN(i.iExact)?i.iExact.replace(a.regex.nondigit,""):i.iExact,s=a.formatFloat(o,c)):s=i.cache,n>l&&(o=n,n=l,l=o),s>=n&&s<=l||""===n||""===l}return null},wild:function(e,a){if(r.wildOrTest.test(a.iFilter)){var i=""+(t.parseFilter(e,a.iFilter,a)||"");!r.wildTest.test(i)&&a.nestedFilters&&(i=a.isMatch?i:"^("+i+")$");try{return new RegExp(i.replace(r.wild01,"\\S{1}").replace(r.wild0More,"\\S*"),e.widgetOptions.filter_ignoreCase?"i":"").test(a.exact)}catch(e){return null}}return null},fuzzy:function(e,a){if(r.fuzzyTest.test(a.iFilter)){var i,s=0,o=a.iExact.length,n=a.iFilter.slice(1),l=t.parseFilter(e,n,a)||"";for(i=0;i<o;i++)a.iExact[i]===l[s]&&(s+=1);return s===l.length}return null}},init:function(s){a.language=e.extend(!0,{},{to:"to",or:"or",and:"and"},a.language);var o,n,l,c,d,f,u,g,p=s.config,h=p.widgetOptions,m=function(e,t,r){return t=t.trim(),""===t?"":(e||"")+t+(r||"")};if(p.$table.addClass("hasFilters"),p.lastSearch=[],h.filter_searchTimer=null,h.filter_initTimer=null,h.filter_formatterCount=0,h.filter_formatterInit=[],h.filter_anyColumnSelector='[data-column="all"],[data-column="any"]',h.filter_multipleColumnSelector='[data-column*="-"],[data-column*=","]',f="\\{"+r.query+"\\}",e.extend(r,{child:new RegExp(p.cssChildRow),filtered:new RegExp(h.filter_filteredRow),alreadyFiltered:new RegExp("(\\s+(-"+m("|",a.language.or)+m("|",a.language.to)+")\\s+)","i"),toTest:new RegExp("\\s+(-"+m("|",a.language.to)+")\\s+","i"),toSplit:new RegExp("(?:\\s+(?:-"+m("|",a.language.to)+")\\s+)","gi"),andTest:new RegExp("\\s+("+m("",a.language.and,"|")+"&&)\\s+","i"),andSplit:new RegExp("(?:\\s+(?:"+m("",a.language.and,"|")+"&&)\\s+)","gi"),orTest:new RegExp("(\\|"+m("|\\s+",a.language.or,"\\s+")+")","i"),orSplit:new RegExp("(?:\\|"+m("|\\s+(?:",a.language.or,")\\s+")+")","gi"),iQuery:new RegExp(f,"i"),igQuery:new RegExp(f,"ig"),operTest:/^[<>]=?/,gtTest:/>/,gteTest:/>=/,ltTest:/</,lteTest:/<=/,notTest:/^\!/,wildOrTest:/[\?\*\|]/,wildTest:/\?\*/,fuzzyTest:/^~/,exactTest:/[=\"\|!]/}),f=p.$headers.filter(".filter-false, .parser-false").length,!1!==h.filter_columnFilters&&f!==p.$headers.length&&t.buildRow(s,p,h),l="addRows updateCell update updateRows updateComplete appendCache filterReset "+"filterAndSortReset filterResetSaved filterEnd search ".split(" ").join(p.namespace+"filter "),p.$table.bind(l,function(r,o){return f=h.filter_hideEmpty&&e.isEmptyObject(p.cache)&&!(p.delayInit&&"appendCache"===r.type),p.$table.find("."+i.filterRow).toggleClass(h.filter_filteredRow,f),/(search|filter)/.test(r.type)||(r.stopPropagation(),t.buildDefault(s,!0)),"filterReset"===r.type||"filterAndSortReset"===r.type?(p.$table.find("."+i.filter).add(h.filter_$externalFilters).val(""),"filterAndSortReset"===r.type?a.sortReset(this.config,function(){t.searching(s,[])}):t.searching(s,[])):"filterResetSaved"===r.type?a.storage(s,"tablesorter-filters",""):"filterEnd"===r.type?t.buildDefault(s,!0):(o="search"===r.type?o:"updateComplete"===r.type?p.$table.data("lastSearch"):"",/(update|add)/.test(r.type)&&"updateComplete"!==r.type&&(p.lastCombinedFilter=null,p.lastSearch=[],setTimeout(function(){p.$table.triggerHandler("filterFomatterUpdate")},100)),t.searching(s,o,!0)),!1}),h.filter_reset&&(h.filter_reset instanceof e?h.filter_reset.click(function(){p.$table.triggerHandler("filterReset")}):e(h.filter_reset).length&&e(document).undelegate(h.filter_reset,"click"+p.namespace+"filter").delegate(h.filter_reset,"click"+p.namespace+"filter",function(){p.$table.triggerHandler("filterReset")})),h.filter_functions)for(d=0;d<p.columns;d++)if(u=a.getColumnData(s,h.filter_functions,d))if(c=p.$headerIndexed[d].removeClass("filter-select"),g=!(c.hasClass("filter-false")||c.hasClass("parser-false")),o="",!0===u&&g)t.buildSelect(s,d);else if("object"==typeof u&&g){for(n in u)"string"==typeof n&&(o+=""===o?'<option value="">'+(c.data("placeholder")||c.attr("data-placeholder")||h.filter_placeholder.select||"")+"</option>":"",f=n,l=n,n.indexOf(h.filter_selectSourceSeparator)>=0&&(l=(f=n.split(h.filter_selectSourceSeparator))[1],f=f[0]),o+="<option "+(l===f?"":'data-function-name="'+n+'" ')+'value="'+f+'">'+l+"</option>");p.$table.find("thead").find("select."+i.filter+'[data-column="'+d+'"]').append(o),(u="function"==typeof(l=h.filter_selectSource)||a.getColumnData(s,l,d))&&t.buildSelect(p.table,d,"",!0,c.hasClass(h.filter_onlyAvail))}t.buildDefault(s,!0),t.bindSearch(s,p.$table.find("."+i.filter),!0),h.filter_external&&t.bindSearch(s,h.filter_external),h.filter_hideFilters&&t.hideFilters(p),p.showProcessing&&(l="filterStart filterEnd ".split(" ").join(p.namespace+"filter-sp "),p.$table.unbind(l.replace(a.regex.spaces," ")).bind(l,function(t,r){c=r?p.$table.find("."+i.header).filter("[data-column]").filter(function(){return""!==r[e(this).data("column")]}):"",a.isProcessing(s,"filterStart"===t.type,r?c:"")})),p.filteredRows=p.totalRows,l="tablesorter-initialized pagerBeforeInitialized ".split(" ").join(p.namespace+"filter "),p.$table.unbind(l.replace(a.regex.spaces," ")).bind(l,function(){t.completeInit(this)}),p.pager&&p.pager.initialized&&!h.filter_initialized?(p.$table.triggerHandler("filterFomatterUpdate"),setTimeout(function(){t.filterInitComplete(p)},100)):h.filter_initialized||t.completeInit(s)},completeInit:function(e){var r=e.config,i=r.widgetOptions,s=t.setDefaults(e,r,i)||[];s.length&&(r.delayInit&&""===s.join("")||a.setFilters(e,s,!0)),r.$table.triggerHandler("filterFomatterUpdate"),setTimeout(function(){i.filter_initialized||t.filterInitComplete(r)},100)},formatterUpdated:function(e,t){var r=e&&e.closest("table"),a=r.length&&r[0].config,i=a&&a.widgetOptions;i&&!i.filter_initialized&&(i.filter_formatterInit[t]=1)},filterInitComplete:function(r){var i,s,o=r.widgetOptions,n=0,l=function(){o.filter_initialized=!0,r.lastSearch=r.$table.data("lastSearch"),r.$table.triggerHandler("filterInit",r),t.findRows(r.table,r.lastSearch||[]),a.debug(r,"filter")&&console.log("Filter >> Widget initialized")};if(e.isEmptyObject(o.filter_formatter))l();else{for(s=o.filter_formatterInit.length,i=0;i<s;i++)1===o.filter_formatterInit[i]&&n++;clearTimeout(o.filter_initTimer),o.filter_initialized||n!==o.filter_formatterCount?o.filter_initialized||(o.filter_initTimer=setTimeout(function(){l()},500)):l()}},processFilters:function(e,t){var r,a=[],i=t?encodeURIComponent:decodeURIComponent,s=e.length;for(r=0;r<s;r++)e[r]&&(a[r]=i(e[r]));return a},setDefaults:function(r,i,s){var o,n,l,c,d,f=a.getFilters(r)||[];if(s.filter_saveFilters&&a.storage&&(n=a.storage(r,"tablesorter-filters")||[],(o=e.isArray(n))&&""===n.join("")||!o||(f=t.processFilters(n))),""===f.join(""))for(d=i.$headers.add(s.filter_$externalFilters).filter("["+s.filter_defaultAttrib+"]"),l=0;l<=i.columns;l++)c=l===i.columns?"all":l,f[l]=d.filter('[data-column="'+c+'"]').attr(s.filter_defaultAttrib)||f[l]||"";return i.$table.data("lastSearch",f),f},parseFilter:function(e,t,r,a){return a||r.parsed[r.index]?e.parsers[r.index].format(t,e.table,[],r.index):t},buildRow:function(r,s,o){var n,l,c,d,f,u,g,p,h,m=o.filter_cellFilter,b=s.columns,y=e.isArray(m),v='<tr role="search" class="'+i.filterRow+" "+s.cssIgnoreRow+'">';for(c=0;c<b;c++)s.$headerIndexed[c].length&&(v+=(h=s.$headerIndexed[c]&&s.$headerIndexed[c][0].colSpan||0)>1?'<td data-column="'+c+"-"+(c+h-1)+'" colspan="'+h+'"':'<td data-column="'+c+'"',v+=y?m[c]?' class="'+m[c]+'"':"":""!==m?' class="'+m+'"':"",v+="></td>");for(s.$filters=e(v+="</tr>").appendTo(s.$table.children("thead").eq(0)).children("td"),c=0;c<b;c++)u=!1,(d=s.$headerIndexed[c])&&d.length&&(n=t.getColumnElm(s,s.$filters,c),p=a.getColumnData(r,o.filter_functions,c),f=o.filter_functions&&p&&"function"!=typeof p||d.hasClass("filter-select"),l=a.getColumnData(r,s.headers,c),u="false"===a.getData(d[0],l,"filter")||"false"===a.getData(d[0],l,"parser"),f?v=e("<select>").appendTo(n):((p=a.getColumnData(r,o.filter_formatter,c))?(o.filter_formatterCount++,(v=p(n,c))&&0===v.length&&(v=n.children("input")),v&&(0===v.parent().length||v.parent().length&&v.parent()[0]!==n[0])&&n.append(v)):v=e('<input type="search">').appendTo(n),v&&(h=d.data("placeholder")||d.attr("data-placeholder")||o.filter_placeholder.search||"",v.attr("placeholder",h))),v&&(g=(e.isArray(o.filter_cssFilter)?void 0!==o.filter_cssFilter[c]?o.filter_cssFilter[c]||"":"":o.filter_cssFilter)||"",v.addClass(i.filter+" "+g),(h=(g=o.filter_filterLabel).match(/{{([^}]+?)}}/g))||(h=["{{label}}"]),e.each(h,function(t,r){var a=new RegExp(r,"g"),i=d.attr("data-"+r.replace(/{{|}}/g,"")),s=void 0===i?d.text():i;g=g.replace(a,e.trim(s))}),v.attr({"data-column":n.attr("data-column"),"aria-label":g}),u&&(v.attr("placeholder","").addClass(i.filterDisabled)[0].disabled=!0)))},bindSearch:function(r,i,o){if(r=e(r)[0],(i=e(i)).length){var n,l=r.config,c=l.widgetOptions,d=l.namespace+"filter",f=c.filter_$externalFilters;!0!==o&&(n=c.filter_anyColumnSelector+","+c.filter_multipleColumnSelector,c.filter_$anyMatch=i.filter(n),f&&f.length?c.filter_$externalFilters=c.filter_$externalFilters.add(i):c.filter_$externalFilters=i,a.setFilters(r,l.$table.data("lastSearch")||[],!1===o)),n="keypress keyup keydown search change input ".split(" ").join(d+" "),i.attr("data-lastSearchTime",(new Date).getTime()).unbind(n.replace(a.regex.spaces," ")).bind("keydown"+d,function(e){if(e.which===s.escape&&!r.config.widgetOptions.filter_resetOnEsc)return!1}).bind("keyup"+d,function(i){c=r.config.widgetOptions;var o=parseInt(e(this).attr("data-column"),10),n="boolean"==typeof c.filter_liveSearch?c.filter_liveSearch:a.getColumnData(r,c.filter_liveSearch,o);if(void 0===n&&(n=c.filter_liveSearch.fallback||!1),e(this).attr("data-lastSearchTime",(new Date).getTime()),i.which===s.escape)this.value=c.filter_resetOnEsc?"":l.lastSearch[o];else{if(""!==this.value&&("number"==typeof n&&this.value.length<n||i.which!==s.enter&&i.which!==s.backSpace&&(i.which<s.space||i.which>=s.left&&i.which<=s.down)))return;if(!1===n&&""!==this.value&&i.which!==s.enter)return}t.searching(r,!0,!0,o)}).bind("search change keypress input blur ".split(" ").join(d+" "),function(i){var o=parseInt(e(this).attr("data-column"),10),n=i.type,d="boolean"==typeof c.filter_liveSearch?c.filter_liveSearch:a.getColumnData(r,c.filter_liveSearch,o);!r.config.widgetOptions.filter_initialized||i.which!==s.enter&&"search"!==n&&"blur"!==n&&("change"!==n&&"input"!==n||!0!==d&&(!0===d||"INPUT"===i.target.nodeName)||this.value===l.lastSearch[o])||(i.preventDefault(),e(this).attr("data-lastSearchTime",(new Date).getTime()),t.searching(r,"keypress"!==n,!0,o))})}},searching:function(e,r,i,s){var o,n=e.config.widgetOptions;void 0===s?o=!1:void 0===(o="boolean"==typeof n.filter_liveSearch?n.filter_liveSearch:a.getColumnData(e,n.filter_liveSearch,s))&&(o=n.filter_liveSearch.fallback||!1),clearTimeout(n.filter_searchTimer),void 0===r||!0===r?n.filter_searchTimer=setTimeout(function(){t.checkFilters(e,r,i)},o?n.filter_searchDelay:10):t.checkFilters(e,r,i)},equalFilters:function(t,r,a){var i,s=[],o=[],n=t.columns+1;for(r=e.isArray(r)?r:[],a=e.isArray(a)?a:[],i=0;i<n;i++)s[i]=r[i]||"",o[i]=a[i]||"";return s.join(",")===o.join(",")},checkFilters:function(r,s,o){var n=r.config,l=n.widgetOptions,c=e.isArray(s),d=c?s:a.getFilters(r,!0),f=d||[];if(e.isEmptyObject(n.cache))n.delayInit&&(!n.pager||n.pager&&n.pager.initialized)&&a.updateCache(n,function(){t.checkFilters(r,!1,o)});else if(c&&(a.setFilters(r,d,!1,!0!==o),l.filter_initialized||(n.lastSearch=[],n.lastCombinedFilter="")),l.filter_hideFilters&&n.$table.find("."+i.filterRow).triggerHandler(t.hideFiltersCheck(n)?"mouseleave":"mouseenter"),!t.equalFilters(n,n.lastSearch,f)||!1===s){if(!1===s&&(n.lastCombinedFilter="",n.lastSearch=[]),d=d||[],d=Array.prototype.map?d.map(String):d.join("<22>").split("<22>"),l.filter_initialized&&n.$table.triggerHandler("filterStart",[d]),!n.showProcessing)return t.findRows(r,d,f),!1;setTimeout(function(){return t.findRows(r,d,f),!1},30)}},hideFiltersCheck:function(e){if("function"==typeof e.widgetOptions.filter_hideFilters){var t=e.widgetOptions.filter_hideFilters(e);if("boolean"==typeof t)return t}return""===a.getFilters(e.$table).join("")},hideFilters:function(r,a){var s;(a||r.$table).find("."+i.filterRow).addClass(i.filterRowHide).bind("mouseenter mouseleave",function(a){var o=a,n=e(this);clearTimeout(s),s=setTimeout(function(){/enter|over/.test(o.type)?n.removeClass(i.filterRowHide):e(document.activeElement).closest("tr")[0]!==n[0]&&n.toggleClass(i.filterRowHide,t.hideFiltersCheck(r))},200)}).find("input, select").bind("focus blur",function(a){var o=a,n=e(this).closest("tr");clearTimeout(s),s=setTimeout(function(){clearTimeout(s),n.toggleClass(i.filterRowHide,t.hideFiltersCheck(r)&&"focus"!==o.type)},200)})},defaultFilter:function(t,a){if(""===t)return t;var i=r.iQuery,s=a.match(r.igQuery).length,o=s>1?e.trim(t).split(/\s/):[e.trim(t)],n=o.length-1,l=0,c=a;for(n<1&&s>1&&(o[1]=o[0]);i.test(c);)c=c.replace(i,o[l++]||""),i.test(c)&&l<n&&""!==(o[l]||"")&&(c=a.replace(i,c));return c},getLatestSearch:function(t){return t?t.sort(function(t,r){return e(r).attr("data-lastSearchTime")-e(t).attr("data-lastSearchTime")}):t||e()},findRange:function(e,t,r){var a,i,s,o,n,l,c,d,f,u=[];if(/^[0-9]+$/.test(t))return[parseInt(t,10)];if(!r&&/-/.test(t))for(f=(i=t.match(/(\d+)\s*-\s*(\d+)/g))?i.length:0,d=0;d<f;d++){for(s=i[d].split(/\s*-\s*/),(o=parseInt(s[0],10)||0)>(n=parseInt(s[1],10)||e.columns-1)&&(a=o,o=n,n=a),n>=e.columns&&(n=e.columns-1);o<=n;o++)u[u.length]=o;t=t.replace(i[d],"")}if(!r&&/,/.test(t))for(f=(l=t.split(/\s*,\s*/)).length,c=0;c<f;c++)""!==l[c]&&(d=parseInt(l[c],10))<e.columns&&(u[u.length]=d);if(!u.length)for(d=0;d<e.columns;d++)u[u.length]=d;return u},getColumnElm:function(r,a,i){return a.filter(function(){var a=t.findRange(r,e(this).attr("data-column"));return e.inArray(i,a)>-1})},multipleColumns:function(r,a){var i=r.widgetOptions,s=i.filter_initialized||!a.filter(i.filter_anyColumnSelector).length,o=e.trim(t.getLatestSearch(a).attr("data-column")||"");return t.findRange(r,o,!s)},processTypes:function(r,a,i){var s,o=null,n=null;for(s in t.types)e.inArray(s,i.excludeMatch)<0&&null===n&&null!==(n=t.types[s](r,a,i))&&(a.matchedOn=s,o=n);return o},matchType:function(e,t){var r,a=e.widgetOptions,s=e.$headerIndexed[t];return s.hasClass("filter-exact")?r=!1:s.hasClass("filter-match")?r=!0:(a.filter_columnFilters?s=e.$filters.find("."+i.filter).add(a.filter_$externalFilters).filter('[data-column="'+t+'"]'):a.filter_$externalFilters&&(s=a.filter_$externalFilters.filter('[data-column="'+t+'"]')),r=!!s.length&&"match"===e.widgetOptions.filter_matchType[(s[0].nodeName||"").toLowerCase()]),r},processRow:function(i,s,o){var n,l,c,d,f,u=i.widgetOptions,g=!0,p=u.filter_$anyMatch&&u.filter_$anyMatch.length,h=u.filter_$anyMatch&&u.filter_$anyMatch.length?t.multipleColumns(i,u.filter_$anyMatch):[];if(s.$cells=s.$row.children(),s.matchedOn=null,s.anyMatchFlag&&h.length>1||s.anyMatchFilter&&!p){if(s.anyMatch=!0,s.isMatch=!0,s.rowArray=s.$cells.map(function(t){if(e.inArray(t,h)>-1||s.anyMatchFilter&&!p)return s.parsed[t]?f=s.cacheArray[t]:(f=s.rawArray[t],f=e.trim(u.filter_ignoreCase?f.toLowerCase():f),i.sortLocaleCompare&&(f=a.replaceAccents(f))),f}).get(),s.filter=s.anyMatchFilter,s.iFilter=s.iAnyMatchFilter,s.exact=s.rowArray.join(" "),s.iExact=u.filter_ignoreCase?s.exact.toLowerCase():s.exact,s.cache=s.cacheArray.slice(0,-1).join(" "),o.excludeMatch=o.noAnyMatch,null!==(l=t.processTypes(i,s,o)))g=l;else if(u.filter_startsWith)for(g=!1,h=Math.min(i.columns,s.rowArray.length);!g&&h>0;)h--,g=g||0===s.rowArray[h].indexOf(s.iFilter);else g=(s.iExact+s.childRowText).indexOf(s.iFilter)>=0;if(s.anyMatch=!1,s.filters.join("")===s.filter)return g}for(h=0;h<i.columns;h++)s.filter=s.filters[h],s.index=h,o.excludeMatch=o.excludeFilter[h],s.filter&&(s.cache=s.cacheArray[h],n=s.parsed[h]?s.cache:s.rawArray[h]||"",s.exact=i.sortLocaleCompare?a.replaceAccents(n):n,s.iExact=!r.type.test(typeof s.exact)&&u.filter_ignoreCase?s.exact.toLowerCase():s.exact,s.isMatch=t.matchType(i,h),n=g,d=u.filter_columnFilters?i.$filters.add(u.filter_$externalFilters).filter('[data-column="'+h+'"]').find("select option:selected").attr("data-function-name")||"":"",i.sortLocaleCompare&&(s.filter=a.replaceAccents(s.filter)),u.filter_defaultFilter&&r.iQuery.test(o.defaultColFilter[h])&&(s.filter=t.defaultFilter(s.filter,o.defaultColFilter[h])),s.iFilter=u.filter_ignoreCase?(s.filter||"").toLowerCase():s.filter,l=null,(c=o.functions[h])&&("function"==typeof c?l=c(s.exact,s.cache,s.filter,h,s.$row,i,s):"function"==typeof c[d||s.filter]&&(l=c[f=d||s.filter](s.exact,s.cache,s.filter,h,s.$row,i,s))),null===l?(l=t.processTypes(i,s,o),f=!0===c&&("and"===s.matchedOn||"or"===s.matchedOn),null===l||f?!0===c?n=s.isMatch?(""+s.iExact).search(s.iFilter)>=0:s.filter===s.exact:(f=(s.iExact+s.childRowText).indexOf(t.parseFilter(i,s.iFilter,s)),n=!u.filter_startsWith&&f>=0||u.filter_startsWith&&0===f):n=l):n=l,g=!!n&&g);return g},findRows:function(i,s,o){if(!t.equalFilters(i.config,i.config.lastSearch,o)&&i.config.widgetOptions.filter_initialized){var n,l,c,d,f,u,g,p,h,m,b,y,v,w,x,C,_,$,S,z,F,R,T,I=e.extend([],s),k=i.config,A=k.widgetOptions,D=a.debug(k,"filter"),H={anyMatch:!1,filters:s,filter_regexCache:[]},N={noAnyMatch:["range","operators"],functions:[],excludeFilter:[],defaultColFilter:[],defaultAnyFilter:a.getColumnData(i,A.filter_defaultFilter,k.columns,!0)||""};for(H.parsed=[],h=0;h<k.columns;h++)H.parsed[h]=A.filter_useParsedData||k.parsers&&k.parsers[h]&&k.parsers[h].parsed||a.getData&&"parsed"===a.getData(k.$headerIndexed[h],a.getColumnData(i,k.headers,h),"filter")||k.$headerIndexed[h].hasClass("filter-parsed"),N.functions[h]=a.getColumnData(i,A.filter_functions,h)||k.$headerIndexed[h].hasClass("filter-select"),N.defaultColFilter[h]=a.getColumnData(i,A.filter_defaultFilter,h)||"",N.excludeFilter[h]=(a.getColumnData(i,A.filter_excludeFilter,h,!0)||"").split(/\s+/);for(D&&(console.log("Filter >> Starting filter widget search",s),w=new Date),k.filteredRows=0,k.totalRows=0,o=I||[],g=0;g<k.$tbodies.length;g++){if(p=a.processTbody(i,k.$tbodies.eq(g),!0),h=k.columns,l=k.cache[g].normalized,d=e(e.map(l,function(e){return e[h].$row.get()})),""===o.join("")||A.filter_serversideFiltering)d.removeClass(A.filter_filteredRow).not("."+k.cssChildRow).css("display","");else{if(d=d.not("."+k.cssChildRow),n=d.length,(A.filter_$anyMatch&&A.filter_$anyMatch.length||void 0!==s[k.columns])&&(H.anyMatchFlag=!0,H.anyMatchFilter=""+(s[k.columns]||A.filter_$anyMatch&&t.getLatestSearch(A.filter_$anyMatch).val()||""),A.filter_columnAnyMatch)){for(S=H.anyMatchFilter.split(r.andSplit),z=!1,C=0;C<S.length;C++)(F=S[C].split(":")).length>1&&(isNaN(F[0])?e.each(k.headerContent,function(e,t){t.toLowerCase().indexOf(F[0])>-1&&(s[R=e]=F[1])}):R=parseInt(F[0],10)-1,R>=0&&R<k.columns&&(s[R]=F[1],S.splice(C,1),C--,z=!0));z&&(H.anyMatchFilter=S.join(" && "))}if($=A.filter_searchFiltered,b=k.lastSearch||k.$table.data("lastSearch")||[],$)for(C=0;C<h+1;C++)x=s[C]||"",$||(C=h),$=$&&b.length&&0===x.indexOf(b[C]||"")&&!r.alreadyFiltered.test(x)&&!r.exactTest.test(x)&&!(r.isNeg1.test(x)||r.isNeg2.test(x))&&!(""!==x&&k.$filters&&k.$filters.filter('[data-column="'+C+'"]').find("select").length&&!t.matchType(k,C));for(_=d.not("."+A.filter_filteredRow).length,$&&0===_&&($=!1),D&&console.log("Filter >> Searching through "+($&&_<n?_:"all")+" rows"),H.anyMatchFlag&&(k.sortLocaleCompare&&(H.anyMatchFilter=a.replaceAccents(H.anyMatchFilter)),A.filter_defaultFilter&&r.iQuery.test(N.defaultAnyFilter)&&(H.anyMatchFilter=t.defaultFilter(H.anyMatchFilter,N.defaultAnyFilter),$=!1),H.iAnyMatchFilter=A.filter_ignoreCase&&k.ignoreCase?H.anyMatchFilter.toLowerCase():H.anyMatchFilter),u=0;u<n;u++)if(T=d[u].className,!(u&&r.child.test(T)||$&&r.filtered.test(T))){if(H.$row=d.eq(u),H.rowIndex=u,H.cacheArray=l[u],c=H.cacheArray[k.columns],H.rawArray=c.raw,H.childRowText="",!A.filter_childByColumn){for(T="",m=c.child,C=0;C<m.length;C++)T+=" "+m[C].join(" ")||"";H.childRowText=A.filter_childRows?A.filter_ignoreCase?T.toLowerCase():T:""}if(y=!1,v=t.processRow(k,H,N),f=c.$row,x=!!v,m=c.$row.filter(":gt(0)"),A.filter_childRows&&m.length){if(A.filter_childByColumn)for(A.filter_childWithSibs||(m.addClass(A.filter_filteredRow),f=f.eq(0)),C=0;C<m.length;C++)H.$row=m.eq(C),H.cacheArray=c.child[C],H.rawArray=H.cacheArray,x=t.processRow(k,H,N),y=y||x,!A.filter_childWithSibs&&x&&m.eq(C).removeClass(A.filter_filteredRow);y=y||v}else y=x;f.toggleClass(A.filter_filteredRow,!y)[0].display=y?"":"none"}}k.filteredRows+=d.not("."+A.filter_filteredRow).length,k.totalRows+=d.length,a.processTbody(i,p,!1)}k.lastCombinedFilter=I.join(""),k.lastSearch=I,k.$table.data("lastSearch",I),A.filter_saveFilters&&a.storage&&a.storage(i,"tablesorter-filters",t.processFilters(I,!0)),D&&console.log("Filter >> Completed search"+a.benchmark(w)),A.filter_initialized&&(k.$table.triggerHandler("filterBeforeEnd",k),k.$table.triggerHandler("filterEnd",k)),setTimeout(function(){a.applyWidget(k.table)},0)}},getOptionSource:function(r,i,s){var o=(r=e(r)[0]).config,n=!1,l=o.widgetOptions.filter_selectSource,c=o.$table.data("lastSearch")||[],d="function"==typeof l||a.getColumnData(r,l,i);if(s&&""!==c[i]&&(s=!1),!0===d)n=l(r,i,s);else{if(d instanceof e||"string"===e.type(d)&&d.indexOf("</option>")>=0)return d;if(e.isArray(d))n=d;else if("object"===e.type(l)&&d&&null===(n=d(r,i,s)))return null}return!1===n&&(n=t.getOptions(r,i,s)),t.processOptions(r,i,n)},processOptions:function(t,r,i){if(!e.isArray(i))return!1;var s,o,n,l,c,d,f=(t=e(t)[0]).config,u=void 0!==r&&null!==r&&r>=0&&r<f.columns,g=!!u&&f.$headerIndexed[r].hasClass("filter-select-sort-desc"),p=[];if(i=e.grep(i,function(t,r){return!!t.text||e.inArray(t,i)===r}),u&&f.$headerIndexed[r].hasClass("filter-select-nosort"))return i;for(l=i.length,n=0;n<l;n++)d=(o=i[n]).text?o.text:o,c=(u&&f.parsers&&f.parsers.length&&f.parsers[r].format(d,t,[],r)||d).toString(),c=f.widgetOptions.filter_ignoreCase?c.toLowerCase():c,o.text?(o.parsed=c,p[p.length]=o):p[p.length]={text:o,parsed:c};for(s=f.textSorter||"",p.sort(function(e,i){var o=g?i.parsed:e.parsed,n=g?e.parsed:i.parsed;return u&&"function"==typeof s?s(o,n,!0,r,t):u&&"object"==typeof s&&s.hasOwnProperty(r)?s[r](o,n,!0,r,t):!a.sortNatural||a.sortNatural(o,n)}),i=[],l=p.length,n=0;n<l;n++)i[i.length]=p[n];return i},getOptions:function(t,r,i){var s,o,n,l,c,d,f,u,g=(t=e(t)[0]).config,p=g.widgetOptions,h=[];for(o=0;o<g.$tbodies.length;o++)for(c=g.cache[o],n=g.cache[o].normalized.length,s=0;s<n;s++)if(l=c.row?c.row[s]:c.normalized[s][g.columns].$row[0],!i||!l.className.match(p.filter_filteredRow))if(p.filter_useParsedData||g.parsers[r].parsed||g.$headerIndexed[r].hasClass("filter-parsed")){if(h[h.length]=""+c.normalized[s][r],p.filter_childRows&&p.filter_childByColumn)for(u=c.normalized[s][g.columns].$row.length-1,d=0;d<u;d++)h[h.length]=""+c.normalized[s][g.columns].child[d][r]}else if(h[h.length]=c.normalized[s][g.columns].raw[r],p.filter_childRows&&p.filter_childByColumn)for(u=c.normalized[s][g.columns].$row.length,d=1;d<u;d++)f=c.normalized[s][g.columns].$row.eq(d).children().eq(r),h[h.length]=""+a.getElementText(g,f,r);return h},buildSelect:function(a,s,o,n,l){if(a=e(a)[0],s=parseInt(s,10),a.config.cache&&!e.isEmptyObject(a.config.cache)){var c,d,f,u,g,p,h,m=a.config,b=m.widgetOptions,y=m.$headerIndexed[s],v='<option value="">'+(y.data("placeholder")||y.attr("data-placeholder")||b.filter_placeholder.select||"")+"</option>",w=m.$table.find("thead").find("select."+i.filter+'[data-column="'+s+'"]').val();if(void 0!==o&&""!==o||null!==(o=t.getOptionSource(a,s,l))){if(e.isArray(o)){for(c=0;c<o.length;c++)if((h=o[c]).text){h["data-function-name"]=void 0===h.value?h.text:h.value,v+="<option";for(d in h)h.hasOwnProperty(d)&&"text"!==d&&(v+=" "+d+'="'+h[d].replace(r.quote,""")+'"');h.value||(v+=' value="'+h.text.replace(r.quote,""")+'"'),v+=">"+h.text.replace(r.quote,""")+"</option>"}else""+h!="[object Object]"&&(d=f=h=(""+h).replace(r.quote,"""),f.indexOf(b.filter_selectSourceSeparator)>=0&&(d=(u=f.split(b.filter_selectSourceSeparator))[0],f=u[1]),v+=""!==h?"<option "+(d===f?"":'data-function-name="'+h+'" ')+'value="'+d+'">'+f+"</option>":"");o=[]}g=(m.$filters?m.$filters:m.$table.children("thead")).find("."+i.filter),b.filter_$externalFilters&&(g=g&&g.length?g.add(b.filter_$externalFilters):b.filter_$externalFilters),(p=g.filter('select[data-column="'+s+'"]')).length&&(p[n?"html":"append"](v),e.isArray(o)||p.append(o).val(w),p.val(w))}}},buildDefault:function(e,r){var i,s,o,n=e.config,l=n.widgetOptions,c=n.columns;for(i=0;i<c;i++)o=!((s=n.$headerIndexed[i]).hasClass("filter-false")||s.hasClass("parser-false")),(s.hasClass("filter-select")||!0===a.getColumnData(e,l.filter_functions,i))&&o&&t.buildSelect(e,i,"",r,s.hasClass(l.filter_onlyAvail))}},r=t.regex,a.getFilters=function(r,a,s,o){var n,l,c,d,f=[],u=r?e(r)[0].config:"",g=u?u.widgetOptions:"";if(!0!==a&&g&&!g.filter_columnFilters||e.isArray(s)&&t.equalFilters(u,s,u.lastSearch))return e(r).data("lastSearch")||[];if(u&&(u.$filters&&(l=u.$filters.find("."+i.filter)),g.filter_$externalFilters&&(l=l&&l.length?l.add(g.filter_$externalFilters):g.filter_$externalFilters),l&&l.length))for(f=s||[],n=0;n<u.columns+1;n++)d=n===u.columns?g.filter_anyColumnSelector+","+g.filter_multipleColumnSelector:'[data-column="'+n+'"]',(c=l.filter(d)).length&&(c=t.getLatestSearch(c),e.isArray(s)?(o&&c.length>1&&(c=c.slice(1)),n===u.columns&&(c=(d=c.filter(g.filter_anyColumnSelector)).length?d:c),c.val(s[n]).trigger("change"+u.namespace)):(f[n]=c.val()||"",n===u.columns?c.slice(1).filter('[data-column*="'+c.attr("data-column")+'"]').val(f[n]):c.slice(1).val(f[n])),n===u.columns&&c.length&&(g.filter_$anyMatch=c));return f},a.setFilters=function(r,i,s,o){var n=r?e(r)[0].config:"",l=a.getFilters(r,!0,i,o);return void 0===s&&(s=!0),n&&s&&(n.lastCombinedFilter=null,n.lastSearch=[],t.searching(n.table,i,o),n.$table.triggerHandler("filterFomatterUpdate")),0!==l.length}}(e),function(e,t){"use strict";function r(t,r){var a=isNaN(r.stickyHeaders_offset)?e(r.stickyHeaders_offset):[];return a.length?a.height()||0:parseInt(r.stickyHeaders_offset,10)||0}var a=e.tablesorter||{};e.extend(a.css,{sticky:"tablesorter-stickyHeader",stickyVis:"tablesorter-sticky-visible",stickyHide:"tablesorter-sticky-hidden",stickyWrap:"tablesorter-sticky-wrapper"}),a.addHeaderResizeEvent=function(t,r,a){if((t=e(t)[0]).config){var i={timer:250},s=e.extend({},i,a),o=t.config,n=o.widgetOptions,l=function(e){var t,r,a,i,s,l,c=o.$headers.length;for(n.resize_flag=!0,r=[],t=0;t<c;t++)i=(a=o.$headers.eq(t)).data("savedSizes")||[0,0],s=a[0].offsetWidth,l=a[0].offsetHeight,s===i[0]&&l===i[1]||(a.data("savedSizes",[s,l]),r.push(a[0]));r.length&&!1!==e&&o.$table.triggerHandler("resize",[r]),n.resize_flag=!1};if(clearInterval(n.resize_timer),r)return n.resize_flag=!1,!1;l(!1),n.resize_timer=setInterval(function(){n.resize_flag||l()},s.timer)}},a.addWidget({id:"stickyHeaders",priority:54,options:{stickyHeaders:"",stickyHeaders_appendTo:null,stickyHeaders_attachTo:null,stickyHeaders_xScroll:null,stickyHeaders_yScroll:null,stickyHeaders_offset:0,stickyHeaders_filteredToTop:!0,stickyHeaders_cloneId:"-sticky",stickyHeaders_addResizeEvent:!0,stickyHeaders_includeCaption:!0,stickyHeaders_zIndex:2},format:function(i,s,o){if(!(s.$table.hasClass("hasStickyHeaders")||e.inArray("filter",s.widgets)>=0&&!s.$table.hasClass("hasFilters"))){var n,l,c,d,f=s.$table,u=e(o.stickyHeaders_attachTo||o.stickyHeaders_appendTo),g=s.namespace+"stickyheaders ",p=e(o.stickyHeaders_yScroll||o.stickyHeaders_attachTo||t),h=e(o.stickyHeaders_xScroll||o.stickyHeaders_attachTo||t),m=f.children("thead:first").children("tr").not(".sticky-false").children(),b=f.children("tfoot"),y=r(s,o),v=f.parent().closest("."+a.css.table).hasClass("hasStickyHeaders")?f.parent().closest("table.tablesorter")[0].config.widgetOptions.$sticky.parent():[],w=v.length?v.height():0,x=o.$sticky=f.clone().addClass("containsStickyHeaders "+a.css.sticky+" "+o.stickyHeaders+" "+s.namespace.slice(1)+"_extra_table").wrap('<div class="'+a.css.stickyWrap+'">'),C=x.parent().addClass(a.css.stickyHide).css({position:u.length?"absolute":"fixed",padding:parseInt(x.parent().parent().css("padding-left"),10),top:y+w,left:0,visibility:"hidden",zIndex:o.stickyHeaders_zIndex||2}),_=x.children("thead:first"),$="",S=function(e,r){var a,i,s,o,n,l=e.filter(":visible"),c=l.length;for(a=0;a<c;a++)o=r.filter(":visible").eq(a),"border-box"===(n=l.eq(a)).css("box-sizing")?i=n.outerWidth():"collapse"===o.css("border-collapse")?t.getComputedStyle?i=parseFloat(t.getComputedStyle(n[0],null).width):(s=parseFloat(n.css("border-width")),i=n.outerWidth()-parseFloat(n.css("padding-left"))-parseFloat(n.css("padding-right"))-s):i=n.width(),o.css({width:i,"min-width":i,"max-width":i})},z=function(r){return!1===r&&v.length?f.position().left:u.length?parseInt(u.css("padding-left"),10)||0:f.offset().left-parseInt(f.css("margin-left"),10)-e(t).scrollLeft()},F=function(){C.css({left:z(),width:f.outerWidth()}),S(f,x),S(m,d)},R=function(t){if(f.is(":visible")){w=v.length?v.offset().top-p.scrollTop()+v.height():0;var i,n=f.offset(),l=r(s,o),c=e.isWindow(p[0]),d=c?p.scrollTop():v.length?parseInt(v[0].style.top,10):p.offset().top,g=u.length?d:p.scrollTop(),h=o.stickyHeaders_includeCaption?0:f.children("caption").height()||0,m=g+l+w-h,y=f.height()-(C.height()+(b.height()||0))-h,x=m>n.top&&m<n.top+y?"visible":"hidden",_="visible"===x?a.css.stickyVis:a.css.stickyHide,S=!C.hasClass(_),R={visibility:x};u.length&&(S=!0,R.top=c?m-u.offset().top:u.scrollTop()),(i=z(c))!==parseInt(C.css("left"),10)&&(S=!0,R.left=i),R.top=(R.top||0)+(!c&&v.length?v.height():l+w),S&&C.removeClass(a.css.stickyVis+" "+a.css.stickyHide).addClass(_).css(R),(x!==$||t)&&(F(),$=x)}};if(u.length&&!u.css("position")&&u.css("position","relative"),x.attr("id")&&(x[0].id+=o.stickyHeaders_cloneId),x.find("> thead:gt(0), tr.sticky-false").hide(),x.find("> tbody, > tfoot").remove(),x.find("caption").toggle(o.stickyHeaders_includeCaption),d=_.children().children(),x.css({height:0,width:0,margin:0}),d.find("."+a.css.resizer).remove(),f.addClass("hasStickyHeaders").bind("pagerComplete"+g,function(){F()}),a.bindEvents(i,_.children().children("."+a.css.header)),o.stickyHeaders_appendTo?e(o.stickyHeaders_appendTo).append(C):f.after(C),s.onRenderHeader)for(l=(c=_.children("tr").children()).length,n=0;n<l;n++)s.onRenderHeader.apply(c.eq(n),[n,s,x]);h.add(p).unbind("scroll resize ".split(" ").join(g).replace(/\s+/g," ")).bind("scroll resize ".split(" ").join(g),function(e){R("resize"===e.type)}),s.$table.unbind("stickyHeadersUpdate"+g).bind("stickyHeadersUpdate"+g,function(){R(!0)}),o.stickyHeaders_addResizeEvent&&a.addHeaderResizeEvent(i),f.hasClass("hasFilters")&&o.filter_columnFilters&&(f.bind("filterEnd"+g,function(){var r=e(document.activeElement).closest("td"),i=r.parent().children().index(r);C.hasClass(a.css.stickyVis)&&o.stickyHeaders_filteredToTop&&(t.scrollTo(0,f.position().top),i>=0&&s.$filters&&s.$filters.eq(i).find("a, select, input").filter(":visible").focus())}),a.filter.bindSearch(f,d.find("."+a.css.filter)),o.filter_hideFilters&&a.filter.hideFilters(s,x)),o.stickyHeaders_addResizeEvent&&f.bind("resize"+s.namespace+"stickyheaders",function(){F()}),R(!0),f.triggerHandler("stickyHeadersInit")}},remove:function(r,i,s){var o=i.namespace+"stickyheaders ";i.$table.removeClass("hasStickyHeaders").unbind("pagerComplete resize filterEnd stickyHeadersUpdate ".split(" ").join(o).replace(/\s+/g," ")).next("."+a.css.stickyWrap).remove(),s.$sticky&&s.$sticky.length&&s.$sticky.remove(),e(t).add(s.stickyHeaders_xScroll).add(s.stickyHeaders_yScroll).add(s.stickyHeaders_attachTo).unbind("scroll resize ".split(" ").join(o).replace(/\s+/g," ")),a.addHeaderResizeEvent(r,!0)}})}(e,window),function(e,t){"use strict";var r=e.tablesorter||{};e.extend(r.css,{resizableContainer:"tablesorter-resizable-container",resizableHandle:"tablesorter-resizable-handle",resizableNoSelect:"tablesorter-disableSelection",resizableStorage:"tablesorter-resizable"}),e(function(){var t="<style>body."+r.css.resizableNoSelect+" { -ms-user-select: none; -moz-user-select: -moz-none;-khtml-user-select: none; -webkit-user-select: none; user-select: none; }."+r.css.resizableContainer+" { position: relative; height: 1px; }."+r.css.resizableHandle+" { position: absolute; display: inline-block; width: 8px;top: 1px; cursor: ew-resize; z-index: 3; user-select: none; -moz-user-select: none; }</style>";e("head").append(t)}),r.resizable={init:function(t,a){if(!t.$table.hasClass("hasResizable")){t.$table.addClass("hasResizable");var i,s,o,n,l=t.$table,c=l.parent(),d=parseInt(l.css("margin-top"),10),f=a.resizable_vars={useStorage:r.storage&&!1!==a.resizable,$wrap:c,mouseXPosition:0,$target:null,$next:null,overflow:"auto"===c.css("overflow")||"scroll"===c.css("overflow")||"auto"===c.css("overflow-x")||"scroll"===c.css("overflow-x"),storedSizes:[]};for(r.resizableReset(t.table,!0),f.tableWidth=l.width(),f.fullWidth=Math.abs(c.width()-f.tableWidth)<20,f.useStorage&&f.overflow&&(r.storage(t.table,"tablesorter-table-original-css-width",f.tableWidth),n=r.storage(t.table,"tablesorter-table-resized-width")||"auto",r.resizable.setWidth(l,n,!0)),a.resizable_vars.storedSizes=o=(f.useStorage?r.storage(t.table,r.css.resizableStorage):[])||[],r.resizable.setWidths(t,a,o),r.resizable.updateStoredSizes(t,a),a.$resizable_container=e('<div class="'+r.css.resizableContainer+'">').css({top:d}).insertBefore(l),s=0;s<t.columns;s++)i=t.$headerIndexed[s],n=r.getColumnData(t.table,t.headers,s),"false"===r.getData(i,n,"resizable")||e('<div class="'+r.css.resizableHandle+'">').appendTo(a.$resizable_container).attr({"data-column":s,unselectable:"on"}).data("header",i).bind("selectstart",!1);r.resizable.bindings(t,a)}},updateStoredSizes:function(e,t){var r,a,i=e.columns,s=t.resizable_vars;for(s.storedSizes=[],r=0;r<i;r++)a=e.$headerIndexed[r],s.storedSizes[r]=a.is(":visible")?a.width():0},setWidth:function(e,t,r){e.css({width:t,"min-width":r?t:"","max-width":r?t:""})},setWidths:function(t,a,i){var s,o,n=a.resizable_vars,l=e(t.namespace+"_extra_headers"),c=t.$table.children("colgroup").children("col");if((i=i||n.storedSizes||[]).length){for(s=0;s<t.columns;s++)r.resizable.setWidth(t.$headerIndexed[s],i[s],n.overflow),l.length&&(o=l.eq(s).add(c.eq(s)),r.resizable.setWidth(o,i[s],n.overflow));(o=e(t.namespace+"_extra_table")).length&&!r.hasWidget(t.table,"scroller")&&r.resizable.setWidth(o,t.$table.outerWidth(),n.overflow)}},setHandlePosition:function(t,a){var i,s=t.$table.height(),o=a.$resizable_container.children(),n=Math.floor(o.width()/2);r.hasWidget(t.table,"scroller")&&(s=0,t.$table.closest("."+r.css.scrollerWrap).children().each(function(){var t=e(this);s+=t.filter('[style*="height"]').length?t.height():t.children("table").height()})),!a.resizable_includeFooter&&t.$table.children("tfoot").length&&(s-=t.$table.children("tfoot").height()),i=parseFloat(e.fn.jquery)>=3.3?0:t.$table.position().left,o.each(function(){var o=e(this),l=parseInt(o.attr("data-column"),10),c=t.columns-1,d=o.data("header");d&&(!d.is(":visible")||!a.resizable_addLastColumn&&r.resizable.checkVisibleColumns(t,l)?o.hide():(l<c||l===c&&a.resizable_addLastColumn)&&o.css({display:"inline-block",height:s,left:d.position().left-i+d.outerWidth()-n}))})},checkVisibleColumns:function(e,t){var r,a=0;for(r=t+1;r<e.columns;r++)a+=e.$headerIndexed[r].is(":visible")?1:0;return 0===a},toggleTextSelection:function(t,a,i){var s=t.namespace+"tsresize";a.resizable_vars.disabled=i,e("body").toggleClass(r.css.resizableNoSelect,i),i?e("body").attr("unselectable","on").bind("selectstart"+s,!1):e("body").removeAttr("unselectable").unbind("selectstart"+s)},bindings:function(a,i){var s=a.namespace+"tsresize";i.$resizable_container.children().bind("mousedown",function(t){var s,o=i.resizable_vars,n=e(a.namespace+"_extra_headers"),l=e(t.target).data("header");s=parseInt(l.attr("data-column"),10),o.$target=l=l.add(n.filter('[data-column="'+s+'"]')),o.target=s,o.$next=t.shiftKey||i.resizable_targetLast?l.parent().children().not(".resizable-false").filter(":last"):l.nextAll(":not(.resizable-false)").eq(0),s=parseInt(o.$next.attr("data-column"),10),o.$next=o.$next.add(n.filter('[data-column="'+s+'"]')),o.next=s,o.mouseXPosition=t.pageX,r.resizable.updateStoredSizes(a,i),r.resizable.toggleTextSelection(a,i,!0)}),e(document).bind("mousemove"+s,function(e){var t=i.resizable_vars;t.disabled&&0!==t.mouseXPosition&&t.$target&&(i.resizable_throttle?(clearTimeout(t.timer),t.timer=setTimeout(function(){r.resizable.mouseMove(a,i,e)},isNaN(i.resizable_throttle)?5:i.resizable_throttle)):r.resizable.mouseMove(a,i,e))}).bind("mouseup"+s,function(){i.resizable_vars.disabled&&(r.resizable.toggleTextSelection(a,i,!1),r.resizable.stopResize(a,i),r.resizable.setHandlePosition(a,i))}),e(t).bind("resize"+s+" resizeEnd"+s,function(){r.resizable.setHandlePosition(a,i)}),a.$table.bind("columnUpdate pagerComplete resizableUpdate ".split(" ").join(s+" "),function(){r.resizable.setHandlePosition(a,i)}).bind("resizableReset"+s,function(){r.resizableReset(a.table)}).find("thead:first").add(e(a.namespace+"_extra_table").find("thead:first")).bind("contextmenu"+s,function(){var e=0===i.resizable_vars.storedSizes.length;return r.resizableReset(a.table),r.resizable.setHandlePosition(a,i),i.resizable_vars.storedSizes=[],e})},mouseMove:function(t,a,i){if(0!==a.resizable_vars.mouseXPosition&&a.resizable_vars.$target){var s,o=0,n=a.resizable_vars,l=n.$next,c=n.storedSizes[n.target],d=i.pageX-n.mouseXPosition;if(n.overflow){if(c+d>0){for(n.storedSizes[n.target]+=d,r.resizable.setWidth(n.$target,n.storedSizes[n.target],!0),s=0;s<t.columns;s++)o+=n.storedSizes[s];r.resizable.setWidth(t.$table.add(e(t.namespace+"_extra_table")),o)}l.length||(n.$wrap[0].scrollLeft=t.$table.width())}else n.fullWidth?(n.storedSizes[n.target]+=d,n.storedSizes[n.next]-=d,r.resizable.setWidths(t,a)):(n.storedSizes[n.target]+=d,r.resizable.setWidths(t,a));n.mouseXPosition=i.pageX,t.$table.triggerHandler("stickyHeadersUpdate")}},stopResize:function(e,t){var a=t.resizable_vars;r.resizable.updateStoredSizes(e,t),a.useStorage&&(r.storage(e.table,r.css.resizableStorage,a.storedSizes),r.storage(e.table,"tablesorter-table-resized-width",e.$table.width())),a.mouseXPosition=0,a.$target=a.$next=null,e.$table.triggerHandler("stickyHeadersUpdate"),e.$table.triggerHandler("resizableComplete")}},r.addWidget({id:"resizable",priority:40,options:{resizable:!0,resizable_addLastColumn:!1,resizable_includeFooter:!0,resizable_widths:[],resizable_throttle:!1,resizable_targetLast:!1},init:function(e,t,a,i){r.resizable.init(a,i)},format:function(e,t,a){r.resizable.setHandlePosition(t,a)},remove:function(t,a,i,s){if(i.$resizable_container){var o=a.namespace+"tsresize";a.$table.add(e(a.namespace+"_extra_table")).removeClass("hasResizable").children("thead").unbind("contextmenu"+o),i.$resizable_container.remove(),r.resizable.toggleTextSelection(a,i,!1),r.resizableReset(t,s),e(document).unbind("mousemove"+o+" mouseup"+o)}}}),r.resizableReset=function(t,a){e(t).each(function(){var e,i,s=this.config,o=s&&s.widgetOptions,n=o.resizable_vars;if(t&&s&&s.$headerIndexed.length){for(n.overflow&&n.tableWidth&&(r.resizable.setWidth(s.$table,n.tableWidth,!0),n.useStorage&&r.storage(t,"tablesorter-table-resized-width",n.tableWidth)),e=0;e<s.columns;e++)i=s.$headerIndexed[e],o.resizable_widths&&o.resizable_widths[e]?r.resizable.setWidth(i,o.resizable_widths[e],n.overflow):i.hasClass("resizable-false")||r.resizable.setWidth(i,"",n.overflow);s.$table.triggerHandler("stickyHeadersUpdate"),r.storage&&!a&&r.storage(this,r.css.resizableStorage,[])}})}}(e,window),function(e){"use strict";function t(t){var r=a.storage(t.table,"tablesorter-savesort");return r&&r.hasOwnProperty("sortList")&&e.isArray(r.sortList)?r.sortList:[]}function r(e,r){return(r||t(e)).join(",")!==e.sortList.join(",")}var a=e.tablesorter||{};a.addWidget({id:"saveSort",priority:20,options:{saveSort:!0},init:function(e,t,r,a){t.format(e,r,a,!0)},format:function(e,i,s,o){var n,l=i.$table,c=!1!==s.saveSort,d={sortList:i.sortList},f=a.debug(i,"saveSort");f&&(n=new Date),l.hasClass("hasSaveSort")?c&&e.hasInitialized&&a.storage&&r(i)&&(a.storage(e,"tablesorter-savesort",d),f&&console.log("saveSort >> Saving last sort: "+i.sortList+a.benchmark(n))):(l.addClass("hasSaveSort"),d="",a.storage&&(d=t(i),f&&console.log('saveSort >> Last sort loaded: "'+d+'"'+a.benchmark(n)),l.bind("saveSortReset",function(t){t.stopPropagation(),a.storage(e,"tablesorter-savesort","")})),o&&d&&d.length>0?i.sortList=d:e.hasInitialized&&d&&d.length>0&&r(i,d)&&a.sortOn(i,d))},remove:function(e,t){t.$table.removeClass("hasSaveSort"),a.storage&&a.storage(e,"tablesorter-savesort","")}})}(e),e.tablesorter}); |