/*! Widget: scroller - updated 2018-05-07 (v2.30.4) */ !function(e,r){"use strict";var l=e.tablesorter,o=l.css;e.extend(l.css,{scrollerWrap:"tablesorter-scroller",scrollerHeader:"tablesorter-scroller-header",scrollerTable:"tablesorter-scroller-table",scrollerFooter:"tablesorter-scroller-footer",scrollerFixed:"tablesorter-scroller-fixed",scrollerFixedPanel:"tablesorter-scroller-fixed-panel",scrollerHasFix:"tablesorter-scroller-has-fixed-columns",scrollerHideColumn:"tablesorter-scroller-hidden-column",scrollerHideElement:"tablesorter-scroller-hidden",scrollerSpacerRow:"tablesorter-scroller-spacer",scrollerBarSpacer:"tablesorter-scroller-bar-spacer",scrollerAddedHeight:"tablesorter-scroller-added-height",scrollerHack:"tablesorter-scroller-scrollbar-hack",scrollerRtl:"ts-scroller-rtl"}),l.addWidget({id:"scroller",priority:60,options:{scroller_height:300,scroller_jumpToHeader:!0,scroller_upAfterSort:!0,scroller_fixedColumns:0,scroller_rowHighlight:"hover",scroller_addFixedOverlay:!1,scroller_barWidth:null},format:function(e,r,o){r.isScrolling?l.scroller.resize(r,o):l.scroller.setup(r,o)},remove:function(e,r,o){l.scroller.remove(r,o)}}),l.window_resize=function(){l.timer_resize&&clearTimeout(l.timer_resize),l.timer_resize=setTimeout(function(){e(r).trigger("resizeEnd")},250)},e(function(){var r="";e("head").append(r)}),l.scroller={isFirefox:navigator.userAgent.toLowerCase().indexOf("firefox")>-1,isOldIE:document.all&&!r.atob,isIE:document.all&&!r.atob||navigator.appVersion.indexOf("Trident/")>0,isSafari:navigator.userAgent.toLowerCase().indexOf("safari")>-1&&-1===navigator.userAgent.toLowerCase().indexOf("chrome"),hasScrollBar:function(e,r){return r?e.get(0).scrollWidth>e.width():e.get(0).scrollHeight>e.height()},setWidth:function(e,r){e.css({width:r,"min-width":r,"max-width":r})},getBarWidth:function(){var r=e("
").css({position:"absolute",top:"-9999px",left:0,width:"100px",height:"100px",overflow:"scroll",visibility:"hidden"}).appendTo("body"),l=r[0],o=l.offsetWidth-l.clientWidth;return r.remove(),o},setup:function(s,t){var i,d,c,a,n,h,f,p,b=e(r),u=l.scroller,m=s.namespace+"tsscroller",g=e(),v=s.namespace.slice(1)+"tsscroller",x=s.$table;s.widthFixed=!0,t.scroller_calcWidths=[],t.scroller_saved=[0,0],t.scroller_isBusy=!0,t.scroller_scrollTimer=null,null!==t.scroller_barWidth?t.scroller_barSetWidth=t.scroller_barWidth:(p=u.getBarWidth(),t.scroller_barSetWidth=null!==p?p:15),f=x.children("caption"),d=e(''+(f.length?f[0].outerHTML:"")+x.children("thead")[0].outerHTML+"
"),t.scroller_$header=d.addClass(s.namespace.slice(1)+"_extra_table"),(c=x.children("tfoot")).length&&(g=e('
').addClass(s.namespace.slice(1)+"_extra_table").append(c.clone(!0)).wrap('
')),t.scroller_$footer=g,x.wrap('
').before(d).find("."+o.filterRow).addClass(o.filterRowHide),t.scroller_$container=x.parent(),g.length&&x.after(g.parent()),a=d.wrap('
').find("."+o.header),x.wrap('
':'">')),n=x.parent(),l.bindEvents(s.table,a),x.hasClass("hasFilters")&&l.filter.bindSearch(x,d.find("."+o.filter)),x.children("thead, caption").addClass(o.scrollerHideElement),i=n.parent().height(),n.off("scroll"+m).on("scroll"+m,function(){if(clearTimeout(t.scroller_scrollTimer),t.scroller_scrollTimer=setTimeout(function(){t.scroller_saved[0]=n.scrollLeft(),t.scroller_saved[1]=n.scrollTop()},300),t.scroller_jumpToHeader){var r=b.scrollTop()-d.offset().top;0!==e(this).scrollTop()&&r0&&b.scrollTop(d.offset().top)}d.parent().add(g.parent()).scrollLeft(e(this).scrollLeft())}),h=((f=l.hasWidget(s.table,"filter")?"filterEnd filterInit":"tablesorter-initialized updateComplete")+" sortEnd pagerComplete columnUpdate ").split(" ").join(m+" "),x.off(m).on("sortStart"+m,function(){clearTimeout(t.scroller_scrollTimer),t.scroller_isBusy=!0}).on("sortEnd filterEnd".split(" ").join(m+" "),function(e){"sortEnd"===e.type&&t.scroller_upAfterSort?n.scrollLeft(t.scroller_saved[0]).animate({scrollTop:0},"fast",function(){t.scroller_isBusy=!1}):t.scroller_fixedColumns&&setTimeout(function(){n.scrollTop(t.scroller_saved[1]).scrollLeft(t.scroller_saved[0]),u.updateFixed(s,t)},0)}).on("setFixedColumnSize"+m,function(e,r){var l=t.scroller_$container;void 0===r||isNaN(r)||(t.scroller_fixedColumns=parseInt(r,10)),u.removeFixed(s,t),(r=t.scroller_fixedColumns)>0&&r0&&u.updateFixed(s,t),u.resize(s,t))}),b.off("resize resizeEnd ".split(" ").join(m+" ")).on("resize"+m,l.window_resize).on("resizeEnd"+m,function(){b.off("resize"+m,l.window_resize),u.resize(s,t),b.on("resize"+m,l.window_resize),n.trigger("scroll"+m)}),s.isScrolling=!0,u.updateFixed(s,t),s.table.hasInitialized&&s.isScrolling&&setTimeout(function(){l.scroller.resize(s,t)},50)},resize:function(s,t){if(!t.scroller_isBusy){var i,d,c,a,n,h=l.scroller,f=t.scroller_$container,p=s.$table,b=p.parent(),u=t.scroller_$header,m=t.scroller_$footer,g=e(r),v=[g.scrollLeft(),g.scrollTop()],x=s.namespace.slice(1)+"tsscroller",_=e("div."+o.scrollerWrap+'[id!="'+x+'"]').addClass(o.scrollerHideElement),w="padding:0;margin:0;border:0;height:0;max-height:0;min-height:0;",C='';for(t.scroller_calcWidths=[],h.removeFixed(s,t),f.find("."+o.scrollerSpacerRow).remove(),f.find("."+l.css.colgroup).remove(),p.find("."+o.scrollerHideElement).removeClass(o.scrollerHideElement),d=parseInt(p.css("border-left-width"),10),a=s.$headerIndexed,i=0;i',t.scroller_calcWidths[i]=c;C+="",s.$tbodies.eq(0).append(C),u.children("thead").append(C),m.children("tfoot").append(C),l.fixColumnWidth(s.table),C=s.$table.children("colgroup")[0].outerHTML,u.append(C),m.append(C),w=b.parent().innerWidth()-(h.hasScrollBar(b)?t.scroller_barSetWidth:0),b.width(w),w=(h.hasScrollBar(b)?t.scroller_barSetWidth:0)+d,c=b.innerWidth()-w,u.parent().add(m.parent()).width(c),b.width(c+w),p.children("thead, caption").addClass(o.scrollerHideElement),h.updateFixed(s,t),_.removeClass(o.scrollerHideElement),b.scrollTop(t.scroller_saved[1]),t.scroller_$container.find("."+o.scrollerFixed).find("."+o.scrollerTable).scrollTop(t.scroller_saved[1]),g.scrollLeft(v[0]),g.scrollTop(v[1]),setTimeout(function(){s.$table.triggerHandler("resizableUpdate"),s.$table.triggerHandler("scrollerComplete")},100)}},setupFixed:function(e,r){var s,t,i,d,c,a,n,h=e.$table,f=r.scroller_$container,p=r.scroller_fixedColumns;for((a=f.addClass(o.scrollerHasFix).clone().addClass(o.scrollerFixed).removeClass(o.scrollerWrap).attr("id","")).find("caption").html(" "),r.scroller_addFixedOverlay&&a.append('
'),(n=a.find("."+o.scrollerTable)).children("table").addClass(e.namespace.slice(1)+"_extra_table").attr("id","").children("thead, tfoot").remove(),r.scroller_$fixedColumns=a,h.hasClass(o.scrollerRtl)&&a.addClass(o.scrollerRtl),d=(i=a.find("tr")).length,s=0;s')},throttle:function(e,r,l){r=r||50;var o,s;return function(){var t=l||this,i=+new Date,d=arguments;o&&i tr").on(d,"tbody > tr",function(e){var l=r.$table.children("tbody").children("tr").index(this);c.children("table").children("tbody").children("tr").eq(l).add(this).toggleClass(s.scroller_rowHighlight,"mouseover"===e.type)}),c.find("table").off(d,"tbody > tr").on(d,"tbody > tr",function(e){var l=c.children("table").children("tbody").children("tr").index(this);r.$table.children("tbody").children("tr").eq(l).add(this).toggleClass(s.scroller_rowHighlight,"mouseover"===e.type)}))},adjustWidth:function(e,r,s,t,i){var d=r.scroller_$container;d.children("."+o.scrollerTable).css(i?"right":"left",s),d.children("."+o.scrollerHeader+", ."+o.scrollerFooter).css(i?"right":"left",s+(i&&l.scroller.isSafari?t:0))},updateFixed:function(r,s){var t,i,d=s.scroller_$container,c=s.scroller_$header,a=s.scroller_$footer,n=r.$table,h=n.parent(),f=s.scroller_barSetWidth,p=n.hasClass(o.scrollerRtl);if(0===s.scroller_fixedColumns)return s.scroller_isBusy=!1,l.scroller.removeFixed(r,s),t=d.width(),h.width(t),i=l.scroller.hasScrollBar(h)?f:0,void c.parent().add(a.parent()).width(t-i);if(r.isScrolling){s.scroller_isBusy=!0,d.find("."+o.scrollerFixed).length||l.scroller.setupFixed(r,s);var b,u,m,g,v,x,_,w=s.scroller_$container.children("."+o.scrollerTable).children("table").children("tbody"),C=s.scroller_$header.children("thead").children("."+o.headerRow),F=s.scroller_$fixedColumns.addClass(o.scrollerHideElement),H=F.find("."+o.scrollerTable).children("table"),T=H.children("tbody"),y=l.scroller,$=s.scroller_fixedColumns,W=function(e,r,l){return parseInt(e.css(r)||"",10)||l||0},S=n.find("tbody td"),E=W(S,"border-right-width",1),z=W(S,"border-spacing",0),B=W(n,"padding-left")+W(n,"padding-right")+2*W(n,"border-left-width",1)+W(n,"border-right-width",1)-E+z/2,R=s.scroller_calcWidths;for(l.scroller.removeFixed(r,s,!1),b=0;b<$;b++)B+=R[b]+z;for(B+=2*E,y.setWidth(F.add(F.children()),B),y.setWidth(F.children().children("table"),B),u=0;u').css("height",i+"px"),F.find("."+o.scrollerTable).append(S)):t||F.find("."+o.scrollerBarSpacer).remove(),l.scroller.updateRowHeight(r,s),F.height(d.height()),F.removeClass(o.scrollerHideElement),F.find("caption").height(s.scroller_$header.find("caption").height()),h.scroll(),setTimeout(function(){s.scroller_isBusy=!1},0)}},fixHeight:function(e,r){var l,s,t,i,d,c=o.scrollerAddedHeight,a=e.length;for(l=0;l(t=d.height())?d.addClass(c).height(s):s