tablesorter/dist/js/jquery.tablesorter.combined.min.js
Rob Garrison bf7339036c 2.29.4
2018-01-18 17:30:03 -06:00

2 lines
94 KiB
JavaScript
Raw Blame History

/*! tablesorter (FORK) - updated 2018-01-18 (v2.29.4)*/
!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(t){"use strict";var r=t.tablesorter={version:"2.29.4",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(e,a){if(e&&e.tHead&&0!==e.tBodies.length&&!0!==e.hasInitialized){var i="",s=t(e),o=t.metadata;e.hasInitialized=!1,e.isProcessing=!0,e.config=a,t.data(e,"tablesorter",a),a.debug&&(console[console.group?"group":"log"]("Initializing tablesorter v"+r.version),t.data(e,"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}(t.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(r.regex.nonWord,""):a.namespace=".tablesorter"+Math.random().toString(16).slice(2),a.table=e,a.$table=s.addClass(r.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",r.buildHeaders(a),r.fixColumnWidth(e),r.addWidgetFromClass(e),r.applyWidgetOptions(e),r.setupParsers(a),a.totalRows=0,r.validateOptions(a),a.delayInit||r.buildCache(a),r.bindEvents(e,a.$headers,!0),r.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),r.applyWidget(e,!0),a.sortList.length>0?r.sortOn(a,a.sortList,{},!a.initWidgets):(r.setHeadersCss(a),a.initWidgets&&r.applyWidget(e,!1)),a.showProcessing&&s.unbind("sortBegin"+a.namespace+" sortEnd"+a.namespace).bind("sortBegin"+a.namespace+" sortEnd"+a.namespace,function(t){clearTimeout(a.timerProcessing),r.isProcessing(e),"sortBegin"===t.type&&(a.timerProcessing=setTimeout(function(){r.isProcessing(e,!0)},500))}),e.hasInitialized=!0,e.isProcessing=!1,a.debug&&(console.log("Overall initialization time:"+r.benchmark(t.data(e,"startoveralltimer"))),a.debug&&console.groupEnd&&console.groupEnd()),s.triggerHandler("tablesorter-initialized",e),"function"==typeof a.initialized&&a.initialized(e)}else a.debug&&(e.hasInitialized?console.warn("Stopping initialization. Tablesorter has already been initialized"):console.error("Stopping initialization! No table, thead or tbody",e))},bindMethods:function(e){var a=e.$table,i=e.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(r.regex.spaces," ")).bind("sortReset"+i,function(e,t){e.stopPropagation(),r.sortReset(this.config,function(e){e.isApplyingWidgets?setTimeout(function(){r.applyWidget(e,"",t)},100):r.applyWidget(e,"",t)})}).bind("updateAll"+i,function(e,t,a){e.stopPropagation(),r.updateAll(this.config,t,a)}).bind("update"+i+" updateRows"+i,function(e,t,a){e.stopPropagation(),r.update(this.config,t,a)}).bind("updateHeaders"+i,function(e,t){e.stopPropagation(),r.updateHeaders(this.config,t)}).bind("updateCell"+i,function(e,t,a,i){e.stopPropagation(),r.updateCell(this.config,t,a,i)}).bind("addRows"+i,function(e,t,a,i){e.stopPropagation(),r.addRows(this.config,t,a,i)}).bind("updateComplete"+i,function(){this.isUpdating=!1}).bind("sorton"+i,function(e,t,a,i){e.stopPropagation(),r.sortOn(this.config,t,a,i)}).bind("appendCache"+i,function(e,a,i){e.stopPropagation(),r.appendCache(this.config,i),t.isFunction(a)&&a(this)}).bind("updateCache"+i,function(e,t,a){e.stopPropagation(),r.updateCache(this.config,t,a)}).bind("applyWidgetId"+i,function(e,t){e.stopPropagation(),r.applyWidgetId(this,t)}).bind("applyWidgets"+i,function(e,t){e.stopPropagation(),r.applyWidget(this,!1,t)}).bind("refreshWidgets"+i,function(e,t,a){e.stopPropagation(),r.refreshWidgets(this,t,a)}).bind("removeWidget"+i,function(e,t,a){e.stopPropagation(),r.removeWidget(this,t,a)}).bind("destroy"+i,function(e,t,a){e.stopPropagation(),r.destroy(this,t,a)}).bind("resetToLoadState"+i,function(a){a.stopPropagation(),r.removeWidget(this,!0,!1);var i=t.extend(!0,{},e.originalSettings);(e=t.extend(!0,{},r.defaults,i)).originalSettings=i,this.hasInitialized=!1,r.setup(this,e)})},bindEvents:function(e,a,i){var s,o=(e=t(e)[0]).config,n=o.namespace,l=null;!0!==i&&(a.addClass(n.slice(1)+"_extra_headers"),(s=r.getClosest(a,"table")).length&&"TABLE"===s[0].nodeName&&s[0]!==e&&t(s[0]).addClass(n.slice(1)+"_extra_table")),s=(o.pointerDown+" "+o.pointerUp+" "+o.pointerClick+" sort keyup ").replace(r.regex.spaces," ").split(" ").join(n+" "),a.find(o.selectorSort).add(a.filter(o.selectorSort)).unbind(s).bind(s,function(e,i){var s,n,d,c=t(e.target),f=" "+e.type+" ";if(!(1!==(e.which||e.button)&&!f.match(" "+o.pointerClick+" | sort | keyup ")||" keyup "===f&&e.which!==r.keyCodes.enter||f.match(" "+o.pointerClick+" ")&&void 0!==e.which||f.match(" "+o.pointerUp+" ")&&l!==e.target&&!0!==i)){if(f.match(" "+o.pointerDown+" "))return l=e.target,void("1"===(d=c.jquery.split("."))[0]&&d[1]<4&&e.preventDefault());if(l=null,r.regex.formElements.test(e.target.nodeName)||c.hasClass(o.cssNoSort)||c.parents("."+o.cssNoSort).length>0||c.parents("button").length>0)return!o.cancelSelection;o.delayInit&&r.isEmptyObject(o.cache)&&r.buildCache(o),s=r.getClosest(t(this),"."+r.css.header),d=a.index(s),o.last.clickedIndex=d<0?s.attr("data-column"):d,(n=o.$headers[o.last.clickedIndex])&&!n.sortDisabled&&r.initSort(o,n,e)}}),o.cancelSelection&&a.attr("unselectable","on").bind("selectstart",!1).css({"user-select":"none",MozUserSelect:"none"})},buildHeaders:function(e){var a,i,s,o;for(e.headerList=[],e.headerContent=[],e.sortVars=[],e.debug&&(s=new Date),e.columns=r.computeColumnIndex(e.$table.children("thead, tfoot").children("tr")),i=e.cssIcon?'<i class="'+(e.cssIcon===r.css.icon?r.css.icon:e.cssIcon+" "+r.css.icon)+'"></i>':"",e.$headers=t(t.map(e.$table.find(e.selectorHeaders),function(a,s){var o,n,l,d,c,f=t(a);if(!r.getClosest(f,"tr").hasClass(e.cssIgnoreRow))return/(th|td)/i.test(a.nodeName)||(c=r.getClosest(f,"th, td"),f.attr("data-column",c.attr("data-column"))),o=r.getColumnData(e.table,e.headers,s,!0),e.headerContent[s]=f.html(),""===e.headerTemplate||f.find("."+r.css.headerIn).length||(d=e.headerTemplate.replace(r.regex.templateContent,f.html()).replace(r.regex.templateIcon,f.find("."+r.css.icon).length?"":i),e.onRenderTemplate&&(n=e.onRenderTemplate.apply(f,[s,d]))&&"string"==typeof n&&(d=n),f.html('<div class="'+r.css.headerIn+'">'+d+"</div>")),e.onRenderHeader&&e.onRenderHeader.apply(f,[s,e,e.$table]),l=parseInt(f.attr("data-column"),10),a.column=l,c=r.getOrder(r.getData(f,o,"sortInitialOrder")||e.sortInitialOrder),e.sortVars[l]={count:-1,order:c?e.sortReset?[1,0,2]:[1,0]:e.sortReset?[0,1,2]:[0,1],lockedOrder:!1},void 0!==(c=r.getData(f,o,"lockedOrder")||!1)&&!1!==c&&(e.sortVars[l].lockedOrder=!0,e.sortVars[l].order=r.getOrder(c)?[1,1]:[0,0]),e.headerList[s]=a,f.addClass(r.css.header+" "+e.cssHeader),r.getClosest(f,"tr").addClass(r.css.headerRow+" "+e.cssHeaderRow).attr("role","row"),e.tabIndex&&f.attr("tabindex",0),a})),e.$headerIndexed=[],o=0;o<e.columns;o++)r.isEmptyObject(e.sortVars[o])&&(e.sortVars[o]={}),a=e.$headers.filter('[data-column="'+o+'"]'),e.$headerIndexed[o]=a.length?a.not(".sorter-false").length?a.not(".sorter-false").filter(":last"):a.filter(":last"):t();e.$table.find(e.selectorHeaders).attr({scope:"col",role:"columnheader"}),r.updateHeader(e),e.debug&&(console.log("Built headers:"+r.benchmark(s)),console.log(e.$headers))},addInstanceMethods:function(e){t.extend(r.instanceMethods,e)},setupParsers:function(e,t){var a,i,s,o,n,l,d,c,f,u,g,p,h,m,b=e.table,y=0,v={};if(e.$tbodies=e.$table.children("tbody:not(."+e.cssInfoBlock+")"),h=void 0===t?e.$tbodies:t,0===(m=h.length))return e.debug?console.warn("Warning: *Empty table!* Not building a parser cache"):"";for(e.debug&&(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((d=e.$headerIndexed[n])&&d.length&&(c=r.getColumnData(b,e.headers,n),g=r.getParserById(r.getData(d,c,"extractor")),u=r.getParserById(r.getData(d,c,"sorter")),f="false"===r.getData(d,c,"parser"),e.empties[n]=(r.getData(d,c,"empty")||e.emptyTo||(e.emptyToBottom?"bottom":"top")).toLowerCase(),e.strings[n]=(r.getData(d,c,"string")||e.stringTo||"max").toLowerCase(),f&&(u=r.getParserById("no-parser")),g||(g=!1),u||(u=r.detectParserForColumn(e,a,-1,n)),e.debug&&(v["("+n+") "+d.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=d[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}e.debug&&(r.isEmptyObject(v)?console.warn(" No parsers detected!"):console[console.table?"table":"log"](v),console.log("Completed detecting parsers"+r.benchmark(p)),console.groupEnd&&console.groupEnd()),e.parsers=i.parsers,e.extractors=i.extractors},addParser:function(e){var t,a=r.parsers.length,i=!0;for(t=0;t<a;t++)r.parsers[t].id.toLowerCase()===e.id.toLowerCase()&&(i=!1);i&&(r.parsers[r.parsers.length]=e)},getParserById:function(e){if("false"==e)return!1;var t,a=r.parsers.length;for(t=0;t<a;t++)if(r.parsers[t].id.toLowerCase()===e.toString().toLowerCase())return r.parsers[t];return!1},detectParserForColumn:function(e,a,i,s){for(var o,n,l,d=r.parsers.length,c=!1,f="",u=!0;""===f&&u;)(l=a[++i])&&i<50?l.className.indexOf(r.cssIgnoreRow)<0&&(c=a[i].cells[s],f=r.getElementText(e,c,s),n=t(c),e.debug&&console.log("Checking if value was empty on row "+i+", column: "+s+': "'+f+'"')):u=!1;for(;--d>=0;)if((o=r.parsers[d])&&"text"!==o.id&&o.is&&o.is(f,e.table,c,n))return o;return r.getParserById("text")},getElementText:function(e,a,i){if(!a)return"";var s,o=e.textExtraction||"",n=a.jquery?a:t(a);return"string"==typeof o?"basic"===o&&void 0!==(s=n.attr(e.textAttribute))?t.trim(s):t.trim(a.textContent||n.text()):"function"==typeof o?t.trim(o(n[0],e.table,i)):"function"==typeof(s=r.getColumnData(e.table,o,i))?t.trim(s(n[0],e.table,i)):t.trim(n[0].textContent||n.text())},getParsedText:function(e,t,a,i){void 0===i&&(i=r.getElementText(e,t,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,t,a)),s="no-parser"===o.id?"":o.format(""+i,e.table,t,a),e.ignoreCase&&"string"==typeof s&&(s=s.toLowerCase())),s},buildCache:function(e,a,i){var s,o,n,l,d,c,f,u,g,p,h,m,b,y,v,w,x,C,_,$,S,z,F=e.table,R=e.parsers;if(e.$tbodies=e.$table.children("tbody:not(."+e.cssInfoBlock+")"),f=void 0===i?e.$tbodies:i,e.cache={},e.totalRows=0,!R)return e.debug?console.warn("Warning: *Empty table!* Not building a cache"):"";for(e.debug&&(m=new Date),e.showProcessing&&r.isProcessing(F,!0),c=0;c<f.length;c++){for(w=[],s=e.cache[c]={normalized:[]},b=f[c]&&f[c].rows.length||0,l=0;l<b;++l)if(y={child:[],raw:[]},u=t(f[c].rows[l]),g=[],!u.hasClass(e.selectorRemove.slice(1)))if(u.hasClass(e.cssChildRow)&&0!==l)for(S=s.normalized.length-1,(v=s.normalized[S][e.columns]).$row=v.$row.add(u),u.prev().hasClass(e.cssChildRow)||u.prev().addClass(r.css.cssHasChild),p=u.children("th, td"),S=v.child.length,v.child[S]=[],C=0,$=e.columns,d=0;d<$;d++)(h=p[d])&&(v.child[S][d]=r.getParsedText(e,h,d),(x=p[d].colSpan-1)>0&&(C+=x,$+=x)),C++;else{for(y.$row=u,y.order=l,C=0,$=e.columns,d=0;d<$;++d){if((h=u[0].cells[d])&&C<e.columns&&(!(_=void 0!==R[C])&&e.debug&&console.warn("No parser found for row: "+l+", column: "+d+'; cell containing: "'+t(h).text()+'"; does it have a header?'),o=r.getElementText(e,h,C),y.raw[C]=o,n=r.getParsedText(e,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=e.duplicateSpan||0===z?o:"string"!=typeof e.textExtraction?r.getElementText(e,h,C+z)||"":"",y.raw[C+z]=n,g[C+z]=n,z++;C+=x,$+=x}C++}g[e.columns]=y,s.normalized[s.normalized.length]=g}s.colMax=w,e.totalRows+=s.normalized.length}if(e.showProcessing&&r.isProcessing(F),e.debug){for(S=Math.min(5,e.cache[0].normalized.length),console[console.group?"group":"log"]("Building cache for "+e.totalRows+" rows (showing "+S+" rows in log) and "+e.columns+" columns"+r.benchmark(m)),o={},d=0;d<e.columns;d++)for(C=0;C<S;C++)o["row: "+C]||(o["row: "+C]={}),o["row: "+C][e.$headerIndexed[d].text()]=e.cache[0].normalized[C][d];console[console.table?"table":"log"](o),console.groupEnd&&console.groupEnd()}t.isFunction(a)&&a(F)},getColumnText:function(e,a,i,s){var o,n,l,d,c,f,u,g,p,h,m="function"==typeof i,b="all"===a,y={raw:[],parsed:[],$cell:[]},v=(e=t(e)[0]).config;if(!r.isEmptyObject(v)){for(c=v.$tbodies.length,o=0;o<c;o++)for(f=(l=v.cache[o].normalized).length,n=0;n<f;n++)d=l[n],s&&!d[v.columns].$row.is(s)||(h=!0,g=b?d.slice(0,v.columns):d[a],d=d[v.columns],u=b?d.raw:d.raw[a],p=b?d.$row.children():d.$row.children().eq(a),m&&(h=i({tbodyIndex:o,rowIndex:n,parsed:g,raw:u,$row:d.$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}v.debug&&console.warn("No cache found - aborting getColumnText function!")},setHeadersCss:function(e){var a,i,s=e.sortList,o=s.length,n=r.css.sortNone+" "+e.cssNone,l=[r.css.sortAsc+" "+e.cssAsc,r.css.sortDesc+" "+e.cssDesc],d=[e.cssIconAsc,e.cssIconDesc,e.cssIconNone],c=["ascending","descending"],f=function(e,t){e.removeClass(n).addClass(l[t]).attr("aria-sort",c[t]).find("."+r.css.icon).removeClass(d[2]).addClass(d[t])},u=e.$table.find("tfoot tr").children("td, th").add(t(e.namespace+"_extra_headers")).removeClass(l.join(" ")),g=e.$headers.add(t("thead "+e.namespace+"_extra_headers")).removeClass(l.join(" ")).addClass(n).attr("aria-sort","none").find("."+r.css.icon).removeClass(d.join(" ")).end();for(g.not(".sorter-false").find("."+r.css.icon).addClass(d[2]),e.cssIconDisabled&&g.filter(".sorter-false").find("."+r.css.icon).addClass(e.cssIconDisabled),a=0;a<o;a++)if(2!==s[a][1]){if(g=e.$headers.filter(function(t){for(var a=!0,i=e.$headers.eq(t),s=parseInt(i.attr("data-column"),10),o=s+r.getClosest(i,"th, td")[0].colSpan;s<o;s++)a=!!a&&(a||r.isValueInArray(s,e.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=e.$headers.length,a=0;a<o;a++)r.setColumnAriaLabel(e,e.$headers.eq(a))},getClosest:function(e,r){return t.fn.closest?e.closest(r):e.is(r)?e:e.parents(r).filter(":first")},setColumnAriaLabel:function(e,a,i){if(a.length){var s=parseInt(a.attr("data-column"),10),o=e.sortVars[s],n=a.hasClass(r.css.sortAsc)?"sortAsc":a.hasClass(r.css.sortDesc)?"sortDesc":"sortNone",l=t.trim(a.text())+": "+r.language[n];a.hasClass("sorter-false")||!1===i?l+=r.language.sortDisabled:(n=(o.count+1)%o.order.length,i=o.order[n],l+=r.language[0===i?"nextAsc":1===i?"nextDesc":"nextNone"]),a.attr("aria-label",l)}},updateHeader:function(e){var t,a,i,s,o=e.table,n=e.$headers.length;for(t=0;t<n;t++)i=e.$headers.eq(t),s=r.getColumnData(o,e.headers,t,!0),a="false"===r.getData(i,s,"sorter")||"false"===r.getData(i,s,"parser"),r.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(e,a){var i,s,o,n,l,d,c,f,u=a||e.sortList,g=u.length;for(e.sortList=[],n=0;n<g;n++)if(c=u[n],(i=parseInt(c[0],10))<e.columns){switch(e.sortVars[i].order||(f=r.getOrder(e.sortInitialOrder)?e.sortReset?[1,0,2]:[1,0]:e.sortReset?[0,1,2]:[0,1],e.sortVars[i].order=f,e.sortVars[i].count=0),f=e.sortVars[i].order,s=(""+c[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===(d=f[(l||0)%f.length])?1:1===d?0:2;break;case"n":s=f[++e.sortVars[i].count%f.length];break;default:s=0}l=0===n?s:l,o=[i,parseInt(s,10)||0],e.sortList[e.sortList.length]=o,s=t.inArray(o[1],f),e.sortVars[i].count=s>=0?s:o[1]%f.length}},updateAll:function(e,t,a){var i=e.table;i.isUpdating=!0,r.refreshWidgets(i,!0,!0),r.buildHeaders(e),r.bindEvents(i,e.$headers,!0),r.bindMethods(e),r.commonUpdate(e,t,a)},update:function(e,t,a){e.table.isUpdating=!0,r.updateHeader(e),r.commonUpdate(e,t,a)},updateHeaders:function(e,t){e.table.isUpdating=!0,r.buildHeaders(e),r.bindEvents(e.table,e.$headers,!0),r.resortComplete(e,t)},updateCell:function(e,a,i,s){if(t(a).closest("tr").hasClass(e.cssChildRow))console.warn('Tablesorter Warning! "updateCell" for child row content has been disabled, use "update" instead');else{if(r.isEmptyObject(e.cache))return r.updateHeader(e),void r.commonUpdate(e,i,s);e.table.isUpdating=!0,e.$table.find(e.selectorRemove).remove();var o,n,l,d,c,f,u=e.$tbodies,g=t(a),p=u.index(r.getClosest(g,"tbody")),h=e.cache[p],m=r.getClosest(g,"tr");if(a=g[0],u.length&&p>=0){if(l=u.eq(p).find("tr").not("."+e.cssChildRow).index(m),c=h.normalized[l],(f=m[0].cells.length)!==e.columns)for(d=0,o=!1,n=0;n<f;n++)o||m[0].cells[n]===a?o=!0:d+=m[0].cells[n].colSpan;else d=g.index();o=r.getElementText(e,a,d),c[e.columns].raw[d]=o,o=r.getParsedText(e,a,d,o),c[d]=o,"numeric"===(e.parsers[d].type||"").toLowerCase()&&(h.colMax[d]=Math.max(Math.abs(o)||0,h.colMax[d]||0)),!1!==(o="undefined"!==i?i:e.resort)?r.checkResort(e,o,s):r.resortComplete(e,s)}else e.debug&&console.error("updateCell aborted, tbody missing or not within the indicated table"),e.table.isUpdating=!1}},addRows:function(a,i,s,o){var n,l,d,c,f,u,g,p,h,m,b,y,v,w="string"==typeof i&&1===a.$tbodies.length&&/<tr/.test(i||""),x=a.table;if(w)i=t(i),a.$tbodies.append(i);else if(!(i&&i instanceof e&&r.getClosest(i,"table")[0]===a.table))return a.debug&&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(x.isUpdating=!0,r.isEmptyObject(a.cache))r.updateHeader(a),r.commonUpdate(a,s,o);else{for(f=i.filter("tr").attr("role","row").length,d=a.$tbodies.index(i.parents("tbody").filter(":first")),a.parsers&&a.parsers.length||r.setupParsers(a),c=0;c<f;c++){for(h=0,g=i[c].cells.length,p=a.cache[d].normalized.length,b=[],m={child:[],raw:[],$row:i.eq(c),order:p},u=0;u<g;u++)y=i[c].cells[u],n=r.getElementText(a,y,h),m.raw[h]=n,l=r.getParsedText(a,y,h,n),b[h]=l,"numeric"===(a.parsers[h].type||"").toLowerCase()&&(a.cache[d].colMax[h]=Math.max(Math.abs(l)||0,a.cache[d].colMax[h]||0)),(v=y.colSpan-1)>0&&(h+=v),h++;b[a.columns]=m,a.cache[d].normalized[p]=b}r.checkResort(a,s,o)}},updateCache:function(e,t,a){e.parsers&&e.parsers.length||r.setupParsers(e,a),r.buildCache(e,t,a)},appendCache:function(e,t){var a,i,s,o,n,l,d,c=e.table,f=e.widgetOptions,u=e.$tbodies,g=[],p=e.cache;if(r.isEmptyObject(p))return e.appender?e.appender(c,g):c.isUpdating?e.$table.triggerHandler("updateComplete",c):"";for(e.debug&&(d=new Date),l=0;l<u.length;l++)if((s=u.eq(l)).length){for(o=r.processTbody(c,s,!0),i=(a=p[l].normalized).length,n=0;n<i;n++)g[g.length]=a[n][e.columns].$row,e.appender&&(!e.pager||e.pager.removeRows&&f.pager_removeRows||e.pager.ajax)||o.append(a[n][e.columns].$row);r.processTbody(c,o,!1)}e.appender&&e.appender(c,g),e.debug&&console.log("Rebuilt table"+r.benchmark(d)),t||e.appender||r.applyWidget(c),c.isUpdating&&e.$table.triggerHandler("updateComplete",c)},commonUpdate:function(e,t,a){e.$table.find(e.selectorRemove).remove(),r.setupParsers(e),r.buildCache(e),r.checkResort(e,t,a)},initSort:function(e,a,i){if(e.table.isUpdating)return setTimeout(function(){r.initSort(e,a,i)},50);var s,o,n,l,d,c,f,u=!i[e.sortMultiSortKey],g=e.table,p=e.$headers.length,h=r.getClosest(t(a),"th, td"),m=parseInt(h.attr("data-column"),10),b=e.sortVars[m].order;if(h=h[0],e.$table.triggerHandler("sortStart",g),c=(e.sortVars[m].count+1)%b.length,e.sortVars[m].count=i[e.sortResetKey]?2:c,e.sortRestart)for(n=0;n<p;n++)f=e.$headers.eq(n),m!==(c=parseInt(f.attr("data-column"),10))&&(u||f.hasClass(r.css.sortNone))&&(e.sortVars[c].count=-1);if(u){if(e.sortList=[],e.last.sortList=[],null!==e.sortForce)for(s=e.sortForce,o=0;o<s.length;o++)s[o][0]!==m&&(e.sortList[e.sortList.length]=s[o]);if((l=b[e.sortVars[m].count])<2&&(e.sortList[e.sortList.length]=[m,l],h.colSpan>1))for(o=1;o<h.colSpan;o++)e.sortList[e.sortList.length]=[m+o,l],e.sortVars[m+o].count=t.inArray(l,b)}else if(e.sortList=t.extend([],e.last.sortList),r.isValueInArray(m,e.sortList)>=0)for(o=0;o<e.sortList.length;o++)(c=e.sortList[o])[0]===m&&(c[1]=b[e.sortVars[m].count],2===c[1]&&(e.sortList.splice(o,1),e.sortVars[m].count=-1));else if((l=b[e.sortVars[m].count])<2&&(e.sortList[e.sortList.length]=[m,l],h.colSpan>1))for(o=1;o<h.colSpan;o++)e.sortList[e.sortList.length]=[m+o,l],e.sortVars[m+o].count=t.inArray(l,b);if(e.last.sortList=t.extend([],e.sortList),e.sortList.length&&e.sortAppend&&(s=t.isArray(e.sortAppend)?e.sortAppend:e.sortAppend[e.sortList[0][0]],!r.isEmptyObject(s)))for(o=0;o<s.length;o++)if(s[o][0]!==m&&r.isValueInArray(s[o][0],e.sortList)<0){if(l=s[o][1],d=(""+l).match(/^(a|d|s|o|n)/))switch(c=e.sortList[0][1],d[0]){case"d":l=1;break;case"s":l=c;break;case"o":l=0===c?1:0;break;case"n":l=(c+1)%b.length;break;default:l=0}e.sortList[e.sortList.length]=[s[o][0],l]}e.$table.triggerHandler("sortBegin",g),setTimeout(function(){r.setHeadersCss(e),r.multisort(e),r.appendCache(e),e.$table.triggerHandler("sortBeforeEnd",g),e.$table.triggerHandler("sortEnd",g)},1)},multisort:function(e){var t,a,i,s,o=e.table,n=[],l=0,d=e.textSorter||"",c=e.sortList,f=c.length,u=e.$tbodies.length;if(!e.serverSideSorting&&!r.isEmptyObject(e.cache)){if(e.debug&&(a=new Date),"object"==typeof d)for(i=e.columns;i--;)"function"==typeof(s=r.getColumnData(o,d,i))&&(n[i]=s);for(t=0;t<u;t++)i=e.cache[t].colMax,e.cache[t].normalized.sort(function(t,a){var s,u,g,p,h,m,b;for(s=0;s<f;s++){if(g=c[s][0],p=c[s][1],l=0===p,e.sortStable&&t[g]===a[g]&&1===f)return t[e.columns].order-a[e.columns].order;if(u=/n/i.test(r.getSortType(e.parsers,g)),u&&e.strings[g]?(u="boolean"==typeof r.string[e.strings[g]]?(l?1:-1)*(r.string[e.strings[g]]?-1:1):e.strings[g]?r.string[e.strings[g]]||0:0,h=e.numberSorter?e.numberSorter(t[g],a[g],l,i[g],o):r["sortNumeric"+(l?"Asc":"Desc")](t[g],a[g],u,i[g],g,e)):(m=l?t:a,b=l?a:t,h="function"==typeof d?d(m[g],b[g],l,g,o):"function"==typeof n[g]?n[g](m[g],b[g],l,g,o):r["sortNatural"+(l?"Asc":"Desc")](t[g],a[g],g,e)),h)return h}return t[e.columns].order-a[e.columns].order});e.debug&&console.log("Applying sort "+c.toString()+r.benchmark(a))}},resortComplete:function(e,r){e.table.isUpdating&&e.$table.triggerHandler("updateComplete",e.table),t.isFunction(r)&&r(e.table)},checkResort:function(e,a,i){var s=t.isArray(a)?a:e.sortList;!1===(void 0===a?e.resort:a)||e.serverSideSorting||e.table.isProcessing?(r.resortComplete(e,i),r.applyWidget(e.table,!1)):s.length?r.sortOn(e,s,function(){r.resortComplete(e,i)},!0):r.sortReset(e,function(){r.resortComplete(e,i),r.applyWidget(e.table,!1)})},sortOn:function(e,a,i,s){var o=e.table;e.$table.triggerHandler("sortStart",o),r.updateHeaderSortCount(e,a),r.setHeadersCss(e),e.delayInit&&r.isEmptyObject(e.cache)&&r.buildCache(e),e.$table.triggerHandler("sortBegin",o),r.multisort(e),r.appendCache(e,s),e.$table.triggerHandler("sortBeforeEnd",o),e.$table.triggerHandler("sortEnd",o),r.applyWidget(o),t.isFunction(i)&&i(o)},sortReset:function(e,a){e.sortList=[],r.setHeadersCss(e),r.multisort(e),r.appendCache(e);var i;for(i=0;i<e.columns;i++)e.sortVars[i].count=-1;t.isFunction(a)&&a(e.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,t){if(e===t)return 0;e=e.toString(),t=t.toString();var a,i,s,o,n,l,d=r.regex;if(d.hex.test(t)){if(a=parseInt((e||"").match(d.hex),16),i=parseInt((t||"").match(d.hex),16),a<i)return-1;if(a>i)return 1}for(a=(e||"").replace(d.chunk,"\\0$1\\0").replace(d.chunks,"").split("\\0"),i=(t||"").replace(d.chunk,"\\0$1\\0").replace(d.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,t,a,i){if(e===t)return 0;var s=r.string[i.empties[a]||i.emptyTo];return""===e&&0!==s?"boolean"==typeof s?s?-1:1:-s||-1:""===t&&0!==s?"boolean"==typeof s?s?1:-1:s||1:r.sortNatural(e,t)},sortNaturalDesc:function(e,t,a,i){if(e===t)return 0;var s=r.string[i.empties[a]||i.emptyTo];return""===e&&0!==s?"boolean"==typeof s?s?-1:1:s||1:""===t&&0!==s?"boolean"==typeof s?s?1:-1:-s||-1:r.sortNatural(t,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,t,a,i,s,o){if(e===t)return 0;var n=r.string[o.empties[s]||o.emptyTo];return""===e&&0!==n?"boolean"==typeof n?n?-1:1:-n||-1:""===t&&0!==n?"boolean"==typeof n?n?1:-1:n||1:(isNaN(e)&&(e=r.getTextValue(e,a,i)),isNaN(t)&&(t=r.getTextValue(t,a,i)),e-t)},sortNumericDesc:function(e,t,a,i,s,o){if(e===t)return 0;var n=r.string[o.empties[s]||o.emptyTo];return""===e&&0!==n?"boolean"==typeof n?n?-1:1:n||1:""===t&&0!==n?"boolean"==typeof n?n?1:-1:-n||-1:(isNaN(e)&&(e=r.getTextValue(e,a,i)),isNaN(t)&&(t=r.getTextValue(t,a,i)),t-e)},sortNumeric:function(e,t){return e-t},addWidget:function(e){e.id&&!r.isEmptyObject(r.getWidgetById(e.id))&&console.warn('"'+e.id+'" widget was loaded more than once!'),r.widgets[r.widgets.length]=e},hasWidget:function(e,r){return(e=t(e)).length&&e[0].config&&e[0].config.widgetInit[r]||!1},getWidgetById:function(e){var t,a,i=r.widgets.length;for(t=0;t<i;t++)if((a=r.widgets[t])&&a.id&&a.id.toLowerCase()===e.toLowerCase())return a},applyWidgetOptions:function(e){var a,i,s,o=e.config,n=o.widgets.length;if(n)for(a=0;a<n;a++)(i=r.getWidgetById(o.widgets[a]))&&i.options&&(s=t.extend(!0,{},i.options),o.widgetOptions=t.extend(!0,s,o.widgetOptions),t.extend(!0,r.defaults.widgetOptions,i.options))},addWidgetFromClass:function(e){var t,a,i=e.config,s="^"+i.widgetClass.replace(r.regex.templateName,"(\\S+)+")+"$",o=new RegExp(s,"g"),n=(e.className||"").split(r.regex.spaces);if(n.length)for(t=n.length,a=0;a<t;a++)n[a].match(o)&&(i.widgets[i.widgets.length]=n[a].replace(o,"$1"))},applyWidgetId:function(e,a,i){var s,o,n,l=(e=t(e)[0]).config,d=l.widgetOptions,c=r.getWidgetById(a);c&&(n=c.id,s=!1,t.inArray(n,l.widgets)<0&&(l.widgets[l.widgets.length]=n),l.debug&&(o=new Date),!i&&l.widgetInit[n]||(l.widgetInit[n]=!0,e.hasInitialized&&r.applyWidgetOptions(e),"function"==typeof c.init&&(s=!0,l.debug&&console[console.group?"group":"log"]("Initializing "+n+" widget"),c.init(e,c,l,d))),i||"function"!=typeof c.format||(s=!0,l.debug&&console[console.group?"group":"log"]("Updating "+n+" widget"),c.format(e,l,d,!1)),l.debug&&s&&(console.log("Completed "+(i?"initializing ":"applying ")+n+" widget"+r.benchmark(o)),console.groupEnd&&console.groupEnd()))},applyWidget:function(e,a,i){var s,o,n,l,d,c=(e=t(e)[0]).config,f=[];if(!1===a||!e.hasInitialized||!e.isApplyingWidgets&&!e.isUpdating){if(c.debug&&(d=new Date),r.addWidgetFromClass(e),clearTimeout(c.timerReady),c.widgets.length){for(e.isApplyingWidgets=!0,c.widgets=t.grep(c.widgets,function(e,r){return t.inArray(e,c.widgets)===r}),o=(n=c.widgets||[]).length,s=0;s<o;s++)(l=r.getWidgetById(n[s]))&&l.id?(l.priority||(l.priority=10),f[s]=l):c.debug&&console.warn('"'+n[s]+'" was enabled, but the widget code has not been loaded!');for(f.sort(function(e,t){return e.priority<t.priority?-1:e.priority===t.priority?0:1}),o=f.length,c.debug&&console[console.group?"group":"log"]("Start "+(a?"initializing":"applying")+" widgets"),s=0;s<o;s++)(l=f[s])&&l.id&&r.applyWidgetId(e,l.id,a);c.debug&&console.groupEnd&&console.groupEnd()}c.timerReady=setTimeout(function(){e.isApplyingWidgets=!1,t.data(e,"lastWidgetApplication",new Date),c.$table.triggerHandler("tablesorter-ready"),a||"function"!=typeof i||i(e),c.debug&&(l=c.widgets.length,console.log("Completed "+(!0===a?"initializing ":"applying ")+l+" widget"+(1!==l?"s":"")+r.benchmark(d)))},10)}},removeWidget:function(e,a,i){var s,o,n,l,d=(e=t(e)[0]).config;if(!0===a)for(a=[],l=r.widgets.length,n=0;n<l;n++)(o=r.widgets[n])&&o.id&&(a[a.length]=o.id);else a=(t.isArray(a)?a.join(","):a||"").toLowerCase().split(/[\s,]+/);for(l=a.length,s=0;s<l;s++)o=r.getWidgetById(a[s]),(n=t.inArray(a[s],d.widgets))>=0&&!0!==i&&d.widgets.splice(n,1),o&&o.remove&&(d.debug&&console.log((i?"Refreshing":"Removing")+' "'+a[s]+'" widget'),o.remove(e,d,d.widgetOptions,i),d.widgetInit[a[s]]=!1);d.$table.triggerHandler("widgetRemoveEnd",e)},refreshWidgets:function(e,a,i){var s,o,n=(e=t(e)[0]).config.widgets,l=r.widgets,d=l.length,c=[],f=function(e){t(e).triggerHandler("refreshComplete")};for(s=0;s<d;s++)(o=l[s])&&o.id&&(a||t.inArray(o.id,n)<0)&&(c[c.length]=o.id);r.removeWidget(e,c.join(","),!0),!0!==i?(r.applyWidget(e,a||!1,f),a&&r.applyWidget(e,!1,f)):f(e)},benchmark:function(e){return" ("+((new Date).getTime()-e.getTime())+" ms)"},log:function(){console.log(arguments)},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(e,a){if("string"!=typeof e||""===e)return e;var i;return e=(a&&a.config?!1!==a.config.usNumberFormat:void 0===a||a)?e.replace(r.regex.comma,""):e.replace(r.regex.digitNonUS,"").replace(r.regex.comma,"."),r.regex.digitNegativeTest.test(e)&&(e=e.replace(r.regex.digitNegativeReplace,"-$1")),i=parseFloat(e),isNaN(i)?t.trim(e):i},isDigit:function(e){return isNaN(e)?r.regex.digitTest.test(e.toString().replace(r.regex.digitReplace,"")):""!==e},computeColumnIndex:function(e,a){var i,s,o,n,l,d,c,f,u,g,p=a&&a.columns||0,h=[],m=new Array(p);for(i=0;i<e.length;i++)for(d=e[i].cells,s=0;s<d.length;s++){for(c=i,f=(l=d[s]).rowSpan||1,u=l.colSpan||1,void 0===h[c]&&(h[c]=[]),o=0;o<h[c].length+1;o++)if(void 0===h[c][o]){g=o;break}for(p&&l.cellIndex===g||(l.setAttribute?l.setAttribute("data-column",g):t(l).attr("data-column",g)),o=c;o<c+f;o++)for(void 0===h[o]&&(h[o]=[]),m=h[o],n=g;n<g+u;n++)m[n]="x"}return r.checkColumnCount(e,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(e){var a,i,s,o,n,l=(e=t(e)[0]).config,d=l.$table.children("colgroup");if(d.length&&d.hasClass(r.css.colgroup)&&d.remove(),l.widthFixed&&0===l.$table.children("colgroup").length){for(d=t('<colgroup class="'+r.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+"%",d.append(t("<col>").css("width",i));l.$table.prepend(d)}},getData:function(e,r,a){var i,s,o="",n=t(e);return n.length?(i=!!t.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]||""),t.trim(o)):""},getColumnData:function(e,r,a,i,s){if("object"!=typeof r||null===r)return r;var o,n=(e=t(e)[0]).config,l=s||n.$headers,d=n.$headerIndexed&&n.$headerIndexed[a]||l.find('[data-column="'+a+'"]:last');if(void 0!==r[a])return i?r[a]:r[l.index(d)];for(o in r)if("string"==typeof o&&d.filter(o).add(d.find(o)).length)return r[o]},isProcessing:function(e,a,i){var s=(e=t(e))[0].config,o=i||e.find("."+r.css.header);a?(void 0!==i&&s.sortList.length>0&&(o=o.filter(function(){return!this.sortDisabled&&r.isValueInArray(parseFloat(t(this).attr("data-column")),s.sortList)>=0})),e.add(o).addClass(r.css.processing+" "+s.cssProcessing)):e.add(o).removeClass(r.css.processing+" "+s.cssProcessing)},processTbody:function(e,r,a){if(e=t(e)[0],a)return e.isProcessing=!0,r.before('<colgroup class="tablesorter-savemyplace"/>'),t.fn.detach?r.detach():r.remove();var i=t(e).find("colgroup.tablesorter-savemyplace");r.insertAfter(i),i.remove(),e.isProcessing=!1},clearTableBody:function(e){t(e)[0].config.$tbodies.children().detach()},characterEquivalents:{a:"áàâãäąå",A:"ÁÀÂÃÄĄÅ",c:"çćč",C:"ÇĆČ",e:"éèêëěę",E:"ÉÈÊËĚĘ",i:"íìİîïı",I:"ÍÌİÎÏ",o:"óòôõöō",O:"ÓÒÔÕÖŌ",ss:"ß",SS:"ẞ",u:"úùûüů",U:"ÚÙÛÜŮ"},replaceAccents:function(e){var t,a="[",i=r.characterEquivalents;if(!r.characterRegex){r.characterRegexArray={};for(t in i)"string"==typeof t&&(a+=i[t],r.characterRegexArray[t]=new RegExp("["+i[t]+"]","g"));r.characterRegex=new RegExp(a+"]")}if(r.characterRegex.test(e))for(t in i)"string"==typeof t&&(e=e.replace(r.characterRegexArray[t],t));return e},validateOptions:function(e){var a,i,s,o,n="headers sortForce sortList sortAppend widgets".split(" "),l=e.originalSettings;if(l){e.debug&&(o=new Date);for(a in l)if("undefined"===(s=typeof r.defaults[a]))console.warn('Tablesorter Warning! "table.config.'+a+'" option not recognized');else if("object"===s)for(i in l[a])s=r.defaults[a]&&typeof r.defaults[a][i],t.inArray(a,n)<0&&"undefined"===s&&console.warn('Tablesorter Warning! "table.config.'+a+"."+i+'" option not recognized');e.debug&&console.log("validate options time:"+r.benchmark(o))}},restoreHeaders:function(e){var a,i,s=t(e)[0].config,o=s.$table.find(s.selectorHeaders),n=o.length;for(a=0;a<n;a++)(i=o.eq(a)).find("."+r.css.headerIn).length&&i.html(s.headerContent[a])},destroy:function(e,a,i){if((e=t(e)[0]).hasInitialized){r.removeWidget(e,!0,!1);var s,o=t(e),n=e.config,l=n.debug,d=o.find("thead:first"),c=d.find("tr."+r.css.headerRow).removeClass(r.css.headerRow+" "+n.cssHeaderRow),f=o.find("tfoot:first > tr").children("th, td");!1===a&&t.inArray("uitheme",n.widgets)>=0&&(o.triggerHandler("applyWidgetId",["uitheme"]),o.triggerHandler("applyWidgetId",["zebra"])),d.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(r.regex.spaces," ")),n.$headers.add(f).removeClass([r.css.header,n.cssHeader,n.cssAsc,n.cssDesc,r.css.sortAsc,r.css.sortDesc,r.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(r.regex.spaces," ")),r.restoreHeaders(e),o.toggleClass(r.css.table+" "+n.tableClass+" tablesorter-"+n.theme,!1===a),o.removeClass(n.namespace.slice(1)),e.hasInitialized=!1,delete e.config.cache,"function"==typeof i&&i(e),l&&console.log("tablesorter has been removed")}}};t.fn.tablesorter=function(e){return this.each(function(){var a=this,i=t.extend(!0,{},r.defaults,e,r.instanceMethods);i.originalSettings=e,!a.hasInitialized&&r.buildTable&&"TABLE"!==this.nodeName?r.buildTable(a,i):r.setup(a,i)})},window.console&&window.console.log||(r.logs=[],console={},console.log=console.warn=console.error=console.table=function(){var e=arguments.length>1?arguments:arguments[0];r.logs[r.logs.length]={date:Date.now(),log:e}}),r.addParser({id:"no-parser",is:function(){return!1},format:function(){return""},type:"text"}),r.addParser({id:"text",is:function(){return!0},format:function(e,a){var i=a.config;return e&&(e=t.trim(i.ignoreCase?e.toLocaleLowerCase():e),e=i.sortLocaleCompare?r.replaceAccents(e):e),e},type:"text"}),r.regex.nondigit=/[^\w,. \-()]/g,r.addParser({id:"digit",is:function(e){return r.isDigit(e)},format:function(e,a){var i=r.formatFloat((e||"").replace(r.regex.nondigit,""),a);return e&&"number"==typeof i?i:e?t.trim(e&&a.config.ignoreCase?e.toLocaleLowerCase():e):e},type:"numeric"}),r.regex.currencyReplace=/[+\-,. ]/g,r.regex.currencyTest=/^\(?\d+[\u00a3$\u20ac\u00a4\u00a5\u00a2?.]|[\u00a3$\u20ac\u00a4\u00a5\u00a2?.]\d+\)?$/,r.addParser({id:"currency",is:function(e){return e=(e||"").replace(r.regex.currencyReplace,""),r.regex.currencyTest.test(e)},format:function(e,a){var i=r.formatFloat((e||"").replace(r.regex.nondigit,""),a);return e&&"number"==typeof i?i:e?t.trim(e&&a.config.ignoreCase?e.toLocaleLowerCase():e):e},type:"numeric"}),r.regex.urlProtocolTest=/^(https?|ftp|file):\/\//,r.regex.urlProtocolReplace=/(https?|ftp|file):\/\/(www\.)?/,r.addParser({id:"url",is:function(e){return r.regex.urlProtocolTest.test(e)},format:function(e){return e?t.trim(e.replace(r.regex.urlProtocolReplace,"")):e},type:"text"}),r.regex.dash=/-/g,r.regex.isoDate=/^\d{4}[\/\-]\d{1,2}[\/\-]\d{1,2}/,r.addParser({id:"isoDate",is:function(e){return r.regex.isoDate.test(e)},format:function(e,t){var a=e?new Date(e.replace(r.regex.dash,"/")):e;return a instanceof Date&&isFinite(a)?a.getTime():e},type:"numeric"}),r.regex.percent=/%/g,r.regex.percentTest=/(\d\s*?%|%\s*?\d)/,r.addParser({id:"percent",is:function(e){return r.regex.percentTest.test(e)&&e.length<15},format:function(e,t){return e?r.formatFloat(e.replace(r.regex.percent,""),t):e},type:"numeric"}),r.addParser({id:"image",is:function(e,t,r,a){return a.find("img").length>0},format:function(e,r,a){return t(a).find("img").attr(r.config.imgAttr||"alt")||e},parsed:!0,type:"text"}),r.regex.dateReplace=/(\S)([AP]M)$/i,r.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,r.regex.usLongDateTest2=/^\d{1,2}\s+[A-Z]{3,10}\s+\d{4}/i,r.addParser({id:"usLongDate",is:function(e){return r.regex.usLongDateTest1.test(e)||r.regex.usLongDateTest2.test(e)},format:function(e,t){var a=e?new Date(e.replace(r.regex.dateReplace,"$1 $2")):e;return a instanceof Date&&isFinite(a)?a.getTime():e},type:"numeric"}),r.regex.shortDateTest=/(^\d{1,2}[\/\s]\d{1,2}[\/\s]\d{4})|(^\d{4}[\/\s]\d{1,2}[\/\s]\d{1,2})/,r.regex.shortDateReplace=/[\-.,]/g,r.regex.shortDateXXY=/(\d{1,2})[\/\s](\d{1,2})[\/\s](\d{4})/,r.regex.shortDateYMD=/(\d{4})[\/\s](\d{1,2})[\/\s](\d{1,2})/,r.convertFormat=function(e,t){e=(e||"").replace(r.regex.spaces," ").replace(r.regex.shortDateReplace,"/"),"mmddyyyy"===t?e=e.replace(r.regex.shortDateXXY,"$3/$1/$2"):"ddmmyyyy"===t?e=e.replace(r.regex.shortDateXXY,"$3/$2/$1"):"yyyymmdd"===t&&(e=e.replace(r.regex.shortDateYMD,"$1/$2/$3"));var a=new Date(e);return a instanceof Date&&isFinite(a)?a.getTime():""},r.addParser({id:"shortDate",is:function(e){return e=(e||"").replace(r.regex.spaces," ").replace(r.regex.shortDateReplace,"/"),r.regex.shortDateTest.test(e)},format:function(e,t,a,i){if(e){var s=t.config,o=s.$headerIndexed[i],n=o.length&&o.data("dateFormat")||r.getData(o,r.getColumnData(t,s.headers,i),"dateFormat")||s.dateFormat;return o.length&&o.data("dateFormat",n),r.convertFormat(e,n)||e}return e},type:"numeric"}),r.regex.timeTest=/^(0?[1-9]|1[0-2]):([0-5]\d)(\s[AP]M)$|^((?:[01]\d|[2][0-4]):[0-5]\d)$/i,r.regex.timeMatch=/(0?[1-9]|1[0-2]):([0-5]\d)(\s[AP]M)|((?:[01]\d|[2][0-4]):[0-5]\d)/i,r.addParser({id:"time",is:function(e){return r.regex.timeTest.test(e)},format:function(e,t){var a,i=(e||"").match(r.regex.timeMatch),s=new Date(e),o=e&&(null!==i?i[0]:"00:00 AM"),n=o?new Date("2000/01/01 "+o.replace(r.regex.dateReplace,"$1 $2")):o;return n instanceof Date&&isFinite(n)?(a=s instanceof Date&&isFinite(s)?s.getTime():0,a?parseFloat(n.getTime()+"."+s.getTime()):n.getTime()):e},type:"numeric"}),r.addParser({id:"metadata",is:function(){return!1},format:function(e,r,a){var i=r.config,s=i.parserMetadataName?i.parserMetadataName:"sortValue";return t(a).metadata()[s]},type:"numeric"}),r.addWidget({id:"zebra",priority:90,format:function(e,r,a){var i,s,o,n,l,d,c,f=new RegExp(r.cssChildRow,"i"),u=r.$tbodies.add(t(r.namespace+"_extra_table").children("tbody:not(."+r.cssInfoBlock+")"));for(l=0;l<u.length;l++)for(o=0,c=(i=u.eq(l).children("tr:visible").not(r.selectorRemove)).length,d=0;d<c;d++)s=i.eq(d),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,t,a,i){if(!i){var s,o,n=t.$tbodies,l=(a.zebra||["even","odd"]).join(" ");for(s=0;s<n.length;s++)(o=r.processTbody(e,n.eq(s),!0)).children().removeClass(l),r.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(a,i,s,o){var n,l,d,c=!1,f={},u=(a=e(a)[0]).config,g=u&&u.widgetOptions,p=(o&&o.storageType||g&&g.storage_storageType).toString().charAt(0).toLowerCase(),h=p?"":o&&o.useSessionStorage||g&&g.storage_useSessionStorage,m=e(a),b=o&&o.id||m.attr(o&&o.group||g&&g.storage_group||"data-table-group")||g&&g.storage_tableId||a.id||e(".tablesorter").index(m),y=o&&o.url||m.attr(o&&o.page||g&&g.storage_page||"data-table-page")||g&&g.storage_fixedUrl||u&&u.fixedUrl||t.location.pathname;if("c"!==p&&(p="s"===p||h?"sessionStorage":"localStorage")in t)try{t[p].setItem("_tmptest","temp"),c=!0,t[p].removeItem("_tmptest")}catch(e){u&&u.debug&&console.warn(p+" is not supported in this browser")}if(u.debug&&console.log("Storage widget using",c?p:"cookies"),e.parseJSON&&(c?f=e.parseJSON(t[p][i]||"null")||{}:(l=r.cookie.split(/[;\s|=]/),f=0!==(n=e.inArray(i,l)+1)?e.parseJSON(l[n]||"null")||{}:{})),void 0===s||!t.JSON||!JSON.hasOwnProperty("stringify"))return f&&f[y]?f[y][b]:"";f[y]||(f[y]={}),f[y][b]=s,c?t[p][i]=JSON.stringify(f):((d=new Date).setTime(d.getTime()+31536e6),r.cookie=i+"="+JSON.stringify(f).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,d,c,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(" "));for(a.debug&&(d=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++)c=a.$headers.add(e(a.namespace+"_extra_headers")).not(".sorter-false").filter('[data-column="'+s+'"]'),f=t.css.icon?c.find("."+t.css.icon):e(),(g=w.not(".sorter-false").filter('[data-column="'+s+'"]:last')).length&&(c.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),c.addClass(n),f.addClass(l||"")));a.debug&&console.log("Applying "+x+" theme"+t.benchmark(d))},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(),d=n.sortNone+" "+n.sortDesc+" "+n.sortAsc,c=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+" "+d+" "+n.active).filter("."+t.css.filterRow).removeClass(n.filterRow),l.find("."+t.css.icon).removeClass(n.icons+" "+c))}}})}(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,d,c,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(d=e(this),"none"!==this.style.display&&(c=d.children().removeClass(f),h&&h[0]&&(c.eq(h[0][0]).addClass(b[0]),m>1)))for(u=1;u<m;u++)c.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,d=r.$table,c=r.$tbodies,f="addRows updateCell update updateRows updateComplete appendCache filterReset filterAndSortReset filterFomatterUpdate filterEnd search stickyHeadersInit ".split(" ").join(r.namespace+"filter ");if(d.removeClass("hasFilters").unbind(f.replace(a.regex.spaces," ")).find("."+i.filterRow).remove(),s.filter_initialized=!1,!o){for(n=0;n<c.length;n++)(l=a.processTbody(t,c.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,d,c=e.extend({},i),f=i.filter.split(r.orSplit),u=i.iFilter.split(r.orSplit),g=f.length;for(o=0;o<g;o++){c.nestedFilters=!0,c.filter=""+(t.parseFilter(a,f[o],i)||""),c.iFilter=""+(t.parseFilter(a,u[o],i)||""),l="("+(t.parseFilter(a,c.filter,i)||"")+")";try{if(d=new RegExp(i.isMatch?l:"^"+l+"$",a.widgetOptions.filter_ignoreCase?"i":""),n=d.test(c.exact)||t.processTypes(a,c,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,d,c=e.extend({},i),f=i.filter.split(r.andSplit),u=i.iFilter.split(r.andSplit),g=f.length;for(o=0;o<g;o++){c.nestedFilters=!0,c.filter=""+(t.parseFilter(a,f[o],i)||""),c.iFilter=""+(t.parseFilter(a,u[o],i)||""),d=("("+(t.parseFilter(a,c.filter,i)||"")+")").replace(r.wild01,"\\S{1}").replace(r.wild0More,"\\S*");try{l=new RegExp(i.isMatch?d:"^"+d+"$",a.widgetOptions.filter_ignoreCase?"i":"").test(c.exact)||t.processTypes(a,c,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,d=i.table,c=s.parsed[s.index],f=a.formatFloat(s.iFilter.replace(r.operators,""),d),u=i.parsers[s.index]||{},g=f;return(c||"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),!c&&"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,d)):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,d=e.table,c=i.index,f=i.parsed[c],u=i.iFilter.split(r.toSplit);return o=u[0].replace(a.regex.nondigit,"")||"",n=a.formatFloat(t.parseFilter(e,o,i),d),o=u[1].replace(a.regex.nondigit,"")||"",l=a.formatFloat(t.parseFilter(e,o,i),d),(f||"numeric"===e.parsers[c].type)&&(n=""===(s=e.parsers[c].format(""+u[0],d,e.$headers.eq(c),c))||isNaN(s)?n:s,l=""===(s=e.parsers[c].format(""+u[1],d,e.$headers.eq(c),c))||isNaN(s)?l:s),!f&&"numeric"!==e.parsers[c].type||isNaN(n)||isNaN(l)?(o=isNaN(i.iExact)?i.iExact.replace(a.regex.nondigit,""):i.iExact,s=a.formatFloat(o,d)):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,d,c,f,u,g,p=s.config,h=p.widgetOptions;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+("+a.language.or+"|-|"+a.language.to+")\\s+)","i"),toTest:new RegExp("\\s+(-|"+a.language.to+")\\s+","i"),toSplit:new RegExp("(?:\\s+(?:-|"+a.language.to+")\\s+)","gi"),andTest:new RegExp("\\s+("+a.language.and+"|&&)\\s+","i"),andSplit:new RegExp("(?:\\s+(?:"+a.language.and+"|&&)\\s+)","gi"),orTest:new RegExp("(\\||\\s+"+a.language.or+"\\s+)","i"),orSplit:new RegExp("(?:\\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(c=0;c<p.columns;c++)if(u=a.getColumnData(s,h.filter_functions,c))if(d=p.$headerIndexed[c].removeClass("filter-select"),g=!(d.hasClass("filter-false")||d.hasClass("parser-false")),o="",!0===u&&g)t.buildSelect(s,c);else if("object"==typeof u&&g){for(n in u)"string"==typeof n&&(o+=""===o?'<option value="">'+(d.data("placeholder")||d.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="'+c+'"]').append(o),(u="function"==typeof(l=h.filter_selectSource)||a.getColumnData(s,l,c))&&t.buildSelect(p.table,c,"",!0,d.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 "),p.$table.unbind(l.replace(a.regex.spaces," ")).bind(l,function(t,r){d=r?p.$table.find("."+i.header).filter("[data-column]").filter(function(){return""!==r[e(this).data("column")]}):"",a.isProcessing(s,"filterStart"===t.type,r?d:"")})),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 a,i,s=r.widgetOptions,o=0,n=function(){s.filter_initialized=!0,r.lastSearch=r.$table.data("lastSearch"),r.$table.triggerHandler("filterInit",r),t.findRows(r.table,r.lastSearch||[])};if(e.isEmptyObject(s.filter_formatter))n();else{for(i=s.filter_formatterInit.length,a=0;a<i;a++)1===s.filter_formatterInit[a]&&o++;clearTimeout(s.filter_initTimer),s.filter_initialized||o!==s.filter_formatterCount?s.filter_initialized||(s.filter_initTimer=setTimeout(function(){n()},500)):n()}},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,d,c,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(c=i.$headers.add(s.filter_$externalFilters).filter("["+s.filter_defaultAttrib+"]"),l=0;l<=i.columns;l++)d=l===i.columns?"all":l,f[l]=c.filter('[data-column="'+d+'"]').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,d,c,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(d=0;d<b;d++)s.$headerIndexed[d].length&&(v+=(h=s.$headerIndexed[d]&&s.$headerIndexed[d][0].colSpan||0)>1?'<td data-column="'+d+"-"+(d+h-1)+'" colspan="'+h+'"':'<td data-column="'+d+'"',v+=y?m[d]?' class="'+m[d]+'"':"":""!==m?' class="'+m+'"':"",v+="></td>");for(s.$filters=e(v+="</tr>").appendTo(s.$table.children("thead").eq(0)).children("td"),d=0;d<b;d++)u=!1,(c=s.$headerIndexed[d])&&c.length&&(n=t.getColumnElm(s,s.$filters,d),p=a.getColumnData(r,o.filter_functions,d),f=o.filter_functions&&p&&"function"!=typeof p||c.hasClass("filter-select"),l=a.getColumnData(r,s.headers,d),u="false"===a.getData(c[0],l,"filter")||"false"===a.getData(c[0],l,"parser"),f?v=e("<select>").appendTo(n):((p=a.getColumnData(r,o.filter_formatter,d))?(o.filter_formatterCount++,(v=p(n,d))&&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=c.data("placeholder")||c.attr("data-placeholder")||o.filter_placeholder.search||"",v.attr("placeholder",h))),v&&(g=(e.isArray(o.filter_cssFilter)?void 0!==o.filter_cssFilter[d]?o.filter_cssFilter[d]||"":"":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=c.attr("data-"+r.replace(/{{|}}/g,"")),s=void 0===i?c.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,d=l.widgetOptions,c=l.namespace+"filter",f=d.filter_$externalFilters;!0!==o&&(n=d.filter_anyColumnSelector+","+d.filter_multipleColumnSelector,d.filter_$anyMatch=i.filter(n),f&&f.length?d.filter_$externalFilters=d.filter_$externalFilters.add(i):d.filter_$externalFilters=i,a.setFilters(r,l.$table.data("lastSearch")||[],!1===o)),n="keypress keyup keydown search change input ".split(" ").join(c+" "),i.attr("data-lastSearchTime",(new Date).getTime()).unbind(n.replace(a.regex.spaces," ")).bind("keydown"+c,function(e){if(e.which===s.escape&&!r.config.widgetOptions.filter_resetOnEsc)return!1}).bind("keyup"+c,function(i){d=r.config.widgetOptions;var o=parseInt(e(this).attr("data-column"),10),n="boolean"==typeof d.filter_liveSearch?d.filter_liveSearch:a.getColumnData(r,d.filter_liveSearch,o);if(void 0===n&&(n=d.filter_liveSearch.fallback||!1),e(this).attr("data-lastSearchTime",(new Date).getTime()),i.which===s.escape)this.value=d.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(c+" "),function(i){var o=parseInt(e(this).attr("data-column"),10),n=i.type,c="boolean"==typeof d.filter_liveSearch?d.filter_liveSearch:a.getColumnData(r,d.filter_liveSearch,o);!r.config.widgetOptions.filter_initialized||i.which!==s.enter&&"search"!==n&&"blur"!==n&&("change"!==n&&"input"!==n||!0!==c&&(!0===c||"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,d=e.isArray(s),c=d?s:a.getFilters(r,!0),f=c||[];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(d&&(a.setFilters(r,c,!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=[]),c=c||[],c=Array.prototype.map?c.map(String):c.join("<22>").split("<22>"),l.filter_initialized&&n.$table.triggerHandler("filterStart",[c]),!n.showProcessing)return t.findRows(r,c,f),!1;setTimeout(function(){return t.findRows(r,c,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,d=a;for(n<1&&s>1&&(o[1]=o[0]);i.test(d);)d=d.replace(i,o[l++]||""),i.test(d)&&l<n&&""!==(o[l]||"")&&(d=a.replace(i,d));return d},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,d,c,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,c=0;c<f;c++){for(s=i[c].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[c],"")}if(!r&&/,/.test(t))for(f=(l=t.split(/\s*,\s*/)).length,d=0;d<f;d++)""!==l[d]&&(c=parseInt(l[d],10))<e.columns&&(u[u.length]=c);if(!u.length)for(c=0;c<e.columns;c++)u[u.length]=c;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,d,c,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,c=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,(d=o.functions[h])&&("function"==typeof d?l=d(s.exact,s.cache,s.filter,h,s.$row,i,s):"function"==typeof d[c||s.filter]&&(l=d[f=c||s.filter](s.exact,s.cache,s.filter,h,s.$row,i,s))),null===l?(l=t.processTypes(i,s,o),f=!0===d&&("and"===s.matchedOn||"or"===s.matchedOn),null===l||f?!0===d?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,d,c,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={anyMatch:!1,filters:s,filter_regexCache:[]},H={noAnyMatch:["range","operators"],functions:[],excludeFilter:[],defaultColFilter:[],defaultAnyFilter:a.getColumnData(i,A.filter_defaultFilter,k.columns,!0)||""};for(D.parsed=[],h=0;h<k.columns;h++)D.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"),H.functions[h]=a.getColumnData(i,A.filter_functions,h)||k.$headerIndexed[h].hasClass("filter-select"),H.defaultColFilter[h]=a.getColumnData(i,A.filter_defaultFilter,h)||"",H.excludeFilter[h]=(a.getColumnData(i,A.filter_excludeFilter,h,!0)||"").split(/\s+/);for(k.debug&&(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,c=e(e.map(l,function(e){return e[h].$row.get()})),""===o.join("")||A.filter_serversideFiltering)c.removeClass(A.filter_filteredRow).not("."+k.cssChildRow).css("display","");else{if(c=c.not("."+k.cssChildRow),n=c.length,(A.filter_$anyMatch&&A.filter_$anyMatch.length||void 0!==s[k.columns])&&(D.anyMatchFlag=!0,D.anyMatchFilter=""+(s[k.columns]||A.filter_$anyMatch&&t.getLatestSearch(A.filter_$anyMatch).val()||""),A.filter_columnAnyMatch)){for(S=D.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&&(D.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(_=c.not("."+A.filter_filteredRow).length,$&&0===_&&($=!1),k.debug&&console.log("Filter: Searching through "+($&&_<n?_:"all")+" rows"),D.anyMatchFlag&&(k.sortLocaleCompare&&(D.anyMatchFilter=a.replaceAccents(D.anyMatchFilter)),A.filter_defaultFilter&&r.iQuery.test(H.defaultAnyFilter)&&(D.anyMatchFilter=t.defaultFilter(D.anyMatchFilter,H.defaultAnyFilter),$=!1),D.iAnyMatchFilter=A.filter_ignoreCase&&k.ignoreCase?D.anyMatchFilter.toLowerCase():D.anyMatchFilter),u=0;u<n;u++)if(T=c[u].className,!(u&&r.child.test(T)||$&&r.filtered.test(T))){if(D.$row=c.eq(u),D.rowIndex=u,D.cacheArray=l[u],d=D.cacheArray[k.columns],D.rawArray=d.raw,D.childRowText="",!A.filter_childByColumn){for(T="",m=d.child,C=0;C<m.length;C++)T+=" "+m[C].join(" ")||"";D.childRowText=A.filter_childRows?A.filter_ignoreCase?T.toLowerCase():T:""}if(y=!1,v=t.processRow(k,D,H),f=d.$row,x=!!v,m=d.$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++)D.$row=m.eq(C),D.cacheArray=d.child[C],D.rawArray=D.cacheArray,x=t.processRow(k,D,H),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+=c.not("."+A.filter_filteredRow).length,k.totalRows+=c.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)),k.debug&&console.log("Completed filter widget 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,d=o.$table.data("lastSearch")||[],c="function"==typeof l||a.getColumnData(r,l,i);if(s&&""!==d[i]&&(s=!1),!0===c)n=l(r,i,s);else{if(c instanceof e||"string"===e.type(c)&&c.indexOf("</option>")>=0)return c;if(e.isArray(c))n=c;else if("object"===e.type(l)&&c&&null===(n=c(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,d,c,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++)c=(o=i[n]).text?o.text:o,d=(u&&f.parsers&&f.parsers.length&&f.parsers[r].format(c,t,[],r)||c).toString(),d=f.widgetOptions.filter_ignoreCase?d.toLowerCase():d,o.text?(o.parsed=d,p[p.length]=o):p[p.length]={text:o,parsed:d};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,d,c,f,u,g=(t=e(t)[0]).config,p=g.widgetOptions,h=[];for(o=0;o<g.$tbodies.length;o++)for(d=g.cache[o],n=g.cache[o].normalized.length,s=0;s<n;s++)if(l=d.row?d.row[s]:d.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]=""+d.normalized[s][r],p.filter_childRows&&p.filter_childByColumn)for(u=d.normalized[s][g.columns].$row.length-1,c=0;c<u;c++)h[h.length]=""+d.normalized[s][g.columns].child[c][r]}else if(h[h.length]=d.normalized[s][g.columns].raw[r],p.filter_childRows&&p.filter_childByColumn)for(u=d.normalized[s][g.columns].$row.length,c=1;c<u;c++)f=d.normalized[s][g.columns].$row.eq(c).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 d,c,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(d=0;d<o.length;d++)if((h=o[d]).text){h["data-function-name"]=void 0===h.value?h.text:h.value,v+="<option";for(c in h)h.hasOwnProperty(c)&&"text"!==c&&(v+=" "+c+'="'+h[c]+'"');h.value||(v+=' value="'+h.text+'"'),v+=">"+h.text+"</option>"}else""+h!="[object Object]"&&(c=f=h=(""+h).replace(r.quote,"&quot;"),f.indexOf(b.filter_selectSourceSeparator)>=0&&(c=(u=f.split(b.filter_selectSourceSeparator))[0],f=u[1]),v+=""!==h?"<option "+(c===f?"":'data-function-name="'+h+'" ')+'value="'+c+'">'+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,d=n.columns;for(i=0;i<d;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,d,c,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++)c=n===u.columns?g.filter_anyColumnSelector+","+g.filter_multipleColumnSelector:'[data-column="'+n+'"]',(d=l.filter(c)).length&&(d=t.getLatestSearch(d),e.isArray(s)?(o&&d.length>1&&(d=d.slice(1)),n===u.columns&&(d=(c=d.filter(g.filter_anyColumnSelector)).length?c:d),d.val(s[n]).trigger("change"+u.namespace)):(f[n]=d.val()||"",n===u.columns?d.slice(1).filter('[data-column*="'+d.attr("data-column")+'"]').val(f[n]):d.slice(1).val(f[n])),n===u.columns&&d.length&&(g.filter_$anyMatch=d));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,d=o.$headers.length;for(n.resize_flag=!0,r=[],t=0;t<d;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,d,c,f=s.$table,u=e(o.stickyHeaders_attachTo),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"),d=l.length;for(a=0;a<d;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(){return 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,c)},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),d=e.isWindow(p[0]),c=u.length?d?p.scrollTop():p.offset().top:p.scrollTop(),g=o.stickyHeaders_includeCaption?0:f.children("caption").height()||0,h=c+l+w-g,m=f.height()-(C.height()+(b.height()||0))-g,y=h>n.top&&h<n.top+m?"visible":"hidden",x="visible"===y?a.css.stickyVis:a.css.stickyHide,_=!C.hasClass(x),S={visibility:y};u.length&&(_=!0,S.top=d?h-u.offset().top:u.scrollTop()),(i=z())!==parseInt(C.css("left"),10)&&(_=!0,S.left=i),S.top=(S.top||0)+l+w,_&&C.removeClass(a.css.stickyVis+" "+a.css.stickyHide).addClass(x).css(S),(y!==$||t)&&(F(),$=y)}};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),c=_.children().children(),x.css({height:0,width:0,margin:0}),c.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=(d=_.children("tr").children()).length,n=0;n<l;n++)s.onRenderHeader.apply(d.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,c.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,d=l.parent(),c=parseInt(l.css("margin-top"),10),f=a.resizable_vars={useStorage:r.storage&&!1!==a.resizable,$wrap:d,mouseXPosition:0,$target:null,$next:null,overflow:"auto"===d.css("overflow")||"scroll"===d.css("overflow")||"auto"===d.css("overflow-x")||"scroll"===d.css("overflow-x"),storedSizes:[]};for(r.resizableReset(t.table,!0),f.tableWidth=l.width(),f.fullWidth=Math.abs(d.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:c}).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"),d=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(d.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=t.$table.position().left,o.each(function(){var o=e(this),l=parseInt(o.attr("data-column"),10),d=t.columns-1,c=o.data("header");c&&(!c.is(":visible")||!a.resizable_addLastColumn&&r.resizable.checkVisibleColumns(t,l)?o.hide():(l<d||l===d&&a.resizable_addLastColumn)&&o.css({display:"inline-block",height:s,left:c.position().left-i+c.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,d=n.storedSizes[n.target],c=i.pageX-n.mouseXPosition;if(n.overflow){if(d+c>0){for(n.storedSizes[n.target]+=c,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]+=c,n.storedSizes[n.next]-=c,r.resizable.setWidths(t,a)):(n.storedSizes[n.target]+=c,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","auto")),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";var t=e.tablesorter||{};t.addWidget({id:"saveSort",priority:20,options:{saveSort:!0},init:function(e,t,r,a){t.format(e,r,a,!0)},format:function(r,a,i,s){var o,n,l=a.$table,d=!1!==i.saveSort,c={sortList:a.sortList};a.debug&&(n=new Date),l.hasClass("hasSaveSort")?d&&r.hasInitialized&&t.storage&&(t.storage(r,"tablesorter-savesort",c),a.debug&&console.log("saveSort widget: Saving last sort: "+a.sortList+t.benchmark(n))):(l.addClass("hasSaveSort"),c="",t.storage&&(c=(o=t.storage(r,"tablesorter-savesort"))&&o.hasOwnProperty("sortList")&&e.isArray(o.sortList)?o.sortList:"",a.debug&&console.log('saveSort: Last sort loaded: "'+c+'"'+t.benchmark(n)),l.bind("saveSortReset",function(e){e.stopPropagation(),t.storage(r,"tablesorter-savesort","")})),s&&c&&c.length>0?a.sortList=c:r.hasInitialized&&c&&c.length>0&&t.sortOn(a,c))},remove:function(e,r){r.$table.removeClass("hasSaveSort"),t.storage&&t.storage(e,"tablesorter-savesort","")}})}(e),e.tablesorter});