text: function company_id_not_empty(e,t,n,a){""!=$("#frm_company #company_id").val()&&""!=$.trim(e.val())&&t.push("required")}!function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery"],function(t){return e(t,window,document)}):"object"==typeof exports?module.exports=function(t,n){return t||(t=window),n||(n="undefined"!=typeof window?require("jquery"):require("jquery")(t)),e(n,t,t.document)}:e(jQuery,window,document)}(function(e,t,n,a){"use strict";function r(t){var n,a,i="a aa ai ao as b fn i m o s ",o={};e.each(t,function(e,s){n=e.match(/^([^A-Z]+?)([A-Z])/),n&&i.indexOf(n[1]+" ")!==-1&&(a=e.replace(n[0],n[2].toLowerCase()),o[a]=e,"o"===n[1]&&r(t[e]))}),t._hungarianMap=o}function i(t,n,o){t._hungarianMap||r(t);var s;e.each(n,function(r,l){s=t._hungarianMap[r],s===a||!o&&n[s]!==a||("o"===s.charAt(0)?(n[s]||(n[s]={}),e.extend(!0,n[s],n[r]),i(t[s],n[s],o)):n[s]=n[r])})}function o(e){var t=Xe.defaults.oLanguage,n=e.sZeroRecords;!e.sEmptyTable&&n&&"No data available in table"===t.sEmptyTable&&Le(e,e,"sZeroRecords","sEmptyTable"),!e.sLoadingRecords&&n&&"Loading..."===t.sLoadingRecords&&Le(e,e,"sZeroRecords","sLoadingRecords"),e.sInfoThousands&&(e.sThousands=e.sInfoThousands);var a=e.sDecimal;a&&Ee(a)}function s(e){ht(e,"ordering","bSort"),ht(e,"orderMulti","bSortMulti"),ht(e,"orderClasses","bSortClasses"),ht(e,"orderCellsTop","bSortCellsTop"),ht(e,"order","aaSorting"),ht(e,"orderFixed","aaSortingFixed"),ht(e,"paging","bPaginate"),ht(e,"pagingType","sPaginationType"),ht(e,"pageLength","iDisplayLength"),ht(e,"searching","bFilter"),"boolean"==typeof e.sScrollX&&(e.sScrollX=e.sScrollX?"100%":""),"boolean"==typeof e.scrollX&&(e.scrollX=e.scrollX?"100%":"");var t=e.aoSearchCols;if(t)for(var n=0,a=t.length;n<a;n++)t[n]&&i(Xe.models.oSearch,t[n])}function l(t){ht(t,"orderable","bSortable"),ht(t,"orderData","aDataSort"),ht(t,"orderSequence","asSorting"),ht(t,"orderDataType","sortDataType");var n=t.aDataSort;n&&!e.isArray(n)&&(t.aDataSort=[n])}function c(n){if(!Xe.__browser){var a={};Xe.__browser=a;var r=e("<div/>").css({position:"fixed",top:0,left:e(t).scrollLeft()*-1,height:1,width:1,overflow:"hidden"}).append(e("<div/>").css({position:"absolute",top:1,left:1,width:100,overflow:"scroll"}).append(e("<div/>").css({width:"100%",height:10}))).appendTo("body"),i=r.children(),o=i.children();a.barWidth=i[0].offsetWidth-i[0].clientWidth,a.bScrollOversize=100===o[0].offsetWidth&&100!==i[0].clientWidth,a.bScrollbarLeft=1!==Math.round(o.offset().left),a.bBounding=!!r[0].getBoundingClientRect().width,r.remove()}e.extend(n.oBrowser,Xe.__browser),n.oScroll.iBarWidth=Xe.__browser.barWidth}function u(e,t,n,r,i,o){var s,l=r,c=!1;for(n!==a&&(s=n,c=!0);l!==i;)e.hasOwnProperty(l)&&(s=c?t(s,e[l],l,e):e[l],c=!0,l+=o);return s}function d(t,a){var r=Xe.defaults.column,i=t.aoColumns.length,o=e.extend({},Xe.models.oColumn,r,{nTh:a?a:n.createElement("th"),sTitle:r.sTitle?r.sTitle:a?a.innerHTML:"",aDataSort:r.aDataSort?r.aDataSort:[i],mData:r.mData?r.mData:i,idx:i});t.aoColumns.push(o);var s=t.aoPreSearchCols;s[i]=e.extend({},Xe.models.oSearch,s[i]),f(t,i,e(a).data())}function f(t,n,r){var o=t.aoColumns[n],s=t.oClasses,c=e(o.nTh);if(!o.sWidthOrig){o.sWidthOrig=c.attr("width")||null;var u=(c.attr("style")||"").match(/width:\s*(\d+[pxem%]+)/);u&&(o.sWidthOrig=u[1])}r!==a&&null!==r&&(l(r),i(Xe.defaults.column,r),r.mDataProp===a||r.mData||(r.mData=r.mDataProp),r.sType&&(o._sManualType=r.sType),r.className&&!r.sClass&&(r.sClass=r.className),e.extend(o,r),Le(o,r,"sWidth","sWidthOrig"),r.iDataSort!==a&&(o.aDataSort=[r.iDataSort]),Le(o,r,"aDataSort"));var d=o.mData,f=I(d),h=o.mRender?I(o.mRender):null,p=function(e){return"string"==typeof e&&e.indexOf("@")!==-1};o._bAttrSrc=e.isPlainObject(d)&&(p(d.sort)||p(d.type)||p(d.filter)),o._setter=null,o.fnGetData=function(e,t,n){var r=f(e,t,a,n);return h&&t?h(r,t,e,n):r},o.fnSetData=function(e,t,n){return A(d)(e,t,n)},"number"!=typeof d&&(t._rowReadObject=!0),t.oFeatures.bSort||(o.bSortable=!1,c.addClass(s.sSortableNone));var g=e.inArray("asc",o.asSorting)!==-1,m=e.inArray("desc",o.asSorting)!==-1;o.bSortable&&(g||m)?g&&!m?(o.sSortingClass=s.sSortableAsc,o.sSortingClassJUI=s.sSortJUIAscAllowed):!g&&m?(o.sSortingClass=s.sSortableDesc,o.sSortingClassJUI=s.sSortJUIDescAllowed):(o.sSortingClass=s.sSortable,o.sSortingClassJUI=s.sSortJUI):(o.sSortingClass=s.sSortableNone,o.sSortingClassJUI="")}function h(e){if(e.oFeatures.bAutoWidth!==!1){var t=e.aoColumns;be(e);for(var n=0,a=t.length;n<a;n++)t[n].nTh.style.width=t[n].sWidth}var r=e.oScroll;""===r.sY&&""===r.sX||ge(e),Oe(e,null,"column-sizing",[e])}function p(e,t){var n=b(e,"bVisible");return"number"==typeof n[t]?n[t]:null}function g(t,n){var a=b(t,"bVisible"),r=e.inArray(n,a);return r!==-1?r:null}function m(t){var n=0;return e.each(t.aoColumns,function(t,a){a.bVisible&&"none"!==e(a.nTh).css("display")&&n++}),n}function b(t,n){var a=[];return e.map(t.aoColumns,function(e,t){e[n]&&a.push(t)}),a}function v(e){var t,n,r,i,o,s,l,c,u,d=e.aoColumns,f=e.aoData,h=Xe.ext.type.detect;for(t=0,n=d.length;t<n;t++)if(l=d[t],u=[],!l.sType&&l._sManualType)l.sType=l._sManualType;else if(!l.sType){for(r=0,i=h.length;r<i;r++){for(o=0,s=f.length;o<s&&(u[o]===a&&(u[o]=C(e,o,t,"type")),c=h[r](u[o],e),c||r===h.length-1)&&"html"!==c;o++);if(c){l.sType=c;break}}l.sType||(l.sType="string")}}function y(t,n,r,i){var o,s,l,c,u,f,h,p=t.aoColumns;if(n)for(o=n.length-1;o>=0;o--){h=n[o];var g=h.targets!==a?h.targets:h.aTargets;for(e.isArray(g)||(g=[g]),l=0,c=g.length;l<c;l++)if("number"==typeof g[l]&&g[l]>=0){for(;p.length<=g[l];)d(t);i(g[l],h)}else if("number"==typeof g[l]&&g[l]<0)i(p.length+g[l],h);else if("string"==typeof g[l])for(u=0,f=p.length;u<f;u++)("_all"==g[l]||e(p[u].nTh).hasClass(g[l]))&&i(u,h)}if(r)for(o=0,s=r.length;o<s;o++)i(o,r[o])}function S(t,n,r,i){var o=t.aoData.length,s=e.extend(!0,{},Xe.models.oRow,{src:r?"dom":"data",idx:o});s._aData=n,t.aoData.push(s);for(var l=t.aoColumns,c=0,u=l.length;c<u;c++)l[c].sType=null;t.aiDisplayMaster.push(o);var d=t.rowIdFn(n);return d!==a&&(t.aIds[d]=s),!r&&t.oFeatures.bDeferRender||k(t,o,r,i),o}function _(t,n){var a;return n instanceof e||(n=e(n)),n.map(function(e,n){return a=L(t,n),S(t,a.data,n,a.cells)})}function D(e,t){return t._DT_RowIndex!==a?t._DT_RowIndex:null}function w(t,n,a){return e.inArray(a,t.aoData[n].anCells)}function C(e,t,n,r){var i=e.iDraw,o=e.aoColumns[n],s=e.aoData[t]._aData,l=o.sDefaultContent,c=o.fnGetData(s,r,{settings:e,row:t,col:n});if(c===a)return e.iDrawError!=i&&null===l&&(je(e,0,"Requested unknown parameter "+("function"==typeof o.mData?"{function}":"'"+o.mData+"'")+" for row "+t+", column "+n,4),e.iDrawError=i),l;if(c!==s&&null!==c||null===l||r===a){if("function"==typeof c)return c.call(s)}else c=l;return null===c&&"display"==r?"":c}function x(e,t,n,a){var r=e.aoColumns[n],i=e.aoData[t]._aData;r.fnSetData(i,a,{settings:e,row:t,col:n})}function T(t){return e.map(t.match(/(\\.|[^\.])+/g)||[""],function(e){return e.replace(/\\\./g,".")})}function I(t){if(e.isPlainObject(t)){var n={};return e.each(t,function(e,t){t&&(n[e]=I(t))}),function(e,t,r,i){var o=n[t]||n._;return o!==a?o(e,t,r,i):e}}if(null===t)return function(e){return e};if("function"==typeof t)return function(e,n,a,r){return t(e,n,a,r)};if("string"!=typeof t||t.indexOf(".")===-1&&t.indexOf("[")===-1&&t.indexOf("(")===-1)return function(e,n){return e[t]};var r=function(t,n,i){var o,s,l,c;if(""!==i)for(var u=T(i),d=0,f=u.length;d<f;d++){if(o=u[d].match(pt),s=u[d].match(gt),o){if(u[d]=u[d].replace(pt,""),""!==u[d]&&(t=t[u[d]]),l=[],u.splice(0,d+1),c=u.join("."),e.isArray(t))for(var h=0,p=t.length;h<p;h++)l.push(r(t[h],n,c));var g=o[0].substring(1,o[0].length-1);t=""===g?l:l.join(g);break}if(s)u[d]=u[d].replace(gt,""),t=t[u[d]]();else{if(null===t||t[u[d]]===a)return a;t=t[u[d]]}}return t};return function(e,n){return r(e,n,t)}}function A(t){if(e.isPlainObject(t))return A(t._);if(null===t)return function(){};if("function"==typeof t)return function(e,n,a){t(e,"set",n,a)};if("string"!=typeof t||t.indexOf(".")===-1&&t.indexOf("[")===-1&&t.indexOf("(")===-1)return function(e,n){e[t]=n};var n=function(t,r,i){for(var o,s,l,c,u,d=T(i),f=d[d.length-1],h=0,p=d.length-1;h<p;h++){if(s=d[h].match(pt),l=d[h].match(gt),s){if(d[h]=d[h].replace(pt,""),t[d[h]]=[],o=d.slice(),o.splice(0,h+1),u=o.join("."),e.isArray(r))for(var g=0,m=r.length;g<m;g++)c={},n(c,r[g],u),t[d[h]].push(c);else t[d[h]]=r;return}l&&(d[h]=d[h].replace(gt,""),t=t[d[h]](r)),null!==t[d[h]]&&t[d[h]]!==a||(t[d[h]]={}),t=t[d[h]]}f.match(gt)?t=t[f.replace(gt,"")](r):t[f.replace(pt,"")]=r};return function(e,a){return n(e,a,t)}}function F(e){return st(e.aoData,"_aData")}function P(e){e.aoData.length=0,e.aiDisplayMaster.length=0,e.aiDisplay.length=0,e.aIds={}}function R(e,t,n){for(var r=-1,i=0,o=e.length;i<o;i++)e[i]==t?r=i:e[i]>t&&e[i]--;r!=-1&&n===a&&e.splice(r,1)}function j(e,t,n,r){var i,o,s=e.aoData[t],l=function(n,a){for(;n.childNodes.length;)n.removeChild(n.firstChild);n.innerHTML=C(e,t,a,"display")};if("dom"!==n&&(n&&"auto"!==n||"dom"!==s.src)){var c=s.anCells;if(c)if(r!==a)l(c[r],r);else for(i=0,o=c.length;i<o;i++)l(c[i],i)}else s._aData=L(e,s,r,r===a?a:s._aData).data;s._aSortData=null,s._aFilterData=null;var u=e.aoColumns;if(r!==a)u[r].sType=null;else{for(i=0,o=u.length;i<o;i++)u[i].sType=null;N(e,s)}}function L(t,n,r,i){var o,s,l,c=[],u=n.firstChild,d=0,f=t.aoColumns,h=t._rowReadObject;i=i!==a?i:h?{}:[];var p=function(e,t){if("string"==typeof e){var n=e.indexOf("@");if(n!==-1){var a=e.substring(n+1),r=A(e);r(i,t.getAttribute(a))}}},g=function(t){if(r===a||r===d)if(s=f[d],l=e.trim(t.innerHTML),s&&s._bAttrSrc){var n=A(s.mData._);n(i,l),p(s.mData.sort,t),p(s.mData.type,t),p(s.mData.filter,t)}else h?(s._setter||(s._setter=A(s.mData)),s._setter(i,l)):i[d]=l;d++};if(u)for(;u;)o=u.nodeName.toUpperCase(),"TD"!=o&&"TH"!=o||(g(u),c.push(u)),u=u.nextSibling;else{c=n.anCells;for(var m=0,b=c.length;m<b;m++)g(c[m])}var v=n.firstChild?n:n.nTr;if(v){var y=v.getAttribute("id");y&&A(t.rowId)(i,y)}return{data:i,cells:c}}function k(t,a,r,i){var o,s,l,c,u,d=t.aoData[a],f=d._aData,h=[];if(null===d.nTr){for(o=r||n.createElement("tr"),d.nTr=o,d.anCells=h,o._DT_RowIndex=a,N(t,d),c=0,u=t.aoColumns.length;c<u;c++)l=t.aoColumns[c],s=r?i[c]:n.createElement(l.sCellType),s._DT_CellIndex={row:a,column:c},h.push(s),r&&!l.mRender&&l.mData===c||e.isPlainObject(l.mData)&&l.mData._===c+".display"||(s.innerHTML=C(t,a,c,"display")),l.sClass&&(s.className+=" "+l.sClass),l.bVisible&&!r?o.appendChild(s):!l.bVisible&&r&&s.parentNode.removeChild(s),l.fnCreatedCell&&l.fnCreatedCell.call(t.oInstance,s,C(t,a,c),f,a,c);Oe(t,"aoRowCreatedCallback",null,[o,f,a])}d.nTr.setAttribute("role","row")}function N(t,n){var a=n.nTr,r=n._aData;if(a){var i=t.rowIdFn(r);if(i&&(a.id=i),r.DT_RowClass){var o=r.DT_RowClass.split(" ");n.__rowc=n.__rowc?ft(n.__rowc.concat(o)):o,e(a).removeClass(n.__rowc.join(" ")).addClass(r.DT_RowClass)}r.DT_RowAttr&&e(a).attr(r.DT_RowAttr),r.DT_RowData&&e(a).data(r.DT_RowData)}}function H(t){var n,a,r,i,o,s=t.nTHead,l=t.nTFoot,c=0===e("th, td",s).length,u=t.oClasses,d=t.aoColumns;for(c&&(i=e("<tr/>").appendTo(s)),n=0,a=d.length;n<a;n++)o=d[n],r=e(o.nTh).addClass(o.sClass),c&&r.appendTo(i),t.oFeatures.bSort&&(r.addClass(o.sSortingClass),o.bSortable!==!1&&(r.attr("tabindex",t.iTabIndex).attr("aria-controls",t.sTableId),Te(t,o.nTh,n))),o.sTitle!=r[0].innerHTML&&r.html(o.sTitle),We(t,"header")(t,r,o,u);if(c&&U(t.aoHeader,s),e(s).find(">tr").attr("role","row"),e(s).find(">tr>th, >tr>td").addClass(u.sHeaderTH),e(l).find(">tr>th, >tr>td").addClass(u.sFooterTH),null!==l){var f=t.aoFooter[0];for(n=0,a=f.length;n<a;n++)o=d[n],o.nTf=f[n].cell,o.sClass&&e(o.nTf).addClass(o.sClass)}}function O(t,n,r){var i,o,s,l,c,u,d,f,h,p=[],g=[],m=t.aoColumns.length;if(n){for(r===a&&(r=!1),i=0,o=n.length;i<o;i++){for(p[i]=n[i].slice(),p[i].nTr=n[i].nTr,s=m-1;s>=0;s--)t.aoColumns[s].bVisible||r||p[i].splice(s,1);g.push([])}for(i=0,o=p.length;i<o;i++){if(d=p[i].nTr)for(;u=d.firstChild;)d.removeChild(u);for(s=0,l=p[i].length;s<l;s++)if(f=1,h=1,g[i][s]===a){for(d.appendChild(p[i][s].cell),g[i][s]=1;p[i+f]!==a&&p[i][s].cell==p[i+f][s].cell;)g[i+f][s]=1,f++;for(;p[i][s+h]!==a&&p[i][s].cell==p[i][s+h].cell;){for(c=0;c<f;c++)g[i+c][s+h]=1;h++}e(p[i][s].cell).attr("rowspan",f).attr("colspan",h)}}}}function $(t){var n=Oe(t,"aoPreDrawCallback","preDraw",[t]);if(e.inArray(!1,n)!==-1)return void he(t,!1);var r=[],i=0,o=t.asStripeClasses,s=o.length,l=(t.aoOpenRows.length,t.oLanguage),c=t.iInitDisplayStart,u="ssp"==Me(t),d=t.aiDisplay;t.bDrawing=!0,c!==a&&c!==-1&&(t._iDisplayStart=u?c:c>=t.fnRecordsDisplay()?0:c,t.iInitDisplayStart=-1);var f=t._iDisplayStart,h=t.fnDisplayEnd();if(t.bDeferLoading)t.bDeferLoading=!1,t.iDraw++,he(t,!1);else if(u){if(!t.bDestroying&&!J(t))return}else t.iDraw++;if(0!==d.length)for(var p=u?0:f,g=u?t.aoData.length:h,b=p;b<g;b++){var v=d[b],y=t.aoData[v];null===y.nTr&&k(t,v);var S=y.nTr;if(0!==s){var _=o[i%s];y._sRowStripe!=_&&(e(S).removeClass(y._sRowStripe).addClass(_),y._sRowStripe=_)}Oe(t,"aoRowCallback",null,[S,y._aData,i,b]),r.push(S),i++}else{var D=l.sZeroRecords;1==t.iDraw&&"ajax"==Me(t)?D=l.sLoadingRecords:l.sEmptyTable&&0===t.fnRecordsTotal()&&(D=l.sEmptyTable),r[0]=e("<tr/>",{"class":s?o[0]:""}).append(e("<td />",{valign:"top",colSpan:m(t),"class":t.oClasses.sRowEmpty}).html(D))[0]}Oe(t,"aoHeaderCallback","header",[e(t.nTHead).children("tr")[0],F(t),f,h,d]),Oe(t,"aoFooterCallback","footer",[e(t.nTFoot).children("tr")[0],F(t),f,h,d]);var w=e(t.nTBody);w.children().detach(),w.append(e(r)),Oe(t,"aoDrawCallback","draw",[t]),t.bSorted=!1,t.bFiltered=!1,t.bDrawing=!1}function W(e,t){var n=e.oFeatures,a=n.bSort,r=n.bFilter;a&&we(e),r?G(e,e.oPreviousSearch):e.aiDisplay=e.aiDisplayMaster.slice(),t!==!0&&(e._iDisplayStart=0),e._drawHold=t,$(e),e._drawHold=!1}function M(t){var n=t.oClasses,a=e(t.nTable),r=e("<div/>").insertBefore(a),i=t.oFeatures,o=e("<div/>",{id:t.sTableId+"_wrapper","class":n.sWrapper+(t.nTFoot?"":" "+n.sNoFooter)});t.nHolding=r[0],t.nTableWrapper=o[0],t.nTableReinsertBefore=t.nTable.nextSibling;for(var s,l,c,u,d,f,h=t.sDom.split(""),p=0;p<h.length;p++){if(s=null,l=h[p],"<"==l){if(c=e("<div/>")[0],u=h[p+1],"'"==u||'"'==u){for(d="",f=2;h[p+f]!=u;)d+=h[p+f],f++;if("H"==d?d=n.sJUIHeader:"F"==d&&(d=n.sJUIFooter),d.indexOf(".")!=-1){var g=d.split(".");c.id=g[0].substr(1,g[0].length-1),c.className=g[1]}else"#"==d.charAt(0)?c.id=d.substr(1,d.length-1):c.className=d;p+=f}o.append(c),o=e(c)}else if(">"==l)o=o.parent();else if("l"==l&&i.bPaginate&&i.bLengthChange)s=ce(t);else if("f"==l&&i.bFilter)s=X(t);else if("r"==l&&i.bProcessing)s=fe(t);else if("t"==l)s=pe(t);else if("i"==l&&i.bInfo)s=ae(t);else if("p"==l&&i.bPaginate)s=ue(t);else if(0!==Xe.ext.feature.length)for(var m=Xe.ext.feature,b=0,v=m.length;b<v;b++)if(l==m[b].cFeature){s=m[b].fnInit(t);break}if(s){var y=t.aanFeatures;y[l]||(y[l]=[]),y[l].push(s),o.append(s)}}r.replaceWith(o),t.nHolding=null}function U(t,n){var a,r,i,o,s,l,c,u,d,f,h,p=e(n).children("tr"),g=function(e,t,n){for(var a=e[t];a[n];)n++;return n};for(t.splice(0,t.length),i=0,l=p.length;i<l;i++)t.push([]);for(i=0,l=p.length;i<l;i++)for(a=p[i],u=0,r=a.firstChild;r;){if("TD"==r.nodeName.toUpperCase()||"TH"==r.nodeName.toUpperCase())for(d=1*r.getAttribute("colspan"),f=1*r.getAttribute("rowspan"),d=d&&0!==d&&1!==d?d:1,f=f&&0!==f&&1!==f?f:1,c=g(t,i,u),h=1===d,s=0;s<d;s++)for(o=0;o<f;o++)t[i+o][c+s]={cell:r,unique:h},t[i+o].nTr=a;r=r.nextSibling}}function E(e,t,n){var a=[];n||(n=e.aoHeader,t&&(n=[],U(n,t)));for(var r=0,i=n.length;r<i;r++)for(var o=0,s=n[r].length;o<s;o++)!n[r][o].unique||a[o]&&e.bSortCellsTop||(a[o]=n[r][o].cell);return a}function B(t,n,a){if(Oe(t,"aoServerParams","serverParams",[n]),n&&e.isArray(n)){var r={},i=/(.*?)\[\]$/;e.each(n,function(e,t){var n=t.name.match(i);if(n){var a=n[0];r[a]||(r[a]=[]),r[a].push(t.value)}else r[t.name]=t.value}),n=r}var o,s=t.ajax,l=t.oInstance,c=function(e){Oe(t,null,"xhr",[t,e,t.jqXHR]),a(e)};if(e.isPlainObject(s)&&s.data){o=s.data;var u=e.isFunction(o)?o(n,t):o;n=e.isFunction(o)&&u?u:e.extend(!0,n,u),delete s.data}var d={data:n,success:function(e){var n=e.error||e.sError;n&&je(t,0,n),t.json=e,c(e)},dataType:"json",cache:!1,type:t.sServerMethod,error:function(n,a,r){var i=Oe(t,null,"xhr",[t,null,t.jqXHR]);e.inArray(!0,i)===-1&&("parsererror"==a?je(t,0,"Invalid JSON response",1):4===n.readyState&&je(t,0,"Ajax error",7)),he(t,!1)}};t.oAjaxData=n,Oe(t,null,"preXhr",[t,n]),t.fnServerData?t.fnServerData.call(l,t.sAjaxSource,e.map(n,function(e,t){return{name:t,value:e}}),c,t):t.sAjaxSource||"string"==typeof s?t.jqXHR=e.ajax(e.extend(d,{url:s||t.sAjaxSource})):e.isFunction(s)?t.jqXHR=s.call(l,n,c,t):(t.jqXHR=e.ajax(e.extend(d,s)),s.data=o)}function J(e){return!e.bAjaxDataGet||(e.iDraw++,he(e,!0),B(e,z(e),function(t){q(e,t)}),!1)}function z(t){var n,a,r,i,o=t.aoColumns,s=o.length,l=t.oFeatures,c=t.oPreviousSearch,u=t.aoPreSearchCols,d=[],f=De(t),h=t._iDisplayStart,p=l.bPaginate!==!1?t._iDisplayLength:-1,g=function(e,t){d.push({name:e,value:t})};g("sEcho",t.iDraw),g("iColumns",s),g("sColumns",st(o,"sName").join(",")),g("iDisplayStart",h),g("iDisplayLength",p);var m={draw:t.iDraw,columns:[],order:[],start:h,length:p,search:{value:c.sSearch,regex:c.bRegex}};for(n=0;n<s;n++)r=o[n],i=u[n],a="function"==typeof r.mData?"function":r.mData,m.columns.push({data:a,name:r.sName,searchable:r.bSearchable,orderable:r.bSortable,search:{value:i.sSearch,regex:i.bRegex}}),g("mDataProp_"+n,a),l.bFilter&&(g("sSearch_"+n,i.sSearch),g("bRegex_"+n,i.bRegex),g("bSearchable_"+n,r.bSearchable)),l.bSort&&g("bSortable_"+n,r.bSortable);l.bFilter&&(g("sSearch",c.sSearch),g("bRegex",c.bRegex)),l.bSort&&(e.each(f,function(e,t){m.order.push({column:t.col,dir:t.dir}),g("iSortCol_"+e,t.col),g("sSortDir_"+e,t.dir)}),g("iSortingCols",f.length));var b=Xe.ext.legacy.ajax;return null===b?t.sAjaxSource?d:m:b?d:m}function q(e,t){var n=function(e,n){return t[e]!==a?t[e]:t[n]},r=V(e,t),i=n("sEcho","draw"),o=n("iTotalRecords","recordsTotal"),s=n("iTotalDisplayRecords","recordsFiltered");if(i){if(1*i<e.iDraw)return;e.iDraw=1*i}P(e),e._iRecordsTotal=parseInt(o,10),e._iRecordsDisplay=parseInt(s,10);for(var l=0,c=r.length;l<c;l++)S(e,r[l]);e.aiDisplay=e.aiDisplayMaster.slice(),e.bAjaxDataGet=!1,$(e),e._bInitComplete||se(e,t),e.bAjaxDataGet=!0,he(e,!1)}function V(t,n){var r=e.isPlainObject(t.ajax)&&t.ajax.dataSrc!==a?t.ajax.dataSrc:t.sAjaxDataProp;return"data"===r?n.aaData||n[r]:""!==r?I(r)(n):n}function X(t){var a=t.oClasses,r=t.sTableId,i=t.oLanguage,o=t.oPreviousSearch,s=t.aanFeatures,l='<input type="search" class="'+a.sFilterInput+'"/>',c=i.sSearch;c=c.match(/_INPUT_/)?c.replace("_INPUT_",l):c+l;var u=e("<div/>",{id:s.f?null:r+"_filter","class":a.sFilter}).append(e("<label/>").append(c)),d=function(){var e=(s.f,this.value?this.value:"");e!=o.sSearch&&(G(t,{sSearch:e,bRegex:o.bRegex,bSmart:o.bSmart,bCaseInsensitive:o.bCaseInsensitive}),t._iDisplayStart=0,$(t))},f=null!==t.searchDelay?t.searchDelay:"ssp"===Me(t)?400:0,h=e("input",u).val(o.sSearch).attr("placeholder",i.sSearchPlaceholder).on("keyup.DT search.DT input.DT paste.DT cut.DT",f?St(d,f):d).on("keypress.DT",function(e){if(13==e.keyCode)return!1}).attr("aria-controls",r);return e(t.nTable).on("search.dt.DT",function(e,a){if(t===a)try{h[0]!==n.activeElement&&h.val(o.sSearch)}catch(r){}}),u[0]}function G(e,t,n){var r=e.oPreviousSearch,i=e.aoPreSearchCols,o=function(e){r.sSearch=e.sSearch,r.bRegex=e.bRegex,r.bSmart=e.bSmart,r.bCaseInsensitive=e.bCaseInsensitive},s=function(e){return e.bEscapeRegex!==a?!e.bEscapeRegex:e.bRegex};if(v(e),"ssp"!=Me(e)){Z(e,t.sSearch,n,s(t),t.bSmart,t.bCaseInsensitive),o(t);for(var l=0;l<i.length;l++)Y(e,i[l].sSearch,l,s(i[l]),i[l].bSmart,i[l].bCaseInsensitive);Q(e)}else o(t);e.bFiltered=!0,Oe(e,null,"search",[e])}function Q(t){for(var n,a,r=Xe.ext.search,i=t.aiDisplay,o=0,s=r.length;o<s;o++){for(var l=[],c=0,u=i.length;c<u;c++)a=i[c],n=t.aoData[a],r[o](t,n._aFilterData,a,n._aData,c)&&l.push(a);i.length=0,e.merge(i,l)}}function Y(e,t,n,a,r,i){if(""!==t){for(var o,s=[],l=e.aiDisplay,c=K(t,a,r,i),u=0;u<l.length;u++)o=e.aoData[l[u]]._aFilterData[n],c.test(o)&&s.push(l[u]);e.aiDisplay=s}}function Z(e,t,n,a,r,i){var o,s,l,c=K(t,a,r,i),u=e.oPreviousSearch.sSearch,d=e.aiDisplayMaster,f=[];if(0!==Xe.ext.search.length&&(n=!0),s=ee(e),t.length<=0)e.aiDisplay=d.slice();else{for((s||n||u.length>t.length||0!==t.indexOf(u)||e.bSorted)&&(e.aiDisplay=d.slice()),o=e.aiDisplay,l=0;l<o.length;l++)c.test(e.aoData[o[l]]._sFilterRow)&&f.push(o[l]);e.aiDisplay=f}}function K(t,n,a,r){if(t=n?t:mt(t),a){var i=e.map(t.match(/"[^"]+"|[^ ]+/g)||[""],function(e){if('"'===e.charAt(0)){var t=e.match(/^"(.*)"$/);e=t?t[1]:e}return e.replace('"',"")});t="^(?=.*?"+i.join(")(?=.*?")+").*$"}return new RegExp(t,r?"i":"")}function ee(e){var t,n,a,r,i,o,s,l,c=e.aoColumns,u=Xe.ext.type.search,d=!1;for(n=0,r=e.aoData.length;n<r;n++)if(l=e.aoData[n],!l._aFilterData){for(o=[],a=0,i=c.length;a<i;a++)t=c[a],t.bSearchable?(s=C(e,n,a,"filter"),u[t.sType]&&(s=u[t.sType](s)),null===s&&(s=""),"string"!=typeof s&&s.toString&&(s=s.toString())):s="",s.indexOf&&s.indexOf("&")!==-1&&(bt.innerHTML=s,s=vt?bt.textContent:bt.innerText),s.replace&&(s=s.replace(/[\r\n]/g,"")),o.push(s);l._aFilterData=o,l._sFilterRow=o.join("  "),d=!0}return d}function te(e){return{search:e.sSearch,smart:e.bSmart,regex:e.bRegex,caseInsensitive:e.bCaseInsensitive}}function ne(e){return{sSearch:e.search,bSmart:e.smart,bRegex:e.regex,bCaseInsensitive:e.caseInsensitive}}function ae(t){var n=t.sTableId,a=t.aanFeatures.i,r=e("<div/>",{"class":t.oClasses.sInfo,id:a?null:n+"_info"});return a||(t.aoDrawCallback.push({fn:re,sName:"information"}),r.attr("role","status").attr("aria-live","polite"),e(t.nTable).attr("aria-describedby",n+"_info")),r[0]}function re(t){var n=t.aanFeatures.i;if(0!==n.length){var a=t.oLanguage,r=t._iDisplayStart+1,i=t.fnDisplayEnd(),o=t.fnRecordsTotal(),s=t.fnRecordsDisplay(),l=s?a.sInfo:a.sInfoEmpty;s!==o&&(l+=" "+a.sInfoFiltered),l+=a.sInfoPostFix,l=ie(t,l);var c=a.fnInfoCallback;null!==c&&(l=c.call(t.oInstance,t,r,i,o,s,l)),e(n).html(l)}}function ie(e,t){var n=e.fnFormatNumber,a=e._iDisplayStart+1,r=e._iDisplayLength,i=e.fnRecordsDisplay(),o=r===-1;return t.replace(/_START_/g,n.call(e,a)).replace(/_END_/g,n.call(e,e.fnDisplayEnd())).replace(/_MAX_/g,n.call(e,e.fnRecordsTotal())).replace(/_TOTAL_/g,n.call(e,i)).replace(/_PAGE_/g,n.call(e,o?1:Math.ceil(a/r))).replace(/_PAGES_/g,n.call(e,o?1:Math.ceil(i/r)))}function oe(e){var t,n,a,r=e.iInitDisplayStart,i=e.aoColumns,o=e.oFeatures,s=e.bDeferLoading;if(!e.bInitialised)return void setTimeout(function(){oe(e)},200);for(M(e),H(e),O(e,e.aoHeader),O(e,e.aoFooter),he(e,!0),o.bAutoWidth&&be(e),t=0,n=i.length;t<n;t++)a=i[t],a.sWidth&&(a.nTh.style.width=_e(a.sWidth));Oe(e,null,"preInit",[e]),W(e);var l=Me(e);("ssp"!=l||s)&&("ajax"==l?B(e,[],function(n){var a=V(e,n);for(t=0;t<a.length;t++)S(e,a[t]);e.iInitDisplayStart=r,W(e),he(e,!1),se(e,n)},e):(he(e,!1),se(e)))}function se(e,t){e._bInitComplete=!0,(t||e.oInit.aaData)&&h(e),Oe(e,null,"plugin-init",[e,t]),Oe(e,"aoInitComplete","init",[e,t])}function le(e,t){var n=parseInt(t,10);e._iDisplayLength=n,$e(e),Oe(e,null,"length",[e,n])}function ce(t){for(var n=t.oClasses,a=t.sTableId,r=t.aLengthMenu,i=e.isArray(r[0]),o=i?r[0]:r,s=i?r[1]:r,l=e("<select/>",{name:a+"_length","aria-controls":a,"class":n.sLengthSelect}),c=0,u=o.length;c<u;c++)l[0][c]=new Option(s[c],o[c]);var d=e("<div><label/></div>").addClass(n.sLength);return t.aanFeatures.l||(d[0].id=a+"_length"),d.children().append(t.oLanguage.sLengthMenu.replace("_MENU_",l[0].outerHTML)),e("select",d).val(t._iDisplayLength).on("change.DT",function(n){le(t,e(this).val()),$(t)}),e(t.nTable).on("length.dt.DT",function(n,a,r){t===a&&e("select",d).val(r)}),d[0]}function ue(t){var n=t.sPaginationType,a=Xe.ext.pager[n],r="function"==typeof a,i=function(e){$(e)},o=e("<div/>").addClass(t.oClasses.sPaging+n)[0],s=t.aanFeatures;return r||a.fnInit(t,o,i),s.p||(o.id=t.sTableId+"_paginate",t.aoDrawCallback.push({fn:function(e){if(r){var t,n,o=e._iDisplayStart,l=e._iDisplayLength,c=e.fnRecordsDisplay(),u=l===-1,d=u?0:Math.ceil(o/l),f=u?1:Math.ceil(c/l),h=a(d,f);for(t=0,n=s.p.length;t<n;t++)We(e,"pageButton")(e,s.p[t],t,h,d,f)}else a.fnUpdate(e,i)},sName:"pagination"})),o}function de(e,t,n){var a=e._iDisplayStart,r=e._iDisplayLength,i=e.fnRecordsDisplay();0===i||r===-1?a=0:"number"==typeof t?(a=t*r,a>i&&(a=0)):"first"==t?a=0:"previous"==t?(a=r>=0?a-r:0,a<0&&(a=0)):"next"==t?a+r<i&&(a+=r):"last"==t?a=Math.floor((i-1)/r)*r:je(e,0,"Unknown paging action: "+t,5);var o=e._iDisplayStart!==a;return e._iDisplayStart=a,o&&(Oe(e,null,"page",[e]),n&&$(e)),o}function fe(t){return e("<div/>",{id:t.aanFeatures.r?null:t.sTableId+"_processing","class":t.oClasses.sProcessing}).html(t.oLanguage.sProcessing).insertBefore(t.nTable)[0]}function he(t,n){t.oFeatures.bProcessing&&e(t.aanFeatures.r).css("display",n?"block":"none"),Oe(t,null,"processing",[t,n])}function pe(t){var n=e(t.nTable);n.attr("role","grid");var a=t.oScroll;if(""===a.sX&&""===a.sY)return t.nTable;var r=a.sX,i=a.sY,o=t.oClasses,s=n.children("caption"),l=s.length?s[0]._captionSide:null,c=e(n[0].cloneNode(!1)),u=e(n[0].cloneNode(!1)),d=n.children("tfoot"),f="<div/>",h=function(e){return e?_e(e):null};d.length||(d=null);var p=e(f,{"class":o.sScrollWrapper}).append(e(f,{"class":o.sScrollHead}).css({overflow:"hidden",position:"relative",border:0,width:r?h(r):"100%"}).append(e(f,{"class":o.sScrollHeadInner}).css({"box-sizing":"content-box",width:a.sXInner||"100%"}).append(c.removeAttr("id").css("margin-left",0).append("top"===l?s:null).append(n.children("thead"))))).append(e(f,{"class":o.sScrollBody}).css({position:"relative",overflow:"auto",width:h(r)}).append(n));d&&p.append(e(f,{"class":o.sScrollFoot}).css({overflow:"hidden",border:0,width:r?h(r):"100%"}).append(e(f,{"class":o.sScrollFootInner}).append(u.removeAttr("id").css("margin-left",0).append("bottom"===l?s:null).append(n.children("tfoot")))));var g=p.children(),m=g[0],b=g[1],v=d?g[2]:null;return r&&e(b).on("scroll.DT",function(e){var t=this.scrollLeft;m.scrollLeft=t,d&&(v.scrollLeft=t)}),e(b).css(i&&a.bCollapse?"max-height":"height",i),t.nScrollHead=m,t.nScrollBody=b,t.nScrollFoot=v,t.aoDrawCallback.push({fn:ge,sName:"scrolling"}),p[0]}function ge(t){var n,r,i,o,s,l,c,u,d,f=t.oScroll,g=f.sX,m=f.sXInner,b=f.sY,v=f.iBarWidth,y=e(t.nScrollHead),S=y[0].style,_=y.children("div"),D=_[0].style,w=_.children("table"),C=t.nScrollBody,x=e(C),T=C.style,I=e(t.nScrollFoot),A=I.children("div"),F=A.children("table"),P=e(t.nTHead),R=e(t.nTable),j=R[0],L=j.style,k=t.nTFoot?e(t.nTFoot):null,N=t.oBrowser,H=N.bScrollOversize,O=st(t.aoColumns,"nTh"),$=[],W=[],M=[],U=[],B=function(e){var t=e.style;t.paddingTop="0",t.paddingBottom="0",t.borderTopWidth="0",t.borderBottomWidth="0",t.height=0},J=C.scrollHeight>C.clientHeight;if(t.scrollBarVis!==J&&t.scrollBarVis!==a)return t.scrollBarVis=J,void h(t);t.scrollBarVis=J,R.children("thead, tfoot").remove(),k&&(l=k.clone().prependTo(R),r=k.find("tr"),o=l.find("tr")),s=P.clone().prependTo(R),n=P.find("tr"),i=s.find("tr"),s.find("th, td").removeAttr("tabindex"),g||(T.width="100%",y[0].style.width="100%"),e.each(E(t,s),function(e,n){c=p(t,e),n.style.width=t.aoColumns[c].sWidth}),k&&me(function(e){e.style.width=""},o),d=R.outerWidth(),""===g?(L.width="100%",H&&(R.find("tbody").height()>C.offsetHeight||"scroll"==x.css("overflow-y"))&&(L.width=_e(R.outerWidth()-v)),d=R.outerWidth()):""!==m&&(L.width=_e(m),d=R.outerWidth()),me(B,i),me(function(t){M.push(t.innerHTML),$.push(_e(e(t).css("width")))},i),me(function(t,n){e.inArray(t,O)!==-1&&(t.style.width=$[n])},n),e(i).height(0),k&&(me(B,o),me(function(t){U.push(t.innerHTML),W.push(_e(e(t).css("width")))},o),me(function(e,t){e.style.width=W[t]},r),e(o).height(0)),me(function(e,t){e.innerHTML='<div class="dataTables_sizing" style="height:0;overflow:hidden;">'+M[t]+"</div>",e.style.width=$[t]},i),k&&me(function(e,t){e.innerHTML='<div class="dataTables_sizing" style="height:0;overflow:hidden;">'+U[t]+"</div>",e.style.width=W[t]},o),R.outerWidth()<d?(u=C.scrollHeight>C.offsetHeight||"scroll"==x.css("overflow-y")?d+v:d,H&&(C.scrollHeight>C.offsetHeight||"scroll"==x.css("overflow-y"))&&(L.width=_e(u-v)),""!==g&&""===m||je(t,1,"Possible column misalignment",6)):u="100%",T.width=_e(u),S.width=_e(u),k&&(t.nScrollFoot.style.width=_e(u)),b||H&&(T.height=_e(j.offsetHeight+v));var z=R.outerWidth();w[0].style.width=_e(z),D.width=_e(z);var q=R.height()>C.clientHeight||"scroll"==x.css("overflow-y"),V="padding"+(N.bScrollbarLeft?"Left":"Right");D[V]=q?v+"px":"0px",k&&(F[0].style.width=_e(z),A[0].style.width=_e(z),A[0].style[V]=q?v+"px":"0px"),R.children("colgroup").insertBefore(R.children("thead")),x.scroll(),!t.bSorted&&!t.bFiltered||t._drawHold||(C.scrollTop=0)}function me(e,t,n){for(var a,r,i=0,o=0,s=t.length;o<s;){for(a=t[o].firstChild,r=n?n[o].firstChild:null;a;)1===a.nodeType&&(n?e(a,r,i):e(a,i),i++),a=a.nextSibling,r=n?r.nextSibling:null;o++}}function be(n){var a,r,i,o=n.nTable,s=n.aoColumns,l=n.oScroll,c=l.sY,u=l.sX,d=l.sXInner,f=s.length,g=b(n,"bVisible"),v=e("th",n.nTHead),y=o.getAttribute("width"),S=o.parentNode,_=!1,D=n.oBrowser,w=D.bScrollOversize,C=o.style.width;for(C&&C.indexOf("%")!==-1&&(y=C),a=0;a<g.length;a++)r=s[g[a]],null!==r.sWidth&&(r.sWidth=ve(r.sWidthOrig,S),_=!0);if(w||!_&&!u&&!c&&f==m(n)&&f==v.length)for(a=0;a<f;a++){var x=p(n,a);null!==x&&(s[x].sWidth=_e(v.eq(a).width()))}else{var T=e(o).clone().css("visibility","hidden").removeAttr("id");T.find("tbody tr").remove();var I=e("<tr/>").appendTo(T.find("tbody"));for(T.find("thead, tfoot").remove(),T.append(e(n.nTHead).clone()).append(e(n.nTFoot).clone()),T.find("tfoot th, tfoot td").css("width",""),v=E(n,T.find("thead")[0]),a=0;a<g.length;a++)r=s[g[a]],v[a].style.width=null!==r.sWidthOrig&&""!==r.sWidthOrig?_e(r.sWidthOrig):"",r.sWidthOrig&&u&&e(v[a]).append(e("<div/>").css({width:r.sWidthOrig,margin:0,padding:0,border:0,height:1}));if(n.aoData.length)for(a=0;a<g.length;a++)i=g[a],r=s[i],e(ye(n,i)).clone(!1).append(r.sContentPadding).appendTo(I);e("[name]",T).removeAttr("name");var A=e("<div/>").css(u||c?{position:"absolute",top:0,left:0,height:1,right:0,overflow:"hidden"}:{}).append(T).appendTo(S);u&&d?T.width(d):u?(T.css("width","auto"),T.removeAttr("width"),T.width()<S.clientWidth&&y&&T.width(S.clientWidth)):c?T.width(S.clientWidth):y&&T.width(y);var F=0;for(a=0;a<g.length;a++){var P=e(v[a]),R=P.outerWidth()-P.width(),j=D.bBounding?Math.ceil(v[a].getBoundingClientRect().width):P.outerWidth();F+=j,s[g[a]].sWidth=_e(j-R)}o.style.width=_e(F),A.remove()}if(y&&(o.style.width=_e(y)),(y||u)&&!n._reszEvt){var L=function(){e(t).on("resize.DT-"+n.sInstance,St(function(){h(n)}))};w?setTimeout(L,1e3):L(),n._reszEvt=!0}}function ve(t,a){if(!t)return 0;var r=e("<div/>").css("width",_e(t)).appendTo(a||n.body),i=r[0].offsetWidth;return r.remove(),i}function ye(t,n){var a=Se(t,n);if(a<0)return null;var r=t.aoData[a];return r.nTr?r.anCells[n]:e("<td/>").html(C(t,a,n,"display"))[0]}function Se(e,t){for(var n,a=-1,r=-1,i=0,o=e.aoData.length;i<o;i++)n=C(e,i,t,"display")+"",n=n.replace(yt,""),n=n.replace(/&nbsp;/g," "),n.length>a&&(a=n.length,r=i);return r}function _e(e){return null===e?"0px":"number"==typeof e?e<0?"0px":e+"px":e.match(/\d$/)?e+"px":e}function De(t){var n,r,i,o,s,l,c,u=[],d=t.aoColumns,f=t.aaSortingFixed,h=e.isPlainObject(f),p=[],g=function(t){t.length&&!e.isArray(t[0])?p.push(t):e.merge(p,t)};for(e.isArray(f)&&g(f),h&&f.pre&&g(f.pre),g(t.aaSorting),h&&f.post&&g(f.post),n=0;n<p.length;n++)for(c=p[n][0],o=d[c].aDataSort,r=0,i=o.length;r<i;r++)s=o[r],l=d[s].sType||"string",p[n]._idx===a&&(p[n]._idx=e.inArray(p[n][1],d[s].asSorting)),u.push({src:c,col:s,dir:p[n][1],index:p[n]._idx,type:l,formatter:Xe.ext.type.order[l+"-pre"]});return u}function we(e){var t,n,a,r,i,o=[],s=Xe.ext.type.order,l=e.aoData,c=(e.aoColumns,0),u=e.aiDisplayMaster;for(v(e),i=De(e),t=0,n=i.length;t<n;t++)r=i[t],r.formatter&&c++,Ae(e,r.col);if("ssp"!=Me(e)&&0!==i.length){for(t=0,a=u.length;t<a;t++)o[u[t]]=t;
  c===i.length?u.sort(function(e,t){var n,a,r,s,c,u=i.length,d=l[e]._aSortData,f=l[t]._aSortData;for(r=0;r<u;r++)if(c=i[r],n=d[c.col],a=f[c.col],s=n<a?-1:n>a?1:0,0!==s)return"asc"===c.dir?s:-s;return n=o[e],a=o[t],n<a?-1:n>a?1:0}):u.sort(function(e,t){var n,a,r,c,u,d,f=i.length,h=l[e]._aSortData,p=l[t]._aSortData;for(r=0;r<f;r++)if(u=i[r],n=h[u.col],a=p[u.col],d=s[u.type+"-"+u.dir]||s["string-"+u.dir],c=d(n,a),0!==c)return c;return n=o[e],a=o[t],n<a?-1:n>a?1:0})}e.bSorted=!0}function Ce(e){for(var t,n,a=e.aoColumns,r=De(e),i=e.oLanguage.oAria,o=0,s=a.length;o<s;o++){var l=a[o],c=l.asSorting,u=l.sTitle.replace(/<.*?>/g,""),d=l.nTh;d.removeAttribute("aria-sort"),l.bSortable?(r.length>0&&r[0].col==o?(d.setAttribute("aria-sort","asc"==r[0].dir?"ascending":"descending"),n=c[r[0].index+1]||c[0]):n=c[0],t=u+("asc"===n?i.sSortAscending:i.sSortDescending)):t=u,d.setAttribute("aria-label",t)}}function xe(t,n,r,i){var o,s=t.aoColumns[n],l=t.aaSorting,c=s.asSorting,u=function(t,n){var r=t._idx;return r===a&&(r=e.inArray(t[1],c)),r+1<c.length?r+1:n?null:0};if("number"==typeof l[0]&&(l=t.aaSorting=[l]),r&&t.oFeatures.bSortMulti){var d=e.inArray(n,st(l,"0"));d!==-1?(o=u(l[d],!0),null===o&&1===l.length&&(o=0),null===o?l.splice(d,1):(l[d][1]=c[o],l[d]._idx=o)):(l.push([n,c[0],0]),l[l.length-1]._idx=0)}else l.length&&l[0][0]==n?(o=u(l[0]),l.length=1,l[0][1]=c[o],l[0]._idx=o):(l.length=0,l.push([n,c[0]]),l[0]._idx=0);W(t),"function"==typeof i&&i(t)}function Te(e,t,n,a){var r=e.aoColumns[n];Ne(t,{},function(t){r.bSortable!==!1&&(e.oFeatures.bProcessing?(he(e,!0),setTimeout(function(){xe(e,n,t.shiftKey,a),"ssp"!==Me(e)&&he(e,!1)},0)):xe(e,n,t.shiftKey,a))})}function Ie(t){var n,a,r,i=t.aLastSort,o=t.oClasses.sSortColumn,s=De(t),l=t.oFeatures;if(l.bSort&&l.bSortClasses){for(n=0,a=i.length;n<a;n++)r=i[n].src,e(st(t.aoData,"anCells",r)).removeClass(o+(n<2?n+1:3));for(n=0,a=s.length;n<a;n++)r=s[n].src,e(st(t.aoData,"anCells",r)).addClass(o+(n<2?n+1:3))}t.aLastSort=s}function Ae(e,t){var n,a=e.aoColumns[t],r=Xe.ext.order[a.sSortDataType];r&&(n=r.call(e.oInstance,e,t,g(e,t)));for(var i,o,s=Xe.ext.type.order[a.sType+"-pre"],l=0,c=e.aoData.length;l<c;l++)i=e.aoData[l],i._aSortData||(i._aSortData=[]),i._aSortData[t]&&!r||(o=r?n[l]:C(e,l,t,"sort"),i._aSortData[t]=s?s(o):o)}function Fe(t){if(t.oFeatures.bStateSave&&!t.bDestroying){var n={time:+new Date,start:t._iDisplayStart,length:t._iDisplayLength,order:e.extend(!0,[],t.aaSorting),search:te(t.oPreviousSearch),columns:e.map(t.aoColumns,function(e,n){return{visible:e.bVisible,search:te(t.aoPreSearchCols[n])}})};Oe(t,"aoStateSaveParams","stateSaveParams",[t,n]),t.oSavedState=n,t.fnStateSaveCallback.call(t.oInstance,t,n)}}function Pe(t,n,r){var i,o,s=t.aoColumns,l=function(n){if(!n||!n.time)return void r();var l=Oe(t,"aoStateLoadParams","stateLoadParams",[t,c]);if(e.inArray(!1,l)!==-1)return void r();var u=t.iStateDuration;if(u>0&&n.time<+new Date-1e3*u)return void r();if(n.columns&&s.length!==n.columns.length)return void r();if(t.oLoadedState=e.extend(!0,{},c),n.start!==a&&(t._iDisplayStart=n.start,t.iInitDisplayStart=n.start),n.length!==a&&(t._iDisplayLength=n.length),n.order!==a&&(t.aaSorting=[],e.each(n.order,function(e,n){t.aaSorting.push(n[0]>=s.length?[0,n[1]]:n)})),n.search!==a&&e.extend(t.oPreviousSearch,ne(n.search)),n.columns)for(i=0,o=n.columns.length;i<o;i++){var d=n.columns[i];d.visible!==a&&(s[i].bVisible=d.visible),d.search!==a&&e.extend(t.aoPreSearchCols[i],ne(d.search))}Oe(t,"aoStateLoaded","stateLoaded",[t,c]),r()};if(!t.oFeatures.bStateSave)return void r();var c=t.fnStateLoadCallback.call(t.oInstance,t,l);c!==a&&l(c)}function Re(t){var n=Xe.settings,a=e.inArray(t,st(n,"nTable"));return a!==-1?n[a]:null}function je(e,n,a,r){if(a="DataTables warning: "+(e?"table id="+e.sTableId+" - ":"")+a,r&&(a+=". For more information about this error, please see http://datatables.net/tn/"+r),n)t.console&&console.log;else{var i=Xe.ext,o=i.sErrMode||i.errMode;if(e&&Oe(e,null,"error",[e,r,a]),"alert"==o)alert(a);else{if("throw"==o)throw new Error(a);"function"==typeof o&&o(e,r,a)}}}function Le(t,n,r,i){return e.isArray(r)?void e.each(r,function(a,r){e.isArray(r)?Le(t,n,r[0],r[1]):Le(t,n,r)}):(i===a&&(i=r),void(n[r]!==a&&(t[i]=n[r])))}function ke(t,n,a){var r;for(var i in n)n.hasOwnProperty(i)&&(r=n[i],e.isPlainObject(r)?(e.isPlainObject(t[i])||(t[i]={}),e.extend(!0,t[i],r)):a&&"data"!==i&&"aaData"!==i&&e.isArray(r)?t[i]=r.slice():t[i]=r);return t}function Ne(t,n,a){e(t).on("click.DT",n,function(e){t.blur(),a(e)}).on("keypress.DT",n,function(e){13===e.which&&(e.preventDefault(),a(e))}).on("selectstart.DT",function(){return!1})}function He(e,t,n,a){n&&e[t].push({fn:n,sName:a})}function Oe(t,n,a,r){var i=[];if(n&&(i=e.map(t[n].slice().reverse(),function(e,n){return e.fn.apply(t.oInstance,r)})),null!==a){var o=e.Event(a+".dt");e(t.nTable).trigger(o,r),i.push(o.result)}return i}function $e(e){var t=e._iDisplayStart,n=e.fnDisplayEnd(),a=e._iDisplayLength;t>=n&&(t=n-a),t-=t%a,(a===-1||t<0)&&(t=0),e._iDisplayStart=t}function We(t,n){var a=t.renderer,r=Xe.ext.renderer[n];return e.isPlainObject(a)&&a[n]?r[a[n]]||r._:"string"==typeof a?r[a]||r._:r._}function Me(e){return e.oFeatures.bServerSide?"ssp":e.ajax||e.sAjaxSource?"ajax":"dom"}function Ue(e,t){var n=[],a=Bt.numbers_length,r=Math.floor(a/2);return t<=a?n=ct(0,t):e<=r?(n=ct(0,a-2),n.push("ellipsis"),n.push(t-1)):e>=t-1-r?(n=ct(t-(a-2),t),n.splice(0,0,"ellipsis"),n.splice(0,0,0)):(n=ct(e-r+2,e+r-1),n.push("ellipsis"),n.push(t-1),n.splice(0,0,"ellipsis"),n.splice(0,0,0)),n.DT_el="span",n}function Ee(t){e.each({num:function(e){return Jt(e,t)},"num-fmt":function(e){return Jt(e,t,et)},"html-num":function(e){return Jt(e,t,Ye)},"html-num-fmt":function(e){return Jt(e,t,Ye,et)}},function(e,n){Je.type.order[e+t+"-pre"]=n,e.match(/^html\-/)&&(Je.type.search[e+t]=Je.type.search.html)})}function Be(e){return function(){var t=[Re(this[Xe.ext.iApiIndex])].concat(Array.prototype.slice.call(arguments));return Xe.ext.internal[e].apply(this,t)}}var Je,ze,qe,Ve,Xe=function(t){this.$=function(e,t){return this.api(!0).$(e,t)},this._=function(e,t){return this.api(!0).rows(e,t).data()},this.api=function(e){return new ze(e?Re(this[Je.iApiIndex]):this)},this.fnAddData=function(t,n){var r=this.api(!0),i=e.isArray(t)&&(e.isArray(t[0])||e.isPlainObject(t[0]))?r.rows.add(t):r.row.add(t);return(n===a||n)&&r.draw(),i.flatten().toArray()},this.fnAdjustColumnSizing=function(e){var t=this.api(!0).columns.adjust(),n=t.settings()[0],r=n.oScroll;e===a||e?t.draw(!1):""===r.sX&&""===r.sY||ge(n)},this.fnClearTable=function(e){var t=this.api(!0).clear();(e===a||e)&&t.draw()},this.fnClose=function(e){this.api(!0).row(e).child.hide()},this.fnDeleteRow=function(e,t,n){var r=this.api(!0),i=r.rows(e),o=i.settings()[0],s=o.aoData[i[0][0]];return i.remove(),t&&t.call(this,o,s),(n===a||n)&&r.draw(),s},this.fnDestroy=function(e){this.api(!0).destroy(e)},this.fnDraw=function(e){this.api(!0).draw(e)},this.fnFilter=function(e,t,n,r,i,o){var s=this.api(!0);null===t||t===a?s.search(e,n,r,o):s.column(t).search(e,n,r,o),s.draw()},this.fnGetData=function(e,t){var n=this.api(!0);if(e!==a){var r=e.nodeName?e.nodeName.toLowerCase():"";return t!==a||"td"==r||"th"==r?n.cell(e,t).data():n.row(e).data()||null}return n.data().toArray()},this.fnGetNodes=function(e){var t=this.api(!0);return e!==a?t.row(e).node():t.rows().nodes().flatten().toArray()},this.fnGetPosition=function(e){var t=this.api(!0),n=e.nodeName.toUpperCase();if("TR"==n)return t.row(e).index();if("TD"==n||"TH"==n){var a=t.cell(e).index();return[a.row,a.columnVisible,a.column]}return null},this.fnIsOpen=function(e){return this.api(!0).row(e).child.isShown()},this.fnOpen=function(e,t,n){return this.api(!0).row(e).child(t,n).show().child()[0]},this.fnPageChange=function(e,t){var n=this.api(!0).page(e);(t===a||t)&&n.draw(!1)},this.fnSetColumnVis=function(e,t,n){var r=this.api(!0).column(e).visible(t);(n===a||n)&&r.columns.adjust().draw()},this.fnSettings=function(){return Re(this[Je.iApiIndex])},this.fnSort=function(e){this.api(!0).order(e).draw()},this.fnSortListener=function(e,t,n){this.api(!0).order.listener(e,t,n)},this.fnUpdate=function(e,t,n,r,i){var o=this.api(!0);return n===a||null===n?o.row(t).data(e):o.cell(t,n).data(e),(i===a||i)&&o.columns.adjust(),(r===a||r)&&o.draw(),0},this.fnVersionCheck=Je.fnVersionCheck;var n=this,r=t===a,u=this.length;r&&(t={}),this.oApi=this.internal=Je.internal;for(var h in Xe.ext.internal)h&&(this[h]=Be(h));return this.each(function(){var h,p={},g=u>1?ke(p,t,!0):t,m=0,b=this.getAttribute("id"),v=!1,D=Xe.defaults,w=e(this);if("table"!=this.nodeName.toLowerCase())return void je(null,0,"Non-table node initialisation ("+this.nodeName+")",2);s(D),l(D.column),i(D,D,!0),i(D.column,D.column,!0),i(D,e.extend(g,w.data()));var C=Xe.settings;for(m=0,h=C.length;m<h;m++){var x=C[m];if(x.nTable==this||x.nTHead.parentNode==this||x.nTFoot&&x.nTFoot.parentNode==this){var T=g.bRetrieve!==a?g.bRetrieve:D.bRetrieve,A=g.bDestroy!==a?g.bDestroy:D.bDestroy;if(r||T)return x.oInstance;if(A){x.oInstance.fnDestroy();break}return void je(x,0,"Cannot reinitialise DataTable",3)}if(x.sTableId==this.id){C.splice(m,1);break}}null!==b&&""!==b||(b="DataTables_Table_"+Xe.ext._unique++,this.id=b);var F=e.extend(!0,{},Xe.models.oSettings,{sDestroyWidth:w[0].style.width,sInstance:b,sTableId:b});F.nTable=this,F.oApi=n.internal,F.oInit=g,C.push(F),F.oInstance=1===n.length?n:w.dataTable(),s(g),g.oLanguage&&o(g.oLanguage),g.aLengthMenu&&!g.iDisplayLength&&(g.iDisplayLength=e.isArray(g.aLengthMenu[0])?g.aLengthMenu[0][0]:g.aLengthMenu[0]),g=ke(e.extend(!0,{},D),g),Le(F.oFeatures,g,["bPaginate","bLengthChange","bFilter","bSort","bSortMulti","bInfo","bProcessing","bAutoWidth","bSortClasses","bServerSide","bDeferRender"]),Le(F,g,["asStripeClasses","ajax","fnServerData","fnFormatNumber","sServerMethod","aaSorting","aaSortingFixed","aLengthMenu","sPaginationType","sAjaxSource","sAjaxDataProp","iStateDuration","sDom","bSortCellsTop","iTabIndex","fnStateLoadCallback","fnStateSaveCallback","renderer","searchDelay","rowId",["iCookieDuration","iStateDuration"],["oSearch","oPreviousSearch"],["aoSearchCols","aoPreSearchCols"],["iDisplayLength","_iDisplayLength"],["bJQueryUI","bJUI"]]),Le(F.oScroll,g,[["sScrollX","sX"],["sScrollXInner","sXInner"],["sScrollY","sY"],["bScrollCollapse","bCollapse"]]),Le(F.oLanguage,g,"fnInfoCallback"),He(F,"aoDrawCallback",g.fnDrawCallback,"user"),He(F,"aoServerParams",g.fnServerParams,"user"),He(F,"aoStateSaveParams",g.fnStateSaveParams,"user"),He(F,"aoStateLoadParams",g.fnStateLoadParams,"user"),He(F,"aoStateLoaded",g.fnStateLoaded,"user"),He(F,"aoRowCallback",g.fnRowCallback,"user"),He(F,"aoRowCreatedCallback",g.fnCreatedRow,"user"),He(F,"aoHeaderCallback",g.fnHeaderCallback,"user"),He(F,"aoFooterCallback",g.fnFooterCallback,"user"),He(F,"aoInitComplete",g.fnInitComplete,"user"),He(F,"aoPreDrawCallback",g.fnPreDrawCallback,"user"),F.rowIdFn=I(g.rowId),c(F);var P=F.oClasses;if(g.bJQueryUI?(e.extend(P,Xe.ext.oJUIClasses,g.oClasses),g.sDom===D.sDom&&"lfrtip"===D.sDom&&(F.sDom='<"H"lfr>t<"F"ip>'),F.renderer?e.isPlainObject(F.renderer)&&!F.renderer.header&&(F.renderer.header="jqueryui"):F.renderer="jqueryui"):e.extend(P,Xe.ext.classes,g.oClasses),w.addClass(P.sTable),F.iInitDisplayStart===a&&(F.iInitDisplayStart=g.iDisplayStart,F._iDisplayStart=g.iDisplayStart),null!==g.iDeferLoading){F.bDeferLoading=!0;var R=e.isArray(g.iDeferLoading);F._iRecordsDisplay=R?g.iDeferLoading[0]:g.iDeferLoading,F._iRecordsTotal=R?g.iDeferLoading[1]:g.iDeferLoading}var j=F.oLanguage;e.extend(!0,j,g.oLanguage),j.sUrl&&(e.ajax({dataType:"json",url:j.sUrl,success:function(t){o(t),i(D.oLanguage,t),e.extend(!0,j,t),oe(F)},error:function(){oe(F)}}),v=!0),null===g.asStripeClasses&&(F.asStripeClasses=[P.sStripeOdd,P.sStripeEven]);var L=F.asStripeClasses,k=w.children("tbody").find("tr").eq(0);e.inArray(!0,e.map(L,function(e,t){return k.hasClass(e)}))!==-1&&(e("tbody tr",this).removeClass(L.join(" ")),F.asDestroyStripes=L.slice());var N,H=[],O=this.getElementsByTagName("thead");if(0!==O.length&&(U(F.aoHeader,O[0]),H=E(F)),null===g.aoColumns)for(N=[],m=0,h=H.length;m<h;m++)N.push(null);else N=g.aoColumns;for(m=0,h=N.length;m<h;m++)d(F,H?H[m]:null);if(y(F,g.aoColumnDefs,N,function(e,t){f(F,e,t)}),k.length){var $=function(e,t){return null!==e.getAttribute("data-"+t)?t:null};e(k[0]).children("th, td").each(function(e,t){var n=F.aoColumns[e];if(n.mData===e){var r=$(t,"sort")||$(t,"order"),i=$(t,"filter")||$(t,"search");null===r&&null===i||(n.mData={_:e+".display",sort:null!==r?e+".@data-"+r:a,type:null!==r?e+".@data-"+r:a,filter:null!==i?e+".@data-"+i:a},f(F,e))}})}var W=F.oFeatures,M=function(){if(g.aaSorting===a){var t=F.aaSorting;for(m=0,h=t.length;m<h;m++)t[m][1]=F.aoColumns[m].asSorting[0]}Ie(F),W.bSort&&He(F,"aoDrawCallback",function(){if(F.bSorted){var t=De(F),n={};e.each(t,function(e,t){n[t.src]=t.dir}),Oe(F,null,"order",[F,t,n]),Ce(F)}}),He(F,"aoDrawCallback",function(){(F.bSorted||"ssp"===Me(F)||W.bDeferRender)&&Ie(F)},"sc");var n=w.children("caption").each(function(){this._captionSide=e(this).css("caption-side")}),r=w.children("thead");0===r.length&&(r=e("<thead/>").appendTo(w)),F.nTHead=r[0];var i=w.children("tbody");0===i.length&&(i=e("<tbody/>").appendTo(w)),F.nTBody=i[0];var o=w.children("tfoot");if(0===o.length&&n.length>0&&(""!==F.oScroll.sX||""!==F.oScroll.sY)&&(o=e("<tfoot/>").appendTo(w)),0===o.length||0===o.children().length?w.addClass(P.sNoFooter):o.length>0&&(F.nTFoot=o[0],U(F.aoFooter,F.nTFoot)),g.aaData)for(m=0;m<g.aaData.length;m++)S(F,g.aaData[m]);else(F.bDeferLoading||"dom"==Me(F))&&_(F,e(F.nTBody).children("tr"));F.aiDisplay=F.aiDisplayMaster.slice(),F.bInitialised=!0,v===!1&&oe(F)};g.bStateSave?(W.bStateSave=!0,He(F,"aoDrawCallback",Fe,"state_save"),Pe(F,g,M)):M()}),n=null,this},Ge={},Qe=/[\r\n]/g,Ye=/<.*?>/g,Ze=/^\d{2,4}[\.\/\-]\d{1,2}[\.\/\-]\d{1,2}([T ]{1}\d{1,2}[:\.]\d{2}([\.:]\d{2})?)?$/,Ke=new RegExp("(\\"+["/",".","*","+","?","|","(",")","[","]","{","}","\\","$","^","-"].join("|\\")+")","g"),et=/[',$£€¥%\u2009\u202F\u20BD\u20a9\u20BArfk]/gi,tt=function(e){return!e||e===!0||"-"===e},nt=function(e){var t=parseInt(e,10);return!isNaN(t)&&isFinite(e)?t:null},at=function(e,t){return Ge[t]||(Ge[t]=new RegExp(mt(t),"g")),"string"==typeof e&&"."!==t?e.replace(/\./g,"").replace(Ge[t],"."):e},rt=function(e,t,n){var a="string"==typeof e;return!!tt(e)||(t&&a&&(e=at(e,t)),n&&a&&(e=e.replace(et,"")),!isNaN(parseFloat(e))&&isFinite(e))},it=function(e){return tt(e)||"string"==typeof e},ot=function(e,t,n){if(tt(e))return!0;var a=it(e);return a?!!rt(dt(e),t,n)||null:null},st=function(e,t,n){var r=[],i=0,o=e.length;if(n!==a)for(;i<o;i++)e[i]&&e[i][t]&&r.push(e[i][t][n]);else for(;i<o;i++)e[i]&&r.push(e[i][t]);return r},lt=function(e,t,n,r){var i=[],o=0,s=t.length;if(r!==a)for(;o<s;o++)e[t[o]][n]&&i.push(e[t[o]][n][r]);else for(;o<s;o++)i.push(e[t[o]][n]);return i},ct=function(e,t){var n,r=[];t===a?(t=0,n=e):(n=t,t=e);for(var i=t;i<n;i++)r.push(i);return r},ut=function(e){for(var t=[],n=0,a=e.length;n<a;n++)e[n]&&t.push(e[n]);return t},dt=function(e){return e.replace(Ye,"")},ft=function(e){var t,n,a,r=[],i=e.length,o=0;e:for(n=0;n<i;n++){for(t=e[n],a=0;a<o;a++)if(r[a]===t)continue e;r.push(t),o++}return r};Xe.util={throttle:function(e,t){var n,r,i=t!==a?t:200;return function(){var t=this,o=+new Date,s=arguments;n&&o<n+i?(clearTimeout(r),r=setTimeout(function(){n=a,e.apply(t,s)},i)):(n=o,e.apply(t,s))}},escapeRegex:function(e){return e.replace(Ke,"\\$1")}};var ht=function(e,t,n){e[t]!==a&&(e[n]=e[t])},pt=/\[.*?\]$/,gt=/\(\)$/,mt=Xe.util.escapeRegex,bt=e("<div>")[0],vt=bt.textContent!==a,yt=/<.*?>/g,St=Xe.util.throttle,_t=[],Dt=Array.prototype,wt=function(t){var n,a,r=Xe.settings,i=e.map(r,function(e,t){return e.nTable});return t?t.nTable&&t.oApi?[t]:t.nodeName&&"table"===t.nodeName.toLowerCase()?(n=e.inArray(t,i),n!==-1?[r[n]]:null):t&&"function"==typeof t.settings?t.settings().toArray():("string"==typeof t?a=e(t):t instanceof e&&(a=t),a?a.map(function(t){return n=e.inArray(this,i),n!==-1?r[n]:null}).toArray():void 0):[]};ze=function(t,n){if(!(this instanceof ze))return new ze(t,n);var a=[],r=function(e){var t=wt(e);t&&(a=a.concat(t))};if(e.isArray(t))for(var i=0,o=t.length;i<o;i++)r(t[i]);else r(t);this.context=ft(a),n&&e.merge(this,n),this.selector={rows:null,cols:null,opts:null},ze.extend(this,this,_t)},Xe.Api=ze,e.extend(ze.prototype,{any:function(){return 0!==this.count()},concat:Dt.concat,context:[],count:function(){return this.flatten().length},each:function(e){for(var t=0,n=this.length;t<n;t++)e.call(this,this[t],t,this);return this},eq:function(e){var t=this.context;return t.length>e?new ze(t[e],this[e]):null},filter:function(e){var t=[];if(Dt.filter)t=Dt.filter.call(this,e,this);else for(var n=0,a=this.length;n<a;n++)e.call(this,this[n],n,this)&&t.push(this[n]);return new ze(this.context,t)},flatten:function(){var e=[];return new ze(this.context,e.concat.apply(e,this.toArray()))},join:Dt.join,indexOf:Dt.indexOf||function(e,t){for(var n=t||0,a=this.length;n<a;n++)if(this[n]===e)return n;return-1},iterator:function(e,t,n,r){var i,o,s,l,c,u,d,f,h=[],p=this.context,g=this.selector;for("string"==typeof e&&(r=n,n=t,t=e,e=!1),o=0,s=p.length;o<s;o++){var m=new ze(p[o]);if("table"===t)i=n.call(m,p[o],o),i!==a&&h.push(i);else if("columns"===t||"rows"===t)i=n.call(m,p[o],this[o],o),i!==a&&h.push(i);else if("column"===t||"column-rows"===t||"row"===t||"cell"===t)for(d=this[o],"column-rows"===t&&(u=Ft(p[o],g.opts)),l=0,c=d.length;l<c;l++)f=d[l],i="cell"===t?n.call(m,p[o],f.row,f.column,o,l):n.call(m,p[o],f,o,l,u),i!==a&&h.push(i)}if(h.length||r){var b=new ze(p,e?h.concat.apply([],h):h),v=b.selector;return v.rows=g.rows,v.cols=g.cols,v.opts=g.opts,b}return this},lastIndexOf:Dt.lastIndexOf||function(e,t){return this.indexOf.apply(this.toArray.reverse(),arguments)},length:0,map:function(e){var t=[];if(Dt.map)t=Dt.map.call(this,e,this);else for(var n=0,a=this.length;n<a;n++)t.push(e.call(this,this[n],n));return new ze(this.context,t)},pluck:function(e){return this.map(function(t){return t[e]})},pop:Dt.pop,push:Dt.push,reduce:Dt.reduce||function(e,t){return u(this,e,t,0,this.length,1)},reduceRight:Dt.reduceRight||function(e,t){return u(this,e,t,this.length-1,-1,-1)},reverse:Dt.reverse,selector:null,shift:Dt.shift,sort:Dt.sort,splice:Dt.splice,toArray:function(){return Dt.slice.call(this)},to$:function(){return e(this)},toJQuery:function(){return e(this)},unique:function(){return new ze(this.context,ft(this))},unshift:Dt.unshift}),ze.extend=function(t,n,a){if(a.length&&n&&(n instanceof ze||n.__dt_wrapper)){var r,i,o,s=function(e,t,n){return function(){var a=t.apply(e,arguments);return ze.extend(a,a,n.methodExt),a}};for(r=0,i=a.length;r<i;r++)o=a[r],n[o.name]="function"==typeof o.val?s(t,o.val,o):e.isPlainObject(o.val)?{}:o.val,n[o.name].__dt_wrapper=!0,ze.extend(t,n[o.name],o.propExt)}},ze.register=qe=function(t,n){if(e.isArray(t))for(var a=0,r=t.length;a<r;a++)ze.register(t[a],n);else{var i,o,s,l,c=t.split("."),u=_t,d=function(e,t){for(var n=0,a=e.length;n<a;n++)if(e[n].name===t)return e[n];return null};for(i=0,o=c.length;i<o;i++){l=c[i].indexOf("()")!==-1,s=l?c[i].replace("()",""):c[i];var f=d(u,s);f||(f={name:s,val:{},methodExt:[],propExt:[]},u.push(f)),i===o-1?f.val=n:u=l?f.methodExt:f.propExt}}},ze.registerPlural=Ve=function(t,n,r){ze.register(t,r),ze.register(n,function(){var t=r.apply(this,arguments);return t===this?this:t instanceof ze?t.length?e.isArray(t[0])?new ze(t.context,t[0]):t[0]:a:t})};var Ct=function(t,n){if("number"==typeof t)return[n[t]];var a=e.map(n,function(e,t){return e.nTable});return e(a).filter(t).map(function(t){var r=e.inArray(this,a);return n[r]}).toArray()};qe("tables()",function(e){return e?new ze(Ct(e,this.context)):this}),qe("table()",function(e){var t=this.tables(e),n=t.context;return n.length?new ze(n[0]):t}),Ve("tables().nodes()","table().node()",function(){return this.iterator("table",function(e){return e.nTable},1)}),Ve("tables().body()","table().body()",function(){return this.iterator("table",function(e){return e.nTBody},1)}),Ve("tables().header()","table().header()",function(){return this.iterator("table",function(e){return e.nTHead},1)}),Ve("tables().footer()","table().footer()",function(){return this.iterator("table",function(e){return e.nTFoot},1)}),Ve("tables().containers()","table().container()",function(){return this.iterator("table",function(e){return e.nTableWrapper},1)}),qe("draw()",function(e){return this.iterator("table",function(t){"page"===e?$(t):("string"==typeof e&&(e="full-hold"!==e),W(t,e===!1))})}),qe("page()",function(e){return e===a?this.page.info().page:this.iterator("table",function(t){de(t,e)})}),qe("page.info()",function(e){if(0===this.context.length)return a;var t=this.context[0],n=t._iDisplayStart,r=t.oFeatures.bPaginate?t._iDisplayLength:-1,i=t.fnRecordsDisplay(),o=r===-1;return{page:o?0:Math.floor(n/r),pages:o?1:Math.ceil(i/r),start:n,end:t.fnDisplayEnd(),length:r,recordsTotal:t.fnRecordsTotal(),recordsDisplay:i,serverSide:"ssp"===Me(t)}}),qe("page.len()",function(e){return e===a?0!==this.context.length?this.context[0]._iDisplayLength:a:this.iterator("table",function(t){le(t,e)})});var xt=function(e,t,n){if(n){var a=new ze(e);a.one("draw",function(){n(a.ajax.json())})}if("ssp"==Me(e))W(e,t);else{he(e,!0);var r=e.jqXHR;r&&4!==r.readyState&&r.abort(),B(e,[],function(n){P(e);for(var a=V(e,n),r=0,i=a.length;r<i;r++)S(e,a[r]);W(e,t),he(e,!1)})}};qe("ajax.json()",function(){var e=this.context;if(e.length>0)return e[0].json}),qe("ajax.params()",function(){var e=this.context;if(e.length>0)return e[0].oAjaxData}),qe("ajax.reload()",function(e,t){return this.iterator("table",function(n){xt(n,t===!1,e)})}),qe("ajax.url()",function(t){var n=this.context;return t===a?0===n.length?a:(n=n[0],n.ajax?e.isPlainObject(n.ajax)?n.ajax.url:n.ajax:n.sAjaxSource):this.iterator("table",function(n){e.isPlainObject(n.ajax)?n.ajax.url=t:n.ajax=t})}),qe("ajax.url().load()",function(e,t){return this.iterator("table",function(n){xt(n,t===!1,e)})});var Tt=function(t,n,r,i,o){var s,l,c,u,d,f,h=[],p=typeof n;for(n&&"string"!==p&&"function"!==p&&n.length!==a||(n=[n]),c=0,u=n.length;c<u;c++)for(l=n[c]&&n[c].split&&!n[c].match(/[\[\(:]/)?n[c].split(","):[n[c]],d=0,f=l.length;d<f;d++)s=r("string"==typeof l[d]?e.trim(l[d]):l[d]),s&&s.length&&(h=h.concat(s));var g=Je.selector[t];if(g.length)for(c=0,u=g.length;c<u;c++)h=g[c](i,o,h);return ft(h)},It=function(t){return t||(t={}),t.filter&&t.search===a&&(t.search=t.filter),e.extend({search:"none",order:"current",page:"all"},t)},At=function(e){for(var t=0,n=e.length;t<n;t++)if(e[t].length>0)return e[0]=e[t],e[0].length=1,e.length=1,e.context=[e.context[t]],e;return e.length=0,e},Ft=function(t,n){var a,r,i,o=[],s=t.aiDisplay,l=t.aiDisplayMaster,c=n.search,u=n.order,d=n.page;if("ssp"==Me(t))return"removed"===c?[]:ct(0,l.length);if("current"==d)for(a=t._iDisplayStart,r=t.fnDisplayEnd();a<r;a++)o.push(s[a]);else if("current"==u||"applied"==u)o="none"==c?l.slice():"applied"==c?s.slice():e.map(l,function(t,n){return e.inArray(t,s)===-1?t:null});else if("index"==u||"original"==u)for(a=0,r=t.aoData.length;a<r;a++)"none"==c?o.push(a):(i=e.inArray(a,s),(i===-1&&"removed"==c||i>=0&&"applied"==c)&&o.push(a));return o},Pt=function(t,n,r){var i,o=function(n){var o=nt(n);if(null!==o&&!r)return[o];if(i||(i=Ft(t,r)),null!==o&&e.inArray(o,i)!==-1)return[o];if(null===n||n===a||""===n)return i;if("function"==typeof n)return e.map(i,function(e){var a=t.aoData[e];return n(e,a._aData,a.nTr)?e:null});var s=ut(lt(t.aoData,i,"nTr"));if(n.nodeName){if(n._DT_RowIndex!==a)return[n._DT_RowIndex];if(n._DT_CellIndex)return[n._DT_CellIndex.row];var l=e(n).closest("*[data-dt-row]");return l.length?[l.data("dt-row")]:[]}if("string"==typeof n&&"#"===n.charAt(0)){var c=t.aIds[n.replace(/^#/,"")];if(c!==a)return[c.idx]}return e(s).filter(n).map(function(){return this._DT_RowIndex}).toArray()};return Tt("row",n,o,t,r)};qe("rows()",function(t,n){t===a?t="":e.isPlainObject(t)&&(n=t,t=""),n=It(n);var r=this.iterator("table",function(e){return Pt(e,t,n)},1);return r.selector.rows=t,r.selector.opts=n,r}),qe("rows().nodes()",function(){return this.iterator("row",function(e,t){return e.aoData[t].nTr||a},1)}),qe("rows().data()",function(){return this.iterator(!0,"rows",function(e,t){return lt(e.aoData,t,"_aData")},1)}),Ve("rows().cache()","row().cache()",function(e){return this.iterator("row",function(t,n){var a=t.aoData[n];return"search"===e?a._aFilterData:a._aSortData},1)}),Ve("rows().invalidate()","row().invalidate()",function(e){return this.iterator("row",function(t,n){j(t,n,e)})}),Ve("rows().indexes()","row().index()",function(){return this.iterator("row",function(e,t){return t},1)}),Ve("rows().ids()","row().id()",function(e){for(var t=[],n=this.context,a=0,r=n.length;a<r;a++)for(var i=0,o=this[a].length;i<o;i++){var s=n[a].rowIdFn(n[a].aoData[this[a][i]]._aData);t.push((e===!0?"#":"")+s)}return new ze(n,t)}),Ve("rows().remove()","row().remove()",function(){var e=this;return this.iterator("row",function(t,n,r){var i,o,s,l,c,u,d=t.aoData,f=d[n];for(d.splice(n,1),i=0,o=d.length;i<o;i++)if(c=d[i],u=c.anCells,null!==c.nTr&&(c.nTr._DT_RowIndex=i),null!==u)for(s=0,l=u.length;s<l;s++)u[s]._DT_CellIndex.row=i;R(t.aiDisplayMaster,n),R(t.aiDisplay,n),R(e[r],n,!1),$e(t);var h=t.rowIdFn(f._aData);h!==a&&delete t.aIds[h]}),this.iterator("table",function(e){for(var t=0,n=e.aoData.length;t<n;t++)e.aoData[t].idx=t}),this}),qe("rows.add()",function(t){var n=this.iterator("table",function(e){var n,a,r,i=[];for(a=0,r=t.length;a<r;a++)n=t[a],n.nodeName&&"TR"===n.nodeName.toUpperCase()?i.push(_(e,n)[0]):i.push(S(e,n));return i},1),a=this.rows(-1);return a.pop(),e.merge(a,n),a}),qe("row()",function(e,t){return At(this.rows(e,t))}),qe("row().data()",function(e){var t=this.context;return e===a?t.length&&this.length?t[0].aoData[this[0]]._aData:a:(t[0].aoData[this[0]]._aData=e,j(t[0],this[0],"data"),this)}),qe("row().node()",function(){var e=this.context;return e.length&&this.length?e[0].aoData[this[0]].nTr||null:null}),qe("row.add()",function(t){t instanceof e&&t.length&&(t=t[0]);var n=this.iterator("table",function(e){return t.nodeName&&"TR"===t.nodeName.toUpperCase()?_(e,t)[0]:S(e,t)});return this.row(n[0])});var Rt=function(t,n,a,r){var i=[],o=function(n,a){if(e.isArray(n)||n instanceof e)for(var r=0,s=n.length;r<s;r++)o(n[r],a);else if(n.nodeName&&"tr"===n.nodeName.toLowerCase())i.push(n);else{var l=e("<tr><td/></tr>").addClass(a);e("td",l).addClass(a).html(n)[0].colSpan=m(t),i.push(l[0])}};o(a,r),n._details&&n._details.detach(),n._details=e(i),n._detailsShow&&n._details.insertAfter(n.nTr)},jt=function(e,t){var n=e.context;if(n.length){var r=n[0].aoData[t!==a?t:e[0]];r&&r._details&&(r._details.remove(),r._detailsShow=a,r._details=a)}},Lt=function(e,t){var n=e.context;if(n.length&&e.length){var a=n[0].aoData[e[0]];a._details&&(a._detailsShow=t,t?a._details.insertAfter(a.nTr):a._details.detach(),kt(n[0]))}},kt=function(e){var t=new ze(e),n=".dt.DT_details",a="draw"+n,r="column-visibility"+n,i="destroy"+n,o=e.aoData;t.off(a+" "+r+" "+i),st(o,"_details").length>0&&(t.on(a,function(n,a){e===a&&t.rows({page:"current"}).eq(0).each(function(e){var t=o[e];t._detailsShow&&t._details.insertAfter(t.nTr)})}),t.on(r,function(t,n,a,r){if(e===n)for(var i,s=m(n),l=0,c=o.length;l<c;l++)i=o[l],i._details&&i._details.children("td[colspan]").attr("colspan",s)}),t.on(i,function(n,a){if(e===a)for(var r=0,i=o.length;r<i;r++)o[r]._details&&jt(t,r)}))},Nt="",Ht=Nt+"row().child",Ot=Ht+"()";qe(Ot,function(e,t){var n=this.context;return e===a?n.length&&this.length?n[0].aoData[this[0]]._details:a:(e===!0?this.child.show():e===!1?jt(this):n.length&&this.length&&Rt(n[0],n[0].aoData[this[0]],e,t),this)}),qe([Ht+".show()",Ot+".show()"],function(e){return Lt(this,!0),this}),qe([Ht+".hide()",Ot+".hide()"],function(){return Lt(this,!1),this}),qe([Ht+".remove()",Ot+".remove()"],function(){return jt(this),this}),qe(Ht+".isShown()",function(){var e=this.context;return!(!e.length||!this.length)&&(e[0].aoData[this[0]]._detailsShow||!1)});var $t=/^([^:]+):(name|visIdx|visible)$/,Wt=function(e,t,n,a,r){for(var i=[],o=0,s=r.length;o<s;o++)i.push(C(e,r[o],t));return i},Mt=function(t,n,a){var r=t.aoColumns,i=st(r,"sName"),o=st(r,"nTh"),s=function(n){var s=nt(n);if(""===n)return ct(r.length);if(null!==s)return[s>=0?s:r.length+s];if("function"==typeof n){var l=Ft(t,a);return e.map(r,function(e,a){return n(a,Wt(t,a,0,0,l),o[a])?a:null})}var c="string"==typeof n?n.match($t):"";if(c)switch(c[2]){case"visIdx":case"visible":var u=parseInt(c[1],10);if(u<0){var d=e.map(r,function(e,t){return e.bVisible?t:null});return[d[d.length+u]]}return[p(t,u)];case"name":return e.map(i,function(e,t){return e===c[1]?t:null});default:return[]}if(n.nodeName&&n._DT_CellIndex)return[n._DT_CellIndex.column];var f=e(o).filter(n).map(function(){return e.inArray(this,o)}).toArray();if(f.length||!n.nodeName)return f;var h=e(n).closest("*[data-dt-column]");return h.length?[h.data("dt-column")]:[]};return Tt("column",n,s,t,a)},Ut=function(t,n,r){var i,o,s,l,c=t.aoColumns,u=c[n],d=t.aoData;if(r===a)return u.bVisible;if(u.bVisible!==r){if(r){var f=e.inArray(!0,st(c,"bVisible"),n+1);for(o=0,s=d.length;o<s;o++)l=d[o].nTr,i=d[o].anCells,l&&l.insertBefore(i[n],i[f]||null)}else e(st(t.aoData,"anCells",n)).detach();u.bVisible=r,O(t,t.aoHeader),O(t,t.aoFooter),Fe(t)}};qe("columns()",function(t,n){t===a?t="":e.isPlainObject(t)&&(n=t,t=""),n=It(n);var r=this.iterator("table",function(e){return Mt(e,t,n)},1);return r.selector.cols=t,r.selector.opts=n,r}),Ve("columns().header()","column().header()",function(e,t){return this.iterator("column",function(e,t){return e.aoColumns[t].nTh},1)}),Ve("columns().footer()","column().footer()",function(e,t){return this.iterator("column",function(e,t){return e.aoColumns[t].nTf},1)}),Ve("columns().data()","column().data()",function(){return this.iterator("column-rows",Wt,1)}),Ve("columns().dataSrc()","column().dataSrc()",function(){return this.iterator("column",function(e,t){return e.aoColumns[t].mData},1)}),Ve("columns().cache()","column().cache()",function(e){return this.iterator("column-rows",function(t,n,a,r,i){return lt(t.aoData,i,"search"===e?"_aFilterData":"_aSortData",n)},1)}),Ve("columns().nodes()","column().nodes()",function(){return this.iterator("column-rows",function(e,t,n,a,r){return lt(e.aoData,r,"anCells",t)},1)}),Ve("columns().visible()","column().visible()",function(e,t){var n=this.iterator("column",function(t,n){return e===a?t.aoColumns[n].bVisible:void Ut(t,n,e)});return e!==a&&(this.iterator("column",function(n,a){Oe(n,null,"column-visibility",[n,a,e,t])}),(t===a||t)&&this.columns.adjust()),n}),Ve("columns().indexes()","column().index()",function(e){return this.iterator("column",function(t,n){return"visible"===e?g(t,n):n},1)}),qe("columns.adjust()",function(){return this.iterator("table",function(e){h(e)},1)}),qe("column.index()",function(e,t){if(0!==this.context.length){var n=this.context[0];if("fromVisible"===e||"toData"===e)return p(n,t);if("fromData"===e||"toVisible"===e)return g(n,t)}}),qe("column()",function(e,t){return At(this.columns(e,t))});var Et=function(t,n,r){var i,o,s,l,c,u,d,f=t.aoData,h=Ft(t,r),p=ut(lt(f,h,"anCells")),g=e([].concat.apply([],p)),m=t.aoColumns.length,b=function(n){var r="function"==typeof n;if(null===n||n===a||r){for(o=[],s=0,l=h.length;s<l;s++)for(i=h[s],c=0;c<m;c++)u={row:i,column:c},r?(d=f[i],n(u,C(t,i,c),d.anCells?d.anCells[c]:null)&&o.push(u)):o.push(u);return o}if(e.isPlainObject(n))return[n];var p=g.filter(n).map(function(e,t){return{row:t._DT_CellIndex.row,column:t._DT_CellIndex.column}}).toArray();return p.length||!n.nodeName?p:(d=e(n).closest("*[data-dt-row]"),d.length?[{row:d.data("dt-row"),column:d.data("dt-column")}]:[])};return Tt("cell",n,b,t,r)};qe("cells()",function(t,n,r){if(e.isPlainObject(t)&&(t.row===a?(r=t,t=null):(r=n,n=null)),e.isPlainObject(n)&&(r=n,n=null),null===n||n===a)return this.iterator("table",function(e){return Et(e,t,It(r));
  });var i,o,s,l,c,u=this.columns(n,r),d=this.rows(t,r),f=this.iterator("table",function(e,t){for(i=[],o=0,s=d[t].length;o<s;o++)for(l=0,c=u[t].length;l<c;l++)i.push({row:d[t][o],column:u[t][l]});return i},1);return e.extend(f.selector,{cols:n,rows:t,opts:r}),f}),Ve("cells().nodes()","cell().node()",function(){return this.iterator("cell",function(e,t,n){var r=e.aoData[t];return r&&r.anCells?r.anCells[n]:a},1)}),qe("cells().data()",function(){return this.iterator("cell",function(e,t,n){return C(e,t,n)},1)}),Ve("cells().cache()","cell().cache()",function(e){return e="search"===e?"_aFilterData":"_aSortData",this.iterator("cell",function(t,n,a){return t.aoData[n][e][a]},1)}),Ve("cells().render()","cell().render()",function(e){return this.iterator("cell",function(t,n,a){return C(t,n,a,e)},1)}),Ve("cells().indexes()","cell().index()",function(){return this.iterator("cell",function(e,t,n){return{row:t,column:n,columnVisible:g(e,n)}},1)}),Ve("cells().invalidate()","cell().invalidate()",function(e){return this.iterator("cell",function(t,n,a){j(t,n,e,a)})}),qe("cell()",function(e,t,n){return At(this.cells(e,t,n))}),qe("cell().data()",function(e){var t=this.context,n=this[0];return e===a?t.length&&n.length?C(t[0],n[0].row,n[0].column):a:(x(t[0],n[0].row,n[0].column,e),j(t[0],n[0].row,"data",n[0].column),this)}),qe("order()",function(t,n){var r=this.context;return t===a?0!==r.length?r[0].aaSorting:a:("number"==typeof t?t=[[t,n]]:t.length&&!e.isArray(t[0])&&(t=Array.prototype.slice.call(arguments)),this.iterator("table",function(e){e.aaSorting=t.slice()}))}),qe("order.listener()",function(e,t,n){return this.iterator("table",function(a){Te(a,e,t,n)})}),qe("order.fixed()",function(t){if(!t){var n=this.context,r=n.length?n[0].aaSortingFixed:a;return e.isArray(r)?{pre:r}:r}return this.iterator("table",function(n){n.aaSortingFixed=e.extend(!0,{},t)})}),qe(["columns().order()","column().order()"],function(t){var n=this;return this.iterator("table",function(a,r){var i=[];e.each(n[r],function(e,n){i.push([n,t])}),a.aaSorting=i})}),qe("search()",function(t,n,r,i){var o=this.context;return t===a?0!==o.length?o[0].oPreviousSearch.sSearch:a:this.iterator("table",function(a){a.oFeatures.bFilter&&G(a,e.extend({},a.oPreviousSearch,{sSearch:t+"",bRegex:null!==n&&n,bSmart:null===r||r,bCaseInsensitive:null===i||i}),1)})}),Ve("columns().search()","column().search()",function(t,n,r,i){return this.iterator("column",function(o,s){var l=o.aoPreSearchCols;return t===a?l[s].sSearch:void(o.oFeatures.bFilter&&(e.extend(l[s],{sSearch:t+"",bRegex:null!==n&&n,bSmart:null===r||r,bCaseInsensitive:null===i||i}),G(o,o.oPreviousSearch,1)))})}),qe("state()",function(){return this.context.length?this.context[0].oSavedState:null}),qe("state.clear()",function(){return this.iterator("table",function(e){e.fnStateSaveCallback.call(e.oInstance,e,{})})}),qe("state.loaded()",function(){return this.context.length?this.context[0].oLoadedState:null}),qe("state.save()",function(){return this.iterator("table",function(e){Fe(e)})}),Xe.versionCheck=Xe.fnVersionCheck=function(e){for(var t,n,a=Xe.version.split("."),r=e.split("."),i=0,o=r.length;i<o;i++)if(t=parseInt(a[i],10)||0,n=parseInt(r[i],10)||0,t!==n)return t>n;return!0},Xe.isDataTable=Xe.fnIsDataTable=function(t){var n=e(t).get(0),a=!1;return t instanceof Xe.Api||(e.each(Xe.settings,function(t,r){var i=r.nScrollHead?e("table",r.nScrollHead)[0]:null,o=r.nScrollFoot?e("table",r.nScrollFoot)[0]:null;r.nTable!==n&&i!==n&&o!==n||(a=!0)}),a)},Xe.tables=Xe.fnTables=function(t){var n=!1;e.isPlainObject(t)&&(n=t.api,t=t.visible);var a=e.map(Xe.settings,function(n){if(!t||t&&e(n.nTable).is(":visible"))return n.nTable});return n?new ze(a):a},Xe.camelToHungarian=i,qe("$()",function(t,n){var a=this.rows(n).nodes(),r=e(a);return e([].concat(r.filter(t).toArray(),r.find(t).toArray()))}),e.each(["on","one","off"],function(t,n){qe(n+"()",function(){var t=Array.prototype.slice.call(arguments);t[0]=e.map(t[0].split(/\s/),function(e){return e.match(/\.dt\b/)?e:e+".dt"}).join(" ");var a=e(this.tables().nodes());return a[n].apply(a,t),this})}),qe("clear()",function(){return this.iterator("table",function(e){P(e)})}),qe("settings()",function(){return new ze(this.context,this.context)}),qe("init()",function(){var e=this.context;return e.length?e[0].oInit:null}),qe("data()",function(){return this.iterator("table",function(e){return st(e.aoData,"_aData")}).flatten()}),qe("destroy()",function(n){return n=n||!1,this.iterator("table",function(a){var r,i=a.nTableWrapper.parentNode,o=a.oClasses,s=a.nTable,l=a.nTBody,c=a.nTHead,u=a.nTFoot,d=e(s),f=e(l),h=e(a.nTableWrapper),p=e.map(a.aoData,function(e){return e.nTr});a.bDestroying=!0,Oe(a,"aoDestroyCallback","destroy",[a]),n||new ze(a).columns().visible(!0),h.off(".DT").find(":not(tbody *)").off(".DT"),e(t).off(".DT-"+a.sInstance),s!=c.parentNode&&(d.children("thead").detach(),d.append(c)),u&&s!=u.parentNode&&(d.children("tfoot").detach(),d.append(u)),a.aaSorting=[],a.aaSortingFixed=[],Ie(a),e(p).removeClass(a.asStripeClasses.join(" ")),e("th, td",c).removeClass(o.sSortable+" "+o.sSortableAsc+" "+o.sSortableDesc+" "+o.sSortableNone),a.bJUI&&(e("th span."+o.sSortIcon+", td span."+o.sSortIcon,c).detach(),e("th, td",c).each(function(){var t=e("div."+o.sSortJUIWrapper,this);e(this).append(t.contents()),t.detach()})),f.children().detach(),f.append(p);var g=n?"remove":"detach";d[g](),h[g](),!n&&i&&(i.insertBefore(s,a.nTableReinsertBefore),d.css("width",a.sDestroyWidth).removeClass(o.sTable),r=a.asDestroyStripes.length,r&&f.children().each(function(t){e(this).addClass(a.asDestroyStripes[t%r])}));var m=e.inArray(a,Xe.settings);m!==-1&&Xe.settings.splice(m,1)})}),e.each(["column","row","cell"],function(e,t){qe(t+"s().every()",function(e){var n=this.selector.opts,r=this;return this.iterator(t,function(i,o,s,l,c){e.call(r[t](o,"cell"===t?s:n,"cell"===t?n:a),o,s,l,c)})})}),qe("i18n()",function(t,n,r){var i=this.context[0],o=I(t)(i.oLanguage);return o===a&&(o=n),r!==a&&e.isPlainObject(o)&&(o=o[r]!==a?o[r]:o._),o.replace("%d",r)}),Xe.version="1.10.13",Xe.settings=[],Xe.models={},Xe.models.oSearch={bCaseInsensitive:!0,sSearch:"",bRegex:!1,bSmart:!0},Xe.models.oRow={nTr:null,anCells:null,_aData:[],_aSortData:null,_aFilterData:null,_sFilterRow:null,_sRowStripe:"",src:null,idx:-1},Xe.models.oColumn={idx:null,aDataSort:null,asSorting:null,bSearchable:null,bSortable:null,bVisible:null,_sManualType:null,_bAttrSrc:!1,fnCreatedCell:null,fnGetData:null,fnSetData:null,mData:null,mRender:null,nTh:null,nTf:null,sClass:null,sContentPadding:null,sDefaultContent:null,sName:null,sSortDataType:"std",sSortingClass:null,sSortingClassJUI:null,sTitle:null,sType:null,sWidth:null,sWidthOrig:null},Xe.defaults={aaData:null,aaSorting:[[0,"asc"]],aaSortingFixed:[],ajax:null,aLengthMenu:[10,25,50,100],aoColumns:null,aoColumnDefs:null,aoSearchCols:[],asStripeClasses:null,bAutoWidth:!0,bDeferRender:!1,bDestroy:!1,bFilter:!0,bInfo:!0,bJQueryUI:!1,bLengthChange:!0,bPaginate:!0,bProcessing:!1,bRetrieve:!1,bScrollCollapse:!1,bServerSide:!1,bSort:!0,bSortMulti:!0,bSortCellsTop:!1,bSortClasses:!0,bStateSave:!1,fnCreatedRow:null,fnDrawCallback:null,fnFooterCallback:null,fnFormatNumber:function(e){return e.toString().replace(/\B(?=(\d{3})+(?!\d))/g,this.oLanguage.sThousands)},fnHeaderCallback:null,fnInfoCallback:null,fnInitComplete:null,fnPreDrawCallback:null,fnRowCallback:null,fnServerData:null,fnServerParams:null,fnStateLoadCallback:function(e){try{return JSON.parse((e.iStateDuration===-1?sessionStorage:localStorage).getItem("DataTables_"+e.sInstance+"_"+location.pathname))}catch(t){}},fnStateLoadParams:null,fnStateLoaded:null,fnStateSaveCallback:function(e,t){try{(e.iStateDuration===-1?sessionStorage:localStorage).setItem("DataTables_"+e.sInstance+"_"+location.pathname,JSON.stringify(t))}catch(n){}},fnStateSaveParams:null,iStateDuration:7200,iDeferLoading:null,iDisplayLength:10,iDisplayStart:0,iTabIndex:0,oClasses:{},oLanguage:{oAria:{sSortAscending:": activate to sort column ascending",sSortDescending:": activate to sort column descending"},oPaginate:{sFirst:"First",sLast:"Last",sNext:"Next",sPrevious:"Previous"},sEmptyTable:"No data available in table",sInfo:"Showing _START_ to _END_ of _TOTAL_ entries",sInfoEmpty:"Showing 0 to 0 of 0 entries",sInfoFiltered:"(filtered from _MAX_ total entries)",sInfoPostFix:"",sDecimal:"",sThousands:",",sLengthMenu:"Show _MENU_ entries",sLoadingRecords:"Loading...",sProcessing:"Processing...",sSearch:"Search:",sSearchPlaceholder:"",sUrl:"",sZeroRecords:"No matching records found"},oSearch:e.extend({},Xe.models.oSearch),sAjaxDataProp:"data",sAjaxSource:null,sDom:"lfrtip",searchDelay:null,sPaginationType:"simple_numbers",sScrollX:"",sScrollXInner:"",sScrollY:"",sServerMethod:"GET",renderer:null,rowId:"DT_RowId"},r(Xe.defaults),Xe.defaults.column={aDataSort:null,iDataSort:-1,asSorting:["asc","desc"],bSearchable:!0,bSortable:!0,bVisible:!0,fnCreatedCell:null,mData:null,mRender:null,sCellType:"td",sClass:"",sContentPadding:"",sDefaultContent:null,sName:"",sSortDataType:"std",sTitle:null,sType:null,sWidth:null},r(Xe.defaults.column),Xe.models.oSettings={oFeatures:{bAutoWidth:null,bDeferRender:null,bFilter:null,bInfo:null,bLengthChange:null,bPaginate:null,bProcessing:null,bServerSide:null,bSort:null,bSortMulti:null,bSortClasses:null,bStateSave:null},oScroll:{bCollapse:null,iBarWidth:0,sX:null,sXInner:null,sY:null},oLanguage:{fnInfoCallback:null},oBrowser:{bScrollOversize:!1,bScrollbarLeft:!1,bBounding:!1,barWidth:0},ajax:null,aanFeatures:[],aoData:[],aiDisplay:[],aiDisplayMaster:[],aIds:{},aoColumns:[],aoHeader:[],aoFooter:[],oPreviousSearch:{},aoPreSearchCols:[],aaSorting:null,aaSortingFixed:[],asStripeClasses:null,asDestroyStripes:[],sDestroyWidth:0,aoRowCallback:[],aoHeaderCallback:[],aoFooterCallback:[],aoDrawCallback:[],aoRowCreatedCallback:[],aoPreDrawCallback:[],aoInitComplete:[],aoStateSaveParams:[],aoStateLoadParams:[],aoStateLoaded:[],sTableId:"",nTable:null,nTHead:null,nTFoot:null,nTBody:null,nTableWrapper:null,bDeferLoading:!1,bInitialised:!1,aoOpenRows:[],sDom:null,searchDelay:null,sPaginationType:"two_button",iStateDuration:0,aoStateSave:[],aoStateLoad:[],oSavedState:null,oLoadedState:null,sAjaxSource:null,sAjaxDataProp:null,bAjaxDataGet:!0,jqXHR:null,json:a,oAjaxData:a,fnServerData:null,aoServerParams:[],sServerMethod:null,fnFormatNumber:null,aLengthMenu:null,iDraw:0,bDrawing:!1,iDrawError:-1,_iDisplayLength:10,_iDisplayStart:0,_iRecordsTotal:0,_iRecordsDisplay:0,bJUI:null,oClasses:{},bFiltered:!1,bSorted:!1,bSortCellsTop:null,oInit:null,aoDestroyCallback:[],fnRecordsTotal:function(){return"ssp"==Me(this)?1*this._iRecordsTotal:this.aiDisplayMaster.length},fnRecordsDisplay:function(){return"ssp"==Me(this)?1*this._iRecordsDisplay:this.aiDisplay.length},fnDisplayEnd:function(){var e=this._iDisplayLength,t=this._iDisplayStart,n=t+e,a=this.aiDisplay.length,r=this.oFeatures,i=r.bPaginate;return r.bServerSide?i===!1||e===-1?t+a:Math.min(t+e,this._iRecordsDisplay):!i||n>a||e===-1?a:n},oInstance:null,sInstance:null,iTabIndex:0,nScrollHead:null,nScrollFoot:null,aLastSort:[],oPlugins:{},rowIdFn:null,rowId:null},Xe.ext=Je={buttons:{},classes:{},builder:"-source-",errMode:"alert",feature:[],search:[],selector:{cell:[],column:[],row:[]},internal:{},legacy:{ajax:null},pager:{},renderer:{pageButton:{},header:{}},order:{},type:{detect:[],search:{},order:{}},_unique:0,fnVersionCheck:Xe.fnVersionCheck,iApiIndex:0,oJUIClasses:{},sVersion:Xe.version},e.extend(Je,{afnFiltering:Je.search,aTypes:Je.type.detect,ofnSearch:Je.type.search,oSort:Je.type.order,afnSortData:Je.order,aoFeatures:Je.feature,oApi:Je.internal,oStdClasses:Je.classes,oPagination:Je.pager}),e.extend(Xe.ext.classes,{sTable:"dataTable",sNoFooter:"no-footer",sPageButton:"paginate_button",sPageButtonActive:"current",sPageButtonDisabled:"disabled",sStripeOdd:"odd",sStripeEven:"even",sRowEmpty:"dataTables_empty",sWrapper:"dataTables_wrapper",sFilter:"dataTables_filter",sInfo:"dataTables_info",sPaging:"dataTables_paginate paging_",sLength:"dataTables_length",sProcessing:"dataTables_processing",sSortAsc:"sorting_asc",sSortDesc:"sorting_desc",sSortable:"sorting",sSortableAsc:"sorting_asc_disabled",sSortableDesc:"sorting_desc_disabled",sSortableNone:"sorting_disabled",sSortColumn:"sorting_",sFilterInput:"",sLengthSelect:"",sScrollWrapper:"dataTables_scroll",sScrollHead:"dataTables_scrollHead",sScrollHeadInner:"dataTables_scrollHeadInner",sScrollBody:"dataTables_scrollBody",sScrollFoot:"dataTables_scrollFoot",sScrollFootInner:"dataTables_scrollFootInner",sHeaderTH:"",sFooterTH:"",sSortJUIAsc:"",sSortJUIDesc:"",sSortJUI:"",sSortJUIAscAllowed:"",sSortJUIDescAllowed:"",sSortJUIWrapper:"",sSortIcon:"",sJUIHeader:"",sJUIFooter:""}),function(){var t="";t="";var n=t+"ui-state-default",a=t+"css_right ui-icon ui-icon-",r=t+"fg-toolbar ui-toolbar ui-widget-header ui-helper-clearfix";e.extend(Xe.ext.oJUIClasses,Xe.ext.classes,{sPageButton:"fg-button ui-button "+n,sPageButtonActive:"ui-state-disabled",sPageButtonDisabled:"ui-state-disabled",sPaging:"dataTables_paginate fg-buttonset ui-buttonset fg-buttonset-multi ui-buttonset-multi paging_",sSortAsc:n+" sorting_asc",sSortDesc:n+" sorting_desc",sSortable:n+" sorting",sSortableAsc:n+" sorting_asc_disabled",sSortableDesc:n+" sorting_desc_disabled",sSortableNone:n+" sorting_disabled",sSortJUIAsc:a+"triangle-1-n",sSortJUIDesc:a+"triangle-1-s",sSortJUI:a+"carat-2-n-s",sSortJUIAscAllowed:a+"carat-1-n",sSortJUIDescAllowed:a+"carat-1-s",sSortJUIWrapper:"DataTables_sort_wrapper",sSortIcon:"DataTables_sort_icon",sScrollHead:"dataTables_scrollHead "+n,sScrollFoot:"dataTables_scrollFoot "+n,sHeaderTH:n,sFooterTH:n,sJUIHeader:r+" ui-corner-tl ui-corner-tr",sJUIFooter:r+" ui-corner-bl ui-corner-br"})}();var Bt=Xe.ext.pager;e.extend(Bt,{simple:function(e,t){return["previous","next"]},full:function(e,t){return["first","previous","next","last"]},numbers:function(e,t){return[Ue(e,t)]},simple_numbers:function(e,t){return["previous",Ue(e,t),"next"]},full_numbers:function(e,t){return["first","previous",Ue(e,t),"next","last"]},first_last_numbers:function(e,t){return["first",Ue(e,t),"last"]},_numbers:Ue,numbers_length:7}),e.extend(!0,Xe.ext.renderer,{pageButton:{_:function(t,r,i,o,s,l){var c,u,d,f=t.oClasses,h=t.oLanguage.oPaginate,p=t.oLanguage.oAria.paginate||{},g=0,m=function(n,a){var r,o,d,b,v=function(e){de(t,e.data.action,!0)};for(r=0,o=a.length;r<o;r++)if(b=a[r],e.isArray(b)){var y=e("<"+(b.DT_el||"div")+"/>").appendTo(n);m(y,b)}else{switch(c=null,u="",b){case"ellipsis":n.append('<span class="ellipsis">&#x2026;</span>');break;case"first":c=h.sFirst,u=b+(s>0?"":" "+f.sPageButtonDisabled);break;case"previous":c=h.sPrevious,u=b+(s>0?"":" "+f.sPageButtonDisabled);break;case"next":c=h.sNext,u=b+(s<l-1?"":" "+f.sPageButtonDisabled);break;case"last":c=h.sLast,u=b+(s<l-1?"":" "+f.sPageButtonDisabled);break;default:c=b+1,u=s===b?f.sPageButtonActive:""}null!==c&&(d=e("<a>",{"class":f.sPageButton+" "+u,"aria-controls":t.sTableId,"aria-label":p[b],"data-dt-idx":g,tabindex:t.iTabIndex,id:0===i&&"string"==typeof b?t.sTableId+"_"+b:null}).html(c).appendTo(n),Ne(d,{action:b},v),g++)}};try{d=e(r).find(n.activeElement).data("dt-idx")}catch(b){}m(e(r).empty(),o),d!==a&&e(r).find("[data-dt-idx="+d+"]").focus()}}}),e.extend(Xe.ext.type.detect,[function(e,t){var n=t.oLanguage.sDecimal;return rt(e,n)?"num"+n:null},function(e,t){if(e&&!(e instanceof Date)&&!Ze.test(e))return null;var n=Date.parse(e);return null!==n&&!isNaN(n)||tt(e)?"date":null},function(e,t){var n=t.oLanguage.sDecimal;return rt(e,n,!0)?"num-fmt"+n:null},function(e,t){var n=t.oLanguage.sDecimal;return ot(e,n)?"html-num"+n:null},function(e,t){var n=t.oLanguage.sDecimal;return ot(e,n,!0)?"html-num-fmt"+n:null},function(e,t){return tt(e)||"string"==typeof e&&e.indexOf("<")!==-1?"html":null}]),e.extend(Xe.ext.type.search,{html:function(e){return tt(e)?e:"string"==typeof e?e.replace(Qe," ").replace(Ye,""):""},string:function(e){return tt(e)?e:"string"==typeof e?e.replace(Qe," "):e}});var Jt=function(e,t,n,a){return 0===e||e&&"-"!==e?(t&&(e=at(e,t)),e.replace&&(n&&(e=e.replace(n,"")),a&&(e=e.replace(a,""))),1*e):-(1/0)};e.extend(Je.type.order,{"date-pre":function(e){return Date.parse(e)||-(1/0)},"html-pre":function(e){return tt(e)?"":e.replace?e.replace(/<.*?>/g,"").toLowerCase():e+""},"string-pre":function(e){return tt(e)?"":"string"==typeof e?e.toLowerCase():e.toString?e.toString():""},"string-asc":function(e,t){return e<t?-1:e>t?1:0},"string-desc":function(e,t){return e<t?1:e>t?-1:0}}),Ee(""),e.extend(!0,Xe.ext.renderer,{header:{_:function(t,n,a,r){e(t.nTable).on("order.dt.DT",function(e,i,o,s){if(t===i){var l=a.idx;n.removeClass(a.sSortingClass+" "+r.sSortAsc+" "+r.sSortDesc).addClass("asc"==s[l]?r.sSortAsc:"desc"==s[l]?r.sSortDesc:a.sSortingClass)}})},jqueryui:function(t,n,a,r){e("<div/>").addClass(r.sSortJUIWrapper).append(n.contents()).append(e("<span/>").addClass(r.sSortIcon+" "+a.sSortingClassJUI)).appendTo(n),e(t.nTable).on("order.dt.DT",function(e,i,o,s){if(t===i){var l=a.idx;n.removeClass(r.sSortAsc+" "+r.sSortDesc).addClass("asc"==s[l]?r.sSortAsc:"desc"==s[l]?r.sSortDesc:a.sSortingClass),n.find("span."+r.sSortIcon).removeClass(r.sSortJUIAsc+" "+r.sSortJUIDesc+" "+r.sSortJUI+" "+r.sSortJUIAscAllowed+" "+r.sSortJUIDescAllowed).addClass("asc"==s[l]?r.sSortJUIAsc:"desc"==s[l]?r.sSortJUIDesc:a.sSortingClassJUI)}})}}});var zt=function(e){return"string"==typeof e?e.replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;"):e};return Xe.render={number:function(e,t,n,a,r){return{display:function(i){if("number"!=typeof i&&"string"!=typeof i)return i;var o=i<0?"-":"",s=parseFloat(i);if(isNaN(s))return zt(i);s=s.toFixed(n),i=Math.abs(s);var l=parseInt(i,10),c=n?t+(i-l).toFixed(n).substring(2):"";return o+(a||"")+l.toString().replace(/\B(?=(\d{3})+(?!\d))/g,e)+c+(r||"")}}},text:function(){return{display:zt}}},e.extend(Xe.ext.internal,{_fnExternApiFunc:Be,_fnBuildAjax:B,_fnAjaxUpdate:J,_fnAjaxParameters:z,_fnAjaxUpdateDraw:q,_fnAjaxDataSrc:V,_fnAddColumn:d,_fnColumnOptions:f,_fnAdjustColumnSizing:h,_fnVisibleToColumnIndex:p,_fnColumnIndexToVisible:g,_fnVisbleColumns:m,_fnGetColumns:b,_fnColumnTypes:v,_fnApplyColumnDefs:y,_fnHungarianMap:r,_fnCamelToHungarian:i,_fnLanguageCompat:o,_fnBrowserDetect:c,_fnAddData:S,_fnAddTr:_,_fnNodeToDataIndex:D,_fnNodeToColumnIndex:w,_fnGetCellData:C,_fnSetCellData:x,_fnSplitObjNotation:T,_fnGetObjectDataFn:I,_fnSetObjectDataFn:A,_fnGetDataMaster:F,_fnClearTable:P,_fnDeleteIndex:R,_fnInvalidate:j,_fnGetRowElements:L,_fnCreateTr:k,_fnBuildHead:H,_fnDrawHead:O,_fnDraw:$,_fnReDraw:W,_fnAddOptionsHtml:M,_fnDetectHeader:U,_fnGetUniqueThs:E,_fnFeatureHtmlFilter:X,_fnFilterComplete:G,_fnFilterCustom:Q,_fnFilterColumn:Y,_fnFilter:Z,_fnFilterCreateSearch:K,_fnEscapeRegex:mt,_fnFilterData:ee,_fnFeatureHtmlInfo:ae,_fnUpdateInfo:re,_fnInfoMacros:ie,_fnInitialise:oe,_fnInitComplete:se,_fnLengthChange:le,_fnFeatureHtmlLength:ce,_fnFeatureHtmlPaginate:ue,_fnPageChange:de,_fnFeatureHtmlProcessing:fe,_fnProcessingDisplay:he,_fnFeatureHtmlTable:pe,_fnScrollDraw:ge,_fnApplyToChildren:me,_fnCalculateColumnWidths:be,_fnThrottle:St,_fnConvertToWidth:ve,_fnGetWidestNode:ye,_fnGetMaxLenString:Se,_fnStringToCss:_e,_fnSortFlatten:De,_fnSort:we,_fnSortAria:Ce,_fnSortListener:xe,_fnSortAttachListener:Te,_fnSortingClasses:Ie,_fnSortData:Ae,_fnSaveState:Fe,_fnLoadState:Pe,_fnSettingsFromNode:Re,_fnLog:je,_fnMap:Le,_fnBindAction:Ne,_fnCallbackReg:He,_fnCallbackFire:Oe,_fnLengthOverflow:$e,_fnRenderer:We,_fnDataSource:Me,_fnRowAttributes:N,_fnCalculateEnd:function(){}}),e.fn.dataTable=Xe,Xe.$=e,e.fn.dataTableSettings=Xe.settings,e.fn.dataTableExt=Xe.ext,e.fn.DataTable=function(t){return e(this).dataTable(t).api()},e.each(Xe,function(t,n){e.fn.DataTable[t]=n}),e.fn.dataTable}),function(e,t,n){function a(e,t){e.unhighlight(),t.rows({filter:"applied"}).data().length&&(t.columns().every(function(){var e=this;e.nodes().flatten().to$().unhighlight({className:"column_highlight"}),e.nodes().flatten().to$().highlight(n.trim(e.search()).split(/\s+/),{className:"column_highlight"})}),e.highlight(n.trim(t.search()).split(/\s+/)))}n(t).on("init.dt.dth",function(e,t,r){if("dt"===e.namespace){var i=new n.fn.dataTable.Api(t),o=n(i.table().body());(n(i.table().node()).hasClass("searchHighlight")||t.oInit.searchHighlight||n.fn.dataTable.defaults.searchHighlight)&&(i.on("draw.dt.dth column-visibility.dt.dth column-reorder.dt.dth",function(){a(o,i)}).on("destroy",function(){i.off("draw.dt.dth column-visibility.dt.dth column-reorder.dt.dth")}),i.search()&&a(o,i))}})}(window,document,jQuery),jQuery.extend({highlight:function(e,t,n,a){if(3===e.nodeType){var r=e.data.match(t);if(r){var i=document.createElement(n||"span");i.className=a||"highlight";var o=e.splitText(r.index);o.splitText(r[0].length);var s=o.cloneNode(!0);return i.appendChild(s),o.parentNode.replaceChild(i,o),1}}else if(1===e.nodeType&&e.childNodes&&!/(script|style)/i.test(e.tagName)&&(e.tagName!==n.toUpperCase()||e.className!==a))for(var l=0;l<e.childNodes.length;l++)l+=jQuery.highlight(e.childNodes[l],t,n,a);return 0}}),jQuery.fn.unhighlight=function(e){var t={className:"highlight",element:"span"};return jQuery.extend(t,e),this.find(t.element+"."+t.className).each(function(){var e=this.parentNode;e.replaceChild(this.firstChild,this),e.normalize()}).end()},jQuery.fn.highlight=function(e,t){var n={className:"highlight",element:"span",caseSensitive:!1,wordsOnly:!1};if(jQuery.extend(n,t),e.constructor===String&&(e=[e]),e=jQuery.grep(e,function(e,t){return""!=e}),e=jQuery.map(e,function(e,t){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}),0==e.length)return this;var a=n.caseSensitive?"":"i",r="("+e.join("|")+")";n.wordsOnly&&(r="\\b"+r+"\\b");var i=new RegExp(r,a);return this.each(function(){jQuery.highlight(this,i,n.element,n.className)})},function(e){"function"==typeof define&&define.amd?define(["jquery","datatables.net"],function(t){return e(t,window,document)}):"object"==typeof exports?module.exports=function(t,n){return t||(t=window),n&&n.fn.dataTable||(n=require("datatables.net")(t,n).$),e(n,t,t.document)}:e(jQuery,window,document)}(function(e,t,n,a){"use strict";var r=e.fn.dataTable;return e.extend(!0,r.defaults,{dom:"<'row'<'col-xs-12 col-md-6'l><'col-xs-12 col-md-6'f>><'row'<'col-xs-12'tr>><'row'<'col-xs-12 col-md-5'i><'col-xs-12 col-md-7'p>>",renderer:"bootstrap"}),e.extend(r.ext.classes,{sWrapper:"dataTables_wrapper form-inline dt-bootstrap4",sFilterInput:"form-control input-sm",sLengthSelect:"form-control input-sm",sProcessing:"dataTables_processing panel panel-default",sPageButton:"paginate_button page-item"}),r.ext.renderer.pageButton.bootstrap=function(t,i,o,s,l,c){var u,d,f,h=new r.Api(t),p=t.oClasses,g=t.oLanguage.oPaginate,m=t.oLanguage.oAria.paginate||{},b=0,v=function(n,a){var r,i,s,f,y=function(t){t.preventDefault(),e(t.currentTarget).hasClass("disabled")||h.page()==t.data.action||h.page(t.data.action).draw("page")};for(r=0,i=a.length;r<i;r++)if(f=a[r],e.isArray(f))v(n,f);else{switch(u="",d="",f){case"ellipsis":u="&#x2026;",d="disabled";break;case"first":u=g.sFirst,d=f+(l>0?"":" disabled");break;case"previous":u=g.sPrevious,d=f+(l>0?"":" disabled");break;case"next":u=g.sNext,d=f+(l<c-1?"":" disabled");break;case"last":u=g.sLast,d=f+(l<c-1?"":" disabled");break;default:u=f+1,d=l===f?"active":""}u&&(s=e("<li>",{"class":p.sPageButton+" "+d,id:0===o&&"string"==typeof f?t.sTableId+"_"+f:null}).append(e("<a>",{href:"#","aria-controls":t.sTableId,"aria-label":m[f],"data-dt-idx":b,tabindex:t.iTabIndex,"class":"page-link"}).html(u)).appendTo(n),t.oApi._fnBindAction(s,{action:f},y),b++)}};try{f=e(i).find(n.activeElement).data("dt-idx")}catch(y){}v(e(i).empty().html('<ul class="pagination"/>').children("ul"),s),f!==a&&e(i).find("[data-dt-idx="+f+"]").focus()},r}),function(e){"function"==typeof define&&define.amd?define(["jquery","datatables.net"],function(t){return e(t,window,document)}):"object"==typeof exports?module.exports=function(t,n){return t||(t=window),n&&n.fn.dataTable||(n=require("datatables.net")(t,n).$),e(n,t,t.document)}:e(jQuery,window,document)}(function(e,t,n,a){"use strict";var r=e.fn.dataTable,i=function(t,n){if(!r.versionCheck||!r.versionCheck("1.10.3"))throw"DataTables Responsive requires DataTables 1.10.3 or newer";this.s={dt:new r.Api(t),columns:[],current:[]},this.s.dt.settings()[0].responsive||(n&&"string"==typeof n.details?n.details={type:n.details}:n&&n.details===!1?n.details={type:!1}:n&&n.details===!0&&(n.details={type:"inline"}),this.c=e.extend(!0,{},i.defaults,r.defaults.responsive,n),t.responsive=this,this._constructor())};e.extend(i.prototype,{_constructor:function(){var n=this,a=this.s.dt,i=a.settings()[0],o=e(t).width();a.settings()[0]._responsive=this,e(t).on("resize.dtr orientationchange.dtr",r.util.throttle(function(){var a=e(t).width();a!==o&&(n._resize(),o=a)})),i.oApi._fnCallbackReg(i,"aoRowCreatedCallback",function(t,r,i){e.inArray(!1,n.s.current)!==-1&&e(">td, >th",t).each(function(t){var r=a.column.index("toData",t);n.s.current[r]===!1&&e(this).css("display","none")})}),a.on("destroy.dtr",function(){a.off(".dtr"),e(a.table().body()).off(".dtr"),e(t).off("resize.dtr orientationchange.dtr"),e.each(n.s.current,function(e,t){t===!1&&n._setColumnVis(e,!0)})}),this.c.breakpoints.sort(function(e,t){return e.width<t.width?1:e.width>t.width?-1:0}),this._classLogic(),this._resizeAuto();var s=this.c.details;s.type!==!1&&(n._detailsInit(),a.on("column-visibility.dtr",function(e,t,a,r){n._classLogic(),n._resizeAuto(),n._resize()}),a.on("draw.dtr",function(){n._redrawChildren()}),e(a.table().node()).addClass("dtr-"+s.type)),a.on("column-reorder.dtr",function(e,t,a){n._classLogic(),n._resizeAuto(),n._resize()}),a.on("column-sizing.dtr",function(){n._resizeAuto(),n._resize()}),a.on("preXhr.dtr",function(){var e=[];a.rows().every(function(){this.child.isShown()&&e.push(this.id(!0))}),a.one("draw.dtr",function(){a.rows(e).every(function(){n._detailsDisplay(this,!1)})})}),a.on("init.dtr",function(t,r,i){n._resizeAuto(),n._resize(),e.inArray(!1,n.s.current)&&a.columns.adjust()}),this._resize()},_columnsVisiblity:function(t){var n,a,r=this.s.dt,i=this.s.columns,o=i.map(function(e,t){return{columnIdx:t,priority:e.priority}}).sort(function(e,t){return e.priority!==t.priority?e.priority-t.priority:e.columnIdx-t.columnIdx}),s=e.map(i,function(n){return(!n.auto||null!==n.minWidth)&&(n.auto===!0?"-":e.inArray(t,n.includeIn)!==-1)}),l=0;for(n=0,a=s.length;n<a;n++)s[n]===!0&&(l+=i[n].minWidth);var c=r.settings()[0].oScroll,u=c.sY||c.sX?c.iBarWidth:0,d=r.table().container().offsetWidth-u,f=d-l;for(n=0,a=s.length;n<a;n++)i[n].control&&(f-=i[n].minWidth);var h=!1;for(n=0,a=o.length;n<a;n++){var p=o[n].columnIdx;"-"===s[p]&&!i[p].control&&i[p].minWidth&&(h||f-i[p].minWidth<0?(h=!0,s[p]=!1):s[p]=!0,f-=i[p].minWidth)}var g=!1;for(n=0,a=i.length;n<a;n++)if(!i[n].control&&!i[n].never&&!s[n]){g=!0;break}for(n=0,a=i.length;n<a;n++)i[n].control&&(s[n]=g);return e.inArray(!0,s)===-1&&(s[0]=!0),s},_classLogic:function(){var t=this,n=this.c.breakpoints,r=this.s.dt,i=r.columns().eq(0).map(function(t){var n=this.column(t),i=n.header().className,o=r.settings()[0].aoColumns[t].responsivePriority;if(o===a){var s=e(n.header()).data("priority");o=s!==a?1*s:1e4}return{className:i,includeIn:[],auto:!1,control:!1,never:!!i.match(/\bnever\b/),priority:o}}),o=function(t,n){var a=i[t].includeIn;e.inArray(n,a)===-1&&a.push(n)},s=function(e,a,r,s){var l,c,u;if(r){if("max-"===r)for(l=t._find(a).width,c=0,u=n.length;c<u;c++)n[c].width<=l&&o(e,n[c].name);else if("min-"===r)for(l=t._find(a).width,c=0,u=n.length;c<u;c++)n[c].width>=l&&o(e,n[c].name);else if("not-"===r)for(c=0,u=n.length;c<u;c++)n[c].name.indexOf(s)===-1&&o(e,n[c].name)}else i[e].includeIn.push(a)};i.each(function(t,a){for(var r=t.className.split(" "),i=!1,o=0,l=r.length;o<l;o++){var c=e.trim(r[o]);if("all"===c)return i=!0,void(t.includeIn=e.map(n,function(e){return e.name}));if("none"===c||t.never)return void(i=!0);if("control"===c)return i=!0,void(t.control=!0);e.each(n,function(e,t){var n=t.name.split("-"),r=new RegExp("(min\\-|max\\-|not\\-)?("+n[0]+")(\\-[_a-zA-Z0-9])?"),o=c.match(r);o&&(i=!0,o[2]===n[0]&&o[3]==="-"+n[1]?s(a,t.name,o[1],o[2]+o[3]):o[2]!==n[0]||o[3]||s(a,t.name,o[1],o[2]))})}i||(t.auto=!0)}),this.s.columns=i},_detailsDisplay:function(t,n){var a=this,r=this.s.dt,i=this.c.details;if(i&&i.type!==!1){var o=i.display(t,n,function(){return i.renderer(r,t[0],a._detailsObj(t[0]))});o!==!0&&o!==!1||e(r.table().node()).triggerHandler("responsive-display.dt",[r,t,o,n])}},_detailsInit:function(){var t=this,n=this.s.dt,a=this.c.details;"inline"===a.type&&(a.target="td:first-child, th:first-child"),n.on("draw.dtr",function(){t._tabIndexes()}),t._tabIndexes(),e(n.table().body()).on("keyup.dtr","td, th",function(t){13===t.keyCode&&e(this).data("dtr-keyboard")&&e(this).click()});var r=a.target,i="string"==typeof r?r:"td, th";e(n.table().body()).on("click.dtr mousedown.dtr mouseup.dtr",i,function(a){if(e(n.table().node()).hasClass("collapsed")&&e.inArray(e(this).closest("tr").get(0),n.rows().nodes().toArray())!==-1){if("number"==typeof r){var i=r<0?n.columns().eq(0).length+r:r;if(n.cell(this).index().column!==i)return}var o=n.row(e(this).closest("tr"));"click"===a.type?t._detailsDisplay(o,!1):"mousedown"===a.type?e(this).css("outline","none"):"mouseup"===a.type&&e(this).blur().css("outline","")}})},_detailsObj:function(t){var n=this,a=this.s.dt;return e.map(this.s.columns,function(e,r){if(!e.never&&!e.control)return{title:a.settings()[0].aoColumns[r].sTitle,data:a.cell(t,r).render(n.c.orthogonal),hidden:a.column(r).visible()&&!n.s.current[r],columnIndex:r,rowIndex:t}})},_find:function(e){for(var t=this.c.breakpoints,n=0,a=t.length;n<a;n++)if(t[n].name===e)return t[n]},_redrawChildren:function(){var e=this,t=this.s.dt;t.rows({page:"current"}).iterator("row",function(n,a){t.row(a);e._detailsDisplay(t.row(a),!0)})},_resize:function(){var n,a,r=this,i=this.s.dt,o=e(t).width(),s=this.c.breakpoints,l=s[0].name,c=this.s.columns,u=this.s.current.slice();for(n=s.length-1;n>=0;n--)if(o<=s[n].width){l=s[n].name;break}var d=this._columnsVisiblity(l);this.s.current=d;var f=!1;for(n=0,a=c.length;n<a;n++)if(d[n]===!1&&!c[n].never&&!c[n].control){f=!0;break}e(i.table().node()).toggleClass("collapsed",f);var h=!1;i.columns().eq(0).each(function(e,t){d[t]!==u[t]&&(h=!0,r._setColumnVis(e,d[t]))}),h&&(this._redrawChildren(),e(i.table().node()).trigger("responsive-resize.dt",[i,this.s.current]))},_resizeAuto:function(){var t=this.s.dt,n=this.s.columns;if(this.c.auto&&e.inArray(!0,e.map(n,function(e){return e.auto}))!==-1){var a=(t.table().node().offsetWidth,t.columns,t.table().node().cloneNode(!1)),r=e(t.table().header().cloneNode(!1)).appendTo(a),i=e(t.table().body()).clone(!1,!1).empty().appendTo(a),o=t.columns().header().filter(function(e){return t.column(e).visible()}).to$().clone(!1).css("display","table-cell");e(i).append(e(t.rows({page:"current"}).nodes()).clone(!1)).find("th, td").css("display","");var s=t.table().footer();if(s){var l=e(s.cloneNode(!1)).appendTo(a),c=t.columns().footer().filter(function(e){return t.column(e).visible()}).to$().clone(!1).css("display","table-cell");e("<tr/>").append(c).appendTo(l)}e("<tr/>").append(o).appendTo(r),"inline"===this.c.details.type&&e(a).addClass("dtr-inline collapsed"),e(a).find("[name]").removeAttr("name");var u=e("<div/>").css({width:1,height:1,overflow:"hidden"}).append(a);u.insertBefore(t.table().node()),o.each(function(e){var a=t.column.index("fromVisible",e);n[a].minWidth=this.offsetWidth||0}),u.remove()}},_setColumnVis:function(t,n){var a=this.s.dt,r=n?"":"none";e(a.column(t).header()).css("display",r),e(a.column(t).footer()).css("display",r),a.column(t).nodes().to$().css("display",r)},_tabIndexes:function(){var t=this.s.dt,n=t.cells({page:"current"}).nodes().to$(),a=t.settings()[0],r=this.c.details.target;n.filter("[data-dtr-keyboard]").removeData("[data-dtr-keyboard]");var i="number"==typeof r?":eq("+r+")":r;"td:first-child, th:first-child"===i&&(i=">td:first-child, >th:first-child"),
  e(i,t.rows({page:"current"}).nodes()).attr("tabIndex",a.iTabIndex).data("dtr-keyboard",1)}}),i.breakpoints=[{name:"desktop",width:1/0},{name:"tablet-l",width:1024},{name:"tablet-p",width:768},{name:"mobile-l",width:480},{name:"mobile-p",width:320}],i.display={childRow:function(t,n,a){return n?e(t.node()).hasClass("parent")?(t.child(a(),"child").show(),!0):void 0:t.child.isShown()?(t.child(!1),e(t.node()).removeClass("parent"),!1):(t.child(a(),"child").show(),e(t.node()).addClass("parent"),!0)},childRowImmediate:function(t,n,a){return!n&&t.child.isShown()||!t.responsive.hasHidden()?(t.child(!1),e(t.node()).removeClass("parent"),!1):(t.child(a(),"child").show(),e(t.node()).addClass("parent"),!0)},modal:function(t){return function(a,r,i){if(r)e("div.dtr-modal-content").empty().append(i());else{var o=function(){s.remove(),e(n).off("keypress.dtr")},s=e('<div class="dtr-modal"/>').append(e('<div class="dtr-modal-display"/>').append(e('<div class="dtr-modal-content"/>').append(i())).append(e('<div class="dtr-modal-close">&times;</div>').click(function(){o()}))).append(e('<div class="dtr-modal-background"/>').click(function(){o()})).appendTo("body");e(n).on("keyup.dtr",function(e){27===e.keyCode&&(e.stopPropagation(),o())})}t&&t.header&&e("div.dtr-modal-content").prepend("<h2>"+t.header(a)+"</h2>")}}},i.renderer={listHidden:function(){return function(t,n,a){var r=e.map(a,function(e){return e.hidden?'<li data-dtr-index="'+e.columnIndex+'" data-dt-row="'+e.rowIndex+'" data-dt-column="'+e.columnIndex+'"><span class="dtr-title">'+e.title+'</span> <span class="dtr-data">'+e.data+"</span></li>":""}).join("");return!!r&&e('<ul data-dtr-index="'+n+'" class="dtr-details"/>').append(r)}},tableAll:function(t){return t=e.extend({tableClass:""},t),function(n,a,r){var i=e.map(r,function(e){return'<tr data-dt-row="'+e.rowIndex+'" data-dt-column="'+e.columnIndex+'"><td>'+e.title+":</td> <td>"+e.data+"</td></tr>"}).join("");return e('<table class="'+t.tableClass+' dtr-details" width="100%"/>').append(i)}}},i.defaults={breakpoints:i.breakpoints,auto:!0,details:{display:i.display.childRow,renderer:i.renderer.listHidden(),target:0,type:"inline"},orthogonal:"display"};var o=e.fn.dataTable.Api;return o.register("responsive()",function(){return this}),o.register("responsive.index()",function(t){return t=e(t),{column:t.data("dtr-index"),row:t.parent().data("dtr-index")}}),o.register("responsive.rebuild()",function(){return this.iterator("table",function(e){e._responsive&&e._responsive._classLogic()})}),o.register("responsive.recalc()",function(){return this.iterator("table",function(e){e._responsive&&(e._responsive._resizeAuto(),e._responsive._resize())})}),o.register("responsive.hasHidden()",function(){var t=this.context[0];return!!t._responsive&&e.inArray(!1,t._responsive.s.current)!==-1}),i.version="2.1.1",e.fn.dataTable.Responsive=i,e.fn.DataTable.Responsive=i,e(n).on("preInit.dt.dtr",function(t,n,a){if("dt"===t.namespace&&(e(n.nTable).hasClass("responsive")||e(n.nTable).hasClass("dt-responsive")||n.oInit.responsive||r.defaults.responsive)){var o=n.oInit.responsive;o!==!1&&new i(n,e.isPlainObject(o)?o:{})}}),i}),function(e){"function"==typeof define&&define.amd?define(["jquery","datatables.net-bs4","datatables.net-responsive"],function(t){return e(t,window,document)}):"object"==typeof exports?module.exports=function(t,n){return t||(t=window),n&&n.fn.dataTable||(n=require("datatables.net-bs4")(t,n).$),n.fn.dataTable.Responsive||require("datatables.net-responsive")(t,n),e(n,t,t.document)}:e(jQuery,window,document)}(function(e,t,n,a){"use strict";var r=e.fn.dataTable,i=r.Responsive.display,o=i.modal,s=e('<div class="modal fade dtr-bs-modal" role="dialog"><div class="modal-dialog" role="document"><div class="modal-content"><div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button></div><div class="modal-body"/></div></div></div>');return i.modal=function(t){return function(n,a,r){if(e.fn.modal){if(!a){if(t&&t.header){var i=s.find("div.modal-header"),l=i.find("button").detach();i.empty().append('<h4 class="modal-title">'+t.header(n)+"</h4>").prepend(l)}s.find("div.modal-body").empty().append(r()),s.appendTo("body").modal()}}else o(n,a,r)}},r.Responsive}),function(e,t){var n=function(e,n){this.elem=e,this.$elem=t(e),this.options=n,this.metadata=this.$elem.data("convert-case-options")};n.prototype={defaults:{noKEYS:[35,36,37,38,39,40],typeCase:"upper"},init:function(){return this.config=t.extend({},this.defaults,this.options,this.metadata),"upper"==this.config.typeCase?this.toUpperCase():"lower"==this.config.typeCase?this.toLowerCase():"capitalize"==this.config.typeCase&&this.toCapitalize(),this},getCaretPosition:function(e){var t=0;if(document.selection){e.focus();var n=document.selection.createRange();n.moveStart("character",-e.value.length),t=n.text.length}else(e.selectionStart||"0"==e.selectionStart)&&(t=e.selectionStart);return t},setCaretPosition:function(e,t){if(e.setSelectionRange)e.focus(),e.setSelectionRange(t,t);else if(e.createTextRange){var n=e.createTextRange();n.collapse(!0),n.moveEnd("character",t),n.moveStart("character",t),n.select()}},toUpperCase:function(){var e=this.getCaretPosition(this.$elem[0]);this.$elem.val(this.$elem.val().toUpperCase()),this.setCaretPosition(this.$elem[0],e)},toLowerCase:function(){var e=this.getCaretPosition(this.$elem[0]);this.$elem.val(this.$elem.val().toLowerCase()),this.setCaretPosition(this.$elem[0],e)},toCapitalize:function(){var e=this.getCaretPosition(this.$elem[0]);this.$elem.val(this.$elem.val().substring(0,1).toUpperCase()+this.$elem.val().substring(1).toLowerCase()),this.setCaretPosition(this.$elem[0],e)}},n.defaults=n.prototype.defaults,t.fn.convertCase=function(e){var a=this.selector;return this.each(function(r){var i=!0;t(document).on("keypress",a,function(e){var a=e.keyCode?e.keyCode:e.which;t.each(n.defaults.noKEYS,function(e,t){return a==t?(i=!1,!1):void(i=!0)})}),t(document).on("keyup",a,function(t){i===!0&&new n(this,e).init()}),new n(this,e).init()})},e.ConvertCase=n}(window,jQuery),$("#corps_modal input.mayus").convertCase({typeCase:"upper"}),$.fn.dataTable.ext.errMode="none",$.extend($.fn.dataTable.defaults,{searching:!0,ordering:!0,responsive:!0,language:{processing:"Procesando...",lengthMenu:"Mostrar _MENU_ registros",zeroRecords:"No se encontraron resultados",emptyTable:"Ningún dato disponible en esta tabla",info:"Mostrando registros del _START_ al _END_ de un total de _TOTAL_ registros",infoEmpty:"Mostrando registros del 0 al 0 de un total de 0 registros",infoFiltered:"(filtrado de un total de _MAX_ registros)",infoPostFix:"",search:"Buscar: ",searchPlaceholder:"ID, RFC, Industria, Contacto Técnico",url:"",infoThousands:",",loadingRecords:"Cargando...",paginate:{first:"Primero",last:"Último",next:"Siguiente",previous:"Anterior"},aria:{sortAscending:": Activar para ordenar la columna de manera ascendente ",sortDescending:": Activar para ordenar la columna de manera descendente "}}});var rowParse;$.fn.dataTable.ext.errMode="none",$("#table_corps").on("error.dt",function(e,t,n,a){});var table_corps=$("#table_corps").DataTable({processing:!0,serverSide:!0,searchDelay:1500,searchHighlight:!0,ajax:getUrlBase+"admin-empresas/empresas",responsive:!1,dom:"<'row'<'col-xs-12 col-md-6'><'col-xs-12 tables-search col-md-6'f><'col-xs-12 tables-logs col-md-4'l><'col-xs-12 tables-pagination col-md-8'p>r><'row'<'col-xs-12't>><'row'<'col-xs-12 tables-showlist col-md-4'i><'col-xs-12 tables-pagination-bottom col-md-8'p>>",pagingType:"full_numbers",autoWidth:!1,drawCallback:function(e){var t=$(this).closest("div.dataTables_wrapper").find(".dataTables_paginate");t.toggle(this.api().page.info().pages>1)},initComplete:function(e,t){$('[data-toggle="tooltip"]').tooltip()},columnDefs:[{targets:0,cellType:"th",createdCell:function(e,t,n,a,r){$(r).attr("scope","row")}},{targets:4,cellType:"td"},{targets:[5,6],cellType:"td",createdCell:function(e,t,n,a,r){$(e).attr("align","center")}},{targets:5,cellType:"td",render:function(e,t,n,a){return'<div class="btn-group" role="group" aria-label="Configuraciones" data-id="'+n.id+'"><a href="'+getUrlBase+"admin-empresas/setup/"+n.id+'" class="btn btn-secondary" data-toggle="tooltip" data-placement="top" title="Setup"><i class="fa fa-cogs"></i></a><a href="'+getUrlBase+"admin-empresas/rds/"+n.id+'" class="btn btn-secondary" data-toggle="tooltip" data-placement="top" title="RDS"><i class="fa fa-list-ul"></i></a></div>'}},{targets:6,cellType:"td",render:function(e,t,n,a){if(n.contacts&&n.contacts.length>0){var r=n.contacts[0].id||"",i="";return n.contacts.length>1&&(i=n.contacts[1].id||""),'<a href="#" class="btn btn-link-gray delete-corp" data-id="'+n.id+'" data-user_id_principal="'+r+'" data-user_id_secundario="'+i+'">Eliminar</a><a href="#" class="btn btn-link-gray edit-corp" data-id="'+n.id+'" data-user_id_principal="'+r+'" data-user_id_secundario="'+i+'">Editar</a>'}return""}}],columns:[{data:"id",name:"companies.id",orderable:!0},{data:"razon_social",name:"companies.razon_social",orderable:!0},{data:"rfc",name:"companies.rfc",orderable:!0},{data:"industryName",name:"industries.name",orderable:!0},{data:"contact",name:"users.name",orderable:!0},{data:null,orderable:!1,searchable:!1},{data:null,orderable:!1,searchable:!1}]});$(document).on("draw",table_corps,function(){var e=$(this),t=$(e.table().body());t.unhighlight(),t.highlight(e.search())}),$(document).on("click",".add-corp",function(e){e.preventDefault(),$("#corps_modal #frm_company input, #corps_modal #frm_company select").val("").prop("disabled",!1).show(),$("#frm_company .title-industry").hide(),$("#corps_modal").modal("show")}),$(document).on("click",".edit-corp",function(e){e.preventDefault();var t=$(this),n=t.data("id")||"";if(""!=n){$("#corps_modal #frm_company #company_id").val(n);var a=t.data("user_id_principal")||"";$("#frm_company .user_id_principal").val(a);var r=t.data("user_id_secundario")||"";$("#frm_company .user_id_secundario").val(r),fill_frm_company(n,t),$("#corps_modal").modal("show")}});var fill_frm_company=function(e,t){if(t.hasClass("disabled"))return!1;var n=$("#frm_company");$.ajax({type:"get",url:getUrlBase+"admin-empresas/empresas/"+e,dataType:"json",beforeSend:function(e){$("#frm_company .alert-ajax").html(""),""!=t&&(t.addClass("disabled"),t.append('<i class="fa fa-spin fa-spinner"></i>')),n.find("select.industry_id").prop("disabled",!0).hide().siblings(".title-industry").show().html("")},error:function(){""!=t&&t.find("i.fa-spinner").remove()}}).done(function(e){if(""!=t&&(t.removeClass("disabled"),t.find("i.fa-spinner").remove()),e.company){n.find("input.id").val(e.company.id),n.find("input.razon_social").val(e.company.razon_social),n.find("input.rfc").val(e.company.rfc);var a=e.company.industry.name||"";n.find("select.industry_id").siblings(".title-industry").css({opacity:1,visibility:"visible"}).animate({opacity:0},400,function(){var e=$(this);e.html(function(){return a}).promise().done(function(){e.css({opacity:0,visibility:"visible"}).animate({opacity:1},200)})}),$.each(e.company.contacts,function(e,t){n.find("input.name_"+e).val(t.name),t.details&&n.find("input.telefono_"+e).val(t.details.telefono),n.find("input.email_"+e).val(t.email)})}}).retry({times:3,timeout:3e3}).fail(function(e){return 401==e.status?(location.reload(),!1):(t.removeClass("disabled"),void msg_ups())})};$(document).on("click",".delete-corp",function(e){e.preventDefault();var t=$(this),n=t.data("id")||"";""!=n&&$.confirm({icon:"fa fa-warning",title:"Eliminar empresa",content:"¿Confirmas eliminar está empresa?<br><br><small>Tomar en cuenta que se eliminara toda información creada: Sucursales, RDS, Usuarios, Configuraciones Setup e información de entrenamiento y vincurlación externa de RDS.</small>",type:"orange",typeAnimated:!0,columnClass:"col-md-6 mx-auto",buttons:{confirmar:{btnClass:"btn-blue",action:function(){return!t.hasClass("disabled")&&void $.ajax({type:"delete",url:getUrlBase+"admin-empresas/empresas/"+n,dataType:"json",beforeSend:function(e){""!=t&&(t.addClass("disabled"),t.append('<i class="fa fa-spin fa-spinner"></i>'))},error:function(){""!=t&&t.find("i.fa-spinner").remove()}}).done(function(e){""!=t&&t.find("i.fa-spinner").remove(),1==e.success&&t.parents("tr").fadeOut("slow",function(){table_corps.draw()})}).retry({times:3,timeout:3e3}).fail(function(e){return 401==e.status?(location.reload(),!1):(t.removeClass("disabled"),void msg_ups())})}},cancelar:{btnClass:"btn-red",action:function(){}}}})}),$("#frm_company").validationEngine({autoPositionUpdate:!0,focusFirstField:!0,validateNonVisibleFields:!1,updatePromptsPosition:!0,scroll:!0,autoHidePrompt:!0,autoHideDelay:5e3,fadeDuration:400,promptPosition:"topLeft"}),$(document).on("click",".btn_save_company",function(e){e.preventDefault();var t=$(this);if($("#frm_company").validationEngine("validate")){if(""!=t&&t.hasClass("disabled"))return!1;$.ajax({type:"post",url:getUrlBase+"admin-empresas/empresas",dataType:"json",data:$("#frm_company").serialize(),beforeSend:function(e){$("#frm_company .alert-ajax").html(""),""!=t&&(t.addClass("disabled"),t.append('<i class="fa fa-spin fa-spinner"></i>'))},error:function(){""!=t&&t.find("i.fa-spinner").remove()}}).done(function(e){""!=t&&(t.removeClass("disabled"),t.find("i.fa-spinner").remove()),1==e.success&&($("#frm_company input, #frm_company select").val(""),setTimeout(function(){$("#corps_modal").modal("hide"),table_corps.draw()},2e3));var n=processStrJson(e.msg);""!=n&&(n=0==e.success?'<div class="alert alert-danger alert-dismissible fade in" role="alert"><button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true" class="fa fa-times"></span></button><h4 class="alert-heading h4">Alerta!</h4>'+n+"</div>":'<div class="alert alert-success alert-dismissible fade in" role="alert"><button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true" class="fa fa-times"></span></button><h4 class="alert-heading h4">'+n+"</h4></div>",$("#frm_company .alert-ajax").html(n))}).fail(function(e){return 401==e.status?(location.reload(),!1):(""!=t&&t.removeClass("disabled"),void msg_ups())})}});