!function(t){"use strict";vare=t.tablesorter,n={error:{0:"Infinity result: Divide by zero",1:"Need more than one element to make this calculation",undef:"No elements found"},invalid:function(t,e,a){returnconsole.warn(e,n.error[a]),t&&t.widgetOptions.math_none||""},events:"tablesorter-initialized update updateAll updateRows addRows updateCell filterReset ".split(" ").join(".tsmath "),processText:function(a,r){vari,l=e.getElementText(a,r,n.getCellIndex(r)),o=a.widgetOptions.math_prefix;return/</.test(o)&&(i=t("<div>"+o+"</div>").text().replace(/\{content\}/g,"").trim(),l=l.replace(i,"")),l=e.formatFloat(l.replace(/[^\w,. \-()]/g,""),a.table)||0,isNaN(l)?0:l},getRow:function(e,a,r){vari,l=e.widgetOptions,o=[],h=a.closest("tr"),s=h.hasClass(l.filter_filteredRow||"filtered");returnr&&(h=h.filter(r)),!r&&s||(i=h.children().not("["+l.math_dataAttrib+"=ignore]"),l.math_ignore.length&&(i=i.filter(function(){return-1===t.inArray(n.getCellIndex(t(this)),l.math_ignore)})),o=i.not(a).map(function(){returnn.processText(e,t(this))}).get()),o},getColumn:function(e,a,r,i){varl,o,h,s,d,u,c=e.widgetOptions,g=[],f=a.closest("tr"),m=c.math_dataAttrib,p="["+m+"=ignore]",_=c.filter_filteredRow||"filtered",b=n.getCellIndex(a),v=e.$table.children("tbody").children(),x=["["+m+"^=above]","["+m+"^=below]","["+m+"^=col]","["+m+"^=all]"];if("above"===r)for(l=s=v.index(f);l>=0;)u=(h=v.eq(l)).children().filter(x[0]).length,i&&(h=h.filter(i)),o=h.children().filter(function(){returnn.getCellIndex(t(this))===b}),((i||!h.hasClass(_))&&h.not(p).length&&l!==s||u&&l!==s)&&(u?l=0:o.length&&(g[g.length]=n.processText(e,o))),l--;elseif("below"===r)for(s=v.length,l=v.index(f)+1;l<s&&!(h=v.eq(l)).children().filter(x[1]).length;l++)i&&(h=h.filter(i)),o=h.children().filter(function(){returnn.getCellIndex(t(this))===b}),(i||!h.hasClass(_))&&h.not(p).length&&o.length&&(g[g.length]=n.processText(e,o));elsefor(s=(d=v.not(p)).length,l=0;l<s;l++)h=d.eq(l),i&&(h=h.filter(i)),o=h.children().filter(function(){returnn.getCellIndex(t(this))===b}),!i&&h.hasClass(_)||!o.not(x.join(",")).length||o.is(a)||(g[g.length]=n.processText(e,o));returng},getAll:function(e,a){varr,i,l,o,h,s,d,u,c=[],g=e.widgetOptions,f=g.math_dataAttrib,m="["+f+"=ignore]",p=g.filter_filteredRow||"filtered",_=e.$table.children("tbody").children().not(m);for(h=_.length,o=0;o<h;o++)if(l=_.eq(o),a&&(l=l.filter(a)),a||!l.hasClass(p))for(u=(s=l.children().not(m)).length,d=0;d<u;d++)r=s.eq(d),i=n.getCellIndex(r),!r.filter("["+f+"]").length&&t.inArray(i,g.math_ignore)<0&&(c[c.length]=n.processText(e,r));returnc},setColumnIndexes:function(n){vara=1,r=n.$table.children("tbody").children().filter(function(){vare,n,r=t(this),i=r.children("[colspan]").length>0;if(a>1?(a--,i=!0):a<1&&(a=1),r.children("[rowspan]").length>0)for(e=this.cells,n=0;n<e.length;n++)a=Math.max(e[n].rowSpan,a);returni});e.computeColumnIndex(r,n)},getCellIndex:function(t){vare=t.attr("data-column");returnvoid0===e?t[0].cellIndex:parseInt(e,10)},recalculate:function(a,r,i){if(a&&(!r.math_isUpdating||i)){varl,o,h,s,d,u=!1,c={};for((a.debug||r.math_debug)&&(l=newDate),i&&n.setColumnIndexes(a),r.math_dataAttrib="data-"+(r.math_data||"math"),o=r.math_dataAttrib,h=a.$tbodies.children("tr").children("["+o+"]"),u=n.mathType(a,h,r.math_priority)||u,h=a.$table.children("."+a.cssInfoBlock+", tfoot").children("tr").children("["+o+"]"),n.mathType(a,h,r.math_priority),d=(h=a.$table.children().children("tr").children("["+o+"^=all]")).length,s=0;s<d;s++){varg=h.eq(s),f=g.attr(o+"-filter")||r.math_rowFilter;c[f]=c[f]?c[f].add(g):g}t.each(c,function(t,e){u=n.mathType(a,e,["all"],t)||u}),u?(r.math_isUpdating=!0,(a.debug||r.math_debug)&&console[console.group?"group":"log"]("Math widget updating the cache after recalculation"),e.updateCache(a,function(){n.updateComplete(a),i||"function"!=typeofr.math_completed||r.math_completed(a),(a.debug||r.math_debug)&&console.log("Math widget update completed"+e.benchmark(l))})):(i||"function"!=typeofr.math_completed||r.math_completed(a),(a.debug||r.math_debug)&&console.log("Mathwidgetfoundnochanges