mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 05:02:36 +01:00
7 lines
138 KiB
JavaScript
7 lines
138 KiB
JavaScript
!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.28.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:"",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||e.hasInitialized===!0)return void(a.debug&&e.hasInitialized);var i="",s=t(e),l=t.metadata;e.hasInitialized=!1,e.isProcessing=!0,e.config=a,t.data(e,"tablesorter",a),a.debug&&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.table=e,a.$table=s.addClass(r.css.table+" "+a.tableClass+i).attr("role","grid"),a.$headers=s.find(a.selectorHeaders),a.namespace?a.namespace="."+a.namespace.replace(r.regex.nonWord,""):a.namespace=".tablesorter"+Math.random().toString(16).slice(2),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],i.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&&"undefined"!=typeof s.data().sortlist?a.sortList=s.data().sortlist:l&&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&&a.debug&&console.groupEnd,s.triggerHandler("tablesorter-initialized",e),"function"==typeof a.initialized&&a.initialized(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,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,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),e.originalSettings=i,this.hasInitialized=!1,r.setup(this,e)})},bindEvents:function(e,a,i){e=t(e)[0];var s,l=e.config,n=l.namespace,o=null;i!==!0&&(a.addClass(n.slice(1)+"_extra_headers"),s=t.fn.closest?a.closest("table")[0]:a.parents("table")[0],s&&"TABLE"===s.nodeName&&s!==e&&t(s).addClass(n.slice(1)+"_extra_table")),s=(l.pointerDown+" "+l.pointerUp+" "+l.pointerClick+" sort keyup ").replace(r.regex.spaces," ").split(" ").join(n+" "),a.find(l.selectorSort).add(a.filter(l.selectorSort)).unbind(s).bind(s,function(e,i){var s,n,c,d=t(e.target),u=" "+e.type+" ";if(!(1!==(e.which||e.button)&&!u.match(" "+l.pointerClick+" | sort | keyup ")||" keyup "===u&&e.which!==r.keyCodes.enter||u.match(" "+l.pointerClick+" ")&&"undefined"!=typeof e.which||u.match(" "+l.pointerUp+" ")&&o!==e.target&&i!==!0)){if(u.match(" "+l.pointerDown+" "))return o=e.target,c=d.jquery.split("."),void("1"===c[0]&&c[1]<4&&e.preventDefault());if(o=null,r.regex.formElements.test(e.target.nodeName)||d.hasClass(l.cssNoSort)||d.parents("."+l.cssNoSort).length>0||d.parents("button").length>0)return!l.cancelSelection;l.delayInit&&r.isEmptyObject(l.cache)&&r.buildCache(l),s=t.fn.closest?t(this).closest("th, td"):/TH|TD/.test(this.nodeName)?t(this):t(this).parents("th, td"),c=a.index(s),l.last.clickedIndex=c<0?s.attr("data-column"):c,n=l.$headers[l.last.clickedIndex],n&&!n.sortDisabled&&r.initSort(l,n,e)}}),l.cancelSelection&&a.attr("unselectable","on").bind("selectstart",!1).css({"user-select":"none",MozUserSelect:"none"})},buildHeaders:function(e){var a,i,s,l;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 l,n,o,c,d,u=t(a);if(!u.parent().hasClass(e.cssIgnoreRow))return l=r.getColumnData(e.table,e.headers,s,!0),e.headerContent[s]=u.html(),""===e.headerTemplate||u.find("."+r.css.headerIn).length||(c=e.headerTemplate.replace(r.regex.templateContent,u.html()).replace(r.regex.templateIcon,u.find("."+r.css.icon).length?"":i),e.onRenderTemplate&&(n=e.onRenderTemplate.apply(u,[s,c]),n&&"string"==typeof n&&(c=n)),u.html('<div class="'+r.css.headerIn+'">'+c+"</div>")),e.onRenderHeader&&e.onRenderHeader.apply(u,[s,e,e.$table]),o=parseInt(u.attr("data-column"),10),a.column=o,d=r.getOrder(r.getData(u,l,"sortInitialOrder")||e.sortInitialOrder),e.sortVars[o]={count:-1,order:d?e.sortReset?[1,0,2]:[1,0]:e.sortReset?[0,1,2]:[0,1],lockedOrder:!1},d=r.getData(u,l,"lockedOrder")||!1,"undefined"!=typeof d&&d!==!1&&(e.sortVars[o].lockedOrder=!0,e.sortVars[o].order=r.getOrder(d)?[1,1]:[0,0]),e.headerList[s]=a,u.addClass(r.css.header+" "+e.cssHeader).parent().addClass(r.css.headerRow+" "+e.cssHeaderRow).attr("role","row"),e.tabIndex&&u.attr("tabindex",0),a})),e.$headerIndexed=[],l=0;l<e.columns;l++)r.isEmptyObject(e.sortVars[l])&&(e.sortVars[l]={}),a=e.$headers.filter('[data-column="'+l+'"]'),e.$headerIndexed[l]=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},addInstanceMethods:function(e){t.extend(r.instanceMethods,e)},setupParsers:function(e,t){var a,i,s,l,n,o,c,d,u,f,p,g,h,m,b=e.table,y=0,_={};if(e.$tbodies=e.$table.children("tbody:not(."+e.cssInfoBlock+")"),h="undefined"==typeof t?e.$tbodies:t,m=h.length,0===m)return e.debug?void 0:"";for(e.debug&&(g=new Date),i={extractors:[],parsers:[]};y<m;){if(a=h[y].rows,a.length)for(n=0,l=e.columns,o=0;o<l;o++){if(c=e.$headerIndexed[n],c&&c.length&&(d=r.getColumnData(b,e.headers,n),p=r.getParserById(r.getData(c,d,"extractor")),f=r.getParserById(r.getData(c,d,"sorter")),u="false"===r.getData(c,d,"parser"),e.empties[n]=(r.getData(c,d,"empty")||e.emptyTo||(e.emptyToBottom?"bottom":"top")).toLowerCase(),e.strings[n]=(r.getData(c,d,"string")||e.stringTo||"max").toLowerCase(),u&&(f=r.getParserById("no-parser")),p||(p=!1),f||(f=r.detectParserForColumn(e,a,-1,n)),e.debug&&(_["("+n+") "+c.text()]={parser:f.id,extractor:p?p.id:"none",string:e.strings[n],empty:e.empties[n]}),i.parsers[n]=f,i.extractors[n]=p,s=c[0].colSpan-1,s>0))for(n+=s,l+=s;s+1>0;)i.parsers[n-s]=f,i.extractors[n-s]=p,s--;n++}y+=i.parsers.length?m:1}e.debug&&(!r.isEmptyObject(_),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 l,n,o,c=r.parsers.length,d=!1,u="",f=!0;""===u&&f;)i++,o=a[i],o&&i<50?o.className.indexOf(r.cssIgnoreRow)<0&&(d=a[i].cells[s],u=r.getElementText(e,d,s),n=t(d),e.debug):f=!1;for(;--c>=0;)if(l=r.parsers[c],l&&"text"!==l.id&&l.is&&l.is(u,e.table,d,n))return l;return r.getParserById("text")},getElementText:function(e,a,i){if(!a)return"";var s,l=e.textExtraction||"",n=a.jquery?a:t(a);return"string"==typeof l?"basic"===l&&"undefined"!=typeof(s=n.attr(e.textAttribute))?t.trim(s):t.trim(a.textContent||n.text()):"function"==typeof l?t.trim(l(n[0],e.table,i)):"function"==typeof(s=r.getColumnData(e.table,l,i))?t.trim(s(n[0],e.table,i)):t.trim(n[0].textContent||n.text())},getParsedText:function(e,t,a,i){"undefined"==typeof i&&(i=r.getElementText(e,t,a));var s=""+i,l=e.parsers[a],n=e.extractors[a];return l&&(n&&"function"==typeof n.format&&(i=n.format(i,e.table,t,a)),s="no-parser"===l.id?"":l.format(""+i,e.table,t,a),e.ignoreCase&&"string"==typeof s&&(s=s.toLowerCase())),s},buildCache:function(e,a,i){var s,l,n,o,c,d,u,f,p,g,h,m,b,y,_,w,v,x,C,$,S,F,R=e.table,z=e.parsers;if(e.$tbodies=e.$table.children("tbody:not(."+e.cssInfoBlock+")"),u="undefined"==typeof i?e.$tbodies:i,e.cache={},e.totalRows=0,!z)return e.debug?void 0:"";for(e.debug&&(m=new Date),e.showProcessing&&r.isProcessing(R,!0),d=0;d<u.length;d++){for(w=[],s=e.cache[d]={normalized:[]},b=u[d]&&u[d].rows.length||0,o=0;o<b;++o)if(y={child:[],raw:[]},f=t(u[d].rows[o]),p=[],!f.hasClass(e.selectorRemove.slice(1)))if(f.hasClass(e.cssChildRow)&&0!==o)for(S=s.normalized.length-1,_=s.normalized[S][e.columns],_.$row=_.$row.add(f),f.prev().hasClass(e.cssChildRow)||f.prev().addClass(r.css.cssHasChild),g=f.children("th, td"),S=_.child.length,_.child[S]=[],x=0,$=e.columns,c=0;c<$;c++)h=g[c],h&&(_.child[S][c]=r.getParsedText(e,h,c),v=g[c].colSpan-1,v>0&&(x+=v,$+=v)),x++;else{for(y.$row=f,y.order=o,x=0,$=e.columns,c=0;c<$;++c){if(h=f[0].cells[c],h&&x<e.columns&&(C="undefined"!=typeof z[x],!C&&e.debug,l=r.getElementText(e,h,x),y.raw[x]=l,n=r.getParsedText(e,h,x,l),p[x]=n,C&&"numeric"===(z[x].type||"").toLowerCase()&&(w[x]=Math.max(Math.abs(n)||0,w[x]||0)),v=h.colSpan-1,v>0)){for(F=0;F<=v;)n=e.duplicateSpan||0===F?l:"string"!=typeof e.textExtraction?r.getElementText(e,h,x+F)||"":"",y.raw[x+F]=n,p[x+F]=n,F++;x+=v,$+=v}x++}p[e.columns]=y,s.normalized[s.normalized.length]=p}s.colMax=w,e.totalRows+=s.normalized.length}if(e.showProcessing&&r.isProcessing(R),e.debug){for(S=Math.min(5,e.cache[0].normalized.length),l={},c=0;c<e.columns;c++)for(x=0;x<S;x++)l["row: "+x]||(l["row: "+x]={}),l["row: "+x][e.$headerIndexed[c].text()]=e.cache[0].normalized[x][c];console.groupEnd}t.isFunction(a)&&a(R)},getColumnText:function(e,a,i,s){e=t(e)[0];var l,n,o,c,d,u,f,p,g,h,m="function"==typeof i,b="all"===a,y={raw:[],parsed:[],$cell:[]},_=e.config;if(!r.isEmptyObject(_)){for(d=_.$tbodies.length,l=0;l<d;l++)for(o=_.cache[l].normalized,u=o.length,n=0;n<u;n++)c=o[n],s&&!c[_.columns].$row.is(s)||(h=!0,p=b?c.slice(0,_.columns):c[a],c=c[_.columns],f=b?c.raw:c.raw[a],g=b?c.$row.children():c.$row.children().eq(a),m&&(h=i({tbodyIndex:l,rowIndex:n,parsed:p,raw:f,$row:c.$row,$cell:g})),h!==!1&&(y.parsed[y.parsed.length]=p,y.raw[y.raw.length]=f,y.$cell[y.$cell.length]=g));return y}_.debug},setHeadersCss:function(e){var a,i,s,l=e.sortList,n=l.length,o=r.css.sortNone+" "+e.cssNone,c=[r.css.sortAsc+" "+e.cssAsc,r.css.sortDesc+" "+e.cssDesc],d=[e.cssIconAsc,e.cssIconDesc,e.cssIconNone],u=["ascending","descending"],f=e.$table.find("tfoot tr").children("td, th").add(t(e.namespace+"_extra_headers")).removeClass(c.join(" "));for(e.$headers.add(t("thead "+e.namespace+"_extra_headers")).removeClass(c.join(" ")).addClass(o).attr("aria-sort","none").find("."+r.css.icon).removeClass(d.join(" ")).addClass(d[2]),i=0;i<n;i++)if(2!==l[i][1]&&(a=e.$headers.filter(function(t){for(var a=!0,i=e.$headers.eq(t),s=parseInt(i.attr("data-column"),10),l=s+e.$headers[t].colSpan;s<l;s++)a=!!a&&(a||r.isValueInArray(s,e.sortList)>-1);return a}),a=a.not(".sorter-false").filter('[data-column="'+l[i][0]+'"]'+(1===n?":last":"")),a.length)){for(s=0;s<a.length;s++)a[s].sortDisabled||a.eq(s).removeClass(o).addClass(c[l[i][1]]).attr("aria-sort",u[l[i][1]]).find("."+r.css.icon).removeClass(d[2]).addClass(d[l[i][1]]);f.length&&f.filter('[data-column="'+l[i][0]+'"]').removeClass(o).addClass(c[l[i][1]])}for(n=e.$headers.length,i=0;i<n;i++)r.setColumnAriaLabel(e,e.$headers.eq(i))},setColumnAriaLabel:function(e,a,i){if(a.length){var s=parseInt(a.attr("data-column"),10),l=e.sortVars[s],n=a.hasClass(r.css.sortAsc)?"sortAsc":a.hasClass(r.css.sortDesc)?"sortDesc":"sortNone",o=t.trim(a.text())+": "+r.language[n];a.hasClass("sorter-false")||i===!1?o+=r.language.sortDisabled:(n=(l.count+1)%l.order.length,i=l.order[n],o+=r.language[0===i?"nextAsc":1===i?"nextDesc":"nextNone"]),a.attr("aria-label",o)}},updateHeader:function(e){var t,a,i,s,l=e.table,n=e.$headers.length;for(t=0;t<n;t++)i=e.$headers.eq(t),s=r.getColumnData(l,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,l,n,o,c,d,u,f=a||e.sortList,p=f.length;for(e.sortList=[],n=0;n<p;n++)if(d=f[n],i=parseInt(d[0],10),i<e.columns){switch(e.sortVars[i].order||(u=r.getOrder(e.sortInitialOrder)?e.sortReset?[1,0,2]:[1,0]:e.sortReset?[0,1,2]:[0,1],e.sortVars[i].order=u,e.sortVars[i].count=0),u=e.sortVars[i].order,s=(""+d[1]).match(/^(1|d|s|o|n)/),s=s?s[0]:""){case"1":case"d":s=1;break;case"s":s=o||0;break;case"o":c=u[(o||0)%u.length],s=0===c?1:1===c?0:2;break;case"n":s=u[++e.sortVars[i].count%u.length];break;default:s=0}o=0===n?s:o,l=[i,parseInt(s,10)||0],e.sortList[e.sortList.length]=l,s=t.inArray(l[1],u),e.sortVars[i].count=s>=0?s:l[1]%u.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){var i=e.table;i.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(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 l,n,o,c,d,u,f=e.$tbodies,p=t(a),g=f.index(t.fn.closest?p.closest("tbody"):p.parents("tbody").filter(":first")),h=e.cache[g],m=t.fn.closest?p.closest("tr"):p.parents("tr").filter(":first");if(a=p[0],f.length&&g>=0){if(o=f.eq(g).find("tr").index(m),d=h.normalized[o],u=m[0].cells.length,u!==e.columns)for(c=0,l=!1,n=0;n<u;n++)l||m[0].cells[n]===a?l=!0:c+=m[0].cells[n].colSpan;else c=p.index();l=r.getElementText(e,a,c),d[e.columns].raw[c]=l,l=r.getParsedText(e,a,c,l),d[c]=l,d[e.columns].$row=m,"numeric"===(e.parsers[c].type||"").toLowerCase()&&(h.colMax[c]=Math.max(Math.abs(l)||0,h.colMax[c]||0)),l="undefined"!==i?i:e.resort,l!==!1?r.checkResort(e,l,s):r.resortComplete(e,s)}else e.debug,e.table.isUpdating=!1},addRows:function(a,i,s,l){var n,o,c,d,u,f,p,g,h,m,b,y,_,w="string"==typeof i&&1===a.$tbodies.length&&/<tr/.test(i||""),v=a.table;if(w)i=t(i),a.$tbodies.append(i);else if(!(i&&i instanceof e&&(t.fn.closest?i.closest("table")[0]:i.parents("table")[0])===a.table))return a.debug,!1;if(v.isUpdating=!0,r.isEmptyObject(a.cache))r.updateHeader(a),r.commonUpdate(a,s,l);else{for(u=i.filter("tr").attr("role","row").length,c=a.$tbodies.index(i.parents("tbody").filter(":first")),a.parsers&&a.parsers.length||r.setupParsers(a),d=0;d<u;d++){for(h=0,p=i[d].cells.length,g=a.cache[c].normalized.length,b=[],m={child:[],raw:[],$row:i.eq(d),order:g},f=0;f<p;f++)y=i[d].cells[f],n=r.getElementText(a,y,h),m.raw[h]=n,o=r.getParsedText(a,y,h,n),b[h]=o,"numeric"===(a.parsers[h].type||"").toLowerCase()&&(a.cache[c].colMax[h]=Math.max(Math.abs(o)||0,a.cache[c].colMax[h]||0)),_=y.colSpan-1,_>0&&(h+=_),h++;b[a.columns]=m,a.cache[c].normalized[g]=b}r.checkResort(a,s,l)}},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,l,n,o,c,d=e.table,u=e.widgetOptions,f=e.$tbodies,p=[],g=e.cache;if(r.isEmptyObject(g))return e.appender?e.appender(d,p):d.isUpdating?e.$table.triggerHandler("updateComplete",d):"";for(e.debug&&(c=new Date),o=0;o<f.length;o++)if(s=f.eq(o),s.length){for(l=r.processTbody(d,s,!0),a=g[o].normalized,i=a.length,n=0;n<i;n++)p[p.length]=a[n][e.columns].$row,e.appender&&(!e.pager||e.pager.removeRows&&u.pager_removeRows||e.pager.ajax)||l.append(a[n][e.columns].$row);r.processTbody(d,l,!1)}e.appender&&e.appender(d,p),e.debug,t||e.appender||r.applyWidget(d),d.isUpdating&&e.$table.triggerHandler("updateComplete",d)},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,l,n,o,c,d,u,f=!i[e.sortMultiSortKey],p=e.table,g=e.$headers.length,h=parseInt(t(a).attr("data-column"),10),m=e.sortVars[h].order;if(e.$table.triggerHandler("sortStart",p),d=(e.sortVars[h].count+1)%m.length,e.sortVars[h].count=i[e.sortResetKey]?2:d,e.sortRestart)for(n=0;n<g;n++)u=e.$headers.eq(n),d=parseInt(u.attr("data-column"),10),h!==d&&(f||u.hasClass(r.css.sortNone))&&(e.sortVars[d].count=-1);if(f){if(e.sortList=[],e.last.sortList=[],null!==e.sortForce)for(s=e.sortForce,l=0;l<s.length;l++)s[l][0]!==h&&(e.sortList[e.sortList.length]=s[l]);if(o=m[e.sortVars[h].count],o<2&&(e.sortList[e.sortList.length]=[h,o],a.colSpan>1))for(l=1;l<a.colSpan;l++)e.sortList[e.sortList.length]=[h+l,o],e.sortVars[h+l].count=t.inArray(o,m)}else if(e.sortList=t.extend([],e.last.sortList),r.isValueInArray(h,e.sortList)>=0)for(l=0;l<e.sortList.length;l++)d=e.sortList[l],d[0]===h&&(d[1]=m[e.sortVars[h].count],2===d[1]&&(e.sortList.splice(l,1),e.sortVars[h].count=-1));else if(o=m[e.sortVars[h].count],o<2&&(e.sortList[e.sortList.length]=[h,o],a.colSpan>1))for(l=1;l<a.colSpan;l++)e.sortList[e.sortList.length]=[h+l,o],e.sortVars[h+l].count=t.inArray(o,m);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(l=0;l<s.length;l++)if(s[l][0]!==h&&r.isValueInArray(s[l][0],e.sortList)<0){if(o=s[l][1],c=(""+o).match(/^(a|d|s|o|n)/))switch(d=e.sortList[0][1],c[0]){case"d":o=1;break;case"s":o=d;break;case"o":o=0===d?1:0;break;case"n":o=(d+1)%m.length;break;default:o=0}e.sortList[e.sortList.length]=[s[l][0],o]}e.$table.triggerHandler("sortBegin",p),setTimeout(function(){r.setHeadersCss(e),r.multisort(e),r.appendCache(e),e.$table.triggerHandler("sortBeforeEnd",p),e.$table.triggerHandler("sortEnd",p)},1)},multisort:function(e){var t,a,i,s,l,n=e.table,o=[],c=0,d=e.textSorter||"",u=e.sortList,f=u.length,p=e.$tbodies.length;if(!e.serverSideSorting&&!r.isEmptyObject(e.cache)){if(e.debug&&(a=new Date),"object"==typeof d)for(i=e.columns;i--;)l=r.getColumnData(n,d,i),"function"==typeof l&&(o[i]=l);for(t=0;t<p;t++)i=e.cache[t].colMax,s=e.cache[t].normalized,s.sort(function(t,a){var s,l,p,g,h,m,b;for(s=0;s<f;s++){if(p=u[s][0],g=u[s][1],c=0===g,e.sortStable&&t[p]===a[p]&&1===f)return t[e.columns].order-a[e.columns].order;if(l=/n/i.test(r.getSortType(e.parsers,p)),l&&e.strings[p]?(l="boolean"==typeof r.string[e.strings[p]]?(c?1:-1)*(r.string[e.strings[p]]?-1:1):e.strings[p]?r.string[e.strings[p]]||0:0,h=e.numberSorter?e.numberSorter(t[p],a[p],c,i[p],n):r["sortNumeric"+(c?"Asc":"Desc")](t[p],a[p],l,i[p],p,e)):(m=c?t:a,b=c?a:t,h="function"==typeof d?d(m[p],b[p],c,p,n):"function"==typeof o[p]?o[p](m[p],b[p],c,p,n):r["sortNatural"+(c?"Asc":"Desc")](t[p],a[p],p,e)),h)return h}return t[e.columns].order-a[e.columns].order});e.debug}},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,l="undefined"==typeof a?e.resort:a;l===!1||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 l=e.table;e.$table.triggerHandler("sortStart",l),r.updateHeaderSortCount(e,a),r.setHeadersCss(e),e.delayInit&&r.isEmptyObject(e.cache)&&r.buildCache(e),e.$table.triggerHandler("sortBegin",l),r.multisort(e),r.appendCache(e,s),e.$table.triggerHandler("sortBeforeEnd",l),e.$table.triggerHandler("sortEnd",l),r.applyWidget(l),t.isFunction(i)&&i(l)},sortReset:function(e,a){e.sortList=[],r.setHeadersCss(e),r.multisort(e),r.appendCache(e),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;var a,i,s,l,n,o,c=r.regex;if(c.hex.test(t)){if(a=parseInt((e||"").match(c.hex),16),i=parseInt((t||"").match(c.hex),16),a<i)return-1;if(a>i)return 1}for(a=(e||"").replace(c.chunk,"\\0$1\\0").replace(c.chunks,"").split("\\0"),i=(t||"").replace(c.chunk,"\\0$1\\0").replace(c.chunks,"").split("\\0"),o=Math.max(a.length,i.length),n=0;n<o;n++){if(s=isNaN(a[n])?a[n]||0:parseFloat(a[n])||0,l=isNaN(i[n])?i[n]||0:parseFloat(i[n])||0,isNaN(s)!==isNaN(l))return isNaN(s)?1:-1;if(typeof s!=typeof l&&(s+="",l+=""),s<l)return-1;if(s>l)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,l){if(e===t)return 0;var n=r.string[l.empties[s]||l.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,l){if(e===t)return 0;var n=r.string[l.empties[s]||l.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)),r.widgets[r.widgets.length]=e},hasWidget:function(e,r){return e=t(e),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&&a.id&&a.id.toLowerCase()===e.toLowerCase())return a},applyWidgetOptions:function(e){var a,i,s=e.config,l=s.widgets.length;if(l)for(a=0;a<l;a++)i=r.getWidgetById(s.widgets[a]),i&&i.options&&(s.widgetOptions=t.extend(!0,{},i.options,s.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+)+")+"$",l=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(l)&&(i.widgets[i.widgets.length]=n[a].replace(l,"$1"))},applyWidgetId:function(e,a,i){e=t(e)[0];var s,l,n,o=e.config,c=o.widgetOptions,d=r.getWidgetById(a);d&&(n=d.id,s=!1,t.inArray(n,o.widgets)<0&&(o.widgets[o.widgets.length]=n),o.debug&&(l=new Date),!i&&o.widgetInit[n]||(o.widgetInit[n]=!0,e.hasInitialized&&r.applyWidgetOptions(e),"function"==typeof d.init&&(s=!0,o.debug,d.init(e,d,o,c))),i||"function"!=typeof d.format||(s=!0,o.debug,d.format(e,o,c,!1)),o.debug&&s&&console.groupEnd)},applyWidget:function(e,a,i){e=t(e)[0];var s,l,n,o,c,d=e.config,u=[];if(a===!1||!e.hasInitialized||!e.isApplyingWidgets&&!e.isUpdating){if(d.debug&&(c=new Date),r.addWidgetFromClass(e),clearTimeout(d.timerReady),d.widgets.length){for(e.isApplyingWidgets=!0,d.widgets=t.grep(d.widgets,function(e,r){return t.inArray(e,d.widgets)===r}),n=d.widgets||[],l=n.length,s=0;s<l;s++)o=r.getWidgetById(n[s]),o&&o.id?(o.priority||(o.priority=10),u[s]=o):d.debug;for(u.sort(function(e,t){return e.priority<t.priority?-1:e.priority===t.priority?0:1}),l=u.length,d.debug,s=0;s<l;s++)o=u[s],o&&o.id&&r.applyWidgetId(e,o.id,a);d.debug&&console.groupEnd,a||"function"!=typeof i||i(e)}d.timerReady=setTimeout(function(){e.isApplyingWidgets=!1,t.data(e,"lastWidgetApplication",new Date),d.$table.triggerHandler("tablesorter-ready")},10),d.debug&&(o=d.widgets.length)}},removeWidget:function(e,a,i){e=t(e)[0];var s,l,n,o,c=e.config;if(a===!0)for(a=[],o=r.widgets.length,n=0;n<o;n++)l=r.widgets[n],l&&l.id&&(a[a.length]=l.id);else a=(t.isArray(a)?a.join(","):a||"").toLowerCase().split(/[\s,]+/);for(o=a.length,s=0;s<o;s++)l=r.getWidgetById(a[s]),n=t.inArray(a[s],c.widgets),n>=0&&i!==!0&&c.widgets.splice(n,1),l&&l.remove&&(c.debug,l.remove(e,c,c.widgetOptions,i),c.widgetInit[a[s]]=!1)},refreshWidgets:function(e,a,i){e=t(e)[0];var s,l,n=e.config,o=n.widgets,c=r.widgets,d=c.length,u=[],f=function(e){t(e).triggerHandler("refreshComplete")};for(s=0;s<d;s++)l=c[s],l&&l.id&&(a||t.inArray(l.id,o)<0)&&(u[u.length]=l.id);r.removeWidget(e,u.join(","),!0),i!==!0?(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(){},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,s=a&&a.config?a.config.usNumberFormat!==!1:"undefined"==typeof a||a;return e=s?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,r){var a,i,s,l,n,o,c,d,u,f,p=r&&r.columns||0,g=[],h=new Array(p);for(a=0;a<e.length;a++)for(o=e[a].cells,i=0;i<o.length;i++){for(n=o[i],c=n.parentNode.rowIndex,d=n.rowSpan||1,u=n.colSpan||1,"undefined"==typeof g[c]&&(g[c]=[]),s=0;s<g[c].length+1;s++)if("undefined"==typeof g[c][s]){f=s;break}for(p&&n.cellIndex===f||(n.setAttribute?n.setAttribute("data-column",f):t(n).attr("data-column",f)),s=c;s<c+d;s++)for("undefined"==typeof g[s]&&(g[s]=[]),h=g[s],l=f;l<f+u;l++)h[l]="x"}return h.length},fixColumnWidth:function(e){e=t(e)[0];var a,i,s,l,n,o=e.config,c=o.$table.children("colgroup");if(c.length&&c.hasClass(r.css.colgroup)&&c.remove(),o.widthFixed&&0===o.$table.children("colgroup").length){for(c=t('<colgroup class="'+r.css.colgroup+'">'),a=o.$table.width(),s=o.$tbodies.find("tr:first").children(":visible"),l=s.length,n=0;n<l;n++)i=parseInt(s.eq(n).width()/a*1e3,10)/10+"%",c.append(t("<col>").css("width",i));o.$table.prepend(c)}},getData:function(e,r,a){var i,s,l="",n=t(e);return n.length?(i=!!t.metadata&&n.metadata(),s=" "+(n.attr("class")||""),"undefined"!=typeof n.data(a)||"undefined"!=typeof n.data(a.toLowerCase())?l+=n.data(a)||n.data(a.toLowerCase()):i&&"undefined"!=typeof i[a]?l+=i[a]:r&&"undefined"!=typeof r[a]?l+=r[a]:" "!==s&&s.match(" "+a+"-")&&(l=s.match(new RegExp("\\s"+a+"-([\\w-]+)"))[1]||""),t.trim(l)):""},getColumnData:function(e,r,a,i,s){if("object"!=typeof r||null===r)return r;e=t(e)[0];var l,n,o=e.config,c=s||o.$headers,d=o.$headerIndexed&&o.$headerIndexed[a]||c.filter('[data-column="'+a+'"]:last');if("undefined"!=typeof r[a])return i?r[a]:r[c.index(d)];for(n in r)if("string"==typeof n&&(l=d.filter(n).add(d.find(n)),l.length))return r[n]},isProcessing:function(e,a,i){e=t(e);var s=e[0].config,l=i||e.find("."+r.css.header);a?("undefined"!=typeof i&&s.sortList.length>0&&(l=l.filter(function(){return!this.sortDisabled&&r.isValueInArray(parseFloat(t(this).attr("data-column")),s.sortList)>=0;
|
||
})),e.add(l).addClass(r.css.processing+" "+s.cssProcessing)):e.add(l).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,l,n="headers sortForce sortList sortAppend widgets".split(" "),o=e.originalSettings;if(o){e.debug&&(l=new Date);for(a in o)if(s=typeof r.defaults[a],"undefined"===s);else if("object"===s)for(i in o[a])s=r.defaults[a]&&typeof r.defaults[a][i],t.inArray(a,n)<0&&"undefined"===s;e.debug}},restoreHeaders:function(e){var a,i,s=t(e)[0].config,l=s.$table.find(s.selectorHeaders),n=l.length;for(a=0;a<n;a++)i=l.eq(a),i.find("."+r.css.headerIn).length&&i.html(s.headerContent[a])},destroy:function(e,a,i){if(e=t(e)[0],e.hasInitialized){r.removeWidget(e,!0,!1);var s,l=t(e),n=e.config,o=(n.debug,l.find("thead:first")),c=o.find("tr."+r.css.headerRow).removeClass(r.css.headerRow+" "+n.cssHeaderRow),d=l.find("tfoot:first > tr").children("th, td");a===!1&&t.inArray("uitheme",n.widgets)>=0&&(l.triggerHandler("applyWidgetId",["uitheme"]),l.triggerHandler("applyWidgetId",["zebra"])),o.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+" "),l.removeData("tablesorter").unbind(s.replace(r.regex.spaces," ")),n.$headers.add(d).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),l.toggleClass(r.css.table+" "+n.tableClass+" tablesorter-"+n.theme,a===!1),e.hasInitialized=!1,delete e.config.cache,"function"==typeof i&&i(e)}}};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,l=s.$headerIndexed[i],n=l.length&&l.data("dateFormat")||r.getData(l,r.getColumnData(t,s.headers,i),"dateFormat")||s.dateFormat;return l.length&&l.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),l=e&&(null!==i?i[0]:"00:00 AM"),n=l?new Date("2000/01/01 "+l.replace(r.regex.dateReplace,"$1 $2")):l;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,l,n,o,c,d,u=new RegExp(r.cssChildRow,"i"),f=r.$tbodies.add(t(r.namespace+"_extra_table").children("tbody:not(."+r.cssInfoBlock+")"));for(o=0;o<f.length;o++)for(l=0,i=f.eq(o).children("tr:visible").not(r.selectorRemove),d=i.length,c=0;c<d;c++)s=i.eq(c),u.test(s[0].className)||l++,n=l%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,l,n=t.$tbodies,o=(a.zebra||["even","odd"]).join(" ");for(s=0;s<n.length;s++)l=r.processTbody(e,n.eq(s),!0),l.children().removeClass(o),r.processTbody(e,l,!1)}}})}(e),function(e,t,r){"use strict";var a=e.tablesorter||{};a.storage=function(i,s,l,n){i=e(i)[0];var o,c,d,u=!1,f={},p=i.config,g=p&&p.widgetOptions,h=n&&n.useSessionStorage||g&&g.storage_useSessionStorage?"sessionStorage":"localStorage",m=e(i),b=n&&n.id||m.attr(n&&n.group||g&&g.storage_group||"data-table-group")||g&&g.storage_tableId||i.id||e(".tablesorter").index(m),y=n&&n.url||m.attr(n&&n.page||g&&g.storage_page||"data-table-page")||g&&g.storage_fixedUrl||p&&p.fixedUrl||t.location.pathname;if(e.extend(!0,a.defaults,{fixedUrl:"",widgetOptions:{storage_fixedUrl:"",storage_group:"",storage_page:"",storage_tableId:"",storage_useSessionStorage:""}}),h in t)try{t[h].setItem("_tmptest","temp"),u=!0,t[h].removeItem("_tmptest")}catch(_){p&&p.debug}return e.parseJSON&&(u?f=e.parseJSON(t[h][s]||"null")||{}:(c=r.cookie.split(/[;\s|=]/),o=e.inArray(s,c)+1,f=0!==o?e.parseJSON(c[o]||"null")||{}:{})),"undefined"!=typeof l&&t.JSON&&JSON.hasOwnProperty("stringify")?(f[y]||(f[y]={}),f[y][b]=l,u?t[h][s]=JSON.stringify(f):(d=new Date,d.setTime(d.getTime()+31536e6),r.cookie=s+"="+JSON.stringify(f).replace(/\"/g,'"')+"; expires="+d.toGMTString()+"; path=/"),void 0):f&&f[y]?f[y][b]:""}}(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:"icon-chevron-up glyphicon glyphicon-chevron-up",iconSortDesc:"icon-chevron-down 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,l,n,o,c,d,u,f,p,g,h,m,b,y=t.themes,_=a.$table.add(e(a.namespace+"_extra_table")),w=a.$headers.add(e(a.namespace+"_extra_headers")),v=a.theme||"jui",x=y[v]||{},C=e.trim([x.sortNone,x.sortDesc,x.sortAsc,x.active].join(" ")),$=e.trim([x.iconSortNone,x.iconSortDesc,x.iconSortAsc].join(" "));for(a.debug&&(c=new Date),_.hasClass("tablesorter-"+v)&&a.theme===a.appliedTheme&&i.uitheme_applied||(i.uitheme_applied=!0,g=y[a.appliedTheme]||{},b=!e.isEmptyObject(g),h=b?[g.sortNone,g.sortDesc,g.sortAsc,g.active].join(" "):"",m=b?[g.iconSortNone,g.iconSortDesc,g.iconSortAsc].join(" "):"",b&&(i.zebra[0]=e.trim(" "+i.zebra[0].replace(" "+g.even,"")),i.zebra[1]=e.trim(" "+i.zebra[1].replace(" "+g.odd,"")),a.$tbodies.children().removeClass([g.even,g.odd].join(" "))),x.even&&(i.zebra[0]+=" "+x.even),x.odd&&(i.zebra[1]+=" "+x.odd),_.children("caption").removeClass(g.caption||"").addClass(x.caption),f=_.removeClass((a.appliedTheme?"tablesorter-"+(a.appliedTheme||""):"")+" "+(g.table||"")).addClass("tablesorter-"+v+" "+(x.table||"")).children("tfoot"),a.appliedTheme=a.theme,f.length&&f.children("tr").removeClass(g.footerRow||"").addClass(x.footerRow).children("th, td").removeClass(g.footerCells||"").addClass(x.footerCells),w.removeClass((b?[g.header,g.hover,h].join(" "):"")||"").addClass(x.header).not(".sorter-false").unbind("mouseenter.tsuitheme mouseleave.tsuitheme").bind("mouseenter.tsuitheme mouseleave.tsuitheme",function(t){e(this)["mouseenter"===t.type?"addClass":"removeClass"](x.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?[g.icons,m].join(" "):"").addClass(x.icons||""),t.hasWidget(a.table,"filter")&&(l=function(){_.children("thead").children("."+t.css.filterRow).removeClass(b?g.filterRow||"":"").addClass(x.filterRow||"")},i.filter_initialized?l():_.one("filterInit",function(){l()}))),s=0;s<a.columns;s++)d=a.$headers.add(e(a.namespace+"_extra_headers")).not(".sorter-false").filter('[data-column="'+s+'"]'),u=t.css.icon?d.find("."+t.css.icon):e(),p=w.not(".sorter-false").filter('[data-column="'+s+'"]:last'),p.length&&(d.removeClass(C),u.removeClass($),p[0].sortDisabled?u.removeClass(x.icons||""):(n=x.sortNone,o=x.iconSortNone,p.hasClass(t.css.sortAsc)?(n=[x.sortAsc,x.active].join(" "),o=x.iconSortAsc):p.hasClass(t.css.sortDesc)&&(n=[x.sortDesc,x.active].join(" "),o=x.iconSortDesc),d.addClass(n),u.addClass(o||"")));a.debug},remove:function(e,r,a,i){if(a.uitheme_applied){var s=r.$table,l=r.appliedTheme||"jui",n=t.themes[l]||t.themes.jui,o=s.children("thead").children(),c=n.sortNone+" "+n.sortDesc+" "+n.sortAsc,d=n.iconSortNone+" "+n.iconSortDesc+" "+n.iconSortAsc;s.removeClass("tablesorter-"+l+" "+n.table),a.uitheme_applied=!1,i||(s.find(t.css.header).removeClass(n.header),o.unbind("mouseenter.tsuitheme mouseleave.tsuitheme").removeClass(n.hover+" "+c+" "+n.active).filter("."+t.css.filterRow).removeClass(n.filterRow),o.find("."+t.css.icon).removeClass(n.icons+" "+d))}}})}(e),function(e){"use strict";var t=e.tablesorter||{};t.addWidget({id:"columns",priority:30,options:{columns:["primary","secondary","tertiary"]},format:function(r,a,i){var s,l,n,o,c,d,u,f,p=a.$table,g=a.$tbodies,h=a.sortList,m=h.length,b=i&&i.columns||["primary","secondary","tertiary"],y=b.length-1;for(u=b.join(" "),l=0;l<g.length;l++)s=t.processTbody(r,g.eq(l),!0),n=s.children("tr"),n.each(function(){if(c=e(this),"none"!==this.style.display&&(d=c.children().removeClass(u),h&&h[0]&&(d.eq(h[0][0]).addClass(b[0]),m>1)))for(f=1;f<m;f++)d.eq(h[f][0]).addClass(b[f]||b[y])}),t.processTbody(r,s,!1);if(o=i.columns_thead!==!1?["thead tr"]:[],i.columns_tfoot!==!1&&o.push("tfoot tr"),o.length&&(n=p.find(o.join(",")).children().removeClass(u),m))for(f=0;f<m;f++)n.filter('[data-column="'+h[f][0]+'"]').addClass(b[f]||b[y])},remove:function(r,a,i){var s,l,n=a.$tbodies,o=(i.columns||["primary","secondary","tertiary"]).join(" ");for(a.$headers.removeClass(o),a.$table.children("tfoot").children("tr").children("th, td").removeClass(o),s=0;s<n.length;s++)l=t.processTbody(r,n.eq(s),!0),l.children("tr").each(function(){e(this).children().removeClass(o)}),t.processTbody(r,l,!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_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,l){var n,o,c=r.$table,d=r.$tbodies,u="addRows updateCell update updateRows updateComplete appendCache filterReset filterEnd search ".split(" ").join(r.namespace+"filter ");if(c.removeClass("hasFilters").unbind(u.replace(a.regex.spaces," ")).find("."+i.filterRow).remove(),s.filter_initialized=!1,!l){for(n=0;n<d.length;n++)o=a.processTbody(t,d.eq(n),!0),o.children().removeClass(s.filter_filteredRow).show(),a.processTbody(t,o,!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 l,n,o,c,d=e.extend({},i),u=i.filter.split(r.orSplit),f=i.iFilter.split(r.orSplit),p=u.length;for(l=0;l<p;l++){d.nestedFilters=!0,d.filter=""+(t.parseFilter(a,u[l],i)||""),d.iFilter=""+(t.parseFilter(a,f[l],i)||""),o="("+(t.parseFilter(a,d.filter,i)||"")+")";try{if(c=new RegExp(i.isMatch?o:"^"+o+"$",a.widgetOptions.filter_ignoreCase?"i":""),n=c.test(d.exact)||t.processTypes(a,d,s))return n}catch(g){return null}}return n||!1}return null},and:function(a,i,s){if(r.andTest.test(i.filter)){var l,n,o,c,d,u=e.extend({},i),f=i.filter.split(r.andSplit),p=i.iFilter.split(r.andSplit),g=f.length;for(l=0;l<g;l++){u.nestedFilters=!0,u.filter=""+(t.parseFilter(a,f[l],i)||""),u.iFilter=""+(t.parseFilter(a,p[l],i)||""),c=("("+(t.parseFilter(a,u.filter,i)||"")+")").replace(r.wild01,"\\S{1}").replace(r.wild0More,"\\S*");try{d=new RegExp(i.isMatch?c:"^"+c+"$",a.widgetOptions.filter_ignoreCase?"i":""),o=d.test(u.exact)||t.processTypes(a,u,s),n=0===l?o:n&&o}catch(h){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(l){a=!1}return a}return null},operators:function(i,s){if(r.operTest.test(s.iFilter)&&""!==s.iExact){var l,n,o,c=i.table,d=s.parsed[s.index],u=a.formatFloat(s.iFilter.replace(r.operators,""),c),f=i.parsers[s.index]||{},p=u;return(d||"numeric"===f.type)&&(o=e.trim(""+s.iFilter.replace(r.operators,"")),n=t.parseFilter(i,o,s,!0),u="number"!=typeof n||""===n||isNaN(n)?u:n),!d&&"numeric"!==f.type||isNaN(u)||"undefined"==typeof s.cache?(o=isNaN(s.iExact)?s.iExact.replace(a.regex.nondigit,""):s.iExact,l=a.formatFloat(o,c)):l=s.cache,r.gtTest.test(s.iFilter)?n=r.gteTest.test(s.iFilter)?l>=u:l>u:r.ltTest.test(s.iFilter)&&(n=r.lteTest.test(s.iFilter)?l<=u:l<u),n||""!==p||(n=!0),n}return null},notMatch:function(a,i){if(r.notTest.test(i.iFilter)){var s,l=i.iFilter.replace("!",""),n=t.parseFilter(a,l,i)||"";return r.exact.test(n)?(n=n.replace(r.exact,""),""===n||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,""),l=t.parseFilter(a,s,i)||"";return i.anyMatch?e.inArray(l,i.rowArray)>=0:l==i.iExact}return null},range:function(e,i){if(r.toTest.test(i.iFilter)){var s,l,n,o,c=e.table,d=i.index,u=i.parsed[d],f=i.iFilter.split(r.toSplit);return l=f[0].replace(a.regex.nondigit,"")||"",n=a.formatFloat(t.parseFilter(e,l,i),c),l=f[1].replace(a.regex.nondigit,"")||"",o=a.formatFloat(t.parseFilter(e,l,i),c),(u||"numeric"===e.parsers[d].type)&&(s=e.parsers[d].format(""+f[0],c,e.$headers.eq(d),d),n=""===s||isNaN(s)?n:s,s=e.parsers[d].format(""+f[1],c,e.$headers.eq(d),d),o=""===s||isNaN(s)?o:s),!u&&"numeric"!==e.parsers[d].type||isNaN(n)||isNaN(o)?(l=isNaN(i.iExact)?i.iExact.replace(a.regex.nondigit,""):i.iExact,s=a.formatFloat(l,c)):s=i.cache,n>o&&(l=n,n=o,o=l),s>=n&&s<=o||""===n||""===o}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(s){return null}}return null},fuzzy:function(e,a){if(r.fuzzyTest.test(a.iFilter)){var i,s=0,l=a.iExact.length,n=a.iFilter.slice(1),o=t.parseFilter(e,n,a)||"";for(i=0;i<l;i++)a.iExact[i]===o[s]&&(s+=1);return s===o.length}return null}},init:function(s){a.language=e.extend(!0,{},{to:"to",or:"or",and:"and"},a.language);var l,n,o,c,d,u,f,p,g=s.config,h=g.widgetOptions;if(g.$table.addClass("hasFilters"),g.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*=","]',u="\\{"+r.query+"\\}",e.extend(r,{child:new RegExp(g.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(u,"i"),igQuery:new RegExp(u,"ig"),operTest:/^[<>]=?/,gtTest:/>/,gteTest:/>=/,ltTest:/</,lteTest:/<=/,notTest:/^\!/,wildOrTest:/[\?\*\|]/,wildTest:/\?\*/,fuzzyTest:/^~/,exactTest:/[=\"\|!]/}),u=g.$headers.filter(".filter-false, .parser-false").length,h.filter_columnFilters!==!1&&u!==g.$headers.length&&t.buildRow(s,g,h),o="addRows updateCell update updateRows updateComplete appendCache filterReset "+"filterResetSaved filterEnd search ".split(" ").join(g.namespace+"filter "),g.$table.bind(o,function(r,l){return u=h.filter_hideEmpty&&e.isEmptyObject(g.cache)&&!(g.delayInit&&"appendCache"===r.type),g.$table.find("."+i.filterRow).toggleClass(h.filter_filteredRow,u),/(search|filter)/.test(r.type)||(r.stopPropagation(),t.buildDefault(s,!0)),"filterReset"===r.type?(g.$table.find("."+i.filter).add(h.filter_$externalFilters).val(""),t.searching(s,[])):"filterResetSaved"===r.type?a.storage(s,"tablesorter-filters",""):"filterEnd"===r.type?t.buildDefault(s,!0):(l="search"===r.type?l:"updateComplete"===r.type?g.$table.data("lastSearch"):"",/(update|add)/.test(r.type)&&"updateComplete"!==r.type&&(g.lastCombinedFilter=null,g.lastSearch=[],setTimeout(function(){g.$table.triggerHandler("filterFomatterUpdate")},100)),t.searching(s,l,!0)),!1}),h.filter_reset&&(h.filter_reset instanceof e?h.filter_reset.click(function(){g.$table.triggerHandler("filterReset")}):e(h.filter_reset).length&&e(document).undelegate(h.filter_reset,"click"+g.namespace+"filter").delegate(h.filter_reset,"click"+g.namespace+"filter",function(){g.$table.triggerHandler("filterReset")})),h.filter_functions)for(d=0;d<g.columns;d++)if(f=a.getColumnData(s,h.filter_functions,d))if(c=g.$headerIndexed[d].removeClass("filter-select"),p=!(c.hasClass("filter-false")||c.hasClass("parser-false")),l="",f===!0&&p)t.buildSelect(s,d);else if("object"==typeof f&&p){for(n in f)"string"==typeof n&&(l+=""===l?'<option value="">'+(c.data("placeholder")||c.attr("data-placeholder")||h.filter_placeholder.select||"")+"</option>":"",u=n,o=n,n.indexOf(h.filter_selectSourceSeparator)>=0&&(u=n.split(h.filter_selectSourceSeparator),o=u[1],u=u[0]),l+="<option "+(o===u?"":'data-function-name="'+n+'" ')+'value="'+u+'">'+o+"</option>");g.$table.find("thead").find("select."+i.filter+'[data-column="'+d+'"]').append(l),o=h.filter_selectSource,f="function"==typeof o||a.getColumnData(s,o,d),f&&t.buildSelect(g.table,d,"",!0,c.hasClass(h.filter_onlyAvail))}t.buildDefault(s,!0),t.bindSearch(s,g.$table.find("."+i.filter),!0),h.filter_external&&t.bindSearch(s,h.filter_external),h.filter_hideFilters&&t.hideFilters(g),g.showProcessing&&(o="filterStart filterEnd ".split(" ").join(g.namespace+"filter "),g.$table.unbind(o.replace(a.regex.spaces," ")).bind(o,function(t,r){c=r?g.$table.find("."+i.header).filter("[data-column]").filter(function(){return""!==r[e(this).data("column")]}):"",a.isProcessing(s,"filterStart"===t.type,r?c:"")})),g.filteredRows=g.totalRows,o="tablesorter-initialized pagerBeforeInitialized ".split(" ").join(g.namespace+"filter "),g.$table.unbind(o.replace(a.regex.spaces," ")).bind(o,function(){t.completeInit(this)}),g.pager&&g.pager.initialized&&!h.filter_initialized?(g.$table.triggerHandler("filterFomatterUpdate"),setTimeout(function(){t.filterInitComplete(g)},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")[0].config.widgetOptions;r&&!r.filter_initialized&&(r.filter_formatterInit[t]=1)},filterInitComplete:function(r){var a,i,s=r.widgetOptions,l=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]&&l++;clearTimeout(s.filter_initTimer),s.filter_initialized||l!==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 l,n,o,c,d,u=a.getFilters(r)||[];if(s.filter_saveFilters&&a.storage&&(n=a.storage(r,"tablesorter-filters")||[],l=e.isArray(n),l&&""===n.join("")||!l||(u=t.processFilters(n))),""===u.join(""))for(d=i.$headers.add(s.filter_$externalFilters).filter("["+s.filter_defaultAttrib+"]"),o=0;o<=i.columns;o++)c=o===i.columns?"all":o,u[o]=d.filter('[data-column="'+c+'"]').attr(s.filter_defaultAttrib)||u[o]||"";return i.$table.data("lastSearch",u),u},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,l){var n,o,c,d,u,f,p,g,h,m=l.filter_cellFilter,b=s.columns,y=e.isArray(m),_='<tr role="row" class="'+i.filterRow+" "+s.cssIgnoreRow+'">';for(c=0;c<b;c++)s.$headerIndexed[c].length&&(h=s.$headerIndexed[c]&&s.$headerIndexed[c][0].colSpan||0,_+=h>1?'<td data-column="'+c+"-"+(c+h-1)+'" colspan="'+h+'"':'<td data-column="'+c+'"',_+=y?m[c]?' class="'+m[c]+'"':"":""!==m?' class="'+m+'"':"",_+="></td>");for(s.$filters=e(_+="</tr>").appendTo(s.$table.children("thead").eq(0)).children("td"),c=0;c<b;c++)f=!1,d=s.$headerIndexed[c],d&&d.length&&(n=t.getColumnElm(s,s.$filters,c),g=a.getColumnData(r,l.filter_functions,c),u=l.filter_functions&&g&&"function"!=typeof g||d.hasClass("filter-select"),o=a.getColumnData(r,s.headers,c),f="false"===a.getData(d[0],o,"filter")||"false"===a.getData(d[0],o,"parser"),u?_=e("<select>").appendTo(n):(g=a.getColumnData(r,l.filter_formatter,c),g?(l.filter_formatterCount++,_=g(n,c),_&&0===_.length&&(_=n.children("input")),_&&(0===_.parent().length||_.parent().length&&_.parent()[0]!==n[0])&&n.append(_)):_=e('<input type="search">').appendTo(n),_&&(h=d.data("placeholder")||d.attr("data-placeholder")||l.filter_placeholder.search||"",_.attr("placeholder",h))),_&&(p=(e.isArray(l.filter_cssFilter)?"undefined"!=typeof l.filter_cssFilter[c]?l.filter_cssFilter[c]||"":"":l.filter_cssFilter)||"",_.addClass(i.filter+" "+p).attr("data-column",n.attr("data-column")),f&&(_.attr("placeholder","").addClass(i.filterDisabled)[0].disabled=!0)))},bindSearch:function(r,i,l){if(r=e(r)[0],i=e(i),i.length){var n,o=r.config,c=o.widgetOptions,d=o.namespace+"filter",u=c.filter_$externalFilters;l!==!0&&(n=c.filter_anyColumnSelector+","+c.filter_multipleColumnSelector,c.filter_$anyMatch=i.filter(n),u&&u.length?c.filter_$externalFilters=c.filter_$externalFilters.add(i):c.filter_$externalFilters=i,a.setFilters(r,o.$table.data("lastSearch")||[],l===!1)),n="keypress keyup keydown search change input ".split(" ").join(d+" "),i.attr("data-lastSearchTime",(new Date).getTime()).unbind(n.replace(a.regex.spaces," ")).bind("keydown"+d,function(e){if(e.which===s.escape&&!r.config.widgetOptions.filter_resetOnEsc)return!1}).bind("keyup"+d,function(i){c=r.config.widgetOptions;var l=parseInt(e(this).attr("data-column"),10),n="boolean"==typeof c.filter_liveSearch?c.filter_liveSearch:a.getColumnData(r,c.filter_liveSearch,l);if("undefined"==typeof n&&(n=c.filter_liveSearch.fallback||!1),e(this).attr("data-lastSearchTime",(new Date).getTime()),i.which===s.escape)this.value=c.filter_resetOnEsc?"":o.lastSearch[l];else{if(n===!1)return;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}t.searching(r,!0,!0,l)}).bind("search change keypress input ".split(" ").join(d+" "),function(i){var l=parseInt(e(this).attr("data-column"),10),n="boolean"==typeof c.filter_liveSearch?c.filter_liveSearch:a.getColumnData(r,c.filter_liveSearch,l);!r.config.widgetOptions.filter_initialized||i.which!==s.enter&&"search"!==i.type&&("change"!==i.type&&"input"!==i.type||n!==!0||this.value===o.lastSearch[l])||(i.preventDefault(),e(this).attr("data-lastSearchTime",(new Date).getTime()),t.searching(r,"keypress"!==i.type,!0,l))})}},searching:function(e,r,i,s){var l,n=e.config.widgetOptions;"undefined"==typeof s?l=!1:(l="boolean"==typeof n.filter_liveSearch?n.filter_liveSearch:a.getColumnData(e,n.filter_liveSearch,s),"undefined"==typeof l&&(l=n.filter_liveSearch.fallback||!1)),clearTimeout(n.filter_searchTimer),"undefined"==typeof r||r===!0?n.filter_searchTimer=setTimeout(function(){t.checkFilters(e,r,i)},l?n.filter_searchDelay:10):t.checkFilters(e,r,i)},checkFilters:function(r,s,l){var n=r.config,o=n.widgetOptions,c=e.isArray(s),d=c?s:a.getFilters(r,!0),u=(d||[]).join("");return e.isEmptyObject(n.cache)?void(n.delayInit&&(!n.pager||n.pager&&n.pager.initialized)&&a.updateCache(n,function(){t.checkFilters(r,!1,l)})):(c&&(a.setFilters(r,d,!1,l!==!0),o.filter_initialized||(n.lastCombinedFilter="")),o.filter_hideFilters&&n.$table.find("."+i.filterRow).triggerHandler(t.hideFiltersCheck(n)?"mouseleave":"mouseenter"),n.lastCombinedFilter!==u||s===!1?(s===!1&&(n.lastCombinedFilter=null,n.lastSearch=[]),d=d||[],d=Array.prototype.map?d.map(String):d.join("<22>").split("<22>"),o.filter_initialized&&n.$table.triggerHandler("filterStart",[d]),n.showProcessing?void setTimeout(function(){return t.findRows(r,d,u),!1},30):(t.findRows(r,d,u),!1)):void 0)},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 l=a,n=e(this);clearTimeout(s),s=setTimeout(function(){/enter|over/.test(l.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 l=a,n=e(this).closest("tr");clearTimeout(s),s=setTimeout(function(){clearTimeout(s),n.toggleClass(i.filterRowHide,t.hideFiltersCheck(r)&&"focus"!==l.type)},200)})},defaultFilter:function(t,a){if(""===t)return t;var i=r.iQuery,s=a.match(r.igQuery).length,l=s>1?e.trim(t).split(/\s/):[e.trim(t)],n=l.length-1,o=0,c=a;for(n<1&&s>1&&(l[1]=l[0]);i.test(c);)c=c.replace(i,l[o++]||""),i.test(c)&&o<n&&""!==(l[o]||"")&&(c=a.replace(i,c));return c},getLatestSearch:function(t){return t?t.sort(function(t,r){return e(r).attr("data-lastSearchTime")-e(t).attr("data-lastSearchTime")}):t||e()},findRange:function(e,t,r){
|
||
var a,i,s,l,n,o,c,d,u,f=[];if(/^[0-9]+$/.test(t))return[parseInt(t,10)];if(!r&&/-/.test(t))for(i=t.match(/(\d+)\s*-\s*(\d+)/g),u=i?i.length:0,d=0;d<u;d++){for(s=i[d].split(/\s*-\s*/),l=parseInt(s[0],10)||0,n=parseInt(s[1],10)||e.columns-1,l>n&&(a=l,l=n,n=a),n>=e.columns&&(n=e.columns-1);l<=n;l++)f[f.length]=l;t=t.replace(i[d],"")}if(!r&&/,/.test(t))for(o=t.split(/\s*,\s*/),u=o.length,c=0;c<u;c++)""!==o[c]&&(d=parseInt(o[c],10),d<e.columns&&(f[f.length]=d));if(!f.length)for(d=0;d<e.columns;d++)f[f.length]=d;return f},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,l=e.trim(t.getLatestSearch(a).attr("data-column")||"");return t.findRange(r,l,!s)},processTypes:function(r,a,i){var s,l=null,n=null;for(s in t.types)e.inArray(s,i.excludeMatch)<0&&null===n&&(n=t.types[s](r,a,i),null!==n&&(l=n));return l},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,l){var n,o,c,d,u,f=i.widgetOptions,p=!0,g=f.filter_$anyMatch&&f.filter_$anyMatch.length,h=f.filter_$anyMatch&&f.filter_$anyMatch.length?t.multipleColumns(i,f.filter_$anyMatch):[];if(s.$cells=s.$row.children(),s.anyMatchFlag&&h.length>1||s.anyMatchFilter&&!g){if(s.anyMatch=!0,s.isMatch=!0,s.rowArray=s.$cells.map(function(t){if(e.inArray(t,h)>-1||s.anyMatchFilter&&!g)return s.parsed[t]?u=s.cacheArray[t]:(u=s.rawArray[t],u=e.trim(f.filter_ignoreCase?u.toLowerCase():u),i.sortLocaleCompare&&(u=a.replaceAccents(u))),u}).get(),s.filter=s.anyMatchFilter,s.iFilter=s.iAnyMatchFilter,s.exact=s.rowArray.join(" "),s.iExact=f.filter_ignoreCase?s.exact.toLowerCase():s.exact,s.cache=s.cacheArray.slice(0,-1).join(" "),l.excludeMatch=l.noAnyMatch,o=t.processTypes(i,s,l),null!==o)p=o;else if(f.filter_startsWith)for(p=!1,h=Math.min(i.columns,s.rowArray.length);!p&&h>0;)h--,p=p||0===s.rowArray[h].indexOf(s.iFilter);else p=(s.iExact+s.childRowText).indexOf(s.iFilter)>=0;if(s.anyMatch=!1,s.filters.join("")===s.filter)return p}for(h=0;h<i.columns;h++)s.filter=s.filters[h],s.index=h,l.excludeMatch=l.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)&&f.filter_ignoreCase?s.exact.toLowerCase():s.exact,s.isMatch=t.matchType(i,h),n=p,d=f.filter_columnFilters?i.$filters.add(f.filter_$externalFilters).filter('[data-column="'+h+'"]').find("select option:selected").attr("data-function-name")||"":"",i.sortLocaleCompare&&(s.filter=a.replaceAccents(s.filter)),f.filter_defaultFilter&&r.iQuery.test(l.defaultColFilter[h])&&(s.filter=t.defaultFilter(s.filter,l.defaultColFilter[h])),s.iFilter=f.filter_ignoreCase?(s.filter||"").toLowerCase():s.filter,c=l.functions[h],o=null,c&&(c===!0?o=s.isMatch?(""+s.iExact).search(s.iFilter)>=0:s.filter===s.exact:"function"==typeof c?o=c(s.exact,s.cache,s.filter,h,s.$row,i,s):"function"==typeof c[d||s.filter]&&(u=d||s.filter,o=c[u](s.exact,s.cache,s.filter,h,s.$row,i,s))),null===o?(o=t.processTypes(i,s,l),null!==o?n=o:(u=(s.iExact+s.childRowText).indexOf(t.parseFilter(i,s.iFilter,s)),n=!f.filter_startsWith&&u>=0||f.filter_startsWith&&0===u)):n=o,p=!!n&&p);return p},findRows:function(i,s,l){if(i.config.lastCombinedFilter!==l&&i.config.widgetOptions.filter_initialized){var n,o,c,d,u,f,p,g,h,m,b,y,_,w,v,x,C,$,S,F,R,z,T,I,k=e.extend([],s),A=i.config,D=A.widgetOptions,H={anyMatch:!1,filters:s,filter_regexCache:[]},O={noAnyMatch:["range","operators"],functions:[],excludeFilter:[],defaultColFilter:[],defaultAnyFilter:a.getColumnData(i,D.filter_defaultFilter,A.columns,!0)||""};for(H.parsed=[],h=0;h<A.columns;h++)H.parsed[h]=D.filter_useParsedData||A.parsers&&A.parsers[h]&&A.parsers[h].parsed||a.getData&&"parsed"===a.getData(A.$headerIndexed[h],a.getColumnData(i,A.headers,h),"filter")||A.$headerIndexed[h].hasClass("filter-parsed"),O.functions[h]=a.getColumnData(i,D.filter_functions,h)||A.$headerIndexed[h].hasClass("filter-select"),O.defaultColFilter[h]=a.getColumnData(i,D.filter_defaultFilter,h)||"",O.excludeFilter[h]=(a.getColumnData(i,D.filter_excludeFilter,h,!0)||"").split(/\s+/);for(A.debug&&(v=new Date),A.filteredRows=0,A.totalRows=0,l=(k||[]).join(""),p=0;p<A.$tbodies.length;p++){if(g=a.processTbody(i,A.$tbodies.eq(p),!0),h=A.columns,o=A.cache[p].normalized,d=e(e.map(o,function(e){return e[h].$row.get()})),""===l||D.filter_serversideFiltering)d.removeClass(D.filter_filteredRow).not("."+A.cssChildRow).css("display","");else{if(d=d.not("."+A.cssChildRow),n=d.length,(D.filter_$anyMatch&&D.filter_$anyMatch.length||"undefined"!=typeof s[A.columns])&&(H.anyMatchFlag=!0,H.anyMatchFilter=""+(s[A.columns]||D.filter_$anyMatch&&t.getLatestSearch(D.filter_$anyMatch).val()||""),D.filter_columnAnyMatch)){for(F=H.anyMatchFilter.split(r.andSplit),R=!1,C=0;C<F.length;C++)z=F[C].split(":"),z.length>1&&(isNaN(z[0])?e.each(A.headerContent,function(e,t){t.toLowerCase().indexOf(z[0])>-1&&(T=e,s[T]=z[1])}):T=parseInt(z[0],10)-1,T>=0&&T<A.columns&&(s[T]=z[1],F.splice(C,1),C--,R=!0));R&&(H.anyMatchFilter=F.join(" && "))}if(S=D.filter_searchFiltered,y=A.lastSearch||A.$table.data("lastSearch")||[],S)for(C=0;C<h+1;C++)x=s[C]||"",S||(C=h),S=S&&y.length&&0===x.indexOf(y[C]||"")&&!r.alreadyFiltered.test(x)&&!r.exactTest.test(x)&&!(r.isNeg1.test(x)||r.isNeg2.test(x))&&!(""!==x&&A.$filters&&A.$filters.filter('[data-column="'+C+'"]').find("select").length&&!t.matchType(A,C));for($=d.not("."+D.filter_filteredRow).length,S&&0===$&&(S=!1),A.debug,H.anyMatchFlag&&(A.sortLocaleCompare&&(H.anyMatchFilter=a.replaceAccents(H.anyMatchFilter)),D.filter_defaultFilter&&r.iQuery.test(O.defaultAnyFilter)&&(H.anyMatchFilter=t.defaultFilter(H.anyMatchFilter,O.defaultAnyFilter),S=!1),H.iAnyMatchFilter=D.filter_ignoreCase&&A.ignoreCase?H.anyMatchFilter.toLowerCase():H.anyMatchFilter),f=0;f<n;f++)if(I=d[f].className,m=f&&r.child.test(I),!(m||S&&r.filtered.test(I))){if(H.$row=d.eq(f),H.rowIndex=f,H.cacheArray=o[f],c=H.cacheArray[A.columns],H.rawArray=c.raw,H.childRowText="",!D.filter_childByColumn){for(I="",b=c.child,C=0;C<b.length;C++)I+=" "+b[C].join(" ")||"";H.childRowText=D.filter_childRows?D.filter_ignoreCase?I.toLowerCase():I:""}if(_=!1,w=t.processRow(A,H,O),u=c.$row,x=!!w,b=c.$row.filter(":gt(0)"),D.filter_childRows&&b.length){if(D.filter_childByColumn)for(D.filter_childWithSibs||(b.addClass(D.filter_filteredRow),u=u.eq(0)),C=0;C<b.length;C++)H.$row=b.eq(C),H.cacheArray=c.child[C],H.rawArray=H.cacheArray,x=t.processRow(A,H,O),_=_||x,!D.filter_childWithSibs&&x&&b.eq(C).removeClass(D.filter_filteredRow);_=_||w}else _=x;u.toggleClass(D.filter_filteredRow,!_)[0].display=_?"":"none"}}A.filteredRows+=d.not("."+D.filter_filteredRow).length,A.totalRows+=d.length,a.processTbody(i,g,!1)}A.lastCombinedFilter=l,A.lastSearch=k,A.$table.data("lastSearch",k),D.filter_saveFilters&&a.storage&&a.storage(i,"tablesorter-filters",t.processFilters(k,!0)),A.debug,D.filter_initialized&&(A.$table.triggerHandler("filterBeforeEnd",A),A.$table.triggerHandler("filterEnd",A)),setTimeout(function(){a.applyWidget(A.table)},0)}},getOptionSource:function(r,i,s){r=e(r)[0];var l=r.config,n=l.widgetOptions,o=!1,c=n.filter_selectSource,d=l.$table.data("lastSearch")||[],u="function"==typeof c||a.getColumnData(r,c,i);if(s&&""!==d[i]&&(s=!1),u===!0)o=c(r,i,s);else{if(u instanceof e||"string"===e.type(u)&&u.indexOf("</option>")>=0)return u;e.isArray(u)?o=u:"object"===e.type(c)&&u&&(o=u(r,i,s))}return o===!1&&(o=t.getOptions(r,i,s)),t.processOptions(r,i,o)},processOptions:function(t,r,i){if(!e.isArray(i))return!1;t=e(t)[0];var s,l,n,o,c,d,u=t.config,f="undefined"!=typeof r&&null!==r&&r>=0&&r<u.columns,p=!!f&&u.$headerIndexed[r].hasClass("filter-select-sort-desc"),g=[];if(i=e.grep(i,function(t,r){return!!t.text||e.inArray(t,i)===r}),f&&u.$headerIndexed[r].hasClass("filter-select-nosort"))return i;for(o=i.length,n=0;n<o;n++)l=i[n],d=l.text?l.text:l,c=(f&&u.parsers&&u.parsers.length&&u.parsers[r].format(d,t,[],r)||d).toString(),c=u.widgetOptions.filter_ignoreCase?c.toLowerCase():c,l.text?(l.parsed=c,g[g.length]=l):g[g.length]={text:l,parsed:c};for(s=u.textSorter||"",g.sort(function(e,i){var l=p?i.parsed:e.parsed,n=p?e.parsed:i.parsed;return f&&"function"==typeof s?s(l,n,!0,r,t):f&&"object"==typeof s&&s.hasOwnProperty(r)?s[r](l,n,!0,r,t):!a.sortNatural||a.sortNatural(l,n)}),i=[],o=g.length,n=0;n<o;n++)i[i.length]=g[n];return i},getOptions:function(t,r,i){t=e(t)[0];var s,l,n,o,c,d,u,f,p=t.config,g=p.widgetOptions,h=[];for(l=0;l<p.$tbodies.length;l++)for(c=p.cache[l],n=p.cache[l].normalized.length,s=0;s<n;s++)if(o=c.row?c.row[s]:c.normalized[s][p.columns].$row[0],!i||!o.className.match(g.filter_filteredRow))if(g.filter_useParsedData||p.parsers[r].parsed||p.$headerIndexed[r].hasClass("filter-parsed")){if(h[h.length]=""+c.normalized[s][r],g.filter_childRows&&g.filter_childByColumn)for(f=c.normalized[s][p.columns].$row.length-1,d=0;d<f;d++)h[h.length]=""+c.normalized[s][p.columns].child[d][r]}else if(h[h.length]=c.normalized[s][p.columns].raw[r],g.filter_childRows&&g.filter_childByColumn)for(f=c.normalized[s][p.columns].$row.length,d=1;d<f;d++)u=c.normalized[s][p.columns].$row.eq(d).children().eq(r),h[h.length]=""+a.getElementText(p,u,r);return h},buildSelect:function(a,s,l,n,o){if(a=e(a)[0],s=parseInt(s,10),a.config.cache&&!e.isEmptyObject(a.config.cache)){var c,d,u,f,p,g,h,m=a.config,b=m.widgetOptions,y=m.$headerIndexed[s],_='<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("undefined"!=typeof l&&""!==l||(l=t.getOptionSource(a,s,o)),e.isArray(l)){for(c=0;c<l.length;c++)if(h=l[c],h.text){h["data-function-name"]="undefined"==typeof h.value?h.text:h.value,_+="<option";for(d in h)h.hasOwnProperty(d)&&"text"!==d&&(_+=" "+d+'="'+h[d]+'"');h.value||(_+=' value="'+h.text+'"'),_+=">"+h.text+"</option>"}else""+h!="[object Object]"&&(u=h=(""+h).replace(r.quote,"""),d=u,u.indexOf(b.filter_selectSourceSeparator)>=0&&(f=u.split(b.filter_selectSourceSeparator),d=f[0],u=f[1]),_+=""!==h?"<option "+(d===u?"":'data-function-name="'+h+'" ')+'value="'+d+'">'+u+"</option>":"");l=[]}p=(m.$filters?m.$filters:m.$table.children("thead")).find("."+i.filter),b.filter_$externalFilters&&(p=p&&p.length?p.add(b.filter_$externalFilters):b.filter_$externalFilters),g=p.filter('select[data-column="'+s+'"]'),g.length&&(g[n?"html":"append"](_),e.isArray(l)||g.append(l).val(w),g.val(w))}},buildDefault:function(e,r){var i,s,l,n=e.config,o=n.widgetOptions,c=n.columns;for(i=0;i<c;i++)s=n.$headerIndexed[i],l=!(s.hasClass("filter-false")||s.hasClass("parser-false")),(s.hasClass("filter-select")||a.getColumnData(e,o.filter_functions,i)===!0)&&l&&t.buildSelect(e,i,"",r,s.hasClass(o.filter_onlyAvail))}},r=t.regex,a.getFilters=function(r,a,s,l){var n,o,c,d,u=[],f=r?e(r)[0].config:"",p=f?f.widgetOptions:"";if(a!==!0&&p&&!p.filter_columnFilters||e.isArray(s)&&s.join("")===f.lastCombinedFilter)return e(r).data("lastSearch");if(f&&(f.$filters&&(o=f.$filters.find("."+i.filter)),p.filter_$externalFilters&&(o=o&&o.length?o.add(p.filter_$externalFilters):p.filter_$externalFilters),o&&o.length))for(u=s||[],n=0;n<f.columns+1;n++)d=n===f.columns?p.filter_anyColumnSelector+","+p.filter_multipleColumnSelector:'[data-column="'+n+'"]',c=o.filter(d),c.length&&(c=t.getLatestSearch(c),e.isArray(s)?(l&&c.length>1&&(c=c.slice(1)),n===f.columns&&(d=c.filter(p.filter_anyColumnSelector),c=d.length?d:c),c.val(s[n]).trigger("change"+f.namespace)):(u[n]=c.val()||"",n===f.columns?c.slice(1).filter('[data-column*="'+c.attr("data-column")+'"]').val(u[n]):c.slice(1).val(u[n])),n===f.columns&&c.length&&(p.filter_$anyMatch=c));return u},a.setFilters=function(r,i,s,l){var n=r?e(r)[0].config:"",o=a.getFilters(r,!0,i,l);return"undefined"==typeof s&&(s=!0),n&&s&&(n.lastCombinedFilter=null,n.lastSearch=[],t.searching(n.table,i,l),n.$table.triggerHandler("filterFomatterUpdate")),0!==o.length}}(e),function(e,t){"use strict";var r=e.tablesorter||{};e.extend(r.css,{sticky:"tablesorter-stickyHeader",stickyVis:"tablesorter-sticky-visible",stickyHide:"tablesorter-sticky-hidden",stickyWrap:"tablesorter-sticky-wrapper"}),r.addHeaderResizeEvent=function(t,r,a){if(t=e(t)[0],t.config){var i={timer:250},s=e.extend({},i,a),l=t.config,n=l.widgetOptions,o=function(e){var t,r,a,i,s,o,c=l.$headers.length;for(n.resize_flag=!0,r=[],t=0;t<c;t++)a=l.$headers.eq(t),i=a.data("savedSizes")||[0,0],s=a[0].offsetWidth,o=a[0].offsetHeight,s===i[0]&&o===i[1]||(a.data("savedSizes",[s,o]),r.push(a[0]));r.length&&e!==!1&&l.$table.triggerHandler("resize",[r]),n.resize_flag=!1};if(clearInterval(n.resize_timer),r)return n.resize_flag=!1,!1;o(!1),n.resize_timer=setInterval(function(){n.resize_flag||o()},s.timer)}},r.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(a,i,s){if(!(i.$table.hasClass("hasStickyHeaders")||e.inArray("filter",i.widgets)>=0&&!i.$table.hasClass("hasFilters"))){var l,n,o,c,d=i.$table,u=e(s.stickyHeaders_attachTo),f=i.namespace+"stickyheaders ",p=e(s.stickyHeaders_yScroll||s.stickyHeaders_attachTo||t),g=e(s.stickyHeaders_xScroll||s.stickyHeaders_attachTo||t),h=d.children("thead:first"),m=h.children("tr").not(".sticky-false").children(),b=d.children("tfoot"),y=isNaN(s.stickyHeaders_offset)?e(s.stickyHeaders_offset):"",_=y.length?y.height()||0:parseInt(s.stickyHeaders_offset,10)||0,w=d.parent().closest("."+r.css.table).hasClass("hasStickyHeaders")?d.parent().closest("table.tablesorter")[0].config.widgetOptions.$sticky.parent():[],v=w.length?w.height():0,x=s.$sticky=d.clone().addClass("containsStickyHeaders "+r.css.sticky+" "+s.stickyHeaders+" "+i.namespace.slice(1)+"_extra_table").wrap('<div class="'+r.css.stickyWrap+'">'),C=x.parent().addClass(r.css.stickyHide).css({position:u.length?"absolute":"fixed",padding:parseInt(x.parent().parent().css("padding-left"),10),top:_+v,left:0,visibility:"hidden",zIndex:s.stickyHeaders_zIndex||2}),$=x.children("thead:first"),S="",F=0,R=function(e,r){var a,i,s,l,n,o=e.filter(":visible"),c=o.length;for(a=0;a<c;a++)l=r.filter(":visible").eq(a),n=o.eq(a),"border-box"===n.css("box-sizing")?i=n.outerWidth():"collapse"===l.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(),l.css({width:i,"min-width":i,"max-width":i})},z=function(){_=y.length?y.height()||0:parseInt(s.stickyHeaders_offset,10)||0,F=0,C.css({left:u.length?parseInt(u.css("padding-left"),10)||0:d.offset().left-parseInt(d.css("margin-left"),10)-g.scrollLeft()-F,width:d.outerWidth()}),R(d,x),R(m,c)},T=function(t){if(d.is(":visible")){v=w.length?w.offset().top-p.scrollTop()+w.height():0;var a=d.offset(),i=e.isWindow(p[0]),l=e.isWindow(g[0]),n=u.length?i?p.scrollTop():p.offset().top:p.scrollTop(),o=s.stickyHeaders_includeCaption?0:d.children("caption").height()||0,c=n+_+v-o,f=d.height()-(C.height()+(b.height()||0))-o,h=c>a.top&&c<a.top+f?"visible":"hidden",m={visibility:h};u.length&&(m.top=i?c-u.offset().top:u.scrollTop()),l&&(m.left=d.offset().left-parseInt(d.css("margin-left"),10)-g.scrollLeft()-F),w.length&&(m.top=(m.top||0)+_+v),C.removeClass(r.css.stickyVis+" "+r.css.stickyHide).addClass("visible"===h?r.css.stickyVis:r.css.stickyHide).css(m),(h!==S||t)&&(z(),S=h)}};if(u.length&&!u.css("position")&&u.css("position","relative"),x.attr("id")&&(x[0].id+=s.stickyHeaders_cloneId),x.find("thead:gt(0), tr.sticky-false").hide(),x.find("tbody, tfoot").remove(),x.find("caption").toggle(s.stickyHeaders_includeCaption),c=$.children().children(),x.css({height:0,width:0,margin:0}),c.find("."+r.css.resizer).remove(),d.addClass("hasStickyHeaders").bind("pagerComplete"+f,function(){z()}),r.bindEvents(a,$.children().children("."+r.css.header)),s.stickyHeaders_appendTo?e(s.stickyHeaders_appendTo).append(C):d.after(C),i.onRenderHeader)for(o=$.children("tr").children(),n=o.length,l=0;l<n;l++)i.onRenderHeader.apply(o.eq(l),[l,i,x]);g.add(p).unbind("scroll resize ".split(" ").join(f).replace(/\s+/g," ")).bind("scroll resize ".split(" ").join(f),function(e){T("resize"===e.type)}),i.$table.unbind("stickyHeadersUpdate"+f).bind("stickyHeadersUpdate"+f,function(){T(!0)}),s.stickyHeaders_addResizeEvent&&r.addHeaderResizeEvent(a),d.hasClass("hasFilters")&&s.filter_columnFilters&&(d.bind("filterEnd"+f,function(){var a=e(document.activeElement).closest("td"),l=a.parent().children().index(a);C.hasClass(r.css.stickyVis)&&s.stickyHeaders_filteredToTop&&(t.scrollTo(0,d.position().top),l>=0&&i.$filters&&i.$filters.eq(l).find("a, select, input").filter(":visible").focus())}),r.filter.bindSearch(d,c.find("."+r.css.filter)),s.filter_hideFilters&&r.filter.hideFilters(i,x)),s.stickyHeaders_addResizeEvent&&d.bind("resize"+i.namespace+"stickyheaders",function(){z()}),d.triggerHandler("stickyHeadersInit")}},remove:function(a,i,s){var l=i.namespace+"stickyheaders ";i.$table.removeClass("hasStickyHeaders").unbind("pagerComplete resize filterEnd stickyHeadersUpdate ".split(" ").join(l).replace(/\s+/g," ")).next("."+r.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(l).replace(/\s+/g," ")),r.addHeaderResizeEvent(a,!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,l,n,o,c=t.$table,d=c.parent(),u=parseInt(c.css("margin-top"),10),f=a.resizable_vars={useStorage:r.storage&&a.resizable!==!1,$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=c.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),o=r.storage(t.table,"tablesorter-table-resized-width")||"auto",r.resizable.setWidth(c,o,!0)),a.resizable_vars.storedSizes=n=(f.useStorage?r.storage(t.table,r.css.resizableStorage):[])||[],r.resizable.setWidths(t,a,n),r.resizable.updateStoredSizes(t,a),a.$resizable_container=e('<div class="'+r.css.resizableContainer+'">').css({top:u}).insertBefore(c),l=0;l<t.columns;l++)s=t.$headerIndexed[l],o=r.getColumnData(t.table,t.headers,l),i="false"===r.getData(s,o,"resizable"),i||e('<div class="'+r.css.resizableHandle+'">').appendTo(a.$resizable_container).attr({"data-column":l,unselectable:"on"}).data("header",s).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,l,n=a.resizable_vars,o=e(t.namespace+"_extra_headers"),c=t.$table.children("colgroup").children("col");if(i=i||n.storedSizes||[],i.length){for(s=0;s<t.columns;s++)r.resizable.setWidth(t.$headerIndexed[s],i[s],n.overflow),o.length&&(l=o.eq(s).add(c.eq(s)),r.resizable.setWidth(l,i[s],n.overflow));l=e(t.namespace+"_extra_table"),l.length&&!r.hasWidget(t.table,"scroller")&&r.resizable.setWidth(l,t.$table.outerWidth(),n.overflow)}},setHandlePosition:function(t,a){var i,s=t.$table.height(),l=a.$resizable_container.children(),n=Math.floor(l.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()})),i=t.$table.position().left,l.each(function(){var r=e(this),l=parseInt(r.attr("data-column"),10),o=t.columns-1,c=r.data("header");c&&(c.is(":visible")?(l<o||l===o&&a.resizable_addLastColumn)&&r.css({display:"inline-block",height:s,left:c.position().left-i+c.outerWidth()-n}):r.hide())})},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,l=i.resizable_vars,n=e(a.namespace+"_extra_headers"),o=e(t.target).data("header");s=parseInt(o.attr("data-column"),10),l.$target=o=o.add(n.filter('[data-column="'+s+'"]')),l.target=s,l.$next=t.shiftKey||i.resizable_targetLast?o.parent().children().not(".resizable-false").filter(":last"):o.nextAll(":not(.resizable-false)").eq(0),s=parseInt(l.$next.attr("data-column"),10),l.$next=l.$next.add(n.filter('[data-column="'+s+'"]')),l.next=s,l.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"+s+" pagerComplete"+s,function(){r.resizable.setHandlePosition(a,i)}).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,l=0,n=a.resizable_vars,o=n.$next,c=n.storedSizes[n.target],d=i.pageX-n.mouseXPosition;if(n.overflow){if(c+d>0){for(n.storedSizes[n.target]+=d,r.resizable.setWidth(n.$target,n.storedSizes[n.target],!0),s=0;s<t.columns;s++)l+=n.storedSizes[s];r.resizable.setWidth(t.$table.add(e(t.namespace+"_extra_table")),l)}o.length||(n.$wrap[0].scrollLeft=t.$table.width())}else n.fullWidth?(n.storedSizes[n.target]+=d,n.storedSizes[n.next]-=d,r.resizable.setWidths(t,a)):(n.storedSizes[n.target]+=d,r.resizable.setWidths(t,a));n.mouseXPosition=i.pageX,t.$table.triggerHandler("stickyHeadersUpdate")}},stopResize:function(e,t){var a=t.resizable_vars;r.resizable.updateStoredSizes(e,t),a.useStorage&&(r.storage(e.table,r.css.resizableStorage,a.storedSizes),r.storage(e.table,"tablesorter-table-resized-width",e.$table.width())),a.mouseXPosition=0,a.$target=a.$next=null,e.$table.triggerHandler("stickyHeadersUpdate")}},r.addWidget({id:"resizable",priority:40,options:{resizable:!0,resizable_addLastColumn:!1,resizable_widths:[],resizable_throttle:!1,resizable_targetLast:!1,resizable_fullWidth:null},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 l=a.namespace+"tsresize";a.$table.add(e(a.namespace+"_extra_table")).removeClass("hasResizable").children("thead").unbind("contextmenu"+l),i.$resizable_container.remove(),r.resizable.toggleTextSelection(a,i,!1),r.resizableReset(t,s),e(document).unbind("mousemove"+l+" mouseup"+l)}}}),r.resizableReset=function(t,a){e(t).each(function(){var e,i,s=this.config,l=s&&s.widgetOptions,n=l.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],l.resizable_widths&&l.resizable_widths[e]?r.resizable.setWidth(i,l.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 l,n,o=a.$table,c=i.saveSort!==!1,d={sortList:a.sortList};a.debug&&(n=new Date),o.hasClass("hasSaveSort")?c&&r.hasInitialized&&t.storage&&(t.storage(r,"tablesorter-savesort",d),a.debug):(o.addClass("hasSaveSort"),d="",t.storage&&(l=t.storage(r,"tablesorter-savesort"),d=l&&l.hasOwnProperty("sortList")&&e.isArray(l.sortList)?l.sortList:"",a.debug,o.bind("saveSortReset",function(e){e.stopPropagation(),t.storage(r,"tablesorter-savesort","")})),s&&d&&d.length>0?a.sortList=d:r.hasInitialized&&d&&d.length>0&&t.sortOn(a,d))},remove:function(e,r){r.$table.removeClass("hasSaveSort"),t.storage&&t.storage(e,"tablesorter-savesort","")}})}(e),e.tablesorter}),!function(e){"use strict";var t=e.tablesorter,r=t.grouping={types:{number:function(e,r,a,i){var s,l=r.hasClass(t.css.sortAsc);return i>1&&""!==a?(s=l?Math.floor(parseFloat(a)/i)*i:Math.ceil(parseFloat(a)/i)*i,s+=" - "+(s+(i-1)*(l?1:-1))):s=parseFloat(a)||a,s},separator:function(t,r,a,i){var s=(a+"").split(t.widgetOptions.group_separator);return e.trim(s[i-1]||"")},text:function(e,t,r){return r},word:function(e,t,r,a){var i=(r+" ").match(/\w+/g)||[];return i[a-1]||""},letter:function(e,t,r,a){return r?(r+" ").substring(0,a):""},date:function(e,t,a,i,s){var l,n,o=e.widgetOptions,c=new Date(a||"");return c instanceof Date&&isFinite(c)?(l=c.getFullYear(),n=r.findMonth(o,c.getMonth()),"year"===i?l:"month"===i?n:"monthyear"===i?n+" "+l:"day"===i?n+" "+c.getDate():"week"===i?r.findWeek(o,c.getDay()):"time"===i?r.findTime(o,c):"hour"===i?r.findTime(o,c,"hour"):o.group_dateString(c,e,t)):o.group_dateInvalid}},findMonth:function(e,t){return e.group_months[t+(""===(e.group_months[0]||"")?1:0)]},findWeek:function(t,r){if(e.isArray(t.group_week))return t.group_week[r];if(!e.isEmptyObject(t.group_week)){var a=["sun","mon","tue","wed","thu","fri","sat"];return t.group_week[a[r]]}},findTime:function(e,t,r){var a,i=e.group_time.am&&e.group_time.pm,s=t.getHours(),l=s>=12?1:0,n=e.group_time24Hour&&s>12?s-12:e.group_time24Hour&&0===s?s+12:s,o=("00"+n).slice(-2),c=("00"+t.getMinutes()).slice(-2);return a=e.group_time[i?["am","pm"][l]:l],"hour"===r?o:o+":"+c+(e.group_time24Hour?"":" "+(a||""))},update:function(t){if(!e.isEmptyObject(t.config.cache)){var a=t.config,i=a.widgetOptions,s="undefined"!=typeof a.sortList[0],l={},n=e.isArray(i.group_forceColumn)&&"undefined"!=typeof i.group_forceColumn[0]?i.group_enforceSort&&!s?-1:i.group_forceColumn[0]:s?a.sortList[0][0]:-1;a.$table.find("tr.group-hidden").removeClass("group-hidden").end().find("tr.group-header").remove(),i.group_collapsible&&a.$table.data("pagerSavedHeight",0),n>=0&&n<a.columns&&!a.$headerIndexed[n].hasClass("group-false")&&(i.group_collapsedGroup="",i.group_collapsedGroups={},l.column=n,l.groupClass=(a.$headerIndexed[n].attr("class")||"").match(/(group-\w+(-\w+)?)/g),l.grouping=l.groupClass?l.groupClass[0].split("-"):["group","letter",1],l.savedGroup=r.saveCurrentGrouping(a,i,l),r.findColumnGroups(a,i,l),r.processHeaders(a,i,l),a.$table.triggerHandler(i.group_complete))}},processHeaders:function(t,r,a){var i,s,l,n,o,c,d=t.$table.find("tr.group-header"),u=d.length;for(d.bind("selectstart",!1),i=0;i<u;i++)c=d.eq(i),o=c.nextUntil("tr.group-header").filter(":visible"),(r.group_count||e.isFunction(r.group_callback))&&(l=c.find(".group-count"),l.length&&(r.group_count&&l.html(r.group_count.toString().replace(/\{num\}/g,o.length)),e.isFunction(r.group_callback)&&r.group_callback(c.find("td"),o,a.column,t.table))),r.group_saveGroups&&!e.isEmptyObject(r.group_collapsedGroups)&&r.group_collapsedGroups[r.group_collapsedGroup].length?(n=c.find(".group-name").text().toLowerCase()+c.attr("data-group-index"),s=e.inArray(n,r.group_collapsedGroups[r.group_collapsedGroup])>-1,c.toggleClass("collapsed",s),o.toggleClass("group-hidden",s)):r.group_collapsed&&r.group_collapsible&&(c.addClass("collapsed"),o.addClass("group-hidden"))},groupHeaderHTML:function(e,t,r){var a=(r.currentGroup||"").toString().replace(/</g,"<").replace(/>/g,">");return'<tr class="group-header '+e.selectorRemove.slice(1)+'" unselectable="on" '+(e.tabIndex?'tabindex="0" ':"")+'data-group-index="'+r.groupIndex+'"><td colspan="'+e.columns+'">'+(t.group_collapsible?"<i/>":"")+'<span class="group-name">'+a+'</span><span class="group-count"></span></td></tr>'},saveCurrentGrouping:function(e,r,a){var i,s,l=!1;return r.group_collapsible&&r.group_saveGroups&&(r.group_collapsedGroups=t.storage&&t.storage(e.table,"tablesorter-groups")||{},s="dir"+e.sortList[0][1],i=r.group_collapsedGroup=""+e.sortList[0][0]+s+a.grouping.join(""),r.group_collapsedGroups[i]?l=!0:r.group_collapsedGroups[i]=[]),l},findColumnGroups:function(e,a,i){var s,l,n,o,c,d=t.hasWidget(e.table,"pager"),u=e.pager||{};for(i.groupIndex=0,s=0;s<e.$tbodies.length;s++)for(l=e.cache[s].normalized,i.group=c,n=d&&!u.ajax?u.startRow-1:0,o=d?u.endRow-(u.ajax?u.startRow:0):l.length;n<o;n++)i.rowData=l[n],i.rowData&&(i.$row=i.rowData[e.columns].$row,i.$row.is(":visible")&&r.types[i.grouping[1]]&&r.insertGroupHeader(e,a,i))},insertGroupHeader:function(t,a,i){var s=t.$headerIndexed[i.column],l=i.rowData[i.column],n=/date/.test(i.groupClass)?i.grouping[2]:parseInt(i.grouping[2]||1,10)||1;i.currentGroup=i.rowData?r.types[i.grouping[1]](t,s,l,n,i.group):i.currentGroup,i.group!==i.currentGroup&&(i.group=i.currentGroup,e.isFunction(a.group_formatter)&&(i.currentGroup=a.group_formatter((i.group||"").toString(),i.column,t.table,t,a,i)||i.group),i.$row.first().before(r.groupHeaderHTML(t,a,i)),a.group_saveGroups&&!i.savedGroup&&a.group_collapsed&&a.group_collapsible&&a.group_collapsedGroups[a.group_collapsedGroup].push(i.currentGroup+i.groupIndex),i.groupIndex++)},bindEvents:function(a,i,s){s.group_collapsible&&(s.group_collapsedGroups=[],i.$table.on("click toggleGroup keyup","tr.group-header",function(r){if(r.stopPropagation(),"keyup"!==r.type||13===r.which){var l,n,o,c=e(this),d=c.find(".group-name").text().toLowerCase()+c.attr("data-group-index");!r.shiftKey||"click"!==r.type&&"keyup"!==r.type||c.siblings(".group-header").trigger("toggleGroup"),c.toggleClass("collapsed"),c.nextUntil("tr.group-header").toggleClass("group-hidden",c.hasClass("collapsed")),l=c.hasClass("collapsed"),!l&&t.hasWidget(i.$table,"zebra")&&t.applyWidgetId(i.$table,"zebra"),
|
||
s.group_saveGroups&&t.storage&&(n=i.$table.find(".group-header"),s.group_collapsedGroups[s.group_collapsedGroup]||(s.group_collapsedGroups[s.group_collapsedGroup]=[]),l&&s.group_collapsedGroup?s.group_collapsedGroups[s.group_collapsedGroup].push(d):s.group_collapsedGroup&&(o=e.inArray(d,s.group_collapsedGroups[s.group_collapsedGroup]),o>-1&&s.group_collapsedGroups[s.group_collapsedGroup].splice(o,1)),t.storage(a,"tablesorter-groups",s.group_collapsedGroups))}})),e(s.group_saveReset).on("click",function(){r.clearSavedGroups(a)}),i.$table.on("pagerChange.tsgrouping",function(){r.update(a)})},clearSavedGroups:function(e){e&&t.storage&&(t.storage(e,"tablesorter-groups",""),r.update(e))}};t.addWidget({id:"group",priority:100,options:{group_collapsible:!0,group_collapsed:!1,group_saveGroups:!0,group_saveReset:null,group_count:" ({num})",group_separator:"-",group_formatter:null,group_callback:null,group_complete:"groupingComplete",group_forceColumn:[],group_enforceSort:!0,group_checkbox:["checked","unchecked"],group_months:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],group_week:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],group_time:["AM","PM"],group_time24Hour:!1,group_dateInvalid:"Invalid Date",group_dateString:function(e){return e.toLocaleString()}},init:function(e,t,a,i){r.bindEvents(e,a,i)},format:function(e,t,a){r.update(e)},remove:function(e,t,r){t.$table.off("click","tr.group-header").off("pagerChange.tsgrouping").find(".group-hidden").removeClass("group-hidden").end().find("tr.group-header").remove()}})}(jQuery),!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:"icon-chevron-up glyphicon glyphicon-chevron-up",iconSortDesc:"icon-chevron-down 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,l,n,o,c,d,u,f,p,g,h,m,b,y=t.themes,_=a.$table.add(e(a.namespace+"_extra_table")),w=a.$headers.add(e(a.namespace+"_extra_headers")),v=a.theme||"jui",x=y[v]||{},C=e.trim([x.sortNone,x.sortDesc,x.sortAsc,x.active].join(" ")),$=e.trim([x.iconSortNone,x.iconSortDesc,x.iconSortAsc].join(" "));for(a.debug&&(c=new Date),_.hasClass("tablesorter-"+v)&&a.theme===a.appliedTheme&&i.uitheme_applied||(i.uitheme_applied=!0,g=y[a.appliedTheme]||{},b=!e.isEmptyObject(g),h=b?[g.sortNone,g.sortDesc,g.sortAsc,g.active].join(" "):"",m=b?[g.iconSortNone,g.iconSortDesc,g.iconSortAsc].join(" "):"",b&&(i.zebra[0]=e.trim(" "+i.zebra[0].replace(" "+g.even,"")),i.zebra[1]=e.trim(" "+i.zebra[1].replace(" "+g.odd,"")),a.$tbodies.children().removeClass([g.even,g.odd].join(" "))),x.even&&(i.zebra[0]+=" "+x.even),x.odd&&(i.zebra[1]+=" "+x.odd),_.children("caption").removeClass(g.caption||"").addClass(x.caption),f=_.removeClass((a.appliedTheme?"tablesorter-"+(a.appliedTheme||""):"")+" "+(g.table||"")).addClass("tablesorter-"+v+" "+(x.table||"")).children("tfoot"),a.appliedTheme=a.theme,f.length&&f.children("tr").removeClass(g.footerRow||"").addClass(x.footerRow).children("th, td").removeClass(g.footerCells||"").addClass(x.footerCells),w.removeClass((b?[g.header,g.hover,h].join(" "):"")||"").addClass(x.header).not(".sorter-false").unbind("mouseenter.tsuitheme mouseleave.tsuitheme").bind("mouseenter.tsuitheme mouseleave.tsuitheme",function(t){e(this)["mouseenter"===t.type?"addClass":"removeClass"](x.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?[g.icons,m].join(" "):"").addClass(x.icons||""),t.hasWidget(a.table,"filter")&&(l=function(){_.children("thead").children("."+t.css.filterRow).removeClass(b?g.filterRow||"":"").addClass(x.filterRow||"")},i.filter_initialized?l():_.one("filterInit",function(){l()}))),s=0;s<a.columns;s++)d=a.$headers.add(e(a.namespace+"_extra_headers")).not(".sorter-false").filter('[data-column="'+s+'"]'),u=t.css.icon?d.find("."+t.css.icon):e(),p=w.not(".sorter-false").filter('[data-column="'+s+'"]:last'),p.length&&(d.removeClass(C),u.removeClass($),p[0].sortDisabled?u.removeClass(x.icons||""):(n=x.sortNone,o=x.iconSortNone,p.hasClass(t.css.sortAsc)?(n=[x.sortAsc,x.active].join(" "),o=x.iconSortAsc):p.hasClass(t.css.sortDesc)&&(n=[x.sortDesc,x.active].join(" "),o=x.iconSortDesc),d.addClass(n),u.addClass(o||"")));a.debug&&void 0},remove:function(e,r,a,i){if(a.uitheme_applied){var s=r.$table,l=r.appliedTheme||"jui",n=t.themes[l]||t.themes.jui,o=s.children("thead").children(),c=n.sortNone+" "+n.sortDesc+" "+n.sortAsc,d=n.iconSortNone+" "+n.iconSortDesc+" "+n.iconSortAsc;s.removeClass("tablesorter-"+l+" "+n.table),a.uitheme_applied=!1,i||(s.find(t.css.header).removeClass(n.header),o.unbind("mouseenter.tsuitheme mouseleave.tsuitheme").removeClass(n.hover+" "+c+" "+n.active).filter("."+t.css.filterRow).removeClass(n.filterRow),o.find("."+t.css.icon).removeClass(n.icons+" "+d))}}})}(jQuery),!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_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,l){var n,o,c=r.$table,d=r.$tbodies,u="addRows updateCell update updateRows updateComplete appendCache filterReset filterEnd search ".split(" ").join(r.namespace+"filter ");if(c.removeClass("hasFilters").unbind(u.replace(a.regex.spaces," ")).find("."+i.filterRow).remove(),s.filter_initialized=!1,!l){for(n=0;n<d.length;n++)o=a.processTbody(t,d.eq(n),!0),o.children().removeClass(s.filter_filteredRow).show(),a.processTbody(t,o,!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(e,a,i){if((r.orTest.test(a.iFilter)||r.orSplit.test(a.filter))&&!r.regex.test(a.filter)){var s,l,n,o,c=p.extend({},a),d=a.filter.split(r.orSplit),u=a.iFilter.split(r.orSplit),f=d.length;for(s=0;s<f;s++){c.nestedFilters=!0,c.filter=""+(t.parseFilter(e,d[s],a)||""),c.iFilter=""+(t.parseFilter(e,u[s],a)||""),n="("+(t.parseFilter(e,c.filter,a)||"")+")";try{if(o=new RegExp(a.isMatch?n:"^"+n+"$",e.widgetOptions.filter_ignoreCase?"i":""),l=o.test(c.exact)||t.processTypes(e,c,i))return l}catch(p){return null}}return l||!1}return null},and:function(e,a,i){if(r.andTest.test(a.filter)){var s,l,n,o,c,d=g.extend({},a),u=a.filter.split(r.andSplit),f=a.iFilter.split(r.andSplit),p=u.length;for(s=0;s<p;s++){d.nestedFilters=!0,d.filter=""+(t.parseFilter(e,u[s],a)||""),d.iFilter=""+(t.parseFilter(e,f[s],a)||""),o=("("+(t.parseFilter(e,d.filter,a)||"")+")").replace(r.wild01,"\\S{1}").replace(r.wild0More,"\\S*");try{c=new RegExp(a.isMatch?o:"^"+o+"$",e.widgetOptions.filter_ignoreCase?"i":""),n=c.test(d.exact)||t.processTypes(e,d,i),l=0===s?n:l&&n}catch(g){return null}}return l||!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 l,n,o,c=i.table,d=s.parsed[s.index],u=a.formatFloat(s.iFilter.replace(r.operators,""),c),f=i.parsers[s.index]||{},p=u;return(d||"numeric"===f.type)&&(o=e.trim(""+s.iFilter.replace(r.operators,"")),n=t.parseFilter(i,o,s,!0),u="number"!=typeof n||""===n||isNaN(n)?u:n),!d&&"numeric"!==f.type||isNaN(u)||"undefined"==typeof s.cache?(o=isNaN(s.iExact)?s.iExact.replace(a.regex.nondigit,""):s.iExact,l=a.formatFloat(o,c)):l=s.cache,r.gtTest.test(s.iFilter)?n=r.gteTest.test(s.iFilter)?l>=u:l>u:r.ltTest.test(s.iFilter)&&(n=r.lteTest.test(s.iFilter)?l<=u:l<u),n||""!==p||(n=!0),n}return null},notMatch:function(a,i){if(r.notTest.test(i.iFilter)){var s,l=i.iFilter.replace("!",""),n=t.parseFilter(a,l,i)||"";return r.exact.test(n)?(n=n.replace(r.exact,""),""===n||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,""),l=t.parseFilter(a,s,i)||"";return i.anyMatch?e.inArray(l,i.rowArray)>=0:l==i.iExact}return null},range:function(e,i){if(r.toTest.test(i.iFilter)){var s,l,n,o,c=e.table,d=i.index,u=i.parsed[d],f=i.iFilter.split(r.toSplit);return l=f[0].replace(a.regex.nondigit,"")||"",n=a.formatFloat(t.parseFilter(e,l,i),c),l=f[1].replace(a.regex.nondigit,"")||"",o=a.formatFloat(t.parseFilter(e,l,i),c),(u||"numeric"===e.parsers[d].type)&&(s=e.parsers[d].format(""+f[0],c,e.$headers.eq(d),d),n=""===s||isNaN(s)?n:s,s=e.parsers[d].format(""+f[1],c,e.$headers.eq(d),d),o=""===s||isNaN(s)?o:s),!u&&"numeric"!==e.parsers[d].type||isNaN(n)||isNaN(o)?(l=isNaN(i.iExact)?i.iExact.replace(a.regex.nondigit,""):i.iExact,s=a.formatFloat(l,c)):s=i.cache,n>o&&(l=n,n=o,o=l),s>=n&&s<=o||""===n||""===o}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,l=a.iExact.length,n=a.iFilter.slice(1),o=t.parseFilter(e,n,a)||"";for(i=0;i<l;i++)a.iExact[i]===o[s]&&(s+=1);return s===o.length}return null}},init:function(s){a.language=e.extend(!0,{},{to:"to",or:"or",and:"and"},a.language);var l,n,o,c,d,u,f,p,g=s.config,h=g.widgetOptions;if(g.$table.addClass("hasFilters"),g.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*=","]',u="\\{"+r.query+"\\}",e.extend(r,{child:new RegExp(g.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(u,"i"),igQuery:new RegExp(u,"ig"),operTest:/^[<>]=?/,gtTest:/>/,gteTest:/>=/,ltTest:/</,lteTest:/<=/,notTest:/^\!/,wildOrTest:/[\?\*\|]/,wildTest:/\?\*/,fuzzyTest:/^~/,exactTest:/[=\"\|!]/}),u=g.$headers.filter(".filter-false, .parser-false").length,h.filter_columnFilters!==!1&&u!==g.$headers.length&&t.buildRow(s,g,h),o="addRows updateCell update updateRows updateComplete appendCache filterReset "+"filterResetSaved filterEnd search ".split(" ").join(g.namespace+"filter "),g.$table.bind(o,function(r,l){return u=h.filter_hideEmpty&&e.isEmptyObject(g.cache)&&!(g.delayInit&&"appendCache"===r.type),g.$table.find("."+i.filterRow).toggleClass(h.filter_filteredRow,u),/(search|filter)/.test(r.type)||(r.stopPropagation(),t.buildDefault(s,!0)),"filterReset"===r.type?(g.$table.find("."+i.filter).add(h.filter_$externalFilters).val(""),t.searching(s,[])):"filterResetSaved"===r.type?a.storage(s,"tablesorter-filters",""):"filterEnd"===r.type?t.buildDefault(s,!0):(l="search"===r.type?l:"updateComplete"===r.type?g.$table.data("lastSearch"):"",/(update|add)/.test(r.type)&&"updateComplete"!==r.type&&(g.lastCombinedFilter=null,g.lastSearch=[],setTimeout(function(){g.$table.triggerHandler("filterFomatterUpdate")},100)),t.searching(s,l,!0)),!1}),h.filter_reset&&(h.filter_reset instanceof e?h.filter_reset.click(function(){g.$table.triggerHandler("filterReset")}):e(h.filter_reset).length&&e(document).undelegate(h.filter_reset,"click"+g.namespace+"filter").delegate(h.filter_reset,"click"+g.namespace+"filter",function(){g.$table.triggerHandler("filterReset")})),h.filter_functions)for(d=0;d<g.columns;d++)if(f=a.getColumnData(s,h.filter_functions,d))if(c=g.$headerIndexed[d].removeClass("filter-select"),p=!(c.hasClass("filter-false")||c.hasClass("parser-false")),l="",f===!0&&p)t.buildSelect(s,d);else if("object"==typeof f&&p){for(n in f)"string"==typeof n&&(l+=""===l?'<option value="">'+(c.data("placeholder")||c.attr("data-placeholder")||h.filter_placeholder.select||"")+"</option>":"",u=n,o=n,n.indexOf(h.filter_selectSourceSeparator)>=0&&(u=n.split(h.filter_selectSourceSeparator),o=u[1],u=u[0]),l+="<option "+(o===u?"":'data-function-name="'+n+'" ')+'value="'+u+'">'+o+"</option>");g.$table.find("thead").find("select."+i.filter+'[data-column="'+d+'"]').append(l),o=h.filter_selectSource,f="function"==typeof o||a.getColumnData(s,o,d),f&&t.buildSelect(g.table,d,"",!0,c.hasClass(h.filter_onlyAvail))}t.buildDefault(s,!0),t.bindSearch(s,g.$table.find("."+i.filter),!0),h.filter_external&&t.bindSearch(s,h.filter_external),h.filter_hideFilters&&t.hideFilters(g),g.showProcessing&&(o="filterStart filterEnd ".split(" ").join(g.namespace+"filter "),g.$table.unbind(o.replace(a.regex.spaces," ")).bind(o,function(t,r){c=r?g.$table.find("."+i.header).filter("[data-column]").filter(function(){return""!==r[e(this).data("column")]}):"",a.isProcessing(s,"filterStart"===t.type,r?c:"")})),g.filteredRows=g.totalRows,o="tablesorter-initialized pagerBeforeInitialized ".split(" ").join(g.namespace+"filter "),g.$table.unbind(o.replace(a.regex.spaces," ")).bind(o,function(){t.completeInit(this)}),g.pager&&g.pager.initialized&&!h.filter_initialized?(g.$table.triggerHandler("filterFomatterUpdate"),setTimeout(function(){t.filterInitComplete(g)},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")[0].config.widgetOptions;r&&!r.filter_initialized&&(r.filter_formatterInit[t]=1)},filterInitComplete:function(r){var a,i,s=r.widgetOptions,l=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]&&l++;clearTimeout(s.filter_initTimer),s.filter_initialized||l!==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 l,n,o,c,d,u=a.getFilters(r)||[];if(s.filter_saveFilters&&a.storage&&(n=a.storage(r,"tablesorter-filters")||[],l=e.isArray(n),l&&""===n.join("")||!l||(u=t.processFilters(n))),""===u.join(""))for(d=i.$headers.add(s.filter_$externalFilters).filter("["+s.filter_defaultAttrib+"]"),o=0;o<=i.columns;o++)c=o===i.columns?"all":o,u[o]=d.filter('[data-column="'+c+'"]').attr(s.filter_defaultAttrib)||u[o]||"";return i.$table.data("lastSearch",u),u},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,l){var n,o,c,d,u,f,p,g,h,m=l.filter_cellFilter,b=s.columns,y=e.isArray(m),_='<tr role="row" class="'+i.filterRow+" "+s.cssIgnoreRow+'">';for(c=0;c<b;c++)s.$headerIndexed[c].length&&(h=s.$headerIndexed[c]&&s.$headerIndexed[c][0].colSpan||0,_+=h>1?'<td data-column="'+c+"-"+(c+h-1)+'" colspan="'+h+'"':'<td data-column="'+c+'"',_+=y?m[c]?' class="'+m[c]+'"':"":""!==m?' class="'+m+'"':"",_+="></td>");for(s.$filters=e(_+="</tr>").appendTo(s.$table.children("thead").eq(0)).children("td"),c=0;c<b;c++)f=!1,d=s.$headerIndexed[c],d&&d.length&&(n=t.getColumnElm(s,s.$filters,c),g=a.getColumnData(r,l.filter_functions,c),u=l.filter_functions&&g&&"function"!=typeof g||d.hasClass("filter-select"),o=a.getColumnData(r,s.headers,c),f="false"===a.getData(d[0],o,"filter")||"false"===a.getData(d[0],o,"parser"),u?_=e("<select>").appendTo(n):(g=a.getColumnData(r,l.filter_formatter,c),g?(l.filter_formatterCount++,_=g(n,c),_&&0===_.length&&(_=n.children("input")),_&&(0===_.parent().length||_.parent().length&&_.parent()[0]!==n[0])&&n.append(_)):_=e('<input type="search">').appendTo(n),_&&(h=d.data("placeholder")||d.attr("data-placeholder")||l.filter_placeholder.search||"",_.attr("placeholder",h))),_&&(p=(e.isArray(l.filter_cssFilter)?"undefined"!=typeof l.filter_cssFilter[c]?l.filter_cssFilter[c]||"":"":l.filter_cssFilter)||"",_.addClass(i.filter+" "+p).attr("data-column",n.attr("data-column")),f&&(_.attr("placeholder","").addClass(i.filterDisabled)[0].disabled=!0)))},bindSearch:function(r,i,l){if(r=e(r)[0],i=e(i),i.length){var n,o=r.config,c=o.widgetOptions,d=o.namespace+"filter",u=c.filter_$externalFilters;l!==!0&&(n=c.filter_anyColumnSelector+","+c.filter_multipleColumnSelector,c.filter_$anyMatch=i.filter(n),u&&u.length?c.filter_$externalFilters=c.filter_$externalFilters.add(i):c.filter_$externalFilters=i,a.setFilters(r,o.$table.data("lastSearch")||[],l===!1)),n="keypress keyup keydown search change input ".split(" ").join(d+" "),i.attr("data-lastSearchTime",(new Date).getTime()).unbind(n.replace(a.regex.spaces," ")).bind("keydown"+d,function(e){if(e.which===s.escape&&!r.config.widgetOptions.filter_resetOnEsc)return!1}).bind("keyup"+d,function(i){c=r.config.widgetOptions;var l=parseInt(e(this).attr("data-column"),10),n="boolean"==typeof c.filter_liveSearch?c.filter_liveSearch:a.getColumnData(r,c.filter_liveSearch,l);if("undefined"==typeof n&&(n=c.filter_liveSearch.fallback||!1),e(this).attr("data-lastSearchTime",(new Date).getTime()),i.which===s.escape)this.value=c.filter_resetOnEsc?"":o.lastSearch[l];else{if(n===!1)return;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}t.searching(r,!0,!0,l)}).bind("search change keypress input ".split(" ").join(d+" "),function(i){var l=parseInt(e(this).attr("data-column"),10),n="boolean"==typeof c.filter_liveSearch?c.filter_liveSearch:a.getColumnData(r,c.filter_liveSearch,l);!r.config.widgetOptions.filter_initialized||i.which!==s.enter&&"search"!==i.type&&("change"!==i.type&&"input"!==i.type||n!==!0||this.value===o.lastSearch[l])||(i.preventDefault(),e(this).attr("data-lastSearchTime",(new Date).getTime()),t.searching(r,"keypress"!==i.type,!0,l))})}},searching:function(e,r,i,s){var l,n=e.config.widgetOptions;"undefined"==typeof s?l=!1:(l="boolean"==typeof n.filter_liveSearch?n.filter_liveSearch:a.getColumnData(e,n.filter_liveSearch,s),"undefined"==typeof l&&(l=n.filter_liveSearch.fallback||!1)),clearTimeout(n.filter_searchTimer),"undefined"==typeof r||r===!0?n.filter_searchTimer=setTimeout(function(){t.checkFilters(e,r,i)},l?n.filter_searchDelay:10):t.checkFilters(e,r,i)},checkFilters:function(r,s,l){var n=r.config,o=n.widgetOptions,c=e.isArray(s),d=c?s:a.getFilters(r,!0),u=(d||[]).join("");return e.isEmptyObject(n.cache)?void(n.delayInit&&(!n.pager||n.pager&&n.pager.initialized)&&a.updateCache(n,function(){t.checkFilters(r,!1,l)})):(c&&(a.setFilters(r,d,!1,l!==!0),o.filter_initialized||(n.lastCombinedFilter="")),o.filter_hideFilters&&n.$table.find("."+i.filterRow).triggerHandler(t.hideFiltersCheck(n)?"mouseleave":"mouseenter"),n.lastCombinedFilter!==u||s===!1?(s===!1&&(n.lastCombinedFilter=null,n.lastSearch=[]),d=d||[],d=Array.prototype.map?d.map(String):d.join("<22>").split("<22>"),o.filter_initialized&&n.$table.triggerHandler("filterStart",[d]),n.showProcessing?void setTimeout(function(){return t.findRows(r,d,u),!1},30):(t.findRows(r,d,u),!1)):void 0)},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 l=a,n=e(this);clearTimeout(s),s=setTimeout(function(){/enter|over/.test(l.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 l=a,n=e(this).closest("tr");clearTimeout(s),s=setTimeout(function(){clearTimeout(s),n.toggleClass(i.filterRowHide,t.hideFiltersCheck(r)&&"focus"!==l.type)},200)})},defaultFilter:function(t,a){if(""===t)return t;var i=r.iQuery,s=a.match(r.igQuery).length,l=s>1?e.trim(t).split(/\s/):[e.trim(t)],n=l.length-1,o=0,c=a;for(n<1&&s>1&&(l[1]=l[0]);i.test(c);)c=c.replace(i,l[o++]||""),i.test(c)&&o<n&&""!==(l[o]||"")&&(c=a.replace(i,c));return c},getLatestSearch:function(t){return t?t.sort(function(t,r){return e(r).attr("data-lastSearchTime")-e(t).attr("data-lastSearchTime")}):t||e()},findRange:function(e,t,r){var a,i,s,l,n,o,c,d,u,f=[];if(/^[0-9]+$/.test(t))return[parseInt(t,10)];if(!r&&/-/.test(t))for(i=t.match(/(\d+)\s*-\s*(\d+)/g),u=i?i.length:0,d=0;d<u;d++){for(s=i[d].split(/\s*-\s*/),l=parseInt(s[0],10)||0,n=parseInt(s[1],10)||e.columns-1,l>n&&(a=l,l=n,n=a),n>=e.columns&&(n=e.columns-1);l<=n;l++)f[f.length]=l;t=t.replace(i[d],"")}if(!r&&/,/.test(t))for(o=t.split(/\s*,\s*/),u=o.length,c=0;c<u;c++)""!==o[c]&&(d=parseInt(o[c],10),d<e.columns&&(f[f.length]=d));if(!f.length)for(d=0;d<e.columns;d++)f[f.length]=d;return f},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,l=e.trim(t.getLatestSearch(a).attr("data-column")||"");return t.findRange(r,l,!s)},processTypes:function(r,a,i){var s,l=null,n=null;for(s in t.types)e.inArray(s,i.excludeMatch)<0&&null===n&&(n=t.types[s](r,a,i),null!==n&&(l=n));return l},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,l){var n,o,c,d,u,f=i.widgetOptions,p=!0,g=f.filter_$anyMatch&&f.filter_$anyMatch.length,h=f.filter_$anyMatch&&f.filter_$anyMatch.length?t.multipleColumns(i,f.filter_$anyMatch):[];if(s.$cells=s.$row.children(),s.anyMatchFlag&&h.length>1||s.anyMatchFilter&&!g){if(s.anyMatch=!0,s.isMatch=!0,s.rowArray=s.$cells.map(function(t){if(e.inArray(t,h)>-1||s.anyMatchFilter&&!g)return s.parsed[t]?u=s.cacheArray[t]:(u=s.rawArray[t],u=e.trim(f.filter_ignoreCase?u.toLowerCase():u),i.sortLocaleCompare&&(u=a.replaceAccents(u))),u}).get(),s.filter=s.anyMatchFilter,s.iFilter=s.iAnyMatchFilter,s.exact=s.rowArray.join(" "),s.iExact=f.filter_ignoreCase?s.exact.toLowerCase():s.exact,s.cache=s.cacheArray.slice(0,-1).join(" "),l.excludeMatch=l.noAnyMatch,o=t.processTypes(i,s,l),null!==o)p=o;else if(f.filter_startsWith)for(p=!1,h=Math.min(i.columns,s.rowArray.length);!p&&h>0;)h--,p=p||0===s.rowArray[h].indexOf(s.iFilter);else p=(s.iExact+s.childRowText).indexOf(s.iFilter)>=0;if(s.anyMatch=!1,s.filters.join("")===s.filter)return p}for(h=0;h<i.columns;h++)s.filter=s.filters[h],s.index=h,l.excludeMatch=l.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)&&f.filter_ignoreCase?s.exact.toLowerCase():s.exact,s.isMatch=t.matchType(i,h),n=p,d=f.filter_columnFilters?i.$filters.add(f.filter_$externalFilters).filter('[data-column="'+h+'"]').find("select option:selected").attr("data-function-name")||"":"",i.sortLocaleCompare&&(s.filter=a.replaceAccents(s.filter)),f.filter_defaultFilter&&r.iQuery.test(l.defaultColFilter[h])&&(s.filter=t.defaultFilter(s.filter,l.defaultColFilter[h])),s.iFilter=f.filter_ignoreCase?(s.filter||"").toLowerCase():s.filter,c=l.functions[h],o=null,c&&(c===!0?o=s.isMatch?(""+s.iExact).search(s.iFilter)>=0:s.filter===s.exact:"function"==typeof c?o=c(s.exact,s.cache,s.filter,h,s.$row,i,s):"function"==typeof c[d||s.filter]&&(u=d||s.filter,o=c[u](s.exact,s.cache,s.filter,h,s.$row,i,s))),null===o?(o=t.processTypes(i,s,l),null!==o?n=o:(u=(s.iExact+s.childRowText).indexOf(t.parseFilter(i,s.iFilter,s)),n=!f.filter_startsWith&&u>=0||f.filter_startsWith&&0===u)):n=o,p=!!n&&p);return p},findRows:function(i,s,l){if(i.config.lastCombinedFilter!==l&&i.config.widgetOptions.filter_initialized){var n,o,c,d,u,f,p,g,h,m,b,y,_,w,v,x,C,$,S,F,R,z,T,I,k=e.extend([],s),A=i.config,D=A.widgetOptions,H={anyMatch:!1,filters:s,filter_regexCache:[]},O={noAnyMatch:["range","operators"],functions:[],excludeFilter:[],defaultColFilter:[],defaultAnyFilter:a.getColumnData(i,D.filter_defaultFilter,A.columns,!0)||""};for(H.parsed=[],h=0;h<A.columns;h++)H.parsed[h]=D.filter_useParsedData||A.parsers&&A.parsers[h]&&A.parsers[h].parsed||a.getData&&"parsed"===a.getData(A.$headerIndexed[h],a.getColumnData(i,A.headers,h),"filter")||A.$headerIndexed[h].hasClass("filter-parsed"),O.functions[h]=a.getColumnData(i,D.filter_functions,h)||A.$headerIndexed[h].hasClass("filter-select"),O.defaultColFilter[h]=a.getColumnData(i,D.filter_defaultFilter,h)||"",O.excludeFilter[h]=(a.getColumnData(i,D.filter_excludeFilter,h,!0)||"").split(/\s+/);for(A.debug&&(v=new Date),A.filteredRows=0,A.totalRows=0,l=(k||[]).join(""),p=0;p<A.$tbodies.length;p++){if(g=a.processTbody(i,A.$tbodies.eq(p),!0),h=A.columns,o=A.cache[p].normalized,d=e(e.map(o,function(e){return e[h].$row.get()})),""===l||D.filter_serversideFiltering)d.removeClass(D.filter_filteredRow).not("."+A.cssChildRow).css("display","");else{if(d=d.not("."+A.cssChildRow),n=d.length,(D.filter_$anyMatch&&D.filter_$anyMatch.length||"undefined"!=typeof s[A.columns])&&(H.anyMatchFlag=!0,H.anyMatchFilter=""+(s[A.columns]||D.filter_$anyMatch&&t.getLatestSearch(D.filter_$anyMatch).val()||""),D.filter_columnAnyMatch)){for(F=H.anyMatchFilter.split(r.andSplit),R=!1,C=0;C<F.length;C++)z=F[C].split(":"),z.length>1&&(isNaN(z[0])?e.each(A.headerContent,function(e,t){t.toLowerCase().indexOf(z[0])>-1&&(T=e,s[T]=z[1])}):T=parseInt(z[0],10)-1,T>=0&&T<A.columns&&(s[T]=z[1],F.splice(C,1),C--,R=!0));R&&(H.anyMatchFilter=F.join(" && "))}if(S=D.filter_searchFiltered,y=A.lastSearch||A.$table.data("lastSearch")||[],S)for(C=0;C<h+1;C++)x=s[C]||"",S||(C=h),S=S&&y.length&&0===x.indexOf(y[C]||"")&&!r.alreadyFiltered.test(x)&&!r.exactTest.test(x)&&!(r.isNeg1.test(x)||r.isNeg2.test(x))&&!(""!==x&&A.$filters&&A.$filters.filter('[data-column="'+C+'"]').find("select").length&&!t.matchType(A,C));for($=d.not("."+D.filter_filteredRow).length,S&&0===$&&(S=!1),A.debug&&void 0,H.anyMatchFlag&&(A.sortLocaleCompare&&(H.anyMatchFilter=a.replaceAccents(H.anyMatchFilter)),D.filter_defaultFilter&&r.iQuery.test(O.defaultAnyFilter)&&(H.anyMatchFilter=t.defaultFilter(H.anyMatchFilter,O.defaultAnyFilter),S=!1),H.iAnyMatchFilter=D.filter_ignoreCase&&A.ignoreCase?H.anyMatchFilter.toLowerCase():H.anyMatchFilter),f=0;f<n;f++)if(I=d[f].className,m=f&&r.child.test(I),!(m||S&&r.filtered.test(I))){if(H.$row=d.eq(f),H.rowIndex=f,H.cacheArray=o[f],c=H.cacheArray[A.columns],H.rawArray=c.raw,H.childRowText="",!D.filter_childByColumn){for(I="",b=c.child,C=0;C<b.length;C++)I+=" "+b[C].join(" ")||"";H.childRowText=D.filter_childRows?D.filter_ignoreCase?I.toLowerCase():I:""}if(_=!1,w=t.processRow(A,H,O),u=c.$row,x=!!w,b=c.$row.filter(":gt(0)"),D.filter_childRows&&b.length){if(D.filter_childByColumn)for(D.filter_childWithSibs||(b.addClass(D.filter_filteredRow),u=u.eq(0)),C=0;C<b.length;C++)H.$row=b.eq(C),H.cacheArray=c.child[C],H.rawArray=H.cacheArray,x=t.processRow(A,H,O),_=_||x,!D.filter_childWithSibs&&x&&b.eq(C).removeClass(D.filter_filteredRow);_=_||w}else _=x;u.toggleClass(D.filter_filteredRow,!_)[0].display=_?"":"none"}}A.filteredRows+=d.not("."+D.filter_filteredRow).length,A.totalRows+=d.length,a.processTbody(i,g,!1)}A.lastCombinedFilter=l,A.lastSearch=k,A.$table.data("lastSearch",k),D.filter_saveFilters&&a.storage&&a.storage(i,"tablesorter-filters",t.processFilters(k,!0)),A.debug&&void 0,D.filter_initialized&&(A.$table.triggerHandler("filterBeforeEnd",A),A.$table.triggerHandler("filterEnd",A)),setTimeout(function(){a.applyWidget(A.table)},0)}},getOptionSource:function(r,i,s){r=e(r)[0];var l=r.config,n=l.widgetOptions,o=!1,c=n.filter_selectSource,d=l.$table.data("lastSearch")||[],u="function"==typeof c||a.getColumnData(r,c,i);if(s&&""!==d[i]&&(s=!1),u===!0)o=c(r,i,s);else{if(u instanceof e||"string"===e.type(u)&&u.indexOf("</option>")>=0)return u;e.isArray(u)?o=u:"object"===e.type(c)&&u&&(o=u(r,i,s))}return o===!1&&(o=t.getOptions(r,i,s)),t.processOptions(r,i,o)},processOptions:function(t,r,i){if(!e.isArray(i))return!1;t=e(t)[0];var s,l,n,o,c,d,u=t.config,f="undefined"!=typeof r&&null!==r&&r>=0&&r<u.columns,p=!!f&&u.$headerIndexed[r].hasClass("filter-select-sort-desc"),g=[];if(i=e.grep(i,function(t,r){return!!t.text||e.inArray(t,i)===r}),f&&u.$headerIndexed[r].hasClass("filter-select-nosort"))return i;for(o=i.length,n=0;n<o;n++)l=i[n],d=l.text?l.text:l,c=(f&&u.parsers&&u.parsers.length&&u.parsers[r].format(d,t,[],r)||d).toString(),c=u.widgetOptions.filter_ignoreCase?c.toLowerCase():c,l.text?(l.parsed=c,g[g.length]=l):g[g.length]={text:l,parsed:c};for(s=u.textSorter||"",g.sort(function(e,i){var l=p?i.parsed:e.parsed,n=p?e.parsed:i.parsed;return f&&"function"==typeof s?s(l,n,!0,r,t):f&&"object"==typeof s&&s.hasOwnProperty(r)?s[r](l,n,!0,r,t):!a.sortNatural||a.sortNatural(l,n)}),i=[],o=g.length,n=0;n<o;n++)i[i.length]=g[n];
|
||
return i},getOptions:function(t,r,i){t=e(t)[0];var s,l,n,o,c,d,u,f,p=t.config,g=p.widgetOptions,h=[];for(l=0;l<p.$tbodies.length;l++)for(c=p.cache[l],n=p.cache[l].normalized.length,s=0;s<n;s++)if(o=c.row?c.row[s]:c.normalized[s][p.columns].$row[0],!i||!o.className.match(g.filter_filteredRow))if(g.filter_useParsedData||p.parsers[r].parsed||p.$headerIndexed[r].hasClass("filter-parsed")){if(h[h.length]=""+c.normalized[s][r],g.filter_childRows&&g.filter_childByColumn)for(f=c.normalized[s][p.columns].$row.length-1,d=0;d<f;d++)h[h.length]=""+c.normalized[s][p.columns].child[d][r]}else if(h[h.length]=c.normalized[s][p.columns].raw[r],g.filter_childRows&&g.filter_childByColumn)for(f=c.normalized[s][p.columns].$row.length,d=1;d<f;d++)u=c.normalized[s][p.columns].$row.eq(d).children().eq(r),h[h.length]=""+a.getElementText(p,u,r);return h},buildSelect:function(a,s,l,n,o){if(a=e(a)[0],s=parseInt(s,10),a.config.cache&&!e.isEmptyObject(a.config.cache)){var c,d,u,f,p,g,h,m=a.config,b=m.widgetOptions,y=m.$headerIndexed[s],_='<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("undefined"!=typeof l&&""!==l||(l=t.getOptionSource(a,s,o)),e.isArray(l)){for(c=0;c<l.length;c++)if(h=l[c],h.text){h["data-function-name"]="undefined"==typeof h.value?h.text:h.value,_+="<option";for(d in h)h.hasOwnProperty(d)&&"text"!==d&&(_+=" "+d+'="'+h[d]+'"');h.value||(_+=' value="'+h.text+'"'),_+=">"+h.text+"</option>"}else""+h!="[object Object]"&&(u=h=(""+h).replace(r.quote,"""),d=u,u.indexOf(b.filter_selectSourceSeparator)>=0&&(f=u.split(b.filter_selectSourceSeparator),d=f[0],u=f[1]),_+=""!==h?"<option "+(d===u?"":'data-function-name="'+h+'" ')+'value="'+d+'">'+u+"</option>":"");l=[]}p=(m.$filters?m.$filters:m.$table.children("thead")).find("."+i.filter),b.filter_$externalFilters&&(p=p&&p.length?p.add(b.filter_$externalFilters):b.filter_$externalFilters),g=p.filter('select[data-column="'+s+'"]'),g.length&&(g[n?"html":"append"](_),e.isArray(l)||g.append(l).val(w),g.val(w))}},buildDefault:function(e,r){var i,s,l,n=e.config,o=n.widgetOptions,c=n.columns;for(i=0;i<c;i++)s=n.$headerIndexed[i],l=!(s.hasClass("filter-false")||s.hasClass("parser-false")),(s.hasClass("filter-select")||a.getColumnData(e,o.filter_functions,i)===!0)&&l&&t.buildSelect(e,i,"",r,s.hasClass(o.filter_onlyAvail))}},r=t.regex,a.getFilters=function(r,a,s,l){var n,o,c,d,u=[],f=r?e(r)[0].config:"",p=f?f.widgetOptions:"";if(a!==!0&&p&&!p.filter_columnFilters||e.isArray(s)&&s.join("")===f.lastCombinedFilter)return e(r).data("lastSearch");if(f&&(f.$filters&&(o=f.$filters.find("."+i.filter)),p.filter_$externalFilters&&(o=o&&o.length?o.add(p.filter_$externalFilters):p.filter_$externalFilters),o&&o.length))for(u=s||[],n=0;n<f.columns+1;n++)d=n===f.columns?p.filter_anyColumnSelector+","+p.filter_multipleColumnSelector:'[data-column="'+n+'"]',c=o.filter(d),c.length&&(c=t.getLatestSearch(c),e.isArray(s)?(l&&c.length>1&&(c=c.slice(1)),n===f.columns&&(d=c.filter(p.filter_anyColumnSelector),c=d.length?d:c),c.val(s[n]).trigger("change"+f.namespace)):(u[n]=c.val()||"",n===f.columns?c.slice(1).filter('[data-column*="'+c.attr("data-column")+'"]').val(u[n]):c.slice(1).val(u[n])),n===f.columns&&c.length&&(p.filter_$anyMatch=c));return u},a.setFilters=function(r,i,s,l){var n=r?e(r)[0].config:"",o=a.getFilters(r,!0,i,l);return"undefined"==typeof s&&(s=!0),n&&s&&(n.lastCombinedFilter=null,n.lastSearch=[],t.searching(n.table,i,l),n.$table.triggerHandler("filterFomatterUpdate")),0!==o.length}}(jQuery),!function(e){"use strict";var t=e.tablesorter,r=".tscolsel",a=t.columnSelector={queryAll:"@media only all { [columns] { display: none; } } ",queryBreak:"@media all and (min-width: [size]) { [columns] { display: table-cell; } } ",init:function(t,i,s){var l,n;return l=e(s.columnSelector_layout),l.find("input").add(l.filter("input")).length?(i.$table.addClass(i.namespace.slice(1)+"columnselector"),n=i.selector={$container:e(s.columnSelector_container||"<div>")},n.$style=e("<style></style>").prop("disabled",!0).appendTo("head"),n.$breakpoints=e("<style></style>").prop("disabled",!0).appendTo("head"),n.isInitializing=!0,a.setUpColspan(i,s),a.setupSelector(i,s),s.columnSelector_mediaquery&&a.setupBreakpoints(i,s),n.isInitializing=!1,n.$container.length?a.updateCols(i,s):i.debug&&void 0,void i.$table.off("refreshColumnSelector"+r).on("refreshColumnSelector"+r,function(e,t,r){a.refreshColumns(this.config,t,r)})):void(i.debug&&void 0)},refreshColumns:function(t,r,i){var s,l,n,o,c=t.selector,d=e.isArray(i||r),u=t.widgetOptions;if("undefined"!=typeof r&&null!==r&&c.$container.length){if("selectors"===r&&(c.$container.empty(),a.setupSelector(t,u),a.setupBreakpoints(t,u),"undefined"==typeof i&&null!==i&&(i=c.auto)),d)for(l=i||r,e.each(l,function(e,t){l[e]=parseInt(t,10)}),s=0;s<t.columns;s++)o=e.inArray(s,l)>=0,n=c.$container.find("input[data-column="+s+"]"),n.length&&(n.prop("checked",o),c.states[s]=o);o=i===!0||r===!0||"auto"===r&&i!==!1,n=c.$container.find('input[data-column="auto"]').prop("checked",o),a.updateAuto(t,u,n)}else a.updateBreakpoints(t,u),a.updateCols(t,u);a.saveValues(t,u),a.adjustColspans(t,u)},setupSelector:function(r,i){var s,l,n,o,c,d,u,f=r.selector,p=f.$container,g=i.columnSelector_saveColumns&&t.storage,h=g?t.storage(r.table,"tablesorter-columnSelector"):[],m=g?t.storage(r.table,"tablesorter-columnSelector-auto"):{};for(f.auto=e.isEmptyObject(m)||"boolean"!==e.type(m.auto)?i.columnSelector_mediaqueryState:m.auto,f.states=[],f.$column=[],f.$wrapper=[],f.$checkbox=[],s=0;s<r.columns;s++)n=r.$headerIndexed[s],o=n.attr(i.columnSelector_priority)||1,d=n.attr("data-column"),c=t.getColumnData(r.table,r.headers,d),m=t.getData(n,c,"columnSelector"),isNaN(o)&&o.length>0||"disable"===m||i.columnSelector_columns[d]&&"disable"===i.columnSelector_columns[d]?f.states[d]=null:(f.states[d]=h&&"undefined"!=typeof h[d]&&null!==h[d]?h[d]:"undefined"!=typeof i.columnSelector_columns[d]&&null!==i.columnSelector_columns[d]?i.columnSelector_columns[d]:"true"===m||"false"!==m,f.$column[d]=e(this),p.length&&(l=n.attr(i.columnSelector_name)||n.text().trim(),"function"==typeof i.columnSelector_layoutCustomizer&&(u=n.find("."+t.css.headerIn),l=i.columnSelector_layoutCustomizer(u.length?u:n,l,parseInt(d,10))),f.$wrapper[d]=e(i.columnSelector_layout.replace(/\{name\}/g,l)).appendTo(p),f.$checkbox[d]=f.$wrapper[d].find("input").add(f.$wrapper[d].filter("input")).attr("data-column",d).toggleClass(i.columnSelector_cssChecked,f.states[d]).prop("checked",f.states[d]).on("change",function(){if(!f.isInitializing){var t=e(this).attr("data-column");if(!a.checkChange(r,this.checked))return this.checked=!this.checked,!1;r.selector.states[t]=this.checked,a.updateCols(r,i)}}).change()))},checkChange:function(e,t){for(var r=e.widgetOptions,a=r.columnSelector_maxVisible,i=r.columnSelector_minVisible,s=e.selector.states,l=s.length,n=0;l-- >=0;)s[l]&&n++;return!(t&null!==a&&n>=a||!t&&null!==i&&n<=i)},setupBreakpoints:function(t,i){var s=t.selector;i.columnSelector_mediaquery&&(s.lastIndex=-1,a.updateBreakpoints(t,i),t.$table.off("updateAll"+r).on("updateAll"+r,function(){a.setupSelector(t,i),a.setupBreakpoints(t,i),a.updateBreakpoints(t,i),a.updateCols(t,i)})),s.$container.length&&(i.columnSelector_mediaquery&&(s.$auto=e(i.columnSelector_layout.replace(/\{name\}/g,i.columnSelector_mediaqueryName)).prependTo(s.$container),s.$auto.find("input").add(s.$auto.filter("input")).attr("data-column","auto").prop("checked",s.auto).toggleClass(i.columnSelector_cssChecked,s.auto).on("change",function(){a.updateAuto(t,i,e(this))}).change()),t.$table.off("update"+r).on("update"+r,function(){a.updateCols(t,i)}))},updateAuto:function(t,r,i){var s=t.selector;s.auto=i.prop("checked")||!1,e.each(s.$checkbox,function(e,t){t&&(t[0].disabled=s.auto,s.$wrapper[e].toggleClass("disabled",s.auto))}),r.columnSelector_mediaquery&&a.updateBreakpoints(t,r),a.updateCols(t,r),t.selector.$popup&&t.selector.$popup.find(".tablesorter-column-selector").html(s.$container.html()).find("input").each(function(){var t=e(this).attr("data-column");e(this).prop("checked","auto"===t?s.auto:s.states[t])}),a.saveValues(t,r),a.adjustColspans(t,r),s.auto&&t.$table.triggerHandler(r.columnSelector_updated)},addSelectors:function(e,t){var r=[],a=" col:nth-child("+t+")";return r.push(e+a+","+e+"_extra_table"+a),a=' tr:not(.hasSpan) th[data-column="'+(t-1)+'"]',r.push(e+a+","+e+"_extra_table"+a),a=" tr:not(.hasSpan) td:nth-child("+t+")",r.push(e+a+","+e+"_extra_table"+a),a=" tr td:not("+e+'HasSpan)[data-column="'+(t-1)+'"]',r.push(e+a+","+e+"_extra_table"+a),r},updateBreakpoints:function(r,i){var s,l,n,o,c=[],d=r.selector,u=r.namespace+"columnselector",f=[],p="";if(i.columnSelector_mediaquery&&!d.auto)return d.$breakpoints.prop("disabled",!0),void d.$style.prop("disabled",!1);if(i.columnSelector_mediaqueryHidden)for(n=0;n<r.columns;n++)l=t.getColumnData(r.table,r.headers,n),c[n+1]="false"===t.getData(r.$headerIndexed[n],l,"columnSelector"),c[n+1]&&(f=f.concat(a.addSelectors(u,n+1)));for(s=0;s<i.columnSelector_maxPriorities;s++)o=[],r.$headers.filter("["+i.columnSelector_priority+"="+(s+1)+"]").each(function(){n=parseInt(e(this).attr("data-column"),10)+1,c[n]||(o=o.concat(a.addSelectors(u,n)))}),o.length&&(f=f.concat(o),p+=a.queryBreak.replace(/\[size\]/g,i.columnSelector_breakpoints[s]).replace(/\[columns\]/g,o.join(",")));d.$style&&d.$style.prop("disabled",!0),f.length&&d.$breakpoints.prop("disabled",!1).text(a.queryAll.replace(/\[columns\]/g,f.join(","))+p)},updateCols:function(t,r){if(!(r.columnSelector_mediaquery&&t.selector.auto||t.selector.isInitializing)){var i,s=t.selector,l=[],n=t.namespace+"columnselector";s.$container.find("input[data-column]").filter('[data-column!="auto"]').each(function(){this.checked||(i=parseInt(e(this).attr("data-column"),10)+1,l=l.concat(a.addSelectors(n,i))),e(this).toggleClass(r.columnSelector_cssChecked,this.checked)}),r.columnSelector_mediaquery&&s.$breakpoints.prop("disabled",!0),s.$style&&s.$style.prop("disabled",!1).text(l.length?l.join(",")+" { display: none; }":""),a.saveValues(t,r),a.adjustColspans(t,r),t.$table.triggerHandler(r.columnSelector_updated)}},setUpColspan:function(r,i){var s,l,n,o=e(window),c=!1,d=r.$table.add(e(r.namespace+"_extra_table")).children().children("tr").children("th, td"),u=d.length;for(s=0;s<u;s++)l=d[s].colSpan,l>1&&(c=!0,d.eq(s).addClass(r.namespace.slice(1)+"columnselectorHasSpan").attr("data-col-span",l),t.computeColumnIndex(d.eq(s).parent().addClass("hasSpan")));c&&i.columnSelector_mediaquery&&(n=r.namespace+"columnselector",o.off(n).on("resize"+n,t.window_resize).on("resizeEnd"+n,function(){o.off("resize"+n,t.window_resize),a.adjustColspans(r,i),o.on("resize"+n,t.window_resize)}))},adjustColspans:function(t,r){var a,i,s,l,n,o,c=t.selector,d=r.filter_filteredRow||"filtered",u=r.columnSelector_mediaquery&&c.auto,f=t.$table.children("thead, tfoot").children().children().add(e(t.namespace+"_extra_table").children("thead, tfoot").children().children()),p=f.length;for(a=0;a<p;a++)if(o=f.eq(a),s=parseInt(o.attr("data-column"),10)||o[0].cellIndex,l=parseInt(o.attr("data-col-span"),10)||1,n=s+l,l>1){for(i=s;i<n;i++)(!u&&c.states[i]===!1||u&&t.$headerIndexed[i]&&!t.$headerIndexed[i].is(":visible"))&&l--;l?o.removeClass(d)[0].colSpan=l:o.addClass(d)}else"undefined"!=typeof c.states[s]&&null!==c.states[s]&&o.toggleClass(d,!c.states[s])},saveValues:function(e,r){if(r.columnSelector_saveColumns&&t.storage){var a=e.selector;t.storage(e.$table[0],"tablesorter-columnSelector-auto",{auto:a.auto}),t.storage(e.$table[0],"tablesorter-columnSelector",a.states)}},attachTo:function(t,r){t=e(t)[0];var i,s,l,n=t.config,o=e(r);o.length&&n&&(o.find(".tablesorter-column-selector").length||o.append('<span class="tablesorter-column-selector"></span>'),i=n.selector,s=n.widgetOptions,o.find(".tablesorter-column-selector").html(i.$container.html()).find("input").each(function(){var t=e(this).attr("data-column"),r="auto"===t?i.auto:i.states[t];e(this).toggleClass(s.columnSelector_cssChecked,r).prop("checked",r)}),i.$popup=o.on("change","input",function(){if(!i.isInitializing){if(!a.checkChange(n,this.checked))return this.checked=!this.checked,!1;l=e(this).toggleClass(s.columnSelector_cssChecked,this.checked).attr("data-column"),i.$container.find('input[data-column="'+l+'"]').prop("checked",this.checked).trigger("change")}}))}};t.window_resize=function(){t.timer_resize&&clearTimeout(t.timer_resize),t.timer_resize=setTimeout(function(){e(window).trigger("resizeEnd")},250)},t.addWidget({id:"columnSelector",priority:10,options:{columnSelector_container:null,columnSelector_columns:{},columnSelector_saveColumns:!0,columnSelector_layout:'<label><input type="checkbox">{name}</label>',columnSelector_layoutCustomizer:null,columnSelector_name:"data-selector-name",columnSelector_mediaquery:!0,columnSelector_mediaqueryName:"Auto: ",columnSelector_mediaqueryState:!0,columnSelector_mediaqueryHidden:!1,columnSelector_maxVisible:null,columnSelector_minVisible:null,columnSelector_breakpoints:["20em","30em","40em","50em","60em","70em"],columnSelector_maxPriorities:6,columnSelector_priority:"data-priority",columnSelector_cssChecked:"checked",columnSelector_updated:"columnUpdate"},init:function(e,t,r,i){a.init(e,r,i)},remove:function(t,a,i,s){var l=a.selector;l&&l.$container.empty(),!s&&l&&(l.$popup&&l.$popup.empty(),l.$style.remove(),l.$breakpoints.remove(),e(a.namespace+"columnselectorHasSpan").removeClass(i.filter_filteredRow||"filtered"),a.$table.off("updateAll"+r+" update"+r))}})}(jQuery);
|
||
//# sourceMappingURL=tablesorter.min.js.map
|