!function(a){"use strict";varb=a.tablesorter,c=".tscolsel",d=b.columnSelector={queryAll:"@media only all { [columns] { display: none; } } ",queryBreak:"@media all and (min-width: [size]) { [columns] { display: table-cell; } } ",init:function(b,e,f){varg,h;returng=a(f.columnSelector_layout),g.find("input").add(g.filter("input")).length?(e.$table.addClass(e.namespace.slice(1)+"columnselector"),h=e.selector={$container:a(f.columnSelector_container||"<div>")},h.$style=a("<style></style>").prop("disabled",!0).appendTo("head"),h.$breakpoints=a("<style></style>").prop("disabled",!0).appendTo("head"),h.isInitializing=!0,d.setUpColspan(e,f),d.setupSelector(e,f),f.columnSelector_mediaquery&&d.setupBreakpoints(e,f),h.isInitializing=!1,h.$container.length?d.updateCols(e,f):e.debug&&console.warn("ColumnSelector: >> container not found"),voide.$table.off("refreshColumnSelector"+c).on("refreshColumnSelector"+c,function(a,b,c){d.refreshColumns(this.config,b,c)})):void(e.debug&&console.error("ColumnSelector: >> ERROR: Column Selector aborting, no input found in the layout! ***"))},refreshColumns:function(b,c,e){varf,g,h=a.isArray(e||c),i=b.widgetOptions;if("undefined"!=typeofc&&b.selector.$container.length){if("selectors"===c&&(b.selector.$container.empty(),d.setupSelector(b,i),d.setupBreakpoints(b,i),"undefined"==typeofe&&(e=b.selector.auto)),h)for(g=e||c,a.each(g,function(a,b){g[a]=parseInt(b,10)}),f=0;f<b.columns;f++)b.selector.$container.find("input[data-column="+f+"]").prop("checked",a.inArray(f,g)>=0);d.updateAuto(b,i,b.selector.$container.find('input[data-column="auto"]').prop("checked",e===!0||c===!0||"auto"===c&&e!==!1))}elsed.updateBreakpoints(b,i),d.updateCols(b,i);d.adjustColspans(b,i)},setupSelector:function(c,e){varf,g,h=c.selector,i=h.$container,j=e.columnSelector_saveColumns&&b.storage,k=j?b.storage(c.table,"tablesorter-columnSelector"):[],l=j?b.storage(c.table,"tablesorter-columnSelector-auto"):{};for(h.auto=a.isEmptyObject(l)||"boolean"!==a.type(l.auto)?e.columnSelector_mediaqueryState:l.auto,h.states=[],h.$column=[],h.$wrapper=[],h.$checkbox=[],f=0;f<c.columns;f++){varm=c.$headerIndexed[f],n=m.attr(e.columnSelector_priority)||1,o=m.attr("data-column"),p=b.getColumnData(c.table,c.headers,o),l=b.getData(m,p,"columnSelector");isNaN(n)&&n.length>0||"disable"===l||e.columnSelector_columns[o]&&"disable"===e.columnSelector_columns[o]||(h.states[o]=k&&"undefined"!=typeofk[o]?k[o]:"undefined"!=typeofe.columnSelector_columns[o]?e.columnSelector_columns[o]:"true"===l||"false"!==l,h.$column[o]=a(this),g=m.attr(e.columnSelector_name)||m.text(),i.length&&(h.$wrapper[o]=a(e.columnSelector_layout.replace(/\{name\}/g,g)).appendTo(i),h.$checkbox[o]=h.$wrapper[o].find("input").add(h.$wrapper[o].filter("input")).attr("data-column",o).toggleClass(e.columnSelector_cssChecked,h.states[o]).prop("checked",h.states[o]).on("change",function(){varb=a(this).attr("data-column");c.selector.states[b]=this.checked,d.updateCols(c,e)}).change()))}},setupBreakpoints:function(b,e){varf=b.selector;e.columnSelector_mediaquery&&(f.lastIndex=-1,d.updateBreakpoints(b,e),b.$table.off("updateAll"+c).on("updateAll"+c,function(){d.updateBreakpoints(b,e),d.updateCols(b,e)})),f.$container.length&&(e.columnSelector_mediaquery&&(f.$auto=a(e.columnSelector_layout.replace(/\{name\}/g,e.columnSelector_mediaqueryName)).prependTo(f.$container),f.$auto.find("input").add(f.$auto.filter("input")).attr("data-column","auto").prop("checked",f.auto).toggleClass(e.columnSelector_cssChecked,f.auto).on("change",function(){d.updateAuto(b,e,a(this))}).change()),b.$table.off("update"+c).on("update"+c,function(){d.updateCols(b,e)}))},updateAuto:function(c,e,f){varg=c.selector;g.auto=f.prop("checked")||!1,a.each(g.$checkbox,function(a,b){b&&(b[0].disabled=g.auto,g.$wrapper[a].toggleClass("disabled",g.auto))}),e.columnSelector_mediaquery&&d.updateBreakpoints(c,e),d.updateCols(c,e),c.selector.$popup&&c.selector.$popup.find(".tablesorter-column-selector").html(g.$container.html()).find("input").each(function(){varb=a(this).attr("data-column");a(this).prop("checked","auto"==