!function(a){"use strict";varb=a.tablesorter,c={error:{0:"Infinity result: Divide by zero",1:"Need more than one element to make this calculation",undef:"No elements found"},invalid:function(a,b,d){returnconsole.log(b,c.error[d]),a&&a.widgetOptions.math_none||"none"},events:"tablesorter-initialized update updateAll updateRows addRows updateCell filterReset filterEnd ".split(" ").join(".tsmath "),processText:function(a,c){vard=c.attr(a.textAttribute);return"undefined"==typeofd&&(d=c[0].textContent||c.text()),d=b.formatFloat(d.replace(/[^\w,. \-()]/g,""),a.table)||0,isNaN(d)?0:d},getRow:function(b,d){vare,f=b.widgetOptions,g=[],h=d.closest("tr"),i=h.hasClass(f.filter_filteredRow||"filtered"),j=h.attr(f.math_dataAttrib+"-filter")||f.math_rowFilter;returnj&&(h=h.filter(j)),(!i||j)&&(e=h.children().not("["+f.math_dataAttrib+"=ignore]"),f.math_ignore.length&&(e=e.not("[data-column="+f.math_ignore.join("],[data-column=")+"]")),g=e.not(d).map(function(){returnc.processText(b,a(this))}).get()),g},getColumn:function(a,b,d){vare,f,g,h,i,j,k=a.widgetOptions,l=[],m=b.closest("tr"),n=k.math_dataAttrib,o=m.attr(n+"-filter")||k.math_rowFilter,p=k.filter_filteredRow||"filtered",q=parseInt(b.attr("data-column"),10),r=a.$table.children("tbody").children();if("above"===d)for(h=r.index(m),e=h;e>=0;)g=r.eq(e),o&&(g=g.filter(o)),f=g.children().filter("[data-column="+q+"]"),j=f.filter("["+n+"^=above]").length,((!g.hasClass(p)||o)&&g.not("["+n+"=ignore]").length&&e!==h||j&&e!==h)&&(j?e=0:f.length&&l.push(c.processText(a,f))),e--;elseif("below"===d)for(h=r.length,e=r.index(m)+1;h>e&&(g=r.eq(e),o&&(g=g.filter(o)),f=g.children().filter("[data-column="+q+"]"),!f.filter("["+n+"^=below]").length);e++)(!g.hasClass(p)||o)&&g.not("["+n+"=ignore]").length&&f.length&&l.push(c.processText(a,f));elsefor(i=r.not("["+n+"=ignore]"),h=i.length,e=0;h>e;e++)g=i.eq(e),o&&(g=g.filter(o)),f=g.children().filter("[data-column="+q+"]"),g.hasClass(p)&&!o||!f.not("["+n+"^=above],["+n+"^=below],["+n+"^=col]").length||f.is(b)||l.push(c.processText(a,f));returnl},getAll:function(b){vard,e,f,g,h,i,j,k,l=[],m=b.widgetOptions,n=m.math_dataAttrib,o=m.filter_filteredRow||"filtered",p=m.filter_rowFilter,q=b.$table.children("tbody").children().not("["+n+"=ignore]");for(h=q.length,g=0;h>g;g++)if(f=q.eq(g),p&&(f=f.filter(p)),!f.hasClass(o)||p)for(i=f.children().not("["+n+"=ignore]"),k=i.length,j=0;k>j;j++)d=i.eq(j),e=parseInt(d.attr("data-column"),10),!d.filter("["+n+"]").length&&a.inArray(e,m.math_ignore)<0&&l.push(c.processText(b,d));returnl},setColumnIndexes:function(c){c.$table.after('<div id="_tablesorter_table_placeholder"></div>');vard=c.$table.detach();b.computeColumnIndex(d.children("tbody").children()),a("#_tablesorter_table_placeholder").after(d).remove()},recalculate:function(a,d,e){if(a&&(!d.math_isUpdating||e)){varf,g,h,i;a.debug&&(g=newDate),e&&c.setColumnIndexes(a),d.math_dataAttrib="data-"+(d.math_data||"math"),h=d.math_dataAttrib,i=a.$tbodies.children("tr").children("["+h+"]"),c.mathType(a,i,d.math_priority),i=a.$table.children("."+a.cssInfoBlock+", tfoot").children("tr").children("["+h+"]"),c.mathType(a,i,d.math_priority),i=a.$table.children().children("tr").children("["+h+"^=all]"),c.mathType(a,i,["all"]),d.math_isUpdating=!0,a.debug&&console[console.group?"group":"log"]("Math widget triggering an update after recalculation"),b.update(a,f,function(){c.updateComplete(a)}),a.debug&&console.log("Math widget update completed"+b.benchmark(g))}},updateComplete:function(a){varb=a.widgetOptions;b.math_isUpdating&&a.debug&&console.groupEnd&&console.groupEnd(),b.math_isUpdating=!1},mathType:function(d,e,f){if(e.length){varg,h,i,j,k,l,m,n,o=d.widgetOptions,p=o.math_dataAttrib,q=b.equations;"all"===f[0]&&(k=c.getAll(d)),d.debug&&console[console.group?"group":"log"]("Tablesorter Math widget recalculation"),a.each(f,function(a,b){if(l=e.filter("["+p+"^="+b+"]"),n=l.length){for(d.debug&&console[console.group?"group":"log"](b),m=0;n>m;m++)i=l.eq(m),i.parent().hasClass(o.filter_filteredRow||"filtered")||(g=(i.attr(p)||"").replace(b+"-",""),j="row"===b?c.getRow(d