text: "use strict";var KTApp=function(){var t={},o=function(t){var o=t.data("theme")?"tooltip-"+t.data("theme"):"",i="auto"==t.data("width")?"tooltop-auto-width":"",n=t.data("trigger")?t.data("trigger"):"hover";$(t).tooltip({trigger:n,template:'<div class="tooltip '+o+" "+i+'" role="tooltip">                <div class="arrow"></div>                <div class="tooltip-inner"></div>            </div>'})},i=function(){$('[data-toggle="tooltip"]').each(function(){o($(this))})},n=function(t){var o=t.data("skin")?"popover-"+t.data("skin"):"",i=t.data("trigger")?t.data("trigger"):"hover";t.popover({trigger:i,template:'            <div class="popover '+o+'" role="tooltip">                <div class="arrow"></div>                <h3 class="popover-header"></h3>                <div class="popover-body"></div>            </div>'})},e=function(){$('[data-toggle="popover"]').each(function(){n($(this))})},a=function(t,o){t=$(t),new KTCard(t[0],o)},d=function(){$('[data-card="true"]').each(function(){var t=$(this);!0!==t.data("data-card-initialized")&&(a(t,{}),t.data("data-card-initialized",!0))})};return{init:function(o){o&&(t=o),KTApp.initComponents()},initComponents:function(){$('[data-scroll="true"]').each(function(){var t=$(this);KTUtil.scrollInit(this,{mobileNativeScroll:!0,handleWindowResize:!0,rememberPosition:"true"==t.data("remember-position")})}),i(),e(),$("body").on("click","[data-close=alert]",function(){$(this).closest(".alert").hide()}),$(".custom-file-input").on("change",function(){var t=$(this).val();$(this).next(".custom-file-label").addClass("selected").html(t)}),d(),"undefined"!=typeof Sticky&&new Sticky('[data-sticky="true"]'),$("body").on("show.bs.dropdown",function(t){var o=$(t.target).find("[data-attach='body']");if(0!==o.length){var i=$(t.target).find(".dropdown-menu").detach();o.data("dropdown-menu",i),$("body").append(i),i.css("display","block"),i.position({my:"right top",at:"right bottom",of:$(t.relatedTarget)})}}),$("body").on("hide.bs.dropdown",function(t){var o=$(t.target).find("[data-attach='body']");if(0!==o.length){var i=o.data("dropdown-menu");$(t.target).append(i.detach()),i.hide()}})},initTooltips:function(){i()},initTooltip:function(t){o(t)},initPopovers:function(){e()},initPopover:function(t){n(t)},initCard:function(t,o){a(t,o)},initCards:function(){d()},initSticky:function(){initSticky()},initAbsoluteDropdown:function(t){!function(t){var o;t&&$("body").on("show.bs.dropdown",t,function(t){o=$(t.target).find(".dropdown-menu"),$("body").append(o.detach()),o.css("display","block"),o.position({my:"right top",at:"right bottom",of:$(t.relatedTarget)})}).on("hide.bs.dropdown",t,function(t){$(t.target).append(o.detach()),o.hide()})}(t)},block:function(t,o){var i,n=$(t),e='<span class="spinner '+((o=$.extend(!0,{opacity:.05,overlayColor:"#000000",type:"",size:"",state:"primary",centerX:!0,centerY:!0,message:"",shadow:!0,width:"auto"},o)).type?"spinner-"+o.type:"")+" "+(o.state?"spinner-"+o.state:"")+" "+(o.size?"spinner-"+o.size:"")+'"></span';if(o.message&&o.message.length>0){var a="blockui "+(!1===o.shadow?"blockui":"");i='<div class="'+a+'"><span>'+o.message+"</span>"+e+"</div>";n=document.createElement("div");$("body").prepend(n),KTUtil.addClass(n,a),n.innerHTML=i,o.width=KTUtil.actualWidth(n)+10,KTUtil.remove(n),"body"==t&&(i='<div class="'+a+'" style="margin-left:-'+o.width/2+'px;"><span>'+o.message+"</span><span>"+e+"</span></div>")}else i=e;var d={message:i,centerY:o.centerY,centerX:o.centerX,css:{top:"30%",left:"50%",border:"0",padding:"0",backgroundColor:"none",width:o.width},overlayCSS:{backgroundColor:o.overlayColor,opacity:o.opacity,cursor:"wait",zIndex:"body"==t?1100:10},onUnblock:function(){n&&n[0]&&(KTUtil.css(n[0],"position",""),KTUtil.css(n[0],"zoom",""))}};"body"==t?(d.css.top="50%",$.blockUI(d)):(n=$(t)).block(d)},unblock:function(t){t&&"body"!=t?$(t).unblock():$.unblockUI()},blockPage:function(t){return KTApp.block("body",t)},unblockPage:function(){return KTApp.unblock("body")},getSettings:function(){return t}}}();"undefined"!=typeof module&&void 0!==module.exports&&(module.exports=KTApp),$(document).ready(function(){KTApp.init(KTAppSettings)});
  "use strict";var KTCard=function(t,e){var n=this,i=KTUtil.getById(t),o=KTUtil.getBody();if(i){var r={toggleSpeed:400,sticky:{releseOnReverse:!1,offset:300,zIndex:101}},s={construct:function(t){return KTUtil.data(i).has("card")?n=KTUtil.data(i).get("card"):(s.init(t),s.build(),KTUtil.data(i).set("card",n)),n},init:function(t){n.element=i,n.events=[],n.options=KTUtil.deepExtend({},r,t),n.header=KTUtil.child(i,".card-header"),n.footer=KTUtil.child(i,".card-footer"),KTUtil.child(i,".card-body")?n.body=KTUtil.child(i,".card-body"):KTUtil.child(i,".form")&&(n.body=KTUtil.child(i,".form"))},build:function(){var t=KTUtil.find(n.header,"[data-card-tool=remove]");t&&KTUtil.addEvent(t,"click",function(t){t.preventDefault(),s.remove()});var e=KTUtil.find(n.header,"[data-card-tool=reload]");e&&KTUtil.addEvent(e,"click",function(t){t.preventDefault(),s.reload()});var i=KTUtil.find(n.header,"[data-card-tool=toggle]");i&&KTUtil.addEvent(i,"click",function(t){t.preventDefault(),s.toggle()})},initSticky:function(){n.options.sticky.offset;n.header&&window.addEventListener("scroll",s.onScrollSticky)},onScrollSticky:function(t){var e=n.options.sticky.offset;if(!isNaN(e)){var i=KTUtil.getScrollTop();i>=e&&!1===KTUtil.hasClass(o,"card-sticky-on")?(s.eventTrigger("stickyOn"),KTUtil.addClass(o,"card-sticky-on"),s.updateSticky()):1.5*i<=e&&KTUtil.hasClass(o,"card-sticky-on")&&(s.eventTrigger("stickyOff"),KTUtil.removeClass(o,"card-sticky-on"),s.resetSticky())}},updateSticky:function(){var t,e,i;n.header&&(KTUtil.hasClass(o,"card-sticky-on")&&(t=n.options.sticky.position.top instanceof Function?parseInt(n.options.sticky.position.top.call(this,n)):parseInt(n.options.sticky.position.top),e=n.options.sticky.position.left instanceof Function?parseInt(n.options.sticky.position.left.call(this,n)):parseInt(n.options.sticky.position.left),i=n.options.sticky.position.right instanceof Function?parseInt(n.options.sticky.position.right.call(this,n)):parseInt(n.options.sticky.position.right),KTUtil.css(n.header,"z-index",n.options.sticky.zIndex),KTUtil.css(n.header,"top",t+"px"),KTUtil.css(n.header,"left",e+"px"),KTUtil.css(n.header,"right",i+"px")))},resetSticky:function(){n.header&&!1===KTUtil.hasClass(o,"card-sticky-on")&&(KTUtil.css(n.header,"z-index",""),KTUtil.css(n.header,"top",""),KTUtil.css(n.header,"left",""),KTUtil.css(n.header,"right",""))},remove:function(){!1!==s.eventTrigger("beforeRemove")&&(KTUtil.remove(i),s.eventTrigger("afterRemove"))},setContent:function(t){t&&(n.body.innerHTML=t)},getBody:function(){return n.body},getSelf:function(){return i},reload:function(){s.eventTrigger("reload")},toggle:function(){KTUtil.hasClass(i,"card-collapse")||KTUtil.hasClass(i,"card-collapsed")?s.expand():s.collapse()},collapse:function(){!1!==s.eventTrigger("beforeCollapse")&&(KTUtil.slideUp(n.body,n.options.toggleSpeed,function(){s.eventTrigger("afterCollapse")}),KTUtil.addClass(i,"card-collapse"))},expand:function(){!1!==s.eventTrigger("beforeExpand")&&(KTUtil.slideDown(n.body,n.options.toggleSpeed,function(){s.eventTrigger("afterExpand")}),KTUtil.removeClass(i,"card-collapse"),KTUtil.removeClass(i,"card-collapsed"))},eventTrigger:function(t){for(var e=0;e<n.events.length;e++){var i=n.events[e];if(i.name==t){if(1!=i.one)return i.handler.call(this,n);if(0==i.fired)return n.events[e].fired=!0,i.handler.call(this,n)}}},addEvent:function(t,e,i){return n.events.push({name:t,handler:e,one:i,fired:!1}),n}};return n.setDefaults=function(t){r=t},n.remove=function(){return s.remove(html)},n.initSticky=function(){return s.initSticky()},n.updateSticky=function(){return s.updateSticky()},n.resetSticky=function(){return s.resetSticky()},n.destroySticky=function(){s.resetSticky(),window.removeEventListener("scroll",s.onScrollSticky)},n.reload=function(){return s.reload()},n.setContent=function(t){return s.setContent(t)},n.toggle=function(){return s.toggle()},n.collapse=function(){return s.collapse()},n.expand=function(){return s.expand()},n.getBody=function(){return s.getBody()},n.getSelf=function(){return s.getSelf()},n.on=function(t,e){return s.addEvent(t,e)},n.one=function(t,e){return s.addEvent(t,e,!0)},s.construct.apply(n,[e]),n}};"undefined"!=typeof module&&void 0!==module.exports&&(module.exports=KTCard);
  "use strict";var KTCookie={getCookie:function(e){var o=document.cookie.match(new RegExp("(?:^|; )"+e.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g,"\\$1")+"=([^;]*)"));return o?decodeURIComponent(o[1]):void 0},setCookie:function(e,o,n){n||(n={}),(n=Object.assign({},{path:"/"},n)).expires instanceof Date&&(n.expires=n.expires.toUTCString());var t=encodeURIComponent(e)+"="+encodeURIComponent(o);for(var i in n)if(n.hasOwnProperty(i)){t+="; "+i;var r=n[i];!0!==r&&(t+="="+r)}document.cookie=t},deleteCookie:function(e){setCookie(e,"",{"max-age":-1})}};"undefined"!=typeof module&&void 0!==module.exports&&(module.exports=KTCookie);
  "use strict";var KTDialog=function(e){var t,n=this,i=KTUtil.getBody(),o={placement:"top center",type:"loader",width:100,state:"default",message:"Loading..."},r={construct:function(e){return r.init(e),n},init:function(e){n.events=[],n.options=KTUtil.deepExtend({},o,e),n.state=!1},show:function(){return r.eventTrigger("show"),t=document.createElement("DIV"),KTUtil.setHTML(t,n.options.message),KTUtil.addClass(t,"dialog dialog-shown"),KTUtil.addClass(t,"dialog-"+n.options.state),KTUtil.addClass(t,"dialog-"+n.options.type),"top center"==n.options.placement&&KTUtil.addClass(t,"dialog-top-center"),i.appendChild(t),n.state="shown",r.eventTrigger("shown"),n},hide:function(){return t&&(r.eventTrigger("hide"),t.remove(),n.state="hidden",r.eventTrigger("hidden")),n},eventTrigger:function(e){for(var t=0;t<n.events.length;t++){var i=n.events[t];if(i.name==e){if(1!=i.one)return i.handler.call(this,n);if(0==i.fired)return n.events[t].fired=!0,i.handler.call(this,n)}}},addEvent:function(e,t,i){return n.events.push({name:e,handler:t,one:i,fired:!1}),n}};return n.setDefaults=function(e){o=e},n.shown=function(){return"shown"==n.state},n.hidden=function(){return"hidden"==n.state},n.show=function(){return r.show()},n.hide=function(){return r.hide()},n.on=function(e,t){return r.addEvent(e,t)},n.one=function(e,t){return r.addEvent(e,t,!0)},r.construct.apply(n,[e]),n};"undefined"!=typeof module&&void 0!==module.exports&&(module.exports=KTDialog);
  "use strict";var KTHeader=function(e,t){var r=this,n=KTUtil.getById(e),o=KTUtil.getBody();if(void 0!==n){var i={offset:{desktop:!0,tabletAndMobile:!0},releseOnReverse:{desktop:!1,tabletAndMobile:!1}},l={construct:function(e){return KTUtil.data(n).has("header")?r=KTUtil.data(n).get("header"):(l.init(e),l.build(),KTUtil.data(n).set("header",r)),r},init:function(e){r.events=[],r.options=KTUtil.deepExtend({},i,e)},build:function(){var e=!0,t=0;window.addEventListener("scroll",function(){var n,i=0;KTUtil.isBreakpointDown("lg")&&!1===r.options.offset.tabletAndMobile||KTUtil.isBreakpointUp("lg")&&!1===r.options.offset.desktop||(KTUtil.isBreakpointUp("lg")?i=r.options.offset.desktop:KTUtil.isBreakpointDown("lg")&&(i=r.options.offset.tabletAndMobile),n=KTUtil.getScrollTop(),KTUtil.isBreakpointDown("lg")&&r.options.releseOnReverse.tabletAndMobile||KTUtil.isBreakpointUp("lg")&&r.options.releseOnReverse.desktop?(n>i&&t<n?(!1===o.hasAttribute("data-header-scroll")&&o.setAttribute("data-header-scroll","on"),e&&(l.eventTrigger("scrollOn",r),e=!1)):(!0===o.hasAttribute("data-header-scroll")&&o.removeAttribute("data-header-scroll"),0==e&&(l.eventTrigger("scrollOff",r),e=!0)),t=n):n>i?(!1===o.hasAttribute("data-header-scroll")&&o.setAttribute("data-header-scroll","on"),e&&(l.eventTrigger("scrollOn",r),e=!1)):(!0===o.hasAttribute("data-header-scroll")&&o.removeAttribute("data-header-scroll"),0==e&&(l.eventTrigger("scrollOff",r),e=!0)))})},eventTrigger:function(e,t){for(var n=0;n<r.events.length;n++){var o=r.events[n];if(o.name==e){if(1!=o.one)return o.handler.call(this,r,t);if(0==o.fired)return r.events[n].fired=!0,o.handler.call(this,r,t)}}},addEvent:function(e,t,n){r.events.push({name:e,handler:t,one:n,fired:!1})}};return r.setDefaults=function(e){i=e},r.on=function(e,t){return l.addEvent(e,t)},l.construct.apply(r,[t]),!0,r}};"undefined"!=typeof module&&void 0!==module.exports&&(module.exports=KTHeader);
  "use strict";var KTImageInput=function(e,t){var n=this,i=KTUtil.getById(e);KTUtil.getBody();if(i){var a={editMode:!1},r={construct:function(e){return KTUtil.data(i).has("imageinput")?n=KTUtil.data(i).get("imageinput"):(r.init(e),r.build(),KTUtil.data(i).set("imageinput",n)),n},init:function(e){n.element=i,n.events=[],n.input=KTUtil.find(i,'input[type="file"]'),n.wrapper=KTUtil.find(i,".image-input-wrapper"),n.cancel=KTUtil.find(i,'[data-action="cancel"]'),n.remove=KTUtil.find(i,'[data-action="remove"]'),n.src=KTUtil.css(n.wrapper,"backgroundImage"),n.hidden=KTUtil.find(i,'input[type="hidden"]'),n.options=KTUtil.deepExtend({},a,e)},build:function(){KTUtil.addEvent(n.input,"change",function(e){if(e.preventDefault(),n.input&&n.input.files&&n.input.files[0]){var t=new FileReader;t.onload=function(e){KTUtil.css(n.wrapper,"background-image","url("+e.target.result+")")},t.readAsDataURL(n.input.files[0]),KTUtil.addClass(n.element,"image-input-changed"),KTUtil.removeClass(n.element,"image-input-empty"),r.eventTrigger("change")}}),KTUtil.addEvent(n.cancel,"click",function(e){e.preventDefault(),r.eventTrigger("cancel"),KTUtil.removeClass(n.element,"image-input-changed"),KTUtil.removeClass(n.element,"image-input-empty"),KTUtil.css(n.wrapper,"background-image",n.src),n.input.value="",n.hidden&&(n.hidden.value="0")}),KTUtil.addEvent(n.remove,"click",function(e){e.preventDefault(),r.eventTrigger("remove"),KTUtil.removeClass(n.element,"image-input-changed"),KTUtil.addClass(n.element,"image-input-empty"),KTUtil.css(n.wrapper,"background-image","none"),n.input.value="",n.hidden&&(n.hidden.value="1")})},eventTrigger:function(e){for(var t=0;t<n.events.length;t++){var i=n.events[t];if(i.name==e){if(1!=i.one)return i.handler.call(this,n);if(0==i.fired)return n.events[t].fired=!0,i.handler.call(this,n)}}},addEvent:function(e,t,i){return n.events.push({name:e,handler:t,one:i,fired:!1}),n}};return n.setDefaults=function(e){a=e},n.on=function(e,t){return r.addEvent(e,t)},n.one=function(e,t){return r.addEvent(e,t,!0)},r.construct.apply(n,[t]),n}};"undefined"!=typeof module&&void 0!==module.exports&&(module.exports=KTImageInput);
  "use strict";var KTMenu=function(e,t){var n=this,o=!1,i=KTUtil.getById(e),u=KTUtil.getBody();if(i){var r={scroll:{rememberPosition:!1},accordion:{slideSpeed:200,autoScroll:!1,autoScrollSpeed:1200,expandAll:!0},dropdown:{timeout:500}},l={construct:function(e){return KTUtil.data(i).has("menu")?n=KTUtil.data(i).get("menu"):(l.init(e),l.reset(),l.build(),KTUtil.data(i).set("menu",n)),n},init:function(e){n.events=[],n.eventHandlers={},n.options=KTUtil.deepExtend({},r,e),n.pauseDropdownHoverTime=0,n.uid=KTUtil.getUniqueID()},update:function(e){n.options=KTUtil.deepExtend({},r,e),n.pauseDropdownHoverTime=0,l.reset(),n.eventHandlers={},l.build(),KTUtil.data(i).set("menu",n)},reload:function(){l.reset(),l.build(),l.resetSubmenuProps()},build:function(){n.eventHandlers.event_1=KTUtil.on(i,".menu-toggle","click",l.handleSubmenuAccordion),("dropdown"===l.getSubmenuMode()||l.isConditionalSubmenuDropdown())&&(n.eventHandlers.event_2=KTUtil.on(i,'[data-menu-toggle="hover"]',"mouseover",l.handleSubmenuDrodownHoverEnter),n.eventHandlers.event_3=KTUtil.on(i,'[data-menu-toggle="hover"]',"mouseout",l.handleSubmenuDrodownHoverExit),n.eventHandlers.event_4=KTUtil.on(i,'[data-menu-toggle="click"] > .menu-toggle, [data-menu-toggle="click"] > .menu-link .menu-toggle',"click",l.handleSubmenuDropdownClick),n.eventHandlers.event_5=KTUtil.on(i,'[data-menu-toggle="tab"] > .menu-toggle, [data-menu-toggle="tab"] > .menu-link .menu-toggle',"click",l.handleSubmenuDropdownTabClick)),n.eventHandlers.event_6=KTUtil.on(i,".menu-item > .menu-link:not(.menu-toggle):not(.menu-link-toggle-skip)","click",l.handleLinkClick),n.options.scroll&&n.options.scroll.height&&l.scrollInit()},reset:function(){KTUtil.off(i,"click",n.eventHandlers.event_1),KTUtil.off(i,"mouseover",n.eventHandlers.event_2),KTUtil.off(i,"mouseout",n.eventHandlers.event_3),KTUtil.off(i,"click",n.eventHandlers.event_4),KTUtil.off(i,"click",n.eventHandlers.event_5),KTUtil.off(i,"click",n.eventHandlers.event_6)},scrollInit:function(){n.options.scroll&&n.options.scroll.height?(KTUtil.scrollDestroy(i,!0),KTUtil.scrollInit(i,{mobileNativeScroll:!0,windowScroll:!1,resetHeightOnDestroy:!0,handleWindowResize:!0,height:n.options.scroll.height,rememberPosition:n.options.scroll.rememberPosition})):KTUtil.scrollDestroy(i,!0)},scrollUpdate:function(){n.options.scroll&&n.options.scroll.height&&KTUtil.scrollUpdate(i)},scrollTop:function(){n.options.scroll&&n.options.scroll.height&&KTUtil.scrollTop(i)},getSubmenuMode:function(e){return KTUtil.isBreakpointUp("lg")?e&&KTUtil.hasAttr(e,"data-menu-toggle")&&"hover"==KTUtil.attr(e,"data-menu-toggle")?"dropdown":KTUtil.isset(n.options.submenu,"desktop.state.body")?KTUtil.hasClasses(u,n.options.submenu.desktop.state.body)?n.options.submenu.desktop.state.mode:n.options.submenu.desktop.default:KTUtil.isset(n.options.submenu,"desktop")?n.options.submenu.desktop:void 0:KTUtil.isBreakpointUp("md")&&KTUtil.isBreakpointDown("lg")&&KTUtil.isset(n.options.submenu,"tablet")?n.options.submenu.tablet:!(!KTUtil.isBreakpointDown("md")||!KTUtil.isset(n.options.submenu,"mobile"))&&n.options.submenu.mobile},isConditionalSubmenuDropdown:function(){return!(!KTUtil.isBreakpointUp("lg")||!KTUtil.isset(n.options.submenu,"desktop.state.body"))},resetSubmenuProps:function(e){var t=KTUtil.findAll(i,".menu-submenu");if(t)for(var n=0,o=t.length;n<o;n++){var u=t[0];KTUtil.css(u,"display",""),KTUtil.css(u,"overflow",""),u.hasAttribute("data-hor-direction")&&(KTUtil.removeClass(u,"menu-submenu-left"),KTUtil.removeClass(u,"menu-submenu-right"),KTUtil.addClass(u,u.getAttribute("data-hor-direction")))}},handleSubmenuDrodownHoverEnter:function(e){if("accordion"!==l.getSubmenuMode(this)&&!1!==n.resumeDropdownHover()){"1"==this.getAttribute("data-hover")&&(this.removeAttribute("data-hover"),clearTimeout(this.getAttribute("data-timeout")),this.removeAttribute("data-timeout")),l.showSubmenuDropdown(this)}},handleSubmenuDrodownHoverExit:function(e){if(!1!==n.resumeDropdownHover()&&"accordion"!==l.getSubmenuMode(this)){var t=this,o=n.options.dropdown.timeout,i=setTimeout(function(){"1"==t.getAttribute("data-hover")&&l.hideSubmenuDropdown(t,!0)},o);t.setAttribute("data-hover","1"),t.setAttribute("data-timeout",i)}},handleSubmenuDropdownClick:function(e){if("accordion"!==l.getSubmenuMode(this)){var t=this.closest(".menu-item");!1!==l.eventTrigger("submenuToggle",this,e)&&"accordion"!=t.getAttribute("data-menu-submenu-mode")&&(!1===KTUtil.hasClass(t,"menu-item-hover")?(KTUtil.addClass(t,"menu-item-open-dropdown"),l.showSubmenuDropdown(t)):(KTUtil.removeClass(t,"menu-item-open-dropdown"),l.hideSubmenuDropdown(t,!0)),e.preventDefault())}},handleSubmenuDropdownTabClick:function(e){if("accordion"!==l.getSubmenuMode(this)){var t=this.closest(".menu-item");!1!==l.eventTrigger("submenuToggle",this,e)&&"accordion"!=t.getAttribute("data-menu-submenu-mode")&&(0==KTUtil.hasClass(t,"menu-item-hover")&&(KTUtil.addClass(t,"menu-item-open-dropdown"),l.showSubmenuDropdown(t)),e.preventDefault())}},handleLinkClick:function(e){var t=this.closest(".menu-item.menu-item-submenu");!1!==l.eventTrigger("linkClick",this,e)&&t&&"dropdown"===l.getSubmenuMode(t)&&l.hideSubmenuDropdowns()},handleSubmenuDropdownClose:function(e,t){if("accordion"!==l.getSubmenuMode(t)){var n=i.querySelectorAll(".menu-item.menu-item-submenu.menu-item-hover:not(.menu-item-tabs)");if(n.length>0&&!1===KTUtil.hasClass(t,"menu-toggle")&&0===t.querySelectorAll(".menu-toggle").length)for(var o=0,u=n.length;o<u;o++)l.hideSubmenuDropdown(n[0],!0)}},handleSubmenuAccordion:function(e,t){var o,i=t||this;if(!1!==l.eventTrigger("submenuToggle",this,e))if("dropdown"===l.getSubmenuMode(t)&&(o=i.closest(".menu-item"))&&"accordion"!=o.getAttribute("data-menu-submenu-mode"))e.preventDefault();else{var u=i.closest(".menu-item"),r=KTUtil.child(u,".menu-submenu, .menu-inner");if(!KTUtil.hasClass(i.closest(".menu-item"),"menu-item-open-always")&&u&&r){e.preventDefault();var s=n.options.accordion.slideSpeed;if(!1===KTUtil.hasClass(u,"menu-item-open")){if(!1===n.options.accordion.expandAll){var a=i.closest(".menu-nav, .menu-subnav"),m=KTUtil.children(a,".menu-item.menu-item-open.menu-item-submenu:not(.menu-item-here):not(.menu-item-open-always)");if(a&&m)for(var d=0,c=m.length;d<c;d++){var p=m[0],v=KTUtil.child(p,".menu-submenu");v&&KTUtil.slideUp(v,s,function(){l.scrollUpdate(),KTUtil.removeClass(p,"menu-item-open")})}}KTUtil.slideDown(r,s,function(){l.scrollToItem(i),l.scrollUpdate(),l.eventTrigger("submenuToggle",r,e)}),KTUtil.addClass(u,"menu-item-open")}else KTUtil.slideUp(r,s,function(){l.scrollToItem(i),l.eventTrigger("submenuToggle",r,e)}),KTUtil.removeClass(u,"menu-item-open")}}},scrollToItem:function(e){KTUtil.isBreakpointUp("lg")&&n.options.accordion.autoScroll&&"1"!==i.getAttribute("data-menu-scroll")&&KTUtil.scrollTo(e,n.options.accordion.autoScrollSpeed)},hideSubmenuDropdown:function(e,t){t&&(KTUtil.removeClass(e,"menu-item-hover"),KTUtil.removeClass(e,"menu-item-active-tab")),e.removeAttribute("data-hover"),e.getAttribute("data-menu-toggle-class")&&KTUtil.removeClass(u,e.getAttribute("data-menu-toggle-class"));var n=e.getAttribute("data-timeout");e.removeAttribute("data-timeout"),clearTimeout(n)},hideSubmenuDropdowns:function(){var e;if(e=i.querySelectorAll('.menu-item-submenu.menu-item-hover:not(.menu-item-tabs):not([data-menu-toggle="tab"])'))for(var t=0,n=e.length;t<n;t++)l.hideSubmenuDropdown(e[t],!0)},showSubmenuDropdown:function(e){var t=i.querySelectorAll(".menu-item-submenu.menu-item-hover, .menu-item-submenu.menu-item-active-tab");if(t)for(var n=0,o=t.length;n<o;n++){var r=t[n];e!==r&&!1===r.contains(e)&&!1===e.contains(r)&&l.hideSubmenuDropdown(r,!0)}KTUtil.addClass(e,"menu-item-hover");var s=KTUtil.find(e,".menu-submenu");s&&!1===s.hasAttribute("data-hor-direction")&&(KTUtil.hasClass(s,"menu-submenu-left")?s.setAttribute("data-hor-direction","menu-submenu-left"):KTUtil.hasClass(s,"menu-submenu-right")&&s.setAttribute("data-hor-direction","menu-submenu-right")),s&&!0===KTUtil.isOffscreen(s,"left",15)?(KTUtil.removeClass(s,"menu-submenu-left"),KTUtil.addClass(s,"menu-submenu-right")):s&&!0===KTUtil.isOffscreen(s,"right",15)&&(KTUtil.removeClass(s,"menu-submenu-right"),KTUtil.addClass(s,"menu-submenu-left")),e.getAttribute("data-menu-toggle-class")&&KTUtil.addClass(u,e.getAttribute("data-menu-toggle-class"))},createSubmenuDropdownClickDropoff:function(e){var t,n=(t=KTUtil.child(e,".menu-submenu")?KTUtil.css(t,"z-index"):0)-1,o=document.createElement('<div class="menu-dropoff" style="background: transparent; position: fixed; top: 0; bottom: 0; left: 0; right: 0; z-index: '+n+'"></div>');u.appendChild(o),KTUtil.addEvent(o,"click",function(t){t.stopPropagation(),t.preventDefault(),KTUtil.remove(this),l.hideSubmenuDropdown(e,!0)})},pauseDropdownHover:function(e){var t=new Date;n.pauseDropdownHoverTime=t.getTime()+e},resumeDropdownHover:function(){return(new Date).getTime()>n.pauseDropdownHoverTime},resetActiveItem:function(e){for(var t,o,u=0,r=(t=i.querySelectorAll(".menu-item-active")).length;u<r;u++){var l=t[0];KTUtil.removeClass(l,"menu-item-active"),KTUtil.hide(KTUtil.child(l,".menu-submenu"));for(var s=0,a=(o=KTUtil.parents(l,".menu-item-submenu")||[]).length;s<a;s++){var m=o[u];KTUtil.removeClass(m,"menu-item-open"),KTUtil.hide(KTUtil.child(m,".menu-submenu"))}}if(!1===n.options.accordion.expandAll&&(t=i.querySelectorAll(".menu-item-open")))for(u=0,r=t.length;u<r;u++)KTUtil.removeClass(o[0],"menu-item-open")},setActiveItem:function(e){l.resetActiveItem();for(var t=KTUtil.parents(e,".menu-item-submenu")||[],n=0,o=t.length;n<o;n++)KTUtil.addClass(t[n],"menu-item-open");KTUtil.addClass(e,"menu-item-active")},getBreadcrumbs:function(e){var t,n=[],o=KTUtil.child(e,".menu-link");n.push({text:t=KTUtil.child(o,".menu-text")?t.innerHTML:"",title:o.getAttribute("title"),href:o.getAttribute("href")});for(var i=KTUtil.parents(e,".menu-item-submenu"),u=0,r=i.length;u<r;u++){var l=KTUtil.child(i[u],".menu-link");n.push({text:t=KTUtil.child(l,".menu-text")?t.innerHTML:"",title:l.getAttribute("title"),href:l.getAttribute("href")})}return n.reverse()},getPageTitle:function(e){var t;return KTUtil.child(e,".menu-text")?t.innerHTML:""},eventTrigger:function(e,t,o){for(var i=0;i<n.events.length;i++){var u=n.events[i];if(u.name==e){if(1!=u.one)return u.handler.call(this,t,o);if(0==u.fired)return n.events[i].fired=!0,u.handler.call(this,t,o)}}},addEvent:function(e,t,o){n.events.push({name:e,handler:t,one:o,fired:!1})},removeEvent:function(e){n.events[e]&&delete n.events[e]}};return n.setDefaults=function(e){r=e},n.scrollUpdate=function(){return l.scrollUpdate()},n.scrollReInit=function(){return l.scrollInit()},n.scrollTop=function(){return l.scrollTop()},n.setActiveItem=function(e){return l.setActiveItem(e)},n.reload=function(){return l.reload()},n.update=function(e){return l.update(e)},n.getBreadcrumbs=function(e){return l.getBreadcrumbs(e)},n.getPageTitle=function(e){return l.getPageTitle(e)},n.getSubmenuMode=function(e){return l.getSubmenuMode(e)},n.hideDropdown=function(e){l.hideSubmenuDropdown(e,!0)},n.hideDropdowns=function(){l.hideSubmenuDropdowns()},n.pauseDropdownHover=function(e){l.pauseDropdownHover(e)},n.resumeDropdownHover=function(){return l.resumeDropdownHover()},n.on=function(e,t){return l.addEvent(e,t)},n.off=function(e){return l.removeEvent(e)},n.one=function(e,t){return l.addEvent(e,t,!0)},l.construct.apply(n,[t]),KTUtil.addResizeHandler(function(){o&&n.reload()}),o=!0,n}};"undefined"!=typeof module&&void 0!==module.exports&&(module.exports=KTMenu),document.addEventListener("click",function(e){var t;if(t=KTUtil.getByTagName("body")[0].querySelectorAll('.menu-nav .menu-item.menu-item-submenu.menu-item-hover:not(.menu-item-tabs)[data-menu-toggle="click"]'))for(var n=0,o=t.length;n<o;n++){var i=t[n].closest(".menu-nav").parentNode;if(i){var u=KTUtil.data(i).get("menu");if(!u)break;if(!u||"dropdown"!==u.getSubmenuMode())break;e.target!==i&&!1===i.contains(e.target)&&u.hideDropdowns()}}});
  "use strict";var KTOffcanvas=function(t,e){var o=this,n=KTUtil.getById(t),s=KTUtil.getBody();if(n){var a={attrCustom:""},i={construct:function(t){return KTUtil.data(n).has("offcanvas")?o=KTUtil.data(n).get("offcanvas"):(i.init(t),i.build(),KTUtil.data(n).set("offcanvas",o)),o},init:function(t){o.events=[],o.options=KTUtil.deepExtend({},a,t),o.classBase=o.options.baseClass,o.attrCustom=o.options.attrCustom,o.classShown=o.classBase+"-on",o.classOverlay=o.classBase+"-overlay",o.target,o.state=KTUtil.hasClass(n,o.classShown)?"shown":"hidden"},build:function(){if(o.options.toggleBy)if("string"==typeof o.options.toggleBy)KTUtil.addEvent(KTUtil.getById(o.options.toggleBy),"click",function(t){t.preventDefault(),o.target=this,i.toggle()});else if(o.options.toggleBy&&o.options.toggleBy[0])if(o.options.toggleBy[0].target)for(var t in o.options.toggleBy)KTUtil.addEvent(KTUtil.getById(o.options.toggleBy[t].target),"click",function(t){t.preventDefault(),o.target=this,i.toggle()});else for(var t in o.options.toggleBy)KTUtil.addEvent(KTUtil.getById(o.options.toggleBy[t]),"click",function(t){t.preventDefault(),o.target=this,i.toggle()});else o.options.toggleBy&&o.options.toggleBy.target&&KTUtil.addEvent(KTUtil.getById(o.options.toggleBy.target),"click",function(t){t.preventDefault(),o.target=this,i.toggle()});var e=KTUtil.getById(o.options.closeBy);e&&KTUtil.addEvent(e,"click",function(t){t.preventDefault(),o.target=this,i.hide()})},isShown:function(){return"shown"==o.state},toggle:function(){i.eventTrigger("toggle"),"shown"==o.state?i.hide():i.show()},show:function(){"shown"!=o.state&&(i.eventTrigger("beforeShow"),i.toggleClass("show"),KTUtil.attr(s,"data-offcanvas-"+o.classBase,"on"),KTUtil.addClass(n,o.classShown),o.attrCustom.length>0&&KTUtil.attr(s,"data-offcanvas-"+o.classCustom,"on"),o.state="shown",o.options.overlay&&(o.overlay=KTUtil.insertAfter(document.createElement("DIV"),n),KTUtil.addClass(o.overlay,o.classOverlay),KTUtil.addEvent(o.overlay,"click",function(t){t.preventDefault(),i.hide(o.target)})),i.eventTrigger("afterShow"))},hide:function(){"hidden"!=o.state&&(i.eventTrigger("beforeHide"),i.toggleClass("hide"),KTUtil.removeAttr(s,"data-offcanvas-"+o.classBase),KTUtil.removeClass(n,o.classShown),o.attrCustom.length>0&&KTUtil.removeAttr(s,"data-offcanvas-"+o.attrCustom),o.state="hidden",o.options.overlay&&o.overlay&&KTUtil.remove(o.overlay),i.eventTrigger("afterHide"))},toggleClass:function(t){var e,n=KTUtil.attr(o.target,"id");if(o.options.toggleBy&&o.options.toggleBy[0]&&o.options.toggleBy[0].target)for(var s in o.options.toggleBy)o.options.toggleBy[s].target===n&&(e=o.options.toggleBy[s]);else o.options.toggleBy&&o.options.toggleBy.target&&(e=o.options.toggleBy);if(e){var a=KTUtil.getById(e.target);"show"===t&&KTUtil.addClass(a,e.state),"hide"===t&&KTUtil.removeClass(a,e.state)}},eventTrigger:function(t,e){for(var n=0;n<o.events.length;n++){var s=o.events[n];if(s.name==t){if(1!=s.one)return s.handler.call(this,o,e);if(0==s.fired)return o.events[n].fired=!0,s.handler.call(this,o,e)}}},addEvent:function(t,e,n){o.events.push({name:t,handler:e,one:n,fired:!1})}};return o.setDefaults=function(t){a=t},o.isShown=function(){return i.isShown()},o.hide=function(){return i.hide()},o.show=function(){return i.show()},o.on=function(t,e){return i.addEvent(t,e)},o.one=function(t,e){return i.addEvent(t,e,!0)},i.construct.apply(o,[e]),!0,o}};"undefined"!=typeof module&&void 0!==module.exports&&(module.exports=KTOffcanvas);
  "use strict";var KTScrolltop=function(t,e){var n=this,o=KTUtil.getById(t),l=KTUtil.getBody();if(o){var i={offset:300,speed:6e3},r={construct:function(t){return KTUtil.data(o).has("scrolltop")?n=KTUtil.data(o).get("scrolltop"):(r.init(t),r.build(),KTUtil.data(o).set("scrolltop",n)),n},init:function(t){n.events=[],n.options=KTUtil.deepExtend({},i,t)},build:function(){window.addEventListener("scroll",function(){KTUtil.throttle(void 0,function(){r.handle()},200)}),KTUtil.addEvent(o,"click",r.scroll)},handle:function(){KTUtil.getScrollTop()>n.options.offset?!1===l.hasAttribute("data-scrolltop")&&l.setAttribute("data-scrolltop","on"):!0===l.hasAttribute("data-scrolltop")&&l.removeAttribute("data-scrolltop")},scroll:function(t){t.preventDefault(),KTUtil.scrollTop(0,n.options.speed)},eventTrigger:function(t,e){for(var o=0;o<n.events.length;o++){var l=n.events[o];if(l.name==t){if(1!=l.one)return l.handler.call(this,n,e);if(0==l.fired)return n.events[o].fired=!0,l.handler.call(this,n,e)}}},addEvent:function(t,e,o){n.events.push({name:t,handler:e,one:o,fired:!1})}};return n.setDefaults=function(t){i=t},n.on=function(t,e){return r.addEvent(t,e)},n.one=function(t,e){return r.addEvent(t,e,!0)},r.construct.apply(n,[e]),!0,n}};"undefined"!=typeof module&&void 0!==module.exports&&(module.exports=KTScrolltop);
  "use strict";var KTToggle=function(t,e,g){var n=this,r=t,a=e;if(r){var o={targetToggleMode:"class"},l={construct:function(t){return KTUtil.data(r).has("toggle")?n=KTUtil.data(r).get("toggle"):(l.init(t),l.build(),KTUtil.data(r).set("toggle",n)),n},init:function(t){n.element=r,n.events=[],n.options=KTUtil.deepExtend({},o,t),n.target=a,n.targetState=n.options.targetState,n.toggleState=n.options.toggleState,"class"==n.options.targetToggleMode?n.state=KTUtil.hasClasses(n.target,n.targetState)?"on":"off":n.state=KTUtil.hasAttr(n.target,"data-"+n.targetState)?KTUtil.attr(n.target,"data-"+n.targetState):"off"},build:function(){KTUtil.addEvent(r,"mouseup",l.toggle)},toggle:function(t){return l.eventTrigger("beforeToggle"),"off"==n.state?l.toggleOn():l.toggleOff(),l.eventTrigger("afterToggle"),t.preventDefault(),n},toggleOn:function(){return l.eventTrigger("beforeOn"),"class"==n.options.targetToggleMode?KTUtil.addClass(n.target,n.targetState):KTUtil.attr(n.target,"data-"+n.targetState,"on"),n.toggleState&&KTUtil.addClass(r,n.toggleState),n.state="on",l.eventTrigger("afterOn"),l.eventTrigger("toggle"),n},toggleOff:function(){return l.eventTrigger("beforeOff"),"class"==n.options.targetToggleMode?KTUtil.removeClass(n.target,n.targetState):KTUtil.removeAttr(n.target,"data-"+n.targetState),n.toggleState&&KTUtil.removeClass(r,n.toggleState),n.state="off",l.eventTrigger("afterOff"),l.eventTrigger("toggle"),n},eventTrigger:function(t){for(var e=0;e<n.events.length;e++){var g=n.events[e];if(g.name==t){if(1!=g.one)return g.handler.call(this,n);if(0==g.fired)return n.events[e].fired=!0,g.handler.call(this,n)}}},addEvent:function(t,e,g){return n.events.push({name:t,handler:e,one:g,fired:!1}),n}};return n.setDefaults=function(t){o=t},n.getState=function(){return n.state},n.toggle=function(){return l.toggle()},n.toggleOn=function(){return l.toggleOn()},n.toggleOff=function(){return l.toggleOff()},n.on=function(t,e){return l.addEvent(t,e)},n.one=function(t,e){return l.addEvent(t,e,!0)},l.construct.apply(n,[g]),n}};"undefined"!=typeof module&&void 0!==module.exports&&(module.exports=KTToggle);
  "use strict";Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector),Element.prototype.closest||(Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector),Element.prototype.closest=function(t){var e=this;if(!document.documentElement.contains(this))return null;do{if(e.matches(t))return e;e=e.parentElement}while(null!==e);return null}),function(t){for(var e=0;e<t.length;e++)!window[t[e]]||"remove"in window[t[e]].prototype||(window[t[e]].prototype.remove=function(){this.parentNode.removeChild(this)})}(["Element","CharacterData","DocumentType"]),function(){for(var t=0,e=["webkit","moz"],n=0;n<e.length&&!window.requestAnimationFrame;++n)window.requestAnimationFrame=window[e[n]+"RequestAnimationFrame"],window.cancelAnimationFrame=window[e[n]+"CancelAnimationFrame"]||window[e[n]+"CancelRequestAnimationFrame"];window.requestAnimationFrame||(window.requestAnimationFrame=function(e){var n=(new Date).getTime(),i=Math.max(0,16-(n-t)),o=window.setTimeout(function(){e(n+i)},i);return t=n+i,o}),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(t){clearTimeout(t)})}(),[Element.prototype,Document.prototype,DocumentFragment.prototype].forEach(function(t){t.hasOwnProperty("prepend")||Object.defineProperty(t,"prepend",{configurable:!0,enumerable:!0,writable:!0,value:function(){var t=Array.prototype.slice.call(arguments),e=document.createDocumentFragment();t.forEach(function(t){var n=t instanceof Node;e.appendChild(n?t:document.createTextNode(String(t)))}),this.insertBefore(e,this.firstChild)}})}),null==Element.prototype.getAttributeNames&&(Element.prototype.getAttributeNames=function(){for(var t=this.attributes,e=t.length,n=new Array(e),i=0;i<e;i++)n[i]=t[i].name;return n}),window.KTUtilElementDataStore={},window.KTUtilElementDataStoreID=0,window.KTUtilDelegatedEventHandlers={};var KTUtil=function(){var t=[],e={sm:544,md:768,lg:992,xl:1200},n=function(){window.addEventListener("resize",function(){KTUtil.throttle(void 0,function(){!function(){for(var e=0;e<t.length;e++)t[e].call()}()},200)})};return{init:function(t){t&&t.breakpoints&&(e=t.breakpoints),n()},addResizeHandler:function(e){t.push(e)},removeResizeHandler:function(e){for(var n=0;n<t.length;n++)e===t[n]&&delete t[n]},runResizeHandlers:function(){_runResizeHandlers()},resize:function(){if("function"==typeof Event)window.dispatchEvent(new Event("resize"));else{var t=window.document.createEvent("UIEvents");t.initUIEvent("resize",!0,!1,window,0),window.dispatchEvent(t)}},getURLParam:function(t){var e,n,i=window.location.search.substring(1).split("&");for(e=0;e<i.length;e++)if((n=i[e].split("="))[0]==t)return unescape(n[1]);return null},isMobileDevice:function(){var t=this.getViewPort().width<this.getBreakpoint("lg");return!1===t&&(t=null!=navigator.userAgent.match(/iPad/i)),t},isDesktopDevice:function(){return!KTUtil.isMobileDevice()},getViewPort:function(){var t=window,e="inner";return"innerWidth"in window||(e="client",t=document.documentElement||document.body),{width:t[e+"Width"],height:t[e+"Height"]}},isInResponsiveRange:function(t){var e=this.getViewPort().width;return"general"==t||("desktop"==t&&e>=this.getBreakpoint("lg")+1||("tablet"==t&&e>=this.getBreakpoint("md")+1&&e<this.getBreakpoint("lg")||("mobile"==t&&e<=this.getBreakpoint("md")||("desktop-and-tablet"==t&&e>=this.getBreakpoint("md")+1||("tablet-and-mobile"==t&&e<=this.getBreakpoint("lg")||"minimal-desktop-and-below"==t&&e<=this.getBreakpoint("xl"))))))},isBreakpointUp:function(t){return this.getViewPort().width>=this.getBreakpoint(t)},isBreakpointDown:function(t){return this.getViewPort().width<this.getBreakpoint(t)},getUniqueID:function(t){return t+Math.floor(Math.random()*(new Date).getTime())},getBreakpoint:function(t){return e[t]},isset:function(t,e){var n;if(-1!==(e=e||"").indexOf("["))throw new Error("Unsupported object path notation.");e=e.split(".");do{if(void 0===t)return!1;if(n=e.shift(),!t.hasOwnProperty(n))return!1;t=t[n]}while(e.length);return!0},getHighestZindex:function(t){for(var e,n;t&&t!==document;){if(("absolute"===(e=KTUtil.css(t,"position"))||"relative"===e||"fixed"===e)&&(n=parseInt(KTUtil.css(t,"z-index")),!isNaN(n)&&0!==n))return n;t=t.parentNode}return null},hasFixedPositionedParent:function(t){for(;t&&t!==document;){if("fixed"===KTUtil.css(t,"position"))return!0;t=t.parentNode}return!1},sleep:function(t){for(var e=(new Date).getTime(),n=0;n<1e7&&!((new Date).getTime()-e>t);n++);},getRandomInt:function(t,e){return Math.floor(Math.random()*(e-t+1))+t},isAngularVersion:function(){return void 0!==window.Zone},deepExtend:function(t){t=t||{};for(var e=1;e<arguments.length;e++){var n=arguments[e];if(n)for(var i in n)n.hasOwnProperty(i)&&("[object Object]"!==Object.prototype.toString.call(n[i])?t[i]=n[i]:t[i]=KTUtil.deepExtend(t[i],n[i]))}return t},extend:function(t){t=t||{};for(var e=1;e<arguments.length;e++)if(arguments[e])for(var n in arguments[e])arguments[e].hasOwnProperty(n)&&(t[n]=arguments[e][n]);return t},getById:function(t){return"string"==typeof t?document.getElementById(t):t},getByTag:function(t){return document.getElementsByTagName(t)},getByTagName:function(t){return document.getElementsByTagName(t)},getByClass:function(t){return document.getElementsByClassName(t)},getBody:function(){return document.getElementsByTagName("body")[0]},hasClasses:function(t,e){if(t){for(var n=e.split(" "),i=0;i<n.length;i++)if(0==KTUtil.hasClass(t,KTUtil.trim(n[i])))return!1;return!0}},hasClass:function(t,e){if(t)return t.classList?t.classList.contains(e):new RegExp("\\b"+e+"\\b").test(t.className)},addClass:function(t,e){if(t&&void 0!==e){var n=e.split(" ");if(t.classList)for(var i=0;i<n.length;i++)n[i]&&n[i].length>0&&t.classList.add(KTUtil.trim(n[i]));else if(!KTUtil.hasClass(t,e))for(var o=0;o<n.length;o++)t.className+=" "+KTUtil.trim(n[o])}},removeClass:function(t,e){if(t&&void 0!==e){var n=e.split(" ");if(t.classList)for(var i=0;i<n.length;i++)t.classList.remove(KTUtil.trim(n[i]));else if(KTUtil.hasClass(t,e))for(var o=0;o<n.length;o++)t.className=t.className.replace(new RegExp("\\b"+KTUtil.trim(n[o])+"\\b","g"),"")}},triggerCustomEvent:function(t,e,n){var i;window.CustomEvent?i=new CustomEvent(e,{detail:n}):(i=document.createEvent("CustomEvent")).initCustomEvent(e,!0,!0,n),t.dispatchEvent(i)},triggerEvent:function(t,e){var n;if(t.ownerDocument)n=t.ownerDocument;else{if(9!=t.nodeType)throw new Error("Invalid node passed to fireEvent: "+t.id);n=t}if(t.dispatchEvent){var i="";switch(e){case"click":case"mouseenter":case"mouseleave":case"mousedown":case"mouseup":i="MouseEvents";break;case"focus":case"change":case"blur":case"select":i="HTMLEvents";break;default:throw"fireEvent: Couldn't find an event class for event '"+e+"'."}var o="change"!=e;(r=n.createEvent(i)).initEvent(e,o,!0),r.synthetic=!0,t.dispatchEvent(r,!0)}else if(t.fireEvent){var r;(r=n.createEventObject()).synthetic=!0,t.fireEvent("on"+e,r)}},index:function(t){for(var e=t.parentNode.children,n=0;n<e.length;n++)if(e[n]==t)return n},trim:function(t){return t.trim()},eventTriggered:function(t){return!!t.currentTarget.dataset.triggered||(t.currentTarget.dataset.triggered=!0,!1)},remove:function(t){t&&t.parentNode&&t.parentNode.removeChild(t)},find:function(t,e){if(t=KTUtil.getById(t))return t.querySelector(e)},findAll:function(t,e){if(t=KTUtil.getById(t))return t.querySelectorAll(e)},insertAfter:function(t,e){return e.parentNode.insertBefore(t,e.nextSibling)},parents:function(t,e){Element.prototype.matches||(Element.prototype.matches=Element.prototype.matchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector||Element.prototype.oMatchesSelector||Element.prototype.webkitMatchesSelector||function(t){for(var e=(this.document||this.ownerDocument).querySelectorAll(t),n=e.length;--n>=0&&e.item(n)!==this;);return n>-1});for(var n=[];t&&t!==document;t=t.parentNode)e?t.matches(e)&&n.push(t):n.push(t);return n},children:function(t,e,n){if(t&&t.childNodes){for(var i=[],o=0,r=t.childNodes.length;o<r;++o)1==t.childNodes[o].nodeType&&KTUtil.matches(t.childNodes[o],e,n)&&i.push(t.childNodes[o]);return i}},child:function(t,e,n){var i=KTUtil.children(t,e,n);return i?i[0]:null},matches:function(t,e,n){var i=Element.prototype,o=i.matches||i.webkitMatchesSelector||i.mozMatchesSelector||i.msMatchesSelector||function(t){return-1!==[].indexOf.call(document.querySelectorAll(t),this)};return!(!t||!t.tagName)&&o.call(t,e)},data:function(t){return{set:function(e,n){t&&(void 0===t.customDataTag&&(window.KTUtilElementDataStoreID++,t.customDataTag=window.KTUtilElementDataStoreID),void 0===window.KTUtilElementDataStore[t.customDataTag]&&(window.KTUtilElementDataStore[t.customDataTag]={}),window.KTUtilElementDataStore[t.customDataTag][e]=n)},get:function(e){if(t)return void 0===t.customDataTag?null:this.has(e)?window.KTUtilElementDataStore[t.customDataTag][e]:null},has:function(e){return!!t&&(void 0!==t.customDataTag&&!(!window.KTUtilElementDataStore[t.customDataTag]||!window.KTUtilElementDataStore[t.customDataTag][e]))},remove:function(e){t&&this.has(e)&&delete window.KTUtilElementDataStore[t.customDataTag][e]}}},outerWidth:function(t,e){var n;return!0===e?(n=parseFloat(t.offsetWidth),n+=parseFloat(KTUtil.css(t,"margin-left"))+parseFloat(KTUtil.css(t,"margin-right")),parseFloat(n)):n=parseFloat(t.offsetWidth)},offset:function(t){var e,n;if(t)return t.getClientRects().length?(e=t.getBoundingClientRect(),n=t.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}},height:function(t){return KTUtil.css(t,"height")},outerHeight:function(t,e){var n,i=t.offsetHeight;return void 0!==e&&!0===e?(n=getComputedStyle(t),i+=parseInt(n.marginTop)+parseInt(n.marginBottom)):i},visible:function(t){return!(0===t.offsetWidth&&0===t.offsetHeight)},attr:function(t,e,n){if(null!=t)return void 0===n?t.getAttribute(e):void t.setAttribute(e,n)},hasAttr:function(t,e){if(null!=t)return!!t.getAttribute(e)},removeAttr:function(t,e){null!=t&&t.removeAttribute(e)},animate:function(t,e,n,i,o,r){var a={};if(a.linear=function(t,e,n,i){return n*t/i+e},o=a.linear,"number"==typeof t&&"number"==typeof e&&"number"==typeof n&&"function"==typeof i){"function"!=typeof r&&(r=function(){});var l=window.requestAnimationFrame||function(t){window.setTimeout(t,20)},s=e-t;i(t);var c=window.performance&&window.performance.now?window.performance.now():+new Date;l(function a(d){var u=(d||+new Date)-c;u>=0&&i(o(u,t,s,n)),u>=0&&u>=n?(i(e),r()):l(a)})}},actualCss:function(t,e,n){var i,o="";if(t instanceof HTMLElement!=!1)return t.getAttribute("kt-hidden-"+e)&&!1!==n?parseFloat(t.getAttribute("kt-hidden-"+e)):(o=t.style.cssText,t.style.cssText="position: absolute; visibility: hidden; display: block;","width"==e?i=t.offsetWidth:"height"==e&&(i=t.offsetHeight),t.style.cssText=o,t.setAttribute("kt-hidden-"+e,i),parseFloat(i))},actualHeight:function(t,e){return KTUtil.actualCss(t,"height",e)},actualWidth:function(t,e){return KTUtil.actualCss(t,"width",e)},getScroll:function(t,e){return e="scroll"+e,t==window||t==document?self["scrollTop"==e?"pageYOffset":"pageXOffset"]||browserSupportsBoxModel&&document.documentElement[e]||document.body[e]:t[e]},css:function(t,e,n){if(t)if(void 0!==n)t.style[e]=n;else{var i=(t.ownerDocument||document).defaultView;if(i&&i.getComputedStyle)return e=e.replace(/([A-Z])/g,"-$1").toLowerCase(),i.getComputedStyle(t,null).getPropertyValue(e);if(t.currentStyle)return e=e.replace(/\-(\w)/g,function(t,e){return e.toUpperCase()}),n=t.currentStyle[e],/^\d+(em|pt|%|ex)?$/i.test(n)?function(e){var n=t.style.left,i=t.runtimeStyle.left;return t.runtimeStyle.left=t.currentStyle.left,t.style.left=e||0,e=t.style.pixelLeft+"px",t.style.left=n,t.runtimeStyle.left=i,e}(n):n}},slide:function(t,e,n,i,o){if(!(!t||"up"==e&&!1===KTUtil.visible(t)||"down"==e&&!0===KTUtil.visible(t))){n=n||600;var r=KTUtil.actualHeight(t),a=!1,l=!1;KTUtil.css(t,"padding-top")&&!0!==KTUtil.data(t).has("slide-padding-top")&&KTUtil.data(t).set("slide-padding-top",KTUtil.css(t,"padding-top")),KTUtil.css(t,"padding-bottom")&&!0!==KTUtil.data(t).has("slide-padding-bottom")&&KTUtil.data(t).set("slide-padding-bottom",KTUtil.css(t,"padding-bottom")),KTUtil.data(t).has("slide-padding-top")&&(a=parseInt(KTUtil.data(t).get("slide-padding-top"))),KTUtil.data(t).has("slide-padding-bottom")&&(l=parseInt(KTUtil.data(t).get("slide-padding-bottom"))),"up"==e?(t.style.cssText="display: block; overflow: hidden;",a&&KTUtil.animate(0,a,n,function(e){t.style.paddingTop=a-e+"px"},"linear"),l&&KTUtil.animate(0,l,n,function(e){t.style.paddingBottom=l-e+"px"},"linear"),KTUtil.animate(0,r,n,function(e){t.style.height=r-e+"px"},"linear",function(){t.style.height="",t.style.display="none","function"==typeof i&&i()})):"down"==e&&(t.style.cssText="display: block; overflow: hidden;",a&&KTUtil.animate(0,a,n,function(e){t.style.paddingTop=e+"px"},"linear",function(){t.style.paddingTop=""}),l&&KTUtil.animate(0,l,n,function(e){t.style.paddingBottom=e+"px"},"linear",function(){t.style.paddingBottom=""}),KTUtil.animate(0,r,n,function(e){t.style.height=e+"px"},"linear",function(){t.style.height="",t.style.display="",t.style.overflow="","function"==typeof i&&i()}))}},slideUp:function(t,e,n){KTUtil.slide(t,"up",e,n)},slideDown:function(t,e,n){KTUtil.slide(t,"down",e,n)},show:function(t,e){void 0!==t&&(t.style.display=e||"block")},hide:function(t){void 0!==t&&(t.style.display="none")},addEvent:function(t,e,n,i){null!=t&&t.addEventListener(e,n)},removeEvent:function(t,e,n){null!==t&&t.removeEventListener(e,n)},on:function(t,e,n,i){if(e){var o=KTUtil.getUniqueID("event");return window.KTUtilDelegatedEventHandlers[o]=function(n){for(var o=t.querySelectorAll(e),r=n.target;r&&r!==t;){for(var a=0,l=o.length;a<l;a++)r===o[a]&&i.call(r,n);r=r.parentNode}},KTUtil.addEvent(t,n,window.KTUtilDelegatedEventHandlers[o]),o}},off:function(t,e,n){t&&window.KTUtilDelegatedEventHandlers[n]&&(KTUtil.removeEvent(t,e,window.KTUtilDelegatedEventHandlers[n]),delete window.KTUtilDelegatedEventHandlers[n])},one:function(t,e,n){t.addEventListener(e,function e(i){return i.target&&i.target.removeEventListener&&i.target.removeEventListener(i.type,e),t&&t.removeEventListener&&i.currentTarget.removeEventListener(i.type,e),n(i)})},hash:function(t){var e,n=0;if(0===t.length)return n;for(e=0;e<t.length;e++)n=(n<<5)-n+t.charCodeAt(e),n|=0;return n},animateClass:function(t,e,n){var i,o={animation:"animationend",OAnimation:"oAnimationEnd",MozAnimation:"mozAnimationEnd",WebkitAnimation:"webkitAnimationEnd",msAnimation:"msAnimationEnd"};for(var r in o)void 0!==t.style[r]&&(i=o[r]);KTUtil.addClass(t,"animated "+e),KTUtil.one(t,i,function(){KTUtil.removeClass(t,"animated "+e)}),n&&KTUtil.one(t,i,n)},transitionEnd:function(t,e){var n,i={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"mozTransitionEnd",WebkitTransition:"webkitTransitionEnd",msTransition:"msTransitionEnd"};for(var o in i)void 0!==t.style[o]&&(n=i[o]);KTUtil.one(t,n,e)},animationEnd:function(t,e){var n,i={animation:"animationend",OAnimation:"oAnimationEnd",MozAnimation:"mozAnimationEnd",WebkitAnimation:"webkitAnimationEnd",msAnimation:"msAnimationEnd"};for(var o in i)void 0!==t.style[o]&&(n=i[o]);KTUtil.one(t,n,e)},animateDelay:function(t,e){for(var n=["webkit-","moz-","ms-","o-",""],i=0;i<n.length;i++)KTUtil.css(t,n[i]+"animation-delay",e)},animateDuration:function(t,e){for(var n=["webkit-","moz-","ms-","o-",""],i=0;i<n.length;i++)KTUtil.css(t,n[i]+"animation-duration",e)},scrollTo:function(t,e,n){n=n||500;var i,o,r=t?KTUtil.offset(t).top:0,a=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0;e&&(a+=e),i=a,o=r,KTUtil.animate(i,o,n,function(t){document.documentElement.scrollTop=t,document.body.parentNode.scrollTop=t,document.body.scrollTop=t})},scrollTop:function(t,e){KTUtil.scrollTo(null,t,e)},isArray:function(t){return t&&Array.isArray(t)},ready:function(t){(document.attachEvent?"complete"===document.readyState:"loading"!==document.readyState)?t():document.addEventListener("DOMContentLoaded",t)},isEmpty:function(t){for(var e in t)if(t.hasOwnProperty(e))return!1;return!0},numberString:function(t){for(var e=(t+="").split("."),n=e[0],i=e.length>1?"."+e[1]:"",o=/(\d+)(\d{3})/;o.test(n);)n=n.replace(o,"$1,$2");return n+i},detectIE:function(){var t=window.navigator.userAgent,e=t.indexOf("MSIE ");if(e>0)return parseInt(t.substring(e+5,t.indexOf(".",e)),10);if(t.indexOf("Trident/")>0){var n=t.indexOf("rv:");return parseInt(t.substring(n+3,t.indexOf(".",n)),10)}var i=t.indexOf("Edge/");return i>0&&parseInt(t.substring(i+5,t.indexOf(".",i)),10)},isRTL:function(){var t=KTUtil.getByTagName("html")[0];if(t)return"rtl"==KTUtil.attr(t,"direction")},scrollInit:function(t,e){if(t){e=KTUtil.deepExtend({},{wheelSpeed:.5,swipeEasing:!0,wheelPropagation:!1,minScrollbarLength:40,maxScrollbarLength:300,suppressScrollX:!0},e),n(),e.handleWindowResize&&KTUtil.addResizeHandler(function(){n()})}function n(){var n,i,o=t.getAttributeNames();if(o.length>0&&o.forEach(function(n){if(/^data-.*/g.test(n)&&0==["scroll","height","mobile-height"].includes(i)){var i=n.replace("data-","").toLowerCase().replace(/(?:[\s-])\w/g,function(t){return t.replace("-","").toUpperCase()});e[i]=KTUtil.filterBoolean(t.getAttribute(n))}}),!1!==(i=e.height instanceof Function?e.height.call():!0===KTUtil.isMobileDevice()&&e.mobileHeight?parseInt(e.mobileHeight):e.height?parseInt(e.height):parseInt(KTUtil.css(t,"height"))))if(i=parseInt(i),!e.mobileNativeScroll&&!e.disableForMobile||!0!==KTUtil.isMobileDevice())if(i>0&&KTUtil.css(t,"height",i+"px"),e.desktopNativeScroll)KTUtil.css(t,"overflow","auto");else{"true"==KTUtil.attr(t,"data-window-scroll")&&(e.windowScroll=!0),(n=KTUtil.data(t).get("ps"))?n.update():(KTUtil.css(t,"overflow","hidden"),KTUtil.addClass(t,"scroll"),n=new PerfectScrollbar(t,e),KTUtil.data(t).set("ps",n));var r=KTUtil.attr(t,"id");if(!0===e.rememberPosition&&KTCookie&&r){if(KTCookie.getCookie(r)){var a=parseInt(KTCookie.getCookie(r));a>0&&(t.scrollTop=a)}t.addEventListener("ps-scroll-y",function(){KTCookie.setCookie(r,t.scrollTop)})}}else(n=KTUtil.data(t).get("ps"))?(e.resetHeightOnDestroy?KTUtil.css(t,"height","auto"):(KTUtil.css(t,"overflow","auto"),i>0&&KTUtil.css(t,"height",i+"px")),n.destroy(),n=KTUtil.data(t).remove("ps")):i>0&&(KTUtil.css(t,"overflow","auto"),KTUtil.css(t,"height",i+"px"));else KTUtil.scrollDestroy(t,!0)}},scrollUpdate:function(t){var e=KTUtil.data(t).get("ps");e&&e.update()},scrollUpdateAll:function(t){for(var e=KTUtil.findAll(t,".ps"),n=0,i=e.length;n<i;n++)KTUtil.scrollUpdate(e[n])},scrollDestroy:function(t,e){var n=KTUtil.data(t).get("ps");n&&(n.destroy(),n=KTUtil.data(t).remove("ps")),t&&e&&(t.style.setProperty("overflow",""),t.style.setProperty("height",""))},filterBoolean:function(t){return!0===t||"true"===t||!1!==t&&"false"!==t&&t},setHTML:function(t,e){t.innerHTML=e},getHTML:function(t){if(t)return t.innerHTML},getDocumentHeight:function(){var t=document.body,e=document.documentElement;return Math.max(t.scrollHeight,t.offsetHeight,e.clientHeight,e.scrollHeight,e.offsetHeight)},getScrollTop:function(){return(document.scrollingElement||document.documentElement).scrollTop},changeColor:function(t,e){var n=!1;"#"==t[0]&&(t=t.slice(1),n=!0);var i=parseInt(t,16),o=(i>>16)+e;o>255?o=255:o<0&&(o=0);var r=(i>>8&255)+e;r>255?r=255:r<0&&(r=0);var a=(255&i)+e;return a>255?a=255:a<0&&(a=0),(n?"#":"")+(a|r<<8|o<<16).toString(16)},throttle:function(t,e,n){t||(t=setTimeout(function(){e(),t=void 0},n))},debounce:function(t,e,n){clearTimeout(t),t=setTimeout(e,n)},btnWait:function(t,e,n,i){if(t&&(void 0!==i&&!0===i&&KTUtil.attr(t,"disabled",!0),e&&(KTUtil.addClass(t,e),KTUtil.attr(t,"wait-class",e)),n)){var o=KTUtil.find(t,".btn-caption");o?(KTUtil.data(o).set("caption",KTUtil.getHTML(o)),KTUtil.setHTML(o,n)):(KTUtil.data(t).set("caption",KTUtil.getHTML(t)),KTUtil.setHTML(t,n))}},btnRelease:function(t){if(t){KTUtil.removeAttr(t,"disabled"),KTUtil.hasAttr(t,"wait-class")&&KTUtil.removeClass(t,KTUtil.attr(t,"wait-class"));var e=KTUtil.find(t,".btn-caption");e&&KTUtil.data(e).has("caption")?KTUtil.setHTML(e,KTUtil.data(e).get("caption")):KTUtil.data(t).has("caption")&&KTUtil.setHTML(t,KTUtil.data(t).get("caption"))}},isOffscreen:function(t,e,n){n=n||0;var i=KTUtil.getViewPort().width,o=KTUtil.getViewPort().height,r=KTUtil.offset(t).top,a=KTUtil.outerHeight(t)+n,l=KTUtil.offset(t).left,s=KTUtil.outerWidth(t)+n;if("bottom"==e){if(o<r+a)return!0;if(o>r+1.5*a)return!0}if("top"==e){if(r<0)return!0;if(r>a)return!0}return"left"==e&&l<0||"right"==e&&i<l+s}}}();"undefined"!=typeof module&&void 0!==module.exports&&(module.exports=KTUtil),KTUtil.ready(function(){"undefined"!=typeof KTAppSettings?KTUtil.init(KTAppSettings):KTUtil.init()}),window.onload=function(){var t=KTUtil.getByTagName("body");t&&t[0]&&KTUtil.removeClass(t[0],"page-loading")};
  "use strict";var KTWizard=function(t,e){var n=this,r=KTUtil.getById(t);KTUtil.getBody();if(r){var i={startStep:1,clickableSteps:!1},a={construct:function(t){return KTUtil.data(r).has("wizard")?n=KTUtil.data(r).get("wizard"):(a.init(t),a.build(),KTUtil.data(r).set("wizard",n)),n},init:function(t){n.element=r,n.events=[],n.options=KTUtil.deepExtend({},i,t),n.steps=KTUtil.findAll(r,'[data-wizard-type="step"]'),n.btnNext=KTUtil.find(r,'[data-wizard-type="action-next"]'),n.btnPrev=KTUtil.find(r,'[data-wizard-type="action-prev"]'),n.btnSubmit=KTUtil.find(r,'[data-wizard-type="action-submit"]'),n.events=[],n.lastStep=0,n.currentStep=1,n.newStep=0,n.stopped=!1,n.totalSteps=n.steps.length,n.options.startStep>1&&a.goTo(n.options.startStep),a.updateUI()},build:function(){KTUtil.addEvent(n.btnNext,"click",function(t){t.preventDefault(),a.setNewStep(a.getNextStep()),!1!==a.eventTrigger("change")&&a.goTo(a.getNextStep())}),KTUtil.addEvent(n.btnPrev,"click",function(t){t.preventDefault(),a.setNewStep(a.getPrevStep()),!1!==a.eventTrigger("change")&&a.goTo(a.getPrevStep())}),!0===n.options.clickableSteps&&KTUtil.on(r,'[data-wizard-type="step"]',"click",function(){var t=KTUtil.index(this)+1;t!==n.currentStep&&(a.setNewStep(t),!1!==a.eventTrigger("change")&&a.goTo(t))}),KTUtil.addEvent(n.btnSubmit,"click",function(t){t.preventDefault(),a.eventTrigger("submit")})},goTo:function(t){if(!0!==n.stopped){if(!(t===n.currentStep||t>n.totalSteps||t<0))return t=parseInt(t),n.lastStep=n.currentStep,n.currentStep=t,n.newStep=0,a.updateUI(),a.eventTrigger("changed"),n}else n.stopped=!1},stop:function(){n.stopped=!0},resume:function(){n.stopped=!1},isLastStep:function(){return n.currentStep===n.totalSteps},isFirstStep:function(){return 1===n.currentStep},isBetweenStep:function(){return!1===a.isLastStep()&&!1===a.isFirstStep()},updateUI:function(){var t="",e=n.currentStep-1;t=a.isLastStep()?"last":a.isFirstStep()?"first":"between",KTUtil.attr(n.element,"data-wizard-state",t);var r=KTUtil.findAll(n.element,'[data-wizard-type="step"]');if(r&&r.length>0)for(var i=0,o=r.length;i<o;i++)i==e?KTUtil.attr(r[i],"data-wizard-state","current"):i<e?KTUtil.attr(r[i],"data-wizard-state","done"):KTUtil.attr(r[i],"data-wizard-state","pending");var p=KTUtil.findAll(n.element,'[data-wizard-type="step-info"]');if(p&&p.length>0)for(i=0,o=p.length;i<o;i++)i==e?KTUtil.attr(p[i],"data-wizard-state","current"):KTUtil.removeAttr(p[i],"data-wizard-state");var s=KTUtil.findAll(n.element,'[data-wizard-type="step-content"]');if(s&&s.length>0)for(i=0,o=s.length;i<o;i++)i==e?KTUtil.attr(s[i],"data-wizard-state","current"):KTUtil.removeAttr(s[i],"data-wizard-state")},getNextStep:function(){return n.totalSteps>=n.currentStep+1?n.currentStep+1:n.totalSteps},getPrevStep:function(){return n.currentStep-1>=1?n.currentStep-1:1},getNewStep:function(){return n.newStep},setNewStep:function(t){n.newStep=t},eventTrigger:function(t,e){for(var r=0;r<n.events.length;r++){var i=n.events[r];if(i.name==t){if(1!=i.one)return i.handler.call(this,n);if(0==i.fired)return n.events[r].fired=!0,i.handler.call(this,n)}}},addEvent:function(t,e,r){return n.events.push({name:t,handler:e,one:r,fired:!1}),n}};return n.setDefaults=function(t){i=t},n.goNext=function(){return a.goTo(a.getNextStep())},n.goPrev=function(){return a.goTo(a.getPrevStep())},n.goLast=function(){return a.goTo(a.getLastStep())},n.goFirst=function(){return a.goTo(a.getFirstStep())},n.goTo=function(t){return a.goTo(t)},n.stop=function(){return a.stop()},n.resume=function(){return a.resume()},n.getStep=function(){return n.currentStep},n.getNewStep=function(){return a.getNewStep()},n.setNewStep=function(t){a.setNewStep(t)},n.isLastStep=function(){return a.isLastStep()},n.isFirstStep=function(){return a.isFirstStep()},n.on=function(t,e){return a.addEvent(t,e)},n.one=function(t,e){return a.addEvent(t,e,!0)},a.construct.apply(n,[e]),n}};"undefined"!=typeof module&&void 0!==module.exports&&(module.exports=KTWizard);
  "use strict";!function(t){var a="KTDatatable",e=KTUtil,l=KTApp;if(void 0===e)throw new Error("Util class is required and must be included before KTDatatable");t.fn.KTDatatable=function(o){if(0!==t(this).length){var n=this;n.debug=!1,n.API={record:null,value:null,params:null};var i={isInit:!1,cellOffset:110,iconOffset:15,stateId:"meta",ajaxParams:{},pagingObject:{},init:function(a){var e,l=!1;null===a.data.source&&(i.extractTable(),l=!0),i.setupBaseDOM.call(),i.setupDOM(n.table),t(n).on("datatable-on-layout-updated",i.afterRender),n.debug&&i.stateRemove(i.stateId),i.setDataSourceQuery(i.getOption("data.source.read.params.query")),t.each(i.getOption("extensions"),function(a,e){"function"==typeof t.fn.KTDatatable[a]&&("object"!=typeof e&&(e=t.extend({},e)),new t.fn.KTDatatable[a](n,e))}),i.spinnerCallback(!0),"remote"!==a.data.type&&"local"!==a.data.type||(!1===a.data.saveState&&i.stateRemove(i.stateId),"local"===a.data.type&&"object"==typeof a.data.source&&(n.dataSet=n.originalDataSet=i.dataMapCallback(a.data.source)),i.dataRender()),l&&(t(n.tableHead).find("tr").remove(),t(n.tableFoot).find("tr").remove()),i.setHeadTitle(),i.getOption("layout.footer")&&i.setHeadTitle(n.tableFoot),void 0!==a.layout.header&&!1===a.layout.header&&t(n.table).find("thead").remove(),void 0!==a.layout.footer&&!1===a.layout.footer&&t(n.table).find("tfoot").remove(),null!==a.data.type&&"local"!==a.data.type||(i.setupCellField.call(),i.setupTemplateCell.call(),i.setupSubDatatable.call(),i.setupSystemColumn.call(),i.redraw());var o=!1;t(window).resize(function(){t(this).width()!==e&&(e=t(this).width(),i.fullRender()),o||(e=t(this).width(),o=!0)}),t(n).height("");var d="";return t(i.getOption("search.input")).on("keyup",function(a){if(!i.getOption("search.onEnter")||13===a.which){var e=t(this).val();d!==e&&(i.search(e),d=e)}}),n},extractTable:function(){var a=[],l=t(n).find("tr:first-child th").get().map(function(e,l){var n=t(e).data("field"),i=t(e).data("title");void 0===n&&(n=t(e).text().trim()),void 0===i&&(i=t(e).text().trim());var d={field:n,title:i};for(var r in o.columns)o.columns[r].field===n&&(d=t.extend(!0,{},o.columns[r],d));return a.push(d),n});o.columns=a;var i=[],d=[];t(n).find("tr").each(function(){t(this).find("td").length&&i.push(t(this).prop("attributes"));var a={};t(this).find("td").each(function(t,e){a[l[t]]=e.innerHTML.trim()}),e.isEmpty(a)||d.push(a)}),o.data.attr.rowProps=i,o.data.source=d},layoutUpdate:function(){i.setupSubDatatable.call(),i.setupSystemColumn.call(),i.setupHover.call(),void 0===o.detail&&1===i.getDepth()&&i.lockTable.call(),i.resetScroll(),i.isLocked()||(i.redraw.call(),i.isSubtable()||!0!==i.getOption("rows.autoHide")||i.autoHide(),t(n.table).find(".datatable-row").css("height","")),i.columnHide.call(),i.rowEvenOdd.call(),i.sorting.call(),i.scrollbar.call(),i.isInit||(i.dropdownFix(),t(n).trigger("datatable-on-init",{table:t(n.wrap).attr("id"),options:o}),i.isInit=!0),t(n).trigger("datatable-on-layout-updated",{table:t(n.wrap).attr("id")})},dropdownFix:function(){var a;t("body").on("show.bs.dropdown",".datatable .datatable-body",function(e){a=t(e.target).find(".dropdown-menu"),t("body").append(a.detach()),a.css("display","block"),a.position({my:"right top",at:"right bottom",of:t(e.relatedTarget)}),n.closest(".modal").length&&a.css("z-index","2000")}).on("hide.bs.dropdown",".datatable .datatable-body",function(e){t(e.target).append(a.detach()),a.hide()}),t(window).on("resize",function(t){void 0!==a&&a.hide()})},lockTable:function(){var a={lockEnabled:!1,init:function(){a.lockEnabled=i.lockEnabledColumns(),0===a.lockEnabled.left.length&&0===a.lockEnabled.right.length||a.enable()},enable:function(){t(n.table).find("thead,tbody,tfoot").each(function(){var e=this;0===t(this).find(".datatable-lock").length&&t(this).ready(function(){!function(e){if(t(e).find(".datatable-lock").length>0)i.log("Locked container already exist in: ",e);else if(0!==t(e).find(".datatable-row").length){var l=t("<div/>").addClass("datatable-lock datatable-lock-left"),o=t("<div/>").addClass("datatable-lock datatable-lock-scroll"),d=t("<div/>").addClass("datatable-lock datatable-lock-right");t(e).find(".datatable-row").each(function(){var a=t("<tr/>").addClass("datatable-row").data("obj",t(this).data("obj")).appendTo(l),e=t("<tr/>").addClass("datatable-row").data("obj",t(this).data("obj")).appendTo(o),n=t("<tr/>").addClass("datatable-row").data("obj",t(this).data("obj")).appendTo(d);t(this).find(".datatable-cell").each(function(){var l=t(this).data("locked");void 0!==l?(void 0===l.left&&!0!==l||t(this).appendTo(a),void 0!==l.right&&t(this).appendTo(n)):t(this).appendTo(e)}),t(this).remove()}),a.lockEnabled.left.length>0&&(t(n.wrap).addClass("datatable-lock"),t(l).appendTo(e)),(a.lockEnabled.left.length>0||a.lockEnabled.right.length>0)&&t(o).appendTo(e),a.lockEnabled.right.length>0&&(t(n.wrap).addClass("datatable-lock"),t(d).appendTo(e))}else i.log("No row exist in: ",e)}(e)})})}};return a.init(),a},fullRender:function(){t(n.tableHead).empty(),i.setHeadTitle(),i.getOption("layout.footer")&&(t(n.tableFoot).empty(),i.setHeadTitle(n.tableFoot)),i.spinnerCallback(!0),t(n.wrap).removeClass("datatable-loaded"),i.insertData()},lockEnabledColumns:function(){var a=t(window).width(),l=o.columns,n={left:[],right:[]};return t.each(l,function(t,l){void 0!==l.locked&&(void 0!==l.locked.left&&e.getBreakpoint(l.locked.left)<=a&&n.left.push(l.locked.left),void 0!==l.locked.right&&e.getBreakpoint(l.locked.right)<=a&&n.right.push(l.locked.right))}),n},afterRender:function(a,e){t(n).ready(function(){i.isLocked()&&i.redraw(),t(n.tableBody).css("visibility",""),t(n.wrap).addClass("datatable-loaded"),i.spinnerCallback(!1)})},hoverTimer:0,isScrolling:!1,setupHover:function(){t(window).scroll(function(t){clearTimeout(i.hoverTimer),i.isScrolling=!0}),t(n.tableBody).find(".datatable-cell").off("mouseenter","mouseleave").on("mouseenter",function(){if(i.hoverTimer=setTimeout(function(){i.isScrolling=!1},200),!i.isScrolling){var a=t(this).closest(".datatable-row").addClass("datatable-row-hover"),e=t(a).index()+1;t(a).closest(".datatable-lock").parent().find(".datatable-row:nth-child("+e+")").addClass("datatable-row-hover")}}).on("mouseleave",function(){var a=t(this).closest(".datatable-row").removeClass("datatable-row-hover"),e=t(a).index()+1;t(a).closest(".datatable-lock").parent().find(".datatable-row:nth-child("+e+")").removeClass("datatable-row-hover")})},adjustLockContainer:function(){if(!i.isLocked())return 0;var a=t(n.tableHead).width(),e=t(n.tableHead).find(".datatable-lock-left").width(),l=t(n.tableHead).find(".datatable-lock-right").width();void 0===e&&(e=0),void 0===l&&(l=0);var o=Math.floor(a-e-l);return t(n.table).find(".datatable-lock-scroll").css("width",o),o},dragResize:function(){var a,e,l=!1,o=void 0;t(n.tableHead).find(".datatable-cell").mousedown(function(n){o=t(this),l=!0,a=n.pageX,e=t(this).width(),t(o).addClass("datatable-cell-resizing")}).mousemove(function(i){if(l){var d=t(o).index(),r=t(n.tableBody),s=t(o).closest(".datatable-lock");if(s){var c=t(s).index();r=t(n.tableBody).find(".datatable-lock").eq(c)}t(r).find(".datatable-row").each(function(l,o){t(o).find(".datatable-cell").eq(d).width(e+(i.pageX-a)).children().width(e+(i.pageX-a))}),t(o).children().css("width",e+(i.pageX-a))}}).mouseup(function(){t(o).removeClass("datatable-cell-resizing"),l=!1}),t(document).mouseup(function(){t(o).removeClass("datatable-cell-resizing"),l=!1})},initHeight:function(){if(o.layout.height&&o.layout.scroll){var a=t(n.tableHead).find(".datatable-row").outerHeight(),e=t(n.tableFoot).find(".datatable-row").outerHeight(),l=o.layout.height;a>0&&(l-=a),e>0&&(l-=e),l-=2,t(n.tableBody).css("max-height",Math.floor(parseFloat(l)))}},setupBaseDOM:function(){n.initialDatatable=t(n).clone(),"TABLE"===t(n).prop("tagName")?(n.table=t(n).removeClass("datatable").addClass("datatable-table"),0===t(n.table).parents(".datatable").length&&(n.table.wrap(t("<div/>").addClass("datatable").addClass("datatable-"+o.layout.theme)),n.wrap=t(n.table).parent())):(n.wrap=t(n).addClass("datatable").addClass("datatable-"+o.layout.theme),n.table=t("<table/>").addClass("datatable-table").appendTo(n)),void 0!==o.layout.class&&t(n.wrap).addClass(o.layout.class),t(n.table).removeClass("datatable-destroyed").css("display","block"),void 0===t(n).attr("id")&&(i.setOption("data.saveState",!1),t(n.table).attr("id",e.getUniqueID("datatable-"))),i.getOption("layout.minHeight")&&t(n.table).css("min-height",i.getOption("layout.minHeight")),i.getOption("layout.height")&&t(n.table).css("max-height",i.getOption("layout.height")),null===o.data.type&&t(n.table).css("width","").css("display",""),n.tableHead=t(n.table).find("thead"),0===t(n.tableHead).length&&(n.tableHead=t("<thead/>").prependTo(n.table)),n.tableBody=t(n.table).find("tbody"),0===t(n.tableBody).length&&(n.tableBody=t("<tbody/>").appendTo(n.table)),void 0!==o.layout.footer&&o.layout.footer&&(n.tableFoot=t(n.table).find("tfoot"),0===t(n.tableFoot).length&&(n.tableFoot=t("<tfoot/>").appendTo(n.table)))},setupCellField:function(a){void 0===a&&(a=t(n.table).children());var e=o.columns;t.each(a,function(a,l){t(l).find(".datatable-row").each(function(a,l){t(l).find(".datatable-cell").each(function(a,l){void 0!==e[a]&&t(l).data(e[a])})})})},setupTemplateCell:function(a){void 0===a&&(a=n.tableBody);var e=o.columns;t(a).find(".datatable-row").each(function(a,l){var o=t(l).data("obj");if(void 0!==o){var d=i.getOption("rows.callback");"function"==typeof d&&d(t(l),o,a);var r=i.getOption("rows.beforeTemplate");"function"==typeof r&&r(t(l),o,a),void 0===o&&(o={},t(l).find(".datatable-cell").each(function(a,l){var n=t.grep(e,function(a,e){return t(l).data("field")===a.field})[0];void 0!==n&&(o[n.field]=t(l).text())})),t(l).find(".datatable-cell").each(function(l,d){var r=t.grep(e,function(a,e){return t(d).data("field")===a.field})[0];if(void 0!==r&&void 0!==r.template){var s="";"string"==typeof r.template&&(s=i.dataPlaceholder(r.template,o)),"function"==typeof r.template&&(s=r.template(o,a,n)),"undefined"!=typeof DOMPurify&&(s=DOMPurify.sanitize(s));var c=document.createElement("span");c.innerHTML=s,t(d).html(c),void 0!==r.overflow&&(t(c).css("overflow",r.overflow),t(c).css("position","relative"))}});var s=i.getOption("rows.afterTemplate");"function"==typeof s&&s(t(l),o,a)}})},setupSystemColumn:function(){if(n.dataSet=n.dataSet||[],0!==n.dataSet.length){var a=o.columns;t(n.tableBody).find(".datatable-row").each(function(e,l){t(l).find(".datatable-cell").each(function(e,l){var o=t.grep(a,function(a,e){return t(l).data("field")===a.field})[0];if(void 0!==o){var n=t(l).text();if(void 0!==o.selector&&!1!==o.selector){if(t(l).find('.checkbox [type="checkbox"]').length>0)return;t(l).addClass("datatable-cell-check");var d=t("<label/>").addClass("checkbox checkbox-single").append(t("<input/>").attr("type","checkbox").attr("value",n).on("click",function(){t(this).is(":checked")?i.setActive(this):i.setInactive(this)})).append("&nbsp;<span></span>");void 0!==o.selector.class&&t(d).addClass(o.selector.class),t(l).children().html(d)}if(void 0!==o.subtable&&o.subtable){if(t(l).find(".datatable-toggle-subtable").length>0)return;t(l).children().html(t("<a/>").addClass("datatable-toggle-subtable").attr("href","#").attr("data-value",n).append(t("<i/>").addClass(i.getOption("layout.icons.rowDetail.collapse"))))}}})});var e=function(e){var l=t.grep(a,function(t,a){return void 0!==t.selector&&!1!==t.selector})[0];if(void 0!==l&&void 0!==l.selector&&!1!==l.selector){var o=t(e).find('[data-field="'+l.field+'"]');if(t(o).find('.checkbox [type="checkbox"]').length>0)return;t(o).addClass("datatable-cell-check");var n=t("<label/>").addClass("checkbox checkbox-single checkbox-all").append(t("<input/>").attr("type","checkbox").on("click",function(){t(this).is(":checked")?i.setActiveAll(!0):i.setActiveAll(!1)})).append("&nbsp;<span></span>");void 0!==l.selector.class&&t(n).addClass(l.selector.class),t(o).children().html(n)}};o.layout.header&&e(t(n.tableHead).find(".datatable-row").first()),o.layout.footer&&e(t(n.tableFoot).find(".datatable-row").first())}},maxWidthList:{},adjustCellsWidth:function(){var a=t(n.tableBody).innerWidth()-i.iconOffset,e=t(n.tableHead).find(".datatable-row:first-child").find(".datatable-cell").not(".datatable-toggle-detail").not(":hidden").length;if(e>0){a-=i.iconOffset*e;var l=Math.floor(a/e);l<=i.cellOffset&&(l=i.cellOffset),t(n.table).find(".datatable-row").find(".datatable-cell").not(".datatable-toggle-detail").not(":hidden").each(function(a,e){var o=l,d=t(e).data("width");if(void 0!==d)if("auto"===d){var r=t(e).data("field");if(i.maxWidthList[r])o=i.maxWidthList[r];else{var s=t(n.table).find('.datatable-cell[data-field="'+r+'"]');o=i.maxWidthList[r]=Math.max.apply(null,t(s).map(function(){return t(this).outerWidth()}).get())}}else o=d;t(e).children().css("width",Math.ceil(o))})}return n},adjustCellsHeight:function(){t.each(t(n.table).children(),function(a,e){for(var l=t(e).find(".datatable-row").first().parent().find(".datatable-row").length,o=1;o<=l;o++){var n=t(e).find(".datatable-row:nth-child("+o+")");if(t(n).length>0){var i=Math.max.apply(null,t(n).map(function(){return t(this).outerHeight()}).get());t(n).css("height",Math.ceil(i))}}})},setupDOM:function(a){t(a).find("> thead").addClass("datatable-head"),t(a).find("> tbody").addClass("datatable-body"),t(a).find("> tfoot").addClass("datatable-foot"),t(a).find("tr").addClass("datatable-row"),t(a).find("tr > th, tr > td").addClass("datatable-cell"),t(a).find("tr > th, tr > td").each(function(a,e){0===t(e).find("span").length&&t(e).wrapInner(t("<span/>").css("width",i.cellOffset))})},scrollbar:function(){var a={scrollable:null,tableLocked:null,initPosition:null,init:function(){var l=e.getViewPort().width;if(o.layout.scroll){t(n.wrap).addClass("datatable-scroll");var d=t(n.tableBody).find(".datatable-lock-scroll");t(d).find(".datatable-row").length>0&&t(d).length>0?(a.scrollHead=t(n.tableHead).find("> .datatable-lock-scroll > .datatable-row"),a.scrollFoot=t(n.tableFoot).find("> .datatable-lock-scroll > .datatable-row"),a.tableLocked=t(n.tableBody).find(".datatable-lock:not(.datatable-lock-scroll)"),i.getOption("layout.customScrollbar")&&10!=e.detectIE()&&l>e.getBreakpoint("lg")?a.initCustomScrollbar(d[0]):a.initDefaultScrollbar(d)):t(n.tableBody).find(".datatable-row").length>0&&(a.scrollHead=t(n.tableHead).find("> .datatable-row"),a.scrollFoot=t(n.tableFoot).find("> .datatable-row"),i.getOption("layout.customScrollbar")&&10!=e.detectIE()&&l>e.getBreakpoint("lg")?a.initCustomScrollbar(n.tableBody):a.initDefaultScrollbar(n.tableBody))}},initDefaultScrollbar:function(e){a.initPosition=t(e).scrollLeft(),t(e).css("overflow-y","auto").off().on("scroll",a.onScrolling),t(e).css("overflow-x","auto")},onScrolling:function(l){var o=t(this).scrollLeft(),n=t(this).scrollTop();e.isRTL()&&(o-=a.initPosition),t(a.scrollHead).css("left",-o),t(a.scrollFoot).css("left",-o),t(a.tableLocked).each(function(a,e){i.isLocked()&&(n-=1),t(e).css("top",-n)})},initCustomScrollbar:function(e){a.scrollable=e,i.initScrollbar(e),a.initPosition=t(e).scrollLeft(),t(e).off().on("scroll",a.onScrolling)}};return a.init(),a},initScrollbar:function(a,l){if(a&&a.nodeName){t(n.tableBody).css("overflow","");var o=t(a).data("ps");e.hasClass(a,"ps")&&void 0!==o?o.update():(o=new PerfectScrollbar(a,Object.assign({},{wheelSpeed:.5,swipeEasing:!0,minScrollbarLength:40,maxScrollbarLength:300,suppressScrollX:i.getOption("rows.autoHide")&&!i.isLocked()},l)),t(a).data("ps",o)),t(window).resize(function(){o.update()})}},setHeadTitle:function(a){void 0===a&&(a=n.tableHead),a=t(a)[0];var l=o.columns,d=a.getElementsByTagName("tr")[0],r=a.getElementsByTagName("td");void 0===d&&(d=document.createElement("tr"),a.appendChild(d)),t.each(l,function(a,l){var o=r[a];if(void 0===o&&(o=document.createElement("th"),d.appendChild(o)),void 0!==l.title&&(o.innerHTML=l.title,o.setAttribute("data-field",l.field),e.addClass(o,l.class),void 0!==l.autoHide&&(!0!==l.autoHide?o.setAttribute("data-autohide-disabled",l.autoHide):o.setAttribute("data-autohide-enabled",l.autoHide)),t(o).data(l)),void 0!==l.attr&&t.each(l.attr,function(t,a){o.setAttribute(t,a)}),void 0!==l.textAlign){var i=void 0!==n.textAlign[l.textAlign]?n.textAlign[l.textAlign]:"";e.addClass(o,i)}}),i.setupDOM(a)},dataRender:function(a){t(n.table).siblings(".datatable-pager").removeClass("datatable-paging-loaded");var e=function(){n.dataSet=n.dataSet||[],i.localDataUpdate();var a=i.getDataSourceParam("pagination");0===a.perpage&&(a.perpage=o.data.pageSize||10),a.total=n.dataSet.length;var e=Math.max(a.perpage*(a.page-1),0),l=Math.min(e+a.perpage,a.total);return n.dataSet=t(n.dataSet).slice(e,l),a},l=function(a){var l=function(a,e){t(a.pager).hasClass("datatable-paging-loaded")||(t(a.pager).remove(),a.init(e)),t(a.pager).off().on("datatable-on-goto-page",function(l){t(a.pager).remove(),a.init(e)});var l=Math.max(e.perpage*(e.page-1),0),o=Math.min(l+e.perpage,e.total);i.localDataUpdate(),n.dataSet=t(n.dataSet).slice(l,o),i.insertData()};if(t(n.wrap).removeClass("datatable-error"),o.pagination)if(o.data.serverPaging&&"local"!==o.data.type){var d=i.getObject("meta",a||null);i.pagingObject=null!==d?i.paging(d):i.paging(e(),l)}else i.pagingObject=i.paging(e(),l);else i.localDataUpdate();i.insertData()};"local"===o.data.type||!1===o.data.serverSorting&&"sort"===a||!1===o.data.serverFiltering&&"search"===a?setTimeout(function(){l(),i.setAutoColumns()}):i.getData().done(l)},insertData:function(){n.dataSet=n.dataSet||[];var a=i.getDataSourceParam(),l=a.pagination,d=(Math.max(l.page,1)-1)*l.perpage,r=Math.min(l.page,l.pages)*l.perpage,s={};void 0!==o.data.attr.rowProps&&o.data.attr.rowProps.length&&(s=o.data.attr.rowProps.slice(d,r));var c=document.createElement("tbody");c.style.visibility="hidden";var p=o.columns.length;if(t.each(n.dataSet,function(l,d){var r=document.createElement("tr");r.setAttribute("data-row",l),t(r).data("obj",d),void 0!==s[l]&&t.each(s[l],function(){r.setAttribute(this.name,this.value)});for(var u=0;u<p;u+=1){var b=o.columns[u],g=[];if(i.getObject("sort.field",a)===b.field&&g.push("datatable-cell-sorted"),void 0!==b.textAlign){var f=void 0!==n.textAlign[b.textAlign]?n.textAlign[b.textAlign]:"";g.push(f)}void 0!==b.class&&g.push(b.class);var h=document.createElement("td");e.addClass(h,g.join(" ")),h.setAttribute("data-field",b.field),void 0!==b.autoHide&&(!0!==b.autoHide?h.setAttribute("data-autohide-disabled",b.autoHide):h.setAttribute("data-autohide-enabled",b.autoHide)),h.innerHTML=i.getObject(b.field,d),h.setAttribute("aria-label",i.getObject(b.field,d)),r.appendChild(h)}c.appendChild(r)}),0===n.dataSet.length){var u=document.createElement("span");e.addClass(u,"datatable-error"),u.innerHTML=i.getOption("translate.records.noRecords"),c.appendChild(u),t(n.wrap).addClass("datatable-error datatable-loaded"),i.spinnerCallback(!1)}t(n.tableBody).replaceWith(c),n.tableBody=c,i.setupDOM(n.table),i.setupCellField([n.tableBody]),i.setupTemplateCell(n.tableBody),i.layoutUpdate()},updateTableComponents:function(){n.tableHead=t(n.table).children("thead").get(0),n.tableBody=t(n.table).children("tbody").get(0),n.tableFoot=t(n.table).children("tfoot").get(0)},getData:function(){var a={dataType:"json",method:"POST",data:{},timeout:i.getOption("data.source.read.timeout")||3e4};if("local"===o.data.type&&(a.url=o.data.source),"remote"===o.data.type){var e=i.getDataSourceParam();i.getOption("data.serverPaging")||delete e.pagination,i.getOption("data.serverSorting")||delete e.sort,a.data=t.extend({},a.data,i.getOption("data.source.read.params"),e),"string"!=typeof(a=t.extend({},a,i.getOption("data.source.read"))).url&&(a.url=i.getOption("data.source.read")),"string"!=typeof a.url&&(a.url=i.getOption("data.source"))}return t.ajax(a).done(function(a,e,l){n.lastResponse=a,n.dataSet=n.originalDataSet=i.dataMapCallback(a),i.setAutoColumns(),t(n).trigger("datatable-on-ajax-done",[n.dataSet])}).fail(function(a,e,l){t(n).trigger("datatable-on-ajax-fail",[a]),t(n.tableBody).html(t("<span/>").addClass("datatable-error").html(i.getOption("translate.records.noRecords"))),t(n.wrap).addClass("datatable-error datatable-loaded"),i.spinnerCallback(!1)}).always(function(){})},paging:function(a,l){var o={meta:null,pager:null,paginateEvent:null,pagerLayout:{pagination:null,info:null},callback:null,init:function(a){o.meta=a,o.meta.page=parseInt(o.meta.page),o.meta.pages=parseInt(o.meta.pages),o.meta.perpage=parseInt(o.meta.perpage),o.meta.total=parseInt(o.meta.total),o.meta.pages=Math.max(Math.ceil(o.meta.total/o.meta.perpage),1),o.meta.page>o.meta.pages&&(o.meta.page=o.meta.pages),o.paginateEvent=i.getTablePrefix("paging"),o.pager=t(n.table).siblings(".datatable-pager"),t(o.pager).hasClass("datatable-paging-loaded")||(t(o.pager).remove(),0!==o.meta.pages&&(i.setDataSourceParam("pagination",{page:o.meta.page,pages:o.meta.pages,perpage:o.meta.perpage,total:o.meta.total}),o.callback=o.serverCallback,"function"==typeof l&&(o.callback=l),o.addPaginateEvent(),o.populate(),o.meta.page=Math.max(o.meta.page||1,o.meta.page),t(n).trigger(o.paginateEvent,o.meta),o.pagingBreakpoint.call(),t(window).resize(o.pagingBreakpoint)))},serverCallback:function(t,a){i.dataRender()},populate:function(){if(n.dataSet=n.dataSet||[],0!==n.dataSet.length){var a=i.getOption("layout.icons.pagination"),e=i.getOption("translate.toolbar.pagination.items.default");o.pager=t("<div/>").addClass("datatable-pager datatable-paging-loaded");var l=t("<ul/>").addClass("datatable-pager-nav my-2 mb-sm-0");o.pagerLayout.pagination=l,t("<li/>").append(t("<a/>").attr("title",e.first).addClass("datatable-pager-link datatable-pager-link-first").append(t("<i/>").addClass(a.first)).on("click",o.gotoMorePage).attr("data-page",1)).appendTo(l),t("<li/>").append(t("<a/>").attr("title",e.prev).addClass("datatable-pager-link datatable-pager-link-prev").append(t("<i/>").addClass(a.prev)).on("click",o.gotoMorePage)).appendTo(l),t("<li/>").append(t("<input/>").attr("type","text").addClass("datatable-pager-input form-control").attr("title",e.input).on("keyup",function(){t(this).attr("data-page",Math.abs(t(this).val()))}).on("keypress",function(t){13===t.which&&o.gotoMorePage(t)})).appendTo(l);var d=i.getOption("toolbar.items.pagination.pages.desktop.pagesNumber"),r=Math.ceil(o.meta.page/d)*d,s=r-d;r>o.meta.pages&&(r=o.meta.pages),s<0&&(s=0);for(var c=s;c<(r||1);c++){var p=c+1;t("<li/>").append(t("<a/>").addClass("datatable-pager-link datatable-pager-link-number").text(p).attr("data-page",p).attr("title",p).on("click",o.gotoPage)).appendTo(l)}t("<li/>").append(t("<a/>").attr("title",e.next).addClass("datatable-pager-link datatable-pager-link-next").append(t("<i/>").addClass(a.next)).on("click",o.gotoMorePage)).appendTo(l),t("<li/>").append(t("<a/>").attr("title",e.last).addClass("datatable-pager-link datatable-pager-link-last").append(t("<i/>").addClass(a.last)).on("click",o.gotoMorePage).attr("data-page",o.meta.pages)).appendTo(l),i.getOption("toolbar.items.info")&&(o.pagerLayout.info=t("<div/>").addClass("datatable-pager-info my-2 mb-sm-0").append(t("<span/>").addClass("datatable-pager-detail"))),t.each(i.getOption("toolbar.layout"),function(a,e){t(o.pagerLayout[e]).appendTo(o.pager)});var u=t("<select/>").addClass("selectpicker datatable-pager-size").attr("title",i.getOption("translate.toolbar.pagination.items.default.select")).attr("data-width","60px").attr("data-container","body").val(o.meta.perpage).on("change",o.updatePerpage).prependTo(o.pagerLayout.info),b=i.getOption("toolbar.items.pagination.pageSizeSelect");0==b.length&&(b=[5,10,20,30,50,100]),t.each(b,function(a,e){var l=e;-1===e&&(l=i.getOption("translate.toolbar.pagination.items.default.all")),t("<option/>").attr("value",e).html(l).appendTo(u)}),t(n).ready(function(){t(".selectpicker").selectpicker().on("hide.bs.select",function(){t(this).closest(".bootstrap-select").removeClass("dropup")}).siblings(".dropdown-toggle").attr("title",i.getOption("translate.toolbar.pagination.items.default.select"))}),o.paste()}},paste:function(){t.each(t.unique(i.getOption("toolbar.placement")),function(a,e){"bottom"===e&&t(o.pager).clone(!0).insertAfter(n.table),"top"===e&&t(o.pager).clone(!0).addClass("datatable-pager-top").insertBefore(n.table)})},gotoMorePage:function(a){if(a.preventDefault(),"disabled"===t(this).attr("disabled"))return!1;var e=t(this).attr("data-page");return void 0===e&&(e=t(a.target).attr("data-page")),o.openPage(parseInt(e)),!1},gotoPage:function(a){a.preventDefault(),t(this).hasClass("datatable-pager-link-active")||o.openPage(parseInt(t(this).data("page")))},openPage:function(a){o.meta.page=parseInt(a),t(n).trigger(o.paginateEvent,o.meta),o.callback(o,o.meta),t(o.pager).trigger("datatable-on-goto-page",o.meta)},updatePerpage:function(a){a.preventDefault(),t(this).selectpicker("toggle"),o.pager=t(n.table).siblings(".datatable-pager").removeClass("datatable-paging-loaded"),a.originalEvent&&(o.meta.perpage=parseInt(t(this).val())),t(o.pager).find("select.datatable-pager-size").val(o.meta.perpage).attr("data-selected",o.meta.perpage),i.setDataSourceParam("pagination",{page:o.meta.page,pages:o.meta.pages,perpage:o.meta.perpage,total:o.meta.total}),t(o.pager).trigger("datatable-on-update-perpage",o.meta),t(n).trigger(o.paginateEvent,o.meta),o.callback(o,o.meta),o.updateInfo.call()},addPaginateEvent:function(a){t(n).off(o.paginateEvent).on(o.paginateEvent,function(a,e){i.spinnerCallback(!0),o.pager=t(n.table).siblings(".datatable-pager");var l=t(o.pager).find(".datatable-pager-nav");t(l).find(".datatable-pager-link-active").removeClass("datatable-pager-link-active"),t(l).find('.datatable-pager-link-number[data-page="'+e.page+'"]').addClass("datatable-pager-link-active"),t(l).find(".datatable-pager-link-prev").attr("data-page",Math.max(e.page-1,1)),t(l).find(".datatable-pager-link-next").attr("data-page",Math.min(e.page+1,e.pages)),t(o.pager).each(function(){t(this).find('.datatable-pager-input[type="text"]').prop("value",e.page)}),i.setDataSourceParam("pagination",{page:o.meta.page,pages:o.meta.pages,perpage:o.meta.perpage,total:o.meta.total}),t(o.pager).find("select.datatable-pager-size").val(e.perpage).attr("data-selected",e.perpage),t(n.table).find('.checkbox > [type="checkbox"]').prop("checked",!1),t(n.table).find(".datatable-row-active").removeClass("datatable-row-active"),o.updateInfo.call(),o.pagingBreakpoint.call()})},updateInfo:function(){var a=Math.max(o.meta.perpage*(o.meta.page-1)+1,1),e=Math.min(a+o.meta.perpage-1,o.meta.total);t(o.pager).find(".datatable-pager-info").find(".datatable-pager-detail").html(i.dataPlaceholder(i.getOption("translate.toolbar.pagination.items.info"),{start:0===o.meta.total?0:a,end:-1===o.meta.perpage?o.meta.total:e,pageSize:-1===o.meta.perpage||o.meta.perpage>=o.meta.total?o.meta.total:o.meta.perpage,total:o.meta.total}))},pagingBreakpoint:function(){var a=t(n.table).siblings(".datatable-pager").find(".datatable-pager-nav");if(0!==t(a).length){var l=i.getCurrentPage(),d=t(a).find(".datatable-pager-input").closest("li");t(a).find("li").show(),t.each(i.getOption("toolbar.items.pagination.pages"),function(n,r){if(e.isInResponsiveRange(n)){switch(n){case"desktop":case"tablet":Math.ceil(l/r.pagesNumber),r.pagesNumber,r.pagesNumber;t(d).hide(),o.meta=i.getDataSourceParam("pagination"),o.paginationUpdate();break;case"mobile":t(d).show(),t(a).find(".datatable-pager-link-more-prev").closest("li").hide(),t(a).find(".datatable-pager-link-more-next").closest("li").hide(),t(a).find(".datatable-pager-link-number").closest("li").hide()}return!1}})}},paginationUpdate:function(){var a=t(n.table).siblings(".datatable-pager").find(".datatable-pager-nav"),e=t(a).find(".datatable-pager-link-more-prev"),l=t(a).find(".datatable-pager-link-more-next"),d=t(a).find(".datatable-pager-link-first"),r=t(a).find(".datatable-pager-link-prev"),s=t(a).find(".datatable-pager-link-next"),c=t(a).find(".datatable-pager-link-last"),p=t(a).find(".datatable-pager-link-number"),u=Math.max(t(p).first().data("page")-1,1);t(e).each(function(a,e){t(e).attr("data-page",u)}),1===u?t(e).parent().hide():t(e).parent().show();var b=Math.min(t(p).last().data("page")+1,o.meta.pages);t(l).each(function(a,e){t(l).attr("data-page",b).show()}),b===o.meta.pages&&b===t(p).last().data("page")?t(l).parent().hide():t(l).parent().show(),1===o.meta.page?(t(d).attr("disabled",!0).addClass("datatable-pager-link-disabled"),t(r).attr("disabled",!0).addClass("datatable-pager-link-disabled")):(t(d).removeAttr("disabled").removeClass("datatable-pager-link-disabled"),t(r).removeAttr("disabled").removeClass("datatable-pager-link-disabled")),o.meta.page===o.meta.pages?(t(s).attr("disabled",!0).addClass("datatable-pager-link-disabled"),t(c).attr("disabled",!0).addClass("datatable-pager-link-disabled")):(t(s).removeAttr("disabled").removeClass("datatable-pager-link-disabled"),t(c).removeAttr("disabled").removeClass("datatable-pager-link-disabled"));var g=i.getOption("toolbar.items.pagination.navigation");g.first||t(d).remove(),g.prev||t(r).remove(),g.next||t(s).remove(),g.last||t(c).remove(),g.more||(t(e).remove(),t(l).remove())}};return o.init(a),o},columnHide:function(){var a=e.getViewPort().width;t.each(o.columns,function(l,o){if(void 0!==o.responsive||void 0!==o.visible){var d=o.field,r=t.grep(t(n.table).find(".datatable-cell"),function(a,e){return d===t(a).data("field")});setTimeout(function(){!1===i.getObject("visible",o)?t(r).hide():(e.getBreakpoint(i.getObject("responsive.hidden",o))>=a?t(r).hide():t(r).show(),e.getBreakpoint(i.getObject("responsive.visible",o))<=a?t(r).show():t(r).hide())})}})},setupSubDatatable:function(){var a=i.getOption("detail.content");if("function"==typeof a&&!(t(n.table).find(".datatable-subtable").length>0)){t(n.wrap).addClass("datatable-subtable"),o.columns[0].subtable=!0;var e=function(e){e.preventDefault();var l=t(this).closest(".datatable-row"),d=t(l).next(".datatable-row-subtable");0===t(d).length&&(d=t("<tr/>").addClass("datatable-row-subtable datatable-row-loading").hide().append(t("<td/>").addClass("datatable-subtable").attr("colspan",i.getTotalColumns())),t(l).after(d),t(l).hasClass("datatable-row-even")&&t(d).addClass("datatable-row-subtable-even")),t(d).toggle();var r=t(d).find(".datatable-subtable"),s=t(this).closest("[data-field]:first-child").find(".datatable-toggle-subtable").data("value"),c=t(this).find("i").removeAttr("class");t(l).hasClass("datatable-row-subtable-expanded")?(t(c).addClass(i.getOption("layout.icons.rowDetail.collapse")),t(l).removeClass("datatable-row-subtable-expanded"),t(n).trigger("datatable-on-collapse-subtable",[l])):(t(c).addClass(i.getOption("layout.icons.rowDetail.expand")),t(l).addClass("datatable-row-subtable-expanded"),t(n).trigger("datatable-on-expand-subtable",[l])),0===t(r).find(".datatable").length&&(t.map(n.dataSet,function(t,a){return s===t[o.columns[0].field]&&(e.data=t,!0)}),e.detailCell=r,e.parentRow=l,e.subTable=r,a(e),t(r).children(".datatable").on("datatable-on-init",function(a){t(d).removeClass("datatable-row-loading")}),"local"===i.getOption("data.type")&&t(d).removeClass("datatable-row-loading"))},l=o.columns;t(n.tableBody).find(".datatable-row").each(function(a,o){t(o).find(".datatable-cell").each(function(a,o){var n=t.grep(l,function(a,e){return t(o).data("field")===a.field})[0];if(void 0!==n){var d=t(o).text();if(void 0!==n.subtable&&n.subtable){if(t(o).find(".datatable-toggle-subtable").length>0)return;t(o).html(t("<a/>").addClass("datatable-toggle-subtable").attr("href","#").attr("data-value",d).attr("title",i.getOption("detail.title")).on("click",e).append(t("<i/>").css("width",t(o).data("width")).addClass(i.getOption("layout.icons.rowDetail.collapse"))))}}})})}},dataMapCallback:function(t){var a=t;return"function"==typeof i.getOption("data.source.read.map")?i.getOption("data.source.read.map")(t):(void 0!==t&&void 0!==t.data&&(a=t.data),a)},isSpinning:!1,spinnerCallback:function(t,a){void 0===a&&(a=n);var e=i.getOption("layout.spinner");void 0!==e&&e&&(t?i.isSpinning||(void 0!==e.message&&!0===e.message&&(e.message=i.getOption("translate.records.processing")),i.isSpinning=!0,void 0!==l&&l.block(a,e)):(i.isSpinning=!1,void 0!==l&&l.unblock(a)))},sortCallback:function(a,e,l){var o=l.type||"string",n=l.format||"",i=l.field;return t(a).sort(function(l,d){var r=l[i],s=d[i];switch(o){case"date":if("undefined"==typeof moment)throw new Error("Moment.js is required.");var c=moment(r,n).diff(moment(s,n));return"asc"===e?c>0?1:c<0?-1:0:c<0?1:c>0?-1:0;case"number":return isNaN(parseFloat(r))&&null!=r&&(r=Number(r.replace(/[^0-9\.-]+/g,""))),isNaN(parseFloat(s))&&null!=s&&(s=Number(s.replace(/[^0-9\.-]+/g,""))),r=parseFloat(r),s=parseFloat(s),"asc"===e?r>s?1:r<s?-1:0:r<s?1:r>s?-1:0;case"html":return t(a).sort(function(a,l){return r=t(a[i]).text(),s=t(l[i]).text(),"asc"===e?r>s?1:r<s?-1:0:r<s?1:r>s?-1:0});case"string":default:return"asc"===e?r>s?1:r<s?-1:0:r<s?1:r>s?-1:0}})},log:function(t,a){void 0===a&&(a=""),n.debug&&console.log(t,a)},autoHide:function(){var a=!1,e=t(n.table).find("[data-autohide-enabled]");e.length&&(a=!0,e.hide());var l=function(a){a.preventDefault();var e=t(this).closest(".datatable-row"),l=t(e).next();if(t(l).hasClass("datatable-row-detail"))t(this).find("i").removeClass(i.getOption("layout.icons.rowDetail.expand")).addClass(i.getOption("layout.icons.rowDetail.collapse")),t(l).remove();else{t(this).find("i").removeClass(i.getOption("layout.icons.rowDetail.collapse")).addClass(i.getOption("layout.icons.rowDetail.expand"));var n=t(e).find(".datatable-cell:hidden").clone().show();l=t("<tr/>").addClass("datatable-row-detail").insertAfter(e);var d=t("<td/>").addClass("datatable-detail").attr("colspan",i.getTotalColumns()).appendTo(l),r=t("<table/>");t(n).each(function(){var a=t(this).data("field"),e=t.grep(o.columns,function(t,e){return a===t.field})[0];void 0!==e&&!1===e.visible||t(r).append(t('<tr class="datatable-row"></tr>').append(t('<td class="datatable-cell"></td>').append(t("<span/>").append(e.title))).append(this))}),t(d).append(r)}};setTimeout(function(){t(n.table).find(".datatable-cell").show(),t(n.tableBody).each(function(){for(var e=0;t(this)[0].offsetWidth<t(this)[0].scrollWidth&&e<o.columns.length;)t(n.table).find(".datatable-row").each(function(e){var l=t(this).find(".datatable-cell:not(:hidden):not([data-autohide-disabled])").last();l.length&&(t(l).hide(),a=!0)}),e++}),a&&t(n.tableBody).find(".datatable-row").each(function(){0===t(this).find(".datatable-toggle-detail").length&&t(this).prepend(t("<td/>").addClass("datatable-cell datatable-toggle-detail").append(t("<a/>").addClass("datatable-toggle-detail").attr("href","").on("click",l).append('<i class="'+i.getOption("layout.icons.rowDetail.collapse")+'"></i>'))),0===t(n.tableHead).find(".datatable-toggle-detail").length?(t(n.tableHead).find(".datatable-row").first().prepend('<th class="datatable-cell datatable-toggle-detail"><span></span></th>'),t(n.tableFoot).find(".datatable-row").first().prepend('<th class="datatable-cell datatable-toggle-detail"><span></span></th>')):t(n.tableHead).find(".datatable-toggle-detail").find("span")})}),i.adjustCellsWidth.call()},setAutoColumns:function(){i.getOption("data.autoColumns")&&(t.each(n.dataSet[0],function(a,e){0===t.grep(o.columns,function(t,e){return a===t.field}).length&&o.columns.push({field:a,title:a})}),t(n.tableHead).find(".datatable-row").remove(),i.setHeadTitle(),i.getOption("layout.footer")&&(t(n.tableFoot).find(".datatable-row").remove(),i.setHeadTitle(n.tableFoot)))},isLocked:function(){var t=i.lockEnabledColumns();return t.left.length>0||t.right.length>0},isSubtable:function(){return e.hasClass(n.wrap[0],"datatable-subtable")||!1},getExtraSpace:function(a){return parseInt(t(a).css("paddingRight"))+parseInt(t(a).css("paddingLeft"))+(parseInt(t(a).css("marginRight"))+parseInt(t(a).css("marginLeft")))+Math.ceil(t(a).css("border-right-width").replace("px",""))},dataPlaceholder:function(a,e){var l=a;return t.each(e,function(t,a){l=l.replace("{{"+t+"}}",a)}),l},getTableId:function(a){void 0===a&&(a="");var e=t(n).attr("id");return void 0===e&&(e=t(n).attr("class").split(" ")[0]),e+a},getTablePrefix:function(t){return void 0!==t&&(t="-"+t),i.getTableId()+"-"+i.getDepth()+t},getDepth:function(){var a=0,e=n.table;do{e=t(e).parents(".datatable-table"),a++}while(t(e).length>0);return a},stateKeep:function(t,a){t=i.getTablePrefix(t),!1!==i.getOption("data.saveState")&&localStorage&&localStorage.setItem(t,JSON.stringify(a))},stateGet:function(t,a){if(t=i.getTablePrefix(t),!1!==i.getOption("data.saveState")){var e=null;return localStorage&&(e=localStorage.getItem(t)),null!=e?JSON.parse(e):void 0}},stateUpdate:function(a,e){var l=i.stateGet(a);null==l&&(l={}),i.stateKeep(a,t.extend({},l,e))},stateRemove:function(t){t=i.getTablePrefix(t),localStorage&&localStorage.removeItem(t)},getTotalColumns:function(a){return void 0===a&&(a=n.tableBody),t(a).find(".datatable-row").first().find(".datatable-cell").length},getOneRow:function(a,e,l){void 0===l&&(l=!0);var o=t(a).find(".datatable-row:not(.datatable-row-detail):nth-child("+e+")");return l&&(o=o.find(".datatable-cell")),o},sortColumn:function(a,e,l){void 0===e&&(e="asc"),void 0===l&&(l=!1);var o=t(a).index(),i=t(n.tableBody).find(".datatable-row"),d=t(a).closest(".datatable-lock").index();-1!==d&&(i=t(n.tableBody).find(".datatable-lock:nth-child("+(d+1)+")").find(".datatable-row"));var r=t(i).parent();t(i).sort(function(a,n){var i=t(a).find("td:nth-child("+o+")").text(),d=t(n).find("td:nth-child("+o+")").text();return l&&(i=parseInt(i),d=parseInt(d)),"asc"===e?i>d?1:i<d?-1:0:i<d?1:i>d?-1:0}).appendTo(r)},sorting:function(){var a={init:function(){o.sortable&&(t(n.tableHead).find(".datatable-cell:not(.datatable-cell-check)").addClass("datatable-cell-sort").off("click").on("click",a.sortClick),a.setIcon())},setIcon:function(){var a=i.getDataSourceParam("sort");if(!t.isEmptyObject(a)){var e=i.getColumnByField(a.field);if(void 0!==e&&!(void 0!==e.sortable&&!1===e.sortable||void 0!==e.selector&&!0===e.selector)){var l=t(n.tableHead).find('.datatable-cell[data-field="'+a.field+'"]').attr("data-sort",a.sort),o=t(l).find("span"),d=t(o).find("i"),r=i.getOption("layout.icons.sort");t(d).length>0?t(d).removeAttr("class").addClass(r[a.sort]):t(o).append(t("<i/>").addClass(r[a.sort])),t(l).addClass("datatable-cell-sorted")}}},sortClick:function(l){var d=i.getDataSourceParam("sort"),r=t(this).data("field"),s=i.getColumnByField(r);if(void 0!==s&&(void 0===s.sortable||!1!==s.sortable)&&(void 0===s.selector||!0!==s.selector)&&(t(n.tableHead).find("th").removeClass("datatable-cell-sorted"),e.addClass(this,"datatable-cell-sorted"),t(n.tableHead).find(".datatable-cell > span > i").remove(),o.sortable)){i.spinnerCallback(!0);var c="desc";i.getObject("field",d)===r&&(c=i.getObject("sort",d)),d={field:r,sort:c=void 0===c||"desc"===c?"asc":"desc"},i.setDataSourceParam("sort",d),a.setIcon(),setTimeout(function(){i.dataRender("sort"),t(n).trigger("datatable-on-sort",d)},300)}}};a.init()},localDataUpdate:function(){var a=i.getDataSourceParam();void 0===n.originalDataSet&&(n.originalDataSet=n.dataSet);var e=i.getObject("sort.field",a),l=i.getObject("sort.sort",a),o=i.getColumnByField(e);if(void 0!==o&&!0!==i.getOption("data.serverSorting")?"function"==typeof o.sortCallback?n.dataSet=o.sortCallback(n.originalDataSet,l,o):n.dataSet=i.sortCallback(n.originalDataSet,l,o):n.dataSet=n.originalDataSet,"object"==typeof a.query&&!i.getOption("data.serverFiltering")){a.query=a.query||{};var d=function(t){for(var a in t)if(t.hasOwnProperty(a))if("string"==typeof t[a]){if(t[a].toLowerCase()==r||-1!==t[a].toLowerCase().indexOf(r))return!0}else if("number"==typeof t[a]){if(t[a]===r)return!0}else if("object"==typeof t[a]&&d(t[a]))return!0;return!1},r=t(i.getOption("search.input")).val();void 0!==r&&""!==r&&(r=r.toLowerCase(),n.dataSet=t.grep(n.dataSet,d),delete a.query[i.getGeneralSearchKey()]),t.each(a.query,function(t,e){""===e&&delete a.query[t]}),n.dataSet=i.filterArray(n.dataSet,a.query),n.dataSet=n.dataSet.filter(function(){return!0})}return n.dataSet},filterArray:function(a,e,l){if("object"!=typeof a)return[];if(void 0===l&&(l="AND"),"object"!=typeof e)return a;if(l=l.toUpperCase(),-1===t.inArray(l,["AND","OR","NOT"]))return[];var o=Object.keys(e).length,n=[];return t.each(a,function(a,d){var r=d,s=0;t.each(e,function(t,a){a=a instanceof Array?a:[a];var e=i.getObject(t,r);if(void 0!==e&&e){var l=e.toString().toLowerCase();a.forEach(function(t,a){t.toString().toLowerCase()!=l&&-1===l.indexOf(t.toString().toLowerCase())||s++})}}),("AND"==l&&s==o||"OR"==l&&s>0||"NOT"==l&&0==s)&&(n[a]=d)}),a=n},resetScroll:function(){void 0===o.detail&&1===i.getDepth()&&(t(n.table).find(".datatable-row").css("left",0),t(n.table).find(".datatable-lock").css("top",0),t(n.tableBody).scrollTop(0))},getColumnByField:function(a){var e;if(void 0!==a)return t.each(o.columns,function(t,l){if(a===l.field)return e=l,!1}),e},getDefaultSortColumn:function(){var a;return t.each(o.columns,function(e,l){if(void 0!==l.sortable&&-1!==t.inArray(l.sortable,["asc","desc"]))return a={sort:l.sortable,field:l.field},!1}),a},getHiddenDimensions:function(a,e){var l={position:"absolute",visibility:"hidden",display:"block"},o={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},n=t(a).parents().addBack().not(":visible");e="boolean"==typeof e&&e;var i=[];return n.each(function(){var t={};for(var a in l)t[a]=this.style[a],this.style[a]=l[a];i.push(t)}),o.width=t(a).width(),o.outerWidth=t(a).outerWidth(e),o.innerWidth=t(a).innerWidth(),o.height=t(a).height(),o.innerHeight=t(a).innerHeight(),o.outerHeight=t(a).outerHeight(e),n.each(function(t){var a=i[t];for(var e in l)this.style[e]=a[e]}),o},getGeneralSearchKey:function(){var a=t(i.getOption("search.input"));return i.getOption("search.key")||t(a).prop("name")},getObject:function(t,a){return t.split(".").reduce(function(t,a){return null!==t&&void 0!==t[a]?t[a]:null},a)},extendObj:function(t,a,e){var l=a.split("."),o=0;return function t(a){var n=l[o++];void 0!==a[n]&&null!==a[n]?"object"!=typeof a[n]&&"function"!=typeof a[n]&&(a[n]={}):a[n]={},o===l.length?a[n]=e:t(a[n])}(t),t},rowEvenOdd:function(){t(n.tableBody).find(".datatable-row").removeClass("datatable-row-even"),t(n.wrap).hasClass("datatable-subtable")?t(n.tableBody).find(".datatable-row:not(.datatable-row-detail):even").addClass("datatable-row-even"):t(n.tableBody).find(".datatable-row:nth-child(even)").addClass("datatable-row-even")},timer:0,redraw:function(){return i.adjustCellsWidth.call(),i.isLocked()&&(i.scrollbar(),i.resetScroll(),i.adjustCellsHeight.call()),i.adjustLockContainer.call(),i.initHeight.call(),n},load:function(){return i.reload(),n},reload:function(){return function(t,a){clearTimeout(i.timer),i.timer=setTimeout(t,a)}(function(){o.data.serverFiltering||i.localDataUpdate(),i.dataRender(),t(n).trigger("datatable-on-reloaded")},i.getOption("search.delay")),n},getRecord:function(a){return void 0===n.tableBody&&(n.tableBody=t(n.table).children("tbody")),t(n.tableBody).find(".datatable-cell:first-child").each(function(e,l){if(a==t(l).text()){var o=t(l).closest(".datatable-row").index()+1;return n.API.record=n.API.value=i.getOneRow(n.tableBody,o),n}}),n},getColumn:function(a){return i.setSelectedRecords(),n.API.value=t(n.API.record).find('[data-field="'+a+'"]'),n},destroy:function(){t(n).parent().find(".datatable-pager").remove();var a=t(n.initialDatatable).addClass("datatable-destroyed").show();return t(n).replaceWith(a),t(n=a).trigger("datatable-on-destroy"),i.isInit=!1,a=null,n.dataSet=null,n.originalDataSet=null,n.tableHead=null,n.tableBody=null,n.table=null,n.wrap=null,n.API={record:null,value:null,params:null},i.ajaxParams={},i.pagingObject={},i.nodeTr=[],i.nodeTd=[],i.nodeCols=[],i.recentNode=[],a},sort:function(a,e){e=void 0===e?"asc":e,i.spinnerCallback(!0);var l={field:a,sort:e};return i.setDataSourceParam("sort",l),setTimeout(function(){i.dataRender("sort"),t(n).trigger("datatable-on-sort",l),t(n.tableHead).find(".datatable-cell > span > i").remove()},300),n},getValue:function(){return t(n.API.value).text()},setActive:function(a){"string"==typeof a&&(a=t(n.tableBody).find('.checkbox-single > [type="checkbox"][value="'+a+'"]')),t(a).prop("checked",!0);var e=[];t(a).each(function(a,l){t(l).closest("tr").addClass("datatable-row-active");var o=t(l).attr("value");void 0!==o&&e.push(o)}),t(n).trigger("datatable-on-check",[e])},setInactive:function(a){"string"==typeof a&&(a=t(n.tableBody).find('.checkbox-single > [type="checkbox"][value="'+a+'"]')),t(a).prop("checked",!1);var e=[];t(a).each(function(a,l){t(l).closest("tr").removeClass("datatable-row-active");var o=t(l).attr("value");void 0!==o&&e.push(o)}),t(n).trigger("datatable-on-uncheck",[e])},setActiveAll:function(a){var e=t(n.table).find("> tbody, > thead").find("tr").not(".datatable-row-subtable").find('.datatable-cell-check [type="checkbox"]');a?i.setActive(e):i.setInactive(e)},setSelectedRecords:function(){return n.API.record=t(n.tableBody).find(".datatable-row-active"),n},getSelectedRecords:function(){return i.setSelectedRecords(),n.API.record=n.rows(".datatable-row-active").nodes(),n.API.record},getOption:function(t){return i.getObject(t,o)},setOption:function(t,a){o=i.extendObj(o,t,a)},search:function(a,e){void 0!==e&&(e=t.makeArray(e)),l=function(){var l=i.getDataSourceQuery();if(void 0===e&&void 0!==a){var d=i.getGeneralSearchKey();l[d]=a}"object"==typeof e&&(t.each(e,function(t,e){l[e]=a}),t.each(l,function(a,e){(""===e||t.isEmptyObject(e))&&delete l[a]})),i.setDataSourceQuery(l),n.setDataSourceParam("pagination",Object.assign({},n.getDataSourceParam("pagination"),{page:1})),o.data.serverFiltering||i.localDataUpdate(),i.dataRender("search")},d=i.getOption("search.delay"),clearTimeout(i.timer),i.timer=setTimeout(l,d);var l,d},setDataSourceParam:function(a,e){n.API.params=t.extend({},{pagination:{page:1,perpage:i.getOption("data.pageSize")},sort:i.getDefaultSortColumn(),query:{}},n.API.params,i.stateGet(i.stateId)),n.API.params=i.extendObj(n.API.params,a,e),i.stateKeep(i.stateId,n.API.params)},getDataSourceParam:function(a){return n.API.params=t.extend({},{pagination:{page:1,perpage:i.getOption("data.pageSize")},sort:i.getDefaultSortColumn(),query:{}},n.API.params,i.stateGet(i.stateId)),"string"==typeof a?i.getObject(a,n.API.params):n.API.params},getDataSourceQuery:function(){return i.getDataSourceParam("query")||{}},setDataSourceQuery:function(t){i.setDataSourceParam("query",t)},getCurrentPage:function(){return t(n.table).siblings(".datatable-pager").last().find(".datatable-pager-nav").find(".datatable-pager-link.datatable-pager-link-active").data("page")||1},getPageSize:function(){return t(n.table).siblings(".datatable-pager").last().find("select.datatable-pager-size").val()||10},getTotalRows:function(){return n.API.params.pagination.total},getDataSet:function(){return n.originalDataSet},nodeTr:[],nodeTd:[],nodeCols:[],recentNode:[],table:function(){if(void 0!==n.table)return n.table},row:function(a){return i.rows(a),i.nodeTr=i.recentNode=t(i.nodeTr).first(),n},rows:function(a){return i.isLocked()?i.nodeTr=i.recentNode=t(n.tableBody).find(a).filter(".datatable-lock-scroll > .datatable-row"):i.nodeTr=i.recentNode=t(n.tableBody).find(a).filter(".datatable-row"),n},column:function(a){return i.nodeCols=i.recentNode=t(n.tableBody).find(".datatable-cell:nth-child("+(a+1)+")"),n},columns:function(a){var e=n.table;i.nodeTr===i.recentNode&&(e=i.nodeTr);var l=t(e).find('.datatable-cell[data-field="'+a+'"]');return l.length>0?i.nodeCols=i.recentNode=l:i.nodeCols=i.recentNode=t(e).find(a).filter(".datatable-cell"),n},cell:function(a){return i.cells(a),i.nodeTd=i.recentNode=t(i.nodeTd).first(),n},cells:function(a){var e=t(n.tableBody).find(".datatable-cell");return void 0!==a&&(e=t(e).filter(a)),i.nodeTd=i.recentNode=e,n},remove:function(){return t(i.nodeTr.length)&&i.nodeTr===i.recentNode&&t(i.nodeTr).remove(),i.layoutUpdate(),n},visible:function(a){if(t(i.recentNode.length)){var e=i.lockEnabledColumns();if(i.recentNode===i.nodeCols){var l=i.recentNode.index();if(i.isLocked()){var n=t(i.recentNode).closest(".datatable-lock-scroll").length;n?l+=e.left.length+1:t(i.recentNode).closest(".datatable-lock-right").length&&(l+=e.left.length+n+1)}}a?(i.recentNode===i.nodeCols&&delete o.columns[l].visible,t(i.recentNode).show()):(i.recentNode===i.nodeCols&&i.setOption("columns."+l+".visible",!1),t(i.recentNode).hide()),i.columnHide(),i.redraw()}},nodes:function(){return i.recentNode},dataset:function(){return n},gotoPage:function(t){void 0!==i.pagingObject&&(i.isInit=!0,i.pagingObject.openPage(t))}};if(t.each(i,function(t,a){n[t]=a}),void 0!==o)if("string"==typeof o){var d=o;void 0!==(n=t(this).data(a))&&(o=n.options,i[d].apply(this,Array.prototype.slice.call(arguments,1)))}else n.data(a)||t(this).hasClass("datatable-loaded")||(n.dataSet=null,n.textAlign={left:"datatable-cell-left",center:"datatable-cell-center",right:"datatable-cell-right"},o=t.extend(!0,{},t.fn.KTDatatable.defaults,o),n.options=o,i.init.apply(this,[o]),t(n.wrap).data(a,n));else void 0===(n=t(this).data(a))&&t.error("KTDatatable not initialized"),o=n.options;return n}console.warn("No KTDatatable element exist.")},t.fn.KTDatatable.defaults={data:{type:"local",source:null,pageSize:10,saveState:!0,serverPaging:!1,serverFiltering:!1,serverSorting:!1,autoColumns:!1,attr:{rowProps:[]}},layout:{theme:"default",class:"datatable-primary",scroll:!1,height:null,minHeight:null,footer:!1,header:!0,customScrollbar:!0,spinner:{overlayColor:"#000000",opacity:0,type:"loader",state:"primary",message:!0},icons:{sort:{asc:"flaticon2-arrow-up",desc:"flaticon2-arrow-down"},pagination:{next:"flaticon2-next",prev:"flaticon2-back",first:"flaticon2-fast-back",last:"flaticon2-fast-next",more:"flaticon-more-1"},rowDetail:{expand:"fa fa-caret-down",collapse:"fa fa-caret-right"}}},sortable:!0,resizable:!1,filterable:!1,pagination:!0,editable:!1,columns:[],search:{onEnter:!1,input:null,delay:400,key:null},rows:{callback:function(){},beforeTemplate:function(){},afterTemplate:function(){},autoHide:!0},toolbar:{layout:["pagination","info"],placement:["bottom"],items:{pagination:{type:"default",pages:{desktop:{layout:"default",pagesNumber:5},tablet:{layout:"default",pagesNumber:3},mobile:{layout:"compact"}},navigation:{prev:!0,next:!0,first:!0,last:!0,more:!1},pageSizeSelect:[]},info:!0}},translate:{records:{processing:"Please wait...",noRecords:"No records found"},toolbar:{pagination:{items:{default:{first:"First",prev:"Previous",next:"Next",last:"Last",more:"More pages",input:"Page number",select:"Select page size",all:"all"},info:"Showing {{start}} - {{end}} of {{total}}"}}}},extensions:{}}}(jQuery);
  "use strict";!function(e){e.fn.KTDatatable=e.fn.KTDatatable||{},e.fn.KTDatatable.checkbox=function(t,s){var c={selectedAllRows:!1,selectedRows:[],unselectedRows:[],init:function(){c.selectorEnabled()&&(t.setDataSourceParam(s.vars.selectedAllRows,!1),t.stateRemove("checkbox"),s.vars.requestIds&&t.setDataSourceParam(s.vars.requestIds,!0),e(t).on("datatable-on-reloaded",function(){t.stateRemove("checkbox"),t.setDataSourceParam(s.vars.selectedAllRows,!1),c.selectedAllRows=!1,c.selectedRows=[],c.unselectedRows=[]}),c.selectedAllRows=t.getDataSourceParam(s.vars.selectedAllRows),e(t).on("datatable-on-layout-updated",function(s,o){o.table==e(t.wrap).attr("id")&&t.ready(function(){c.initVars(),c.initEvent(),c.initSelect()})}),e(t).on("datatable-on-check",function(e,s){s.forEach(function(e){c.selectedRows.push(e),c.unselectedRows=c.remove(c.unselectedRows,e)});var o={};o.selectedRows=c.selectedRows.filter(c.unique),o.unselectedRows=c.unselectedRows.filter(c.unique),t.stateKeep("checkbox",o)}),e(t).on("datatable-on-uncheck",function(e,s){s.forEach(function(e){c.unselectedRows.push(e),c.selectedRows=c.remove(c.selectedRows,e)});var o={};o.selectedRows=c.selectedRows.filter(c.unique),o.unselectedRows=c.unselectedRows.filter(c.unique),o.unselectedRows=c.unselectedRows.filter(c.unique),t.stateKeep("checkbox",o)}))},initEvent:function(){e(t.tableHead).find('.checkbox-all > [type="checkbox"]').click(function(o){if(c.selectedRows=c.unselectedRows=[],t.stateRemove("checkbox"),c.selectedAllRows=!!e(this).is(":checked"),!s.vars.requestIds){e(this).is(":checked")&&(c.selectedRows=e.makeArray(e(t.tableBody).find('.checkbox-single > [type="checkbox"]').map(function(t,s){return e(s).val()})));var l={};l.selectedRows=c.selectedRows.filter(c.unique),t.stateKeep("checkbox",l)}t.setDataSourceParam(s.vars.selectedAllRows,c.selectedAllRows),e(t).trigger("datatable-on-click-checkbox",[e(this)])}),e(t.tableBody).find('.checkbox-single > [type="checkbox"]').click(function(o){var l=e(this).val();e(this).is(":checked")?(c.selectedRows.push(l),c.unselectedRows=c.remove(c.unselectedRows,l)):(c.unselectedRows.push(l),c.selectedRows=c.remove(c.selectedRows,l)),!s.vars.requestIds&&c.selectedRows.length<1&&e(t.tableHead).find('.checkbox-all > [type="checkbox"]').prop("checked",!1);var n={};n.selectedRows=c.selectedRows.filter(c.unique),n.unselectedRows=c.unselectedRows.filter(c.unique),t.stateKeep("checkbox",n),e(t).trigger("datatable-on-click-checkbox",[e(this)])})},unique:function(e,t,s){return s.indexOf(e)===t},initSelect:function(){c.selectedAllRows&&s.vars.requestIds?(t.hasClass("datatable-error")||e(t.tableHead).find('.checkbox-all > [type="checkbox"]').prop("checked",!0),t.setActiveAll(!0),c.unselectedRows.forEach(function(e){t.setInactive(e)})):(c.selectedRows.forEach(function(e){t.setActive(e)}),!t.hasClass("datatable-error")&&e(t.tableBody).find('.checkbox-single > [type="checkbox"]').not(":checked").length<1&&e(t.tableHead).find('.checkbox-all > [type="checkbox"]').prop("checked",!0))},selectorEnabled:function(){return e.grep(t.options.columns,function(e,t){return e.selector||!1})[0]},initVars:function(){var e=t.stateGet("checkbox");void 0!==e&&(c.selectedRows=e.selectedRows||[],c.unselectedRows=e.unselectedRows||[])},getSelectedId:function(e){if(c.initVars(),c.selectedAllRows&&s.vars.requestIds){void 0===e&&(e=s.vars.rowIds);var o=t.getObject(e,t.lastResponse)||[];return o.length>0&&c.unselectedRows.forEach(function(e){o=c.remove(o,parseInt(e))}),o.filter(c.unique)}return c.selectedRows.filter(c.unique)},remove:function(e,t){return e.filter(function(e){return e!==t})}};return t.checkbox=function(){return c},"object"==typeof s&&(s=e.extend(!0,{},e.fn.KTDatatable.checkbox.default,s),c.init.apply(this,[s])),t},e.fn.KTDatatable.checkbox.default={vars:{selectedAllRows:"selectedAllRows",requestIds:"requestIds",rowIds:"meta.rowIds"}}}(jQuery);
  var defaults={layout:{icons:{pagination:{next:"flaticon2-next",prev:"flaticon2-back",first:"flaticon2-fast-back",last:"flaticon2-fast-next",more:"flaticon-more-1"},rowDetail:{expand:"fa fa-caret-down",collapse:"fa fa-caret-right"}}}};KTUtil.isRTL()&&(defaults={layout:{icons:{pagination:{next:"flaticon2-back",prev:"flaticon2-next",first:"flaticon2-fast-next",last:"flaticon2-fast-back"},rowDetail:{collapse:"fa fa-caret-down",expand:"fa fa-caret-right"}}}}),$.extend(!0,$.fn.KTDatatable.defaults,defaults);
  "use strict";KTUtil.ready(function(){"undefined"!=typeof KTLayoutHeader&&KTLayoutHeader.init("kt_header","kt_header_mobile"),"undefined"!=typeof KTLayoutHeaderMenu&&KTLayoutHeaderMenu.init("kt_header_menu","kt_header_menu_wrapper"),"undefined"!=typeof KTLayoutAside&&KTLayoutAside.init("kt_aside"),"undefined"!=typeof KTLayoutSidebar&&KTLayoutSidebar.init("kt_sidebar"),"undefined"!=typeof KTLayoutContent&&KTLayoutContent.init("kt_content"),"undefined"!=typeof KTLayoutSubheader&&KTLayoutSubheader.init("kt_subheader"),"undefined"!=typeof KTLayoutFooter&&KTLayoutFooter.init("kt_footer"),"undefined"!=typeof KTLayoutScrolltop&&KTLayoutScrolltop.init("kt_scrolltop"),"undefined"!=typeof KTLayoutStickyCard&&KTLayoutStickyCard.init("kt_page_sticky_card"),"undefined"!=typeof KTLayoutStretchedCard&&KTLayoutStretchedCard.init("kt_page_stretched_card"),"undefined"!=typeof KTLayoutExamples&&KTLayoutExamples.init(),"undefined"!=typeof KTLayoutDemoPanel&&KTLayoutDemoPanel.init("kt_demo_panel"),"undefined"!=typeof KTLayoutChat&&KTLayoutChat.init("kt_chat_modal"),"undefined"!=typeof KTLayoutQuickActions&&KTLayoutQuickActions.init("kt_quick_actions"),"undefined"!=typeof KTLayoutQuickNotifications&&KTLayoutQuickNotifications.init("kt_quick_notifications"),"undefined"!=typeof KTLayoutQuickPanel&&KTLayoutQuickPanel.init("kt_quick_panel"),"undefined"!=typeof KTLayoutQuickUser&&KTLayoutQuickUser.init("kt_quick_user"),"undefined"!=typeof KTLayoutSearchInline&&KTLayoutSearchInline().init("kt_quick_search_inline"),"undefined"!=typeof KTLayoutSearch&&KTLayoutSearch().init("kt_quick_search_dropdown")});
  "use strict";var KTLayoutAside=function(){var t,e;return{init:function(i){var s;(t=KTUtil.getById(i),KTUtil.getBody(),t)&&(e=new KTOffcanvas(t,{baseClass:"aside",overlay:!0,closeBy:"kt_aside_close_btn",toggleBy:{target:"kt_aside_mobile_toggle",state:"mobile-toggle-active"}}),(s=KTUtil.find(t,".aside-nav"))&&KTUtil.scrollInit(s,{disableForMobile:!0,resetHeightOnDestroy:!0,handleWindowResize:!0,height:function(){var e=parseInt(KTUtil.getViewPort().height),i=KTUtil.find(t,".aside-brand"),s=KTUtil.find(t,".aside-footer"),n=KTUtil.find(t,"aside");return e-=parseInt(KTUtil.css(i,"height")),e-=parseInt(KTUtil.css(i,"marginBottom"))+parseInt(KTUtil.css(i,"marginTop")),e-=parseInt(KTUtil.css(s,"height")),e-=parseInt(KTUtil.css(s,"marginBottom"))+parseInt(KTUtil.css(s,"marginTop")),e-=parseInt(KTUtil.css(n,"marginTop"))+parseInt(KTUtil.css(n,"marginBottom"))}}))},getElement:function(){return t},getOffcanvas:function(){return e}}}();"undefined"!=typeof module&&(module.exports=KTLayoutAside);
  "use strict";var KTLayoutContent=function(){var t;return{init:function(e){t=KTUtil.getById(e)},getHeight:function(){return e=KTUtil.getViewPort().height,t&&(e=e-parseInt(KTUtil.css(t,"paddingTop"))-parseInt(KTUtil.css(t,"paddingBottom"))),e-=KTLayoutHeader.getHeight(),e-=KTLayoutSubheader.getHeight(),e-=KTLayoutFooter.getHeight();var e},getElement:function(){return t}}}();"undefined"!=typeof module&&(module.exports=KTLayoutContent);
  "use strict";var KTLayoutFooter=function(){var t;return{init:function(e){t=KTUtil.getById(e)},getHeight:function(){return e=0,t&&(e=KTUtil.actualHeight(t)),e;var e},getElement:function(){return t}}}();"undefined"!=typeof module&&(module.exports=KTLayoutFooter);
  "use strict";var KTLayoutHeaderMenu=function(){var e,n,t,o;return{init:function(a,r){e=KTUtil.getById(a),t=KTUtil.getById(r),e&&(o=new KTOffcanvas(t,{overlay:!0,baseClass:"header-menu-wrapper",closeBy:"kt_header_menu_mobile_close_btn",toggleBy:{target:"kt_header_mobile_toggle",state:"mobile-toggle-active"}}),n=new KTMenu(e,{submenu:{desktop:"dropdown",tablet:"accordion",mobile:"accordion"},accordion:{slideSpeed:200,expandAll:!1}}))},getMenuElement:function(){return e},getOffcanvasElement:function(){return t},getMenu:function(){return n},pauseDropdownHover:function(e){n&&n.pauseDropdownHover(e)},getOffcanvas:function(){return o},closeMobileOffcanvas:function(){n&&KTUtil.isMobileDevice()&&o.hide()}}}();"undefined"!=typeof module&&(module.exports=KTLayoutHeaderMenu);
  "use strict";var KTLayoutHeaderTopbar=function(){var t;return{init:function(e){(t=KTUtil.getById(e))&&new KTToggle(t,KTUtil.getBody(),{targetState:"topbar-mobile-on",toggleState:"topbar-toggle-active"})},getToggleElement:function(){return t}}}();"undefined"!=typeof module&&(module.exports=KTLayoutHeaderTopbar);
  "use strict";var KTLayoutHeader=function(){var e,t,i;return{init:function(n,r){e=KTUtil.getById(n),t=KTUtil.getById(r),e&&(i=new KTHeader(e,{offset:{desktop:200,tabletAndMobile:!1},releseOnReverse:{desktop:!1,tabletAndMobile:!1}}))},isFixed:function(){return KTUtil.hasClass(KTUtil.getBody(),"header-fixed")},isFixedForMobile:function(){return KTUtil.hasClass(KTUtil.getBody(),"header-mobile-fixed")},getElement:function(){return e},getElementForMobile:function(){return t},getHeader:function(){return i},getHeight:function(){return t=0,e&&(t=KTUtil.actualHeight(e)+1),t;var t},getHeightForMobile:function(){return KTUtil.actualHeight(t)}}}();"undefined"!=typeof module&&(module.exports=KTLayoutHeader);
  "use strict";var KTLayoutSidebar=function(){var t;return{init:function(e){var i,n;(t=KTUtil.getById(e))&&(i=KTUtil.find(t,".sidebar-header"),n=KTUtil.find(t,".sidebar-content"),new KTOffcanvas(t,{overlay:!0,baseClass:"sidebar",placement:"right",closeBy:"kt_sidebar_mobile_close",toggleBy:"kt_sidebar_mobile_toggle"}),KTUtil.scrollInit(n,{disableForMobile:!0,resetHeightOnDestroy:!0,handleWindowResize:!0,height:function(){if(KTUtil.isBreakpointUp("lg"))return!1;var e=parseInt(KTUtil.getViewPort().height);return i&&(e-=parseInt(KTUtil.actualHeight(i)),e-=parseInt(KTUtil.css(i,"marginTop")),e-=parseInt(KTUtil.css(i,"marginBottom"))),n&&(e-=parseInt(KTUtil.css(n,"marginTop")),e-=parseInt(KTUtil.css(n,"marginBottom"))),e-=parseInt(KTUtil.css(t,"paddingTop")),e-=parseInt(KTUtil.css(t,"paddingBottom")),e-=parseInt(KTUtil.css(t,"marginTop")),e-=parseInt(KTUtil.css(t,"marginBottom")),e-=2}}))},getElement:function(){return t}}}();"undefined"!=typeof module&&(module.exports=KTLayoutSidebar);
  "use strict";var KTLayoutStickyCard=function(){var e,t;return{init:function(i){var d;(e=KTUtil.getById(i))&&(d=300,"undefined"!=typeof KTLayoutHeader&&(d=KTLayoutHeader.getHeight()),(t=new KTCard(e,{sticky:{offset:d,zIndex:90,position:{top:function(){var e=0;return KTUtil.getBody(),KTUtil.isBreakpointUp("lg")?("undefined"!=typeof KTLayoutHeader&&KTLayoutHeader.isFixed()&&(e+=KTLayoutHeader.getHeight()),"undefined"!=typeof KTLayoutSubheader&&KTLayoutSubheader.isFixed()&&(e+=KTLayoutSubheader.getHeight())):"undefined"!=typeof KTLayoutHeader&&KTLayoutHeader.isFixedForMobile()&&(e+=KTLayoutHeader.getHeightForMobile()),e-=1},left:function(t){return KTUtil.offset(e).left},right:function(t){var i=KTUtil.getBody(),d=parseInt(KTUtil.css(e,"width"));return parseInt(KTUtil.css(i,"width"))-d-KTUtil.offset(e).left}}}})).initSticky(),KTUtil.addResizeHandler(function(){t.updateSticky()}))},update:function(){t&&t.updateSticky()}}}();"undefined"!=typeof module&&(module.exports=KTLayoutStickyCard);
  "use strict";var KTLayoutStretchedCard=function(){var t,i=function(){var i=KTUtil.find(t,".card-scroll"),n=KTUtil.find(t,".card-body"),a=KTUtil.find(t,".card-header"),e=KTLayoutContent.getHeight();e=(e=(e=(e=(e-=parseInt(KTUtil.actualHeight(a)))-parseInt(KTUtil.css(t,"marginTop"))-parseInt(KTUtil.css(t,"marginBottom")))-parseInt(KTUtil.css(t,"paddingTop"))-parseInt(KTUtil.css(t,"paddingBottom")))-parseInt(KTUtil.css(n,"paddingTop"))-parseInt(KTUtil.css(n,"paddingBottom")))-parseInt(KTUtil.css(n,"marginTop"))-parseInt(KTUtil.css(n,"marginBottom")),e-=3,KTUtil.css(i,"height",e+"px")};return{init:function(n){(t=KTUtil.getById(n))&&(i(),KTUtil.addResizeHandler(function(){i()}))},update:function(){i()}}}();"undefined"!=typeof module&&(module.exports=KTLayoutStretchedCard);
  "use strict";var KTLayoutSubheader=function(){var t;return{init:function(e){t=KTUtil.getById(e)},isFixed:function(){return KTUtil.hasClass(KTUtil.getBody(),"subheader-fixed")},getElement:function(){return t},getHeight:function(){return e=0,t&&(e=KTUtil.actualHeight(t)),e;var e}}}();"undefined"!=typeof module&&(module.exports=KTLayoutSubheader);
  "use strict";var KTLayoutChat=function(){var t=function(t){var i=KTUtil.find(t,".scroll"),a=KTUtil.find(t,".card-body"),s=KTUtil.find(t,".card-header"),n=KTUtil.find(t,".card-footer");i&&(KTUtil.scrollInit(i,{windowScroll:!1,mobileNativeScroll:!0,desktopNativeScroll:!1,resetHeightOnDestroy:!0,handleWindowResize:!0,rememberPosition:!0,height:function(){var t;return KTUtil.isBreakpointDown("lg")?KTUtil.hasAttr(i,"data-mobile-height")?parseInt(KTUtil.attr(i,"data-mobile-height")):400:KTUtil.isBreakpointUp("lg")&&KTUtil.hasAttr(i,"data-height")?parseInt(KTUtil.attr(i,"data-height")):(t=KTLayoutContent.getHeight(),i&&(t=t-parseInt(KTUtil.css(i,"margin-top"))-parseInt(KTUtil.css(i,"margin-bottom"))),s&&(t=(t-=parseInt(KTUtil.css(s,"height")))-parseInt(KTUtil.css(s,"margin-top"))-parseInt(KTUtil.css(s,"margin-bottom"))),a&&(t=t-parseInt(KTUtil.css(a,"padding-top"))-parseInt(KTUtil.css(a,"padding-bottom"))),n&&(t=(t-=parseInt(KTUtil.css(n,"height")))-parseInt(KTUtil.css(n,"margin-top"))-parseInt(KTUtil.css(n,"margin-bottom"))),t-=2)}}),KTUtil.on(t,".card-footer textarea","keydown",function(i){if(13==i.keyCode)return e(t),i.preventDefault(),!1}),KTUtil.on(t,".card-footer .chat-send","click",function(i){e(t)}))},e=function(t){var e=KTUtil.find(t,".messages"),i=KTUtil.find(t,".scroll"),a=KTUtil.find(t,"textarea");if(0!==a.value.length){var s=document.createElement("DIV");KTUtil.addClass(s,"d-flex flex-column mb-5 align-items-end");var n,o="";o+='<div class="d-flex align-items-center">',o+="\t<div>",o+='\t\t<span class="text-muted font-size-sm">2 Hours</span>',o+='\t\t<a href="#" class="text-dark-75 text-hover-primary font-weight-bold font-size-h6">You</a>',o+="\t</div>",o+='\t<div class="symbol symbol-circle symbol-40 ml-3">',o+='\t\t<img alt="Pic" src="assets/media/users/300_12.jpg"/>',o+="\t</div>",o+="</div>",o+='<div class="mt-2 rounded p-5 bg-light-primary text-dark-50 font-weight-bold font-size-lg text-right max-w-400px">'+a.value+"</div>",KTUtil.setHTML(s,o),e.appendChild(s),a.value="",i.scrollTop=parseInt(KTUtil.css(e,"height")),(n=KTUtil.data(i).get("ps"))&&n.update(),setTimeout(function(){var t=document.createElement("DIV");KTUtil.addClass(t,"d-flex flex-column mb-5 align-items-start");var s;KTUtil.setHTML(t,'<div class="d-flex align-items-center">\t<div class="symbol symbol-circle symbol-40 mr-3">\t\t<img alt="Pic" src="assets/media/users/300_12.jpg"/>\t</div>\t<div>\t\t<a href="#" class="text-dark-75 text-hover-primary font-weight-bold font-size-h6">Matt Pears</a>\t\t<span class="text-muted font-size-sm">Just now</span>\t</div></div><div class="mt-2 rounded p-5 bg-light-success text-dark-50 font-weight-bold font-size-lg text-left max-w-400px">Right before vacation season we have the next Big Deal for you.</div>'),e.appendChild(t),a.value="",i.scrollTop=parseInt(KTUtil.css(e,"height")),(s=KTUtil.data(i).get("ps"))&&s.update()},2e3)}};return{init:function(e){t(KTUtil.getById(e)),"keenthemes.com"!=encodeURI(window.location.hostname)&&"www.keenthemes.com"!=encodeURI(window.location.hostname)||setTimeout(function(){if(!KTCookie.getCookie("kt_app_chat_shown")){var t=new Date((new Date).getTime()+36e5);KTCookie.setCookie("kt_app_chat_shown",1,{expires:t}),KTUtil.getById("kt_app_chat_launch_btn")&&KTUtil.getById("kt_app_chat_launch_btn").click()}},2e3)},setup:function(e){t(e)}}}();"undefined"!=typeof module&&(module.exports=KTLayoutChat);
  "use strict";var KTLayoutDemoPanel=function(){var e,t;return{init:function(n){(e=KTUtil.getById(n))&&(!function(){t=new KTOffcanvas(e,{overlay:!0,baseClass:"offcanvas",placement:"right",closeBy:"kt_demo_panel_close",toggleBy:"kt_demo_panel_toggle"});var n=KTUtil.find(e,".offcanvas-header"),o=KTUtil.find(e,".offcanvas-content"),a=KTUtil.find(e,".offcanvas-wrapper"),i=KTUtil.find(e,".offcanvas-footer");KTUtil.scrollInit(a,{disableForMobile:!0,resetHeightOnDestroy:!0,handleWindowResize:!0,height:function(){var t=parseInt(KTUtil.getViewPort().height);return n&&(t-=parseInt(KTUtil.actualHeight(n)),t-=parseInt(KTUtil.css(n,"marginTop")),t-=parseInt(KTUtil.css(n,"marginBottom"))),o&&(t-=parseInt(KTUtil.css(o,"marginTop")),t-=parseInt(KTUtil.css(o,"marginBottom"))),a&&(t-=parseInt(KTUtil.css(a,"marginTop")),t-=parseInt(KTUtil.css(a,"marginBottom"))),i&&(t-=parseInt(KTUtil.actualHeight(i)),t-=parseInt(KTUtil.css(i,"marginTop")),t-=parseInt(KTUtil.css(i,"marginBottom"))),t-=parseInt(KTUtil.css(e,"paddingTop")),t-=parseInt(KTUtil.css(e,"paddingBottom")),t-=2}}),"undefined"!=typeof offcanvas&&0===offcanvas.length&&offcanvas.on("hide",function(){var e=new Date((new Date).getTime()+36e5);KTCookie.setCookie("kt_demo_panel_shown",1,{expires:e})})}(),"keenthemes.com"!=encodeURI(window.location.hostname)&&"www.keenthemes.com"!=encodeURI(window.location.hostname)||setTimeout(function(){if(!KTCookie.getCookie("kt_demo_panel_shown")){var e=new Date((new Date).getTime()+9e5);KTCookie.setCookie("kt_demo_panel_shown",1,{expires:e}),void 0!==t&&t.show()}},4e3))}}}();"undefined"!=typeof module&&(module.exports=KTLayoutDemoPanel);
  "use strict";var KTLayoutExamples={init:function(e,l){!function(e){var l=e;if(void 0===l&&(l=document.querySelectorAll(".example:not(.example-compact):not(.example-hover):not(.example-basic)")),l&&l.length>0)for(var t=0;t<l.length;++t){var i=l[t],o=KTUtil.find(i,".example-copy");o&&new ClipboardJS(o,{target:function(e){var l=e.closest(".example"),t=KTUtil.find(l,".example-code .tab-pane.active");return t||(t=KTUtil.find(l,".example-code")),t}}).on("success",function(e){KTUtil.addClass(e.trigger,"example-copied"),e.clearSelection(),setTimeout(function(){KTUtil.removeClass(e.trigger,"example-copied")},2e3)})}}(e),function(e){if(void 0===(l=e))var l=document.querySelectorAll(".example.example-compact");if(l&&l.length>0)for(var t=0;t<l.length;++t){var i=l[t],o=KTUtil.find(i,".example-toggle"),a=KTUtil.find(i,".example-copy");KTUtil.addEvent(o,"click",function(){var e=this.closest(".example"),l=KTUtil.find(e,".example-code"),t=this;KTUtil.hasClass(this,"example-toggled")?KTUtil.slideUp(l,300,function(){KTUtil.removeClass(t,"example-toggled"),KTUtil.removeClass(l,"example-code-on"),KTUtil.hide(l)}):(KTUtil.addClass(l,"example-code-on"),KTUtil.addClass(this,"example-toggled"),KTUtil.slideDown(l,300,function(){KTUtil.show(l)}))}),a&&new ClipboardJS(a,{target:function(e){var l=e.closest(".example"),t=KTUtil.find(l,".example-code .tab-pane.active");return t||(t=KTUtil.find(l,".example-code")),t}}).on("success",function(e){KTUtil.addClass(e.trigger,"example-copied"),e.clearSelection(),setTimeout(function(){KTUtil.removeClass(e.trigger,"example-copied")},2e3)})}}(e)}};"undefined"!=typeof module&&void 0!==module.exports&&(module.exports=KTLayoutExamples);
  "use strict";var KTLayoutQuickActions=function(){var t;return{init:function(e){var i,n;(t=KTUtil.getById(e))&&(i=KTUtil.find(t,".offcanvas-header"),n=KTUtil.find(t,".offcanvas-content"),new KTOffcanvas(t,{overlay:!0,baseClass:"offcanvas",placement:"right",closeBy:"kt_quick_actions_close",toggleBy:"kt_quick_actions_toggle"}),KTUtil.scrollInit(n,{disableForMobile:!0,resetHeightOnDestroy:!0,handleWindowResize:!0,height:function(){var e=parseInt(KTUtil.getViewPort().height);return i&&(e-=parseInt(KTUtil.actualHeight(i)),e-=parseInt(KTUtil.css(i,"marginTop")),e-=parseInt(KTUtil.css(i,"marginBottom"))),n&&(e-=parseInt(KTUtil.css(n,"marginTop")),e-=parseInt(KTUtil.css(n,"marginBottom"))),e-=parseInt(KTUtil.css(t,"paddingTop")),e-=parseInt(KTUtil.css(t,"paddingBottom")),e-=2}}))},getElement:function(){return t}}}();"undefined"!=typeof module&&(module.exports=KTLayoutQuickActions);
  "use strict";var KTLayoutQuickCartPanel=function(){var t;return{init:function(a){(t=KTUtil.getById(a))&&function(){new KTOffcanvas(t,{overlay:!0,baseClass:"offcanvas",placement:"right",closeBy:"kt_quick_cart_close",toggleBy:"kt_quick_cart_toggle"});var a=KTUtil.find(t,".offcanvas-header"),i=KTUtil.find(t,".offcanvas-content"),n=KTUtil.find(t,".offcanvas-wrapper"),e=KTUtil.find(t,".offcanvas-footer");KTUtil.scrollInit(n,{disableForMobile:!0,resetHeightOnDestroy:!0,handleWindowResize:!0,height:function(){var s=parseInt(KTUtil.getViewPort().height);return a&&(s-=parseInt(KTUtil.actualHeight(a)),s-=parseInt(KTUtil.css(a,"marginTop")),s-=parseInt(KTUtil.css(a,"marginBottom"))),i&&(s-=parseInt(KTUtil.css(i,"marginTop")),s-=parseInt(KTUtil.css(i,"marginBottom"))),n&&(s-=parseInt(KTUtil.css(n,"marginTop")),s-=parseInt(KTUtil.css(n,"marginBottom"))),e&&(s-=parseInt(KTUtil.actualHeight(e)),s-=parseInt(KTUtil.css(e,"marginTop")),s-=parseInt(KTUtil.css(e,"marginBottom"))),s-=parseInt(KTUtil.css(t,"paddingTop")),s-=parseInt(KTUtil.css(t,"paddingBottom")),s-=2}})}()}}}();"undefined"!=typeof module&&(module.exports=KTLayoutQuickCartPanel);
  "use strict";var KTLayoutQuickNotifications=function(){var t;return{init:function(i){var n,e;(t=KTUtil.getById(i))&&(n=KTUtil.find(t,".offcanvas-header"),e=KTUtil.find(t,".offcanvas-content"),new KTOffcanvas(t,{overlay:!0,baseClass:"offcanvas",placement:"right",closeBy:"kt_quick_notifications_close",toggleBy:"kt_quick_notifications_toggle"}),KTUtil.scrollInit(e,{disableForMobile:!0,resetHeightOnDestroy:!0,handleWindowResize:!0,height:function(){var i=parseInt(KTUtil.getViewPort().height);return n&&(i-=parseInt(KTUtil.actualHeight(n)),i-=parseInt(KTUtil.css(n,"marginTop")),i-=parseInt(KTUtil.css(n,"marginBottom"))),e&&(i-=parseInt(KTUtil.css(e,"marginTop")),i-=parseInt(KTUtil.css(e,"marginBottom"))),i-=parseInt(KTUtil.css(t,"paddingTop")),i-=parseInt(KTUtil.css(t,"paddingBottom")),i-=2}}))},getElement:function(){return t}}}();"undefined"!=typeof module&&(module.exports=KTLayoutQuickNotifications);
  "use strict";var KTLayoutQuickPanel=function(){var t,e,i,n,l=function(){var e=KTUtil.find(t,".offcanvas-header"),i=KTUtil.find(t,".offcanvas-content"),n=parseInt(KTUtil.getViewPort().height);return e&&(n-=parseInt(KTUtil.actualHeight(e)),n-=parseInt(KTUtil.css(e,"marginTop")),n-=parseInt(KTUtil.css(e,"marginBottom"))),i&&(n-=parseInt(KTUtil.css(i,"marginTop")),n-=parseInt(KTUtil.css(i,"marginBottom"))),n-=parseInt(KTUtil.css(t,"paddingTop")),n-=parseInt(KTUtil.css(t,"paddingBottom")),n-=2};return{init:function(a){t=KTUtil.getById(a),e=KTUtil.getById("kt_quick_panel_notifications"),i=KTUtil.getById("kt_quick_panel_logs"),n=KTUtil.getById("kt_quick_panel_settings"),new KTOffcanvas(t,{overlay:!0,baseClass:"offcanvas",placement:"right",closeBy:"kt_quick_panel_close",toggleBy:"kt_quick_panel_toggle"}),KTUtil.scrollInit(e,{mobileNativeScroll:!0,resetHeightOnDestroy:!0,handleWindowResize:!0,height:function(){return l()}}),KTUtil.scrollInit(i,{mobileNativeScroll:!0,resetHeightOnDestroy:!0,handleWindowResize:!0,height:function(){return l()}}),KTUtil.scrollInit(n,{mobileNativeScroll:!0,resetHeightOnDestroy:!0,handleWindowResize:!0,height:function(){return l()}}),$(t).find('a[data-toggle="tab"]').on("shown.bs.tab",function(t){KTUtil.scrollUpdate(e),KTUtil.scrollUpdate(i),KTUtil.scrollUpdate(n)})}}}();"undefined"!=typeof module&&(module.exports=KTLayoutQuickPanel);
  "use strict";var KTLayoutQuickSearch=function(){var t;return{init:function(e){var i,a,n,s;(t=KTUtil.getById(e))&&(i=KTUtil.find(t,".offcanvas-header"),a=KTUtil.find(t,".offcanvas-content"),n=KTUtil.find(t,".quick-search-form"),s=KTUtil.find(t,".quick-search-wrapper"),new KTOffcanvas(t,{overlay:!0,baseClass:"offcanvas",placement:"right",closeBy:"kt_quick_search_close",toggleBy:"kt_quick_search_toggle"}),KTUtil.scrollInit(s,{disableForMobile:!0,resetHeightOnDestroy:!0,handleWindowResize:!0,height:function(){var e=parseInt(KTUtil.getViewPort().height);return i&&(e-=parseInt(KTUtil.actualHeight(i)),e-=parseInt(KTUtil.css(i,"marginTop")),e-=parseInt(KTUtil.css(i,"marginBottom"))),a&&(e-=parseInt(KTUtil.css(a,"marginTop")),e-=parseInt(KTUtil.css(a,"marginBottom"))),s&&(e-=parseInt(KTUtil.actualHeight(n)),e-=parseInt(KTUtil.css(n,"marginTop")),e-=parseInt(KTUtil.css(n,"marginBottom")),e-=parseInt(KTUtil.css(s,"marginTop")),e-=parseInt(KTUtil.css(s,"marginBottom"))),e-=parseInt(KTUtil.css(t,"paddingTop")),e-=parseInt(KTUtil.css(t,"paddingBottom")),e-=2}}))},getElement:function(){return t}}}();"undefined"!=typeof module&&(module.exports=KTLayoutQuickSearch);
  "use strict";var KTLayoutQuickUser=function(){var t;return{init:function(e){var i,n;(t=KTUtil.getById(e))&&(i=KTUtil.find(t,".offcanvas-header"),n=KTUtil.find(t,".offcanvas-content"),new KTOffcanvas(t,{overlay:!0,baseClass:"offcanvas",placement:"right",closeBy:"kt_quick_user_close",toggleBy:"kt_quick_user_toggle"}),KTUtil.scrollInit(n,{disableForMobile:!0,resetHeightOnDestroy:!0,handleWindowResize:!0,height:function(){var e=parseInt(KTUtil.getViewPort().height);return i&&(e-=parseInt(KTUtil.actualHeight(i)),e-=parseInt(KTUtil.css(i,"marginTop")),e-=parseInt(KTUtil.css(i,"marginBottom"))),n&&(e-=parseInt(KTUtil.css(n,"marginTop")),e-=parseInt(KTUtil.css(n,"marginBottom"))),e-=parseInt(KTUtil.css(t,"paddingTop")),e-=parseInt(KTUtil.css(t,"paddingBottom")),e-=2}}))},getElement:function(){return t}}}();"undefined"!=typeof module&&(module.exports=KTLayoutQuickUser);
  "use strict";var KTLayoutScrolltop=function(){var t;return{init:function(e){(t=KTUtil.getById(e))&&new KTScrolltop(t,{offset:300,speed:600})},getElement:function(){return t}}}();"undefined"!=typeof module&&(module.exports=KTLayoutScrolltop);
  "use strict";var KTLayoutSearch=function(){var t,e,i,n,a,l,o,r,s="",d=!1,u=!1,c=!1,T="quick-search-has-result",p=function(){c=!1,KTUtil.removeClass(r,"spinner spinner-sm spinner-primary"),n&&(i.value.length<2?KTUtil.hide(n):KTUtil.show(n,"flex"))},K=function(){o&&!KTUtil.hasClass(l,"show")&&($(o).dropdown("toggle"),$(o).dropdown("update"))},U=function(){o&&KTUtil.hasClass(l,"show")&&$(o).dropdown("toggle")},f=function(){if(d&&s===i.value)return p(),KTUtil.addClass(t,T),K(),void KTUtil.scrollUpdate(a);s=i.value,KTUtil.removeClass(t,T),c=!0,KTUtil.addClass(r,"spinner spinner-sm spinner-primary"),n&&KTUtil.hide(n),U(),setTimeout(function(){$.ajax({url:HOST_URL+"/api/quick_search.php",data:{query:s},dataType:"html",success:function(e){d=!0,p(),KTUtil.addClass(t,T),KTUtil.setHTML(a,e),K(),KTUtil.scrollUpdate(a)},error:function(e){d=!1,p(),KTUtil.addClass(t,T),KTUtil.setHTML(a,'<span class="font-weight-bold text-muted">Connection error. Please try again later..</div>'),K(),KTUtil.scrollUpdate(a)}})},1e3)},h=function(e){i.value="",s="",d=!1,KTUtil.hide(n),KTUtil.removeClass(t,T),U()},v=function(){if(i.value.length<2)return p(),void U();1!=c&&(u&&clearTimeout(u),u=setTimeout(function(){f()},200))};return{init:function(s){(t=KTUtil.getById(s))&&(e=KTUtil.find(t,".quick-search-form"),i=KTUtil.find(t,".form-control"),n=KTUtil.find(t,".quick-search-close"),a=KTUtil.find(t,".quick-search-wrapper"),l=KTUtil.find(t,".dropdown-menu"),o=KTUtil.find(t,'[data-toggle="dropdown"]'),KTUtil.find(t,".input-group"),r=KTUtil.find(t,".input-group .input-group-append"),KTUtil.addEvent(i,"keyup",v),KTUtil.addEvent(i,"focus",v),e.onkeypress=function(t){13==(t.charCode||t.keyCode||0)&&t.preventDefault()},KTUtil.addEvent(n,"click",h))}}};"undefined"!=typeof module&&(module.exports=KTLayoutSearch);var KTLayoutSearchInline=KTLayoutSearch,KTLayoutSearchOffcanvas=KTLayoutSearch;