!function(v){"use strict";var_=v.tablesorter,x={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,n){returnconsole.warn(e,x.error[n]),t&&t.widgetOptions.math_none||""},events:"tablesorter-initialized update updateAll updateRows addRows updateCell filterReset ".split(" ").join(".tsmath "),processText:function(t,e){varn,a=_.getElementText(t,e,x.getCellIndex(e)),r=t.widgetOptions.math_prefix;return/</.test(r)&&(n=v("<div>"+r+"</div>").text().replace(/\{content\}/g,"").trim(),a=a.replace(n,"")),a=_.formatFloat(a.replace(/[^\w,. \-()]/g,""),t.table)||0,isNaN(a)?0:a},getRow:function(t,e,n){vara,r=t.widgetOptions,i=[],l=e.closest("tr"),o=l.hasClass(r.filter_filteredRow||"filtered");returnn&&(l=l.filter(n)),!n&&o||(a=l.children().not("["+r.math_dataAttrib+"=ignore]"),r.math_ignore.length&&(a=a.filter(function(){return-1===v.inArray(x.getCellIndex(v(this)),r.math_ignore)})),i=a.not(e).map(function(){returnx.processText(t,v(this))}).get()),i},getColumn:function(t,e,n,a){varr,i,l,o,h,s,d=t.widgetOptions,u=[],c=e.closest("tr"),g=d.math_dataAttrib,f="["+g+"=ignore]",m=d.filter_filteredRow||"filtered",p=x.getCellIndex(e),_=t.$table.children("tbody").children(),b=["["+g+"^=above]","["+g+"^=below]","["+g+"^=col]","["+g+"^=all]"];if("above"===n)for(r=o=_.index(c);0<=r;)s=(l=_.eq(r)).children().filter(b[0]).length,a&&(l=l.filter(a)),i=l.children().filter(function(){returnx.getCellIndex(v(this))===p}),((a||!l.hasClass(m))&&l.not(f).length&&r!==o||s&&r!==o)&&(s?r=0:i.length&&(u[u.length]=x.processText(t,i))),r--;elseif("below"===n)for(o=_.length,r=_.index(c)+1;r<o&&!(l=_.eq(r)).children().filter(b[1]).length;r++)a&&(l=l.filter(a)),i=l.children().filter(function(){returnx.getCellIndex(v(this))===p}),(a||!l.hasClass(m))&&l.not(f).length&&i.length&&(u[u.length]=x.processText(t,i));elsefor(o=(h=_.not(f)).length,r=0;r<o;r++)l=h.eq(r),a&&(l=l.filter(a)),i=l.children().filter(function(){returnx.getCellIndex(v(this))===p}),!a&&l.hasClass(m)||!i.not(b.join(",")).length||i.is(e)||(u[u.length]=x.processText(t,i));returnu},getAll:function(t,e){varn,a,r,i,l,o,h,s,d=[],u=t.widgetOptions,c=u.math_dataAttrib,g="["+c+"=ignore]",f=u.filter_filteredRow||"filtered",m=t.$table.children("tbody").children().not(g);for(l=m.length,i=0;i<l;i++)if(r=m.eq(i),e&&(r=r.filter(e)),e||!r.hasClass(f))for(s=(o=r.children().not(g)).length,h=0;h<s;h++)n=o.eq(h),a=x.getCellIndex(n),!n.filter("["+c+"]").length&&v.inArray(a,u.math_ignore)<0&&(d[d.length]=x.processText(t,n));returnd},setColumnIndexes:function(t){vare=t.$table,r=1,n=e.children("tbody").children().filter(function(){vart,e,n=v(this),a=0<n.children("[colspan]").length;if(1<r?(r--,a=!0):r<1&&(r=1),0<n.children("[rowspan]").length)for(t=this.cells,e=0;e<t.length;e++)r=Math.max(t[e].rowSpan,r);returna});_.computeColumnIndex(n,t)},getCellIndex:function(t){vare=t.attr("data-column");returnvoid0===e?t[0].cellIndex:parseInt(e,10)},recalculate:function(n,t,e){if(n&&(!t.math_isUpdating||e)){vara,r,i,l,o,h=!1,s={};for((n.debug||t.math_debug)&&(a=newDate),e&&x.setColumnIndexes(n),t.math_dataAttrib="data-"+(t.math_data||"math"),r=t.math_dataAttrib,i=n.$tbodies.children("tr").children("["+r+"]"),h=x.mathType(n,i,t.math_priority)||h,i=n.$table.children("."+n.cssInfoBlock+", tfoot").children("tr").children("["+r+"]"),x.mathType(n,i,t.math_priority),o=(i=n.$table.children().children("tr").children("["+r+"^=all]")).length,l=0;l<o;l++){vard=i.eq(l),u=d.attr(r+"-filter")||t.math_rowFilter;s[u]=s[u]?s[u].add(d):d}v.each(s,function(t,e){h=x.mathType(n,e,["all"],t)||h}),h?(t.math_isUpdating=!0,(n.debug||t.math_debug)&&console[console.group?"group":"log"]("Math widget updating the cache after recalculation"),_.updateCache(n,function(){x.updateComplete(n),e||"function"!=typeoft.math_completed||t.math_completed(n),(n.debug||t.math_debug)&&console.log("Math widget update completed"+_.benchmark(a))})):(e||"function"!=typeoft.math_completed||t.math_completed(n),(n.debug||t.math_debug)&&console.log("Mathwidgetfoundnochan