/*! tableSorter (FORK) 2.16+ widgets - updated 2/9/2015 (v2.19.1) */ ;(function(h,A){var e=h.tablesorter=h.tablesorter||{};e.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",iconSortAsc:"ui-icon-carat-1-n",iconSortDesc:"ui-icon-carat-1-s",filterRow:"",footerRow:"",footerCells:"",even:"ui-widget-content",odd:"ui-state-default"}};h.extend(e.css,{filterRow:"tablesorter-filter-row",filter:"tablesorter-filter",wrapper:"tablesorter-wrapper",resizer:"tablesorter-resizer", sticky:"tablesorter-stickyHeader",stickyVis:"tablesorter-sticky-visible",stickyWrap:"tablesorter-sticky-wrapper"});e.storage=function(d,a,b,c){d=h(d)[0];var f,e,g=!1;f={};e=d.config;var m=h(d);d=c&&c.id||m.attr(c&&c.group||"data-table-group")||d.id||h(".tablesorter").index(m);c=c&&c.url||m.attr(c&&c.page||"data-table-page")||e&&e.fixedUrl||A.location.pathname;if("localStorage"in A)try{A.localStorage.setItem("_tmptest","temp"),g=!0,A.localStorage.removeItem("_tmptest")}catch(n){}h.parseJSON&&(g?f= h.parseJSON(localStorage[a]||"null")||{}:(e=document.cookie.split(/[;\s|=]/),f=h.inArray(a,e)+1,f=0!==f?h.parseJSON(e[f]||"null")||{}:{}));if((b||""===b)&&A.JSON&&JSON.hasOwnProperty("stringify"))f[c]||(f[c]={}),f[c][d]=b,g?localStorage[a]=JSON.stringify(f):(b=new Date,b.setTime(b.getTime()+31536E6),document.cookie=a+"="+JSON.stringify(f).replace(/\"/g,'"')+"; expires="+b.toGMTString()+"; path=/");else return f&&f[c]?f[c][d]:""};e.addHeaderResizeEvent=function(d,a,b){d=h(d)[0];var c;b=h.extend({}, {timer:250},b);var e=d.config,k=e.widgetOptions,g=function(a){k.resize_flag=!0;c=[];e.$headers.each(function(){var a=h(this),b=a.data("savedSizes")||[0,0],d=this.offsetWidth,e=this.offsetHeight;if(d!==b[0]||e!==b[1])a.data("savedSizes",[d,e]),c.push(this)});c.length&&!1!==a&&e.$table.trigger("resize",[c]);k.resize_flag=!1};g(!1);clearInterval(k.resize_timer);if(a)return k.resize_flag=!1;k.resize_timer=setInterval(function(){k.resize_flag||g()},b.timer)};e.addWidget({id:"uitheme",priority:10,format:function(d, a,b){var c,f,k,g,m,n;c=e.themes;g=a.$table.add(a.$extraTables);d=a.$headers.add(a.$extraHeaders);var r=a.theme||"jui",p=c[r]||{},w=h.trim([p.sortNone,p.sortDesc,p.sortAsc,p.active].join(" ")),x=h.trim([p.iconSortNone,p.iconSortDesc,p.iconSortAsc].join(" "));a.debug&&(k=new Date);g.hasClass("tablesorter-"+r)&&a.theme===a.appliedTheme&&b.uitheme_applied||(b.uitheme_applied=!0,c=c[a.appliedTheme]||{},f=(n=!h.isEmptyObject(c))?[c.sortNone,c.sortDesc,c.sortAsc,c.active].join(" "):"",m=n?[c.iconSortNone, c.iconSortDesc,c.iconSortAsc].join(" "):"",n&&(b.zebra[0]=h.trim(" "+b.zebra[0].replace(" "+c.even,"")),b.zebra[1]=h.trim(" "+b.zebra[1].replace(" "+c.odd,"")),a.$tbodies.children().removeClass([c.even,c.odd].join(" "))),p.even&&(b.zebra[0]+=" "+p.even),p.odd&&(b.zebra[1]+=" "+p.odd),g.children("caption").removeClass(c.caption||"").addClass(p.caption),b=g.removeClass((a.appliedTheme?"tablesorter-"+(a.appliedTheme||""):"")+" "+(c.table||"")).addClass("tablesorter-"+r+" "+(p.table||"")).children("tfoot"), a.appliedTheme=a.theme,b.length&&b.children("tr").removeClass(c.footerRow||"").addClass(p.footerRow).children("th, td").removeClass(c.footerCells||"").addClass(p.footerCells),d.removeClass((n?[c.header,c.hover,f].join(" "):"")||"").addClass(p.header).not(".sorter-false").unbind("mouseenter.tsuitheme mouseleave.tsuitheme").bind("mouseenter.tsuitheme mouseleave.tsuitheme",function(a){h(this)["mouseenter"===a.type?"addClass":"removeClass"](p.hover||"")}),d.each(function(){var a=h(this);a.find("."+e.css.wrapper).length|| a.wrapInner('
')}),a.cssIcon&&d.find("."+e.css.icon).removeClass(n?[c.icons,m].join(" "):"").addClass(p.icons||""),g.hasClass("hasFilters")&&g.children("thead").children("."+e.css.filterRow).removeClass(n?c.filterRow||"":"").addClass(p.filterRow||""));for(b=0;b=]/g,query:"(q|query)"},types:{regex:function(d,a){if(e.filter.regex.regex.test(a.iFilter)){var b, c=e.filter.regex.regex.exec(a.iFilter);try{b=(new RegExp(c[1],c[2])).test(a.iExact)}catch(f){b=!1}return b}return null},operators:function(d,a){if(/^[<>]=?/.test(a.iFilter)){var b,c;b=d.table;var f=a.index,k=a.parsed[f],g=e.formatFloat(a.iFilter.replace(e.filter.regex.operators,""),b),m=d.parsers[f],n=g;if(k||"numeric"===m.type)c=e.filter.parseFilter(d,h.trim(""+a.iFilter.replace(e.filter.regex.operators,"")),f,k,!0),g="number"!==typeof c||""===c||isNaN(c)?g:c;b=!k&&"numeric"!==m.type||isNaN(g)|| "undefined"===typeof a.cache?isNaN(a.iExact)?e.formatFloat(a.iExact.replace(e.filter.regex.nondigit,""),b):e.formatFloat(a.iExact,b):a.cache;/>/.test(a.iFilter)&&(c=/>=/.test(a.iFilter)?b>=g:b>g);/n&&(c=h,h=n,n=c);return b>=h&&b<=n||""===h||""===n}return null},wild:function(d,a){if(/[\?\*\|]/.test(a.iFilter)||e.filter.regex.orReplace.test(a.filter)){var b= a.index,c=a.parsed[b],c=e.filter.parseFilter(d,a.iFilter.replace(e.filter.regex.orReplace,"|"),b,c);!d.$headers.filter('[data-column="'+b+'"]:last').hasClass("filter-match")&&/\|/.test(c)&&("|"===c[c.length-1]&&(c+="*"),c=a.anyMatch&&h.isArray(a.rowArray)?"("+c+")":"^("+c+")$");return(new RegExp(c.replace(/\?/g,"\\S{1}").replace(/\*/g,"\\S*"))).test(a.iExact)}return null},fuzzy:function(d,a){if(/^~/.test(a.iFilter)){var b,c=0,f=a.iExact.length,k=e.filter.parseFilter(d,a.iFilter.slice(1),a.index,a.parsed[a.index]); for(b=0;b'+(g.data("placeholder")||g.attr("data-placeholder")||b.filter_placeholder.select||"")+"":"",k=r=f,0<=f.indexOf(b.filter_selectSourceSeparator)&&(r=f.split(b.filter_selectSourceSeparator),k=r[1],r=r[0]),c+="");a.$table.find("thead").find("select."+e.css.filter+'[data-column="'+m+'"]').append(c)}e.filter.buildDefault(d,!0);e.filter.bindSearch(d,a.$table.find("."+e.css.filter),!0);b.filter_external&& e.filter.bindSearch(d,b.filter_external);b.filter_hideFilters&&e.filter.hideFilters(d,a);a.showProcessing&&a.$table.unbind(h.trim(["filterStart","filterEnd",""].join(a.namespace+"filter "))).bind(h.trim(["filterStart","filterEnd",""].join(a.namespace+"filter ")),function(b,c){g=c?a.$table.find("."+e.css.header).filter("[data-column]").filter(function(){return""!==c[h(this).data("column")]}):"";e.isProcessing(d,"filterStart"===b.type,c?g:"")});a.filteredRows=a.totalRows;a.$table.unbind(h.trim(["tablesorter-initialized", "pagerBeforeInitialized",""].join(a.namespace+"filter "))).bind(h.trim(["tablesorter-initialized","pagerBeforeInitialized",""].join(a.namespace+"filter ")),function(){var b=this.config.widgetOptions;n=e.filter.setDefaults(d,a,b)||[];n.length&&(a.delayInit&&""===n.join("")||e.setFilters(d,n,!0));a.$table.trigger("filterFomatterUpdate");setTimeout(function(){b.filter_initialized||e.filter.filterInitComplete(a)},100)});a.pager&&a.pager.initialized&&!b.filter_initialized&&(a.$table.trigger("filterFomatterUpdate"), setTimeout(function(){e.filter.filterInitComplete(a)},100))},formatterUpdated:function(d,a){var b=d.closest("table")[0].config.widgetOptions;b.filter_initialized||(b.filter_formatterInit[a]=1)},filterInitComplete:function(d){var a=d.widgetOptions,b=0,c=function(){a.filter_initialized=!0;d.$table.trigger("filterInit",d);e.filter.findRows(d.table,d.$table.data("lastSearch")||[])};h.isEmptyObject(a.filter_formatter)?c():(h.each(a.filter_formatterInit,function(a,c){1===c&&b++}),clearTimeout(a.filter_initTimer), a.filter_initialized||b!==a.filter_formatterCount)?a.filter_initialized||(a.filter_initTimer=setTimeout(function(){c()},500)):c()},setDefaults:function(d,a,b){var c,f=e.getFilters(d)||[];b.filter_saveFilters&&e.storage&&(c=e.storage(d,"tablesorter-filters")||[],(d=h.isArray(c))&&""===c.join("")||!d||(f=c));if(""===f.join(""))for(d=0;d';for(f=0;f"):g+("");a.$filters=h(g+"").appendTo(a.$table.children("thead").eq(0)).find("td");for(f=0;f").appendTo(a.$filters.eq(f)):((g=e.getColumnData(d,b.filter_formatter,f))?(b.filter_formatterCount++,(g=g(a.$filters.eq(f),f))&&0===g.length&&(g=a.$filters.eq(f).children("input")),g&&(0===g.parent().length||g.parent().length&&g.parent()[0]!==a.$filters[f])&& a.$filters.eq(f).append(g)):g=h('').appendTo(a.$filters.eq(f)),g&&g.attr("placeholder",k.data("placeholder")||k.attr("data-placeholder")||b.filter_placeholder.search||"")),g&&(k=(h.isArray(b.filter_cssFilter)?"undefined"!==typeof b.filter_cssFilter[f]?b.filter_cssFilter[f]||"":"":b.filter_cssFilter)||"",g.addClass(e.css.filter+" "+k).attr("data-column",f),c&&(g.attr("placeholder","").addClass("disabled")[0].disabled=!0))},bindSearch:function(d,a,b){d=h(d)[0];a=h(a);if(a.length){var c= d.config,f=c.widgetOptions,k=f.filter_$externalFilters;!0!==b&&(f.filter_$anyMatch=a.filter(f.filter_anyColumnSelector+","+f.filter_multipleColumnSelector),f.filter_$externalFilters=k&&k.length?f.filter_$externalFilters.add(a):a,e.setFilters(d,c.$table.data("lastSearch")||[],!1===b));a.attr("data-lastSearchTime",(new Date).getTime()).unbind(h.trim(["keypress","keyup","search","change",""].join(c.namespace+"filter "))).bind("keyup"+c.namespace+"filter",function(a){h(this).attr("data-lastSearchTime", (new Date).getTime());if(27===a.which)this.value="";else if(!1===f.filter_liveSearch||""!==this.value&&("number"===typeof f.filter_liveSearch&&this.value.lengtha.which||37<=a.which&&40>=a.which)))return;e.filter.searching(d,!0,!0)}).bind(h.trim(["search","change","keypress",""].join(c.namespace+"filter ")),function(a){var b=h(this).data("column");if(13===a.which||"search"===a.type||"change"===a.type&&this.value!==c.lastSearch[b])a.preventDefault(), h(this).attr("data-lastSearchTime",(new Date).getTime()),e.filter.searching(d,!1,!0)})}},searching:function(d,a,b){var c=d.config.widgetOptions;clearTimeout(c.searchTimer);"undefined"===typeof a||!0===a?c.searchTimer=setTimeout(function(){e.filter.checkFilters(d,a,b)},c.filter_liveSearch?c.filter_searchDelay:10):e.filter.checkFilters(d,a,b)},checkFilters:function(d,a,b){var c=d.config,f=c.widgetOptions,k=h.isArray(a),g=k?a:e.getFilters(d,!0),m=(g||[]).join("");if(h.isEmptyObject(c.cache))c.delayInit&& c.pager&&c.pager.initialized&&c.$table.trigger("updateCache",[function(){e.filter.checkFilters(d,!1,b)}]);else if(k&&(e.setFilters(d,g,!1,!0!==b),f.filter_initialized||(c.lastCombinedFilter="")),f.filter_hideFilters&&c.$table.find("."+e.css.filterRow).trigger(""===m?"mouseleave":"mouseenter"),c.lastCombinedFilter!==m||!1===a)if(!1===a&&(c.lastCombinedFilter=null,c.lastSearch=[]),f.filter_initialized&&c.$table.trigger("filterStart",[g]),c.showProcessing)setTimeout(function(){e.filter.findRows(d,g, m);return!1},30);else return e.filter.findRows(d,g,m),!1},hideFilters:function(d,a){var b,c,f;h(d).find("."+e.css.filterRow).addClass("hideme").bind("mouseenter mouseleave",function(c){b=h(this);clearTimeout(f);f=setTimeout(function(){/enter|over/.test(c.type)?b.removeClass("hideme"):h(document.activeElement).closest("tr")[0]!==b[0]&&""===a.lastCombinedFilter&&b.addClass("hideme")},200)}).find("input, select").bind("focus blur",function(b){c=h(this).closest("tr");clearTimeout(f);f=setTimeout(function(){if(""=== e.getFilters(a.$table).join(""))c["focus"===b.type?"removeClass":"addClass"]("hideme")},200)})},defaultFilter:function(d,a){if(""===d)return d;var b=e.filter.regex.iQuery,c=a.match(e.filter.regex.igQuery).length,f=1k&&1f&&(c=e,e=f,f=c);for(f>=d.columns&&(f=d.columns-1);e<=f;e++)k.push(e);g=g.replace(b,"")}));f&&/,/.test(g)&&(b=g.split(/\s*,\s*/),h.each(b,function(a, b){""!==b&&(c=parseInt(b,10),c=?\s*-\d)/.test(y)||/(<=?\s*\d)/.test(y))&&!(""!==y&&q.$filters&&q.$filters.eq(n).find("select").length&&!q.$headers.filter('[data-column="'+n+'"]:last').hasClass("filter-match"));y=f.not("."+v.filter_filteredRow).length;B&&0===y&&(B=!1);q.debug&& e.log("Searching through "+(B&&yh.inArray(a,J)&&(u=b(q,l),null!==u))return C=u,!1});if(null!==C)z=C;else if(v.filter_startsWith)for(z=!1,p=q.columns;!z&&0h.inArray(a,G)&&(u=b(q,l),null!==u))return C=u,!1}),null!==C?t=C:(l.exact=(l.iExact+l.childRowText).indexOf(e.filter.parseFilter(q,l.iFilter,p,l.parsed[p])),t=!v.filter_startsWith&&0<=l.exact||v.filter_startsWith&&0===l.exact)),z=t?z:!1);f.eq(k).toggle(z).toggleClass(v.filter_filteredRow,!z);w.length&&w.toggleClass(v.filter_filteredRow,!z)}}q.filteredRows+=f.not("."+v.filter_filteredRow).length;q.totalRows+=f.length;e.processTbody(d, m,!1)}q.lastCombinedFilter=b;q.lastSearch=a;q.$table.data("lastSearch",a);v.filter_saveFilters&&e.storage&&e.storage(d,"tablesorter-filters",a);q.debug&&e.benchmark("Completed filter widget search",A);v.filter_initialized&&q.$table.trigger("filterEnd",q);setTimeout(function(){q.$table.trigger("applyWidgets")},0)}},getOptionSource:function(d,a,b){d=h(d)[0];var c,f=d.config,k=[],g=!1,m=f.widgetOptions.filter_selectSource,n=f.$table.data("lastSearch")||[],r=h.isFunction(m)?!0:e.getColumnData(d,m,a); b&&""!==n[a]&&(b=!1);if(!0===r)g=m(d,a,b);else{if(r instanceof h||"string"===h.type(r)&&0<=r.indexOf(""))return r;h.isArray(r)?g=r:"object"===h.type(m)&&r&&(g=r(d,a,b))}!1===g&&(g=e.filter.getOptions(d,a,b));g=h.grep(g,function(a,b){return h.inArray(a,g)===b});f.$headers.filter('[data-column="'+a+'"]:last').hasClass("filter-select-nosort")||(h.each(g,function(b,c){k.push({t:c,p:f.parsers&&f.parsers[a].format(c,d,[],a)})}),c=f.textSorter||"",k.sort(function(b,f){var g=b.p.toString(),k=f.p.toString(); return h.isFunction(c)?c(g,k,!0,a,d):"object"===typeof c&&c.hasOwnProperty(a)?c[a](g,k,!0,a,d):e.sortNatural?e.sortNatural(g,k):!0}),g=[],h.each(k,function(a,b){g.push(b.t)}));return g},getOptions:function(d,a,b){d=h(d)[0];var c,e,k,g,m=d.config,n=m.widgetOptions,r=m.$table.children("tbody"),p=[];for(c=0;c'+(n.data("placeholder")|| n.attr("data-placeholder")||m.filter_placeholder.select||"")+"",r=g.$table.find("thead").find("select."+e.css.filter+'[data-column="'+a+'"]').val();if("undefined"===typeof b||""===b)b=e.filter.getOptionSource(d,a,f);if(h.isArray(b)){for(d=0;d'+k+"": "";b=[]}g=(g.$filters?g.$filters:g.$table.children("thead")).find("."+e.css.filter);m.filter_$externalFilters&&(g=g&&g.length?g.add(m.filter_$externalFilters):m.filter_$externalFilters);a=g.filter('select[data-column="'+a+'"]');a.length&&(a[c?"html":"append"](n),h.isArray(b)||a.append(b).val(r),a.val(r))}},buildDefault:function(d,a){var b,c,f,h=d.config,g=h.widgetOptions,m=h.columns;for(b=0;b'),z=t.parent().css({position:f.length?"absolute":"fixed",padding:parseInt(t.parent().parent().css("padding-left"),10), top:w+u,left:0,visibility:"hidden",zIndex:b.stickyHeaders_zIndex||2}),E=t.children("thead:first"),y,B="",C=0,G=function(a,b){a.filter(":visible").each(function(a){var c;a=b.filter(":visible").eq(a);var d=h(this);"border-box"===d.css("box-sizing")?c=d.outerWidth():"collapse"===a.css("border-collapse")?A.getComputedStyle?c=parseFloat(A.getComputedStyle(this,null).width):(c=parseFloat(d.css("border-width")),c=d.outerWidth()-parseFloat(d.css("padding-left"))-parseFloat(d.css("padding-right"))-c):c=d.width(); a.css({"min-width":c,"max-width":c})})},D=function(){w=p.length?p.height()||0:parseInt(b.stickyHeaders_offset,10)||0;C=0;z.css({left:f.length?parseInt(f.css("padding-left"),10)||0:c.offset().left-parseInt(c.css("margin-left"),10)-m.scrollLeft()-C,width:c.outerWidth()});G(c,t);G(n,y)};a.$extraTables&&a.$extraTables.length?a.$extraTables.add(t):a.$extraTables=t;t.attr("id")&&(t[0].id+=b.stickyHeaders_cloneId);t.find("thead:gt(0), tr.sticky-false").hide();t.find("tbody, tfoot").remove();t.find("caption").toggle(b.stickyHeaders_includeCaption); y=E.children().children();t.css({height:0,width:0,margin:0});y.find("."+e.css.resizer).remove();c.addClass("hasStickyHeaders").bind(h.trim("pagerComplete"+k),function(){D()});e.bindEvents(d,E.children().children(".tablesorter-header"));c.after(z);a.onRenderHeader&&E.children("tr").children().each(function(b){a.onRenderHeader.apply(h(this),[b,a,t])});m.add(g).unbind(h.trim(["scroll","resize",""].join(k))).bind(h.trim(["scroll","resize",""].join(k)),function(a){if(c.is(":visible")){u=x.length?x.offset().top- g.scrollTop()+x.height():0;var b=c.offset(),d=h.isWindow(g[0]),e=h.isWindow(m[0]),k=(f.length?d?g.scrollTop():g.offset().top:g.scrollTop())+w+u,l=c.height()-(z.height()+(r.height()||0)),b=k>b.top&&kMath.abs(r.parent().width()-r.width()),E=function(a){if(0!==x&&u){var b=a.pageX-x,c=u.width();u.width(c+b);u.width()!==c&&z?t.width(t.width()-b):w&&(r.width(function(a,c){return c+b}),t.length|| (p[0].scrollLeft=r.width()));x=a.pageX}},y=function(){e.storage&&u&&t&&(n={},n[u.index()]=u.width(),n[t.index()]=t.width(),u.width(n[u.index()]),t.width(n[t.index()]),!1!==b.resizable&&e.storage(d,"tablesorter-resizable",a.$headers.map(function(){return h(this).width()}).get()));x=0;u=t=null;h(A).trigger("resize")};if(n=e.storage&&!1!==b.resizable?e.storage(d,"tablesorter-resizable"):{})for(g in n)!isNaN(g)&&g');b.resizable_addLastColumn||(k=k.slice(0,-1));f=f?f.add(k):k});f.each(function(){var a= h(this),b=parseInt(a.css("padding-right"),10)+10;a.find("."+e.css.wrapper).append('
')}).find("."+e.css.resizer).bind("mousedown",function(b){u=h(b.target).closest("th");var c=a.$headers.filter('[data-column="'+u.attr("data-column")+'"]');1