1
0
Fork 0
mirror of https://github.com/koalyptus/TableFilter.git synced 2026-03-18 00:19:50 +01:00
TableFilter/dist/tablefilter.js
2015-04-24 20:38:20 +10:00

12 lines
No EOL
134 KiB
JavaScript

/*------------------------------------------------------------------------
- TableFilter v3.0.0 by Max Guglielmi
- build date: Fri Apr 24 2015 19:26:33
- http://tablefilter.free.fr
- Copyright (c) 2014, Licensed under the MIT License
------------------------------------------------------------------------*/
!function(a,b){"function"==typeof define&&define.amd?define(b):"object"==typeof exports?module.exports=b:a.TableFilter=b()}(this,function(){function SortableTable(a,b){this.sortTypes=b||[],this.sortColumn=null,this.descending=null;var c=this;this._headerOnclick=function(a){c.headerOnclick(a)},a?(this.setTable(a),this.document=a.ownerDocument||a.document):this.document=document;var d=this.document.defaultView||this.document.parentWindow;this._onunload=function(){c.destroy()},d&&"undefined"!=typeof d.attachEvent&&d.attachEvent("onunload",this._onunload)}var requirejs,require,define;return function(a){function b(a,b){return r.call(a,b)}function c(a,b){var c,d,e,f,g,h,i,j,k,l,m,n=b&&b.split("/"),o=p.map,q=o&&o["*"]||{};if(a&&"."===a.charAt(0))if(b){for(n=n.slice(0,n.length-1),a=a.split("/"),g=a.length-1,p.nodeIdCompat&&t.test(a[g])&&(a[g]=a[g].replace(t,"")),a=n.concat(a),k=0;k<a.length;k+=1)if(m=a[k],"."===m)a.splice(k,1),k-=1;else if(".."===m){if(1===k&&(".."===a[2]||".."===a[0]))break;k>0&&(a.splice(k-1,2),k-=2)}a=a.join("/")}else 0===a.indexOf("./")&&(a=a.substring(2));if((n||q)&&o){for(c=a.split("/"),k=c.length;k>0;k-=1){if(d=c.slice(0,k).join("/"),n)for(l=n.length;l>0;l-=1)if(e=o[n.slice(0,l).join("/")],e&&(e=e[d])){f=e,h=k;break}if(f)break;!i&&q&&q[d]&&(i=q[d],j=k)}!f&&i&&(f=i,h=j),f&&(c.splice(0,h,f),a=c.join("/"))}return a}function d(b,c){return function(){var d=s.call(arguments,0);return"string"!=typeof d[0]&&1===d.length&&d.push(null),k.apply(a,d.concat([b,c]))}}function e(a){return function(b){return c(b,a)}}function f(a){return function(b){n[a]=b}}function g(c){if(b(o,c)){var d=o[c];delete o[c],q[c]=!0,j.apply(a,d)}if(!b(n,c)&&!b(q,c))throw new Error("No "+c);return n[c]}function h(a){var b,c=a?a.indexOf("!"):-1;return c>-1&&(b=a.substring(0,c),a=a.substring(c+1,a.length)),[b,a]}function i(a){return function(){return p&&p.config&&p.config[a]||{}}}var j,k,l,m,n={},o={},p={},q={},r=Object.prototype.hasOwnProperty,s=[].slice,t=/\.js$/;l=function(a,b){var d,f=h(a),i=f[0];return a=f[1],i&&(i=c(i,b),d=g(i)),i?a=d&&d.normalize?d.normalize(a,e(b)):c(a,b):(a=c(a,b),f=h(a),i=f[0],a=f[1],i&&(d=g(i))),{f:i?i+"!"+a:a,n:a,pr:i,p:d}},m={require:function(a){return d(a)},exports:function(a){var b=n[a];return"undefined"!=typeof b?b:n[a]={}},module:function(a){return{id:a,uri:"",exports:n[a],config:i(a)}}},j=function(c,e,h,i){var j,k,p,r,s,t,u=[],v=typeof h;if(i=i||c,"undefined"===v||"function"===v){for(e=!e.length&&h.length?["require","exports","module"]:e,s=0;s<e.length;s+=1)if(r=l(e[s],i),k=r.f,"require"===k)u[s]=m.require(c);else if("exports"===k)u[s]=m.exports(c),t=!0;else if("module"===k)j=u[s]=m.module(c);else if(b(n,k)||b(o,k)||b(q,k))u[s]=g(k);else{if(!r.p)throw new Error(c+" missing "+k);r.p.load(r.n,d(i,!0),f(k),{}),u[s]=n[k]}p=h?h.apply(n[c],u):void 0,c&&(j&&j.exports!==a&&j.exports!==n[c]?n[c]=j.exports:p===a&&t||(n[c]=p))}else c&&(n[c]=h)},requirejs=require=k=function(b,c,d,e,f){if("string"==typeof b)return m[b]?m[b](c):g(l(b,c).f);if(!b.splice){if(p=b,p.deps&&k(p.deps,p.callback),!c)return;c.splice?(b=c,c=d,d=null):b=a}return c=c||function(){},"function"==typeof d&&(d=e,e=f),e?j(a,b,c,d):setTimeout(function(){j(a,b,c,d)},4),k},k.config=function(a){return k(a)},requirejs._defined=n,define=function(a,c,d){c.splice||(d=c,c=[]),b(n,a)||b(o,a)||(o[a]=[a,c,d])},define.amd={jQuery:!0}}(),define("../libs/almond/almond",function(){}),define("event",["exports"],function(a){"use strict";var b={add:function(a,b,c,d){a.addEventListener?a.addEventListener(b,c,d):a.attachEvent?a.attachEvent("on"+b,c):a["on"+b]=c},remove:function(a,b,c,d){a.detachEvent?a.detachEvent("on"+b,c):a.removeEventListener?a.removeEventListener(b,c,d):a["on"+b]=null},stop:function(a){a||(a=window.event),a.stopPropagation?a.stopPropagation():a.cancelBubble=!0},cancel:function(a){a||(a=window.event),a.preventDefault?a.preventDefault():a.returnValue=!1},target:function(a){return a&&a.target||window.event&&window.event.srcElement},keyCode:function(a){return a.charCode?a.charCode:a.keyCode?a.keyCode:a.which?a.which:0}};a.Event=b}),define("dom",["exports"],function(a){"use strict";function b(){return document.documentElement.classList}var c={};c.getText=function(a){var b=a.textContent||a.innerText||a.innerHTML.replace(/<[^<>]+>/g,"");return b=b.replace(/^\s+/,"").replace(/\s+$/,"")},c.create=function(a){if(a&&""!==a){var b=document.createElement(a),c=arguments;if(c.length>1)for(var d=0;d<c.length;d++){var e=typeof c[d];"object"===e.toLowerCase()&&2===c[d].length&&b.setAttribute(c[d][0],c[d][1])}return b}},c.text=function(a){return document.createTextNode(a)},c.position=function(a){var b=0,c=0;if(a&&a.offsetParent)do b+=a.offsetLeft,c+=a.offsetTop;while(a==a.offsetParent);return{left:b,top:c}},c.hasClass=function(a,c){return a?b()?a.classList.contains(c):a.className.match(new RegExp("(\\s|^)"+c+"(\\s|$)")):!1},c.addClass=function(a,c){return a?b()?void a.classList.add(c):void(""===a.className?a.className=c:this.hasClass(a,c)||(a.className+=" "+c)):void 0},c.removeClass=function(a,c){if(a){if(b())return void a.classList.remove(c);var d=new RegExp("(\\s|^)"+c+"(\\s|$)","g");a.className=a.className.replace(d,"")}},c.createOpt=function(a,b,c){var d=c?!0:!1,e=d?this.create("option",["value",b],["selected","true"]):this.create("option",["value",b]);return e.appendChild(this.text(a)),e},c.createCheckItem=function(a,b,c){var d=this.create("li"),e=this.create("label",["for",a]),f=this.create("input",["id",a],["name",a],["type","checkbox"],["value",b]);return e.appendChild(f),e.appendChild(this.text(c)),d.appendChild(e),d.label=e,d.check=f,d},c.id=function(a){return document.getElementById(a)},c.tag=function(a,b){return a.getElementsByTagName(b)},a.Dom=c}),define("string",["exports"],function(a){"use strict";var b={};b.lower=function(a){return a.toLowerCase()},b.upper=function(a){return a.toUpperCase()},b.trim=function(a){return a.trim?a.trim():a.replace(/^\s*|\s*$/g,"")},b.isEmpty=function(a){return""===this.trim(a)},b.rgxEsc=function(a){function b(b){var c=new RegExp("\\"+b,"g");a=a.replace(c,"\\"+b)}for(var c=["\\","[","^","$",".","|","?","*","+","(",")"],d=0;d<c.length;d++)b(c[d]);return a},b.matchCase=function(a,b){return b?a:this.lower(a)},a.Str=b}),define("cookie",["exports"],function(a){"use strict";var b={};b.write=function(a,b,c){var d="";c&&(d=new Date((new Date).getTime()+36e5*c),d="; expires="+d.toGMTString()),document.cookie=a+"="+escape(b)+d},b.read=function(a){var b="",c=a+"=";if(document.cookie.length>0){var d=document.cookie,e=d.indexOf(c);if(-1!==e){e+=c.length;var f=d.indexOf(";",e);-1===f&&(f=d.length),b=unescape(d.substring(e,f))}}return b},b.remove=function(a){this.write(a,"",-1)},b.valueToArray=function(a,b){b||(b=",");var c=this.read(a),d=c.split(b);return d},b.getValueByIndex=function(a,b,c){c||(c=",");var d=this.valueToArray(a,c);return d[b]},a.Cookie=b}),define("types",["exports"],function(a){"use strict";var b={},c=void 0;b.isObj=function(a){var b=!1;return"string"==typeof a?window[a]&&"object"==typeof window[a]&&(b=!0):a&&"object"==typeof a&&(b=!0),b},b.isFn=function(a){return a&&a.constructor==Function},b.isArray=function(a){return a&&a.constructor==Array},b.isUndef=function(a){return a===c},a.Types=b}),define("array",["exports","string"],function(a,b){"use strict";var c=b.Str,d={has:function(a,b,d){for(var e=void 0===d?!1:d,f=0;f<a.length;f++)if(c.matchCase(a[f].toString(),e)==b)return!0;return!1},indexByValue:function(a,b,d){for(var e=void 0===d?!1:d,f=0;f<a.length;f++)if(c.matchCase(a[f].toString(),e)==b)return f;return-1}};a.Arr=d}),define("helpers",["exports","string"],function(a,b){"use strict";var c=b.Str,d={isIE:function(){return/msie|MSIE/.test(navigator.userAgent)},removeNbFormat:function(a,b){if(a){b||(b="us");var d=a;return d="us"===c.lower(b)?+d.replace(/[^\d\.-]/g,""):+d.replace(/[^\d\,-]/g,"").replace(",",".")}}};a.Helpers=d}),define("date",["exports"],function(a){"use strict";var b={isValid:function(a,b){if(b||(b="DMY"),b=b.toUpperCase(),3!=b.length&&"DDMMMYYYY"===b){var c=this.format(a,b);a=c.getDate()+"/"+(c.getMonth()+1)+"/"+c.getFullYear(),b="DMY"}(-1===b.indexOf("M")||-1===b.indexOf("D")||-1===b.indexOf("Y"))&&(b="DMY");var d,e;if("Y"==b.substring(0,1)?(d=/^\d{2}(\-|\/|\.)\d{1,2}\1\d{1,2}$/,e=/^\d{4}(\-|\/|\.)\d{1,2}\1\d{1,2}$/):"Y"==b.substring(1,2)?(d=/^\d{1,2}(\-|\/|\.)\d{2}\1\d{1,2}$/,e=/^\d{1,2}(\-|\/|\.)\d{4}\1\d{1,2}$/):(d=/^\d{1,2}(\-|\/|\.)\d{1,2}\1\d{2}$/,e=/^\d{1,2}(\-|\/|\.)\d{1,2}\1\d{4}$/),d.test(a)===!1&&e.test(a)===!1)return!1;var f,g,h,i=a.split(RegExp.$1);f="M"===b.substring(0,1)?i[0]:"M"===b.substring(1,2)?i[1]:i[2],g="D"===b.substring(0,1)?i[0]:"D"===b.substring(1,2)?i[1]:i[2],h="Y"===b.substring(0,1)?i[0]:"Y"===b.substring(1,2)?i[1]:i[2],parseInt(h,10)<=50&&(h=(parseInt(h,10)+2e3).toString()),parseInt(h,10)<=99&&(h=(parseInt(h,10)+1900).toString());var j=new Date(parseInt(h,10),parseInt(f,10)-1,parseInt(g,10),0,0,0,0);return parseInt(g,10)!=j.getDate()?!1:parseInt(f,10)-1!=j.getMonth()?!1:!0},format:function(a){var b=function(b,c){return a.apply(this,arguments)};return b.toString=function(){return a.toString()},b}(function(a,b){function c(a){if(void 0===a)return 0;if(a.length>2)return a;var b;return 99>=a&&a>50&&(b="19"+a),(50>a||"00"===a)&&(b="20"+a),b}function d(a){if(void 0===a)return 0;for(var b,c=["january","february","march","april","may","june","july","august","september","october","november","december","jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec"],d=0;d<c.length;d++){var e=c[d];if(a.toLowerCase()===e){b=d+1;break}}return(b>11||23>b)&&(b-=12),1>b||b>12?0:b}if(b||(b="DMY"),!a||""===a)return new Date(1001,0,1);var e,f;switch(b.toUpperCase()){case"DDMMMYYYY":f=a.replace(/[- \/.]/g," ").split(" "),e=new Date(c(f[2]),d(f[1])-1,f[0]);break;case"DMY":f=a.replace(/^(0?[1-9]|[12][0-9]|3[01])([- \/.])(0?[1-9]|1[012])([- \/.])((\d\d)?\d\d)$/,"$1 $3 $5").split(" "),e=new Date(c(f[2]),f[1]-1,f[0]);break;case"MDY":f=a.replace(/^(0?[1-9]|1[012])([- \/.])(0?[1-9]|[12][0-9]|3[01])([- \/.])((\d\d)?\d\d)$/,"$1 $3 $5").split(" "),e=new Date(c(f[2]),f[0]-1,f[1]);break;case"YMD":f=a.replace(/^((\d\d)?\d\d)([- \/.])(0?[1-9]|1[012])([- \/.])(0?[1-9]|[12][0-9]|3[01])$/,"$1 $4 $6").split(" "),e=new Date(c(f[0]),f[1]-1,f[2]);break;default:f=a.replace(/^(0?[1-9]|[12][0-9]|3[01])([- \/.])(0?[1-9]|1[012])([- \/.])((\d\d)?\d\d)$/,"$1 $3 $5").split(" "),e=new Date(c(f[2]),f[1]-1,f[0])}return e})};a.DateHelper=b}),define("sort",["exports","string"],function(a,b){"use strict";var c=b.Str,d={ignoreCase:function(a,b){var d=c.lower(a),e=c.lower(b);return e>d?-1:d>e?1:0}};a.Sort=d}),define("modules/store",["exports","../cookie"],function(a,b){"use strict";var c=function(){function a(a,b){for(var c in b){var d=b[c];d.configurable=!0,d.value&&(d.writable=!0)}Object.defineProperties(a,b)}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),d=function(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")};Object.defineProperty(a,"__esModule",{value:!0});{var e=b.Cookie;a.Store=function(){function a(b){d(this,a);var c=b.config();this.duration=isNaN(c.set_cookie_duration)?1e5:parseInt(c.set_cookie_duration,10),this.tf=b}return c(a,{saveFilterValues:{value:function(a){for(var b=this.tf,c=[],d=0;d<b.fltIds.length;d++){var f=b.getFilterValue(d);""===f&&(f=" "),c.push(f)}c.push(b.fltIds.length),e.write(a,c.join(b.separator),this.duration)}},getFilterValues:{value:function(a){var b=e.read(a),c=new RegExp(this.tf.separator,"g");return b.split(c)}},savePageNb:{value:function(a){e.write(a,this.tf.Cpt.paging.currentPageNb,this.duration)}},getPageNb:{value:function(a){return e.read(a)}},savePageLength:{value:function(a){e.write(a,this.tf.Cpt.paging.resultsPerPageSlc.selectedIndex,this.duration)}},getPageLength:{value:function(a){return e.read(a)}}}),a}()}}),define("modules/gridLayout",["exports","../dom","../types","../helpers","../event"],function(a,b,c,d,e){"use strict";var f=function(){function a(a,b){for(var c in b){var d=b[c];d.configurable=!0,d.value&&(d.writable=!0)}Object.defineProperties(a,b)}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),g=function(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")};Object.defineProperty(a,"__esModule",{value:!0});{var h=b.Dom,i=c.Types,j=(d.Helpers,e.Event);a.GridLayout=function(){function a(b){g(this,a);var c=b.config();this.gridWidth=c.grid_width||null,this.gridHeight=c.grid_height||null,this.gridMainContCssClass=c.grid_cont_css_class||"grd_Cont",this.gridContCssClass=c.grid_tbl_cont_css_class||"grd_tblCont",this.gridHeadContCssClass=c.grid_tblHead_cont_css_class||"grd_headTblCont",this.gridInfDivCssClass=c.grid_inf_grid_css_class||"grd_inf",this.gridHeadRowIndex=c.grid_headers_row_index||0,this.gridHeadRows=c.grid_headers_rows||[0],this.gridEnableFilters=void 0!==c.grid_enable_default_filters?c.grid_enable_default_filters:!0,this.gridDefaultColWidth=c.grid_default_col_width||"100px",this.gridEnableColResizer=void 0!==c.grid_enable_cols_resizer?c.grid_enable_cols_resizer:!1,this.gridColResizerPath=c.grid_cont_col_resizer_path||this.basePath+"TFExt_ColsResizer/TFExt_ColsResizer.js",this.gridColElms=[],this.prfxMainTblCont="gridCont_",this.prfxTblCont="tblCont_",this.prfxHeadTblCont="tblHeadCont_",this.prfxHeadTbl="tblHead_",this.prfxGridFltTd="_td_",this.prfxGridTh="tblHeadTh_",this.tf=b}return f(a,{init:{value:function(){var a=this,b=this.tf,c=b.config(),d=b.tbl;if(b.gridLayout){if(b.isExternalFlt=!0,!b.hasColWidth){b.colWidth=[];for(var e=0;e<b.nbCells;e++){var f,g=d.rows[this.gridHeadRowIndex].cells[e];f=""!==g.width?g.width:""!==g.style.width?parseInt(g.style.width,10):this.gridDefaultColWidth,b.colWidth[e]=f}b.hasColWidth=!0}b.setColWidths(this.gridHeadRowIndex);var k;k=""!==d.width?d.width:""!==d.style.width?parseInt(d.style.width,10):d.clientWidth,this.tblMainCont=h.create("div",["id",this.prfxMainTblCont+b.id]),this.tblMainCont.className=this.gridMainContCssClass,this.gridWidth&&(this.tblMainCont.style.width=this.gridWidth),d.parentNode.insertBefore(this.tblMainCont,d),this.tblCont=h.create("div",["id",this.prfxTblCont+b.id]),this.tblCont.className=this.gridContCssClass,this.gridWidth&&(this.tblCont.style.width=this.gridWidth),this.gridHeight&&(this.tblCont.style.height=this.gridHeight),d.parentNode.insertBefore(this.tblCont,d);var l=d.parentNode.removeChild(d);this.tblCont.appendChild(l),""===d.style.width&&(d.style.width=(b._containsStr("%",k)?d.clientWidth:k)+"px");var m=this.tblCont.parentNode.removeChild(this.tblCont);this.tblMainCont.appendChild(m),this.headTblCont=h.create("div",["id",this.prfxHeadTblCont+b.id]),this.headTblCont.className=this.gridHeadContCssClass,this.gridWidth&&(this.headTblCont.style.width=this.gridWidth),this.headTbl=h.create("table",["id",this.prfxHeadTbl+b.id]);for(var n=h.create("tHead"),p=d.rows[this.gridHeadRowIndex],q=[],r=0;r<b.nbCells;r++){var s=p.cells[r],t=s.getAttribute("id");t&&""!==t||(t=this.prfxGridTh+r+"_"+b.id,s.setAttribute("id",t)),q.push(t)}var u=h.create("tr");if(this.gridEnableFilters&&b.fltGrid){b.externalFltTgtIds=[];for(var v=0;v<b.nbCells;v++){var w=b.prfxFlt+v+this.prfxGridFltTd+b.id,x=h.create(b.fltCellTag,["id",w]);u.appendChild(x),b.externalFltTgtIds[v]=w}}for(var y=0;y<this.gridHeadRows.length;y++){var z=d.rows[this.gridHeadRows[0]];n.appendChild(z)}this.headTbl.appendChild(n),0===b.filtersRowIndex?n.insertBefore(u,p):n.appendChild(u),this.headTblCont.appendChild(this.headTbl),this.tblCont.parentNode.insertBefore(this.headTblCont,this.tblCont);var A=h.tag(d,"thead");A.length>0&&d.removeChild(A[0]),this.headTbl.style.tableLayout="fixed",d.style.tableLayout="fixed",this.headTbl.cellPadding=d.cellPadding,this.headTbl.cellSpacing=d.cellSpacing,b.setColWidths(),this.headTblCont.style.width=this.tblCont.clientWidth+"px",d.style.width="",this.headTbl.style.width=d.clientWidth+"px",j.add(this.tblCont,"scroll",function(b){var c=j.target(b),d=c.scrollLeft;a.headTblCont.scrollLeft=d}),c.sort!==!1&&(b.sort=!0,b.sortConfig.asyncSort=!0,b.sortConfig.triggerIds=q),this.gridEnableColResizer&&(b.hasExtensions?b._containsStr("colsresizer",Str.lower(b.extensions.src.toString()))||(b.extensions.name.push("ColumnsResizer_"+b.id),b.extensions.src.push(b.gridColResizerPath),b.extensions.description.push("Columns Resizing"),b.extensions.initialize.push(function(a){a.SetColsResizer("ColumnsResizer_"+a.id)})):(b.extensions={name:["ColumnsResizer_"+b.id],src:[this.gridColResizerPath],description:["Columns Resizing"],initialize:[function(a){a.SetColsResizer("ColumnsResizer_"+a.id)}]},b.hasExtensions=!0)),c.col_resizer_cols_headers_table=this.headTbl.getAttribute("id"),c.col_resizer_cols_headers_index=this.gridHeadRowIndex,c.col_resizer_width_adjustment=0,c.col_enable_text_ellipsis=!1,this.tblHasColTag=h.tag(d,"col").length>0?!0:!1;var B=function(a){if(a){for(var c=b.nbCells-1;c>=0;c--){var e=h.create("col",["id",b.id+"_col_"+c]);d.firstChild.parentNode.insertBefore(e,d.firstChild),e.style.width=b.colWidth[c],a.gridColElms[c]=e}a.tblHasColTag=!0}};if(this.tblHasColTag)for(var C=h.tag(d,"col"),D=0;D<b.nbCells;D++)C[D].setAttribute("id",b.id+"_col_"+D),C[D].style.width=b.colWidth[D],o.gridColElms.push(C[D]);else B(this);var E=i.isFn(c.on_after_col_resized)?c.on_after_col_resized:null;c.on_after_col_resized=function(a,b){if(b){var c=a.crWColsRow.cells[b].style.width,e=a.gridColElms[b];e.style.width=c;var f=a.crWColsRow.cells[b].clientWidth,g=a.crWRowDataTbl.cells[b].clientWidth;f!=g&&(a.headTbl.style.width=d.clientWidth+"px"),E&&E.call(null,a,b)}},d.clientWidth!==this.headTbl.clientWidth&&(d.style.width=this.headTbl.clientWidth+"px")}}},destroy:{value:function(){var a=this.tf,b=a.tbl;if(a.gridLayout){var c=b.parentNode.removeChild(b);this.tblMainCont.parentNode.insertBefore(c,this.tblMainCont),this.tblMainCont.parentNode.removeChild(this.tblMainCont),this.tblMainCont=null,this.headTblCont=null,this.headTbl=null,this.tblCont=null,b.outerHTML=a.sourceTblHtml,b=h.id(a.id)}}}}),a}()}}),define("modules/loader",["exports","../dom","../types"],function(a,b,c){"use strict";var d=function(){function a(a,b){for(var c in b){var d=b[c];d.configurable=!0,d.value&&(d.writable=!0)}Object.defineProperties(a,b)}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),e=function(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")};Object.defineProperty(a,"__esModule",{value:!0});{var f=b.Dom,g=c.Types,h=window;a.Loader=function(){function a(b){e(this,a);var c=b.config();this.loaderTgtId=c.loader_target_id||null,this.loaderDiv=null,this.loaderText=c.loader_text||"Loading...",this.loaderHtml=c.loader_html||null,this.loaderCssClass=c.loader_css_class||"loader",this.loaderCloseDelay=200,this.onShowLoader=g.isFn(c.on_show_loader)?c.on_show_loader:null,this.onHideLoader=g.isFn(c.on_hide_loader)?c.on_hide_loader:null,this.prfxLoader="load_",this.tf=b;var d=f.create("div",["id",this.prfxLoader+b.id]);d.className=this.loaderCssClass;var h=this.loaderTgtId?f.id(this.loaderTgtId):b.tbl.parentNode;this.loaderTgtId?h.appendChild(d):h.insertBefore(d,b.tbl),this.loaderDiv=f.id(this.prfxLoader+b.id),this.loaderHtml?this.loaderDiv.innerHTML=this.loaderHtml:this.loaderDiv.appendChild(f.text(this.loaderText))}return d(a,{show:{value:function(a){var b=this;if(this.tf.loader&&this.loaderDiv&&this.loaderDiv.style.display!==a){var c=function(){b.loaderDiv&&(b.onShowLoader&&"none"!==a&&b.onShowLoader.call(null,b),b.loaderDiv.style.display=a,b.onHideLoader&&"none"===a&&b.onHideLoader.call(null,b))},d="none"===a?this.loaderCloseDelay:1;h.setTimeout(c,d)}}},remove:{value:function(){if(this.loaderDiv){var a=this.tf,b=this.loaderTgtId?f.id(this.loaderTgtId):a.gridLayout?a.Cpt.gridLayout.tblCont:a.tbl.parentNode;b.removeChild(this.loaderDiv),this.loaderDiv=null}}}}),a}()}}),define("modules/highlightKeywords",["exports","../dom","../string"],function(a,b,c){"use strict";var d=function(){function a(a,b){for(var c in b){var d=b[c];d.configurable=!0,d.value&&(d.writable=!0)}Object.defineProperties(a,b)}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),e=function(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")};Object.defineProperty(a,"__esModule",{value:!0});{var f=b.Dom,g=c.Str;a.HighlightKeyword=function(){function a(b){e(this,a);var c=b.config();this.highlightCssClass=c.highlight_css_class||"keyword",this.highlightedNodes=[],this.tf=b}return d(a,{highlight:{value:function(a,b,c){if(a.hasChildNodes)for(var d=a.childNodes,e=0;e<d.length;e++)this.highlight(d[e],b,c);if(3===a.nodeType){var h=g.lower(a.nodeValue),i=g.lower(b);if(-1!=h.indexOf(i)){var j=a.parentNode;if(j&&j.className!=c){var k=a.nodeValue,l=h.indexOf(i),m=f.text(k.substr(0,l)),n=k.substr(l,b.length),o=f.text(k.substr(l+b.length)),p=f.text(n),q=f.create("span");q.className=c,q.appendChild(p),j.insertBefore(m,a),j.insertBefore(q,a),j.insertBefore(o,a),j.removeChild(a),this.highlightedNodes.push(q.firstChild)}}}}},unhighlight:{value:function(a,b){for(var c=[],d=this.highlightedNodes,e=0;e<d.length;e++){var f=d[e];if(f){var h=g.lower(f.nodeValue),i=g.lower(a);if(-1!==h.indexOf(i)){var j=f.parentNode;if(j&&j.className===b){var k=j.previousSibling,l=j.nextSibling;if(!k||!l)continue;l.nodeValue=k.nodeValue+f.nodeValue+l.nodeValue,k.nodeValue="",f.nodeValue="",c.push(e)}}}}for(var m=0;m<c.length;m++)d.splice(c[m],1)}},unhighlightAll:{value:function(){if(this.tf.highlightKeywords&&this.tf.searchArgs){for(var a=0;a<this.tf.searchArgs.length;a++)this.unhighlight(this.tf.searchArgs[a],this.highlightCssClass);this.highlightedNodes=[]}}}}),a}()}}),define("modules/popupFilter",["exports","../types","../dom","../event","../helpers"],function(a,b,c,d,e){"use strict";var f=function(){function a(a,b){for(var c in b){var d=b[c];d.configurable=!0,d.value&&(d.writable=!0)}Object.defineProperties(a,b)}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),g=function(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")};Object.defineProperty(a,"__esModule",{value:!0});{var h=b.Types,i=c.Dom,j=d.Event,k=e.Helpers;a.PopupFilter=function(){function a(b){g(this,a);var c=b.config();b.isExternalFlt=!0,b.externalFltTgtIds=[],this.popUpImgFlt=c.popup_filters_image||b.themesPath+"icn_filter.gif",this.popUpImgFltActive=c.popup_filters_image_active||b.themesPath+"icn_filterActive.gif",this.popUpImgFltHtml=c.popup_filters_image_html||'<img src="'+this.popUpImgFlt+'" alt="Column filter" />',this.popUpDivCssClass=c.popup_div_css_class||"popUpFilter",this.onBeforePopUpOpen=h.isFn(c.on_before_popup_filter_open)?c.on_before_popup_filter_open:null,this.onAfterPopUpOpen=h.isFn(c.on_after_popup_filter_open)?c.on_after_popup_filter_open:null,this.onBeforePopUpClose=h.isFn(c.on_before_popup_filter_close)?c.on_before_popup_filter_close:null,this.onAfterPopUpClose=h.isFn(c.on_after_popup_filter_close)?c.on_after_popup_filter_close:null,this.popUpFltSpans=[],this.popUpFltImgs=[],this.popUpFltElms=this.popUpFltElmCache||[],this.popUpFltAdjustToContainer=!0,this.prfxPopUpSpan="popUpSpan_",this.prfxPopUpDiv="popUpDiv_",this.tf=b}return f(a,{onClick:{value:function(a){var b=a||global.event,c=b.target.parentNode,d=parseInt(c.getAttribute("ci"),10);if(this.closeAll(d),this.toggle(d),this.popUpFltAdjustToContainer){var e=this.popUpFltElms[d],f=this.tf.getHeaderElement(d),g=.95*f.clientWidth;if(k.isIE()){var h=i.position(f).left;e.style.left=h+"px"}e.style.width=parseInt(g,10)+"px"}j.cancel(b),j.stop(b)}},init:{value:function(){for(var a=this,b=this.tf,c=0;c<b.nbCells;c++)if(b["col"+c]!==b.fltTypeNone){var d=i.create("span",["id",this.prfxPopUpSpan+b.id+"_"+c],["ci",c]);d.innerHTML=this.popUpImgFltHtml;var e=b.getHeaderElement(c);e.appendChild(d),j.add(d,"click",function(b){a.onClick(b)}),this.popUpFltSpans[c]=d,this.popUpFltImgs[c]=d.firstChild}}},buildAll:{value:function(){for(var a=0;a<this.popUpFltElmCache.length;a++)this.build(a,this.popUpFltElmCache[a])}},build:{value:function(a,b){var c=this.tf,d=b?b:i.create("div",["id",this.prfxPopUpDiv+c.id+"_"+a]);d.className=this.popUpDivCssClass,c.externalFltTgtIds.push(d.id);var e=c.getHeaderElement(a);e.insertBefore(d,e.firstChild),j.add(d,"click",function(a){j.stop(a)}),this.popUpFltElms[a]=d}},toggle:{value:function(a){var b=this.tf,c=this.popUpFltElms[a];if("none"===c.style.display||""===c.style.display){if(this.onBeforePopUpOpen&&this.onBeforePopUpOpen.call(null,this,this.popUpFltElms[a],a),c.style.display="block",b["col"+a]===b.fltTypeInp){var d=b.getFilterElement(a);d&&d.focus()}this.onAfterPopUpOpen&&this.onAfterPopUpOpen.call(null,this,this.popUpFltElms[a],a)}else this.onBeforePopUpClose&&this.onBeforePopUpClose.call(null,this,this.popUpFltElms[a],a),c.style.display="none",this.onAfterPopUpClose&&this.onAfterPopUpClose.call(null,this,this.popUpFltElms[a],a)}},closeAll:{value:function(a){for(var b=0;b<this.popUpFltElms.length;b++)if(b!==a){var c=this.popUpFltElms[b];c&&(c.style.display="none")}}},buildIcons:{value:function(){for(var a=0;a<this.popUpFltImgs.length;a++)this.buildIcon(a,!1)}},buildIcon:{value:function(a,b){h.isUndef(b)?!0:b;this.popUpFltImgs[a]&&(this.popUpFltImgs[a].src=b?this.popUpImgFltActive:this.popUpImgFlt)}},destroy:{value:function(){this.popUpFltElmCache=[];for(var a=0;a<this.popUpFltElms.length;a++){var b=this.popUpFltElms[a],c=this.popUpFltSpans[a],d=this.popUpFltImgs[a];b&&(b.parentNode.removeChild(b),this.popUpFltElmCache[a]=b),b=null,c&&c.parentNode.removeChild(c),c=null,d&&d.parentNode.removeChild(d),d=null}this.popUpFltElms=[],this.popUpFltSpans=[],this.popUpFltImgs=[]}}}),a}()}}),define("modules/dropdown",["exports","../dom","../array","../string","../sort"],function(a,b,c,d,e){"use strict";var f=function(){function a(a,b){for(var c in b){var d=b[c];d.configurable=!0,d.value&&(d.writable=!0)}Object.defineProperties(a,b)}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),g=function(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")};Object.defineProperty(a,"__esModule",{value:!0});{var h=b.Dom,i=c.Arr,j=d.Str,k=e.Sort;a.Dropdown=function(){function a(b){g(this,a);var c=b.config();this.enableSlcResetFilter=c.enable_slc_reset_filter?!1:!0,this.nonEmptyText=c.non_empty_text||"(Non empty)",this.slcFillingMethod=c.slc_filling_method||"createElement",this.activateSlcTooltip=c.activate_slc_tooltip||"Click to activate",this.multipleSlcTooltip=c.multiple_slc_tooltip||"Use Ctrl key for multiple selections",this.isCustom=null,this.opts=null,this.optsTxt=null,this.slcInnerHtml=null,this.tf=b}return f(a,{build:{value:function(a,b,c,d){var e=this.tf;e.EvtManager(e.Evt.name.dropdown,{slcIndex:a,slcRefreshed:b,slcExternal:c,slcId:d})}},_build:{value:function(a){var b=void 0===arguments[1]?!1:arguments[1],c=void 0===arguments[2]?!1:arguments[2],d=void 0===arguments[3]?null:arguments[3],e=this.tf;a=parseInt(a,10),this.opts=[],this.optsTxt=[],this.slcInnerHtml="";var f=e.fltIds[a];if((h.id(f)||c)&&(h.id(d)||!c)){{var g=h.id(c?d:f),l=e.tbl.rows,m=e.matchCase;j.lower(this.slcFillingMethod)}this.isCustom=e.hasCustomSlcOptions&&i.has(e.customSlcOptions.cols,a);var n;b&&e.activeFilterId&&(n=e.activeFilterId.split("_")[0],n=n.split(e.prfxFlt)[1]);var o=[],p=[];e.rememberGridValues&&(o=e.Cpt.store.getFilterValues(e.fltsValuesCookie),o&&!j.isEmpty(o.toString())&&(this.isCustom?p.push(o[a]):p=o[a].split(" "+e.orOperator+" ")));var q=null,r=null;b&&e.disableExcludedOptions&&(q=[],r=[]);for(var s=e.refRow;s<e.nbRows;s++)if(!e.hasVisibleRows||!i.has(e.visibleRows,s)||e.paging){var t=l[s].cells,u=t.length;if(u===e.nbCells&&!this.isCustom)for(var v=0;u>v;v++)if(a===v&&(!b||b&&e.disableExcludedOptions)||a==v&&b&&(""===l[s].style.display&&!e.paging||e.paging&&(!e.validRowsIndex||e.validRowsIndex&&i.has(e.validRowsIndex,s))&&(void 0===n||n==a||n!=a&&i.has(e.validRowsIndex,s)))){var w=e.getCellData(v,t[v]),x=j.matchCase(w,m);if(i.has(this.opts,x,m)||this.opts.push(w),b&&e.disableExcludedOptions){var y=r[v];y||(y=this.GetFilteredDataCol(v)),i.has(y,x,m)||i.has(q,x,m)||this.isFirstLoad||q.push(w)}}}if(this.isCustom){var z=e.__getCustomValues(a);this.opts=z[0],this.optsTxt=z[1]}if(e.sortSlc&&!this.isCustom&&(m?(this.opts.sort(),q&&q.sort()):(this.opts.sort(k.ignoreCase),q&&q.sort(k.ignoreCase))),e.sortNumAsc&&i.has(e.sortNumAsc,a))try{this.opts.sort(numSortAsc),q&&q.sort(numSortAsc),this.isCustom&&this.optsTxt.sort(numSortAsc)}catch(A){this.opts.sort(),q&&q.sort(),this.isCustom&&this.optsTxt.sort()}if(e.sortNumDesc&&i.has(e.sortNumDesc,a))try{this.opts.sort(numSortDesc),q&&q.sort(numSortDesc),this.isCustom&&this.optsTxt.sort(numSortDesc)}catch(A){this.opts.sort(),q&&q.sort(),this.isCustom&&this.optsTxt.sort()}this.addOptions(a,g,b,q,o,p)}}},addOptions:{value:function(a,b,c,d,e,f){var g=this.tf,k=j.lower(this.slcFillingMethod),l=b.value;b.innerHTML="",b=this.addFirstOption(b);for(var m=0;m<this.opts.length;m++)if(""!==this.opts[m]){var n=this.opts[m],o=this.isCustom?this.optsTxt[m]:n,p=!1;if(c&&this.disableExcludedOptions&&i.has(d,j.matchCase(n,g.matchCase),g.matchCase)&&(p=!0),"innerhtml"===k){var q="";g.fillSlcOnDemand&&l===this.opts[m]&&(q='selected="selected"'),this.slcInnerHtml+='<option value="'+n+'" '+q+(p?'disabled="disabled"':"")+">"+o+"</option>"}else{var r;r=g.fillSlcOnDemand&&l===this.opts[m]&&g["col"+a]===g.fltTypeSlc?h.createOpt(o,n,!0):g["col"+a]!==g.fltTypeMulti?h.createOpt(o,n," "!==e[a]&&n===e[a]?!0:!1):h.createOpt(o,n,i.has(f,j.matchCase(this.opts[m],g.matchCase),g.matchCase)||-1!==f.toString().indexOf(n)?!0:!1),p&&(r.disabled=!0),b.appendChild(r)}}"innerhtml"===k&&(b.innerHTML+=this.slcInnerHtml),b.setAttribute("filled","1")}},addFirstOption:{value:function(a){var b=this.tf,c=j.lower(this.slcFillingMethod);if("innerhtml"===c)this.slcInnerHtml+='<option value="">'+b.displayAllText+"</option>";else{var d=h.createOpt(this.enableSlcResetFilter?b.displayAllText:"","");if(this.enableSlcResetFilter||(d.style.display="none"),a.appendChild(d),b.enableEmptyOption){var e=h.createOpt(b.emptyText,b.emOperator);a.appendChild(e)}if(b.enableNonEmptyOption){var f=h.createOpt(b.nonEmptyText,b.nmOperator);a.appendChild(f)}}return a}}}),a}()}}),define("modules/checkList",["exports","../dom","../array","../string","../sort","../event"],function(a,b,c,d,e,f){"use strict";var g=function(){function a(a,b){for(var c in b){var d=b[c];d.configurable=!0,d.value&&(d.writable=!0)}Object.defineProperties(a,b)}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),h=function(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")};Object.defineProperty(a,"__esModule",{value:!0});{var i=b.Dom,j=c.Arr,k=d.Str,l=e.Sort,m=f.Event;a.CheckList=function(){function a(b){h(this,a);var c=b.config();this.checkListDiv=[],this.checkListDivCssClass=c.div_checklist_css_class||"div_checklist",this.checkListCssClass=c.checklist_css_class||"flt_checklist",this.checkListItemCssClass=c.checklist_item_css_class||"flt_checklist_item",this.checkListSlcItemCssClass=c.checklist_selected_item_css_class||"flt_checklist_slc_item",this.activateCheckListTxt=c.activate_checklist_text||"Click to load filter data",this.checkListItemDisabledCssClass=c.checklist_item_disabled_css_class||"flt_checklist_item_disabled",this.enableCheckListResetFilter=c.enable_checklist_reset_filter===!1?!1:!0,this.prfxCheckListDiv="chkdiv_",this.isCustom=null,this.opts=null,this.optsTxt=null,this.tf=b}return g(a,{onChange:{value:function(a){this.tf.Evt.onSlcChange(a)}},optionClick:{value:function(a){this.setCheckListValues(a.target),this.onChange(a)}},build:{value:function(a,b,c){var d=this.tf;d.EvtManager(d.Evt.name.checklist,{slcIndex:a,slcExternal:b,slcId:c})}},_build:{value:function(a){var b=this,c=void 0===arguments[1]?!1:arguments[1],d=void 0===arguments[2]?null:arguments[2],e=this.tf;a=parseInt(a,10),this.opts=[],this.optsTxt=[];var f=this.prfxCheckListDiv+a+"_"+e.id;if((i.id(f)||c)&&(i.id(d)||!c)){var g=c?i.id(d):this.checkListDiv[a],h=i.create("ul",["id",e.fltIds[a]],["colIndex",a]);
h.className=this.checkListCssClass,m.add(h,"change",function(a){b.onChange(a)});var n=e.tbl.rows;this.isCustom=e.hasCustomSlcOptions&&j.has(e.customSlcOptions.cols,a);var o;e.refreshFilters&&e.activeFilterId&&(o=e.activeFilterId.split("_")[0],o=o.split(e.prfxFlt)[1]);var p,q=[];e.refreshFilters&&e.disableExcludedOptions&&(p=[]);for(var r=e.refRow;r<e.nbRows;r++)if(!e.hasVisibleRows||!j.has(e.visibleRows,r)||e.paging){var s=n[r].cells,t=s.length;if(t===e.nbCells&&!this.isCustom)for(var u=0;t>u;u++)if(a===u&&(!e.refreshFilters||e.refreshFilters&&e.disableExcludedOptions)||a===u&&e.refreshFilters&&(""===n[r].style.display&&!e.paging||e.paging&&(!o||o===a||o!=a&&j.has(e.validRowsIndex,r)))){var v=e.getCellData(u,s[u]),w=k.matchCase(v,e.matchCase);j.has(this.opts,w,e.matchCase)||this.opts.push(v);var x=q[u];e.refreshFilters&&e.disableExcludedOptions&&(x||(q[u]=e.GetFilteredDataCol(u)),j.has(x,w,e.matchCase)||j.has(p,w,e.matchCase)||e.isFirstLoad||p.push(v))}}if(this.isCustom){var y=e.__getCustomValues(a);this.opts=y[0],this.optsTxt=y[1]}if(e.sortSlc&&!this.isCustom&&(e.matchCase?(this.opts.sort(),p&&p.sort()):(this.opts.sort(l.ignoreCase),p&&p.sort(l.ignoreCase))),e.sortNumAsc&&j.has(e.sortNumAsc,a))try{this.opts.sort(numSortAsc),p&&p.sort(numSortAsc),this.isCustom&&this.optsTxt.sort(numSortAsc)}catch(z){this.opts.sort(),p&&p.sort(),this.isCustom&&this.optsTxt.sort()}if(e.sortNumDesc&&j.has(e.sortNumDesc,a))try{this.opts.sort(numSortDesc),p&&p.sort(numSortDesc),this.isCustom&&this.optsTxt.sort(numSortDesc)}catch(z){this.opts.sort(),p&&p.sort(),this.isCustom&&this.optsTxt.sort()}this.addChecks(a,h,e.separator),e.fillSlcOnDemand&&(g.innerHTML=""),g.appendChild(h),g.setAttribute("filled","1")}}},addChecks:{value:function(a,b,c){var d=this,e=this.tf,f=this.addTChecks(a,b),g=[],h=e.Cpt.store,l=h?h.getFilterValues(e.fltsValuesCookie)[a]:null;l&&k.trim(l).length>0&&(e.hasCustomSlcOptions&&j.has(e.customSlcOptions.cols,a)?g.push(l):g=l.split(" "+e.orOperator+" "));for(var n=0;n<this.opts.length;n++){var o=this.opts[n],p=this.isCustom?this.optsTxt[n]:o,q=i.createCheckItem(e.fltIds[a]+"_"+(n+f),o,p);q.className=this.checkListItemCssClass,e.refreshFilters&&e.disableExcludedOptions&&j.has(excludedOpts,k.matchCase(o,e.matchCase),e.matchCase)?(i.addClass(q,this.checkListItemDisabledCssClass),q.check.disabled=!0,q.disabled=!0):m.add(q.check,"click",function(a){d.optionClick(a)}),b.appendChild(q),""===o&&(q.style.display="none"),e.rememberGridValues&&(e.hasCustomSlcOptions&&j.has(e.customSlcOptions.cols,a)&&-1!=g.toString().indexOf(o)||j.has(g,k.matchCase(o,e.matchCase),e.matchCase))&&(q.check.checked=!0,this.setCheckListValues(q.check))}}},addTChecks:{value:function(a,b){var c=this,d=this.tf,e=1,f=i.createCheckItem(d.fltIds[a]+"_0","",d.displayAllText);if(f.className=this.checkListItemCssClass,b.appendChild(f),m.add(f.check,"click",function(a){c.optionClick(a)}),this.enableCheckListResetFilter||(f.style.display="none"),d.enableEmptyOption){var g=i.createCheckItem(d.fltIds[a]+"_1",d.emOperator,d.emptyText);g.className=this.checkListItemCssClass,b.appendChild(g),m.add(g.check,"click",function(a){c.optionClick(a)}),e++}if(d.enableNonEmptyOption){var h=i.createCheckItem(d.fltIds[a]+"_2",d.nmOperator,d.nonEmptyText);h.className=this.checkListItemCssClass,b.appendChild(h),m.add(h.check,"click",function(a){c.optionClick(a)}),e++}return e}},setCheckListValues:{value:function(a){if(a){for(var b=this.tf,c=a.value,d=parseInt(a.id.split("_")[2],10),e="ul",f="li",g=a;k.lower(g.nodeName)!==e;)g=g.parentNode;var h=g.childNodes[d],j=g.getAttribute("colIndex"),l=g.getAttribute("value"),m=g.getAttribute("indexes");if(a.checked){if(""===c){if(m&&""!==m)for(var n=m.split(b.separator),o=0;o<n.length;o++){var p=i.id(b.fltIds[j]+"_"+n[o]);p&&(p.checked=!1,i.removeClass(g.childNodes[n[o]],this.checkListSlcItemCssClass))}g.setAttribute("value",""),g.setAttribute("indexes","")}else l=l?l:"",c=k.trim(l+" "+c+" "+b.orOperator),d=m+d+b.separator,g.setAttribute("value",c),g.setAttribute("indexes",d),i.id(b.fltIds[j]+"_0")&&(i.id(b.fltIds[j]+"_0").checked=!1);k.lower(h.nodeName)===f&&(i.removeClass(g.childNodes[0],this.checkListSlcItemCssClass),i.addClass(h,this.checkListSlcItemCssClass))}else{if(""!==c){var q=new RegExp(k.rgxEsc(c+" "+b.orOperator));l=l.replace(q,""),g.setAttribute("value",k.trim(l));var r=new RegExp(k.rgxEsc(d+b.separator));m=m.replace(r,""),g.setAttribute("indexes",m)}k.lower(h.nodeName)===f&&i.removeClass(h,this.checkListSlcItemCssClass)}}}}}),a}()}}),define("modules/rowsCounter",["exports","../dom","../types","../helpers"],function(a,b,c,d){"use strict";var e=function(){function a(a,b){for(var c in b){var d=b[c];d.configurable=!0,d.value&&(d.writable=!0)}Object.defineProperties(a,b)}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=function(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")};Object.defineProperty(a,"__esModule",{value:!0});{var g=b.Dom,h=c.Types,i=d.Helpers;a.RowsCounter=function(){function a(b){f(this,a);var c=b.config();this.rowsCounterTgtId=c.rows_counter_target_id||null,this.rowsCounterDiv=null,this.rowsCounterSpan=null,this.rowsCounterText=c.rows_counter_text||"Rows: ",this.fromToTextSeparator=c.from_to_text_separator||"-",this.overText=c.over_text||" / ",this.totRowsCssClass=c.tot_rows_css_class||"tot",this.prfxCounter="counter_",this.prfxTotRows="totrows_span_",this.prfxTotRowsTxt="totRowsTextSpan_",this.onBeforeRefreshCounter=h.isFn(c.on_before_refresh_counter)?c.on_before_refresh_counter:null,this.onAfterRefreshCounter=h.isFn(c.on_after_refresh_counter)?c.on_after_refresh_counter:null,this.tf=b}return e(a,{init:{value:function(){var a=this.tf;if((a.hasGrid()||a.isFirstLoad)&&!this.rowsCounterSpan){var b=g.create("div",["id",this.prfxCounter+a.id]);b.className=this.totRowsCssClass;var c=g.create("span",["id",this.prfxTotRows+a.id]),d=g.create("span",["id",this.prfxTotRowsTxt+a.id]);d.appendChild(g.text(this.rowsCounterText)),this.rowsCounterTgtId||a.setToolbar();var e=this.rowsCounterTgtId?g.id(this.rowsCounterTgtId):a.lDiv;this.rowsCounterDiv&&i.isIE()&&(this.rowsCounterDiv.outerHTML=""),this.rowsCounterTgtId?(e.appendChild(d),e.appendChild(c)):(b.appendChild(d),b.appendChild(c),e.appendChild(b)),this.rowsCounterDiv=b,this.rowsCounterSpan=c,this.refresh()}}},refresh:{value:function(a){if(this.rowsCounterSpan){var b=this.tf;this.onBeforeRefreshCounter&&this.onBeforeRefreshCounter.call(null,b,this.rowsCounterSpan);var c;if(b.paging){var d=b.Cpt.paging;if(d){var e=parseInt(d.startPagingRow,10)+(b.nbVisibleRows>0?1:0),f=e+d.pagingLength-1<=b.nbVisibleRows?e+d.pagingLength-1:b.nbVisibleRows;c=e+this.fromToTextSeparator+f+this.overText+b.nbVisibleRows}}else c=a&&""!==a?a:b.nbFilterableRows-b.nbHiddenRows-(b.hasVisibleRows?b.visibleRows.length:0);this.rowsCounterSpan.innerHTML=c,this.onAfterRefreshCounter&&this.onAfterRefreshCounter.call(null,b,this.rowsCounterSpan,c)}}},destroy:{value:function(){var a=this.tf;a.hasGrid()&&this.rowsCounterSpan&&(!this.rowsCounterTgtId&&this.rowsCounterDiv?i.isIE()?this.rowsCounterDiv.outerHTML="":this.rowsCounterDiv.parentNode.removeChild(this.rowsCounterDiv):g.id(this.rowsCounterTgtId).innerHTML="",this.rowsCounterSpan=null,this.rowsCounterDiv=null)}}}),a}()}}),define("modules/statusBar",["exports","../dom","../event","../types","../helpers"],function(a,b,c,d,e){"use strict";var f=function(){function a(a,b){for(var c in b){var d=b[c];d.configurable=!0,d.value&&(d.writable=!0)}Object.defineProperties(a,b)}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),g=function(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")};Object.defineProperty(a,"__esModule",{value:!0});{var h=b.Dom,i=(c.Event,d.Types),j=e.Helpers,k=window;a.StatusBar=function(){function a(b){g(this,a);var c=b.config();this.statusBarTgtId=c.status_bar_target_id||null,this.statusBarDiv=null,this.statusBarSpan=null,this.statusBarSpanText=null,this.statusBarText=c.status_bar_text||"",this.statusBarCssClass=c.status_bar_css_class||"status",this.statusBarCloseDelay=250,this.onBeforeShowMsg=i.isFn(c.on_before_show_msg)?c.on_before_show_msg:null,this.onAfterShowMsg=i.isFn(c.on_after_show_msg)?c.on_after_show_msg:null,this.prfxStatus="status_",this.prfxStatusSpan="statusSpan_",this.prfxStatusTxt="statusText_",this.tf=b}return f(a,{init:{value:function(){var a=this.tf;if(a.hasGrid()||a.isFirstLoad){var b=h.create("div",["id",this.prfxStatus+a.id]);b.className=this.statusBarCssClass;var c=h.create("span",["id",this.prfxStatusSpan+a.id]),d=h.create("span",["id",this.prfxStatusTxt+a.id]);d.appendChild(h.text(this.statusBarText)),this.statusBarTgtId||a.setToolbar();var e=this.statusBarTgtId?h.id(this.statusBarTgtId):a.lDiv;this.statusBarDiv&&j.isIE()&&(this.statusBarDiv.outerHTML=""),this.statusBarTgtId?(e.appendChild(d),e.appendChild(c)):(b.appendChild(d),b.appendChild(c),e.appendChild(b)),this.statusBarDiv=b,this.statusBarSpan=c,this.statusBarSpanText=d}}},message:{value:function(){var a=this,b=void 0===arguments[0]?"":arguments[0],c=this.tf;if(c.statusBar&&this.statusBarSpan){this.onBeforeShowMsg&&this.onBeforeShowMsg.call(null,this.tf,b);var d=""===b?this.statusBarCloseDelay:1;k.setTimeout(function(){a.statusBarSpan.innerHTML=b,a.onAfterShowMsg&&a.onAfterShowMsg.call(null,a.tf,b)},d)}}},destroy:{value:function(){var a=this.tf;a.hasGrid()&&this.statusBarDiv&&(this.statusBarDiv.innerHTML="",this.statusBarDiv.parentNode.removeChild(this.statusBarDiv),this.statusBarSpan=null,this.statusBarSpanText=null,this.statusBarDiv=null)}}}),a}()}}),define("modules/paging",["exports","../dom","../types","../string","../helpers","../event"],function(a,b,c,d,e,f){"use strict";var g=function(){function a(a,b){for(var c in b){var d=b[c];d.configurable=!0,d.value&&(d.writable=!0)}Object.defineProperties(a,b)}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),h=function(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")};Object.defineProperty(a,"__esModule",{value:!0});{var i=b.Dom,j=c.Types,k=d.Str,l=(e.Helpers,f.Event);a.Paging=function(){function a(b){h(this,a);var c=b.config();this.btnPageCssClass=c.paging_btn_css_class||"pgInp",this.pagingSlc=null,this.resultsPerPageSlc=null,this.pagingTgtId=c.paging_target_id||null,this.pagingLength=isNaN(c.paging_length)?10:c.paging_length,this.resultsPerPageTgtId=c.results_per_page_target_id||null,this.pgSlcCssClass=c.paging_slc_css_class||"pgSlc",this.pgInpCssClass=c.paging_inp_css_class||"pgNbInp",this.resultsPerPage=c.results_per_page||null,this.hasResultsPerPage=j.isArray(this.resultsPerPage),this.resultsSlcCssClass=c.results_slc_css_class||"rspg",this.resultsSpanCssClass=c.results_span_css_class||"rspgSpan",this.startPagingRow=0,this.nbPages=0,this.currentPageNb=1,this.btnNextPageText=c.btn_next_page_text||">",this.btnPrevPageText=c.btn_prev_page_text||"<",this.btnLastPageText=c.btn_last_page_text||">|",this.btnFirstPageText=c.btn_first_page_text||"|<",this.btnNextPageHtml=c.btn_next_page_html||(b.enableIcons?'<input type="button" value="" class="'+this.btnPageCssClass+' nextPage" title="Next page" />':null),this.btnPrevPageHtml=c.btn_prev_page_html||(b.enableIcons?'<input type="button" value="" class="'+this.btnPageCssClass+' previousPage" title="Previous page" />':null),this.btnFirstPageHtml=c.btn_first_page_html||(b.enableIcons?'<input type="button" value="" class="'+this.btnPageCssClass+' firstPage" title="First page" />':null),this.btnLastPageHtml=c.btn_last_page_html||(b.enableIcons?'<input type="button" value="" class="'+this.btnPageCssClass+' lastPage" title="Last page" />':null),this.pageText=c.page_text||" Page ",this.ofText=c.of_text||" of ",this.nbPgSpanCssClass=c.nb_pages_css_class||"nbpg",this.hasPagingBtns=c.paging_btns===!1?!1:!0,this.pageSelectorType=c.page_selector_type||b.fltTypeSlc,this.onBeforeChangePage=j.isFn(c.on_before_change_page)?c.on_before_change_page:null,this.onAfterChangePage=j.isFn(c.on_after_change_page)?c.on_after_change_page:null,this.prfxSlcPages="slcPages_",this.prfxSlcResults="slcResults_",this.prfxSlcResultsTxt="slcResultsTxt_",this.prfxBtnNextSpan="btnNextSpan_",this.prfxBtnPrevSpan="btnPrevSpan_",this.prfxBtnLastSpan="btnLastSpan_",this.prfxBtnFirstSpan="btnFirstSpan_",this.prfxBtnNext="btnNext_",this.prfxBtnPrev="btnPrev_",this.prfxBtnLast="btnLast_",this.prfxBtnFirst="btnFirst_",this.prfxPgSpan="pgspan_",this.prfxPgBeforeSpan="pgbeforespan_",this.prfxPgAfterSpan="pgafterspan_";var d=this.refRow,e=this.nbRows;this.nbPages=Math.ceil((e-d)/this.pagingLength);var f=this;this.evt={slcIndex:function(){return f.pageSelectorType===b.fltTypeSlc?f.pagingSlc.options.selectedIndex:parseInt(f.pagingSlc.value,10)-1},nbOpts:function(){return f.pageSelectorType===b.fltTypeSlc?parseInt(f.pagingSlc.options.length,10)-1:f.nbPages-1},next:function(){var a=f.evt.slcIndex()<f.evt.nbOpts()?f.evt.slcIndex()+1:0;f.changePage(a)},prev:function(){var a=f.evt.slcIndex()>0?f.evt.slcIndex()-1:f.evt.nbOpts();f.changePage(a)},last:function(){f.changePage(f.evt.nbOpts())},first:function(){f.changePage(0)},_detectKey:function(a){var c=l.keyCode(a);13===c&&(b.sorted?(b.filter(),f.changePage(f.evt.slcIndex())):f.changePage(),this.blur())},slcPagesChange:null,nextEvt:null,prevEvt:null,lastEvt:null,firstEvt:null},this.tf=b}return g(a,{init:{value:function(){var a,b=this,c=this.tf,d=this.evt;this.hasResultsPerPage&&(this.resultsPerPage.length<2?this.hasResultsPerPage=!1:(this.pagingLength=this.resultsPerPage[1][0],this.setResultsPerPage())),d.slcPagesChange=function(a){b.changePage(),a.target.blur()},this.pageSelectorType===c.fltTypeSlc&&(a=i.create(c.fltTypeSlc,["id",this.prfxSlcPages+c.id]),a.className=this.pgSlcCssClass,l.add(a,"change",d.slcPagesChange)),this.pageSelectorType===c.fltTypeInp&&(a=i.create(c.fltTypeInp,["id",this.prfxSlcPages+c.id],["value",this.currentPageNb]),a.className=this.pgInpCssClass,l.add(a,"keypress",d._detectKey));var e=i.create("span",["id",this.prfxBtnNextSpan+c.id]),f=i.create("span",["id",this.prfxBtnPrevSpan+c.id]),g=i.create("span",["id",this.prfxBtnLastSpan+c.id]),h=i.create("span",["id",this.prfxBtnFirstSpan+c.id]);if(this.hasPagingBtns){if(this.btnNextPageHtml)e.innerHTML=this.btnNextPageHtml,l.add(e,"click",d.next);else{var j=i.create(c.fltTypeInp,["id",this.prfxBtnNext+c.id],["type","button"],["value",this.btnNextPageText],["title","Next"]);j.className=this.btnPageCssClass,l.add(j,"click",d.next),e.appendChild(j)}if(this.btnPrevPageHtml)f.innerHTML=this.btnPrevPageHtml,l.add(f,"click",d.prev);else{var k=i.create(c.fltTypeInp,["id",this.prfxBtnPrev+c.id],["type","button"],["value",this.btnPrevPageText],["title","Previous"]);k.className=this.btnPageCssClass,l.add(k,"click",d.prev),f.appendChild(k)}if(this.btnLastPageHtml)g.innerHTML=this.btnLastPageHtml,l.add(g,"click",d.last);else{var m=i.create(c.fltTypeInp,["id",this.prfxBtnLast+c.id],["type","button"],["value",this.btnLastPageText],["title","Last"]);m.className=this.btnPageCssClass,l.add(m,"click",d.last),g.appendChild(m)}if(this.btnFirstPageHtml)h.innerHTML=this.btnFirstPageHtml,l.add(h,"click",d.first);else{var n=i.create(c.fltTypeInp,["id",this.prfxBtnFirst+c.id],["type","button"],["value",this.btnFirstPageText],["title","First"]);n.className=this.btnPageCssClass,l.add(n,"click",d.first),h.appendChild(n)}}this.pagingTgtId||c.setToolbar();var o=this.pagingTgtId?i.id(this.pagingTgtId):c.mDiv;o.appendChild(h),o.appendChild(f);var p=i.create("span",["id",this.prfxPgBeforeSpan+c.id]);p.appendChild(i.text(this.pageText)),p.className=this.nbPgSpanCssClass,o.appendChild(p),o.appendChild(a);var q=i.create("span",["id",this.prfxPgAfterSpan+c.id]);q.appendChild(i.text(this.ofText)),q.className=this.nbPgSpanCssClass,o.appendChild(q);var r=i.create("span",["id",this.prfxPgSpan+c.id]);r.className=this.nbPgSpanCssClass,r.appendChild(i.text(" "+this.nbPages+" ")),o.appendChild(r),o.appendChild(e),o.appendChild(g),this.pagingSlc=i.id(this.prfxSlcPages+c.id),(!c.rememberGridValues||this.isPagingRemoved)&&this.setPagingInfo(),c.fltGrid||(c.ValidateAllRows(),this.setPagingInfo(c.validRowsIndex)),this.isPagingRemoved=!1}},addPaging:{value:function(){var a=void 0===arguments[0]?!1:arguments[0],b=this.tf;b.hasGrid()&&!b.paging&&(b.paging=!0,this.isPagingRemoved=!0,this.init(),b.resetValues(),a&&b.filter())}},setPagingInfo:{value:function(a){var b=this.tf,c=b.tbl.rows,d=this.pagingTgtId?i.id(this.pagingTgtId):b.mDiv,e=i.id(this.prfxPgSpan+b.id);if(a&&a.length>0)b.validRowsIndex=a;else{b.validRowsIndex=[];for(var f=b.refRow;f<b.nbRows;f++){var g=c[f];if(g){var h=g.getAttribute("validRow");"true"!==h&&h||b.validRowsIndex.push(f)}}}if(this.nbPages=Math.ceil(b.validRowsIndex.length/this.pagingLength),e.innerHTML=this.nbPages,this.pageSelectorType===b.fltTypeSlc&&(this.pagingSlc.innerHTML=""),this.nbPages>0)if(d.style.visibility="visible",this.pageSelectorType===b.fltTypeSlc)for(var j=0;j<this.nbPages;j++){var k=new Option(j+1,j*this.pagingLength,!1,!1);this.pagingSlc.options[j]=k}else this.pagingSlc.value=this.currentPageNb;else d.style.visibility="hidden";this.groupByPage(b.validRowsIndex)}},groupByPage:{value:function(a){var b=this.tf,c=b.tbl.rows,d=parseInt(this.startPagingRow,10)+parseInt(this.pagingLength,10);a&&(b.validRowsIndex=a);for(var e=0;e<b.validRowsIndex.length;e++){var f=c[b.validRowsIndex[e]];e>=this.startPagingRow&&d>e?("true"!==f.getAttribute("validRow")&&f.getAttribute("validRow")||(f.style.display=""),b.alternateBgs&&b.Cpt.alternateRows&&b.Cpt.alternateRows.setRowBg(b.validRowsIndex[e],e)):(f.style.display="none",b.alternateBgs&&b.Cpt.alternateRows&&b.Cpt.alternateRows.removeRowBg(b.validRowsIndex[e]))}b.nbVisibleRows=b.validRowsIndex.length,b.isStartBgAlternate=!1,b.applyGridProps()}},setPage:{value:function(a){var b=this.tf;if(b.hasGrid()&&b.paging){var c=this.evt,d=typeof a;if("string"===d)switch(k.lower(a)){case"next":c.next();break;case"previous":c.prev();break;case"last":c.last();break;case"first":c.first();break;default:c.next()}else"number"===d&&this.changePage(a-1)}}},setResultsPerPage:{value:function(){var a=this,b=this.tf,c=this.evt;if((b.hasGrid()||b.isFirstLoad)&&!this.resultsPerPageSlc&&this.resultsPerPage){c.slcResultsChange=function(b){a.changeResultsPerPage(),b.target.blur()};var d=i.create(b.fltTypeSlc,["id",this.prfxSlcResults+b.id]);d.className=b.resultsSlcCssClass;var e=this.resultsPerPage[0],f=this.resultsPerPage[1],g=i.create("span",["id",this.prfxSlcResultsTxt+b.id]);g.className=this.resultsSpanCssClass,this.resultsPerPageTgtId||b.setToolbar();var h=this.resultsPerPageTgtId?i.id(this.resultsPerPageTgtId):b.rDiv;g.appendChild(i.text(e)),h.appendChild(g),h.appendChild(d),this.resultsPerPageSlc=i.id(this.prfxSlcResults+b.id);for(var j=0;j<f.length;j++){var k=new Option(f[j],f[j],!1,!1);this.resultsPerPageSlc.options[j]=k}l.add(d,"change",c.slcResultsChange)}}},removeResultsPerPage:{value:function(){var a=this.tf;if(a.hasGrid()&&this.resultsPerPageSlc&&this.resultsPerPage){var b=this.resultsPerPageSlc,c=i.id(this.prfxSlcResultsTxt+a.id);b&&b.parentNode.removeChild(b),c&&c.parentNode.removeChild(c),this.resultsPerPageSlc=null}}},changePage:{value:function(a){var b=this.tf,c=b.Evt;b.EvtManager(c.name.changepage,{pgIndex:a})}},changeResultsPerPage:{value:function(){var a=this.tf,b=a.Evt;a.EvtManager(b.name.changeresultsperpage)}},resetPage:{value:function(){var a=this.tf,b=a.Evt;a.EvtManager(b.name.resetpage)}},resetPageLength:{value:function(){var a=this.tf,b=a.Evt;a.EvtManager(b.name.resetpagelength)}},_changePage:{value:function(a){var b=this.tf;b.paging&&(null===a&&(a=this.pageSelectorType===b.fltTypeSlc?this.pagingSlc.options.selectedIndex:this.pagingSlc.value-1),a>=0&&a<=this.nbPages-1&&(this.onBeforeChangePage&&this.onBeforeChangePage.call(null,this,a),this.currentPageNb=parseInt(a,10)+1,this.pageSelectorType===b.fltTypeSlc?this.pagingSlc.options[a].selected=!0:this.pagingSlc.value=this.currentPageNb,b.rememberPageNb&&b.Cpt.store.savePageNb(b.pgNbCookie),this.startPagingRow=this.pageSelectorType===b.fltTypeSlc?this.pagingSlc.value:a*this.pagingLength,this.groupByPage(),this.onAfterChangePage&&this.onAfterChangePage.call(null,this,a)))}},_changeResultsPerPage:{value:function(){var a=this.tf;if(a.paging){var b=this.resultsPerPageSlc,c=this.pageSelectorType===a.fltTypeSlc?this.pagingSlc.selectedIndex:parseInt(this.pagingSlc.value-1,10);if(this.pagingLength=parseInt(b.options[b.selectedIndex].value,10),this.startPagingRow=this.pagingLength*c,!isNaN(this.pagingLength)){if(this.startPagingRow>=a.nbFilterableRows&&(this.startPagingRow=a.nbFilterableRows-this.pagingLength),this.setPagingInfo(),this.pageSelectorType===a.fltTypeSlc){var d=this.pagingSlc.options.length-1<=c?this.pagingSlc.options.length-1:c;this.pagingSlc.options[d].selected=!0}a.rememberPageLen&&a.Cpt.store.savePageLength(a.pgLenCookie)}}}},_resetPage:{value:function(a){var b=this.tf,c=b.Cpt.store.getPageNb(a);""!==c&&this.changePage(c-1)}},_resetPageLength:{value:function(a){var b=this.tf;if(b.paging){var c=b.Cpt.store.getPageLength(a);""!==c&&(this.resultsPerPageSlc.options[c].selected=!0,this.changeResultsPerPage())}}},destroy:{value:function(){var a=this.tf;if(a.hasGrid()){var b,c,d,e,f,g,h;b=i.id(this.prfxBtnNextSpan+a.id),c=i.id(this.prfxBtnPrevSpan+a.id),d=i.id(this.prfxBtnLastSpan+a.id),e=i.id(this.prfxBtnFirstSpan+a.id),f=i.id(this.prfxPgBeforeSpan+a.id),g=i.id(this.prfxPgAfterSpan+a.id),h=i.id(this.prfxPgSpan+a.id);var j=this.evt;this.pagingSlc&&(this.pageSelectorType===a.fltTypeSlc?l.remove(this.pagingSlc,"change",j.slcPagesChange):this.pageSelectorType===a.fltTypeInp&&l.remove(this.pagingSlc,"keypress",j._detectKey),this.pagingSlc.parentNode.removeChild(this.pagingSlc)),b&&(l.remove(b,"click",j.next),b.parentNode.removeChild(b)),c&&(l.remove(c,"click",j.prev),c.parentNode.removeChild(c)),d&&(l.remove(d,"click",j.last),d.parentNode.removeChild(d)),e&&(l.remove(e,"click",j.first),e.parentNode.removeChild(e)),f&&f.parentNode.removeChild(f),g&&g.parentNode.removeChild(g),h&&h.parentNode.removeChild(h),this.hasResultsPerPage&&this.removeResultsPerPage(),this.pagingSlc=null,this.nbPages=0,this.isPagingRemoved=!0,a.paging=!1}}}}),a}()}}),define("modules/clearButton",["exports","../dom","../event"],function(a,b,c){"use strict";var d=function(){function a(a,b){for(var c in b){var d=b[c];d.configurable=!0,d.value&&(d.writable=!0)}Object.defineProperties(a,b)}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),e=function(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")};Object.defineProperty(a,"__esModule",{value:!0});{var f=b.Dom,g=c.Event;a.ClearButton=function(){function a(b){e(this,a);var c=b.config();this.btnResetTgtId=c.btn_reset_target_id||null,this.btnResetEl=null,this.btnResetText=c.btn_reset_text||"Reset",this.btnResetTooltip=c.btn_reset_tooltip||"Clear filters",this.btnResetHtml=c.btn_reset_html||(b.enableIcons?'<input type="button" value="" class="'+b.btnResetCssClass+'" title="'+this.btnResetTooltip+'" />':null),this.prfxResetSpan="resetspan_",this.tf=b}return d(a,{onClick:{value:function(){this.tf.clearFilters()}},init:{value:function(){var a=this,b=this.tf;if(b.hasGrid()||b.isFirstLoad||!b.btnResetEl){var c=f.create("span",["id",this.prfxResetSpan+b.id]);this.btnResetTgtId||b.setToolbar();var d=this.btnResetTgtId?f.id(this.btnResetTgtId):b.rDiv;if(d.appendChild(c),this.btnResetHtml){c.innerHTML=this.btnResetHtml;var e=c.firstChild;g.add(e,"click",function(){a.onClick()})}else{var h=f.create("a",["href","javascript:void(0);"]);h.className=b.btnResetCssClass,h.appendChild(f.text(this.btnResetText)),c.appendChild(h),g.add(h,"click",function(){a.onClick()})}this.btnResetEl=c.firstChild}}},destroy:{value:function(){var a=this.tf;if(a.hasGrid()&&this.btnResetEl){var b=f.id(a.prfxResetSpan+a.id);b&&b.parentNode.removeChild(b),this.btnResetEl=null}}}}),a}()}}),define("modules/help",["exports","../dom","../event"],function(a,b,c){"use strict";var d=function(){function a(a,b){for(var c in b){var d=b[c];d.configurable=!0,d.value&&(d.writable=!0)}Object.defineProperties(a,b)}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),e=function(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")};Object.defineProperty(a,"__esModule",{value:!0});{var f=b.Dom,g=c.Event;a.Help=function(){function a(b){e(this,a);var c=b.config();this.helpInstrTgtId=c.help_instructions_target_id||null,this.helpInstrContTgtId=c.help_instructions_container_target_id||null,this.helpInstrText=c.help_instructions_text?c.help_instructions_text:'Use the filters above each column to filter and limit table data. Avanced searches can be performed by using the following operators: <br /><b>&lt;</b>, <b>&lt;=</b>, <b>&gt;</b>, <b>&gt;=</b>, <b>=</b>, <b>*</b>, <b>!</b>, <b>{</b>, <b>}</b>, <b>||</b>,<b>&amp;&amp;</b>, <b>[empty]</b>, <b>[nonempty]</b>, <b>rgx:</b><br/> These operators are described here:<br/><a href="http://tablefilter.free.fr/#operators" target="_blank">http://tablefilter.free.fr/#operators</a><hr/>',this.helpInstrHtml=c.help_instructions_html||null,this.helpInstrBtnText=c.help_instructions_btn_text||"?",this.helpInstrBtnHtml=c.help_instructions_btn_html||null,this.helpInstrBtnCssClass=c.help_instructions_btn_css_class||"helpBtn",this.helpInstrContCssClass=c.help_instructions_container_css_class||"helpCont",this.helpInstrBtnEl=null,this.helpInstrContEl=null,this.helpInstrDefaultHtml='<div class="helpFooter"><h4>HTML Table Filter Generator v. '+b.version+'</h4><a href="http://tablefilter.free.fr" target="_blank">http://tablefilter.free.fr</a><br/><span>&copy;2009-'+b.year+' Max Guglielmi.</span><div align="center" style="margin-top:8px;"><a href="javascript:void(0);">Close</a></div></div>',this.prfxHelpSpan="helpSpan_",this.prfxHelpDiv="helpDiv_",this.tf=b}return d(a,{init:{value:function(){var a=this;if(!this.helpInstrBtnEl){var b=this.tf,c=f.create("span",["id",this.prfxHelpSpan+b.id]),d=f.create("div",["id",this.prfxHelpDiv+b.id]);this.helpInstrTgtId||b.setToolbar();var e=this.helpInstrTgtId?f.id(this.helpInstrTgtId):b.rDiv;e.appendChild(c);var h=this.helpInstrContTgtId?f.id(this.helpInstrContTgtId):c;if(this.helpInstrBtnHtml){c.innerHTML=this.helpInstrBtnHtml;var i=c.firstChild;g.add(i,"click",function(){a.toggle()}),h.appendChild(d)}else{h.appendChild(d);var j=f.create("a",["href","javascript:void(0);"]);j.className=this.helpInstrBtnCssClass,j.appendChild(f.text(this.helpInstrBtnText)),c.appendChild(j),g.add(j,"click",function(){a.toggle()})}this.helpInstrHtml?(this.helpInstrContTgtId&&h.appendChild(d),d.innerHTML=this.helpInstrHtml,this.helpInstrContTgtId||(d.className=this.helpInstrContCssClass,g.add(d,"dblclick",function(){a.toggle()}))):(d.innerHTML=this.helpInstrText,d.className=this.helpInstrContCssClass,g.add(d,"dblclick",function(){a.toggle()})),d.innerHTML+=this.helpInstrDefaultHtml,g.add(d,"click",function(){a.toggle()}),this.helpInstrContEl=d,this.helpInstrBtnEl=c}}},toggle:{value:function(){if(this.helpInstrContEl){var a=this.helpInstrContEl.style.display;if(""===a||"none"===a){this.helpInstrContEl.style.display="block";var b=f.position(this.helpInstrBtnEl).left;this.helpInstrContTgtId||(this.helpInstrContEl.style.left=b-this.helpInstrContEl.clientWidth+25+"px")}else this.helpInstrContEl.style.display="none"}}},destroy:{value:function(){this.helpInstrBtnEl&&(this.helpInstrBtnEl.parentNode.removeChild(this.helpInstrBtnEl),this.helpInstrBtnEl=null,this.helpInstrContEl&&(this.helpInstrContEl.parentNode.removeChild(this.helpInstrContEl),this.helpInstrContEl=null))}}}),a}()}}),define("modules/alternateRows",["exports","../dom"],function(a,b){"use strict";var c=function(){function a(a,b){for(var c in b){var d=b[c];d.configurable=!0,d.value&&(d.writable=!0)}Object.defineProperties(a,b)}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),d=function(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")};Object.defineProperty(a,"__esModule",{value:!0});{var e=b.Dom;a.AlternateRows=function(){function a(b){d(this,a);var c=b.config();this.evenCss=c.even_row_css_class||"even",this.oddCss=c.odd_row_css_class||"odd",this.tf=b}return c(a,{init:{value:function(){if(this.tf.hasGrid()||this.tf.isFirstLoad)for(var a=(this.tf.tbl.rows,null===this.tf.validRowsIndex),b=a?this.tf.refRow:0,c=a?this.tf.nbFilterableRows+b:this.tf.validRowsIndex.length,d=0,e=b;c>e;e++){var f=a?e:this.tf.validRowsIndex[e];this.setRowBg(f,d),d++}}},setRowBg:{value:function(a,b){if(this.tf.alternateBgs&&!isNaN(a)){var c=this.tf.tbl.rows,d=b?b:a;this.removeRowBg(a),e.addClass(c[a],d%2?this.evenCss:this.oddCss)}}},removeRowBg:{value:function(a){if(!isNaN(a)){var b=this.tf.tbl.rows;e.removeClass(b[a],this.oddCss),e.removeClass(b[a],this.evenCss)}}},remove:{value:function(){if(this.tf.hasGrid()){for(var a=(this.tf.tbl.rows,this.tf.refRow);a<this.tf.nbRows;a++)this.removeRowBg(a);this.tf.isStartBgAlternate=!0}}},enable:{value:function(){this.tf.alternateBgs=!0}},disable:{value:function(){this.tf.alternateBgs=!1}}}),a}()}}),define("modules/colOps",["exports","../dom","../string","../types"],function(exports,_dom,_string,_types){"use strict";var _createClass=function(){function a(a,b){for(var c in b){var d=b[c];d.configurable=!0,d.value&&(d.writable=!0)}Object.defineProperties(a,b)}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),_classCallCheck=function(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")};Object.defineProperty(exports,"__esModule",{value:!0});var Dom=_dom.Dom,Str=_string.Str,Types=_types.Types,ColOps=exports.ColOps=function(){function ColOps(a){_classCallCheck(this,ColOps);var b=a.config();this.colOperation=b.col_operation,this.onBeforeOperation=Types.isFn(b.on_before_operation)?b.on_before_operation:null,this.onAfterOperation=Types.isFn(b.on_after_operation)?b.on_after_operation:null,this.tf=a}return _createClass(ColOps,{calc:{value:function calc(){if(this.tf.isFirstLoad||this.tf.hasGrid()){this.onBeforeOperation&&this.onBeforeOperation.call(null,this.tf);var colOperation=this.colOperation,labelId=colOperation.id,colIndex=colOperation.col,operation=colOperation.operation,outputType=colOperation.write_method,totRowIndex=colOperation.tot_row_index,excludeRow=colOperation.exclude_row,decimalPrecision=void 0!==colOperation.decimal_precision?colOperation.decimal_precision:2,ucolIndex=[],ucolMax=0;ucolIndex[ucolMax]=colIndex[0];for(var ii=1;ii<colIndex.length;ii++){for(var saved=0,jj=0;ucolMax>=jj;jj++)ucolIndex[jj]===colIndex[ii]&&(saved=1);0===saved&&(ucolMax++,ucolIndex[ucolMax]=colIndex[ii])}if("object"==Str.lower(typeof labelId)&&"object"==Str.lower(typeof colIndex)&&"object"==Str.lower(typeof operation))for(var row=this.tf.tbl.rows,colvalues=[],ucol=0;ucolMax>=ucol;ucol++){colvalues.push(this.tf.getColValues(ucolIndex[ucol],!0,excludeRow));for(var result,nbvalues=0,temp,meanValue=0,sumValue=0,minValue=null,maxValue=null,q1Value=null,medValue=null,q3Value=null,meanFlag=0,sumFlag=0,minFlag=0,maxFlag=0,q1Flag=0,medFlag=0,q3Flag=0,theList=[],opsThisCol=[],decThisCol=[],labThisCol=[],oTypeThisCol=[],mThisCol=-1,k=0;k<colIndex.length;k++)if(colIndex[k]===ucolIndex[ucol])switch(mThisCol++,opsThisCol[mThisCol]=Str.lower(operation[k]),decThisCol[mThisCol]=decimalPrecision[k],labThisCol[mThisCol]=labelId[k],oTypeThisCol=void 0!==outputType&&"object"===Str.lower(typeof outputType)?outputType[k]:null,opsThisCol[mThisCol]){case"mean":meanFlag=1;break;case"sum":sumFlag=1;break;case"min":minFlag=1;break;case"max":maxFlag=1;break;case"median":medFlag=1;break;case"q1":q1Flag=1;break;case"q3":q3Flag=1}for(var j=0;j<colvalues[ucol].length;j++){if((1==q1Flag||1==q3Flag||1==medFlag)&&j<colvalues[ucol].length-1)for(k=j+1;k<colvalues[ucol].length;k++)eval(colvalues[ucol][k])<eval(colvalues[ucol][j])&&(temp=colvalues[ucol][j],colvalues[ucol][j]=colvalues[ucol][k],colvalues[ucol][k]=temp);var cvalue=parseFloat(colvalues[ucol][j]);theList[j]=parseFloat(cvalue),
isNaN(cvalue)||(nbvalues++,(1===sumFlag||1===meanFlag)&&(sumValue+=parseFloat(cvalue)),1===minFlag&&(minValue=null===minValue?parseFloat(cvalue):parseFloat(cvalue)<minValue?parseFloat(cvalue):minValue),1===maxFlag&&(maxValue=null===maxValue?parseFloat(cvalue):parseFloat(cvalue)>maxValue?parseFloat(cvalue):maxValue))}if(1===meanFlag&&(meanValue=sumValue/nbvalues),1===medFlag){var aux=0;nbvalues%2===1?(aux=Math.floor(nbvalues/2),medValue=theList[aux]):medValue=(theList[nbvalues/2]+theList[nbvalues/2-1])/2}var posa;if(1===q1Flag&&(posa=0,posa=Math.floor(nbvalues/4),q1Value=4*posa==nbvalues?(theList[posa-1]+theList[posa])/2:theList[posa]),1===q3Flag){posa=0;var posb=0;posa=Math.floor(nbvalues/4),4*posa===nbvalues?(posb=3*posa,q3Value=(theList[posb]+theList[posb-1])/2):q3Value=theList[nbvalues-posa-1]}for(var i=0;mThisCol>=i;i++){switch(opsThisCol[i]){case"mean":result=meanValue;break;case"sum":result=sumValue;break;case"min":result=minValue;break;case"max":result=maxValue;break;case"median":result=medValue;break;case"q1":result=q1Value;break;case"q3":result=q3Value}var precision=isNaN(decThisCol[i])?2:decThisCol[i];if(oTypeThisCol&&result){if(result=result.toFixed(precision),Dom.id(labThisCol[i]))switch(Str.lower(oTypeThisCol)){case"innerhtml":Dom.id(labThisCol[i]).innerHTML=isNaN(result)||!isFinite(result)||0===nbvalues?".":result;break;case"setvalue":Dom.id(labThisCol[i]).value=result;break;case"createtextnode":var oldnode=Dom.id(labThisCol[i]).firstChild,txtnode=Dom.text(result);Dom.id(labThisCol[i]).replaceChild(txtnode,oldnode)}}else try{Dom.id(labThisCol[i]).innerHTML=isNaN(result)||!isFinite(result)||0===nbvalues?".":result.toFixed(precision)}catch(e){}}var totRow=totRowIndex&&totRowIndex[ucol]?row[totRowIndex[ucol]]:null;totRow&&(totRow.style.display="")}this.onAfterOperation&&this.onAfterOperation.call(null,this.tf)}}}}),ColOps}()}),SortableTable.gecko="Gecko"==navigator.product,SortableTable.msie=/msie/i.test(navigator.userAgent),SortableTable.removeBeforeSort=SortableTable.gecko,SortableTable.prototype.onsort=function(){},SortableTable.prototype.defaultDescending=!1,SortableTable.prototype._sortTypeInfo={},SortableTable.prototype.setTable=function(a){this.tHead&&this.uninitHeader(),this.element=a,this.setTHead(a.tHead),this.setTBody(a.tBodies[0])},SortableTable.prototype.setTHead=function(a){this.tHead&&this.tHead!=a&&this.uninitHeader(),this.tHead=a,this.initHeader(this.sortTypes)},SortableTable.prototype.setTBody=function(a){this.tBody=a},SortableTable.prototype.setSortTypes=function(a){this.tHead&&this.uninitHeader(),this.sortTypes=a||[],this.tHead&&this.initHeader(this.sortTypes)},SortableTable.prototype.initHeader=function(a){if(this.tHead){var b=this.tHead.rows[0].cells,c=this.tHead.ownerDocument||this.tHead.document;this.sortTypes=a||[];for(var d,e,f=b.length,g=0;f>g;g++)e=b[g],null!=this.sortTypes[g]&&"None"!=this.sortTypes[g]?(d=c.createElement("IMG"),d.src="images/blank.png",e.appendChild(d),null!=this.sortTypes[g]&&(e._sortType=this.sortTypes[g]),"undefined"!=typeof e.addEventListener?e.addEventListener("click",this._headerOnclick,!1):"undefined"!=typeof e.attachEvent?e.attachEvent("onclick",this._headerOnclick):e.onclick=this._headerOnclick):(e.setAttribute("_sortType",a[g]),e._sortType="None");this.updateHeaderArrows()}},SortableTable.prototype.uninitHeader=function(){if(this.tHead)for(var a,b=this.tHead.rows[0].cells,c=b.length,d=0;c>d;d++)a=b[d],null!=a._sortType&&"None"!=a._sortType&&(a.removeChild(a.lastChild),"undefined"!=typeof a.removeEventListener?a.removeEventListener("click",this._headerOnclick,!1):"undefined"!=typeof a.detachEvent&&a.detachEvent("onclick",this._headerOnclick),a._sortType=null,a.removeAttribute("_sortType"))},SortableTable.prototype.updateHeaderArrows=function(){if(this.tHead)for(var a,b=this.tHead.rows[0].cells,c=b.length,d=0;c>d;d++)null!=b[d]._sortType&&"None"!=b[d]._sortType&&(a=b[d].lastChild,a.className=d==this.sortColumn?"sort-arrow "+(this.descending?"descending":"ascending"):"sort-arrow")},SortableTable.prototype.headerOnclick=function(a){for(var b=a.target||a.srcElement;"TD"!=b.tagName;)b=b.parentNode;this.sort(SortableTable.msie?SortableTable.getCellIndex(b):b.cellIndex)},SortableTable.getCellIndex=function(a){var b,c=a.parentNode.childNodes,d=c.length;for(b=0;c[b]!=a&&d>b;b++);return b},SortableTable.prototype.getSortType=function(a){return this.sortTypes[a]||"String"},SortableTable.prototype.sort=function(a,b,c){if(this.tBody&&(null==c&&(c=this.getSortType(a)),"None"!=c)){this.descending=null==b?this.sortColumn!=a?this.defaultDescending:!this.descending:b,this.sortColumn=a,"function"==typeof this.onbeforesort&&this.onbeforesort();var d=this.getSortFunction(c,a),e=this.getCache(c,a),f=this.tBody;if(e.sort(d),this.descending&&e.reverse(),SortableTable.removeBeforeSort){var g=f.nextSibling,h=f.parentNode;h.removeChild(f)}for(var i=e.length,j=0;i>j;j++)f.appendChild(e[j].element);SortableTable.removeBeforeSort&&h.insertBefore(f,g),this.updateHeaderArrows(),this.destroyCache(e),"function"==typeof this.onsort&&this.onsort()}},SortableTable.prototype.asyncSort=function(a,b,c){var d=this;this._asyncsort=function(){d.sort(a,b,c)},window.setTimeout(this._asyncsort,1)},SortableTable.prototype.getCache=function(a,b){if(!this.tBody)return[];for(var c,d=this.tBody.rows,e=d.length,f=new Array(e),g=0;e>g;g++)c=d[g],f[g]={value:this.getRowValue(c,a,b),element:c};return f},SortableTable.prototype.destroyCache=function(a){for(var b=a.length,c=0;b>c;c++)a[c].value=null,a[c].element=null,a[c]=null},SortableTable.prototype.getRowValue=function(a,b,c){if(this._sortTypeInfo[b]&&this._sortTypeInfo[b].getRowValue)return this._sortTypeInfo[b].getRowValue(a,c);var d,e=a.cells[c];return d="undefined"!=typeof e.innerText?e.innerText:SortableTable.getInnerText(e),this.getValueFromString(d,b)},SortableTable.getInnerText=function(a){for(var b="",c=a.childNodes,d=c.length,e=0;d>e;e++)switch(c[e].nodeType){case 1:b+=SortableTable.getInnerText(c[e]);break;case 3:b+=c[e].nodeValue}return b},SortableTable.prototype.getValueFromString=function(a,b){return this._sortTypeInfo[b]?this._sortTypeInfo[b].getValueFromString(a):a},SortableTable.prototype.getSortFunction=function(a,b){return this._sortTypeInfo[a]?this._sortTypeInfo[a].compare:SortableTable.basicCompare},SortableTable.prototype.destroy=function(){this.uninitHeader();var a=this.document.parentWindow;a&&"undefined"!=typeof a.detachEvent&&a.detachEvent("onunload",this._onunload),this._onunload=null,this.element=null,this.tHead=null,this.tBody=null,this.document=null,this._headerOnclick=null,this.sortTypes=null,this._asyncsort=null,this.onsort=null},SortableTable.prototype.addSortType=function(a,b,c,d){this._sortTypeInfo[a]={type:a,getValueFromString:b||SortableTable.idFunction,compare:c||SortableTable.basicCompare,getRowValue:d}},SortableTable.prototype.removeSortType=function(a){delete this._sortTypeInfo[a]},SortableTable.basicCompare=function(a,b){return a.value<b.value?-1:b.value<a.value?1:0},SortableTable.idFunction=function(a){return a},SortableTable.toUpperCase=function(a){return a.toUpperCase()},SortableTable.toDate=function(a){var b=a.split("-"),c=new Date(0);return c.setFullYear(b[0]),c.setDate(b[2]),c.setMonth(b[1]-1),c.valueOf()},SortableTable.prototype.addSortType("Number",Number),SortableTable.prototype.addSortType("CaseInsensitiveString",SortableTable.toUpperCase),SortableTable.prototype.addSortType("Date",SortableTable.toDate),SortableTable.prototype.addSortType("String"),define("extensions/sortabletable/sortabletable",function(a){return function(){var b;return b||a.SortableTable}}(this)),define("extensions/sortabletable/adapterSortabletable",["exports","../../types","../../dom","../../array","../../event","../../date","../../helpers"],function(a,b,c,d,e,f,g){"use strict";function h(a){return x.removeNbFormat(a,"us")}function i(a){return x.removeNbFormat(a,"eu")}function j(a,b){return w.format(a,b)}function k(a){return j(a,"DMY")}function l(a){return j(a,"MDY")}function m(a){return j(a,"YMD")}function n(a){return j(a,"DDMMMYYYY")}function o(a){var b=a.split(".");for(var c in b){for(var d=b[c];3>d.length;)d="0"+d;b[c]=d}return b.join(".")}function p(a,b){var c=o(a.value.toLowerCase()),d=o(b.value.toLowerCase());return c==d?0:d>c?-1:1}var q=function(){function a(a,b){for(var c in b){var d=b[c];d.configurable=!0,d.value&&(d.writable=!0)}Object.defineProperties(a,b)}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),r=function(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")};Object.defineProperty(a,"__esModule",{value:!0});{var s=b.Types,t=c.Dom,u=d.Arr,v=e.Event,w=f.DateHelper,x=g.Helpers;a.AdapterSortableTable=function(){function a(b){r(this,a);var c=b.config();this.isPaged=!1,this.sorted=!1,this.sortImgPath=c.sort_images_path||b.themesPath,this.sortImgBlank=c.sort_image_blank||"blank.png",this.sortImgClassName=c.sort_image_class_name||"sort-arrow",this.sortImgAscClassName=c.sort_image_asc_class_name||"ascending",this.sortImgDescClassName=c.sort_image_desc_class_name||"descending",this.sortCustomKey=c.sort_custom_key||"data-tf-sortKey",this.onSortLoaded=s.isFn(c.on_sort_loaded)?c.on_sort_loaded:null,this.onBeforeSort=s.isFn(c.on_before_sort)?c.on_before_sort:null,this.onAfterSort=s.isFn(c.on_after_sort)?c.on_after_sort:null,this.tf=b}return q(a,{init:{value:function(){var a=this.tf,b=a.sortConfig,c=this;if(s.isUndef(SortableTable))throw new Error("SortableTable class not found.");this.overrideSortableTable(),this.setSortTypes(),b.sortCol&&this.stt.sort(b.sortCol[0],b.sortCol[1]),a.isSortEnabled=!0,this.onSortLoaded&&this.onSortLoaded.call(null,a,this),this.stt.onbeforesort=function(){this.onBeforeSort&&this.onBeforeSort.call(null,a,this.stt.sortColumn),a.performSort(),a.paging&&(c.isPaged=!0,a.paging=!1,a.Cpt.paging.destroy())},this.stt.onsort=function(){if(c.sorted=!0,a.alternateBgs)for(var b=a.tbl.rows,d=0,e=function(b,c,d){s.isUndef(d)&&(d=!1);var e=a.Cpt.alternateRows,f=e.oddCss,g=e.evenCss;t.removeClass(b,f),t.removeClass(b,g),d||t.addClass(b,c%2?f:g)},f=a.refRow;f<a.nbRows;f++){var g=b[f].getAttribute("validRow");a.paging&&""===b[f].style.display?(e(b[f],d),d++):"true"!==g&&null!==g||""!==b[f].style.display?e(b[f],d,!0):(e(b[f],d),d++)}if(c.isPaged){var h=a.Cpt.paging,i=a.config();if(h.hasResultsPerPage){var j=h.resultsPerPageSlc;i.paging_length=j.options[j.selectedIndex].value}h.addPaging(!1),h.setPage(h.currentPageNb),c.isPaged=!1}c.onAfterSort&&c.onAfterSort.call(null,a,a.stt.sortColumn)}}},sortByColumnIndex:{value:function(a){this.stt.sort(a)}},overrideSortableTable:{value:function(){var a=this,b=this.tf;SortableTable.prototype.headerOnclick=function(a){if(b.sort){for(var c=a.target||a.srcElement;"TD"!==c.tagName&&"TH"!==c.tagName;)c=c.parentNode;this.sort(SortableTable.msie?SortableTable.getCellIndex(c):c.cellIndex)}},SortableTable.getCellIndex=function(a){var b,c=a.parentNode.cells,d=c.length;for(b=0;c[b]!=a&&d>b;b++);return b},SortableTable.prototype.initHeader=function(c){var d=this;if(d.tHead){d.headersRow=b.headersRow;{var e=d.tHead.rows[d.headersRow].cells;d.tHead.ownerDocument||d.tHead.document}d.sortTypes=c||[];for(var f,g,h=e.length,i=0;h>i;i++)g=e[i],null!==d.sortTypes[i]&&"None"!==d.sortTypes[i]?(g.style.cursor="pointer",f=t.create("img",["src",a.sortImgPath+a.sortImgBlank]),g.appendChild(f),null!==d.sortTypes[i]&&g.setAttribute("_sortType",d.sortTypes[i]),v.add(g,"click",d._headerOnclick)):(g.setAttribute("_sortType",c[i]),g._sortType="None");d.updateHeaderArrows()}},SortableTable.prototype.updateHeaderArrows=function(){var c,d,e,f=this;if(b.sortConfig.asyncSort&&null!==b.sortConfig.triggerIds){var g=b.sortConfig.triggerIds;c=[],d=g.length;for(var h=0;h<g.length;h++)c.push(t.id(g[h]))}else{if(!this.tHead)return;c=f.tHead.rows[f.headersRow].cells,d=c.length}for(var i=0;d>i;i++){var j=c[i].getAttribute("_sortType");null!==j&&"None"!==j&&(e=c[i].lastChild||c[i],"img"!==e.nodeName.toLowerCase()&&(e=t.create("img",["src",a.sortImgPath+a.sortImgBlank]),c[i].appendChild(e)),e.className=i===f.sortColumn?a.sortImgClassName+" "+(this.descending?a.sortImgDescClassName:a.sortImgAscClassName):a.sortImgClassName)}},SortableTable.prototype.getRowValue=function(a,b,c){var d=this,e=d._sortTypeInfo[b];if(e&&e.getRowValue)return e.getRowValue(a,c);var f=a.cells[c],g=SortableTable.getInnerText(f);return d.getValueFromString(g,b)},SortableTable.getInnerText=function(b){return b?b.getAttribute(a.sortCustomKey)?b.getAttribute(a.sortCustomKey):t.getText(b):void 0}}},addSortType:{value:function(){SortableTable.prototype.addSortType(arguments[0],arguments[1],arguments[2],arguments[3])}},setSortTypes:{value:function(){for(var a=this,b=this.tf,c=b.sortConfig,d=c.sortTypes,e=[],f=0;f<b.nbCells;f++){var g;null!==d&&null!=d[f]?(g=d[f].toLowerCase(),"none"===g&&(g="None")):g=b.hasColNbFormat&&null!==b.colNbFormat[f]?b.colNbFormat[f].toLowerCase():b.hasColDateType&&null!==b.colDateType[f]?b.colDateType[f].toLowerCase()+"date":"String",e.push(g)}if(this.addSortType("number",Number),this.addSortType("caseinsensitivestring",SortableTable.toUpperCase),this.addSortType("date",SortableTable.toDate),this.addSortType("string"),this.addSortType("us",h),this.addSortType("eu",i),this.addSortType("dmydate",k),this.addSortType("ymddate",m),this.addSortType("mdydate",l),this.addSortType("ddmmmyyyydate",n),this.addSortType("ipaddress",o,p),this.stt=new SortableTable(b.tbl,e),c.asyncSort&&null!==c.triggerIds)for(var j=c.triggerIds,q=0;q<j.length;q++)if(null!==j[q]){var r=t.id(j[q]);r&&(r.style.cursor="pointer",v.add(r,"click",function(b){var c=b.target;a.tf.sort&&a.stt.asyncSort(u.indexByValue(j,c.id,!0))}),r.setAttribute("_sortType",e[q]))}}},destroy:{value:function(){var a=this.tf;a.sort=!1,this.sorted=!1,this.stt.destroy();for(var b=a.getFiltersId(),c=0;c<b.length;c++){var d=a.getHeaderElement(c),e=t.tag(d,"img");1===e.length&&d.removeChild(e[0])}}}}),a}()}}),define("extensions/colsVisibility/colsVisibility",["exports","../../dom","../../types","../../event","../../helpers","../../array"],function(a,b,c,d,e,f){"use strict";var g=function(){function a(a,b){for(var c in b){var d=b[c];d.configurable=!0,d.value&&(d.writable=!0)}Object.defineProperties(a,b)}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),h=function(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")};Object.defineProperty(a,"__esModule",{value:!0});{var i=b.Dom,j=c.Types,k=d.Event,l=e.Helpers,m=f.Arr;a.ColsVisibility=function(){function a(b){var c=void 0===arguments[1]?{name:"ColsVisibility",description:"Columns visibility manager"}:arguments[1];h(this,a);var d=c,e=b.config();this.initialized=!1,this.extName=d.name,this.extDesc=d.description,this.spanEl=null,this.btnEl=null,this.contEl=null,this.tickToHide=d.tick_to_hide===!1?!1:!0,this.manager=d.manager===!1?!1:!0,this.headersTbl=d.headers_table||!1,this.headersIndex=d.headers_index||1,this.contElTgtId=d.container_target_id||null,this.headersText=d.headers_text||null,this.btnTgtId=d.btn_target_id||null,this.btnText=d.btn_text||"Columns&#9660;",this.btnHtml=d.btn_html||null,this.btnCssClass=d.btn_css_class||"colVis",this.btnCloseText=d.btn_close_text||"Close",this.btnCloseHtml=d.btn_close_html||null,this.btnCloseCssClass=d.btn_close_css_class||this.btnCssClass,this.path=d.path||b.extensionsPath+"colsVisibility/",this.stylesheet=d.stylesheet||"colsVisibility.css",this.prfx="colVis_",this.spanCssClass=d.span_css_class||"colVisSpan",this.prfxCont=this.prfx+"Cont_",this.contCssClass=d.cont_css_class||"colVisCont",this.listCssClass=e.list_css_class||"cols_checklist",this.listItemCssClass=e.checklist_item_css_class||"cols_checklist_item",this.listSlcItemCssClass=e.checklist_selected_item_css_class||"cols_checklist_slc_item",this.text=d.text||(this.tickToHide?"Hide: ":"Show: "),this.atStart=d.at_start||null,this.enableHover=Boolean(d.enable_hover),this.enableTickAll=Boolean(d.enable_tick_all),this.tickAllText=d.tick_all_text||"Select all:",this.hiddenCols=[],this.tblHasColTag=i.tag(b.tbl,"col").length>0,this.onLoaded=j.isFn(d.on_loaded)?d.on_loaded:null,this.onBeforeOpen=j.isFn(d.on_before_open)?d.on_before_open:null,this.onAfterOpen=j.isFn(d.on_after_open)?d.on_after_open:null,this.onBeforeClose=j.isFn(d.on_before_close)?d.on_before_close:null,this.onAfterClose=j.isFn(d.on_after_close)?d.on_after_close:null,this.onBeforeColHidden=j.isFn(d.on_before_col_hidden)?d.on_before_col_hidden:null,this.onAfterColHidden=j.isFn(d.on_after_col_hidden)?d.on_after_col_hidden:null,this.onBeforeColDisplayed=j.isFn(d.on_before_col_displayed)?d.on_before_col_displayed:null,this.onAfterColDisplayed=j.isFn(d.on_after_col_displayed)?d.on_after_col_displayed:null,b.gridLayout&&(this.headersTbl=b.Cpt.gridLayout.headTbl,this.headersIndex=0,this.onAfterColDisplayed=function(){},this.onAfterColHidden=function(){}),b.includeFile(d.name+"Style",this.path+this.stylesheet,null,"link"),this.tf=b,this.init()}return g(a,{toggle:{value:function(a){var b=(this.tf,this.contEl.style.display),c=this.onBeforeOpen,d=this.onBeforeClose,e=this.onAfterOpen,f=this.onAfterClose;c&&"inline"!==b&&c.call(null,this),d&&"inline"===b&&d.call(null,this),this.contEl.style.display="inline"===b?"none":"inline",e&&"inline"!==b&&e.call(null,this),f&&"inline"===b&&f.call(null,this)}},checkItem:{value:function(a){var b=a.parentNode;if(b&&a){var c=a.firstChild.checked,d=a.firstChild.getAttribute("id").split("_")[1];d=parseInt(d,10),c?i.addClass(b,this.listSlcItemCssClass):i.removeClass(b,this.listSlcItemCssClass);var e=!1;(this.tickToHide&&c||!this.tickToHide&&!c)&&(e=!0),this.setHidden(d,e)}}},init:{value:function(){this.manager&&(this.buildBtn(),this.buildManager(),this.initialized=!0)}},buildBtn:{value:function(){var a=this;if(!this.btnEl){var b=this.tf,c=i.create("span",["id",this.prfx+b.id]);c.className=this.spanCssClass,this.btnTgtId||b.setToolbar();var d=this.btnTgtId?i.id(this.btnTgtId):b.rDiv;if(this.btnTgtId)d.appendChild(c);else{var e=d.firstChild;e.parentNode.insertBefore(c,e)}if(this.btnHtml){c.innerHTML=this.btnHtml;var f=c.firstChild;this.enableHover?k.add(f,"mouseover",function(b){a.toggle(b)}):k.add(f,"click",function(b){a.toggle(b)})}else{var g=i.create("a",["href","javascript:;"]);g.className=this.btnCssClass,g.title=this.extDesc,g.innerHTML=this.btnText,c.appendChild(g),this.enableHover?k.add(g,"mouseover",function(b){a.toggle(b)}):k.add(g,"click",function(b){a.toggle(b)})}this.spanEl=c,this.btnEl=this.spanEl.firstChild,this.onLoaded&&this.onLoaded.call(null,this)}}},buildManager:{value:function(){var a=this,b=this.tf,c=this.contElTgtId?i.id(this.contElTgtId):i.create("div",["id",this.prfxCont+b.id]);c.className=this.contCssClass;var d=i.create("p");d.innerHTML=this.text,c.appendChild(d);var e=i.create("ul",["id","ul"+this.extName+"_"+b.id]);e.className=this.listCssClass;var f=this.headersTbl?this.headersTbl:b.tbl,g=this.headersTbl?this.headersIndex:b.getHeadersRowIndex(),h=f.rows[g];if(this.enableTickAll){var j=i.createCheckItem("col__"+b.id,this.tickAllText,this.tickAllText);i.addClass(j,this.listItemCssClass),e.appendChild(j),j.check.checked=!this.tickToHide,k.add(j.check,"click",function(a){for(var c=0;c<h.cells.length;c++){var d=i.id("col_"+c+"_"+b.id);d&&j.check.checked!==d.checked&&(d.click(),d.checked=j.check.checked)}})}for(var l=0;l<h.cells.length;l++){var m=h.cells[l],n=this.headersText&&this.headersText[l]?this.headersText[l]:this._getHeaderText(m),o=i.createCheckItem("col_"+l+"_"+b.id,n,n);i.addClass(o,this.listItemCssClass),this.tickToHide||i.addClass(o,this.listSlcItemCssClass),e.appendChild(o),this.tickToHide||(o.check.checked=!0),k.add(o.check,"click",function(b){var c=k.target(b),d=c.parentNode;a.checkItem(d)})}var p,q=i.create("p",["align","center"]);if(this.btnCloseHtml?(q.innerHTML=this.btnCloseHtml,p=q.firstChild,k.add(p,"click",function(b){a.toggle(b)})):(p=i.create("a",["href","javascript:;"]),p.className=this.btnCloseCssClass,p.innerHTML=this.btnCloseText,k.add(p,"click",function(b){a.toggle(b)}),q.appendChild(p)),c.appendChild(e),c.appendChild(q),this.btnEl.parentNode.insertBefore(c,this.btnEl),this.contEl=c,this.atStart)for(var r=this.atStart,s=0;s<r.length;s++){var t=i.id("col_"+r[s]+"_"+b.id);t&&t.click()}}},setHidden:{value:function(a,b){{var c=this.tf,d=c.tbl;i.tag(d,"col")[a]}this.onBeforeColHidden&&b&&this.onBeforeColHidden.call(null,this,a),this.onBeforeColDisplayed&&!b&&this.onBeforeColDisplayed.call(null,this,a),this._hideCells(d,a,b),this.headersTbl&&this._hideCells(this.headersTbl,a,b);var e=this.hiddenCols;if(b)-1===e.indexOf(a)&&this.hiddenCols.push(a);else{var f=m.indexByValue(e,a,!0);-1!==e.indexOf(a)&&this.hiddenCols.splice(f,1)}var g,h,j;if(this.onAfterColHidden&&b){if(c.gridLayout)if(g=c.Cpt.gridLayout,h=g.headTbl,j=g.gridColElms,l.isIE())d.style.width=h.clientWidth+"px";else{for(var k=h.rows[this.headersIndex].cells,n=0,o=0;o<c.nbCells;o++)if("none"===k[o].style.display){var p=parseInt(k[o].style.width,10);k[o].style.width=0,n+=p}var q=parseInt(h.style.width,10);h.style.width=q-n+"px",d.style.width=h.style.width,j[a].style.display="none"}this.onAfterColHidden.call(null,this,a)}if(this.onAfterColDisplayed&&!b){if(c.gridLayout){g=c.Cpt.gridLayout,h=g.headTbl,j=g.gridColElms,j[a].style.display="";var r=parseInt(j[a].style.width,10),s=c.getHeaderElement(a);s.style.width=r+"px",h.style.width=parseInt(h.style.width,10)+r+"px",c.tbl.style.width=h.style.width}this.onAfterColDisplayed.call(null,this,a)}}},showCol:{value:function(a){if(void 0!==a&&this.isColHidden(a))if(this.manager&&this.contEl){var b=i.id("col_"+a+"_"+this.tf.id);b&&b.click()}else this.setHidden(a,!1)}},hideCol:{value:function(a){if(void 0!==a&&!this.isColHidden(a))if(this.manager&&this.contEl){var b=i.id("col_"+a+"_"+this.tf.id);b&&b.click()}else this.setHidden(a,!0)}},isColHidden:{value:function(a){return-1!==this.hiddenCols.indexOf(a)?!0:!1}},toggleCol:{value:function(a){void 0===a||this.isColHidden(a)?this.showCol(a):this.hideCol(a)}},getHiddenCols:{value:function(){return this.hiddenCols}},destroy:{value:function(){this.btnEl&&this.contEl&&(i.id(this.contElTgtId)?i.id(this.contElTgtId).innerHTML="":(this.contEl.innerHTML="",this.contEl.parentNode.removeChild(this.contEl),this.contEl=null),this.btnEl.innerHTML="",this.btnEl.parentNode.removeChild(this.btnEl),this.btnEl=null,this.initialized=!1)}},_getHeaderText:{value:function(a){if(!a.hasChildNodes)return"";for(var b=0;b<a.childNodes.length;b++){var c=a.childNodes[b];if(3===c.nodeType)return c.nodeValue;if(1===c.nodeType){if(c.id&&-1!==c.id.indexOf("popUp"))continue;return i.getText(c)}}return""}},_hideCells:{value:function(a,b,c){for(var d=0;d<a.rows.length;d++){var e=a.rows[d],f=e.cells[b];f&&(f.style.display=c?"none":"")}}}}),a}()}}),define("tablefilter",["exports","module","event","dom","string","cookie","types","array","helpers","date","sort","modules/store","modules/gridLayout","modules/loader","modules/highlightKeywords","modules/popupFilter","modules/dropdown","modules/checkList","modules/rowsCounter","modules/statusBar","modules/paging","modules/clearButton","modules/help","modules/alternateRows","modules/colOps","extensions/sortabletable/sortabletable","extensions/sortabletable/adapterSortabletable","extensions/colsVisibility/colsVisibility"],function(exports,module,_event,_dom,_string,_cookie,_types,_array,_helpers,_date,_sort,_modulesStore,_modulesGridLayout,_modulesLoader,_modulesHighlightKeywords,_modulesPopupFilter,_modulesDropdown,_modulesCheckList,_modulesRowsCounter,_modulesStatusBar,_modulesPaging,_modulesClearButton,_modulesHelp,_modulesAlternateRows,_modulesColOps,_extensionsSortabletableSortabletable,_extensionsSortabletableAdapterSortabletable,_extensionsColsVisibilityColsVisibility){"use strict";function numSortAsc(a,b){return a-b}function numSortDesc(a,b){return b-a}function removeNbFormat(a,b){if(a){b||(b="us");var c=a;return c="us"===str.lower(b)?+c.replace(/[^\d\.-]/g,""):+c.replace(/[^\d\,-]/g,"").replace(",",".")}}function setOuterHtml(){if(doc.body.__defineGetter__&&HTMLElement){var a=HTMLElement.prototype;a.__defineGetter__&&a.__defineGetter__("outerHTML",function(){var a=this.parentNode,b=dom.create(a.tagName);b.appendChild(this);var c=b.innerHTML;return a.appendChild(this),c}),a.__defineSetter__&&HTMLElement.prototype.__defineSetter__("outerHTML",function(a){var b=this.ownerDocument.createRange();b.setStartBefore(this);var c=b.createContextualFragment(a);return this.parentNode.replaceChild(c,this),a})}}var _createClass=function(){function a(a,b){for(var c in b){var d=b[c];d.configurable=!0,d.value&&(d.writable=!0)}Object.defineProperties(a,b)}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),_classCallCheck=function(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")},evt=_event.Event,dom=_dom.Dom,str=_string.Str,cookie=_cookie.Cookie,types=_types.Types,array=_array.Arr,hlp=_helpers.Helpers,dateHelper=_date.DateHelper,Sort=_sort.Sort,Store=_modulesStore.Store,GridLayout=_modulesGridLayout.GridLayout,Loader=_modulesLoader.Loader,HighlightKeyword=_modulesHighlightKeywords.HighlightKeyword,PopupFilter=_modulesPopupFilter.PopupFilter,Dropdown=_modulesDropdown.Dropdown,CheckList=_modulesCheckList.CheckList,RowsCounter=_modulesRowsCounter.RowsCounter,StatusBar=_modulesStatusBar.StatusBar,Paging=_modulesPaging.Paging,ClearButton=_modulesClearButton.ClearButton,Help=_modulesHelp.Help,AlternateRows=_modulesAlternateRows.AlternateRows,ColOps=_modulesColOps.ColOps,AdapterSortableTable=_extensionsSortabletableAdapterSortabletable.AdapterSortableTable,ColsVisibility=_extensionsColsVisibilityColsVisibility.ColsVisibility,global=window,isValidDate=dateHelper.isValid,formatDate=dateHelper.format,doc=global.document,TableFilter=function(){function TableFilter(a){if(_classCallCheck(this,TableFilter),0!==arguments.length){if(this.id=a,this.version="3.0",this.year=(new Date).getFullYear(),this.tbl=dom.id(a),this.startRow=null,this.refRow=null,this.headersRow=null,this.cfg={},this.nbFilterableRows=null,this.nbRows=null,this.nbCells=null,this._hasGrid=!1,this.enableModules=!1,!this.tbl||"table"!==str.lower(this.tbl.nodeName)||0===this.getRowsNb())throw new Error("Could not instantiate TableFilter class: HTML table not found.");if(arguments.length>1)for(var b=0;b<arguments.length;b++){var c=arguments[b],d=typeof c;switch(str.lower(d)){case"number":this.startRow=c;break;case"object":this.cfg=c}}var e=this.cfg;this.refRow=null===this.startRow?2:this.startRow+1;try{this.nbCells=this.getCellsNb(this.refRow)}catch(f){this.nbCells=this.getCellsNb(0)}this.basePath=void 0!==e.base_path?e.base_path:"",this.extensionsPath=e.extensions_path||this.basePath+"extensions/",this.fltTypeInp="input",this.fltTypeSlc="select",this.fltTypeMulti="multiple",this.fltTypeCheckList="checklist",this.fltTypeNone="none",this.fltCol=[];for(var g=0;g<this.nbCells;g++){var h=e["col_"+g],i=h?str.lower(h):this.fltTypeInp;this.fltCol.push(i),this["col"+g]=i}this.publicMethods=void 0!==e.public_methods?e.public_methods:!1,this.fltGrid=e.grid===!1?!1:!0,this.gridLayout=e.grid_layout?!0:!1,this.sourceTblHtml=null,this.gridLayout&&(void 0===this.tbl.outerHTML&&setOuterHtml(),this.sourceTblHtml=this.tbl.outerHTML),this.filtersRowIndex=e.filters_row_index||0,this.headersRow=e.headers_row_index||(0===this.filtersRowIndex?1:0),this.gridLayout&&(this.headersRow>1?this.filtersRowIndex=this.headersRow+1:(this.filtersRowIndex=1,this.headersRow=0)),this.fltCellTag="th"!==e.filters_cell_tag||"td"!==e.filters_cell_tag?"td":e.filters_cell_tag,this.fltIds=[],this.fltElms=[],this.searchArgs=null,this.tblData=[],this.validRowsIndex=null,this.fltGridEl=null,this.isFirstLoad=!0,this.infDiv=null,this.lDiv=null,this.rDiv=null,this.mDiv=null,this.contDiv=null,this.infDivCssClass=e.inf_div_css_class||"inf",this.lDivCssClass=e.left_div_css_class||"ldiv",this.rDivCssClass=e.right_div_css_class||"rdiv",this.mDivCssClass=e.middle_div_css_class||"mdiv",this.contDivCssClass=e.content_div_css_class||"cont",this.stylesheet=e.stylesheet||this.basePath+"filtergrid.css",this.stylesheetId=this.id+"_style",this.fltsRowCssClass=e.flts_row_css_class||"fltrow",this.enableIcons=e.enable_icons===!1?!1:!0,this.alternateBgs=e.alternate_rows===!0?!0:!1,this.hasColWidth=e.col_width===!0?!0:!1,this.colWidth=this.hasColWidth?e.col_width:null,this.fixedHeaders=e.fixed_headers===!0?!0:!1,this.tBodyH=isNaN(e.tbody_height)?200:e.tbody_height,this.fltCssClass=e.flt_css_class||"flt",this.fltMultiCssClass=e.flt_multi_css_class||"flt_multi",this.fltSmallCssClass=e.flt_small_css_class||"flt_s",this.singleFltCssClass=e.single_flt_css_class||"single_flt",this.isStartBgAlternate=!0,this.enterKey=e.enter_key===!1?!1:!0,this.isModFilterFn=e.mod_filter_fn===!0?!0:!1,this.modFilterFn=this.isModFilterFn?e.mod_filter_fn:null,this.onBeforeFilter=types.isFn(e.on_before_filter)?e.on_before_filter:null,this.onAfterFilter=types.isFn(e.on_after_filter)?e.on_after_filter:null,this.matchCase=e.match_case===!0?!0:!1,this.exactMatch=e.exact_match===!0?!0:!1,this.linkedFilters=e.linked_filters===!0?!0:!1,this.disableExcludedOptions=e.disable_excluded_options===!0?!0:!1,this.activeFlt=null,this.activeFilterId=null,this.hasColOperation=e.col_operation?!0:!1,this.colOperation=null,this.hasVisibleRows=e.rows_always_visible?!0:!1,this.visibleRows=this.hasVisibleRows?e.rows_always_visible:[],this.searchType=e.search_type||"include",this.isExternalFlt=e.external_flt_grid===!0?!0:!1,this.externalFltTgtIds=e.external_flt_grid_ids||null,this.externalFltEls=[],this.execDelay=isNaN(e.exec_delay)?100:parseInt(e.exec_delay,10),this.onFiltersLoaded=types.isFn(e.on_filters_loaded)?e.on_filters_loaded:null,this.singleSearchFlt=e.single_search_filter===!0?!0:!1,this.onRowValidated=types.isFn(e.on_row_validated)?e.on_row_validated:null,this.customCellDataCols=e.custom_cell_data_cols?e.custom_cell_data_cols:[],this.customCellData=types.isFn(e.custom_cell_data)?e.custom_cell_data:null,this.watermark=e.watermark||"",this.isWatermarkArray=types.isArray(this.watermark),this.toolBarTgtId=e.toolbar_target_id||null,this.helpInstructions=e.help_instructions||!1,this.popUpFilters=e.popup_filters===!0?!0:!1,this.markActiveColumns=e.mark_active_columns===!0?!0:!1,this.activeColumnsCssClass=e.active_columns_css_class||"activeHeader",this.onBeforeActiveColumn=types.isFn(e.on_before_active_column)?e.on_before_active_column:null,this.onAfterActiveColumn=types.isFn(e.on_after_active_column)?e.on_after_active_column:null,this.displayAllText=e.display_all_text||"",this.enableEmptyOption=e.enable_empty_option===!0?!0:!1,this.emptyText=e.empty_text||"(Empty)",this.enableNonEmptyOption=e.enable_non_empty_option===!0?!0:!1,this.nonEmptyText=e.non_empty_text||"(Non empty)",this.onSlcChange=e.on_change===!1?!1:!0,this.sortSlc=e.sort_select===!1?!1:!0,this.isSortNumAsc=e.sort_num_asc===!0?!0:!1,this.sortNumAsc=this.isSortNumAsc?e.sort_num_asc:null,this.isSortNumDesc=e.sort_num_desc===!0?!0:!1,this.sortNumDesc=this.isSortNumDesc?e.sort_num_desc:null,this.fillSlcOnDemand=e.fill_slc_on_demand===!0?!0:!1,this.hasCustomSlcOptions=types.isObj(e.custom_slc_options)?!0:!1,this.customSlcOptions=types.isArray(e.custom_slc_options)?e.custom_slc_options:null,this.rgxOperator=e.regexp_operator||"rgx:",this.emOperator=e.empty_operator||"[empty]",this.nmOperator=e.nonempty_operator||"[nonempty]",this.orOperator=e.or_operator||"||",this.anOperator=e.and_operator||"&&",this.grOperator=e.greater_operator||">",this.lwOperator=e.lower_operator||"<",this.leOperator=e.lower_equal_operator||"<=",this.geOperator=e.greater_equal_operator||">=",this.dfOperator=e.different_operator||"!",this.lkOperator=e.like_operator||"*",this.eqOperator=e.equal_operator||"=",this.stOperator=e.start_with_operator||"{",this.enOperator=e.end_with_operator||"}",this.curExp=e.cur_exp||"^[¥£€$]",this.separator=e.separator||",",this.rowsCounter=e.rows_counter===!0?!0:!1,this.statusBar=e.status_bar===!0?!0:!1,this.loader=e.loader===!0?!0:!1,
this.displayBtn=e.btn===!0?!0:!1,this.btnText=e.btn_text||(this.enableIcons?"":"Go"),this.btnCssClass=e.btn_css_class||(this.enableIcons?"btnflt_icon":"btnflt"),this.btnReset=e.btn_reset===!0?!0:!1,this.btnResetCssClass=e.btn_reset_css_class||"reset",this.onBeforeReset=types.isFn(e.on_before_reset)?e.on_before_reset:null,this.onAfterReset=types.isFn(e.on_after_reset)?e.on_after_reset:null,this.paging=e.paging===!0?!0:!1,this.nbVisibleRows=0,this.nbHiddenRows=0,this.sort=e.sort===!0?!0:!1,this.isSortEnabled=!1,this.sortConfig=e.sort_config||{},this.sortConfig.name=void 0!==this.sortConfig.name?e.sort_config.name:"sortabletable",this.sortConfig.src=void 0!==this.sortConfig.src?e.sort_config.src:this.extensionsPath+"sortabletable/sortabletable.js",this.sortConfig.adapterSrc=void 0!==this.sortConfig.adapter_src?e.sort_config.adapter_src:this.extensionsPath+"sortabletable/adapterSortabletable.js",this.sortConfig.initialize=void 0!==this.sortConfig.initialize?e.sort_config.initialize:function(a){},this.sortConfig.sortTypes=types.isArray(this.sortConfig.sort_types)?e.sort_config.sort_types:[],this.sortConfig.sortCol=void 0!==this.sortConfig.sort_col?e.sort_config.sort_col:null,this.sortConfig.asyncSort=this.sortConfig.async_sort===!0?!0:!1,this.sortConfig.triggerIds=types.isArray(this.sortConfig.sort_trigger_ids)?e.sort_config.sort_trigger_ids:[],this.selectable=e.selectable===!0?!0:!1,this.editable=e.editable===!0?!0:!1,this.ezEditTableConfig=e.ezEditTable_config||{},this.ezEditTableConfig.name=void 0!==this.ezEditTableConfig.name?e.ezEditTable_config.name:"ezedittable",this.ezEditTableConfig.src=void 0!==this.ezEditTableConfig.src?e.ezEditTable_config.src:this.extensionsPath+"ezEditTable/ezEditTable.js",this.ezEditTableConfig.loadStylesheet=this.ezEditTableConfig.loadStylesheet===!0?!0:!1,this.ezEditTableConfig.stylesheet=this.ezEditTableConfig.stylesheet||this.extensionsPath+"ezEditTable/ezEditTable.css",this.ezEditTableConfig.stylesheetName=void 0!==this.ezEditTableConfig.stylesheetName?e.ezEditTable_config.stylesheetName:"ezEditTableCss",this.ezEditTableConfig.err='Failed to instantiate EditTable object.\n"ezEditTable" module may not be available.',this.onKeyUp=e.on_keyup===!0?!0:!1,this.onKeyUpDelay=isNaN(e.on_keyup_delay)?900:e.on_keyup_delay,this.isUserTyping=null,this.onKeyUpTimer=void 0,this.highlightKeywords=e.highlight_keywords===!0?!0:!1,this.defaultDateType=e.default_date_type||"DMY",this.thousandsSeparator=e.thousands_separator||",",this.decimalSeparator=e.decimal_separator||".",this.hasColNbFormat=e.col_number_format===!0?!0:!1,this.colNbFormat=types.isArray(this.hasColNbFormat)?e.col_number_format:null,this.hasColDateType=e.col_date_type===!0?!0:!1,this.colDateType=types.isArray(this.hasColDateType)?e.col_date_type:null,this.msgFilter=e.msg_filter||"Filtering data...",this.msgPopulate=e.msg_populate||"Populating filter...",this.msgPopulateCheckList=e.msg_populate_checklist||"Populating list...",this.msgChangePage=e.msg_change_page||"Collecting paging data...",this.msgClear=e.msg_clear||"Clearing filters...",this.msgChangeResults=e.msg_change_results||"Changing results per page...",this.msgResetValues=e.msg_reset_grid_values||"Re-setting filters values...",this.msgResetPage=e.msg_reset_page||"Re-setting page...",this.msgResetPageLength=e.msg_reset_page_length||"Re-setting page length...",this.msgSort=e.msg_sort||"Sorting data...",this.msgLoadExtensions=e.msg_load_extensions||"Loading extensions...",this.msgLoadThemes=e.msg_load_themes||"Loading theme(s)...",this.prfxTf="TF",this.prfxFlt="flt",this.prfxValButton="btn",this.prfxInfDiv="inf_",this.prfxLDiv="ldiv_",this.prfxRDiv="rdiv_",this.prfxMDiv="mdiv_",this.prfxCookieFltsValues="tf_flts_",this.prfxCookiePageNb="tf_pgnb_",this.prfxCookiePageLen="tf_pglen_",this.hasStoredValues=!1,this.rememberGridValues=e.remember_grid_values===!0?!0:!1,this.fltsValuesCookie=this.prfxCookieFltsValues+this.id,this.rememberPageNb=this.paging&&e.remember_page_number?!0:!1,this.pgNbCookie=this.prfxCookiePageNb+this.id,this.rememberPageLen=this.paging&&e.remember_page_length?!0:!1,this.pgLenCookie=this.prfxCookiePageLen+this.id,this.extensions=e.extensions,this.hasExtensions=types.isArray(this.extensions),this.enableDefaultTheme=e.enable_default_theme===!0?!0:!1,this.hasThemes=e.enable_default_theme||e.themes&&types.isObj(e.themes)?!0:!1,this.themes=this.hasThemes?e.themes:null,this.themesPath=e.themes_path||this.basePath+"TF_Themes/",this.Cpt={loader:null,alternateRows:null,colOps:null,rowsCounter:null,gridLayout:null,store:null,highlightKeywords:null,paging:null,checkList:null,dropdown:null,popupFilter:null,clearButton:null,help:null,statusBar:null},this.Extensions={sort:null,ezEditTable:null},this.Exts=[];var j=this;this.Evt={name:{filter:"Filter",dropdown:"dropdown",checklist:"checkList",changepage:"changePage",clear:"Clear",changeresultsperpage:"changeResults",resetvalues:"ResetValues",resetpage:"resetPage",resetpagelength:"resetPageLength",sort:"Sort",loadextensions:"LoadExtensions",loadthemes:"LoadThemes"},detectKey:function(a){if(j.enterKey){var b=a||global.event;if(b){var c=evt.keyCode(b);13===c?(j._filter(),evt.cancel(b),evt.stop(b)):(j.isUserTyping=!0,global.clearInterval(j.onKeyUpTimer),j.onKeyUpTimer=void 0)}}},onKeyUp:function(a){function b(){global.clearInterval(j.onKeyUpTimer),j.onKeyUpTimer=void 0,j.isUserTyping||(j.filter(),j.isUserTyping=null)}if(j.onKeyUp){var c=a||global.event,d=evt.keyCode(c);j.isUserTyping=!1,13!==d&&9!==d&&27!==d&&38!==d&&40!==d?void 0===j.onKeyUpTimer&&(j.onKeyUpTimer=global.setInterval(b,j.onKeyUpDelay)):(global.clearInterval(j.onKeyUpTimer),j.onKeyUpTimer=void 0)}},onKeyDown:function(a){j.onKeyUp&&(j.isUserTyping=!0)},onInpBlur:function(a){j.onKeyUp&&(j.isUserTyping=!1,global.clearInterval(j.onKeyUpTimer)),j.ezEditTable&&(j.editable&&j.ezEditTable.Editable.Set(),j.selectable&&j.ezEditTable.Selection.Set())},onInpFocus:function(a){var b=a||global.event;j.activeFilterId=this.getAttribute("id"),j.activeFlt=dom.id(j.activeFilterId),j.popUpFilters&&(evt.cancel(b),evt.stop(b)),j.ezEditTable&&(j.editable&&j.ezEditTable.Editable.Remove(),j.selectable&&j.ezEditTable.Selection.Remove())},onSlcFocus:function(a){var b=a||global.event;if(j.activeFilterId=this.getAttribute("id"),j.activeFlt=dom.id(j.activeFilterId),j.fillSlcOnDemand&&"0"===this.getAttribute("filled")){var c=this.getAttribute("ct");j.Cpt.dropdown._build(c)}j.popUpFilters&&(evt.cancel(b),evt.stop(b))},onSlcChange:function(a){if(j.activeFlt){var b=(j.activeFlt.getAttribute("colIndex"),a||global.event);j.popUpFilters&&evt.stop(b),j.onSlcChange&&j.filter()}},onCheckListClick:function(){if(j.fillSlcOnDemand&&"0"===this.getAttribute("filled")){var a=this.getAttribute("ct");j.Cpt.checkList._build(a),j.Cpt.checkList.checkListDiv[a].onclick=null,j.Cpt.checkList.checkListDiv[a].title=""}},onCheckListFocus:function(a){j.activeFilterId=this.firstChild.getAttribute("id"),j.activeFlt=dom.id(j.activeFilterId)},onBtnClick:function(){j.filter()}}}}return _createClass(TableFilter,{init:{value:function(){if(!this._hasGrid){this.tbl||(this.tbl=dom.id(this.id)),this.gridLayout&&(this.refRow=null===this.startRow?0:this.startRow),this.popUpFilters&&(0===this.filtersRowIndex&&1===this.headersRow||this.gridLayout)&&(this.headersRow=0);var a,b=this.cfg,c=this.singleSearchFlt?1:this.nbCells;if(void 0===window["tf_"+this.id]&&(window["tf_"+this.id]=this),this.includeFile(this.stylesheetId,this.stylesheet,null,"link"),this.hasThemes&&this._LoadThemes(),(this.rememberGridValues||this.rememberPageNb||this.rememberPageLen)&&(this.Cpt.store=new Store(this)),this.gridLayout&&(this.Cpt.gridLayout=new GridLayout(this),this.Cpt.gridLayout.init()),this.loader&&(this.Cpt.loader||(this.Cpt.loader=new Loader(this))),this.highlightKeywords&&(this.Cpt.highlightKeyword=new HighlightKeyword(this)),this.popUpFilters&&(this.Cpt.popupFilter||(this.Cpt.popupFilter=new PopupFilter(this)),this.Cpt.popupFilter.init()),this.fltGrid)if(this.isFirstLoad){var d;if(!this.gridLayout){var e=dom.tag(this.tbl,"thead");d=e.length>0?e[0].insertRow(this.filtersRowIndex):this.tbl.insertRow(this.filtersRowIndex),this.headersRow>1&&this.filtersRowIndex<=this.headersRow&&!this.popUpFilters&&this.headersRow++,this.popUpFilters&&this.headersRow++,d.className=this.fltsRowCssClass,!this.isExternalFlt||this.gridLayout&&!this.popUpFilters||(d.style.display="none")}this.nbFilterableRows=this.getRowsNb(),this.nbVisibleRows=this.nbFilterableRows,this.nbRows=this.tbl.rows.length;for(var f=0;c>f;f++){this.popUpFilters&&this.Cpt.popupFilter.build(f);var g=dom.create(this.fltCellTag),h=this["col"+f],i=this.isExternalFlt&&this.externalFltTgtIds?this.externalFltTgtIds[f]:null;if(this.singleSearchFlt&&(g.colSpan=this.nbCells),this.gridLayout||d.appendChild(g),a=f==c-1&&this.displayBtn?this.fltSmallCssClass:this.fltCssClass,void 0===h&&(h=void 0===b["col_"+f]?this.fltTypeInp:str.lower(b["col_"+f])),this.singleSearchFlt&&(h=this.fltTypeInp,a=this.singleFltCssClass),h===this.fltTypeSlc||h===this.fltTypeMulti){this.Cpt.dropdown||(this.Cpt.dropdown=new Dropdown(this));var j=this.Cpt.dropdown,k=dom.create(this.fltTypeSlc,["id",this.prfxFlt+f+"_"+this.id],["ct",f],["filled","0"]);if(h===this.fltTypeMulti&&(k.multiple=this.fltTypeMulti,k.title=j.multipleSlcTooltip),k.className=str.lower(h)===this.fltTypeSlc?a:this.fltMultiCssClass,i?(dom.id(i).appendChild(k),this.externalFltEls.push(k)):g.appendChild(k),this.fltIds.push(this.prfxFlt+f+"_"+this.id),this.fillSlcOnDemand||j._build(f),evt.add(k,"keypress",this.Evt.detectKey),evt.add(k,"change",this.Evt.onSlcChange),evt.add(k,"focus",this.Evt.onSlcFocus),this.fillSlcOnDemand){var l=dom.createOpt(this.displayAllText,"");k.appendChild(l)}}else if(h===this.fltTypeCheckList){var m;this.Cpt.checkList||(this.Cpt.checkList=new CheckList(this),m=this.Cpt.checkList);var n=dom.create("div",["id",m.prfxCheckListDiv+f+"_"+this.id],["ct",f],["filled","0"]);n.className=m.checkListDivCssClass,i?(dom.id(i).appendChild(n),this.externalFltEls.push(n)):g.appendChild(n),m.checkListDiv[f]=n,this.fltIds.push(this.prfxFlt+f+"_"+this.id),this.fillSlcOnDemand||m._build(f),this.fillSlcOnDemand&&(evt.add(n,"click",this.Evt.onCheckListClick),n.appendChild(dom.text(m.activateCheckListTxt))),evt.add(n,"click",this.Evt.onCheckListFocus)}else{var o=h===this.fltTypeInp?"text":"hidden",p=dom.create(this.fltTypeInp,["id",this.prfxFlt+f+"_"+this.id],["type",o],["ct",f]);if("hidden"!==o&&this.watermark&&p.setAttribute("placeholder",this.isWatermarkArray?this.watermark[f]||"":this.watermark),p.className=a,p.onfocus=this.Evt.onInpFocus,i?(dom.id(i).appendChild(p),this.externalFltEls.push(p)):g.appendChild(p),this.fltIds.push(this.prfxFlt+f+"_"+this.id),p.onkeypress=this.Evt.detectKey,p.onkeydown=this.Evt.onKeyDown,p.onkeyup=this.Evt.onKeyUp,p.onblur=this.Evt.onInpBlur,this.rememberGridValues){var q=this.Cpt.store.getFilterValues(this.fltsValuesCookie);" "!=q[f]&&this.setFilterValue(f,q[f],!1)}}if(f==c-1&&this.displayBtn){var r=dom.create(this.fltTypeInp,["id",this.prfxValButton+f+"_"+this.id],["type","button"],["value",this.btnText]);r.className=this.btnCssClass,i?dom.id(i).appendChild(r):g.appendChild(r),r.onclick=this.Evt.onBtnClick}}}else this._resetGrid();else this.refRow=this.refRow-1,this.gridLayout&&(this.refRow=0),this.nbFilterableRows=this.getRowsNb(),this.nbVisibleRows=this.nbFilterableRows,this.nbRows=this.nbFilterableRows+this.refRow;this.rowsCounter&&(this.Cpt.rowsCounter=new RowsCounter(this),this.Cpt.rowsCounter.init()),this.statusBar&&(this.Cpt.statusBar=new StatusBar(this),this.Cpt.statusBar.init()),(this.paging||this.Cpt.paging&&this.Cpt.paging.isPagingRemoved)&&(this.Cpt.paging=new Paging(this),this.Cpt.paging.init()),this.btnReset&&(this.Cpt.clearButton=new ClearButton(this),this.Cpt.clearButton.init()),this.helpInstructions&&(this.Cpt.help=new Help(this),this.Cpt.help.init()),this.hasColWidth&&!this.gridLayout&&this.setColWidths(),this.alternateBgs&&(this.Cpt.alternateRows=new AlternateRows(this),this.Cpt.alternateRows.init()),this.hasColOperation&&(this.Cpt.colOps=new ColOps(this),this.Cpt.colOps.calc()),this.sort&&this.setSort(),(this.selectable||this.editable)&&this.setEditable(),this.isFirstLoad=!1,this._hasGrid=!0,(this.rememberGridValues||this.rememberPageLen||this.rememberPageNb)&&this.resetValues(),this.gridLayout||dom.addClass(this.tbl,this.prfxTf),this.loader&&this.Cpt.loader.show("none"),this.hasExtensions&&(this.registerExtensions(),this.initExtensions()),this.onFiltersLoaded&&this.onFiltersLoaded.call(null,this)}}},EvtManager:{value:function(a,b){function c(){if(a){switch(a){case d.Evt.name.filter:d.isModFilterFn?d.modFilterFn.call(null,d):d._filter();break;case d.Evt.name.dropdown:d.linkedFilters?d.Cpt.dropdown._build(e,!0):d.Cpt.dropdown._build(e,!1,f,g);break;case d.Evt.name.checklist:d.Cpt.checkList._build(e,f,g);break;case d.Evt.name.changepage:d.Cpt.paging._changePage(h);break;case d.Evt.name.clear:d._clearFilters(),d._filter();break;case d.Evt.name.changeresultsperpage:d.Cpt.paging._changeResultsPerPage();break;case d.Evt.name.resetvalues:d._resetValues(),d._filter();break;case d.Evt.name.resetpage:d.Cpt.paging._resetPage(d.pgNbCookie);break;case d.Evt.name.resetpagelength:d.Cpt.paging._resetPageLength(d.pgLenCookie);break;case d.Evt.name.sort:break;case d.Evt.name.loadextensions:d._loadExtensions();break;case d.Evt.name.loadthemes:d._LoadThemes();break;default:d["_"+a].call(null,d,b)}d.statusBar&&d.Cpt.statusBar.message(""),d.loader&&d.Cpt.loader.show("none")}}var d=this,e=b&&void 0!==b.slcIndex?b.slcIndex:null,f=b&&void 0!==b.slcExternal?b.slcExternal:!1,g=b&&void 0!==b.slcId?b.slcId:null,h=b&&void 0!==b.pgIndex?b.pgIndex:null;if(this.loader||this.statusBar){try{this.Cpt.loader.show(""),this.Cpt.statusBar.message(this["msg"+a])}catch(i){}global.setTimeout(c,this.execDelay)}else c()}},registerExtensions:{value:function(){var a=this.extensions;if(0!==a.length)for(var b=0;b<a.length;b++){var c=a[b];-1===this.Exts.indexOf(c.name)&&this.Exts.push(c.name)}}},initExtensions:{value:function initExtensions(){var exts=this.extensions;if(0!==exts.length)for(var i=0;i<exts.length;i++){var tf=this,ext=exts[i],name=ext.name,inst=eval("new "+name+"(tf, ext);");tf.Extensions[name]=inst}}},LoadThemes:{value:function(){this.EvtManager(this.Evt.name.loadthemes)}},_LoadThemes:{value:function(){if(this.hasThemes){if(!this.Thm){var a=this;this.Thm={list:{},add:function(b,c,d,e){var f=d.split("/")[d.split("/").length-1],g=new RegExp(f),h=d.replace(g,"");a.Thm.list[b]={name:b,description:c,file:f,path:h,callback:e}}}}if(this.enableDefaultTheme&&(this.themes={name:["DefaultTheme"],src:[this.themesPath+"Default/TF_Default.css"],description:["Default Theme"]},this.Thm.add("DefaultTheme",this.themesPath+"Default/TF_Default.css","Default Theme")),types.isArray(this.themes.name)&&types.isArray(this.themes.src))for(var b=this.themes,c=0;c<b.name.length;c++){var d=b.src[c],e=b.name[c],f=b.initialize&&b.initialize[c]?b.initialize[c]:null,g=b.description&&b.description[c]?b.description[c]:null;this.Thm.add(e,g,d,f),this.isImported(d,"link")||this.includeFile(e,d,null,"link"),types.isFn(f)&&f.call(null,this)}this.btnResetText=null,this.btnResetHtml='<input type="button" value="" class="'+this.btnResetCssClass+'" title="Clear filters" />',this.btnPrevPageHtml='<input type="button" value="" class="'+this.btnPageCssClass+' previousPage" title="Previous page" />',this.btnNextPageHtml='<input type="button" value="" class="'+this.btnPageCssClass+' nextPage" title="Next page" />',this.btnFirstPageHtml='<input type="button" value="" class="'+this.btnPageCssClass+' firstPage" title="First page" />',this.btnLastPageHtml='<input type="button" value="" class="'+this.btnPageCssClass+' lastPage" title="Last page" />',this.loader=!0,this.loaderHtml='<div class="defaultLoader"></div>',this.loaderText=null}}},remove:{value:function(){if(this.fltGrid&&this._hasGrid){var a=this.tbl.rows;this.paging&&this.Cpt.paging.destroy(),this.statusBar&&this.Cpt.statusBar.destroy(),this.rowsCounter&&this.Cpt.rowsCounter.destroy(),this.btnReset&&this.Cpt.clearButton.destroy(),this.helpInstructions&&this.Cpt.help.destroy(),this.isExternalFlt&&!this.popUpFilters&&this.removeExternalFlts(),this.infDiv&&this.removeToolbar(),this.highlightKeywords&&this.Cpt.highlightKeyword.unhighlightAll(),this.sort&&this.Extensions.sort.destroy(),this.loader&&this.Cpt.loader.remove(),this.popUpFilters&&this.Cpt.popupFilter.destroy(),this.markActiveColumns&&this.clearActiveColumns(),(this.editable||this.selectable)&&this.removeEditable();for(var b=this.refRow;b<this.nbRows;b++){a[b].style.display="";try{a[b].hasAttribute("validRow")&&a[b].removeAttribute("validRow")}catch(c){for(var d=a[b],e=d.attributes,f=0;f<e.length;f++)"validrow"===str.lower(e.nodeName)&&d.removeAttribute("validRow")}this.alternateBgs&&this.Cpt.alternateRows.removeRowBg(b)}this.fltGrid&&!this.gridLayout&&(this.fltGridEl=a[this.filtersRowIndex],this.tbl.deleteRow(this.filtersRowIndex)),this.gridLayout&&this.Cpt.gridLayout.destroy(),dom.removeClass(this.tbl,this.prfxTf),this.activeFlt=null,this.isStartBgAlternate=!0,this._hasGrid=!1,this.tbl=null}}},setToolbar:{value:function(){if(null===this.infDiv){var a=dom.create("div",["id",this.prfxInfDiv+this.id]);if(a.className=this.infDivCssClass,this.toolBarTgtId)dom.id(this.toolBarTgtId).appendChild(a);else if(this.gridLayout){var b=this.Cpt.gridLayout;b.tblMainCont.appendChild(a),a.className=b.gridInfDivCssClass}else this.tbl.parentNode.insertBefore(a,this.tbl);this.infDiv=dom.id(this.prfxInfDiv+this.id);var c=dom.create("div",["id",this.prfxLDiv+this.id]);c.className=this.lDivCssClass,a.appendChild(c),this.lDiv=dom.id(this.prfxLDiv+this.id);var d=dom.create("div",["id",this.prfxRDiv+this.id]);d.className=this.rDivCssClass,a.appendChild(d),this.rDiv=dom.id(this.prfxRDiv+this.id);var e=dom.create("div",["id",this.prfxMDiv+this.id]);e.className=this.mDivCssClass,a.appendChild(e),this.mDiv=dom.id(this.prfxMDiv+this.id),this.helpInstructions||(this.Cpt.help||(this.Cpt.help=new Help(this)),this.Cpt.help.init())}}},removeToolbar:{value:function(){this.infDiv&&(this.infDiv.parentNode.removeChild(this.infDiv),this.infDiv=null)}},removeExternalFlts:{value:function(){if(this.isExternalFlt||this.externalFltTgtIds)for(var a=0;a<this.externalFltTgtIds.length;a++){var b=this.externalFltTgtIds[a],c=dom.id(b);c&&(c.innerHTML="")}}},setSort:{value:function(){var a=new AdapterSortableTable(this);this.Extensions.sort=a,a.init()}},setOldSort:{value:function(){function a(){console.log("loadSortable"),d.isImported(c.src)?d.Evt._EnableSort():d.includeFile(c.name,c.src,d.Evt._EnableSort)}var b=this.Evt._EnableSort,c=this.sortConfig,d=this;types.isFn(b)||(this.Evt._EnableSort=function(){if(!d.isSortEnabled||d.gridLayout){require(["extensions/sortabletable/adapterSortabletable"],function(a){d.Extensions.sort=new a(d),d.Extensions.sort.init()})}}),console.log("is require loaded: "+d.isImported("require.js")),d.isImported("require.js")?a():d.includeFile("tf-requirejs",d.basePath+"require.js",d.Evt._EnableSort)}},performSort:{value:function(){this.EvtManager(this.Evt.name.sort)}},setEditable:{value:function(){var a=this.ezEditTableConfig;this.isImported(a.src)?this._enableEditable():this.includeFile(a.name,a.src,this._enableEditable),a.loadStylesheet&&!this.isImported(a.stylesheet,"link")&&this.includeFile(a.stylesheetName,a.stylesheet,null,"link")}},removeEditable:{value:function(){var a=this.ezEditTable;a&&(this.selectable&&(a.Selection.ClearSelections(),a.Selection.Remove()),this.editable&&a.Editable.Remove())}},resetEditable:{value:function(){var a=this.ezEditTable;a&&(this.selectable&&a.Selection.Set(),this.editable&&a.Editable.Set())}},_enableEditable:{value:function(a){a||(a=this);var b,c=a.ezEditTableConfig,d=dom.tag(a.tbl,"thead");if(b=d.length>0&&!c.startRow?void 0:c.startRow||a.refRow,c.scroll_into_view=c.scroll_into_view===!1?!1:!0,c.base_path=c.base_path||a.basePath+"ezEditTable/",c.editable=a.editable=a.cfg.editable,c.selection=a.selectable=a.cfg.selectable,a.selectable&&(c.default_selection=c.default_selection||"row"),c.active_cell_css=c.active_cell_css||"ezETSelectedCell",a._lastValidRowIndex=0,a._lastRowIndex=0,a.selectable){var e=function(b,c,d){var e=b.Selection,f=function(d){if("row"===b.defaultSelection)e.SelectRowByIndex(d);else{b.ClearSelections();var f=c.cellIndex,g=a.tbl.rows[d];"both"===b.defaultSelection&&e.SelectRowByIndex(d),g&&e.SelectCell(g.cells[f])}if(a.validRowsIndex.length!==a.getRowsNb()){var h=a.tbl.rows[d];h&&h.scrollIntoView(!1),k&&(k.cellIndex===a.getCellsNb()-1&&a.gridLayout?a.tblCont.scrollLeft=1e8:0===k.cellIndex&&a.gridLayout?a.tblCont.scrollLeft=0:k.scrollIntoView(!1))}};if(a.validRowsIndex){var g,h=a.validRowsIndex,i=h.length,j="row"!==b.defaultSelection?c.parentNode:c,k="TD"===c.nodeName?c:null,l=void 0!==d?b.Event.GetKey(d):0,m=array.has(h,j.rowIndex),n=34===l||33===l?a.pagingLength||b.nbRowsPerPage:1;if(m)34!==l&&33!==l?(a._lastValidRowIndex=array.indexByValue(h,j.rowIndex),a._lastRowIndex=j.rowIndex):(g=34===l?a._lastValidRowIndex+n<=i-1?h[a._lastValidRowIndex+n]:[i-1]:a._lastValidRowIndex-n<=h[0]?h[0]:h[a._lastValidRowIndex-n],a._lastRowIndex=g,a._lastValidRowIndex=array.indexByValue(h,g),f(g));else{if(j.rowIndex>a._lastRowIndex)if(j.rowIndex>=h[i-1])g=h[i-1];else{var o=a._lastValidRowIndex+n;g=o>i-1?h[i-1]:h[o]}else if(j.rowIndex<=h[0])g=h[0];else{var p=h[a._lastValidRowIndex-n];g=p?p:h[0]}a._lastRowIndex=j.rowIndex,f(g)}}},f=function(b,c,d){var e="row"!==b.defaultSelection?c.parentNode:c;if(a.paging&&a.Cpt.paging.nbPages>1){var f=a.Cpt.paging;b.nbRowsPerPage=f.pagingLength;var g=a.validRowsIndex,h=g.length,i=parseInt(f.startPagingRow,10)+parseInt(f.pagingLength,10),j=e.rowIndex;j===g[h-1]&&f.currentPageNb!==f.nbPages?f.setPage("last"):j==g[0]&&1!==f.currentPageNb?f.setPage("first"):j>g[i-1]&&j<g[h-1]?f.setPage("next"):j<g[f.startPagingRow]&&j>g[0]&&f.setPage("previous")}};if(a.paging&&(a.onAfterChangePage=function(a,b){var c=a.Extensions.ezEditTable,d=c.Selection,e=d.GetActiveRow();e&&e.scrollIntoView(!1);var f=d.GetActiveCell();f&&f.scrollIntoView(!1)}),"row"===c.default_selection){var g=c.on_before_selected_row;c.on_before_selected_row=function(){f(arguments[0],arguments[1],arguments[2]),g&&g.call(null,arguments[0],arguments[1],arguments[2])};var h=c.on_after_selected_row;c.on_after_selected_row=function(){e(arguments[0],arguments[1],arguments[2]),h&&h.call(null,arguments[0],arguments[1],arguments[2])}}else{var i=c.on_before_selected_cell;c.on_before_selected_cell=function(){f(arguments[0],arguments[1],arguments[2]),i&&i.call(null,arguments[0],arguments[1],arguments[2])};var j=c.on_after_selected_cell;c.on_after_selected_cell=function(){e(arguments[0],arguments[1],arguments[2]),j&&j.call(null,arguments[0],arguments[1],arguments[2])}}}if(a.editable){var k=c.on_added_dom_row;if(c.on_added_dom_row=function(){a.nbFilterableRows++,a.paging?(a.nbRows++,a.nbVisibleRows++,a.nbFilterableRows++,a.paging=!1,a.Cpt.paging.destroy(),a.Cpt.paging.addPaging()):a.Cpt.rowsCounter.refresh(),a.alternateBgs&&a.Cpt.alternateRows.init(),k&&k.call(null,arguments[0],arguments[1],arguments[2])},c.actions&&c.actions["delete"]){var l=c.actions["delete"].on_after_submit;c.actions["delete"].on_after_submit=function(){a.nbFilterableRows--,a.paging?(a.nbRows--,a.nbVisibleRows--,a.nbFilterableRows--,a.paging=!1,a.Cpt.paging.destroy(),a.Cpt.paging.addPaging(!1)):a.Cpt.rowsCounter.refresh(),a.alternateBgs&&a.Cpt.alternateRows.init(),l&&l.call(null,arguments[0],arguments[1])}}}try{a.Extensions.ezEditTable=new EditTable(a.id,c,b),a.Extensions.ezEditTable.Init()}catch(m){console.log(c.err)}}},resetValues:{value:function(){this.EvtManager(this.Evt.name.resetvalues)}},_resetValues:{value:function(){this.rememberGridValues&&this.fillSlcOnDemand&&this.resetGridValues(this.fltsValuesCookie),this.rememberPageLen&&this.Cpt.paging.resetPageLength(this.pgLenCookie),this.rememberPageNb&&this.Cpt.paging.resetPage(this.pgNbCookie)}},resetGridValues:{value:function(a){if(this.fillSlcOnDemand){var b=this.Cpt.store.getFilterValues(a),c=this.getFiltersByType(this.fltTypeSlc,!0),d=this.getFiltersByType(this.fltTypeMulti,!0);if(Number(b[b.length-1])===this.fltIds.length){for(var e=0;e<b.length-1;e++)if(" "!==b[e]){var f,g;if(this["col"+e]===this.fltTypeSlc||this["col"+e]===this.fltTypeMulti){var h=dom.id(this.fltIds[e]);if(h.options[0].selected=!1,array.has(c,e)&&(g=dom.createOpt(b[e],b[e],!0),h.appendChild(g),this.hasStoredValues=!0),array.has(d,e))for(f=b[e].split(" "+this.orOperator+" "),j=0;j<f.length;j++)""!==f[j]&&(g=dom.createOpt(f[j],f[j],!0),h.appendChild(g),this.hasStoredValues=!0)}else if(this["col"+e]==this.fltTypeCheckList){var i=this.Cpt.checkList,k=i.checkListDiv[e];k.title=k.innerHTML,k.innerHTML="";var l=dom.create("ul",["id",this.fltIds[e]],["colIndex",e]);l.className=i.checkListCssClass;var m=dom.createCheckItem(this.fltIds[e]+"_0","",this.displayAllText);for(m.className=i.checkListItemCssClass,l.appendChild(m),k.appendChild(l),f=b[e].split(" "+this.orOperator+" "),j=0;j<f.length;j++)if(""!==f[j]){var n=dom.createCheckItem(this.fltIds[e]+"_"+(j+1),f[j],f[j]);n.className=i.checkListItemCssClass,l.appendChild(n),n.check.checked=!0,i.setCheckListValues(n.check),this.hasStoredValues=!0}}}!this.hasStoredValues&&this.paging&&this.Cpt.paging.setPagingInfo()}}}},filter:{value:function(){this.EvtManager(this.Evt.name.filter)}},_filter:{value:function(){function a(a,b,c){if(f.highlightKeywords&&b){a=a.replace(n,""),a=a.replace(o,""),a=a.replace(p,""),a=a.replace(q,"");var d=a;(i.test(a)||j.test(a)||k.test(a)||l.test(a)||m.test(a))&&(d=dom.getText(c)),""!==d&&f.Cpt.highlightKeyword.highlight(c,d,f.Cpt.highlightKeyword.highlightCssClass)}}function b(a,b,c){var e,v,w,x=k.test(a),y=i.test(a),z=l.test(a),A=j.test(a),B=m.test(a),C=o.test(a),E=n.test(a),F=(r.test(a),p.test(a)),G=q.test(a),H=s===a,I=t===a,J=u.test(a),K=x&&isValidDate(a.replace(k,""),D),L=y&&isValidDate(a.replace(i,""),D),M=z&&isValidDate(a.replace(l,""),D),N=A&&isValidDate(a.replace(j,""),D),O=B&&isValidDate(a.replace(m,""),D),P=C&&isValidDate(a.replace(o,""),D);if(isValidDate(b,D))v=formatDate(b,D),K?(w=formatDate(a.replace(k,""),D),e=w>v):L?(w=formatDate(a.replace(i,""),D),e=w>=v):N?(w=formatDate(a.replace(j,""),D),e=v>=w):M?(w=formatDate(a.replace(l,""),D),e=v>w):O?(w=formatDate(a.replace(m,""),D),e=v.toString()!=w.toString()):P?(w=formatDate(a.replace(o,""),D),e=v.toString()==w.toString()):n.test(a)?e=f._containsStr(a.replace(n,""),b,null,!1):isValidDate(a,D)?(w=formatDate(a,D),e=v.toString()==w.toString()):H?e=str.isEmpty(b):I&&(e=!str.isEmpty(b));else if(f.hasColNbFormat&&f.colNbFormat[c]?(g=removeNbFormat(b,f.colNbFormat[c]),h=f.colNbFormat[c]):","===f.thousandsSeparator&&"."===f.decimalSeparator?(g=removeNbFormat(b,"us"),h="us"):(g=removeNbFormat(b,"eu"),h="eu"),y)e=g<=removeNbFormat(a.replace(i,""),h);else if(A)e=g>=removeNbFormat(a.replace(j,""),h);else if(x)e=g<removeNbFormat(a.replace(k,""),h);else if(z)e=g>removeNbFormat(a.replace(l,""),h);else if(B)e=f._containsStr(a.replace(m,""),b)?!1:!0;else if(E)e=f._containsStr(a.replace(n,""),b,null,!1);else if(C)e=f._containsStr(a.replace(o,""),b,null,!0);else if(F)e=0===b.indexOf(a.replace(p,""))?!0:!1;else if(G){var Q=a.replace(q,"");e=b.lastIndexOf(Q,b.length-1)===b.length-1-(Q.length-1)&&b.lastIndexOf(Q,b.length-1)>-1?!0:!1}else if(H)e=str.isEmpty(b);else if(I)e=!str.isEmpty(b);else if(J)try{var R=a.replace(u,""),S=new RegExp(R);e=S.test(b)}catch(T){e=!1}else{var U=d["col_"+c];e=f._containsStr(a,b,U?U:f.fltTypeInp)}return e}if(this.fltGrid&&(this._hasGrid||this.isFirstLoad)){this.onBeforeFilter&&this.onBeforeFilter.call(null,this);var c=this.tbl.rows,d=this.cfg,e=0;this.validRowsIndex=[];var f=this;this.highlightKeywords&&this.Cpt.highlightKeyword.unhighlightAll(),this.popUpFilters&&this.Cpt.popupFilter.buildIcons(),this.markActiveColumns&&this.clearActiveColumns(),this.searchArgs=this.getFiltersValue();for(var g,h,i=new RegExp(this.leOperator),j=new RegExp(this.geOperator),k=new RegExp(this.lwOperator),l=new RegExp(this.grOperator),m=new RegExp(this.dfOperator),n=new RegExp(str.rgxEsc(this.lkOperator)),o=new RegExp(this.eqOperator),p=new RegExp(this.stOperator),q=new RegExp(this.enOperator),r=new RegExp(this.anOperator),s=(new RegExp(this.curExp),this.emOperator),t=this.nmOperator,u=new RegExp(str.rgxEsc(this.rgxOperator)),v=this.refRow;v<this.nbRows;v++){"none"===c[v].style.display&&(c[v].style.display="");var w=c[v].cells,x=w.length;if(x===this.nbCells){for(var y=[],z="include"===this.searchType?!0:!1,A=!1,B=0;x>B;B++){var C=this.searchArgs[this.singleSearchFlt?0:B],D=this.hasColDateType?this.colDateType[B]:this.defaultDateType;if(""!==C){var E=str.matchCase(this.getCellData(B,w[B]),this.matchCase),F=C.split(this.orOperator),G=F.length>1?!0:!1,H=C.split(this.anOperator),I=H.length>1?!0:!1;if(G||I){for(var J,K=!1,L=G?F:H,M=0;M<L.length&&(J=str.trim(L[M]),K=b(J,E,B),a(J,K,w[B]),!G||!K)&&(!I||K);M++);y[B]=K}else y[B]=b(str.trim(C),E,B),a(C,y[B],w[B]);y[B]||(z="include"===this.searchType?!1:!0),this.singleSearchFlt&&y[B]&&(A=!0),this.popUpFilters&&this.Cpt.popupFilter.buildIcon(B,!0),this.markActiveColumns&&v===this.refRow&&(this.onBeforeActiveColumn&&this.onBeforeActiveColumn.call(null,this,B),dom.addClass(this.getHeaderElement(B),this.activeColumnsCssClass),this.onAfterActiveColumn&&this.onAfterActiveColumn.call(null,this,B))}}this.singleSearchFlt&&A&&(z=!0),z?(this.validateRow(v,!0),this.validRowsIndex.push(v),this.alternateBgs&&this.Cpt.alternateRows.setRowBg(v,this.validRowsIndex.length),this.onRowValidated&&this.onRowValidated.call(null,this,v)):(this.validateRow(v,!1),this.hasVisibleRows&&array.has(this.visibleRows,v)&&!this.paging?this.validRowsIndex.push(v):e++)}}this.nbVisibleRows=this.validRowsIndex.length,this.nbHiddenRows=e,this.isStartBgAlternate=!1,this.rememberGridValues&&this.Cpt.store.saveFilterValues(this.fltsValuesCookie),this.paging?(this.startPagingRow=0,this.currentPageNb=1,this.Cpt.paging.setPagingInfo(this.validRowsIndex)):this.applyGridProps(),this.onAfterFilter&&this.onAfterFilter.call(null,this)}}},applyGridProps:{value:function(){this.activeFlt&&str.lower(this.activeFlt.nodeName)===this.fltTypeSlc&&!this.popUpFilters&&(this.activeFlt.blur(),this.activeFlt.parentNode&&this.activeFlt.parentNode.focus()),this.visibleRows&&this.enforceVisibility(),this.hasColOperation&&this.Cpt.colOps.calc(),this.linkedFilters&&this.linkFilters();var a=!this.paging&&this.hasVisibleRows?this.nbVisibleRows-this.visibleRows.length:this.nbVisibleRows;this.rowsCounter&&this.Cpt.rowsCounter.refresh(a),this.popUpFilters&&this.Cpt.popupFilter.closeAll()}},getColValues:{value:function(a,b,c){if(this.fltGrid){for(var d=this.tbl.rows,e=[],f=this.refRow;f<this.nbRows;f++){var g=!1;c&&types.isArray(c)&&(g=array.has(c,f));var h=d[f].cells,i=h.length;if(i==this.nbCells&&!g)for(var j=0;i>j;j++)if(j===a&&""===d[f].style.display){var k=str.lower(this.getCellData(j,h[j])),l=this.colNbFormat?this.colNbFormat[a]:null,m=b?removeNbFormat(k,l):k;e.push(m)}}return e}}},getFilterValue:{value:function(a){if(this.fltGrid){var b,c=this.getFilterElement(a);if(!c)return"";var d=this.fltCol[a];if(d!==this.fltTypeMulti&&d!==this.fltTypeCheckList)b=c.value;else if(d===this.fltTypeMulti){b="";for(var e=0;e<c.options.length;e++)c.options[e].selected&&(b=b.concat(c.options[e].value+" "+this.orOperator+" "));b=b.substr(0,b.length-4)}else d===this.fltTypeCheckList&&(null!==c.getAttribute("value")?(b=c.getAttribute("value"),b=b.substr(0,b.length-3)):b="");return b}}},getFiltersValue:{value:function(){if(this.fltGrid){for(var a=[],b=0;b<this.fltIds.length;b++)a.push(str.trim(str.matchCase(this.getFilterValue(b),this.matchCase)));return a}}},getFilterId:{value:function(a){return this.fltGrid?this.fltIds[i]:void 0}},getFiltersByType:{value:function(a,b){if(this.fltGrid){for(var c=[],d=0;d<this.fltIds.length;d++){var e=this["col"+d];if(e===str.lower(a)){var f=b?d:this.fltIds[d];c.push(f)}}return c}}},
getFilterElement:{value:function(a){return this.fltGrid?dom.id(this.fltIds[a]):null}},getCellsNb:{value:function(a){var b=a?this.tbl.rows[a]:this.tbl.rows[0];return b.cells.length}},getRowsNb:{value:function(a){var b=this.refRow?this.refRow:0,c=this.tbl.rows.length;return a&&(b=0),parseInt(c-b,10)}},getCellData:{value:function(a,b){return void 0!==a&&b?this.customCellData&&array.has(this.customCellDataCols,a)?this.customCellData.call(null,this,b,a):dom.getText(b):""}},getTableData:{value:function(){for(var a=this.tbl.rows,b=this.refRow;b<this.nbRows;b++){for(var c=[b,[]],d=a[b].cells,e=0;e<d.length;e++){var f=this.getCellData(e,d[e]);c[1].push(f)}this.tblData.push(c)}return this.tblData}},getFilteredData:{value:function(a){if(!this.validRowsIndex)return[];var b=this.tbl.rows,c=[];if(a){for(var d=this.gridLayout?this.Cpt.gridLayout.headTbl:this.tbl,e=d.rows[this.headersRow],f=[e.rowIndex,[]],g=0;g<this.nbCells;g++){var h=this.getCellData(g,e.cells[g]);f[1].push(h)}c.push(f)}for(var i=this.getValidRowsIndex(!0),j=0;j<i.length;j++){for(var k=[this.validRowsIndex[j],[]],l=b[this.validRowsIndex[j]].cells,m=0;m<l.length;m++){var n=this.getCellData(m,l[m]);k[1].push(n)}c.push(k)}return c}},getFilteredDataCol:{value:function(a){if(void 0===a)return[];for(var b=this.getFilteredData(),c=[],d=0;d<b.length;d++){var e=b[d],f=e[1],g=f[a];c.push(g)}return c}},getRowDisplay:{value:function(a){return this.fltGrid||types.isObj(a)?a.style.display:void 0}},validateRow:{value:function(a,b){var c=this.tbl.rows[a];if(c&&"boolean"===str.lower(typeof b)){this.hasVisibleRows&&array.has(this.visibleRows,a)&&!this.paging&&(b=!0);var d=b?"":"none",e=b?"true":"false";c.style.display=d,this.paging&&c.setAttribute("validRow",e)}}},validateAllRows:{value:function(){if(this._hasGrid){this.validRowsIndex=[];for(var a=this.refRow;a<this.nbFilterableRows;a++)this.validateRow(a,!0),this.validRowsIndex.push(a)}}},setFilterValue:{value:function(a,b,c){if((this.fltGrid||this.isFirstLoad)&&this.getFilterElement(a)){var d=this.getFilterElement(a),e=this["col"+a];if(b=void 0===b?"":b,e!==this.fltTypeMulti&&e!=this.fltTypeCheckList)d.value=b;else if(e===this.fltTypeMulti)for(var f=b.split(" "+this.orOperator+" "),g=0;g<d.options.length;g++)(""===f||""===f[0])&&(d.options[g].selected=!1),""===d.options[g].value&&(d.options[g].selected=!1),""!==d.options[g].value&&array.has(f,d.options[g].value,!0)&&(d.options[g].selected=!0);else if(e===this.fltTypeCheckList){b=str.matchCase(b,this.matchCase);for(var h=b.split(" "+this.orOperator+" "),i=(d.setAttribute("value",""),d.setAttribute("indexes",""),0);i<dom.tag(d,"li").length;i++){var j=dom.tag(d,"li")[i],k=dom.tag(j,"label")[0],l=dom.tag(j,"input")[0],m=str.matchCase(dom.getText(k),this.matchCase);""!==m&&array.has(h,m,!0)?(l.checked=!0,this.Cpt.checkList.setCheckListValues(l)):(l.checked=!1,this.Cpt.checkList.setCheckListValues(l))}}}}},setColWidths:{value:function(a){function b(a){if((d||d.nbCells==d.colWidth.length)&&d.nbCells==a.cells.length)for(var b=0;b<d.nbCells;b++)a.cells[b].style.width=d.colWidth[b]}if(this.fltGrid&&this.hasColWidth){var c,d=this;c=void 0===a?"none"!=this.tbl.rows[0].style.display?0:1:a,b(this.tbl.rows[c])}}},enforceVisibility:{value:function(){if(this._hasGrid&&this.hasVisibleRows&&!this.paging)for(var a=0;a<this.visibleRows.length;a++)this.visibleRows[a]<=this.nbRows&&this.validateRow(this.visibleRows[a],!0)}},clearFilters:{value:function(){this.EvtManager(this.Evt.name.clear)}},_clearFilters:{value:function(){if(this.fltGrid){this.onBeforeReset&&this.onBeforeReset.call(null,this,this.getFiltersValue());for(var a=0;a<this.fltIds.length;a++)this.setFilterValue(a,"");this.linkedFilters&&(this.activeFilterId="",this.linkFilters()),this.rememberPageLen&&cookie.remove(this.pgLenCookie),this.rememberPageNb&&cookie.remove(this.pgNbCookie),this.onAfterReset&&this.onAfterReset.call(null,this)}}},clearActiveColumns:{value:function(){for(var a=0;a<this.fltIds.length;a++)dom.removeClass(this.getHeaderElement(a),this.activeColumnsCssClass)}},refresh:{value:function(a){var b=a?a:this.cfg,c=this.sort;c&&(this.sort=!1),this.nbRows=this.getRowsNb(),this.remove(),window["tf_"+this.id]=new TableFilter(this.id,this.startRow,b),this.isFirstLoad=!0,this.fltIds=[],this.init(),c&&(this.st.setTBody(this.tbl.tBodies[0]),this.sort=!0)}},linkFilters:{value:function(){var a=this.getFiltersByType(this.fltTypeSlc,!0),b=this.getFiltersByType(this.fltTypeMulti,!0),c=this.getFiltersByType(this.fltTypeCheckList,!0),d=a.concat(b);if(d=d.concat(c),this.activeFilterId){var e=this.activeFilterId.split("_")[0];e=e.split(this.prfxFlt)[1];for(var f,g=0;g<d.length;g++){var h=dom.id(this.fltIds[d[g]]);if(f=this.getFilterValue(d[g]),e!==d[g]||this.paging&&array.has(a,d[g])&&e===d[g]||!this.paging&&(array.has(c,d[g])||array.has(b,d[g]))||f===this.displayAllText){if(array.has(c,d[g])?this.Cpt.checkList.checkListDiv[d[g]].innerHTML="":h.innerHTML="",this.fillSlcOnDemand){var i=dom.createOpt(this.displayAllText,"");h&&h.appendChild(i)}array.has(c,d[g])?this.Cpt.checkList._build(d[g]):this.Cpt.dropdown._build(d[g],!0),this.setFilterValue(d[g],f)}}}}},_resetGrid:{value:function(){function a(a){a.tbl.deleteRow(a.filtersRowIndex),a.remove(),a.fltIds=[],a.isFirstLoad=!0,a.popUpFilters&&a.Cpt.popupFilter.destroy(),a._AddGrid()}if(!this.isFirstLoad){if(this.gridLayout||this.tbl.rows[this.filtersRowIndex].parentNode.insertBefore(this.fltGridEl,this.tbl.rows[this.filtersRowIndex]),this.isExternalFlt)for(var b=0;b<this.externalFltTgtIds.length;b++){var c=dom.id(this.externalFltTgtIds[b]);if(c){c.appendChild(this.externalFltEls[b]);var d=this["col"+b];this.gridLayout&&""===this.externalFltEls[b].innerHTML&&d!==this.fltTypeInp&&((d===this.fltTypeSlc||d===this.fltTypeMulti)&&this.Cpt.dropdown.build(b),d===this.fltTypeCheckList&&this.Cpt.checkList.build(b))}}this.nbFilterableRows=this.getRowsNb(),this.nbVisibleRows=this.nbFilterableRows,this.nbRows=this.tbl.rows.length,this.isSortEnabled&&(this.sort=!0),""===this.tbl.rows[this.filtersRowIndex].innerHTML?a(this):this.popUpFilters&&(this.headersRow++,this.Cpt.popupFilter.buildAll()),this.gridLayout||dom.addClass(this.tbl,this.prfxTf),this._hasGrid=!0}}},_containsStr:{value:function(a,b,c,d){var e,f=this.matchCase?"g":"gi",g=d?d:this.exactMatch;return e=g||c!==this.fltTypeInp&&c?new RegExp("(^\\s*)"+str.rgxEsc(a)+"(\\s*$)",f):new RegExp(str.rgxEsc(a),f),e.test(b)}},isImported:{value:function(a,b){for(var c=!1,d=b?b:"script",e="script"==d?"src":"href",f=dom.tag(doc,d),g=0;g<f.length;g++)if(void 0!==f[g][e]&&f[g][e].match(a)){c=!0;break}return c}},includeFile:{value:function(a,b,c,d){var e=d?d:"script",f=this.isImported(b,e);if(!f){var g,h=this,i=!1,j=dom.tag(doc,"head")[0];g="link"===str.lower(e)?dom.create("link",["id",a],["type","text/css"],["rel","stylesheet"],["href",b]):dom.create("script",["id",a],["type","text/javascript"],["src",b]),g.onload=g.onreadystatechange=function(){i||this.readyState&&"loaded"!==this.readyState&&"complete"!==this.readyState||(i=!0,"function"==typeof c&&c.call(null,h))},g.onerror=function(){throw new Error("TF script could not load: "+b)},j.appendChild(g)}}},hasGrid:{value:function(){return this._hasGrid}},getFiltersId:{value:function(){return this._hasGrid?this.fltIds:void 0}},getValidRowsIndex:{value:function(a){if(this._hasGrid){if(!a)return this.validRowsIndex;this.validRowsIndex=[];for(var b=this.refRow;b<this.getRowsNb(!0);b++){var c=this.tbl.rows[b];this.paging?("true"===c.getAttribute("validRow")||null===c.getAttribute("validRow"))&&this.validRowsIndex.push(c.rowIndex):"none"!==this.getRowDisplay(c)&&this.validRowsIndex.push(c.rowIndex)}return this.validRowsIndex}}},getFiltersRowIndex:{value:function(){return this._hasGrid?this.filtersRowIndex:void 0}},getHeadersRowIndex:{value:function(){return this._hasGrid?this.headersRow:void 0}},getStartRowIndex:{value:function(){return this._hasGrid?this.refRow:void 0}},getLastRowIndex:{value:function(){return this._hasGrid?this.nbRows-1:void 0}},getHeaderElement:{value:function(a){for(var b,c=this.gridLayout?this.Cpt.gridLayout.headTbl:this.tbl,d=dom.tag(c,"thead"),e=this.headersRow,f=0;f<this.nbCells;f++)if(f===a){0===d.length&&(b=c.rows[e].cells[f]),1===d.length&&(b=d[0].rows[e].cells[f]);break}return b}},config:{value:function(){return this.cfg}},getFilterableRowsNb:{value:function(){return this.getRowsNb(!1)}}}),TableFilter}();module.exports=TableFilter}),require("tablefilter")});