tupali/librerias/datatables2/SearchPanes-1.0.1/js/dataTables.searchPanes.min.js
2020-03-30 22:08:46 -05:00

87 lines
40 KiB
JavaScript

/*!
SearchPanes 1.0.1
2019-2020 SpryMedia Ltd - datatables.net/license
*/
var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.getGlobal=function(b){return"undefined"!=typeof window&&window===b?b:"undefined"!=typeof global&&null!=global?global:b};$jscomp.global=$jscomp.getGlobal(this);$jscomp.checkEs6ConformanceViaProxy=function(){try{var b={},m=Object.create(new $jscomp.global.Proxy(b,{get:function(k,h,f){return k==b&&"q"==h&&f==m}}));return!0===m.q}catch(k){return!1}};$jscomp.USE_PROXY_FOR_ES6_CONFORMANCE_CHECKS=!1;
$jscomp.ES6_CONFORMANCE=$jscomp.USE_PROXY_FOR_ES6_CONFORMANCE_CHECKS&&$jscomp.checkEs6ConformanceViaProxy();$jscomp.arrayIteratorImpl=function(b){var m=0;return function(){return m<b.length?{done:!1,value:b[m++]}:{done:!0}}};$jscomp.arrayIterator=function(b){return{next:$jscomp.arrayIteratorImpl(b)}};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.SIMPLE_FROUND_POLYFILL=!1;
$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(b,m,k){b!=Array.prototype&&b!=Object.prototype&&(b[m]=k.value)};$jscomp.SYMBOL_PREFIX="jscomp_symbol_";$jscomp.initSymbol=function(){$jscomp.initSymbol=function(){};$jscomp.global.Symbol||($jscomp.global.Symbol=$jscomp.Symbol)};$jscomp.SymbolClass=function(b,m){this.$jscomp$symbol$id_=b;$jscomp.defineProperty(this,"description",{configurable:!0,writable:!0,value:m})};
$jscomp.SymbolClass.prototype.toString=function(){return this.$jscomp$symbol$id_};$jscomp.Symbol=function(){function b(k){if(this instanceof b)throw new TypeError("Symbol is not a constructor");return new $jscomp.SymbolClass($jscomp.SYMBOL_PREFIX+(k||"")+"_"+m++,k)}var m=0;return b}();
$jscomp.initSymbolIterator=function(){$jscomp.initSymbol();var b=$jscomp.global.Symbol.iterator;b||(b=$jscomp.global.Symbol.iterator=$jscomp.global.Symbol("Symbol.iterator"));"function"!=typeof Array.prototype[b]&&$jscomp.defineProperty(Array.prototype,b,{configurable:!0,writable:!0,value:function(){return $jscomp.iteratorPrototype($jscomp.arrayIteratorImpl(this))}});$jscomp.initSymbolIterator=function(){}};
$jscomp.initSymbolAsyncIterator=function(){$jscomp.initSymbol();var b=$jscomp.global.Symbol.asyncIterator;b||(b=$jscomp.global.Symbol.asyncIterator=$jscomp.global.Symbol("Symbol.asyncIterator"));$jscomp.initSymbolAsyncIterator=function(){}};$jscomp.iteratorPrototype=function(b){$jscomp.initSymbolIterator();b={next:b};b[$jscomp.global.Symbol.iterator]=function(){return this};return b};
$jscomp.makeIterator=function(b){var m="undefined"!=typeof Symbol&&Symbol.iterator&&b[Symbol.iterator];return m?m.call(b):$jscomp.arrayIterator(b)};$jscomp.owns=function(b,m){return Object.prototype.hasOwnProperty.call(b,m)};$jscomp.polyfill=function(b,m,k,h){if(m){k=$jscomp.global;b=b.split(".");for(h=0;h<b.length-1;h++){var f=b[h];f in k||(k[f]={});k=k[f]}b=b[b.length-1];h=k[b];m=m(h);m!=h&&null!=m&&$jscomp.defineProperty(k,b,{configurable:!0,writable:!0,value:m})}};
$jscomp.polyfill("WeakMap",function(b){function m(){if(!b||!Object.seal)return!1;try{var a=Object.seal({}),e=Object.seal({}),d=new b([[a,2],[e,3]]);if(2!=d.get(a)||3!=d.get(e))return!1;d.delete(a);d.set(e,4);return!d.has(a)&&4==d.get(e)}catch(n){return!1}}function k(){}function h(c){if(!$jscomp.owns(c,a)){var e=new k;$jscomp.defineProperty(c,a,{value:e})}}function f(a){var c=Object[a];c&&(Object[a]=function(a){if(a instanceof k)return a;h(a);return c(a)})}if($jscomp.USE_PROXY_FOR_ES6_CONFORMANCE_CHECKS){if(b&&
$jscomp.ES6_CONFORMANCE)return b}else if(m())return b;var a="$jscomp_hidden_"+Math.random();f("freeze");f("preventExtensions");f("seal");var d=0,g=function(a){this.id_=(d+=Math.random()+1).toString();if(a){a=$jscomp.makeIterator(a);for(var c;!(c=a.next()).done;)c=c.value,this.set(c[0],c[1])}};g.prototype.set=function(c,e){h(c);if(!$jscomp.owns(c,a))throw Error("WeakMap key fail: "+c);c[a][this.id_]=e;return this};g.prototype.get=function(c){return $jscomp.owns(c,a)?c[a][this.id_]:void 0};g.prototype.has=
function(c){return $jscomp.owns(c,a)&&$jscomp.owns(c[a],this.id_)};g.prototype.delete=function(c){return $jscomp.owns(c,a)&&$jscomp.owns(c[a],this.id_)?delete c[a][this.id_]:!1};return g},"es6","es3");$jscomp.MapEntry=function(){};
$jscomp.polyfill("Map",function(b){function m(){if($jscomp.ASSUME_NO_NATIVE_MAP||!b||"function"!=typeof b||!b.prototype.entries||"function"!=typeof Object.seal)return!1;try{var a=Object.seal({x:4}),e=new b($jscomp.makeIterator([[a,"s"]]));if("s"!=e.get(a)||1!=e.size||e.get({x:4})||e.set({x:4},"t")!=e||2!=e.size)return!1;var d=e.entries(),g=d.next();if(g.done||g.value[0]!=a||"s"!=g.value[1])return!1;g=d.next();return g.done||4!=g.value[0].x||"t"!=g.value[1]||!d.next().done?!1:!0}catch(l){return!1}}
if($jscomp.USE_PROXY_FOR_ES6_CONFORMANCE_CHECKS){if(b&&$jscomp.ES6_CONFORMANCE)return b}else if(m())return b;$jscomp.initSymbolIterator();var k=new WeakMap,h=function(a){this.data_={};this.head_=d();this.size=0;if(a){a=$jscomp.makeIterator(a);for(var c;!(c=a.next()).done;)c=c.value,this.set(c[0],c[1])}};h.prototype.set=function(a,d){a=0===a?0:a;var c=f(this,a);c.list||(c.list=this.data_[c.id]=[]);c.entry?c.entry.value=d:(c.entry={next:this.head_,previous:this.head_.previous,head:this.head_,key:a,
value:d},c.list.push(c.entry),this.head_.previous.next=c.entry,this.head_.previous=c.entry,this.size++);return this};h.prototype.delete=function(a){a=f(this,a);return a.entry&&a.list?(a.list.splice(a.index,1),a.list.length||delete this.data_[a.id],a.entry.previous.next=a.entry.next,a.entry.next.previous=a.entry.previous,a.entry.head=null,this.size--,!0):!1};h.prototype.clear=function(){this.data_={};this.head_=this.head_.previous=d();this.size=0};h.prototype.has=function(a){return!!f(this,a).entry};
h.prototype.get=function(a){return(a=f(this,a).entry)&&a.value};h.prototype.entries=function(){return a(this,function(a){return[a.key,a.value]})};h.prototype.keys=function(){return a(this,function(a){return a.key})};h.prototype.values=function(){return a(this,function(a){return a.value})};h.prototype.forEach=function(a,d){for(var c=this.entries(),e;!(e=c.next()).done;)e=e.value,a.call(d,e[1],e[0],this)};h.prototype[Symbol.iterator]=h.prototype.entries;var f=function(a,d){var c;var e=(c=d)&&typeof c;
"object"==e||"function"==e?k.has(c)?c=k.get(c):(e=""+ ++g,k.set(c,e),c=e):c="p_"+c;if((e=a.data_[c])&&$jscomp.owns(a.data_,c))for(a=0;a<e.length;a++){var f=e[a];if(d!==d&&f.key!==f.key||d===f.key)return{id:c,list:e,index:a,entry:f}}return{id:c,list:e,index:-1,entry:void 0}},a=function(a,d){var c=a.head_;return $jscomp.iteratorPrototype(function(){if(c){for(;c.head!=a.head_;)c=c.previous;for(;c.next!=c.head;)return c=c.next,{done:!1,value:d(c)};c=null}return{done:!0,value:void 0}})},d=function(){var a=
{};return a.previous=a.next=a.head=a},g=0;return h},"es6","es3");$jscomp.findInternal=function(b,m,k){b instanceof String&&(b=String(b));for(var h=b.length,f=0;f<h;f++){var a=b[f];if(m.call(k,a,f,b))return{i:f,v:a}}return{i:-1,v:void 0}};$jscomp.polyfill("Array.prototype.find",function(b){return b?b:function(b,k){return $jscomp.findInternal(this,b,k).v}},"es6","es3");
$jscomp.iteratorFromArray=function(b,m){$jscomp.initSymbolIterator();b instanceof String&&(b+="");var k=0,h={next:function(){if(k<b.length){var f=k++;return{value:m(f,b[f]),done:!1}}h.next=function(){return{done:!0,value:void 0}};return h.next()}};h[Symbol.iterator]=function(){return h};return h};$jscomp.polyfill("Array.prototype.keys",function(b){return b?b:function(){return $jscomp.iteratorFromArray(this,function(b){return b})}},"es6","es3");
$jscomp.polyfill("Array.prototype.findIndex",function(b){return b?b:function(b,k){return $jscomp.findInternal(this,b,k).i}},"es6","es3");
(function(){var b=$.fn.dataTable,m=function(){function f(a,d,g,c,e,r){var n=this;void 0===r&&(r=null);if(!b||!b.versionCheck||!b.versionCheck("1.10.0"))throw Error("SearchPane requires DataTables 1.10 or newer");if(!b.select)throw Error("SearchPane requires Select");a=new b.Api(a);this.classes=$.extend(!0,{},f.classes);this.c=$.extend(!0,{},f.defaults,d);this.customPaneSettings=r;this.s={cascadeRegen:!1,clearing:!1,colOpts:[],deselect:!1,displayed:!1,dt:a,dtPane:void 0,filteringActive:!1,index:g,
indexes:[],lastSelect:!1,redraw:!1,rowData:{arrayFilter:[],arrayOriginal:[],arrayTotals:[],bins:{},binsOriginal:{},binsTotal:{},filterMap:new Map},searchFunction:void 0,selectPresent:!1,updating:!1};d=a.columns().eq(0).toArray().length;this.colExists=this.s.index<d;this.c.layout=c;d=parseInt(c.split("-")[1],10);this.dom={buttonGroup:$("<div/>").addClass(this.classes.buttonGroup),clear:$('<button type="button">&#215;</button>').addClass(this.classes.dull).addClass(this.classes.paneButton).addClass(this.classes.clearButton),
container:$("<div/>").addClass(this.classes.container).addClass(this.classes.layout+(7>d?c:c.split("-")[0]+"-6")),countButton:$('<button type="button"></button>').addClass(this.classes.paneButton).addClass(this.classes.countButton),dtP:$("<table><thead><tr><th>"+(this.colExists?$(a.column(this.colExists?this.s.index:0).header()).text():this.customPaneSettings.header||"Custom Pane")+"</th><th/></tr></thead></table>"),lower:$("<div/>").addClass(this.classes.subRow2).addClass(this.classes.narrowButton),
nameButton:$('<button type="button"></button>').addClass(this.classes.paneButton).addClass(this.classes.nameButton),searchBox:$("<input/>").addClass(this.classes.paneInputButton).addClass(this.classes.search),searchButton:$('<button type = "button" class="'+this.classes.searchIcon+'"></button>').addClass(this.classes.paneButton),searchCont:$("<div/>").addClass(this.classes.searchCont),searchLabelCont:$("<div/>").addClass(this.classes.searchLabelCont),topRow:$("<div/>").addClass(this.classes.topRow),
upper:$("<div/>").addClass(this.classes.subRow1).addClass(this.classes.narrowSearch)};this.s.displayed=!1;a=this.s.dt;this.selections=[];this.s.colOpts=this.colExists?this._getOptions():this._getBonusOptions();var l=this.s.colOpts;c=$('<button type="button">X</button>').addClass(this.classes.paneButton);$(c).text(a.i18n("searchPanes.clearPane","X"));this.dom.container.addClass(l.className);this.dom.container.addClass(null!==this.customPaneSettings&&void 0!==this.customPaneSettings.className?this.customPaneSettings.className:
"");$(e).append(this.dom.container);var q=a.table(0).node();this.s.searchFunction=function(a,c,d,e){if(0===n.selections.length||a.nTable!==q)return!0;a="";n.colExists&&(a=c[n.s.index],"filter"!==l.orthogonal.filter&&(a=n.s.rowData.filterMap.get(d),a instanceof $.fn.dataTable.Api&&(a=a.toArray())));return n._search(a,d)};$.fn.dataTable.ext.search.push(this.s.searchFunction);if(this.c.clear)$(c).on("click",function(){n.dom.container.find(n.classes.search).each(function(){$(this).val("");$(this).trigger("input")});
n.clearPane()});a.on("draw.dtsp",function(){n._adjustTopRow()});$(window).on("resize.dtsp",b.util.throttle(function(){n._adjustTopRow()}));a.on("column-reorder.dtsp",function(a,c,d){n.s.index=d.mapping[n.s.index]});return this}f.prototype.clearData=function(){this.s.rowData={arrayFilter:[],arrayOriginal:[],arrayTotals:[],bins:{},binsOriginal:{},binsTotal:{},filterMap:new Map}};f.prototype.clearPane=function(){this.s.dtPane.rows({selected:!0}).deselect();this.updateTable();return this};f.prototype.destroy=
function(){$(this.s.dtPane).off(".dtsp");$(this.s.dt).off(".dtsp");$(this.dom.nameButton).off(".dtsp");$(this.dom.countButton).off(".dtsp");$(this.dom.clear).off(".dtsp");$(this.dom.searchButton).off(".dtsp");$(this.dom.container).remove();for(var a=$.fn.dataTable.ext.search.indexOf(this.s.searchFunction);-1!==a;)$.fn.dataTable.ext.search.splice(a,1),a=$.fn.dataTable.ext.search.indexOf(this.s.searchFunction);void 0!==this.s.dtPane&&this.s.dtPane.destroy()};f.prototype.getPaneCount=function(){return void 0!==
this.s.dtPane?this.s.dtPane.rows({selected:!0}).data().toArray().length:0};f.prototype.rebuildPane=function(){this.clearData();void 0!==this.s.dtPane&&this.s.dtPane.clear().destroy();this.dom.container.removeClass(this.classes.hidden);this.s.displayed=!1;this._buildPane();return this};f.prototype.removePane=function(){this.s.displayed=!1;$(this.dom.container).hide()};f.prototype.setCascadeRegen=function(a){this.s.cascadeRegen=a};f.prototype.setClear=function(a){this.s.clearing=a};f.prototype.updatePane=
function(a){void 0===a&&(a=!1);this.s.updating=!0;this._updateCommon(a);this.s.updating=!1};f.prototype.updateTable=function(){this.selections=this.s.dtPane.rows({selected:!0}).data().toArray();this._searchExtras();(this.c.cascadePanes||this.c.viewTotal)&&this.updatePane()};f.prototype._addOption=function(a,d,g,c,e,r){if(Array.isArray(a)||a instanceof b.Api)if(a instanceof b.Api&&(a=a.toArray(),d=d.toArray()),a.length===d.length)for(var f=0;f<a.length;f++)r[a[f]]?r[a[f]]++:(r[a[f]]=1,e.push({display:d[f],
filter:a[f],sort:g,type:c}));else throw Error("display and filter not the same length");else"string"===typeof this.s.colOpts.orthogonal?r[a]?r[a]++:(r[a]=1,e.push({display:d,filter:a,sort:g,type:c})):e.push({display:d,filter:a,sort:g,type:c})};f.prototype._addRow=function(a,d,g,c,e,f){for(var r,b=0,q=this.s.indexes;b<q.length;b++){var p=q[b];p.filter===d&&(r=p.index)}void 0===r&&(r=this.s.indexes.length,this.s.indexes.push({filter:d,index:r}));return this.s.dtPane.row.add({display:""!==a?a:this.c.emptyMessage,
filter:d,index:r,shown:g,sort:""!==e?e:this.c.emptyMessage,total:c,type:f})};f.prototype._adjustTopRow=function(){var a=this.dom.container.find("."+this.classes.subRowsContainer),d=this.dom.container.find(".dtsp-subRow1"),g=this.dom.container.find(".dtsp-subRow2"),c=this.dom.container.find("."+this.classes.topRow);(252>$(a[0]).width()||252>$(c[0]).width())&&0!==$(a[0]).width()?($(a[0]).addClass(this.classes.narrow),$(d[0]).addClass(this.classes.narrowSub).removeClass(this.classes.narrowSearch),$(g[0]).addClass(this.classes.narrowSub).removeClass(this.classes.narrowButton)):
($(a[0]).removeClass(this.classes.narrow),$(d[0]).removeClass(this.classes.narrowSub).addClass(this.classes.narrowSearch),$(g[0]).removeClass(this.classes.narrowSub).addClass(this.classes.narrowButton))};f.prototype._buildPane=function(){var a=this;this.selections=[];var d=this.s.dt,g=d.column(this.colExists?this.s.index:0),c=this.s.colOpts,e=this.s.rowData,r=d.i18n("searchPanes.count","{total}"),f=d.i18n("searchPanes.countFiltered","{shown} ({total})"),l=d.state.loaded();if(this.colExists){var q=
-1;if(l&&l.searchPanes&&l.searchPanes.panes)for(var p=0;p<l.searchPanes.panes.length;p++)if(l.searchPanes.panes[p].id===this.s.index){q=p;break}if((!1===c.show||void 0!==c.show&&!0!==c.show)&&-1===q)return this.dom.container.addClass(this.classes.hidden),this.s.displayed=!1;if(!0===c.show||-1!==q)this.s.displayed=!0;if(0===e.arrayFilter.length)if(this._populatePane(),l&&l.searchPanes&&l.searchPanes.panes)if(-1!==q)e.binsOriginal=l.searchPanes.panes[q].bins,e.arrayOriginal=l.searchPanes.panes[q].arrayFilter;
else{this.dom.container.addClass(this.classes.hidden);this.s.displayed=!1;return}else e.arrayOriginal=e.arrayFilter,e.binsOriginal=e.bins;p=Object.keys(e.binsOriginal).length;q=this._uniqueRatio(p,d.rows()[0].length);if(!1===this.s.displayed&&((void 0===c.show&&null===c.threshold?q>this.c.threshold:q>c.threshold)||!0!==c.show&&1>=p)){this.dom.container.addClass(this.classes.hidden);this.s.displayed=!1;return}this.c.viewTotal&&0===e.arrayTotals.length?this._detailsPane():e.binsTotal=e.bins;this.dom.container.addClass(this.classes.show)}this.s.displayed=
!0;this._displayPane();this.dom.dtP.on("stateLoadParams.dt",function(a,c,e){$.isEmptyObject(d.state.loaded())&&$.each(e,function(a,c){delete e[a]})});p=$.fn.dataTable.ext.errMode;$.fn.dataTable.ext.errMode="none";q=b.Scroller;this.s.dtPane=$(this.dom.dtP).DataTable($.extend(!0,{dom:"t",columnDefs:[{className:"dtsp-nameColumn",data:"display",render:function(d,e,g){if("sort"===e)return g.sort;if("type"===e)return g.type;var b;a.s.filteringActive&&a.c.viewTotal?b=f.replace(/{total}/,g.total):b=r.replace(/{total}/,
g.total);for(b=b.replace(/{shown}/,g.shown);-1!==b.indexOf("{total}");)b=b.replace(/{total}/,g.total);for(;-1!==b.indexOf("{shown}");)b=b.replace(/{shown}/,g.shown);e='<span class="'+a.classes.pill+'">'+b+"</span>";if(a.c.hideCount||c.hideCount)e="";return a.c.dataLength?d.length>a.c.dataLength?'<span class="'+a.classes.name+'">'+d.substr(0,a.c.dataLength)+"...</span>"+e:'<span class="'+a.classes.name+'">'+d+"</span>"+e:'<span class="'+a.classes.name+'">'+d+"</span>"+e},targets:0,type:void 0!==d.settings()[0].aoColumns[this.s.index]?
d.settings()[0].aoColumns[this.s.index]._sManualType:null},{className:"dtsp-countColumn "+this.classes.badgePill,data:"total",targets:1,visible:!1}],deferRender:!0,info:!1,paging:q?!0:!1,scrollY:"200px",scroller:q?!0:!1,select:!0,stateSave:d.settings()[0].oFeatures.bStateSave?!0:!1},this.c.dtOpts,void 0!==c?c.dtOpts:{},null!==this.customPaneSettings&&void 0!==this.customPaneSettings.dtOpts?this.customPaneSettings.dtOpts:{}));$(this.dom.dtP).addClass(this.classes.table);$(this.dom.searchBox).attr("placeholder",
void 0!==c.header?c.header:this.colExists?d.settings()[0].aoColumns[this.s.index].sTitle:this.customPaneSettings.header||"Custom Pane");$.fn.dataTable.select.init(this.s.dtPane);$.fn.dataTable.ext.errMode=p;if(this.colExists){g=(g=g.search())?g.substr(1,g.length-2).split("|"):[];var k=0;e.arrayFilter.forEach(function(a){""===a.filter&&k++});p=0;for(g=e.arrayFilter.length;p<g;p++)!e.arrayFilter[p]||void 0===e.bins[e.arrayFilter[p].filter]&&this.c.cascadePanes?this._addRow(this.c.emptyMessage,k,k,this.c.emptyMessage,
this.c.emptyMessage,this.c.emptyMessage):(q=this._addRow(e.arrayFilter[p].display,e.arrayFilter[p].filter,e.bins[e.arrayFilter[p].filter],e.binsTotal[e.arrayFilter[p].filter],e.arrayFilter[p].sort,e.arrayFilter[p].type),void 0!==c.preSelect&&-1!==c.preSelect.indexOf(e.arrayFilter[p].filter)&&q.select())}(void 0!==c.options||null!==this.customPaneSettings&&void 0!==this.customPaneSettings.options)&&this._getComparisonRows();b.select.init(this.s.dtPane);this.s.dtPane.draw();this.s.dtPane.on("select.dtsp",
function(){clearTimeout(h);$(a.dom.clear).removeClass(a.classes.dull);a.s.selectPresent=!0;a.s.updating||a._makeSelection();a.s.selectPresent=!1});this.s.dt.on("stateSaveParams.dtsp",function(c,d,g){if($.isEmptyObject(g))a.s.dtPane.state.clear();else{c=[];if(void 0!==a.s.dtPane){c=a.s.dtPane.rows({selected:!0}).data().map(function(a){return a.filter.toString()}).toArray();var b=$(a.dom.searchBox).val();var f=a.s.dtPane.order();var r=e.binsOriginal;var n=e.arrayOriginal}void 0===g.searchPanes&&(g.searchPanes=
{});void 0===g.searchPanes.panes&&(g.searchPanes.panes=[]);g.searchPanes.panes.push({arrayFilter:n,bins:r,id:a.s.index,order:f,searchTerm:b,selected:c})}});if(l&&l.searchPanes&&l.searchPanes.panes)for(this.c.cascadePanes||this._reloadSelect(l),g=0,l=l.searchPanes.panes;g<l.length;g++)p=l[g],p.id===this.s.index&&($(this.dom.searchBox).val(p.searchTerm),this.s.dt.order(p.order));this.s.dtPane.on("user-select.dtsp",function(a,c,d,e,g){g.stopPropagation()});$(this.dom.nameButton).on("click.dtsp",function(){var c=
a.s.dtPane.order()[0][1];a.s.dtPane.order([0,"asc"===c?"desc":"asc"]).draw()});$(this.dom.countButton).on("click.dtsp",function(){var c=a.s.dtPane.order()[0][1];a.s.dtPane.order([1,"asc"===c?"desc":"asc"]).draw()});$(this.dom.clear).on("click.dtsp",function(){a.dom.container.find("."+a.classes.search).each(function(){$(this).val("");$(this).trigger("input")});a.clearPane()});$(this.dom.searchButton).on("click.dtsp",function(){$(a.dom.searchBox).focus()});$(this.dom.searchBox).on("input.dtsp",function(){a.s.dtPane.search($(a.dom.searchBox).val()).draw();
a.s.dt.state.save()});var h;this.s.dtPane.on("deselect.dtsp",function(){h=setTimeout(function(){a.s.deselect=!0;0===a.s.dtPane.rows({selected:!0}).data().toArray().length&&$(a.dom.clear).addClass(a.classes.dull);a._makeSelection();a.s.deselect=!1;a.s.dt.state.save()},50)});this.s.dt.state.save();return!0};f.prototype._detailsPane=function(){var a=this,d=this.s.dt;this.s.rowData.arrayTotals=[];this.s.rowData.binsTotal={};var g=this.s.dt.settings()[0];d.rows().every(function(c){a._populatePaneArray(c,
a.s.rowData.arrayTotals,g,a.s.rowData.binsTotal)})};f.prototype._displayPane=function(){var a=this.dom.container,d=this.s.colOpts,g=parseInt(this.c.layout.split("-")[1],10);$(this.dom.topRow).empty();$(this.dom.dtP).empty();$(this.dom.topRow).addClass(this.classes.topRow);3<g&&$(this.dom.container).addClass(this.classes.smallGap);$(this.dom.topRow).addClass(this.classes.subRowsContainer);$(this.dom.upper).appendTo(this.dom.topRow);$(this.dom.lower).appendTo(this.dom.topRow);$(this.dom.searchCont).appendTo(this.dom.upper);
$(this.dom.buttonGroup).appendTo(this.dom.lower);(!1===this.c.dtOpts.searching||void 0!==d.dtOpts&&!1===d.dtOpts.searching||!this.c.controls||!d.controls||null!==this.customPaneSettings&&void 0!==this.customPaneSettings.dtOpts&&void 0!==this.customPaneSettings.dtOpts.searching&&!this.customPaneSettings.dtOpts.searching)&&$(this.dom.searchBox).attr("disabled","disabled").removeClass(this.classes.paneInputButton).addClass(this.classes.disabledButton);$(this.dom.searchBox).appendTo(this.dom.searchCont);
this._searchContSetup();this.c.clear&&this.c.controls&&d.controls&&$(this.dom.clear).appendTo(this.dom.buttonGroup);this.c.orderable&&d.orderable&&this.c.controls&&d.controls&&$(this.dom.nameButton).appendTo(this.dom.buttonGroup);!this.c.hideCount&&!d.hideCount&&this.c.orderable&&d.orderable&&this.c.controls&&d.controls&&$(this.dom.countButton).appendTo(this.dom.buttonGroup);$(this.dom.topRow).prependTo(this.dom.container);$(a).append(this.dom.dtP);$(a).show()};f.prototype._findUnique=function(a,
d){for(var g=[],c=0;c<d.length;c++){var e=d[c];-1===g.indexOf(e.filter)&&(a.push({display:e.display,filter:e.filter,sort:e.sort,type:e.type}),g.push(e.filter))}};f.prototype._getBonusOptions=function(){return $.extend(!0,{},f.defaults,{orthogonal:{threshold:null},threshold:null},void 0!==this.c?this.c:{})};f.prototype._getComparisonRows=function(){var a=this.s.colOpts;a=void 0!==a.options?a.options:null!==this.customPaneSettings&&void 0!==this.customPaneSettings.options?this.customPaneSettings.options:
void 0;if(void 0!==a){var d=this.s.dt.rows({search:"applied"}).data().toArray(),g=this.s.dt.rows({search:"applied"}),c=this.s.dt.rows().data().toArray(),e=this.s.dt.rows(),b=[];this.s.dtPane.clear();for(var f=0;f<a.length;f++){var l=a[f],q=""!==l.label?l.label:this.c.emptyMessage,k=q,h="function"===typeof l.value?l.value:[],m=0,v=q,u=0;if("function"===typeof l.value){for(var t=0;t<d.length;t++)l.value.call(this.s.dt,d[t],g[0][t])&&m++;for(t=0;t<c.length;t++)l.value.call(this.s.dt,c[t],e[0][t])&&u++;
"function"!==typeof h&&h.push(l.filter)}(!this.c.cascadePanes||this.c.cascadePanes&&0!==m)&&b.push(this._addRow(k,h,m,u,v,q))}return b}};f.prototype._getOptions=function(){return $.extend(!0,{},f.defaults,{orthogonal:{threshold:null},threshold:null},this.s.dt.settings()[0].aoColumns[this.s.index].searchPanes)};f.prototype._makeSelection=function(){this.updateTable();this.s.updating=!0;this.s.dt.draw();this.s.updating=!1};f.prototype._populatePane=function(){var a=this.s.dt;this.s.rowData.arrayFilter=
[];this.s.rowData.bins={};var d=this.s.dt.settings()[0],g=0;for(a=!this.c.cascadePanes&&!this.c.viewTotal||this.s.clearing?a.rows().indexes():a.rows({search:"applied"}).indexes();g<a.length;g++)this._populatePaneArray(a[g],this.s.rowData.arrayFilter,d)};f.prototype._populatePaneArray=function(a,d,g,c){void 0===c&&(c=this.s.rowData.bins);var e=this.s.colOpts;if("string"===typeof e.orthogonal)g=g.oApi._fnGetCellData(g,a,this.s.index,e.orthogonal),this.s.rowData.filterMap.set(a,g),this._addOption(g,
g,g,g,d,c);else{var b=g.oApi._fnGetCellData(g,a,this.s.index,e.orthogonal.search);this.s.rowData.filterMap.set(a,b);c[b]?c[b]++:(c[b]=1,this._addOption(b,g.oApi._fnGetCellData(g,a,this.s.index,e.orthogonal.display),g.oApi._fnGetCellData(g,a,this.s.index,e.orthogonal.sort),g.oApi._fnGetCellData(g,a,this.s.index,e.orthogonal.type),d,c))}};f.prototype._reloadSelect=function(a){if(void 0!==a){for(var d,g=0;g<a.searchPanes.panes.length;g++)if(a.searchPanes.panes[g].id===this.s.index){d=g;break}if(void 0!==
d){g=this.s.dtPane;var c=g.rows({order:"index"}).data().map(function(a){return null!==a.filter?a.filter.toString():null}).toArray(),e=0;for(a=a.searchPanes.panes[d].selected;e<a.length;e++){d=a[e];var b=-1;null!==d&&(b=c.indexOf(d.toString()));-1<b&&(g.row(b).select(),this.s.dt.state.save())}}}};f.prototype._search=function(a,d){for(var g=this.s.colOpts,c=this.s.dt,e=0,b=this.selections;e<b.length;e++){var f=b[e];if(Array.isArray(a)){if(-1!==a.indexOf(f.filter))return!0}else if("function"===typeof f.filter)if(f.filter.call(c,
c.row(d).data(),d)){if(this.s.redraw||this.updatePane(),"or"===g.combiner)return!0}else{if("and"===g.combiner)return!1}else if(a===f.filter)return!0}return"and"===g.combiner?!0:!1};f.prototype._searchContSetup=function(){this.c.controls&&this.s.colOpts.controls&&$(this.dom.searchButton).appendTo(this.dom.searchLabelCont);!1===this.c.dtOpts.searching||!1===this.s.colOpts.dtOpts.searching||null!==this.customPaneSettings&&void 0!==this.customPaneSettings.dtOpts&&void 0!==this.customPaneSettings.dtOpts.searching&&
!this.customPaneSettings.dtOpts.searching||$(this.dom.searchLabelCont).appendTo(this.dom.searchCont)};f.prototype._searchExtras=function(){var a=this.s.updating;this.s.updating=!0;var d=this.s.dtPane.rows({selected:!0}).data().pluck("filter").toArray(),g=d.indexOf(this.c.emptyMessage),c=$(this.s.dtPane.table().container());-1<g&&(d[g]="");0<d.length?c.addClass(this.classes.selected):0===d.length&&c.removeClass(this.classes.selected);this.s.updating=a};f.prototype._uniqueRatio=function(a,d){return 0<
d?a/d:1};f.prototype._updateCommon=function(a){void 0===a&&(a=!1);if(!(void 0===this.s.dtPane||this.s.filteringActive&&!this.c.cascadePanes&&!0!==a||!0===this.c.cascadePanes&&!0===this.s.selectPresent||this.s.lastSelect)){var d=this.s.colOpts,g=this.s.dtPane.rows({selected:!0}).data().toArray();a=$(this.s.dtPane.table().node()).parent()[0].scrollTop;var c=this.s.rowData;this.s.dtPane.clear();if(this.colExists){0===c.arrayFilter.length?this._populatePane():this.c.cascadePanes&&this.s.dt.rows().data().toArray().length===
this.s.dt.rows({search:"applied"}).data().toArray().length?(c.arrayFilter=c.arrayOriginal,c.bins=c.binsOriginal):(this.c.viewTotal||this.c.cascadePanes)&&this._populatePane();this.c.viewTotal?this._detailsPane():c.binsTotal=c.bins;this.c.viewTotal&&!this.c.cascadePanes&&(c.arrayFilter=c.arrayTotals);for(var e=function(a){if(a&&(void 0!==c.bins[a.filter]&&0!==c.bins[a.filter]&&b.c.cascadePanes||!b.c.cascadePanes||b.s.clearing)){var d=b._addRow(a.display,a.filter,b.c.viewTotal?void 0!==c.bins[a.filter]?
c.bins[a.filter]:0:c.bins[a.filter],b.c.viewTotal?String(c.binsTotal[a.filter]):c.bins[a.filter],a.sort,a.type),e=g.findIndex(function(c){return c.filter===a.filter});-1!==e&&(d.select(),g.splice(e,1))}},b=this,f=0,l=c.arrayFilter;f<l.length;f++)e(l[f])}if(void 0!==d.searchPanes&&void 0!==d.searchPanes.options||void 0!==d.options||null!==this.customPaneSettings&&void 0!==this.customPaneSettings.options)for(e=function(a){var c=g.findIndex(function(c){if(c.display===a.data().display)return!0});-1!==
c&&(a.select(),g.splice(c,1))},f=0,l=this._getComparisonRows();f<l.length;f++)d=l[f],e(d);for(e=0;e<g.length;e++)d=g[e],d=this._addRow(d.display,d.filter,0,this.c.viewTotal?d.total:0,d.filter,d.filter),d.select();this.s.dtPane.draw();this.s.dtPane.table().node().parentNode.scrollTop=a}};f.version="1.0.1";f.classes={buttonGroup:"dtsp-buttonGroup",buttonSub:"dtsp-buttonSub",clear:"dtsp-clear",clearAll:"dtsp-clearAll",clearButton:"clearButton",container:"dtsp-searchPane",countButton:"dtsp-countButton",
disabledButton:"dtsp-disabledButton",dull:"dtsp-dull",hidden:"dtsp-hidden",hide:"dtsp-hide",layout:"dtsp-",name:"dtsp-name",nameButton:"dtsp-nameButton",narrow:"dtsp-narrow",paneButton:"dtsp-paneButton",paneInputButton:"dtsp-paneInputButton",pill:"dtsp-pill",search:"dtsp-search",searchCont:"dtsp-searchCont",searchIcon:"dtsp-searchIcon",searchLabelCont:"dtsp-searchButtonCont",selected:"dtsp-selected",smallGap:"dtsp-smallGap",subRow1:"dtsp-subRow1",subRow2:"dtsp-subRow2",subRowsContainer:"dtsp-subRowsContainer",
title:"dtsp-title",topRow:"dtsp-topRow"};f.defaults={cascadePanes:!1,clear:!0,combiner:"or",controls:!0,container:function(a){return a.table().container()},dataLength:30,dtOpts:{},emptyMessage:"<i>No Data</i>",hideCount:!1,layout:"columns-3",orderable:!0,orthogonal:{display:"display",hideCount:!1,search:"filter",show:void 0,sort:"sort",threshold:.6,type:"type"},preSelect:[],threshold:.6,viewTotal:!1};return f}(),k=$.fn.dataTable,h=function(){function b(a,d,g){var c=this;void 0===g&&(g=!1);this.regenerating=
!1;if(!k||!k.versionCheck||!k.versionCheck("1.10.0"))throw Error("SearchPane requires DataTables 1.10 or newer");if(!k.select)throw Error("SearchPane requires Select");var e=new k.Api(a);this.classes=$.extend(!0,{},b.classes);this.c=$.extend(!0,{},b.defaults,d);this.dom={clearAll:$('<button type="button">Clear All</button>').addClass(this.classes.clearAll),container:$("<div/>").addClass(this.classes.panes).text(e.i18n("searchPanes.loadMessage","Loading Search Panes...")),emptyMessage:$("<div/>").addClass(this.classes.emptyMessage),
options:$("<div/>").addClass(this.classes.container),panes:$("<div/>").addClass(this.classes.container),title:$("<div/>").addClass(this.classes.title),titleRow:$("<div/>").addClass(this.classes.titleRow),wrapper:$("<div/>")};this.s={colOpts:[],dt:e,filterPane:-1,panes:[],selectionList:[],updating:!1};e.settings()[0]._searchPanes=this;this.dom.clearAll.text(e.i18n("searchPanes.clearMessage","Clear All"));this._getState();if(this.s.dt.settings()[0]._bInitComplete||g)this._paneDeclare(e,a,d);else e.on("preInit.dt",
function(){c._paneDeclare(e,a,d)})}b.prototype.clearSelections=function(){this.dom.container.find(this.classes.search).each(function(){$(this).val("");$(this).trigger("input")});for(var a=[],d=0,b=this.s.panes;d<b.length;d++){var c=b[d];void 0!==c.s.dtPane&&a.push(c.clearPane())}this.s.dt.draw();return a};b.prototype.getNode=function(){return this.dom.container};b.prototype.rebuild=function(a){void 0===a&&(a=!1);$(this.dom.emptyMessage).remove();var d=[];this.clearSelections();for(var b=0,c=this.s.panes;b<
c.length;b++){var e=c[b];if(!1===a||e.s.index===a)e.clearData(),d.push(e.rebuildPane())}this._updateFilterCount();this._attachPaneContainer();return 1===d.length?d[0]:d};b.prototype.redrawPanes=function(){var a=this.s.dt;if(!this.s.updating){var d=!0,b=this.s.filterPane;if(a.rows({search:"applied"}).data().toArray().length===a.rows().data().toArray().length)d=!1;else if(this.c.viewTotal)for(var c=0,e=this.s.panes;c<e.length;c++){var f=e[c];if(void 0!==f.s.dtPane){var n=f.s.dtPane.rows({selected:!0}).data().toArray().length;
0<n&&-1===b?b=f.s.index:0<n&&(b=null)}}e=void 0;c=[];if(this.regenerating){c=0;for(a=this.s.panes;c<a.length;c++)if(f=a[c],void 0!==f.s.dtPane){e=!0;f.s.filteringActive=!0;if(-1!==b&&null!==b&&b===f.s.index||!1===d)e=!1,f.s.filteringActive=!1;f.updatePane(e?d:e)}this._updateFilterCount()}else{n=0;for(var l=this.s.panes;n<l.length;n++)if(f=l[n],f.s.selectPresent){this.s.selectionList.push({index:f.s.index,rows:f.s.dtPane.rows({selected:!0}).data().toArray(),protect:!1});a.state.save();break}else if(f.s.deselect){e=
f.s.index;var h=f.s.dtPane.rows({selected:!0}).data().toArray();0<h.length&&this.s.selectionList.push({index:f.s.index,rows:h,protect:!0})}if(0<this.s.selectionList.length)for(a=this.s.selectionList[this.s.selectionList.length-1].index,n=0,l=this.s.panes;n<l.length;n++)f=l[n],f.s.lastSelect=f.s.index===a&&1===this.s.selectionList.length;for(f=0;f<this.s.selectionList.length;f++)if(this.s.selectionList[f].index!==e||!0===this.s.selectionList[f].protect){a=!1;for(n=f+1;n<this.s.selectionList.length;n++)this.s.selectionList[n].index===
this.s.selectionList[f].index&&(a=!0);a||(c.push(this.s.selectionList[f]),this.s.selectionList[f].protect=!1)}a=0;for(n=this.s.panes;a<n.length;a++)if(f=n[a],void 0!==f.s.dtPane){e=!0;f.s.filteringActive=!0;if(-1!==b&&null!==b&&b===f.s.index||!1===d)e=!1,f.s.filteringActive=!1;f.updatePane(e?d:!1)}this._updateFilterCount();if(0<c.length&&c.length<this.s.selectionList.length)for(this._cascadeRegen(c),a=c[c.length-1].index,b=0,c=this.s.panes;b<c.length;b++)f=c[b],f.s.lastSelect=f.s.index===a&&1===this.s.selectionList.length;
else if(0<c.length)for(f=0,c=this.s.panes;f<c.length;f++)if(a=c[f],void 0!==a.s.dtPane){e=!0;a.s.filteringActive=!0;if(-1!==b&&null!==b&&b===a.s.index||!1===d)e=!1,a.s.filteringActive=!1;a.updatePane(e?d:e)}}d||(this.s.selectionList=[])}};b.prototype._attach=function(){$(this.dom.container).removeClass(this.classes.hide);$(this.dom.titleRow).removeClass(this.classes.hide);$(this.dom.titleRow).remove();$(this.dom.title).appendTo(this.dom.titleRow);this.c.clear&&$(this.dom.clearAll).appendTo(this.dom.titleRow);
$(this.dom.titleRow).appendTo(this.dom.container);for(var a=0,d=this.s.panes;a<d.length;a++)$(d[a].dom.container).appendTo(this.dom.panes);$(this.dom.panes).appendTo(this.dom.container);0===$("div."+this.classes.container).length&&$(this.dom.container).prependTo(this.s.dt);return this.dom.container};b.prototype._attachExtras=function(){$(this.dom.container).removeClass(this.classes.hide);$(this.dom.titleRow).removeClass(this.classes.hide);$(this.dom.titleRow).remove();$(this.dom.title).appendTo(this.dom.titleRow);
this.c.clear&&$(this.dom.clearAll).appendTo(this.dom.titleRow);$(this.dom.titleRow).appendTo(this.dom.container);return this.dom.container};b.prototype._attachMessage=function(){try{var a=this.s.dt.i18n("searchPanes.emptyPanes","No SearchPanes")}catch(d){a=null}if(null===a)$(this.dom.container).addClass(this.classes.hide),$(this.dom.titleRow).removeClass(this.classes.hide);else return $(this.dom.container).removeClass(this.classes.hide),$(this.dom.titleRow).addClass(this.classes.hide),$(this.dom.emptyMessage).text(a),
this.dom.emptyMessage.appendTo(this.dom.container),this.dom.container};b.prototype._attachPaneContainer=function(){for(var a=0,d=this.s.panes;a<d.length;a++)if(!0===d[a].s.displayed)return this._attach();return this._attachMessage()};b.prototype._cascadeRegen=function(a){this.regenerating=!0;var d=-1;1===a.length&&(d=a[0].index);for(var b=0,c=this.s.panes;b<c.length;b++){var e=c[b];e.setCascadeRegen(!0);e.setClear(!0);(void 0!==e.s.dtPane&&e.s.index===d||void 0!==e.s.dtPane)&&e.clearPane();e.setClear(!1)}this._makeCascadeSelections(a);
this.s.selectionList=a;a=0;for(d=this.s.panes;a<d.length;a++)e=d[a],e.setCascadeRegen(!1);this.regenerating=!1};b.prototype._checkMessage=function(){for(var a=0,d=this.s.panes;a<d.length;a++)if(!0===d[a].s.displayed)return;return this._attachMessage()};b.prototype._getState=function(){var a=this.s.dt.state.loaded();a&&a.searchPanes&&void 0!==a.searchPanes.selectionList&&(this.s.selectionList=a.searchPanes.selectionList)};b.prototype._makeCascadeSelections=function(a){for(var d=0;d<a.length;d++)for(var b=
a[d],c=function(a){if(a.s.index===b.index&&void 0!==a.s.dtPane){0<a.s.dtPane.rows({selected:!0}).data().toArray().length&&void 0!==a.s.dtPane&&(a.setClear(!0),a.clearPane(),a.setClear(!1));for(var c=function(c){a.s.dtPane.rows().every(function(d){a.s.dtPane.row(d).data().filter===c.filter&&a.s.dtPane.row(d).select()})},d=0,f=b.rows;d<f.length;d++)c(f[d]);e._updateFilterCount()}},e=this,f=0,n=this.s.panes;f<n.length;f++)c(n[f]);this.s.dt.state.save()};b.prototype._paneDeclare=function(a,d,b){var c=
this;a.columns(0<this.c.columns.length?this.c.columns:void 0).eq(0).each(function(a){c.s.panes.push(new m(d,b,a,c.c.layout,c.dom.panes))});for(var e=a.columns().eq(0).toArray().length,f=this.c.panes.length,g=0;g<f;g++)this.s.panes.push(new m(d,b,e+g,this.c.layout,this.dom.panes,this.c.panes[g]));this.s.dt.settings()[0]._bInitComplete?this._paneStartup(a):this.s.dt.settings()[0].aoInitComplete.push({fn:function(){c._paneStartup(a)}})};b.prototype._paneStartup=function(a){var d=this;500>=this.s.dt.page.info().recordsTotal?
this._startup(a):setTimeout(function(){d._startup(a)},100)};b.prototype._startup=function(a){var d=this;$(this.dom.container).text("");this._attachExtras();$(this.dom.container).append(this.dom.panes);for(var b=0,c=this.s.panes;b<c.length;b++)c[b].rebuildPane();this._updateFilterCount();this._checkMessage();a.on("draw.dtsps",function(){d._updateFilterCount();(d.c.cascadePanes||d.c.viewTotal)&&d.redrawPanes();d.s.filterPane=-1});this.s.dt.on("stateSaveParams.dtsp",function(a,c,b){void 0===b.searchPanes&&
(b.searchPanes={});b.searchPanes.selectionList=d.s.selectionList});0<this.s.selectionList.length&&this.c.cascadePanes&&this._cascadeRegen(this.s.selectionList);a.columns(0<this.c.columns.length?this.c.columns:void 0).eq(0).each(function(a){if(void 0!==d.s.panes[a]&&void 0!==d.s.panes[a].s.dtPane&&void 0!==d.s.panes[a].s.colOpts.preSelect)for(var c=d.s.panes[a].s.dtPane.rows().data().toArray().length,b=0;b<c;b++)-1!==d.s.panes[a].s.colOpts.preSelect.indexOf(d.s.panes[a].s.dtPane.cell(b,0).data())&&
(d.s.panes[a].s.dtPane.row(b).select(),d.s.panes[a].updateTable())});this._updateFilterCount();a.on("destroy.dtsps",function(){for(var c=0,b=d.s.panes;c<b.length;c++)b[c].destroy();a.off(".dtsps");$(d.dom.clearAll).off(".dtsps");$(d.dom.container).remove();d.clearSelections()});if(this.c.clear)$(this.dom.clearAll).on("click.dtsps",function(){d.clearSelections()});a.settings()[0]._searchPanes=this};b.prototype._updateFilterCount=function(){for(var a=0,b=0,f=this.s.panes;b<f.length;b++){var c=f[b];
void 0!==c.s.dtPane&&(a+=c.getPaneCount())}a=this.s.dt.i18n("searchPanes.title","Filters Active - %d",a);$(this.dom.title).text(a)};b.version="1.0.1";b.classes={clear:"dtsp-clear",clearAll:"dtsp-clearAll",container:"dtsp-searchPanes",emptyMessage:"dtsp-emptyMessage",hide:"dtsp-hidden",panes:"dtsp-panesContainer",search:"dtsp-search",title:"dtsp-title",titleRow:"dtsp-titleRow"};b.defaults={cascadePanes:!1,clear:!0,container:function(a){return a.table().container()},columns:[],layout:"columns-3",panes:[],
viewTotal:!1};return b}();(function(b){"function"===typeof define&&define.amd?define(["jquery","datatables.net"],function(a){return b(a,window,document)}):"object"===typeof exports?module.exports=function(a,d){a||(a=window);d&&d.fn.dataTable||(d=require("datatables.net")(a,d).$);return b(d,a,a.document)}:b(window.jQuery,window,document)})(function(b,a,d){function f(a,b){void 0===b&&(b=!1);a=new c.Api(a);var d=a.init().searchPanes||c.defaults.searchPanes;return(new h(a,d,b)).getNode()}var c=b.fn.dataTable;
b.fn.dataTable.SearchPanes=h;b.fn.DataTable.SearchPanes=h;b.fn.dataTable.SearchPane=m;b.fn.DataTable.SearchPane=m;c.Api.register("searchPanes.rebuild()",function(){return this.iterator("table",function(){this.searchPanes&&this.searchPanes.rebuild()})});c.Api.register("column().paneOptions()",function(a){return this.iterator("column",function(b){b=this.aoColumns[b];b.searchPanes||(b.searchPanes={});b.searchPanes.values=a;this.searchPanes&&this.searchPanes.rebuild()})});a=b.fn.dataTable.Api.register;
a("searchPanes()",function(){return this});a("searchPanes.clearSelections()",function(){this.context[0]._searchPanes.clearSelections();return this});a("searchPanes.rebuildPane()",function(a){this.context[0]._searchPanes.rebuild(a);return this});a("searchPanes.container()",function(){return this.context[0]._searchPanes.getNode()});b.fn.dataTable.ext.buttons.searchPanesClear={text:"Clear Panes",action:function(a,b,c,d){b.searchPanes.clearSelections()}};b.fn.dataTable.ext.buttons.searchPanes={text:"Search Panes",
init:function(a,c,d){var e=new b.fn.dataTable.SearchPanes(a,{filterChanged:function(b){a.button(c).text(a.i18n("searchPanes.collapse",{0:"SearchPanes",_:"SearchPanes (%d)"},b))}}),f=a.i18n("searchPanes.collapse","SearchPanes");a.button(c).text(f);d._panes=e},action:function(a,b,c,d){a.stopPropagation();this.popover(d._panes.getNode(),{align:"dt-container"});d._panes.adjust()}};b(d).on("preInit.dt.dtsp",function(a,b,d){"dt"===a.namespace&&(b.oInit.searchPanes||c.defaults.searchPanes)&&(b._searchPanes||
f(b,!0))});c.ext.feature.push({cFeature:"P",fnInit:f});c.ext.features&&c.ext.features.register("searchPanes",f)})})();