/*! SearchPane 0.0.2 * 2018 SpryMedia Ltd - datatables.net/license */ !function(n){"function"==typeof define&&define.amd?define(["jquery","datatables.net"],function(e){return n(e,window,document)}):"object"==typeof exports?module.exports=function(e,t){return e=e||window,t&&t.fn.dataTable||(t=require("datatables.net")(e,t).$),n(t,0,e.document)}:n(jQuery,window,document)}(function(f,e,t,n){"use strict";var m=f.fn.dataTable;function i(e,t){var n=this,e=new m.Api(e);this.classes=f.extend(!0,{},i.classes),this.dom={container:f("
").addClass(this.classes.container)},this.c=f.extend(!0,{},i.defaults,t),this.s={dt:e},e.settings()[0].searchPane=this,e.columns(this.c.columns).eq(0).each(function(e){n._pane(e)}),f(this.dom.container).on("click","li",function(){n._toggle(this)}).on("click","button."+this.classes.clear,function(){n._clear(f(this).closest("div."+n.classes.pane.container))}),this._attach()}f.extend(i.prototype,{rebuild:function(){var t=this;this.dom.container.empty(),this.s.dt.columns(this.c.columns).eq(0).each(function(e){t._pane(e)})},_attach:function(){var e=this.c.container,e="function"==typeof e?e(this.s.dt):e;"prepend"===this.c.insert?f(this.dom.container).prependTo(e):f(this.dom.container).appendTo(e)},_binData:function(e){for(var t={},n=0,a=e.length;n"),a="function"==typeof i.options?i.options(a,e):i.options?new m.Api(null,i.options):s.data(),o=this._binData(a.flatten());if(!(this._variance(o)").html(''+u[h]+"").data("filter",u[h]).append(f("").addClass(n.count).html(o[u[h]])),d.length&&(l=u[h].replace?f.fn.dataTable.util.escapeRegex(u[h]):u[h],-1!==f.inArray(l,d))&&r.addClass(n.selected),c.append(r));i=f("
").data("column",e).addClass(t.container).addClass(d.length?t.active:"").append(f('').addClass(this.classes.clear)).append(f("
").addClass(t.title).html(f(s.header()).text())).append(f("
").addClass(t.scroller).append(c)),a=this.dom.container,s=a.children().map(function(){if(f(this).data("column")==e)return this});s.length?s.replaceWith(i):f(a).append(i)}},_getOptions:function(e){return this.s.dt.settings()[0].aoColumns[e].searchPane||{}},_toggle:function(e){var t=this.classes,n=t.item.selected,a=this.s.dt,s=(e=f(e)).closest("div."+t.pane.container),i=s.data("column"),c=this._getOptions(i),e=(e.toggleClass(n,!e.hasClass(n)),s.find("li."+n));(0===e.length?(s.removeClass(t.pane.active),a.column(i).search("")):"any"===c.match?(s.addClass(t.pane.active),a.column(i).search("("+f.map(e,function(e){e=f(e).data("filter").toString(),e=f("
").html(e).text();return f.fn.dataTable.util.escapeRegex(e)}).join("|")+")",!0,!1)):(s.addClass(t.pane.active),a.column(i).search("^("+f.map(e,function(e){e=f(e).data("filter").toString(),e=f("
").html(e).text();return f.fn.dataTable.util.escapeRegex(e)}).join("|")+")$",!0,!1))).draw()},_variance:function(e){for(var t=f.map(e,function(e,t){return e}),e=t.length,n=0,a=0,s=e;a