text: /******/ (function(modules) { // webpackBootstrap
  /******/ 	// The module cache
  /******/ 	var installedModules = {};
  /******/
  /******/ 	// The require function
  /******/ 	function __webpack_require__(moduleId) {
  /******/
  /******/ 		// Check if module is in cache
  /******/ 		if(installedModules[moduleId]) {
  /******/ 			return installedModules[moduleId].exports;
  /******/ 		}
  /******/ 		// Create a new module (and put it into the cache)
  /******/ 		var module = installedModules[moduleId] = {
  /******/ 			i: moduleId,
  /******/ 			l: false,
  /******/ 			exports: {}
  /******/ 		};
  /******/
  /******/ 		// Execute the module function
  /******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
  /******/
  /******/ 		// Flag the module as loaded
  /******/ 		module.l = true;
  /******/
  /******/ 		// Return the exports of the module
  /******/ 		return module.exports;
  /******/ 	}
  /******/
  /******/
  /******/ 	// expose the modules object (__webpack_modules__)
  /******/ 	__webpack_require__.m = modules;
  /******/
  /******/ 	// expose the module cache
  /******/ 	__webpack_require__.c = installedModules;
  /******/
  /******/ 	// define getter function for harmony exports
  /******/ 	__webpack_require__.d = function(exports, name, getter) {
  /******/ 		if(!__webpack_require__.o(exports, name)) {
  /******/ 			Object.defineProperty(exports, name, { enumerable: true, get: getter });
  /******/ 		}
  /******/ 	};
  /******/
  /******/ 	// define __esModule on exports
  /******/ 	__webpack_require__.r = function(exports) {
  /******/ 		if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
  /******/ 			Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
  /******/ 		}
  /******/ 		Object.defineProperty(exports, '__esModule', { value: true });
  /******/ 	};
  /******/
  /******/ 	// create a fake namespace object
  /******/ 	// mode & 1: value is a module id, require it
  /******/ 	// mode & 2: merge all properties of value into the ns
  /******/ 	// mode & 4: return value when already ns object
  /******/ 	// mode & 8|1: behave like require
  /******/ 	__webpack_require__.t = function(value, mode) {
  /******/ 		if(mode & 1) value = __webpack_require__(value);
  /******/ 		if(mode & 8) return value;
  /******/ 		if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
  /******/ 		var ns = Object.create(null);
  /******/ 		__webpack_require__.r(ns);
  /******/ 		Object.defineProperty(ns, 'default', { enumerable: true, value: value });
  /******/ 		if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
  /******/ 		return ns;
  /******/ 	};
  /******/
  /******/ 	// getDefaultExport function for compatibility with non-harmony modules
  /******/ 	__webpack_require__.n = function(module) {
  /******/ 		var getter = module && module.__esModule ?
  /******/ 			function getDefault() { return module['default']; } :
  /******/ 			function getModuleExports() { return module; };
  /******/ 		__webpack_require__.d(getter, 'a', getter);
  /******/ 		return getter;
  /******/ 	};
  /******/
  /******/ 	// Object.prototype.hasOwnProperty.call
  /******/ 	__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
  /******/
  /******/ 	// __webpack_public_path__
  /******/ 	__webpack_require__.p = "";
  /******/
  /******/
  /******/ 	// Load entry module and return exports
  /******/ 	return __webpack_require__(__webpack_require__.s = "./webpack/scripts.js");
  /******/ })
  /************************************************************************/
  /******/ ({
  
  /***/ "../src/assets/js/global/components/base/app.js":
  /*!******************************************************!*\
    !*** ../src/assets/js/global/components/base/app.js ***!
    \******************************************************/
  /*! no static exports found */
  /***/ (function(module, exports, __webpack_require__) {
  
  "use strict";
  eval("\r\n\r\n/**\r\n * @class KApp\r\n */\r\n\r\nvar KTApp = function() {\r\n    /** @type {object} colors State colors **/\r\n    var colors = {};\r\n\r\n    var initTooltip = function(el) {\r\n        var skin = el.data('skin') ? 'tooltip-' + el.data('skin') : '';\r\n        var width = el.data('width') == 'auto' ? 'tooltop-auto-width' : '';\r\n        var triggerValue = el.data('trigger') ? el.data('trigger') : 'hover';\r\n        var placement = el.data('placement') ? el.data('placement') : 'left';\r\n\r\n        el.tooltip({\r\n            trigger: triggerValue,\r\n            template: '<div class=\"tooltip ' + skin + ' ' + width + '\" role=\"tooltip\">\\\r\n                <div class=\"arrow\"></div>\\\r\n                <div class=\"tooltip-inner\"></div>\\\r\n            </div>'\r\n        });\r\n    }\r\n\r\n    var initTooltips = function() {\r\n        // init bootstrap tooltips\r\n        $('[data-toggle=\"kt-tooltip\"]').each(function() {\r\n            initTooltip($(this));\r\n        });\r\n    }\r\n\r\n    var initPopover = function(el) {\r\n        var skin = el.data('skin') ? 'popover-' + el.data('skin') : '';\r\n        var triggerValue = el.data('trigger') ? el.data('trigger') : 'hover';\r\n\r\n        el.popover({\r\n            trigger: triggerValue,\r\n            template: '\\\r\n            <div class=\"popover ' + skin + '\" role=\"tooltip\">\\\r\n                <div class=\"arrow\"></div>\\\r\n                <h3 class=\"popover-header\"></h3>\\\r\n                <div class=\"popover-body\"></div>\\\r\n            </div>'\r\n        });\r\n    }\r\n\r\n    var initPopovers = function() {\r\n        // init bootstrap popover\r\n        $('[data-toggle=\"kt-popover\"]').each(function() {\r\n            initPopover($(this));\r\n        });\r\n    }\r\n\r\n    var initFileInput = function() {\r\n        // init bootstrap popover\r\n        $('.custom-file-input').on('change', function() {\r\n            var fileName = $(this).val();\r\n            $(this).next('.custom-file-label').addClass(\"selected\").html(fileName);\r\n        });\r\n    }\r\n\r\n    var initPortlet = function(el, options) {\r\n        // init portlet tools\r\n        var el = $(el);\r\n        var portlet = new KTPortlet(el[0], options);\r\n    }\r\n\r\n    var initPortlets = function() {\r\n        // init portlet tools\r\n        $('[data-ktportlet=\"true\"]').each(function() {\r\n            var el = $(this);\r\n\r\n            if (el.data('data-ktportlet-initialized') !== true) {\r\n                initPortlet(el, {});\r\n                el.data('data-ktportlet-initialized', true);\r\n            }\r\n        });\r\n    }\r\n\r\n    var initScroll = function() {\r\n        $('[data-scroll=\"true\"]').each(function() {\r\n            var el = $(this);\r\n            KTUtil.scrollInit(this, {\r\n                mobileNativeScroll: true,\r\n                handleWindowResize: true,\r\n                rememberPosition: (el.data('remember-position') == 'true' ? true : false),\r\n                height: function() {\r\n                    if (KTUtil.isInResponsiveRange('tablet-and-mobile') && el.data('mobile-height')) {\r\n                        return el.data('mobile-height');\r\n                    } else {\r\n                        return el.data('height');\r\n                    }\r\n                }\r\n            });\r\n        });\r\n    }\r\n\r\n    var initAlerts = function() {\r\n        // init bootstrap popover\r\n        $('body').on('click', '[data-close=alert]', function() {\r\n            $(this).closest('.alert').hide();\r\n        });\r\n    }\r\n\r\n    var initSticky = function() {\r\n        var sticky = new Sticky('[data-sticky=\"true\"]');\r\n    }\r\n\r\n    var initAbsoluteDropdown = function(context) {\r\n        var dropdownMenu;\r\n\r\n        if (!context) {\r\n            return;\r\n        }\r\n\r\n        $('body').on('show.bs.dropdown', context, function(e) {\r\n        \tdropdownMenu = $(e.target).find('.dropdown-menu');\r\n        \t$('body').append(dropdownMenu.detach());\r\n        \tdropdownMenu.css('display', 'block');\r\n        \tdropdownMenu.position({\r\n        \t\t'my': 'right top',\r\n        \t\t'at': 'right bottom',\r\n        \t\t'of': $(e.relatedTarget),\r\n        \t});\r\n        }).on('hide.bs.dropdown', context, function(e) {\r\n        \t$(e.target).append(dropdownMenu.detach());\r\n        \tdropdownMenu.hide();\r\n        });\r\n    }\r\n\r\n    var initAbsoluteDropdowns = function() {\r\n        $('body').on('show.bs.dropdown', function(e) {\r\n            // e.target is always parent (contains toggler and menu)\r\n            var $toggler = $(e.target).find(\"[data-attach='body']\");\r\n            if ($toggler.length === 0) {\r\n                return;\r\n            }\r\n            var $dropdownMenu = $(e.target).find('.dropdown-menu');\r\n            // save detached menu\r\n            var $detachedDropdownMenu = $dropdownMenu.detach();\r\n            // save reference to detached menu inside data of toggler\r\n            $toggler.data('dropdown-menu', $detachedDropdownMenu);\r\n\r\n            $('body').append($detachedDropdownMenu);\r\n            $detachedDropdownMenu.css('display', 'block');\r\n            $detachedDropdownMenu.position({\r\n                my: 'right top',\r\n                at: 'right bottom',\r\n                of: $(e.relatedTarget),\r\n            });\r\n        });\r\n\r\n        $('body').on('hide.bs.dropdown', function(e) {\r\n            var $toggler = $(e.target).find(\"[data-attach='body']\");\r\n            if ($toggler.length === 0) {\r\n                return;\r\n            }\r\n            // access to reference of detached menu from data of toggler\r\n            var $detachedDropdownMenu = $toggler.data('dropdown-menu');\r\n            // re-append detached menu inside parent\r\n            $(e.target).append($detachedDropdownMenu.detach());\r\n            // hide dropdown\r\n            $detachedDropdownMenu.hide();\r\n        });\r\n    };\r\n    \r\n    return {\r\n        init: function(options) {\r\n            if (options && options.colors) {\r\n                colors = options.colors;\r\n            }\r\n\r\n            KTApp.initComponents();\r\n        },\r\n\r\n        initComponents: function() {\r\n            initScroll();\r\n            initTooltips();\r\n            initPopovers();\r\n            initAlerts();\r\n            initPortlets();\r\n            initFileInput();\r\n            initSticky();\r\n            initAbsoluteDropdowns();\r\n        },\r\n\r\n        initTooltips: function() {\r\n            initTooltips();\r\n        },\r\n\r\n        initTooltip: function(el) {\r\n            initTooltip(el);\r\n        },\r\n\r\n        initPopovers: function() {\r\n            initPopovers();\r\n        },\r\n\r\n        initPopover: function(el) {\r\n            initPopover(el);\r\n        },\r\n\r\n        initPortlet: function(el, options) {\r\n            initPortlet(el, options);\r\n        },\r\n\r\n        initPortlets: function() {\r\n            initPortlets();\r\n        },\r\n\r\n        initSticky: function() {\r\n            initSticky();\r\n        },\r\n\r\n        initAbsoluteDropdown: function(context) {\r\n            initAbsoluteDropdown(context);\r\n        },\r\n\r\n        block: function(target, options) {\r\n            var el = $(target);\r\n\r\n            options = $.extend(true, {\r\n                opacity: 0.05,\r\n                overlayColor: '#000000',\r\n                type: '',\r\n                size: '',\r\n                state: 'brand',\r\n                centerX: true,\r\n                centerY: true,\r\n                message: '',\r\n                shadow: true,\r\n                width: 'auto'\r\n            }, options);\r\n\r\n            var html;\r\n            var version = options.type ? 'kt-spinner--' + options.type : '';\r\n            var state = options.state ? 'kt-spinner--' + options.state : '';\r\n            var size = options.size ? 'kt-spinner--' + options.size : '';\r\n            var spinner = '<div class=\"kt-spinner ' + version + ' ' + state + ' ' + size + '\"></div';\r\n\r\n            if (options.message && options.message.length > 0) {\r\n                var classes = 'blockui ' + (options.shadow === false ? 'blockui' : '');\r\n\r\n                html = '<div class=\"' + classes + '\"><span>' + options.message + '</span><span>' + spinner + '</span></div>';\r\n\r\n                var el = document.createElement('div');\r\n                KTUtil.get('body').prepend(el);\r\n                KTUtil.addClass(el, classes);\r\n                el.innerHTML = '<span>' + options.message + '</span><span>' + spinner + '</span>';\r\n                options.width = KTUtil.actualWidth(el) + 10;\r\n                KTUtil.remove(el);\r\n\r\n                if (target == 'body') {\r\n                    html = '<div class=\"' + classes + '\" style=\"margin-left:-' + (options.width / 2) + 'px;\"><span>' + options.message + '</span><span>' + spinner + '</span></div>';\r\n                }\r\n            } else {\r\n                html = spinner;\r\n            }\r\n\r\n            var params = {\r\n                message: html,\r\n                centerY: options.centerY,\r\n                centerX: options.centerX,\r\n                css: {\r\n                    top: '30%',\r\n                    left: '50%',\r\n                    border: '0',\r\n                    padding: '0',\r\n                    backgroundColor: 'none',\r\n                    width: options.width\r\n                },\r\n                overlayCSS: {\r\n                    backgroundColor: options.overlayColor,\r\n                    opacity: options.opacity,\r\n                    cursor: 'wait',\r\n                    zIndex: (target == 'body' ? 1100 : 10)\r\n                },\r\n                onUnblock: function() {\r\n                    if (el && el[0]) {\r\n                        KTUtil.css(el[0], 'position', '');\r\n                        KTUtil.css(el[0], 'zoom', '');\r\n                    }\r\n                }\r\n            };\r\n\r\n            if (target == 'body') {\r\n                params.css.top = '50%';\r\n                $.blockUI(params);\r\n            } else {\r\n                var el = $(target);\r\n                el.block(params);\r\n            }\r\n        },\r\n\r\n        unblock: function(target) {\r\n            if (target && target != 'body') {\r\n                $(target).unblock();\r\n            } else {\r\n                $.unblockUI();\r\n            }\r\n        },\r\n\r\n        blockPage: function(options) {\r\n            return KTApp.block('body', options);\r\n        },\r\n\r\n        unblockPage: function() {\r\n            return KTApp.unblock('body');\r\n        },\r\n\r\n        progress: function(target, options) {\r\n            var skin = (options && options.skin) ? options.skin : 'light';\r\n            var alignment = (options && options.alignment) ? options.alignment : 'right';\r\n            var size = (options && options.size) ? ' kt-spinner--' + options.size : '';\r\n            var classes = 'kt-spinner ' + 'kt-spinner--' + skin + ' kt-spinner--' + alignment + size;\r\n\r\n            KTApp.unprogress(target);\r\n            KTUtil.attr(target, 'disabled', true);\r\n\r\n            $(target).addClass(classes);\r\n            $(target).data('progress-classes', classes);\r\n        },\r\n\r\n        unprogress: function(target) {\r\n            $(target).removeClass($(target).data('progress-classes'));\r\n            KTUtil.removeAttr(target, 'disabled');\r\n        },\r\n\r\n        getStateColor: function(name) {\r\n            return colors[\"state\"][name];\r\n        },\r\n\r\n        getBaseColor: function(type, level) {\r\n            return colors[\"base\"][type][level - 1];\r\n        }\r\n    };\r\n}();\r\n\r\n// webpack support\r\nif ( true && typeof module.exports !== 'undefined') {\r\n    module.exports = KTApp;\r\n}\r\n\r\n// Initialize KTApp class on document ready\r\n$(document).ready(function() {\r\n    KTApp.init(KTAppOptions);\r\n});\r\n\n\n//# sourceURL=webpack:///../src/assets/js/global/components/base/app.js?");
  
  /***/ }),
  
  /***/ "../src/assets/js/global/components/base/avatar.js":
  /*!*********************************************************!*\
    !*** ../src/assets/js/global/components/base/avatar.js ***!
    \*********************************************************/
  /*! no static exports found */
  /***/ (function(module, exports, __webpack_require__) {
  
  eval("// plugin setup\r\nvar KTAvatar = function(elementId, options) {\r\n    // Main object\r\n    var the = this;\r\n    var init = false;\r\n\r\n    // Get element object\r\n    var element = KTUtil.get(elementId);\r\n    var body = KTUtil.get('body');\r\n\r\n    if (!element) {\r\n        return;\r\n    }\r\n\r\n    // Default options\r\n    var defaultOptions = {\r\n    };\r\n\r\n    ////////////////////////////\r\n    // ** Private Methods  ** //\r\n    ////////////////////////////\r\n\r\n    var Plugin = {\r\n        /**\r\n         * Construct\r\n         */\r\n\r\n        construct: function(options) {\r\n            if (KTUtil.data(element).has('avatar')) {\r\n                the = KTUtil.data(element).get('avatar');\r\n            } else {\r\n                // reset menu\r\n                Plugin.init(options);\r\n\r\n                // build menu\r\n                Plugin.build();\r\n\r\n                KTUtil.data(element).set('avatar', the);\r\n            }\r\n\r\n            return the;\r\n        },\r\n\r\n        /**\r\n         * Init avatar\r\n         */\r\n        init: function(options) {\r\n            the.element = element;\r\n            the.events = [];\r\n\r\n            the.input = KTUtil.find(element, 'input[type=\"file\"]');\r\n            the.holder = KTUtil.find(element, '.kt-avatar__holder');\r\n            the.cancel = KTUtil.find(element, '.kt-avatar__cancel');\r\n            the.src = KTUtil.css(the.holder, 'backgroundImage');\r\n\r\n            // merge default and user defined options\r\n            the.options = KTUtil.deepExtend({}, defaultOptions, options);\r\n        },\r\n\r\n        /**\r\n         * Build Form Wizard\r\n         */\r\n        build: function() {\r\n            // Handle avatar change\r\n            KTUtil.addEvent(the.input, 'change', function(e) {\r\n                e.preventDefault();\r\n\r\n\t            if (the.input && the.input.files && the.input.files[0]) {\r\n\t                var reader = new FileReader();\r\n\t                reader.onload = function(e) {\r\n\t                    KTUtil.css(the.holder, 'background-image', 'url('+e.target.result +')');\r\n\t                }\r\n\t                reader.readAsDataURL(the.input.files[0]);\r\n\r\n\t                KTUtil.addClass(the.element, 'kt-avatar--changed');\r\n\t            }\r\n            });\r\n\r\n            // Handle avatar cancel\r\n            KTUtil.addEvent(the.cancel, 'click', function(e) {\r\n                e.preventDefault();\r\n\r\n\t            KTUtil.removeClass(the.element, 'kt-avatar--changed');\r\n\t            KTUtil.css(the.holder, 'background-image', the.src);\r\n\t            the.input.value = \"\";\r\n            });\r\n        },\r\n\r\n        /**\r\n         * Trigger events\r\n         */\r\n        eventTrigger: function(name) {\r\n            //KTUtil.triggerCustomEvent(name);\r\n            for (var i = 0; i < the.events.length; i++) {\r\n                var event = the.events[i];\r\n                if (event.name == name) {\r\n                    if (event.one == true) {\r\n                        if (event.fired == false) {\r\n                            the.events[i].fired = true;\r\n                            return event.handler.call(this, the);\r\n                        }\r\n                    } else {\r\n                        return event.handler.call(this, the);\r\n                    }\r\n                }\r\n            }\r\n        },\r\n\r\n        addEvent: function(name, handler, one) {\r\n            the.events.push({\r\n                name: name,\r\n                handler: handler,\r\n                one: one,\r\n                fired: false\r\n            });\r\n\r\n            return the;\r\n        }\r\n    };\r\n\r\n    //////////////////////////\r\n    // ** Public Methods ** //\r\n    //////////////////////////\r\n\r\n    /**\r\n     * Set default options\r\n     */\r\n\r\n    the.setDefaults = function(options) {\r\n        defaultOptions = options;\r\n    };\r\n\r\n    /**\r\n     * Attach event\r\n     */\r\n    the.on = function(name, handler) {\r\n        return Plugin.addEvent(name, handler);\r\n    };\r\n\r\n    /**\r\n     * Attach event that will be fired once\r\n     */\r\n    the.one = function(name, handler) {\r\n        return Plugin.addEvent(name, handler, true);\r\n    };\r\n\r\n    // Construct plugin\r\n    Plugin.construct.apply(the, [options]);\r\n\r\n    return the;\r\n};\r\n\r\n// webpack support\r\nif ( true && typeof module.exports !== 'undefined') {\r\n    module.exports = KTAvatar;\r\n}\r\n\n\n//# sourceURL=webpack:///../src/assets/js/global/components/base/avatar.js?");
  
  /***/ }),
  
  /***/ "../src/assets/js/global/components/base/datatable/core.datatable.js":
  /*!***************************************************************************!*\
    !*** ../src/assets/js/global/components/base/datatable/core.datatable.js ***!
    \***************************************************************************/
  /*! no static exports found */
  /***/ (function(module, exports, __webpack_require__) {
  
  "use strict";
  eval("\r\n(function($) {\r\n\r\n\tvar pluginName = 'KTDatatable';\r\n\tvar pfx = 'kt-';\r\n\tvar util = KTUtil;\r\n\tvar app = KTApp;\r\n\r\n\tif (typeof util === 'undefined') throw new Error('Util class is required and must be included before ' + pluginName);\r\n\r\n\t// plugin setup\r\n\t$.fn[pluginName] = function(options) {\r\n\t\tif ($(this).length === 0) {\r\n\t\t\tconsole.warn('No ' + pluginName + ' element exist.');\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// global variables\r\n\t\tvar datatable = this;\r\n\r\n\t\t// debug enabled?\r\n\t\t// 1) state will be cleared on each refresh\r\n\t\t// 2) enable some logs\r\n\t\t// 3) etc.\r\n\t\tdatatable.debug = false;\r\n\r\n\t\tdatatable.API = {\r\n\t\t\trecord: null,\r\n\t\t\tvalue: null,\r\n\t\t\tparams: null,\r\n\t\t};\r\n\r\n\t\tvar Plugin = {\r\n\t\t\t/********************\r\n\t\t\t ** PRIVATE METHODS\r\n\t\t\t ********************/\r\n\t\t\tisInit: false,\r\n\t\t\tcellOffset: 110,\r\n\t\t\ticonOffset: 15,\r\n\t\t\tstateId: 'meta',\r\n\t\t\tajaxParams: {},\r\n\t\t\tpagingObject: {},\r\n\r\n\t\t\tinit: function(options) {\r\n\t\t\t\tvar isHtmlTable = false;\r\n\t\t\t\t// data source option empty is normal table\r\n\t\t\t\tif (options.data.source === null) {\r\n\t\t\t\t\tPlugin.extractTable();\r\n\t\t\t\t\tisHtmlTable = true;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tPlugin.setupBaseDOM.call();\r\n\t\t\t\tPlugin.setupDOM(datatable.table);\r\n\r\n\t\t\t\t// set custom query from options\r\n\t\t\t\tPlugin.setDataSourceQuery(Plugin.getOption('data.source.read.params.query'));\r\n\r\n\t\t\t\t// on event after layout had done setup, show datatable\r\n\t\t\t\t$(datatable).on(pfx + 'datatable--on-layout-updated', Plugin.afterRender);\r\n\r\n\t\t\t\tif (datatable.debug) {\r\n\t\t\t\t\tPlugin.stateRemove(Plugin.stateId);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// initialize extensions\r\n\t\t\t\t$.each(Plugin.getOption('extensions'), function(extName, extOptions) {\r\n\t\t\t\t\tif (typeof $.fn[pluginName][extName] === 'function') {\r\n\t\t\t\t\t\tnew $.fn[pluginName][extName](datatable, extOptions);\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t\tPlugin.spinnerCallback(true);\r\n\t\t\t\t// get data\r\n\t\t\t\tif (options.data.type === 'remote' || options.data.type === 'local') {\r\n\t\t\t\t\tif (options.data.saveState === false\r\n\t\t\t\t\t\t|| options.data.saveState.cookie === false\r\n\t\t\t\t\t\t&& options.data.saveState.webstorage === false) {\r\n\t\t\t\t\t\tPlugin.stateRemove(Plugin.stateId);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// get data for local datatable and local table\r\n\t\t\t\t\tif (options.data.type === 'local' && typeof options.data.source === 'object') {\r\n\t\t\t\t\t\tdatatable.dataSet = datatable.originalDataSet = Plugin.dataMapCallback(options.data.source);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tPlugin.dataRender();\r\n\t\t\t\t}\r\n\r\n                // if html table, remove and setup a new header\r\n                if (isHtmlTable) {\r\n                  $(datatable.tableHead).find('tr').remove();\r\n                  $(datatable.tableFoot).find('tr').remove();\r\n                }\r\n\r\n                Plugin.setHeadTitle();\r\n                if (Plugin.getOption('layout.footer')) {\r\n                  Plugin.setHeadTitle(datatable.tableFoot);\r\n                }\r\n\r\n\t\t\t\t// hide header\r\n\t\t\t\tif (typeof options.layout.header !== 'undefined' &&\r\n\t\t\t\t\toptions.layout.header === false) {\r\n\t\t\t\t\t$(datatable.table).find('thead').remove();\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// hide footer\r\n\t\t\t\tif (typeof options.layout.footer !== 'undefined' &&\r\n\t\t\t\t\toptions.layout.footer === false) {\r\n\t\t\t\t\t$(datatable.table).find('tfoot').remove();\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// for normal and local data type, run layoutUpdate\r\n\t\t\t\tif (options.data.type === null ||\r\n\t\t\t\t\toptions.data.type === 'local') {\r\n\t\t\t\t\tPlugin.setupCellField.call();\r\n\t\t\t\t\tPlugin.setupTemplateCell.call();\r\n\r\n\t\t\t\t\t// setup nested datatable, if option enabled\r\n\t\t\t\t\tPlugin.setupSubDatatable.call();\r\n\r\n\t\t\t\t\t// setup extra system column properties\r\n\t\t\t\t\tPlugin.setupSystemColumn.call();\r\n\t\t\t\t\tPlugin.redraw();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar width;\r\n\t\t\t\tvar initialWidth = false;\r\n\t\t\t\t$(window).resize(function() {\r\n\t\t\t\t\t// issue: URL Bar Resizing on mobile, https://developers.google.com/web/updates/2016/12/url-bar-resizing\r\n\t\t\t\t\t// trigger datatable resize on width change only\r\n\t\t\t\t\tif ($(this).width() !== width) {\r\n\t\t\t\t\t\twidth = $(this).width();\r\n\t\t\t\t\t\tPlugin.fullRender();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// get initial width\r\n\t\t\t\t\tif (!initialWidth) {\r\n\t\t\t\t\t\twidth = $(this).width();\r\n\t\t\t\t\t\tinitialWidth = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t\t$(datatable).height('');\r\n\r\n\t\t\t\t$(Plugin.getOption('search.input')).on('keyup', function(e) {\r\n\t\t\t\t\tif (Plugin.getOption('search.onEnter') && e.which !== 13) return;\r\n\t\t\t\t\tPlugin.search($(this).val());\r\n\t\t\t\t});\r\n\r\n\t\t\t\treturn datatable;\r\n\t\t\t},\r\n\r\n\t\t\t/**\r\n\t\t\t * Extract static HTML table content into datasource\r\n\t\t\t */\r\n\t\t\textractTable: function() {\r\n\t\t\t\tvar columns = [];\r\n\t\t\t\tvar headers = $(datatable).find('tr:first-child th').get().map(function(cell, i) {\r\n\t\t\t\t\tvar field = $(cell).data('field');\r\n\t\t\t\t\tif (typeof field === 'undefined') {\r\n\t\t\t\t\t\tfield = $(cell).text().trim();\r\n\t\t\t\t\t}\r\n\t\t\t\t\tvar column = {field: field, title: field};\r\n\t\t\t\t\tfor (var ii in options.columns) {\r\n\t\t\t\t\t\tif (options.columns[ii].field === field) {\r\n\t\t\t\t\t\t\tcolumn = $.extend(true, {}, options.columns[ii], column);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcolumns.push(column);\r\n\t\t\t\t\treturn field;\r\n\t\t\t\t});\r\n\t\t\t\t// auto create columns config\r\n\t\t\t\toptions.columns = columns;\r\n\r\n\t\t\t\tvar rowProp = [];\r\n\t\t\t\tvar source = [];\r\n\r\n\t\t\t\t$(datatable).find('tr').each(function() {\r\n\t\t\t\t\tif ($(this).find('td').length) {\r\n\t\t\t\t\t\trowProp.push($(this).prop('attributes'));\r\n\t\t\t\t\t}\r\n\t\t\t\t\tvar td = {};\r\n\t\t\t\t\t$(this).find('td').each(function(i, cell) {\r\n\t\t\t\t\t\ttd[headers[i]] = cell.innerHTML.trim();\r\n\t\t\t\t\t});\r\n\t\t\t\t\tif (!util.isEmpty(td)) {\r\n\t\t\t\t\t\tsource.push(td);\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t\toptions.data.attr.rowProps = rowProp;\r\n\t\t\t\toptions.data.source = source;\r\n\t\t\t},\r\n\r\n\t\t\t/**\r\n\t\t\t * One time layout update on init\r\n\t\t\t */\r\n\t\t\tlayoutUpdate: function() {\r\n\t\t\t\t// setup nested datatable, if option enabled\r\n\t\t\t\tPlugin.setupSubDatatable.call();\r\n\r\n\t\t\t\t// setup extra system column properties\r\n\t\t\t\tPlugin.setupSystemColumn.call();\r\n\r\n\t\t\t\t// setup cell hover event\r\n\t\t\t\tPlugin.setupHover.call();\r\n\r\n\t\t\t\tif (typeof options.detail === 'undefined'\r\n\t\t\t\t\t// temporary disable lock column in subtable\r\n\t\t\t\t\t&& Plugin.getDepth() === 1) {\r\n\t\t\t\t\t// lock columns handler\r\n\t\t\t\t\tPlugin.lockTable.call();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tPlugin.resetScroll();\r\n\r\n\t\t\t\t// check if not is a locked column\r\n\t\t\t\tif (!Plugin.isLocked()) {\r\n\t\t\t\t\tPlugin.redraw.call();\r\n\t\t\t\t\t// check if its not a subtable and has autoHide option enabled\r\n\t\t\t\t\tif (!Plugin.isSubtable() && Plugin.getOption('rows.autoHide') === true) {\r\n\t\t\t\t\t\tPlugin.autoHide();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// reset row\r\n\t\t\t\t\t$(datatable.table).find('.' + pfx + 'datatable__row').css('height', '');\r\n\t\t\t\t}\r\n\r\n\t\t\t\tPlugin.columnHide.call();\r\n\r\n\t\t\t\tPlugin.rowEvenOdd.call();\r\n\r\n\t\t\t\tPlugin.sorting.call();\r\n\r\n\t\t\t\tPlugin.scrollbar.call();\r\n\r\n\t\t\t\tif (!Plugin.isInit) {\r\n\t\t\t\t\t// run once dropdown inside datatable\r\n\t\t\t\t\tPlugin.dropdownFix();\r\n\t\t\t\t\t$(datatable).trigger(pfx + 'datatable--on-init', {table: $(datatable.wrap).attr('id'), options: options});\r\n\t\t\t\t\tPlugin.isInit = true;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$(datatable).trigger(pfx + 'datatable--on-layout-updated', {table: $(datatable.wrap).attr('id')});\r\n\t\t\t},\r\n\r\n\t\t\tdropdownFix: function() {\r\n\t\t\t\tvar dropdownMenu;\r\n\t\t\t\t$('body').on('show.bs.dropdown', '.' + pfx + 'datatable .' + pfx + 'datatable__body', function(e) {\r\n\t\t\t\t\tdropdownMenu = $(e.target).find('.dropdown-menu');\r\n\t\t\t\t\t$('body').append(dropdownMenu.detach());\r\n\t\t\t\t\tdropdownMenu.css('display', 'block');\r\n\t\t\t\t\tdropdownMenu.position({\r\n\t\t\t\t\t\t'my': 'right top',\r\n\t\t\t\t\t\t'at': 'right bottom',\r\n\t\t\t\t\t\t'of': $(e.relatedTarget),\r\n\t\t\t\t\t});\r\n\t\t\t\t\t// if datatable is inside modal\r\n\t\t\t\t\tif (datatable.closest('.modal').length) {\r\n\t\t\t\t\t\t// increase dropdown z-index\r\n\t\t\t\t\t\tdropdownMenu.css('z-index', '2000');\r\n\t\t\t\t\t}\r\n\t\t\t\t}).on('hide.bs.dropdown', '.' + pfx + 'datatable .' + pfx + 'datatable__body', function(e) {\r\n\t\t\t\t\t$(e.target).append(dropdownMenu.detach());\r\n\t\t\t\t\tdropdownMenu.hide();\r\n\t\t\t\t});\r\n\t\t\t},\r\n\r\n\t\t\tlockTable: function() {\r\n\t\t\t\tvar lock = {\r\n\t\t\t\t\tlockEnabled: false,\r\n\t\t\t\t\tinit: function() {\r\n\t\t\t\t\t\t// check if table should be locked columns\r\n\t\t\t\t\t\tlock.lockEnabled = Plugin.lockEnabledColumns();\r\n\t\t\t\t\t\tif (lock.lockEnabled.left.length === 0 &&\r\n\t\t\t\t\t\t\tlock.lockEnabled.right.length === 0) {\r\n\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tlock.enable();\r\n\t\t\t\t\t},\r\n\t\t\t\t\tenable: function() {\r\n\t\t\t\t\t\tvar enableLock = function(tablePart) {\r\n\t\t\t\t\t\t\t// check if already has lock column\r\n\t\t\t\t\t\t\tif ($(tablePart).find('.' + pfx + 'datatable__lock').length > 0) {\r\n\t\t\t\t\t\t\t\tPlugin.log('Locked container already exist in: ', tablePart);\r\n\t\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t// check if no rows exists\r\n\t\t\t\t\t\t\tif ($(tablePart).find('.' + pfx + 'datatable__row').length === 0) {\r\n\t\t\t\t\t\t\t\tPlugin.log('No row exist in: ', tablePart);\r\n\t\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t// locked div container\r\n\t\t\t\t\t\t\tvar lockLeft = $('<div/>').addClass(pfx + 'datatable__lock ' + pfx + 'datatable__lock--left');\r\n\t\t\t\t\t\t\tvar lockScroll = $('<div/>').addClass(pfx + 'datatable__lock ' + pfx + 'datatable__lock--scroll');\r\n\t\t\t\t\t\t\tvar lockRight = $('<div/>').addClass(pfx + 'datatable__lock ' + pfx + 'datatable__lock--right');\r\n\r\n\t\t\t\t\t\t\t$(tablePart).find('.' + pfx + 'datatable__row').each(function() {\r\n\t\t\t\t\t\t\t\t// create new row for lock columns and pass the data\r\n\t\t\t\t\t\t\t\tvar rowLeft = $('<tr/>').addClass(pfx + 'datatable__row').data('obj', $(this).data('obj')).appendTo(lockLeft);\r\n\t\t\t\t\t\t\t\tvar rowScroll = $('<tr/>').addClass(pfx + 'datatable__row').data('obj', $(this).data('obj')).appendTo(lockScroll);\r\n\t\t\t\t\t\t\t\tvar rowRight = $('<tr/>').addClass(pfx + 'datatable__row').data('obj', $(this).data('obj')).appendTo(lockRight);\r\n\t\t\t\t\t\t\t\t$(this).find('.' + pfx + 'datatable__cell').each(function() {\r\n\t\t\t\t\t\t\t\t\tvar locked = $(this).data('locked');\r\n\t\t\t\t\t\t\t\t\tif (typeof locked !== 'undefined') {\r\n\t\t\t\t\t\t\t\t\t\tif (typeof locked.left !== 'undefined' || locked === true) {\r\n\t\t\t\t\t\t\t\t\t\t\t// default locked to left\r\n\t\t\t\t\t\t\t\t\t\t\t$(this).appendTo(rowLeft);\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\tif (typeof locked.right !== 'undefined') {\r\n\t\t\t\t\t\t\t\t\t\t\t$(this).appendTo(rowRight);\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\t$(this).appendTo(rowScroll);\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t// remove old row\r\n\t\t\t\t\t\t\t\t$(this).remove();\r\n\t\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t\tif (lock.lockEnabled.left.length > 0) {\r\n\t\t\t\t\t\t\t\t$(datatable.wrap).addClass(pfx + 'datatable--lock');\r\n\t\t\t\t\t\t\t\t$(lockLeft).appendTo(tablePart);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tif (lock.lockEnabled.left.length > 0 || lock.lockEnabled.right.length > 0) {\r\n\t\t\t\t\t\t\t\t$(lockScroll).appendTo(tablePart);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tif (lock.lockEnabled.right.length > 0) {\r\n\t\t\t\t\t\t\t\t$(datatable.wrap).addClass(pfx + 'datatable--lock');\r\n\t\t\t\t\t\t\t\t$(lockRight).appendTo(tablePart);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t};\r\n\r\n\t\t\t\t\t\t$(datatable.table).find('thead,tbody,tfoot').each(function() {\r\n\t\t\t\t\t\t\tvar tablePart = this;\r\n\t\t\t\t\t\t\tif ($(this).find('.' + pfx + 'datatable__lock').length === 0) {\r\n\t\t\t\t\t\t\t\t$(this).ready(function() {\r\n\t\t\t\t\t\t\t\t\tenableLock(tablePart);\r\n\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t},\r\n\t\t\t\t};\r\n\t\t\t\tlock.init();\r\n\t\t\t\treturn lock;\r\n\t\t\t},\r\n\r\n\t\t\t/**\r\n\t\t\t * Render everything for resize\r\n\t\t\t */\r\n\t\t\tfullRender: function() {\r\n\t\t\t\t$(datatable.tableHead).empty();\r\n\t\t\t\tPlugin.setHeadTitle();\r\n\t\t\t\tif (Plugin.getOption('layout.footer')) {\r\n\t\t\t\t\t$(datatable.tableFoot).empty();\r\n\t\t\t\t\tPlugin.setHeadTitle(datatable.tableFoot);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tPlugin.spinnerCallback(true);\r\n\t\t\t\t$(datatable.wrap).removeClass(pfx + 'datatable--loaded');\r\n\r\n\t\t\t\tPlugin.insertData();\r\n\t\t\t},\r\n\r\n\t\t\tlockEnabledColumns: function() {\r\n\t\t\t\tvar screen = $(window).width();\r\n\t\t\t\tvar columns = options.columns;\r\n\t\t\t\tvar enabled = {left: [], right: []};\r\n\t\t\t\t$.each(columns, function(i, column) {\r\n\t\t\t\t\tif (typeof column.locked !== 'undefined') {\r\n\t\t\t\t\t\tif (typeof column.locked.left !== 'undefined') {\r\n\t\t\t\t\t\t\tif (util.getBreakpoint(column.locked.left) <= screen) {\r\n\t\t\t\t\t\t\t\tenabled['left'].push(column.locked.left);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (typeof column.locked.right !== 'undefined') {\r\n\t\t\t\t\t\t\tif (util.getBreakpoint(column.locked.right) <= screen) {\r\n\t\t\t\t\t\t\t\tenabled['right'].push(column.locked.right);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t\treturn enabled;\r\n\t\t\t},\r\n\r\n\t\t\t/**\r\n\t\t\t * After render event, called by\r\n\t\t\t * '+pfx+'-datatable--on-layout-updated\r\n\t\t\t * @param e\r\n\t\t\t * @param args\r\n\t\t\t */\r\n\t\t\tafterRender: function(e, args) {\r\n\t\t\t\t$(datatable).ready(function() {\r\n\t\t\t\t\t// redraw locked columns table\r\n\t\t\t\t\tif (Plugin.isLocked()) {\r\n\t\t\t\t\t\tPlugin.redraw();\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t$(datatable.tableBody).css('visibility', '');\r\n\t\t\t\t\t$(datatable.wrap).addClass(pfx + 'datatable--loaded');\r\n\r\n\t\t\t\t\tPlugin.spinnerCallback(false);\r\n\t\t\t\t});\r\n\t\t\t},\r\n\r\n\t\t\thoverTimer: 0,\r\n\t\t\tisScrolling: false,\r\n\t\t\tsetupHover: function() {\r\n\t\t\t\t$(window).scroll(function(e) {\r\n\t\t\t\t\t// stop hover when scrolling\r\n\t\t\t\t\tclearTimeout(Plugin.hoverTimer);\r\n\t\t\t\t\tPlugin.isScrolling = true;\r\n\t\t\t\t});\r\n\r\n\t\t\t\t$(datatable.tableBody).find('.' + pfx + 'datatable__cell').off('mouseenter', 'mouseleave').on('mouseenter', function() {\r\n\t\t\t\t\t// reset scroll timer to hover class\r\n\t\t\t\t\tPlugin.hoverTimer = setTimeout(function() {\r\n\t\t\t\t\t\tPlugin.isScrolling = false;\r\n\t\t\t\t\t}, 200);\r\n\t\t\t\t\tif (Plugin.isScrolling) return;\r\n\r\n\t\t\t\t\t// normal table\r\n\t\t\t\t\tvar row = $(this).closest('.' + pfx + 'datatable__row').addClass(pfx + 'datatable__row--hover');\r\n\t\t\t\t\tvar index = $(row).index() + 1;\r\n\r\n\t\t\t\t\t// lock table\r\n\t\t\t\t\t$(row).closest('.' + pfx + 'datatable__lock').parent().find('.' + pfx + 'datatable__row:nth-child(' + index + ')').addClass(pfx + 'datatable__row--hover');\r\n\t\t\t\t}).on('mouseleave', function() {\r\n\t\t\t\t\t// normal table\r\n\t\t\t\t\tvar row = $(this).closest('.' + pfx + 'datatable__row').removeClass(pfx + 'datatable__row--hover');\r\n\t\t\t\t\tvar index = $(row).index() + 1;\r\n\r\n\t\t\t\t\t// look table\r\n\t\t\t\t\t$(row).closest('.' + pfx + 'datatable__lock').parent().find('.' + pfx + 'datatable__row:nth-child(' + index + ')').removeClass(pfx + 'datatable__row--hover');\r\n\t\t\t\t});\r\n\t\t\t},\r\n\r\n\t\t\t/**\r\n\t\t\t * Adjust width of locked table containers by resize handler\r\n\t\t\t * @returns {number}\r\n\t\t\t */\r\n\t\t\tadjustLockContainer: function() {\r\n\t\t\t\tif (!Plugin.isLocked()) return 0;\r\n\r\n\t\t\t\t// refer to head dimension\r\n\t\t\t\tvar containerWidth = $(datatable.tableHead).width();\r\n\t\t\t\tvar lockLeft = $(datatable.tableHead).find('.' + pfx + 'datatable__lock--left').width();\r\n\t\t\t\tvar lockRight = $(datatable.tableHead).find('.' + pfx + 'datatable__lock--right').width();\r\n\r\n\t\t\t\tif (typeof lockLeft === 'undefined') lockLeft = 0;\r\n\t\t\t\tif (typeof lockRight === 'undefined') lockRight = 0;\r\n\r\n\t\t\t\tvar lockScroll = Math.floor(containerWidth - lockLeft - lockRight);\r\n\t\t\t\t$(datatable.table).find('.' + pfx + 'datatable__lock--scroll').css('width', lockScroll);\r\n\r\n\t\t\t\treturn lockScroll;\r\n\t\t\t},\r\n\r\n\t\t\t/**\r\n\t\t\t * todo; not in use\r\n\t\t\t */\r\n\t\t\tdragResize: function() {\r\n\t\t\t\tvar pressed = false;\r\n\t\t\t\tvar start = undefined;\r\n\t\t\t\tvar startX, startWidth;\r\n\t\t\t\t$(datatable.tableHead).find('.' + pfx + 'datatable__cell').mousedown(function(e) {\r\n\t\t\t\t\tstart = $(this);\r\n\t\t\t\t\tpressed = true;\r\n\t\t\t\t\tstartX = e.pageX;\r\n\t\t\t\t\tstartWidth = $(this).width();\r\n\t\t\t\t\t$(start).addClass(pfx + 'datatable__cell--resizing');\r\n\r\n\t\t\t\t}).mousemove(function(e) {\r\n\t\t\t\t\tif (pressed) {\r\n\t\t\t\t\t\tvar i = $(start).index();\r\n\t\t\t\t\t\tvar tableBody = $(datatable.tableBody);\r\n\t\t\t\t\t\tvar ifLocked = $(start).closest('.' + pfx + 'datatable__lock');\r\n\r\n\t\t\t\t\t\tif (ifLocked) {\r\n\t\t\t\t\t\t\tvar lockedIndex = $(ifLocked).index();\r\n\t\t\t\t\t\t\ttableBody = $(datatable.tableBody).find('.' + pfx + 'datatable__lock').eq(lockedIndex);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t$(tableBody).find('.' + pfx + 'datatable__row').each(function(tri, tr) {\r\n\t\t\t\t\t\t\t$(tr).find('.' + pfx + 'datatable__cell').eq(i).width(startWidth + (e.pageX - startX)).children().width(startWidth + (e.pageX - startX));\r\n\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t$(start).children().css('width', startWidth + (e.pageX - startX));\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}).mouseup(function() {\r\n\t\t\t\t\t$(start).removeClass(pfx + 'datatable__cell--resizing');\r\n\t\t\t\t\tpressed = false;\r\n\t\t\t\t});\r\n\r\n\t\t\t\t$(document).mouseup(function() {\r\n\t\t\t\t\t$(start).removeClass(pfx + 'datatable__cell--resizing');\r\n\t\t\t\t\tpressed = false;\r\n\t\t\t\t});\r\n\t\t\t},\r\n\r\n\t\t\t/**\r\n\t\t\t * To prepare placeholder for table before content is loading\r\n\t\t\t */\r\n\t\t\tinitHeight: function() {\r\n\t\t\t\tif (options.layout.height && options.layout.scroll) {\r\n\t\t\t\t\tvar theadHeight = $(datatable.tableHead).find('.' + pfx + 'datatable__row').outerHeight();\r\n\t\t\t\t\tvar tfootHeight = $(datatable.tableFoot).find('.' + pfx + 'datatable__row').outerHeight();\r\n\t\t\t\t\tvar bodyHeight = options.layout.height;\r\n\t\t\t\t\tif (theadHeight > 0) {\r\n\t\t\t\t\t\tbodyHeight -= theadHeight;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (tfootHeight > 0) {\r\n\t\t\t\t\t\tbodyHeight -= tfootHeight;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// scrollbar offset\r\n\t\t\t\t\tbodyHeight -= 2;\r\n\r\n\t\t\t\t\t$(datatable.tableBody).css('max-height', Math.floor(parseFloat(bodyHeight)));\r\n\r\n\t\t\t\t\t// set scrollable area fixed height\r\n\t\t\t\t\t// $(datatable.tableBody).find('.' + pfx + 'datatable__lock--scroll').css('height', Math.floor(parseFloat(bodyHeight)));\r\n\t\t\t\t}\r\n\t\t\t},\r\n\r\n\t\t\t/**\r\n\t\t\t * Setup base DOM (table, thead, tbody, tfoot) and create if not\r\n\t\t\t * exist.\r\n\t\t\t */\r\n\t\t\tsetupBaseDOM: function() {\r\n\t\t\t\t// keep original state before datatable initialize\r\n\t\t\t\tdatatable.initialDatatable = $(datatable).clone();\r\n\r\n\t\t\t\t// main element\r\n\t\t\t\tif ($(datatable).prop('tagName') === 'TABLE') {\r\n\t\t\t\t\t// if main init element is <table>, wrap with div\r\n\t\t\t\t\tdatatable.table = $(datatable).removeClass(pfx + 'datatable').addClass(pfx + 'datatable__table');\r\n\t\t\t\t\tif ($(datatable.table).parents('.' + pfx + 'datatable').length === 0) {\r\n\t\t\t\t\t\tdatatable.table.wrap($('<div/>').addClass(pfx + 'datatable').addClass(pfx + 'datatable--' + options.layout.theme));\r\n\t\t\t\t\t\tdatatable.wrap = $(datatable.table).parent();\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// create table\r\n\t\t\t\t\tdatatable.wrap = $(datatable).addClass(pfx + 'datatable').addClass(pfx + 'datatable--' + options.layout.theme);\r\n\t\t\t\t\tdatatable.table = $('<table/>').addClass(pfx + 'datatable__table').appendTo(datatable);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (typeof options.layout.class !== 'undefined') {\r\n\t\t\t\t\t$(datatable.wrap).addClass(options.layout.class);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$(datatable.table).removeClass(pfx + 'datatable--destroyed').css('display', 'block');\r\n\r\n\t\t\t\t// force disable save state\r\n\t\t\t\tif (typeof $(datatable).attr('id') === 'undefined') {\r\n\t\t\t\t\tPlugin.setOption('data.saveState', false);\r\n\t\t\t\t\t$(datatable.table).attr('id', util.getUniqueID(pfx + 'datatable--'));\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// predefine table height\r\n\t\t\t\tif (Plugin.getOption('layout.minHeight'))\r\n\t\t\t\t\t$(datatable.table).css('min-height', Plugin.getOption('layout.minHeight'));\r\n\r\n\t\t\t\tif (Plugin.getOption('layout.height'))\r\n\t\t\t\t\t$(datatable.table).css('max-height', Plugin.getOption('layout.height'));\r\n\r\n\t\t\t\t// for normal table load\r\n\t\t\t\tif (options.data.type === null) {\r\n\t\t\t\t\t$(datatable.table).css('width', '').css('display', '');\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// create table head element\r\n\t\t\t\tdatatable.tableHead = $(datatable.table).find('thead');\r\n\t\t\t\tif ($(datatable.tableHead).length === 0) {\r\n\t\t\t\t\tdatatable.tableHead = $('<thead/>').prependTo(datatable.table);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// create table head element\r\n\t\t\t\tdatatable.tableBody = $(datatable.table).find('tbody');\r\n\t\t\t\tif ($(datatable.tableBody).length === 0) {\r\n\t\t\t\t\tdatatable.tableBody = $('<tbody/>').appendTo(datatable.table);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (typeof options.layout.footer !== 'undefined' &&\r\n\t\t\t\t\toptions.layout.footer) {\r\n\t\t\t\t\t// create table foot element\r\n\t\t\t\t\tdatatable.tableFoot = $(datatable.table).find('tfoot');\r\n\t\t\t\t\tif ($(datatable.tableFoot).length === 0) {\r\n\t\t\t\t\t\tdatatable.tableFoot = $('<tfoot/>').appendTo(datatable.table);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t},\r\n\r\n\t\t\t/**\r\n\t\t\t * Set column data before table manipulation.\r\n\t\t\t */\r\n\t\t\tsetupCellField: function(tableParts) {\r\n\t\t\t\tif (typeof tableParts === 'undefined') tableParts = $(datatable.table).children();\r\n\t\t\t\tvar columns = options.columns;\r\n\t\t\t\t$.each(tableParts, function(part, tablePart) {\r\n\t\t\t\t\t$(tablePart).find('.' + pfx + 'datatable__row').each(function(tri, tr) {\r\n\t\t\t\t\t\t// prepare data\r\n\t\t\t\t\t\t$(tr).find('.' + pfx + 'datatable__cell').each(function(tdi, td) {\r\n\t\t\t\t\t\t\tif (typeof columns[tdi] !== 'undefined') {\r\n\t\t\t\t\t\t\t\t$(td).data(columns[tdi]);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t});\r\n\t\t\t\t});\r\n\t\t\t},\r\n\r\n\t\t\t/**\r\n\t\t\t * Set column template callback\r\n\t\t\t * @param tablePart\r\n\t\t\t */\r\n\t\t\tsetupTemplateCell: function(tablePart) {\r\n\t\t\t\tif (typeof tablePart === 'undefined') tablePart = datatable.tableBody;\r\n\t\t\t\tvar columns = options.columns;\r\n\t\t\t\t$(tablePart).find('.' + pfx + 'datatable__row').each(function(tri, tr) {\r\n\t\t\t\t\t// row data object, if any\r\n\t\t\t\t\tvar obj = $(tr).data('obj');\r\n\t\t\t\t\tif (typeof obj === 'undefined') {\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// @deprecated in v5.0.6\r\n\t\t\t\t\t// obj['getIndex'] = function() {\r\n\t\t\t\t\t// \treturn tri;\r\n\t\t\t\t\t// };\r\n\t\t\t\t\t// @deprecated in v5.0.6\r\n\t\t\t\t\t// obj['getDatatable'] = function() {\r\n\t\t\t\t\t// \treturn datatable;\r\n\t\t\t\t\t// };\r\n\r\n\t\t\t\t\t// @deprecated in v5.0.6\r\n\t\t\t\t\tvar rowCallback = Plugin.getOption('rows.callback');\r\n\t\t\t\t\tif (typeof rowCallback === 'function') {\r\n\t\t\t\t\t\trowCallback($(tr), obj, tri);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// before template row callback\r\n\t\t\t\t\tvar beforeTemplate = Plugin.getOption('rows.beforeTemplate');\r\n\t\t\t\t\tif (typeof beforeTemplate === 'function') {\r\n\t\t\t\t\t\tbeforeTemplate($(tr), obj, tri);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// if data object is undefined, collect from table\r\n\t\t\t\t\tif (typeof obj === 'undefined') {\r\n\t\t\t\t\t\tobj = {};\r\n\t\t\t\t\t\t$(tr).find('.' + pfx + 'datatable__cell').each(function(tdi, td) {\r\n\t\t\t\t\t\t\t// get column settings by field\r\n\t\t\t\t\t\t\tvar column = $.grep(columns, function(n, i) {\r\n\t\t\t\t\t\t\t\treturn $(td).data('field') === n.field;\r\n\t\t\t\t\t\t\t})[0];\r\n\t\t\t\t\t\t\tif (typeof column !== 'undefined') {\r\n\t\t\t\t\t\t\t\tobj[column['field']] = $(td).text();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t$(tr).find('.' + pfx + 'datatable__cell').each(function(tdi, td) {\r\n\t\t\t\t\t\t// get column settings by field\r\n\t\t\t\t\t\tvar column = $.grep(columns, function(n, i) {\r\n\t\t\t\t\t\t\treturn $(td).data('field') === n.field;\r\n\t\t\t\t\t\t})[0];\r\n\t\t\t\t\t\tif (typeof column !== 'undefined') {\r\n\t\t\t\t\t\t\t// column template\r\n\t\t\t\t\t\t\tif (typeof column.template !== 'undefined') {\r\n\t\t\t\t\t\t\t\tvar finalValue = '';\r\n\t\t\t\t\t\t\t\t// template string\r\n\t\t\t\t\t\t\t\tif (typeof column.template === 'string') {\r\n\t\t\t\t\t\t\t\t\tfinalValue = Plugin.dataPlaceholder(column.template, obj);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t// template callback function\r\n\t\t\t\t\t\t\t\tif (typeof column.template === 'function') {\r\n\t\t\t\t\t\t\t\t\tfinalValue = column.template(obj, tri, datatable);\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t// sanitize using DOMPurify if installed\r\n\t\t\t\t\t\t\t\tif (typeof DOMPurify !== 'undefined') {\r\n\t\t\t\t\t\t\t\t\tfinalValue = DOMPurify.sanitize(finalValue);\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\tvar span = document.createElement('span');\r\n\t\t\t\t\t\t\t\tspan.innerHTML = finalValue;\r\n\r\n\t\t\t\t\t\t\t\t// insert to cell, wrap with span\r\n\t\t\t\t\t\t\t\t$(td).html(span);\r\n\r\n\t\t\t\t\t\t\t\t// set span overflow\r\n\t\t\t\t\t\t\t\tif (typeof column.overflow !== 'undefined') {\r\n\t\t\t\t\t\t\t\t\t$(span).css('overflow', column.overflow);\r\n\t\t\t\t\t\t\t\t\t$(span).css('position', 'relative');\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t\t// after template row callback\r\n\t\t\t\t\tvar afterTemplate = Plugin.getOption('rows.afterTemplate');\r\n\t\t\t\t\tif (typeof afterTemplate === 'function') {\r\n\t\t\t\t\t\tafterTemplate($(tr), obj, tri);\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t},\r\n\r\n\t\t\t/**\r\n\t\t\t * Setup extra system column properties\r\n\t\t\t * Note: selector checkbox, subtable toggle\r\n\t\t\t */\r\n\t\t\tsetupSystemColumn: function() {\r\n\t\t\t\tdatatable.dataSet = datatable.dataSet || [];\r\n\t\t\t\t// no records available\r\n\t\t\t\tif (datatable.dataSet.length === 0) return;\r\n\r\n\t\t\t\tvar columns = options.columns;\r\n\t\t\t\t$(datatable.tableBody).find('.' + pfx + 'datatable__row').each(function(tri, tr) {\r\n\t\t\t\t\t$(tr).find('.' + pfx + 'datatable__cell').each(function(tdi, td) {\r\n\t\t\t\t\t\t// get column settings by field\r\n\t\t\t\t\t\tvar column = $.grep(columns, function(n, i) {\r\n\t\t\t\t\t\t\treturn $(td).data('field') === n.field;\r\n\t\t\t\t\t\t})[0];\r\n\t\t\t\t\t\tif (typeof column !== 'undefined') {\r\n\t\t\t\t\t\t\tvar value = $(td).text();\r\n\r\n\t\t\t\t\t\t\t// enable column selector\r\n\t\t\t\t\t\t\tif (typeof column.selector !== 'undefined' && column.selector !== false) {\r\n\t\t\t\t\t\t\t\t// check if checkbox exist\r\n\t\t\t\t\t\t\t\tif ($(td).find('.' + pfx + 'checkbox [type=\"checkbox\"]').length > 0) return;\r\n\r\n\t\t\t\t\t\t\t\t$(td).addClass(pfx + 'datatable__cell--check');\r\n\r\n\t\t\t\t\t\t\t\t// append checkbox\r\n\t\t\t\t\t\t\t\tvar chk = $('<label/>').\r\n\t\t\t\t\t\t\t\t\taddClass(pfx + 'checkbox ' + pfx + 'checkbox--single').\r\n\t\t\t\t\t\t\t\t\tappend($('<input/>').attr('type', 'checkbox').attr('value', value).on('click', function() {\r\n\t\t\t\t\t\t\t\t\t\tif ($(this).is(':checked')) {\r\n\t\t\t\t\t\t\t\t\t\t\t// add checkbox active row class\r\n\t\t\t\t\t\t\t\t\t\t\tPlugin.setActive(this);\r\n\t\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\t\t// add checkbox active row class\r\n\t\t\t\t\t\t\t\t\t\t\tPlugin.setInactive(this);\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t})).\r\n\t\t\t\t\t\t\t\t\tappend('&nbsp;<span></span>');\r\n\r\n\t\t\t\t\t\t\t\t// checkbox selector has outline style\r\n\t\t\t\t\t\t\t\tif (typeof column.selector.class !== 'undefined') {\r\n\t\t\t\t\t\t\t\t\t$(chk).addClass(column.selector.class);\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t$(td).children().html(chk);\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t// enable column subtable toggle\r\n\t\t\t\t\t\t\tif (typeof column.subtable !== 'undefined' && column.subtable) {\r\n\t\t\t\t\t\t\t\t// check if subtable toggle exist\r\n\t\t\t\t\t\t\t\tif ($(td).find('.' + pfx + 'datatable__toggle-subtable').length > 0) return;\r\n\t\t\t\t\t\t\t\t// append subtable toggle\r\n\t\t\t\t\t\t\t\t$(td).\r\n\t\t\t\t\t\t\t\t\tchildren().\r\n\t\t\t\t\t\t\t\t\thtml($('<a/>').\r\n\t\t\t\t\t\t\t\t\t\taddClass(pfx + 'datatable__toggle-subtable').\r\n\t\t\t\t\t\t\t\t\t\tattr('href', '#').\r\n\t\t\t\t\t\t\t\t\t\tattr('data-value', value).\r\n\t\t\t\t\t\t\t\t\t\tappend($('<i/>').addClass(Plugin.getOption('layout.icons.rowDetail.collapse'))));\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t});\r\n\r\n\t\t\t\t// init checkbox for header/footer\r\n\t\t\t\tvar initCheckbox = function(tr) {\r\n\t\t\t\t\t// get column settings by field\r\n\t\t\t\t\tvar column = $.grep(columns, function(n, i) {\r\n\t\t\t\t\t\treturn typeof n.selector !== 'undefined' && n.selector !== false;\r\n\t\t\t\t\t})[0];\r\n\r\n\t\t\t\t\tif (typeof column !== 'undefined') {\r\n\t\t\t\t\t\t// enable column selector\r\n\t\t\t\t\t\tif (typeof column.selector !== 'undefined' && column.selector !== false) {\r\n\t\t\t\t\t\t\tvar td = $(tr).find('[data-field=\"' + column.field + '\"]');\r\n\t\t\t\t\t\t\t// check if checkbox exist\r\n\t\t\t\t\t\t\tif ($(td).find('.' + pfx + 'checkbox [type=\"checkbox\"]').length > 0) return;\r\n\r\n\t\t\t\t\t\t\t$(td).addClass(pfx + 'datatable__cell--check');\r\n\r\n\t\t\t\t\t\t\t// append checkbox\r\n\t\t\t\t\t\t\tvar chk = $('<label/>').\r\n\t\t\t\t\t\t\t\taddClass(pfx + 'checkbox ' + pfx + 'checkbox--single ' + pfx + 'checkbox--all').\r\n\t\t\t\t\t\t\t\tappend($('<input/>').attr('type', 'checkbox').on('click', function() {\r\n\t\t\t\t\t\t\t\t\tif ($(this).is(':checked')) {\r\n\t\t\t\t\t\t\t\t\t\tPlugin.setActiveAll(true);\r\n\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\tPlugin.setActiveAll(false);\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t})).\r\n\t\t\t\t\t\t\t\tappend('&nbsp;<span></span>');\r\n\r\n\t\t\t\t\t\t\t// checkbox selector has outline style\r\n\t\t\t\t\t\t\tif (typeof column.selector.class !== 'undefined') {\r\n\t\t\t\t\t\t\t\t$(chk).addClass(column.selector.class);\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t$(td).children().html(chk);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t};\r\n\r\n\t\t\t\tif (options.layout.header) {\r\n\t\t\t\t\tinitCheckbox($(datatable.tableHead).find('.' + pfx + 'datatable__row').first());\r\n\t\t\t\t}\r\n\t\t\t\tif (options.layout.footer) {\r\n\t\t\t\t\tinitCheckbox($(datatable.tableFoot).find('.' + pfx + 'datatable__row').first());\r\n\t\t\t\t}\r\n\t\t\t},\r\n\r\n            maxWidthList: {},\r\n\r\n\t\t\t/**\r\n\t\t\t * Adjust width to match container size\r\n\t\t\t */\r\n\t\t\tadjustCellsWidth: function() {\r\n\t\t\t\t// get table width\r\n\t\t\t\tvar containerWidth = $(datatable.tableBody).innerWidth() - Plugin.iconOffset;\r\n\r\n\t\t\t\t// get total number of columns\r\n\t\t\t\tvar columns = $(datatable.tableBody).\r\n\t\t\t\t\tfind('.' + pfx + 'datatable__row:first-child').\r\n\t\t\t\t\tfind('.' + pfx + 'datatable__cell').\r\n\t\t\t\t\t// exclude expand icon\r\n\t\t\t\t\tnot('.' + pfx + 'datatable__toggle-detail').\r\n\t\t\t\t\tnot(':hidden').length;\r\n\r\n\t\t\t\tif (columns > 0) {\r\n\t\t\t\t\t//  remove reserved sort icon width\r\n\t\t\t\t\tcontainerWidth = containerWidth - (Plugin.iconOffset * columns);\r\n\t\t\t\t\tvar minWidth = Math.floor(containerWidth / columns);\r\n\r\n\t\t\t\t\t// minimum width\r\n\t\t\t\t\tif (minWidth <= Plugin.cellOffset) {\r\n\t\t\t\t\t\tminWidth = Plugin.cellOffset;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t$(datatable.table).find('.' + pfx + 'datatable__row').\r\n\t\t\t\t\t\t\tfind('.' + pfx + 'datatable__cell').\r\n\t\t\t\t\t\t\t// exclude expand icon\r\n\t\t\t\t\t\t\tnot('.' + pfx + 'datatable__toggle-detail').\r\n\t\t\t\t\t\t\tnot(':hidden').each(function(tdi, td) {\r\n\r\n\t\t\t\t\t\tvar width = minWidth;\r\n\t\t\t\t\t\tvar dataWidth = $(td).data('width');\r\n\r\n\t\t\t\t\t\tif (typeof dataWidth !== 'undefined') {\r\n\t\t\t\t\t\t\tif (dataWidth === 'auto') {\r\n\t\t\t\t\t\t\t\tvar field = $(td).data('field');\r\n\t\t\t\t\t\t\t\tif (Plugin.maxWidthList[field]) {\r\n\t\t\t\t\t\t\t\t\twidth = Plugin.maxWidthList[field];\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\t\tvar cells = $(datatable.table).find('.' + pfx + 'datatable__cell[data-field=\"' + field + '\"]');\r\n\t\t\t\t\t\t\t\t\twidth = Plugin.maxWidthList[field] = Math.max.apply(null,\r\n\t\t\t\t\t\t\t\t\t\t\t$(cells).map(function() {\r\n\t\t\t\t\t\t\t\t\t\t\t\treturn $(this).outerWidth();\r\n\t\t\t\t\t\t\t\t\t\t\t}).get());\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\twidth = dataWidth;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t$(td).children().css('width', Math.ceil(width));\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn datatable;\r\n\t\t\t},\r\n\r\n\t\t\t/**\r\n\t\t\t * Adjust height to match container size\r\n\t\t\t */\r\n\t\t\tadjustCellsHeight: function() {\r\n\t\t\t\t$.each($(datatable.table).children(), function(part, tablePart) {\r\n\t\t\t\t\tvar totalRows = $(tablePart).find('.' + pfx + 'datatable__row').first().parent().find('.' + pfx + 'datatable__row').length;\r\n\t\t\t\t\tfor (var i = 1; i <= totalRows; i++) {\r\n\t\t\t\t\t\tvar rows = $(tablePart).find('.' + pfx + 'datatable__row:nth-child(' + i + ')');\r\n\t\t\t\t\t\tif ($(rows).length > 0) {\r\n\t\t\t\t\t\t\tvar maxHeight = Math.max.apply(null, $(rows).map(function() {\r\n\t\t\t\t\t\t\t\treturn $(this).outerHeight();\r\n\t\t\t\t\t\t\t}).get());\r\n\t\t\t\t\t\t\t$(rows).css('height', Math.ceil(maxHeight));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t},\r\n\r\n\t\t\t/**\r\n\t\t\t * Setup table DOM and classes\r\n\t\t\t */\r\n\t\t\tsetupDOM: function(table) {\r\n\t\t\t\t// set table classes\r\n\t\t\t\t$(table).find('> thead').addClass(pfx + 'datatable__head');\r\n\t\t\t\t$(table).find('> tbody').addClass(pfx + 'datatable__body');\r\n\t\t\t\t$(table).find('> tfoot').addClass(pfx + 'datatable__foot');\r\n\t\t\t\t$(table).find('tr').addClass(pfx + 'datatable__row');\r\n\t\t\t\t$(table).find('tr > th, tr > td').addClass(pfx + 'datatable__cell');\r\n\t\t\t\t$(table).find('tr > th, tr > td').each(function(i, td) {\r\n\t\t\t\t\tif ($(td).find('span').length === 0) {\r\n\t\t\t\t\t\t$(td).wrapInner($('<span/>').css('width', Plugin.cellOffset));\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t},\r\n\r\n\t\t\t/**\r\n\t\t\t * Default scrollbar\r\n\t\t\t * @returns {{tableLocked: null, init: init, onScrolling:\r\n\t\t\t *     onScrolling}}\r\n\t\t\t */\r\n\t\t\tscrollbar: function() {\r\n\t\t\t\tvar scroll = {\r\n\t\t\t\t\tscrollable: null,\r\n\t\t\t\t\ttableLocked: null,\r\n\t\t\t\t\tinitPosition: null,\r\n\t\t\t\t\tinit: function() {\r\n\t\t\t\t\t\tvar screen = util.getViewPort().width;\r\n\t\t\t\t\t\t// setup scrollable datatable\r\n\t\t\t\t\t\tif (options.layout.scroll) {\r\n\t\t\t\t\t\t\t// add scrollable datatable class\r\n\t\t\t\t\t\t\t$(datatable.wrap).addClass(pfx + 'datatable--scroll');\r\n\r\n\t\t\t\t\t\t\tvar scrollable = $(datatable.tableBody).find('.' + pfx + 'datatable__lock--scroll');\r\n\r\n\t\t\t\t\t\t\t// check if scrollable area have rows\r\n\t\t\t\t\t\t\tif ($(scrollable).find('.' + pfx + 'datatable__row').length > 0 && $(scrollable).length > 0) {\r\n\t\t\t\t\t\t\t\tscroll.scrollHead = $(datatable.tableHead).find('> .' + pfx + 'datatable__lock--scroll > .' + pfx + 'datatable__row');\r\n\t\t\t\t\t\t\t\tscroll.scrollFoot = $(datatable.tableFoot).find('> .' + pfx + 'datatable__lock--scroll > .' + pfx + 'datatable__row');\r\n\t\t\t\t\t\t\t\tscroll.tableLocked = $(datatable.tableBody).find('.' + pfx + 'datatable__lock:not(.' + pfx + 'datatable__lock--scroll)');\r\n\t\t\t\t\t\t\t\tif (Plugin.getOption('layout.customScrollbar') && util.detectIE() != 10 && screen > util.getBreakpoint('lg')) {\r\n\t\t\t\t\t\t\t\t\tscroll.initCustomScrollbar(scrollable[0]);\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\tscroll.initDefaultScrollbar(scrollable);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t} else if ($(datatable.tableBody).find('.' + pfx + 'datatable__row').length > 0) {\r\n\t\t\t\t\t\t\t\tscroll.scrollHead = $(datatable.tableHead).find('> .' + pfx + 'datatable__row');\r\n\t\t\t\t\t\t\t\tscroll.scrollFoot = $(datatable.tableFoot).find('> .' + pfx + 'datatable__row');\r\n\t\t\t\t\t\t\t\tif (Plugin.getOption('layout.customScrollbar') && util.detectIE() != 10 && screen > util.getBreakpoint('lg')) {\r\n\t\t\t\t\t\t\t\t\tscroll.initCustomScrollbar(datatable.tableBody);\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\tscroll.initDefaultScrollbar(datatable.tableBody);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t},\r\n\t\t\t\t\tinitDefaultScrollbar: function(scrollable) {\r\n\t\t\t\t\t\t// get initial scroll position\r\n\t\t\t\t\t\tscroll.initPosition = $(scrollable).scrollLeft();\r\n\t\t\t\t\t\t$(scrollable).css('overflow-y', 'auto').off().on('scroll', scroll.onScrolling);\r\n\t\t\t\t\t\t$(scrollable).css('overflow-x', 'auto');\r\n\t\t\t\t\t},\r\n\t\t\t\t\tonScrolling: function(e) {\r\n\t\t\t\t\t\tvar left = $(this).scrollLeft();\r\n\t\t\t\t\t\tvar top = $(this).scrollTop();\r\n\t\t\t\t\t\tif (util.isRTL()) {\r\n\t\t\t\t\t\t\t// deduct initial position for RTL\r\n\t\t\t\t\t\t\tleft = left - scroll.initPosition;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t$(scroll.scrollHead).css('left', -left);\r\n\t\t\t\t\t\t$(scroll.scrollFoot).css('left', -left);\r\n\t\t\t\t\t\t$(scroll.tableLocked).each(function(i, table) {\r\n\t\t\t\t\t\t\tif (Plugin.isLocked()) {\r\n\t\t\t\t\t\t\t\t// scrollbar offset\r\n\t\t\t\t\t\t\t\ttop -= 1;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t$(table).css('top', -top);\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t},\r\n\t\t\t\t\tinitCustomScrollbar: function(scrollable) {\r\n\t\t\t\t\t\tscroll.scrollable = scrollable;\r\n\t\t\t\t\t\t// create a new instance for table body with scrollbar\r\n\t\t\t\t\t\tPlugin.initScrollbar(scrollable);\r\n\t\t\t\t\t\t// get initial scroll position\r\n\t\t\t\t\t\tscroll.initPosition = $(scrollable).scrollLeft();\r\n\t\t\t\t\t\t$(scrollable).off().on('scroll', scroll.onScrolling);\r\n\t\t\t\t\t},\r\n\t\t\t\t};\r\n\t\t\t\tscroll.init();\r\n\t\t\t\treturn scroll;\r\n\t\t\t},\r\n\r\n\t\t\t/**\r\n\t\t\t * Init custom scrollbar and reset position\r\n\t\t\t * @param element\r\n\t\t\t * @param options\r\n\t\t\t */\r\n\t\t\tinitScrollbar: function(element, options) {\r\n\t\t\t\tif (!element || !element.nodeName) {\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\t$(datatable.tableBody).css('overflow', '');\r\n\t\t\t\tvar ps = $(element).data('ps');\r\n\t\t\t\tif (util.hasClass(element, 'ps') && typeof ps !== 'undefined') {\r\n\t\t\t\t\tps.update();\r\n\t\t\t\t} else {\r\n\t\t\t\t\tps = new PerfectScrollbar(element, Object.assign({}, {\r\n\t\t\t\t\t\twheelSpeed: 0.5,\r\n\t\t\t\t\t\tswipeEasing: true,\r\n\t\t\t\t\t\t// wheelPropagation: false,\r\n\t\t\t\t\t\tminScrollbarLength: 40,\r\n\t\t\t\t\t\tmaxScrollbarLength: 300,\r\n\t\t\t\t\t\tsuppressScrollX: Plugin.getOption('rows.autoHide') && !Plugin.isLocked()\r\n\t\t\t\t\t}, options));\r\n\t\t\t\t\t$(element).data('ps', ps);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// reset perfect scrollbar on resize\r\n\t\t\t\t$(window).resize(function() {\r\n\t\t\t\t\tps.update();\r\n\t\t\t\t});\r\n\t\t\t},\r\n\r\n\t\t\t/**\r\n\t\t\t * Set column title from options.columns settings\r\n\t\t\t */\r\n\t\t\tsetHeadTitle: function(tablePart) {\r\n\t\t\t\tif (typeof tablePart === 'undefined') tablePart = datatable.tableHead;\r\n\t\t\t\ttablePart = $(tablePart)[0];\r\n\t\t\t\tvar columns = options.columns;\r\n\t\t\t\tvar row = tablePart.getElementsByTagName('tr')[0];\r\n\t\t\t\tvar ths = tablePart.getElementsByTagName('td');\r\n\r\n\t\t\t\tif (typeof row === 'undefined') {\r\n\t\t\t\t\trow = document.createElement('tr');\r\n\t\t\t\t\ttablePart.appendChild(row);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$.each(columns, function(i, column) {\r\n\t\t\t\t\tvar th = ths[i];\r\n\t\t\t\t\tif (typeof th === 'undefined') {\r\n\t\t\t\t\t\tth = document.createElement('th');\r\n\t\t\t\t\t\trow.appendChild(th);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// set column title\r\n\t\t\t\t\tif (typeof column['title'] !== 'undefined') {\r\n\t\t\t\t\t\tth.innerHTML = column.title;\r\n\t\t\t\t\t\tth.setAttribute('data-field', column.field);\r\n\t\t\t\t\t\tutil.addClass(th, column.class);\r\n\t\t\t\t\t\t// set disable autoHide or force enable\r\n\t\t\t\t\t\tif (typeof column.autoHide !== 'undefined') {\r\n\t\t\t\t\t\t\tif (column.autoHide !== true) {\r\n\t\t\t\t\t\t\t\tth.setAttribute('data-autohide-disabled', column.autoHide);\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tth.setAttribute('data-autohide-enabled', column.autoHide);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t$(th).data(column);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// set header attr option\r\n\t\t\t\t\tif (typeof column.attr !== 'undefined') {\r\n\t\t\t\t\t\t$.each(column.attr, function(key, val) {\r\n\t\t\t\t\t\t\tth.setAttribute(key, val);\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// apply text align to thead/tfoot\r\n\t\t\t\t\tif (typeof column.textAlign !== 'undefined') {\r\n\t\t\t\t\t\tvar align = typeof datatable.textAlign[column.textAlign] !== 'undefined' ? datatable.textAlign[column.textAlign] : '';\r\n\t\t\t\t\t\tutil.addClass(th, align);\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t\tPlugin.setupDOM(tablePart);\r\n\t\t\t},\r\n\r\n\t\t\t/**\r\n\t\t\t * Initiate to get remote or local data via ajax\r\n\t\t\t */\r\n\t\t\tdataRender: function(action) {\r\n\t\t\t\t$(datatable.table).siblings('.' + pfx + 'datatable__pager').removeClass(pfx + 'datatable--paging-loaded');\r\n\r\n\t\t\t\tvar buildMeta = function() {\r\n\t\t\t\t\tdatatable.dataSet = datatable.dataSet || [];\r\n\t\t\t\t\tPlugin.localDataUpdate();\r\n\t\t\t\t\t// local pagination meta\r\n\t\t\t\t\tvar meta = Plugin.getDataSourceParam('pagination');\r\n\t\t\t\t\tif (meta.perpage === 0) {\r\n\t\t\t\t\t\tmeta.perpage = options.data.pageSize || 10;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tmeta.total = datatable.dataSet.length;\r\n\t\t\t\t\tvar start = Math.max(meta.perpage * (meta.page - 1), 0);\r\n\t\t\t\t\tvar end = Math.min(start + meta.perpage, meta.total);\r\n\t\t\t\t\tdatatable.dataSet = $(datatable.dataSet).slice(start, end);\r\n\t\t\t\t\treturn meta;\r\n\t\t\t\t};\r\n\r\n\t\t\t\tvar afterGetData = function(result) {\r\n\t\t\t\t\tvar localPagingCallback = function(ctx, meta) {\r\n\t\t\t\t\t\tif (!$(ctx.pager).hasClass(pfx + 'datatable--paging-loaded')) {\r\n\t\t\t\t\t\t\t$(ctx.pager).remove();\r\n\t\t\t\t\t\t\tctx.init(meta);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t$(ctx.pager).off().on(pfx + 'datatable--on-goto-page', function(e) {\r\n\t\t\t\t\t\t\t$(ctx.pager).remove();\r\n\t\t\t\t\t\t\tctx.init(meta);\r\n\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\tvar start = Math.max(meta.perpage * (meta.page - 1), 0);\r\n\t\t\t\t\t\tvar end = Math.min(start + meta.perpage, meta.total);\r\n\r\n\t\t\t\t\t\tPlugin.localDataUpdate();\r\n\t\t\t\t\t\tdatatable.dataSet = $(datatable.dataSet).slice(start, end);\r\n\r\n\t\t\t\t\t\t// insert data into table content\r\n\t\t\t\t\t\tPlugin.insertData();\r\n\t\t\t\t\t};\r\n\r\n\t\t\t\t\t$(datatable.wrap).removeClass(pfx + 'datatable--error');\r\n\t\t\t\t\t// pagination enabled\r\n\t\t\t\t\tif (options.pagination) {\r\n\t\t\t\t\t\tif (options.data.serverPaging && options.data.type !== 'local') {\r\n\t\t\t\t\t\t\t// server pagination\r\n\t\t\t\t\t\t\tvar serverMeta = Plugin.getObject('meta', result || null);\r\n\t\t\t\t\t\t\tif (serverMeta !== null) {\r\n\t\t\t\t\t\t\t\tPlugin.pagingObject = Plugin.paging(serverMeta);\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t// no meta object from server response, fallback to local pagination\r\n\t\t\t\t\t\t\t\tPlugin.pagingObject = Plugin.paging(buildMeta(), localPagingCallback);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t// local pagination can be used by remote data also\r\n\t\t\t\t\t\t\tPlugin.pagingObject = Plugin.paging(buildMeta(), localPagingCallback);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t// pagination is disabled\r\n\t\t\t\t\t\tPlugin.localDataUpdate();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// insert data into table content\r\n\t\t\t\t\tPlugin.insertData();\r\n\t\t\t\t};\r\n\r\n\t\t\t\t// get local datasource\r\n\t\t\t\tif (options.data.type === 'local'\r\n\t\t\t\t\t// for remote json datasource\r\n\t\t\t\t\t// || typeof options.data.source.read === 'undefined' && datatable.dataSet !== null\r\n\t\t\t\t\t// for remote datasource, server sorting is disabled and data already received from remote\r\n\t\t\t\t\t|| options.data.serverSorting === false && action === 'sort'\r\n\t\t\t\t\t|| options.data.serverFiltering === false && action === 'search'\r\n\t\t\t\t) {\r\n\t\t\t\t\tsetTimeout(function() {\r\n\t\t\t\t\t\tafterGetData();\r\n\t\t\t\t\t\tPlugin.setAutoColumns();\r\n\t\t\t\t\t});\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// getting data from remote only\r\n\t\t\t\tPlugin.getData().done(afterGetData);\r\n\t\t\t},\r\n\r\n\t\t\t/**\r\n\t\t\t * Process ajax data\r\n\t\t\t */\r\n\t\t\tinsertData: function() {\r\n\t\t\t\tdatatable.dataSet = datatable.dataSet || [];\r\n\t\t\t\tvar params = Plugin.getDataSourceParam();\r\n\r\n\t\t\t\t// get row attributes\r\n\t\t\t\tvar pagination = params.pagination;\r\n\t\t\t\tvar start = (Math.max(pagination.page, 1) - 1) * pagination.perpage;\r\n\t\t\t\tvar end = Math.min(pagination.page, pagination.pages) * pagination.perpage;\r\n\t\t\t\tvar rowProps = {};\r\n\t\t\t\tif (typeof options.data.attr.rowProps !== 'undefined' && options.data.attr.rowProps.length) {\r\n\t\t\t\t\trowProps = options.data.attr.rowProps.slice(start, end);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar tableBody = document.createElement('tbody');\r\n\t\t\t\ttableBody.style.visibility = 'hidden';\r\n\t\t\t\tvar colLength = options.columns.length;\r\n\r\n\t\t\t\t$.each(datatable.dataSet, function(rowIndex, row) {\r\n\t\t\t\t\tvar tr = document.createElement('tr');\r\n\t\t\t\t\ttr.setAttribute('data-row', rowIndex);\r\n\t\t\t\t\t// keep data object to row\r\n\t\t\t\t\t$(tr).data('obj', row);\r\n\r\n\t\t\t\t\tif (typeof rowProps[rowIndex] !== 'undefined') {\r\n\t\t\t\t\t\t$.each(rowProps[rowIndex], function() {\r\n\t\t\t\t\t\t\ttr.setAttribute(this.name, this.value);\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tvar cellIndex = 0;\r\n\t\t\t\t\tvar tds = [];\r\n\t\t\t\t\tfor (var a = 0; a < colLength; a += 1) {\r\n\t\t\t\t\t\tvar column = options.columns[a];\r\n\t\t\t\t\t\tvar classes = [];\r\n\t\t\t\t\t\t// add sorted class to cells\r\n\t\t\t\t\t\tif (Plugin.getObject('sort.field', params) === column.field) {\r\n\t\t\t\t\t\t\tclasses.push(pfx + 'datatable__cell--sorted');\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t// apply text align\r\n\t\t\t\t\t\tif (typeof column.textAlign !== 'undefined') {\r\n\t\t\t\t\t\t\tvar align = typeof datatable.textAlign[column.textAlign] !== 'undefined' ? datatable.textAlign[column.textAlign] : '';\r\n\t\t\t\t\t\t\tclasses.push(align);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t// var classAttr = '';\r\n\t\t\t\t\t\tif (typeof column.class !== 'undefined') {\r\n\t\t\t\t\t\t\tclasses.push(column.class);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tvar td = document.createElement('td');\r\n\t\t\t\t\t\tutil.addClass(td, classes.join(' '));\r\n\t\t\t\t\t\ttd.setAttribute('data-field', column.field);\r\n\t\t\t\t\t\t// set disable autoHide or force enable\r\n\t\t\t\t\t\tif (typeof column.autoHide !== 'undefined') {\r\n\t\t\t\t\t\t\tif (column.autoHide !== true) {\r\n\t\t\t\t\t\t\t\ttd.setAttribute('data-autohide-disabled', column.autoHide);\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\ttd.setAttribute('data-autohide-enabled', column.autoHide);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\ttd.innerHTML = Plugin.getObject(column.field, row);\r\n\t\t\t\t\t\ttr.appendChild(td);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\ttableBody.appendChild(tr);\r\n\t\t\t\t});\r\n\r\n\t\t\t\t// display no records message\r\n\t\t\t\tif (datatable.dataSet.length === 0) {\r\n\t\t\t\t\tvar errorSpan = document.createElement('span');\r\n\t\t\t\t\tutil.addClass(errorSpan, pfx + 'datatable--error');\r\n\t\t\t\t\terrorSpan.innerHTML = Plugin.getOption('translate.records.noRecords');\r\n\t\t\t\t\ttableBody.appendChild(errorSpan);\r\n\t\t\t\t\t$(datatable.wrap).addClass(pfx + 'datatable--error ' + pfx + 'datatable--loaded');\r\n\t\t\t\t\tPlugin.spinnerCallback(false);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// replace existing table body\r\n\t\t\t\t$(datatable.tableBody).replaceWith(tableBody);\r\n\t\t\t\tdatatable.tableBody = tableBody;\r\n\r\n\t\t\t\t// layout update\r\n\t\t\t\tPlugin.setupDOM(datatable.table);\r\n\t\t\t\tPlugin.setupCellField([datatable.tableBody]);\r\n\t\t\t\tPlugin.setupTemplateCell(datatable.tableBody);\r\n\t\t\t\tPlugin.layoutUpdate();\r\n\t\t\t},\r\n\r\n\t\t\tupdateTableComponents: function() {\r\n\t\t\t\tdatatable.tableHead = $(datatable.table).children('thead').get(0);\r\n\t\t\t\tdatatable.tableBody = $(datatable.table).children('tbody').get(0);\r\n\t\t\t\tdatatable.tableFoot = $(datatable.table).children('tfoot').get(0);\r\n\t\t\t},\r\n\r\n\t\t\t/**\r\n\t\t\t * Call ajax for raw JSON data\r\n\t\t\t */\r\n\t\t\tgetData: function() {\r\n\t\t\t\t// Plugin.spinnerCallback(true);\r\n\r\n\t\t\t\tvar ajaxParams = {\r\n\t\t\t\t\tdataType: 'json',\r\n\t\t\t\t\tmethod: 'POST',\r\n\t\t\t\t\tdata: {},\r\n\t\t\t\t\ttimeout: Plugin.getOption('data.source.read.timeout') || 30000,\r\n\t\t\t\t};\r\n\r\n\t\t\t\tif (options.data.type === 'local') {\r\n\t\t\t\t\tajaxParams.url = options.data.source;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (options.data.type === 'remote') {\r\n\t\t\t\t\tvar data = Plugin.getDataSourceParam();\r\n\t\t\t\t\t// remove if server params is not enabled\r\n\t\t\t\t\tif (!Plugin.getOption('data.serverPaging')) {\r\n\t\t\t\t\t\tdelete data['pagination'];\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (!Plugin.getOption('data.serverSorting')) {\r\n\t\t\t\t\t\tdelete data['sort'];\r\n\t\t\t\t\t}\r\n\t\t\t\t\tajaxParams.data = $.extend({}, ajaxParams.data, Plugin.getOption('data.source.read.params'), data);\r\n\t\t\t\t\tajaxParams = $.extend({}, ajaxParams, Plugin.getOption('data.source.read'));\r\n\r\n\t\t\t\t\tif (typeof ajaxParams.url !== 'string') ajaxParams.url = Plugin.getOption('data.source.read');\r\n\t\t\t\t\tif (typeof ajaxParams.url !== 'string') ajaxParams.url = Plugin.getOption('data.source');\r\n\t\t\t\t\t// ajaxParams.data = $.extend(ajaxParams.data, data.pagination);\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn $.ajax(ajaxParams).done(function(response, textStatus, jqXHR) {\r\n\t\t\t\t\tdatatable.lastResponse = response;\r\n\t\t\t\t\t// extendible data map callback for custom datasource\r\n\t\t\t\t\tdatatable.dataSet = datatable.originalDataSet = Plugin.dataMapCallback(response);\r\n\t\t\t\t\tPlugin.setAutoColumns();\r\n\t\t\t\t\t$(datatable).trigger(pfx + 'datatable--on-ajax-done', [datatable.dataSet]);\r\n\t\t\t\t}).fail(function(jqXHR, textStatus, errorThrown) {\r\n\t\t\t\t\t$(datatable).trigger(pfx + 'datatable--on-ajax-fail', [jqXHR]);\r\n\t\t\t\t\t$(datatable.tableBody).html($('<span/>').addClass(pfx + 'datatable--error').html(Plugin.getOption('translate.records.noRecords')));\r\n\t\t\t\t\t$(datatable.wrap).addClass(pfx + 'datatable--error ' + pfx + 'datatable--loaded');\r\n\t\t\t\t\tPlugin.spinnerCallback(false);\r\n\t\t\t\t}).always(function() {\r\n\t\t\t\t});\r\n\t\t\t},\r\n\r\n\t\t\t/**\r\n\t\t\t * Pagination object\r\n\t\t\t * @param meta if null, local pagination, otherwise remote\r\n\t\t\t *     pagination\r\n\t\t\t * @param callback for update data when navigating page\r\n\t\t\t */\r\n\t\t\tpaging: function(meta, callback) {\r\n\t\t\t\tvar pg = {\r\n\t\t\t\t\tmeta: null,\r\n\t\t\t\t\tpager: null,\r\n\t\t\t\t\tpaginateEvent: null,\r\n\t\t\t\t\tpagerLayout: {pagination: null, info: null},\r\n\t\t\t\t\tcallback: null,\r\n\t\t\t\t\tinit: function(meta) {\r\n\t\t\t\t\t\tpg.meta = meta;\r\n\r\n\t\t\t\t\t\t// parse pagination meta to integer\r\n\t\t\t\t\t\tpg.meta.page = parseInt(pg.meta.page);\r\n\t\t\t\t\t\tpg.meta.pages = parseInt(pg.meta.pages);\r\n\t\t\t\t\t\tpg.meta.perpage = parseInt(pg.meta.perpage);\r\n\t\t\t\t\t\tpg.meta.total = parseInt(pg.meta.total);\r\n\r\n\t\t\t\t\t\t// always recount total pages\r\n\t\t\t\t\t\tpg.meta.pages = Math.max(Math.ceil(pg.meta.total / pg.meta.perpage), 1);\r\n\r\n\t\t\t\t\t\t// current page must be not over than total pages\r\n\t\t\t\t\t\tif (pg.meta.page > pg.meta.pages) pg.meta.page = pg.meta.pages;\r\n\r\n\t\t\t\t\t\t// set unique event name between tables\r\n\t\t\t\t\t\tpg.paginateEvent = Plugin.getTablePrefix('paging');\r\n\r\n\t\t\t\t\t\tpg.pager = $(datatable.table).siblings('.' + pfx + 'datatable__pager');\r\n\t\t\t\t\t\tif ($(pg.pager).hasClass(pfx + 'datatable--paging-loaded')) return;\r\n\r\n\t\t\t\t\t\t// if class .'+pfx+'datatable--paging-loaded not exist, recreate pagination\r\n\t\t\t\t\t\t$(pg.pager).remove();\r\n\r\n\t\t\t\t\t\t// if no pages available\r\n\t\t\t\t\t\tif (pg.meta.pages === 0) return;\r\n\r\n\t\t\t\t\t\t// update datasource params\r\n\t\t\t\t\t\tPlugin.setDataSourceParam('pagination', {\r\n\t\t\t\t\t\t\tpage: pg.meta.page,\r\n\t\t\t\t\t\t\tpages: pg.meta.pages,\r\n\t\t\t\t\t\t\tperpage: pg.meta.perpage,\r\n\t\t\t\t\t\t\ttotal: pg.meta.total,\r\n\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t// default callback function, contains remote pagination handler\r\n\t\t\t\t\t\tpg.callback = pg.serverCallback;\r\n\t\t\t\t\t\t// custom callback function\r\n\t\t\t\t\t\tif (typeof callback === 'function') pg.callback = callback;\r\n\r\n\t\t\t\t\t\tpg.addPaginateEvent();\r\n\t\t\t\t\t\tpg.populate();\r\n\r\n\t\t\t\t\t\tpg.meta.page = Math.max(pg.meta.page || 1, pg.meta.page);\r\n\r\n\t\t\t\t\t\t$(datatable).trigger(pg.paginateEvent, pg.meta);\r\n\r\n\t\t\t\t\t\tpg.pagingBreakpoint.call();\r\n\t\t\t\t\t\t$(window).resize(pg.pagingBreakpoint);\r\n\t\t\t\t\t},\r\n\t\t\t\t\tserverCallback: function(ctx, meta) {\r\n\t\t\t\t\t\tPlugin.dataRender();\r\n\t\t\t\t\t},\r\n\t\t\t\t\tpopulate: function() {\r\n\t\t\t\t\t\tvar icons = Plugin.getOption('layout.icons.pagination');\r\n\t\t\t\t\t\tvar title = Plugin.getOption('translate.toolbar.pagination.items.default');\r\n\t\t\t\t\t\t// pager root element\r\n\t\t\t\t\t\tpg.pager = $('<div/>').addClass(pfx + 'datatable__pager ' + pfx + 'datatable--paging-loaded');\r\n\t\t\t\t\t\t// numbering links\r\n\t\t\t\t\t\tvar pagerNumber = $('<ul/>').addClass(pfx + 'datatable__pager-nav');\r\n\t\t\t\t\t\tpg.pagerLayout['pagination'] = pagerNumber;\r\n\r\n\t\t\t\t\t\t// pager first/previous button\r\n\t\t\t\t\t\t$('<li/>').\r\n\t\t\t\t\t\t\tappend($('<a/>').\r\n\t\t\t\t\t\t\t\tattr('title', title.first).\r\n\t\t\t\t\t\t\t\taddClass(pfx + 'datatable__pager-link ' + pfx + 'datatable__pager-link--first').\r\n\t\t\t\t\t\t\t\tappend($('<i/>').addClass(icons.first)).\r\n\t\t\t\t\t\t\t\ton('click', pg.gotoMorePage).\r\n\t\t\t\t\t\t\t\tattr('data-page', 1)).\r\n\t\t\t\t\t\t\tappendTo(pagerNumber);\r\n\t\t\t\t\t\t$('<li/>').\r\n\t\t\t\t\t\t\tappend($('<a/>').\r\n\t\t\t\t\t\t\t\tattr('title', title.prev).\r\n\t\t\t\t\t\t\t\taddClass(pfx + 'datatable__pager-link ' + pfx + 'datatable__pager-link--prev').\r\n\t\t\t\t\t\t\t\tappend($('<i/>').addClass(icons.prev)).\r\n\t\t\t\t\t\t\t\ton('click', pg.gotoMorePage)).\r\n\t\t\t\t\t\t\tappendTo(pagerNumber);\r\n\r\n\t\t\t\t\t\t// more previous pages\r\n\t\t\t\t\t\t$('<li/>').\r\n\t\t\t\t\t\t\tappend($('<a/>').\r\n\t\t\t\t\t\t\t\tattr('title', title.more).\r\n\t\t\t\t\t\t\t\taddClass(pfx + 'datatable__pager-link ' + pfx + 'datatable__pager-link--more-prev').\r\n\t\t\t\t\t\t\t\thtml($('<i/>').addClass(icons.more)).\r\n\t\t\t\t\t\t\t\ton('click', pg.gotoMorePage)).\r\n\t\t\t\t\t\t\tappendTo(pagerNumber);\r\n\r\n\t\t\t\t\t\t$('<li/>').append($('<input/>').attr('type', 'text').addClass(pfx + 'pager-input form-control').attr('title', title.input).on('keyup', function() {\r\n\t\t\t\t\t\t\t// on keyup update [data-page]\r\n\t\t\t\t\t\t\t$(this).attr('data-page', Math.abs($(this).val()));\r\n\t\t\t\t\t\t}).on('keypress', function(e) {\r\n\t\t\t\t\t\t\t// on keypressed enter button\r\n\t\t\t\t\t\t\tif (e.which === 13) pg.gotoMorePage(e);\r\n\t\t\t\t\t\t})).appendTo(pagerNumber);\r\n\r\n\t\t\t\t\t\tvar pagesNumber = Plugin.getOption('toolbar.items.pagination.pages.desktop.pagesNumber');\r\n\t\t\t\t\t\tvar end = Math.ceil(pg.meta.page / pagesNumber) * pagesNumber;\r\n\t\t\t\t\t\tvar start = end - pagesNumber;\r\n\t\t\t\t\t\tif (end > pg.meta.pages) {\r\n\t\t\t\t\t\t\tend = pg.meta.pages;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tfor (var x = start; x < end; x++) {\r\n\t\t\t\t\t\t\tvar pageNumber = x + 1;\r\n\t\t\t\t\t\t\t$('<li/>').\r\n\t\t\t\t\t\t\t\tappend($('<a/>').\r\n\t\t\t\t\t\t\t\t\taddClass(pfx + 'datatable__pager-link ' + pfx + 'datatable__pager-link-number').\r\n\t\t\t\t\t\t\t\t\ttext(pageNumber).\r\n\t\t\t\t\t\t\t\t\tattr('data-page', pageNumber).\r\n\t\t\t\t\t\t\t\t\tattr('title', pageNumber).\r\n\t\t\t\t\t\t\t\t\ton('click', pg.gotoPage)).\r\n\t\t\t\t\t\t\t\tappendTo(pagerNumber);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t// more next pages\r\n\t\t\t\t\t\t$('<li/>').\r\n\t\t\t\t\t\t\tappend($('<a/>').\r\n\t\t\t\t\t\t\t\tattr('title', title.more).\r\n\t\t\t\t\t\t\t\taddClass(pfx + 'datatable__pager-link ' + pfx + 'datatable__pager-link--more-next').\r\n\t\t\t\t\t\t\t\thtml($('<i/>').addClass(icons.more)).\r\n\t\t\t\t\t\t\t\ton('click', pg.gotoMorePage)).\r\n\t\t\t\t\t\t\tappendTo(pagerNumber);\r\n\r\n\t\t\t\t\t\t// pager next/last button\r\n\t\t\t\t\t\t$('<li/>').\r\n\t\t\t\t\t\t\tappend($('<a/>').\r\n\t\t\t\t\t\t\t\tattr('title', title.next).\r\n\t\t\t\t\t\t\t\taddClass(pfx + 'datatable__pager-link ' + pfx + 'datatable__pager-link--next').\r\n\t\t\t\t\t\t\t\tappend($('<i/>').addClass(icons.next)).\r\n\t\t\t\t\t\t\t\ton('click', pg.gotoMorePage)).\r\n\t\t\t\t\t\t\tappendTo(pagerNumber);\r\n\t\t\t\t\t\t$('<li/>').\r\n\t\t\t\t\t\t\tappend($('<a/>').\r\n\t\t\t\t\t\t\t\tattr('title', title.last).\r\n\t\t\t\t\t\t\t\taddClass(pfx + 'datatable__pager-link ' + pfx + 'datatable__pager-link--last').\r\n\t\t\t\t\t\t\t\tappend($('<i/>').addClass(icons.last)).\r\n\t\t\t\t\t\t\t\ton('click', pg.gotoMorePage).\r\n\t\t\t\t\t\t\t\tattr('data-page', pg.meta.pages)).\r\n\t\t\t\t\t\t\tappendTo(pagerNumber);\r\n\r\n\t\t\t\t\t\t// page info\r\n\t\t\t\t\t\tif (Plugin.getOption('toolbar.items.info')) {\r\n\t\t\t\t\t\t\tpg.pagerLayout['info'] = $('<div/>').addClass(pfx + 'datatable__pager-info').append($('<span/>').addClass(pfx + 'datatable__pager-detail'));\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t$.each(Plugin.getOption('toolbar.layout'), function(i, layout) {\r\n\t\t\t\t\t\t\t$(pg.pagerLayout[layout]).appendTo(pg.pager);\r\n\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t// page size select\r\n\t\t\t\t\t\tvar pageSizeSelect = $('<select/>').\r\n\t\t\t\t\t\t\taddClass('selectpicker ' + pfx + 'datatable__pager-size').\r\n\t\t\t\t\t\t\tattr('title', Plugin.getOption('translate.toolbar.pagination.items.default.select')).\r\n\t\t\t\t\t\t\tattr('data-width', '60px').\r\n\t\t\t\t\t\t\tval(pg.meta.perpage).\r\n\t\t\t\t\t\t\ton('change', pg.updatePerpage).\r\n\t\t\t\t\t\t\tprependTo(pg.pagerLayout['info']);\r\n\r\n\t\t\t\t\t\tvar pageSizes = Plugin.getOption('toolbar.items.pagination.pageSizeSelect');\r\n\t\t\t\t\t\t// default value here, to fix override option by user\r\n\t\t\t\t\t\tif (pageSizes.length == 0) pageSizes = [10, 20, 30, 50, 100];\r\n\t\t\t\t\t\t$.each(pageSizes, function(i, size) {\r\n\t\t\t\t\t\t\tvar display = size;\r\n\t\t\t\t\t\t\tif (size === -1) display = Plugin.getOption('translate.toolbar.pagination.items.default.all');\r\n\t\t\t\t\t\t\t$('<option/>').attr('value', size).html(display).appendTo(pageSizeSelect);\r\n\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t// init selectpicker to dropdown\r\n\t\t\t\t\t\t$(datatable).ready(function() {\r\n\t\t\t\t\t\t\t$('.selectpicker').\r\n\t\t\t\t\t\t\t\tselectpicker().\r\n\t\t\t\t\t\t\t\ton('hide.bs.select', function() {\r\n\t\t\t\t\t\t\t\t\t// fix dropup arrow icon on hide\r\n\t\t\t\t\t\t\t\t\t$(this).closest('.bootstrap-select').removeClass('dropup');\r\n\t\t\t\t\t\t\t\t}).\r\n\t\t\t\t\t\t\t\tsiblings('.dropdown-toggle').\r\n\t\t\t\t\t\t\t\tattr('title', Plugin.getOption('translate.toolbar.pagination.items.default.select'));\r\n\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\tpg.paste();\r\n\t\t\t\t\t},\r\n\t\t\t\t\tpaste: function() {\r\n\t\t\t\t\t\t// insert pagination based on placement position, top|bottom\r\n\t\t\t\t\t\t$.each($.unique(Plugin.getOption('toolbar.placement')),\r\n\t\t\t\t\t\t\tfunction(i, position) {\r\n\t\t\t\t\t\t\t\tif (position === 'bottom') {\r\n\t\t\t\t\t\t\t\t\t$(pg.pager).clone(true).insertAfter(datatable.table);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif (position === 'top') {\r\n\t\t\t\t\t\t\t\t\t// pager top need some extra space\r\n\t\t\t\t\t\t\t\t\t$(pg.pager).clone(true).addClass(pfx + 'datatable__pager--top').insertBefore(datatable.table);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t},\r\n\t\t\t\t\tgotoMorePage: function(e) {\r\n\t\t\t\t\t\te.preventDefault();\r\n\t\t\t\t\t\t// $(this) is a link of .'+pfx+'datatable__pager-link\r\n\r\n\t\t\t\t\t\tif ($(this).attr('disabled') === 'disabled') return false;\r\n\r\n\t\t\t\t\t\tvar page = $(this).attr('data-page');\r\n\r\n\t\t\t\t\t\t// event from text input\r\n\t\t\t\t\t\tif (typeof page === 'undefined') {\r\n\t\t\t\t\t\t\tpage = $(e.target).attr('data-page');\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tpg.openPage(parseInt(page));\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t},\r\n\t\t\t\t\tgotoPage: function(e) {\r\n\t\t\t\t\t\te.preventDefault();\r\n\t\t\t\t\t\t// prevent from click same page number\r\n\t\t\t\t\t\tif ($(this).hasClass(pfx + 'datatable__pager-link--active')) return;\r\n\r\n\t\t\t\t\t\tpg.openPage(parseInt($(this).data('page')));\r\n\t\t\t\t\t},\r\n\t\t\t\t\topenPage: function(page) {\r\n\t\t\t\t\t\t// currentPage is 1-based index\r\n\t\t\t\t\t\tpg.meta.page = parseInt(page);\r\n\r\n\t\t\t\t\t\t$(datatable).trigger(pg.paginateEvent, pg.meta);\r\n\t\t\t\t\t\tpg.callback(pg, pg.meta);\r\n\r\n\t\t\t\t\t\t// update page callback function\r\n\t\t\t\t\t\t$(pg.pager).trigger(pfx + 'datatable--on-goto-page', pg.meta);\r\n\t\t\t\t\t},\r\n\t\t\t\t\tupdatePerpage: function(e) {\r\n\t\t\t\t\t\te.preventDefault();\r\n\t\t\t\t\t\t// if (Plugin.getOption('layout.height') === null) {\r\n\t\t\t\t\t\t// fix white space, when perpage is set from many records to less records\r\n\t\t\t\t\t\t// $('html, body').animate({scrollTop: $(datatable).position().top});\r\n\t\t\t\t\t\t// }\r\n\r\n\t\t\t\t\t\tpg.pager = $(datatable.table).siblings('.' + pfx + 'datatable__pager').removeClass(pfx + 'datatable--paging-loaded');\r\n\r\n\t\t\t\t\t\t// on change select page size\r\n\t\t\t\t\t\tif (e.originalEvent) {\r\n\t\t\t\t\t\t\tpg.meta.perpage = parseInt($(this).val());\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t$(pg.pager).find('select.' + pfx + 'datatable__pager-size').val(pg.meta.perpage).attr('data-selected', pg.meta.perpage);\r\n\r\n\t\t\t\t\t\t// update datasource params\r\n\t\t\t\t\t\tPlugin.setDataSourceParam('pagination', {\r\n\t\t\t\t\t\t\tpage: pg.meta.page,\r\n\t\t\t\t\t\t\tpages: pg.meta.pages,\r\n\t\t\t\t\t\t\tperpage: pg.meta.perpage,\r\n\t\t\t\t\t\t\ttotal: pg.meta.total,\r\n\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t// update page callback function\r\n\t\t\t\t\t\t$(pg.pager).trigger(pfx + 'datatable--on-update-perpage', pg.meta);\r\n\t\t\t\t\t\t$(datatable).trigger(pg.paginateEvent, pg.meta);\r\n\t\t\t\t\t\tpg.callback(pg, pg.meta);\r\n\r\n\t\t\t\t\t\t// update pagination info\r\n\t\t\t\t\t\tpg.updateInfo.call();\r\n\t\t\t\t\t},\r\n\t\t\t\t\taddPaginateEvent: function(e) {\r\n\t\t\t\t\t\t// pagination event\r\n\t\t\t\t\t\t$(datatable).off(pg.paginateEvent).on(pg.paginateEvent, function(e, meta) {\r\n\t\t\t\t\t\t\tPlugin.spinnerCallback(true);\r\n\r\n\t\t\t\t\t\t\tpg.pager = $(datatable.table).siblings('.' + pfx + 'datatable__pager');\r\n\t\t\t\t\t\t\tvar pagerNumber = $(pg.pager).find('.' + pfx + 'datatable__pager-nav');\r\n\r\n\t\t\t\t\t\t\t// set sync active page class\r\n\t\t\t\t\t\t\t$(pagerNumber).find('.' + pfx + 'datatable__pager-link--active').removeClass(pfx + 'datatable__pager-link--active');\r\n\t\t\t\t\t\t\t$(pagerNumber).find('.' + pfx + 'datatable__pager-link-number[data-page=\"' + meta.page + '\"]').addClass(pfx + 'datatable__pager-link--active');\r\n\r\n\t\t\t\t\t\t\t// set next and previous link page number\r\n\t\t\t\t\t\t\t$(pagerNumber).find('.' + pfx + 'datatable__pager-link--prev').attr('data-page', Math.max(meta.page - 1, 1));\r\n\t\t\t\t\t\t\t$(pagerNumber).find('.' + pfx + 'datatable__pager-link--next').attr('data-page', Math.min(meta.page + 1, meta.pages));\r\n\r\n\t\t\t\t\t\t\t// current page input value sync\r\n\t\t\t\t\t\t\t$(pg.pager).each(function() {\r\n\t\t\t\t\t\t\t\t$(this).find('.' + pfx + 'pager-input[type=\"text\"]').prop('value', meta.page);\r\n\t\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t\t$(pg.pager).find('.' + pfx + 'datatable__pager-nav').show();\r\n\t\t\t\t\t\t\tif (meta.pages <= 1) {\r\n\t\t\t\t\t\t\t\t// hide pager if has 1 page\r\n\t\t\t\t\t\t\t\t$(pg.pager).find('.' + pfx + 'datatable__pager-nav').hide();\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t// update datasource params\r\n\t\t\t\t\t\t\tPlugin.setDataSourceParam('pagination', {\r\n\t\t\t\t\t\t\t\tpage: pg.meta.page,\r\n\t\t\t\t\t\t\t\tpages: pg.meta.pages,\r\n\t\t\t\t\t\t\t\tperpage: pg.meta.perpage,\r\n\t\t\t\t\t\t\t\ttotal: pg.meta.total,\r\n\t\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t\t$(pg.pager).find('select.' + pfx + 'datatable__pager-size').val(meta.perpage).attr('data-selected', meta.perpage);\r\n\r\n\t\t\t\t\t\t\t// clear active rows\r\n\t\t\t\t\t\t\t$(datatable.table).find('.' + pfx + 'checkbox > [type=\"checkbox\"]').prop('checked', false);\r\n\t\t\t\t\t\t\t$(datatable.table).find('.' + pfx + 'datatable__row--active').removeClass(pfx + 'datatable__row--active');\r\n\r\n\t\t\t\t\t\t\tpg.updateInfo.call();\r\n\t\t\t\t\t\t\tpg.pagingBreakpoint.call();\r\n\t\t\t\t\t\t\t// Plugin.resetScroll();\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t},\r\n\t\t\t\t\tupdateInfo: function() {\r\n\t\t\t\t\t\tvar start = Math.max(pg.meta.perpage * (pg.meta.page - 1) + 1, 1);\r\n\t\t\t\t\t\tvar end = Math.min(start + pg.meta.perpage - 1, pg.meta.total);\r\n\t\t\t\t\t\t// page info update\r\n\t\t\t\t\t\t$(pg.pager).find('.' + pfx + 'datatable__pager-info').find('.' + pfx + 'datatable__pager-detail').html(Plugin.dataPlaceholder(\r\n\t\t\t\t\t\t\tPlugin.getOption('translate.toolbar.pagination.items.info'), {\r\n\t\t\t\t\t\t\t\tstart: start,\r\n\t\t\t\t\t\t\t\tend: pg.meta.perpage === -1 ? pg.meta.total : end,\r\n\t\t\t\t\t\t\t\tpageSize: pg.meta.perpage === -1 ||\r\n\t\t\t\t\t\t\t\tpg.meta.perpage >= pg.meta.total\r\n\t\t\t\t\t\t\t\t\t? pg.meta.total\r\n\t\t\t\t\t\t\t\t\t: pg.meta.perpage,\r\n\t\t\t\t\t\t\t\ttotal: pg.meta.total,\r\n\t\t\t\t\t\t\t}));\r\n\t\t\t\t\t},\r\n\r\n\t\t\t\t\t/**\r\n\t\t\t\t\t * Update pagination layout breakpoint\r\n\t\t\t\t\t */\r\n\t\t\t\t\tpagingBreakpoint: function() {\r\n\t\t\t\t\t\t// keep page links reference\r\n\t\t\t\t\t\tvar pagerNumber = $(datatable.table).siblings('.' + pfx + 'datatable__pager').find('.' + pfx + 'datatable__pager-nav');\r\n\t\t\t\t\t\tif ($(pagerNumber).length === 0) return;\r\n\r\n\t\t\t\t\t\tvar currentPage = Plugin.getCurrentPage();\r\n\t\t\t\t\t\tvar pagerInput = $(pagerNumber).find('.' + pfx + 'pager-input').closest('li');\r\n\r\n\t\t\t\t\t\t// reset\r\n\t\t\t\t\t\t$(pagerNumber).find('li').show();\r\n\r\n\t\t\t\t\t\t// pagination update\r\n\t\t\t\t\t\t$.each(Plugin.getOption('toolbar.items.pagination.pages'),\r\n\t\t\t\t\t\t\tfunction(mode, option) {\r\n\t\t\t\t\t\t\t\tif (util.isInResponsiveRange(mode)) {\r\n\t\t\t\t\t\t\t\t\tswitch (mode) {\r\n\t\t\t\t\t\t\t\t\t\tcase 'desktop':\r\n\t\t\t\t\t\t\t\t\t\tcase 'tablet':\r\n\t\t\t\t\t\t\t\t\t\t\tvar end = Math.ceil(currentPage / option.pagesNumber) *\r\n\t\t\t\t\t\t\t\t\t\t\t\toption.pagesNumber;\r\n\t\t\t\t\t\t\t\t\t\t\tvar start = end - option.pagesNumber;\r\n\t\t\t\t\t\t\t\t\t\t\t$(pagerInput).hide();\r\n\t\t\t\t\t\t\t\t\t\t\tpg.meta = Plugin.getDataSourceParam('pagination');\r\n\t\t\t\t\t\t\t\t\t\t\tpg.paginationUpdate();\r\n\t\t\t\t\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\t\t\t\t\tcase 'mobile':\r\n\t\t\t\t\t\t\t\t\t\t\t$(pagerInput).show();\r\n\t\t\t\t\t\t\t\t\t\t\t$(pagerNumber).find('.' + pfx + 'datatable__pager-link--more-prev').closest('li').hide();\r\n\t\t\t\t\t\t\t\t\t\t\t$(pagerNumber).find('.' + pfx + 'datatable__pager-link--more-next').closest('li').hide();\r\n\t\t\t\t\t\t\t\t\t\t\t$(pagerNumber).find('.' + pfx + 'datatable__pager-link-number').closest('li').hide();\r\n\t\t\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t},\r\n\r\n\t\t\t\t\t/**\r\n\t\t\t\t\t * Update pagination number and button display\r\n\t\t\t\t\t */\r\n\t\t\t\t\tpaginationUpdate: function() {\r\n\t\t\t\t\t\tvar pager = $(datatable.table).siblings('.' + pfx + 'datatable__pager').find('.' + pfx + 'datatable__pager-nav'),\r\n\t\t\t\t\t\t\tpagerMorePrev = $(pager).find('.' + pfx + 'datatable__pager-link--more-prev'),\r\n\t\t\t\t\t\t\tpagerMoreNext = $(pager).find('.' + pfx + 'datatable__pager-link--more-next'),\r\n\t\t\t\t\t\t\tpagerFirst = $(pager).find('.' + pfx + 'datatable__pager-link--first'),\r\n\t\t\t\t\t\t\tpagerPrev = $(pager).find('.' + pfx + 'datatable__pager-link--prev'),\r\n\t\t\t\t\t\t\tpagerNext = $(pager).find('.' + pfx + 'datatable__pager-link--next'),\r\n\t\t\t\t\t\t\tpagerLast = $(pager).find('.' + pfx + 'datatable__pager-link--last');\r\n\r\n\t\t\t\t\t\t// get visible page\r\n\t\t\t\t\t\tvar pagerNumber = $(pager).find('.' + pfx + 'datatable__pager-link-number');\r\n\t\t\t\t\t\t// get page before of first visible\r\n\t\t\t\t\t\tvar morePrevPage = Math.max($(pagerNumber).first().data('page') - 1, 1);\r\n\t\t\t\t\t\t$(pagerMorePrev).each(function(i, prev) {\r\n\t\t\t\t\t\t\t$(prev).attr('data-page', morePrevPage);\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\t// show/hide <li>\r\n\t\t\t\t\t\tif (morePrevPage === 1) {\r\n\t\t\t\t\t\t\t$(pagerMorePrev).parent().hide();\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t$(pagerMorePrev).parent().show();\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t// get page after of last visible\r\n\t\t\t\t\t\tvar moreNextPage = Math.min($(pagerNumber).last().data('page') + 1,\r\n\t\t\t\t\t\t\tpg.meta.pages);\r\n\t\t\t\t\t\t$(pagerMoreNext).each(function(i, prev) {\r\n\t\t\t\t\t\t\t$(pagerMoreNext).attr('data-page', moreNextPage).show();\r\n\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t// show/hide <li>\r\n\t\t\t\t\t\tif (moreNextPage === pg.meta.pages\r\n\t\t\t\t\t\t\t// missing dot fix when last hidden page is one left\r\n\t\t\t\t\t\t\t&& moreNextPage === $(pagerNumber).last().data('page')) {\r\n\t\t\t\t\t\t\t$(pagerMoreNext).parent().hide();\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t$(pagerMoreNext).parent().show();\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t// begin/end of pages\r\n\t\t\t\t\t\tif (pg.meta.page === 1) {\r\n\t\t\t\t\t\t\t$(pagerFirst).attr('disabled', true).addClass(pfx + 'datatable__pager-link--disabled');\r\n\t\t\t\t\t\t\t$(pagerPrev).attr('disabled', true).addClass(pfx + 'datatable__pager-link--disabled');\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t$(pagerFirst).removeAttr('disabled').removeClass(pfx + 'datatable__pager-link--disabled');\r\n\t\t\t\t\t\t\t$(pagerPrev).removeAttr('disabled').removeClass(pfx + 'datatable__pager-link--disabled');\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (pg.meta.page === pg.meta.pages) {\r\n\t\t\t\t\t\t\t$(pagerNext).attr('disabled', true).addClass(pfx + 'datatable__pager-link--disabled');\r\n\t\t\t\t\t\t\t$(pagerLast).attr('disabled', true).addClass(pfx + 'datatable__pager-link--disabled');\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t$(pagerNext).removeAttr('disabled').removeClass(pfx + 'datatable__pager-link--disabled');\r\n\t\t\t\t\t\t\t$(pagerLast).removeAttr('disabled').removeClass(pfx + 'datatable__pager-link--disabled');\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t// display more buttons\r\n\t\t\t\t\t\tvar nav = Plugin.getOption('toolbar.items.pagination.navigation');\r\n\t\t\t\t\t\tif (!nav.first) $(pagerFirst).remove();\r\n\t\t\t\t\t\tif (!nav.prev) $(pagerPrev).remove();\r\n\t\t\t\t\t\tif (!nav.next) $(pagerNext).remove();\r\n\t\t\t\t\t\tif (!nav.last) $(pagerLast).remove();\r\n\t\t\t\t\t\tif (!nav.more) {\r\n\t\t\t\t\t\t\t$(pagerMorePrev).remove();\r\n\t\t\t\t\t\t\t$(pagerMoreNext).remove();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t},\r\n\t\t\t\t};\r\n\t\t\t\tpg.init(meta);\r\n\t\t\t\treturn pg;\r\n\t\t\t},\r\n\r\n\t\t\t/**\r\n\t\t\t * Hide/show table cell defined by\r\n\t\t\t * options[columns][i][responsive][visible/hidden]\r\n\t\t\t */\r\n\t\t\tcolumnHide: function() {\r\n\t\t\t\tvar screen = util.getViewPort().width;\r\n\t\t\t\t// foreach columns setting\r\n\t\t\t\t$.each(options.columns, function(i, column) {\r\n\t\t\t\t\tif (typeof column.responsive !== 'undefined' || typeof column.visible !== 'undefined') {\r\n\t\t\t\t\t\tvar field = column.field;\r\n\t\t\t\t\t\tvar tds = $.grep($(datatable.table).find('.' + pfx + 'datatable__cell'), function(n, i) {\r\n\t\t\t\t\t\t\treturn field === $(n).data('field');\r\n\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\tsetTimeout(function () {\r\n\t\t\t\t\t\t\t// hide by force\r\n\t\t\t\t\t\t\tif (Plugin.getObject('visible', column) === false) {\r\n\t\t\t\t\t\t\t\t$(tds).hide();\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t// show/hide by responsive breakpoint\r\n\t\t\t\t\t\t\t\tif (util.getBreakpoint(Plugin.getObject('responsive.hidden', column)) >= screen) {\r\n\t\t\t\t\t\t\t\t\t$(tds).hide();\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t$(tds).show();\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif (util.getBreakpoint(Plugin.getObject('responsive.visible', column)) <= screen) {\r\n\t\t\t\t\t\t\t\t\t$(tds).show();\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t$(tds).hide();\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t},\r\n\r\n\t\t\t/**\r\n\t\t\t * Setup sub datatable\r\n\t\t\t */\r\n\t\t\tsetupSubDatatable: function() {\r\n\t\t\t\tvar subTableCallback = Plugin.getOption('detail.content');\r\n\t\t\t\tif (typeof subTableCallback !== 'function') return;\r\n\r\n\t\t\t\t// subtable already exist\r\n\t\t\t\tif ($(datatable.table).find('.' + pfx + 'datatable__subtable').length > 0) return;\r\n\r\n\t\t\t\t$(datatable.wrap).addClass(pfx + 'datatable--subtable');\r\n\r\n\t\t\t\toptions.columns[0]['subtable'] = true;\r\n\r\n\t\t\t\t// toggle on open sub table\r\n\t\t\t\tvar toggleSubTable = function(e) {\r\n\t\t\t\t\te.preventDefault();\r\n\t\t\t\t\t// get parent row of this subtable\r\n\t\t\t\t\tvar parentRow = $(this).closest('.' + pfx + 'datatable__row');\r\n\r\n\t\t\t\t\t// get subtable row for sub table\r\n\t\t\t\t\tvar subTableRow = $(parentRow).next('.' + pfx + 'datatable__row-subtable');\r\n\t\t\t\t\tif ($(subTableRow).length === 0) {\r\n\t\t\t\t\t\t// prepare DOM for sub table, each <tr> as parent and add <tr> as child table\r\n\t\t\t\t\t\tsubTableRow = $('<tr/>').\r\n\t\t\t\t\t\t\taddClass(pfx + 'datatable__row-subtable ' + pfx + 'datatable__row-loading').\r\n\t\t\t\t\t\t\thide().\r\n\t\t\t\t\t\t\tappend($('<td/>').addClass(pfx + 'datatable__subtable').attr('colspan', Plugin.getTotalColumns()));\r\n\t\t\t\t\t\t$(parentRow).after(subTableRow);\r\n\t\t\t\t\t\t// add class to even row\r\n\t\t\t\t\t\tif ($(parentRow).hasClass(pfx + 'datatable__row--even')) {\r\n\t\t\t\t\t\t\t$(subTableRow).addClass(pfx + 'datatable__row-subtable--even');\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t$(subTableRow).toggle();\r\n\r\n\t\t\t\t\tvar subTable = $(subTableRow).find('.' + pfx + 'datatable__subtable');\r\n\r\n\t\t\t\t\t// get id from first column of parent row\r\n\t\t\t\t\tvar primaryKey = $(this).closest('[data-field]:first-child').find('.' + pfx + 'datatable__toggle-subtable').data('value');\r\n\r\n\t\t\t\t\tvar icon = $(this).find('i').removeAttr('class');\r\n\r\n\t\t\t\t\t// prevent duplicate datatable init\r\n\t\t\t\t\tif ($(parentRow).hasClass(pfx + 'datatable__row--subtable-expanded')) {\r\n\t\t\t\t\t\t$(icon).addClass(Plugin.getOption('layout.icons.rowDetail.collapse'));\r\n\t\t\t\t\t\t// remove expand class from parent row\r\n\t\t\t\t\t\t$(parentRow).removeClass(pfx + 'datatable__row--subtable-expanded');\r\n\t\t\t\t\t\t// trigger event on collapse\r\n\t\t\t\t\t\t$(datatable).trigger(pfx + 'datatable--on-collapse-subtable', [parentRow]);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t// expand and run callback function\r\n\t\t\t\t\t\t$(icon).addClass(Plugin.getOption('layout.icons.rowDetail.expand'));\r\n\t\t\t\t\t\t// add expand class to parent row\r\n\t\t\t\t\t\t$(parentRow).addClass(pfx + 'datatable__row--subtable-expanded');\r\n\t\t\t\t\t\t// trigger event on expand\r\n\t\t\t\t\t\t$(datatable).trigger(pfx + 'datatable--on-expand-subtable', [parentRow]);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// prevent duplicate datatable init\r\n\t\t\t\t\tif ($(subTable).find('.' + pfx + 'datatable').length === 0) {\r\n\t\t\t\t\t\t// get data by primary id\r\n\t\t\t\t\t\t$.map(datatable.dataSet, function(n, i) {\r\n\t\t\t\t\t\t\t// primary id must be at the first column, otherwise e.data will be undefined\r\n\t\t\t\t\t\t\tif (primaryKey === n[options.columns[0].field]) {\r\n\t\t\t\t\t\t\t\te.data = n;\r\n\t\t\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t// deprecated in v5.0.6\r\n\t\t\t\t\t\te.detailCell = subTable;\r\n\r\n\t\t\t\t\t\te.parentRow = parentRow;\r\n\t\t\t\t\t\te.subTable = subTable;\r\n\r\n\t\t\t\t\t\t// run callback with event\r\n\t\t\t\t\t\tsubTableCallback(e);\r\n\r\n\t\t\t\t\t\t$(subTable).children('.' + pfx + 'datatable').on(pfx + 'datatable--on-init', function(e) {\r\n\t\t\t\t\t\t\t$(subTableRow).removeClass(pfx + 'datatable__row-loading');\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\tif (Plugin.getOption('data.type') === 'local') {\r\n\t\t\t\t\t\t\t$(subTableRow).removeClass(pfx + 'datatable__row-loading');\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t};\r\n\r\n\t\t\t\tvar columns = options.columns;\r\n\t\t\t\t$(datatable.tableBody).find('.' + pfx + 'datatable__row').each(function(tri, tr) {\r\n\t\t\t\t\t$(tr).find('.' + pfx + 'datatable__cell').each(function(tdi, td) {\r\n\t\t\t\t\t\t// get column settings by field\r\n\t\t\t\t\t\tvar column = $.grep(columns, function(n, i) {\r\n\t\t\t\t\t\t\treturn $(td).data('field') === n.field;\r\n\t\t\t\t\t\t})[0];\r\n\t\t\t\t\t\tif (typeof column !== 'undefined') {\r\n\t\t\t\t\t\t\tvar value = $(td).text();\r\n\t\t\t\t\t\t\t// enable column subtable toggle\r\n\t\t\t\t\t\t\tif (typeof column.subtable !== 'undefined' && column.subtable) {\r\n\t\t\t\t\t\t\t\t// check if subtable toggle exist\r\n\t\t\t\t\t\t\t\tif ($(td).find('.' + pfx + 'datatable__toggle-subtable').length > 0) return;\r\n\t\t\t\t\t\t\t\t// append subtable toggle\r\n\t\t\t\t\t\t\t\t$(td).\r\n\t\t\t\t\t\t\t\t\thtml($('<a/>').\r\n\t\t\t\t\t\t\t\t\t\taddClass(pfx + 'datatable__toggle-subtable').\r\n\t\t\t\t\t\t\t\t\t\tattr('href', '#').\r\n\t\t\t\t\t\t\t\t\t\tattr('data-value', value).\r\n\t\t\t\t\t\t\t\t\t\tattr('title', Plugin.getOption('detail.title')).\r\n\t\t\t\t\t\t\t\t\t\ton('click', toggleSubTable).\r\n\t\t\t\t\t\t\t\t\t\tappend($('<i/>').css('width', $(td).data('width')).addClass(Plugin.getOption('layout.icons.rowDetail.collapse'))));\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t});\r\n\r\n\t\t\t\t// $(datatable.tableHead).find('.'+pfx+'-datatable__row').first()\r\n\t\t\t},\r\n\r\n\t\t\t/**\r\n\t\t\t * Datasource mapping callback\r\n\t\t\t */\r\n\t\t\tdataMapCallback: function(raw) {\r\n\t\t\t\t// static dataset array\r\n\t\t\t\tvar dataSet = raw;\r\n\t\t\t\t// dataset mapping callback\r\n\t\t\t\tif (typeof Plugin.getOption('data.source.read.map') === 'function') {\r\n\t\t\t\t\treturn Plugin.getOption('data.source.read.map')(raw);\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// default data mapping fallback\r\n\t\t\t\t\tif (typeof raw !== 'undefined' && typeof raw.data !== 'undefined') {\r\n\t\t\t\t\t\tdataSet = raw.data;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\treturn dataSet;\r\n\t\t\t},\r\n\r\n\t\t\tisSpinning: false,\r\n\t\t\t/**\r\n\t\t\t * BlockUI spinner callback\r\n\t\t\t * @param block\r\n\t\t\t * @param target\r\n\t\t\t */\r\n\t\t\tspinnerCallback: function(block, target) {\r\n\t\t\t\tif (typeof target === 'undefined') target = datatable;\r\n\t\t\t\t// get spinner options\r\n\t\t\t\tvar spinnerOptions = Plugin.getOption('layout.spinner');\r\n\t\t\t\t// spinner is disabled\r\n\t\t\t\tif (typeof spinnerOptions === 'undefined' || !spinnerOptions) {\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tif (block) {\r\n\t\t\t\t\tif (!Plugin.isSpinning) {\r\n\t\t\t\t\t\tif (typeof spinnerOptions.message !== 'undefined' && spinnerOptions.message === true) {\r\n\t\t\t\t\t\t\t// use default spinner message from translation\r\n\t\t\t\t\t\t\tspinnerOptions.message = Plugin.getOption('translate.records.processing');\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tPlugin.isSpinning = true;\r\n\t\t\t\t\t\tif (typeof app !== 'undefined') {\r\n\t\t\t\t\t\t\tapp.block(target, spinnerOptions);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tPlugin.isSpinning = false;\r\n\t\t\t\t\tif (typeof app !== 'undefined') {\r\n\t\t\t\t\t\tapp.unblock(target);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t},\r\n\r\n\t\t\t/**\r\n\t\t\t * Default sort callback function\r\n\t\t\t * @param data\r\n\t\t\t * @param sort\r\n\t\t\t * @param column\r\n\t\t\t * @returns {*|Array.<T>|{sort, field}|{asc, desc}}\r\n\t\t\t */\r\n\t\t\tsortCallback: function(data, sort, column) {\r\n\t\t\t\tvar type = column['type'] || 'string';\r\n\t\t\t\tvar format = column['format'] || '';\r\n\t\t\t\tvar field = column['field'];\r\n\r\n\t\t\t\treturn $(data).sort(function(a, b) {\r\n\t\t\t\t\tvar aField = a[field];\r\n\t\t\t\t\tvar bField = b[field];\r\n\r\n\t\t\t\t\tswitch (type) {\r\n\t\t\t\t\t\tcase 'date':\r\n\t\t\t\t\t\t\tif (typeof moment === 'undefined') {\r\n\t\t\t\t\t\t\t\tthrow new Error('Moment.js is required.');\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tvar diff = moment(aField, format).diff(moment(bField, format));\r\n\t\t\t\t\t\t\tif (sort === 'asc') {\r\n\t\t\t\t\t\t\t\treturn diff > 0 ? 1 : diff < 0 ? -1 : 0;\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\treturn diff < 0 ? 1 : diff > 0 ? -1 : 0;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\tcase 'number':\r\n\t\t\t\t\t\t\tif (isNaN(parseFloat(aField)) && aField != null) {\r\n\t\t\t\t\t\t\t\taField = Number(aField.replace(/[^0-9\\.-]+/g, ''));\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tif (isNaN(parseFloat(bField)) && bField != null) {\r\n\t\t\t\t\t\t\t\tbField = Number(bField.replace(/[^0-9\\.-]+/g, ''));\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\taField = parseFloat(aField);\r\n\t\t\t\t\t\t\tbField = parseFloat(bField);\r\n\t\t\t\t\t\t\tif (sort === 'asc') {\r\n\t\t\t\t\t\t\t\treturn aField > bField ? 1 : aField < bField ? -1 : 0;\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\treturn aField < bField ? 1 : aField > bField ? -1 : 0;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\tcase 'html':\r\n\t\t\t\t\t\t\treturn $(data).sort(function(a, b) {\r\n\t\t\t\t\t\t\t\t// get the text only from html\r\n\t\t\t\t\t\t\t\taField = $(a[field]).text();\r\n\t\t\t\t\t\t\t\tbField = $(b[field]).text();\r\n\t\t\t\t\t\t\t\t// sort\r\n\t\t\t\t\t\t\t\tif (sort === 'asc') {\r\n\t\t\t\t\t\t\t\t\treturn aField > bField ? 1 : aField < bField ? -1 : 0;\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\treturn aField < bField ? 1 : aField > bField ? -1 : 0;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\tcase 'string':\r\n\t\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t\tif (sort === 'asc') {\r\n\t\t\t\t\t\t\t\treturn aField > bField ? 1 : aField < bField ? -1 : 0;\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\treturn aField < bField ? 1 : aField > bField ? -1 : 0;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t},\r\n\r\n\t\t\t/**\r\n\t\t\t * Custom debug log\r\n\t\t\t * @param text\r\n\t\t\t * @param obj\r\n\t\t\t */\r\n\t\t\tlog: function(text, obj) {\r\n\t\t\t\tif (typeof obj === 'undefined') obj = '';\r\n\t\t\t\tif (datatable.debug) {\r\n\t\t\t\t\tconsole.log(text, obj);\r\n\t\t\t\t}\r\n\t\t\t},\r\n\r\n\t\t\t/**\r\n\t\t\t * Auto hide columnds overflow in row\r\n\t\t\t */\r\n\t\t\tautoHide: function() {\r\n\t\t\t\tvar hiddenExist = false;\r\n\t\t\t\t// force hide enabled\r\n\t\t\t\tvar hidDefault = $(datatable.table).find('[data-autohide-enabled]');\r\n\t\t\t\tif (hidDefault.length) {\r\n\t\t\t\t\thiddenExist = true;\r\n\t\t\t\t\thidDefault.hide();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar toggleHiddenColumns = function(e) {\r\n\t\t\t\t\te.preventDefault();\r\n\r\n\t\t\t\t\tvar row = $(this).closest('.' + pfx + 'datatable__row');\r\n\t\t\t\t\tvar detailRow = $(row).next();\r\n\r\n\t\t\t\t\tif (!$(detailRow).hasClass(pfx + 'datatable__row-detail')) {\r\n\t\t\t\t\t\t$(this).find('i').removeClass(Plugin.getOption('layout.icons.rowDetail.collapse')).addClass(Plugin.getOption('layout.icons.rowDetail.expand'));\r\n\r\n\t\t\t\t\t\tvar hiddenCells = $(row).find('.' + pfx + 'datatable__cell:hidden');\r\n\t\t\t\t\t\tvar clonedCells = hiddenCells.clone().show();\r\n\r\n\t\t\t\t\t\tdetailRow = $('<tr/>').addClass(pfx + 'datatable__row-detail').insertAfter(row);\r\n\t\t\t\t\t\tvar detailRowTd = $('<td/>').addClass(pfx + 'datatable__detail').attr('colspan', Plugin.getTotalColumns()).appendTo(detailRow);\r\n\r\n\t\t\t\t\t\tvar detailSubTable = $('<table/>');\r\n\t\t\t\t\t\t$(clonedCells).each(function() {\r\n\t\t\t\t\t\t\tvar field = $(this).data('field');\r\n\t\t\t\t\t\t\tvar column = $.grep(options.columns, function(n, i) {\r\n\t\t\t\t\t\t\t\treturn field === n.field;\r\n\t\t\t\t\t\t\t})[0];\r\n\t\t\t\t\t\t\tif (typeof column === 'undefined' || column.visible !== false) {\r\n\t\t\t\t\t\t\t\t$(detailSubTable).\r\n\t\t\t\t\t\t\t\t\t\tappend($('<tr class=\"' + pfx + 'datatable__row\"></tr>').\r\n\t\t\t\t\t\t\t\t\t\t\t\tappend($('<td class=\"' + pfx + 'datatable__cell\"></td>').append($('<span/>').append(column.title))).\r\n\t\t\t\t\t\t\t\t\t\t\t\tappend(this));\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\t$(detailRowTd).append(detailSubTable);\r\n\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$(this).find('i').removeClass(Plugin.getOption('layout.icons.rowDetail.expand')).addClass(Plugin.getOption('layout.icons.rowDetail.collapse'));\r\n\t\t\t\t\t\t$(detailRow).remove();\r\n\t\t\t\t\t}\r\n\t\t\t\t};\r\n\r\n\t\t\t\tsetTimeout(function () {\r\n\t\t\t\t\t$(datatable.table).find('.' + pfx + 'datatable__cell').show();\r\n\t\t\t\t\t$(datatable.tableBody).each(function() {\r\n\t\t\t\t\t\tvar recursive = 0;\r\n\t\t\t\t\t\twhile ($(this)[0].offsetWidth < $(this)[0].scrollWidth && recursive < options.columns.length) {\r\n\t\t\t\t\t\t\t$(datatable.table).find('.' + pfx + 'datatable__row').each(function(i) {\r\n\t\t\t\t\t\t\t\tvar cell = $(this).find('.' + pfx + 'datatable__cell:not(:hidden):not([data-autohide-disabled])').last();\r\n\t\t\t\t\t\t\t\t$(cell).hide();\r\n\t\t\t\t\t\t\t\thiddenExist = true;\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\trecursive++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t\tif (hiddenExist) {\r\n\t\t\t\t\t\t// toggle show hidden columns\r\n\t\t\t\t\t\t$(datatable.tableBody).find('.' + pfx + 'datatable__row').each(function() {\r\n\t\t\t\t\t\t\t// if no toggle yet\r\n\t\t\t\t\t\t\tif($(this).find('.' + pfx + 'datatable__toggle-detail').length === 0) {\r\n\t\t\t\t\t\t\t\t// add toggle\r\n\t\t\t\t\t\t\t\t$(this).prepend($('<td/>').\r\n\t\t\t\t\t\t\t\t\t\taddClass(pfx + 'datatable__cell ' + pfx + 'datatable__toggle-detail').\r\n\t\t\t\t\t\t\t\t\t\tappend($('<a/>').\r\n\t\t\t\t\t\t\t\t\t\t\taddClass(pfx + 'datatable__toggle-detail').\r\n\t\t\t\t\t\t\t\t\t\t\tattr('href', '').\r\n\t\t\t\t\t\t\t\t\t\t\ton('click', toggleHiddenColumns).\r\n\t\t\t\t\t\t\t\t\t\t\tappend('<i class=\"' + Plugin.getOption('layout.icons.rowDetail.collapse') + '\"></i>')));\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t// check if subtable toggle exist\r\n\t\t\t\t\t\t\tif ($(datatable.tableHead).find('.' + pfx + 'datatable__toggle-detail').length === 0) {\r\n\t\t\t\t\t\t\t\t// add empty column to the header and footer\r\n\t\t\t\t\t\t\t\t$(datatable.tableHead).\r\n\t\t\t\t\t\t\t\t\tfind('.' + pfx + 'datatable__row').\r\n\t\t\t\t\t\t\t\t\tfirst().\r\n\t\t\t\t\t\t\t\t\tprepend('<th class=\"' + pfx + 'datatable__cell ' + pfx + 'datatable__toggle-detail\"><span></span></th>');\r\n\t\t\t\t\t\t\t\t$(datatable.tableFoot).\r\n\t\t\t\t\t\t\t\t\tfind('.' + pfx + 'datatable__row').\r\n\t\t\t\t\t\t\t\t\tfirst().\r\n\t\t\t\t\t\t\t\t\tprepend('<th class=\"' + pfx + 'datatable__cell ' + pfx + 'datatable__toggle-detail\"><span></span></th>');\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t$(datatable.tableHead).find('.' + pfx + 'datatable__toggle-detail').find('span');\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t\tPlugin.adjustCellsWidth.call();\r\n\t\t\t},\r\n\r\n\t\t\t/**\r\n\t\t\t * To enable auto columns features for remote data source\r\n\t\t\t */\r\n\t\t\tsetAutoColumns: function() {\r\n\t\t\t\tif (Plugin.getOption('data.autoColumns')) {\r\n\t\t\t\t\t$.each(datatable.dataSet[0], function(k, v) {\r\n\t\t\t\t\t\tvar found = $.grep(options.columns, function(n, i) {\r\n\t\t\t\t\t\t\treturn k === n.field;\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\tif (found.length === 0) {\r\n\t\t\t\t\t\t\toptions.columns.push({field: k, title: k});\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t\t$(datatable.tableHead).find('.' + pfx + 'datatable__row').remove();\r\n\t\t\t\t\tPlugin.setHeadTitle();\r\n\t\t\t\t\tif (Plugin.getOption('layout.footer')) {\r\n\t\t\t\t\t\t$(datatable.tableFoot).find('.' + pfx + 'datatable__row').remove();\r\n\t\t\t\t\t\tPlugin.setHeadTitle(datatable.tableFoot);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t},\r\n\r\n\t\t\t/********************\r\n\t\t\t ** HELPERS\r\n\t\t\t ********************/\r\n\r\n\t\t\t/**\r\n\t\t\t * Check if table is a locked colums table\r\n\t\t\t */\r\n\t\t\tisLocked: function() {\r\n\t\t\t\tvar isLocked = Plugin.lockEnabledColumns();\r\n\t\t\t\treturn isLocked.left.length > 0 || isLocked.right.length > 0;\r\n\t\t\t},\r\n\r\n\t\t\tisSubtable: function() {\r\n\t\t\t\treturn util.hasClass(datatable.wrap[0], pfx + 'datatable--subtable') || false;\r\n\t\t\t},\r\n\r\n\t\t\t/**\r\n\t\t\t * Get total extra space of an element for width calculation,\r\n\t\t\t * including padding, margin, border\r\n\t\t\t * @param element\r\n\t\t\t * @returns {number}\r\n\t\t\t */\r\n\t\t\tgetExtraSpace: function(element) {\r\n\t\t\t\tvar padding = parseInt($(element).css('paddingRight')) +\r\n\t\t\t\t\tparseInt($(element).css('paddingLeft'));\r\n\t\t\t\tvar margin = parseInt($(element).css('marginRight')) +\r\n\t\t\t\t\tparseInt($(element).css('marginLeft'));\r\n\t\t\t\tvar border = Math.ceil(\r\n\t\t\t\t\t$(element).css('border-right-width').replace('px', ''));\r\n\t\t\t\treturn padding + margin + border;\r\n\t\t\t},\r\n\r\n\t\t\t/**\r\n\t\t\t * Insert data of array into {{ }} template placeholder\r\n\t\t\t * @param template\r\n\t\t\t * @param data\r\n\t\t\t * @returns {*}\r\n\t\t\t */\r\n\t\t\tdataPlaceholder: function(template, data) {\r\n\t\t\t\tvar result = template;\r\n\t\t\t\t$.each(data, function(key, val) {\r\n\t\t\t\t\tresult = result.replace('{{' + key + '}}', val);\r\n\t\t\t\t});\r\n\t\t\t\treturn result;\r\n\t\t\t},\r\n\r\n\t\t\t/**\r\n\t\t\t * Get table unique ID\r\n\t\t\t * Note: table unique change each time refreshed\r\n\t\t\t * @param suffix\r\n\t\t\t * @returns {*}\r\n\t\t\t */\r\n\t\t\tgetTableId: function(suffix) {\r\n\t\t\t\tif (typeof suffix === 'undefined') suffix = '';\r\n\t\t\t\tvar id = $(datatable).attr('id');\r\n\t\t\t\tif (typeof id === 'undefined') {\r\n\t\t\t\t\tid = $(datatable).attr('class').split(' ')[0];\r\n\t\t\t\t}\r\n\t\t\t\treturn id + suffix;\r\n\t\t\t},\r\n\r\n\t\t\t/**\r\n\t\t\t * Get table prefix with depth number\r\n\t\t\t */\r\n\t\t\tgetTablePrefix: function(suffix) {\r\n\t\t\t\tif (typeof suffix !== 'undefined') suffix = '-' + suffix;\r\n\t\t\t\treturn Plugin.getTableId() + '-' + Plugin.getDepth() + suffix;\r\n\t\t\t},\r\n\r\n\t\t\t/**\r\n\t\t\t * Get current table depth of sub table\r\n\t\t\t * @returns {number}\r\n\t\t\t */\r\n\t\t\tgetDepth: function() {\r\n\t\t\t\tvar depth = 0;\r\n\t\t\t\tvar table = datatable.table;\r\n\t\t\t\tdo {\r\n\t\t\t\t\ttable = $(table).parents('.' + pfx + 'datatable__table');\r\n\t\t\t\t\tdepth++;\r\n\t\t\t\t} while ($(table).length > 0);\r\n\t\t\t\treturn depth;\r\n\t\t\t},\r\n\r\n\t\t\t/**\r\n\t\t\t * Keep state item\r\n\t\t\t * @param key\r\n\t\t\t * @param value\r\n\t\t\t */\r\n\t\t\tstateKeep: function(key, value) {\r\n\t\t\t\tkey = Plugin.getTablePrefix(key);\r\n\t\t\t\tif (Plugin.getOption('data.saveState') === false) return;\r\n\t\t\t\tif (Plugin.getOption('data.saveState.webstorage') && localStorage) {\r\n\t\t\t\t\tlocalStorage.setItem(key, JSON.stringify(value));\r\n\t\t\t\t}\r\n\t\t\t\tif (Plugin.getOption('data.saveState.cookie')) {\r\n\t\t\t\t\tCookies.set(key, JSON.stringify(value));\r\n\t\t\t\t}\r\n\t\t\t},\r\n\r\n\t\t\t/**\r\n\t\t\t * Get state item\r\n\t\t\t * @param key\r\n\t\t\t * @param defValue\r\n\t\t\t */\r\n\t\t\tstateGet: function(key, defValue) {\r\n\t\t\t\tkey = Plugin.getTablePrefix(key);\r\n\t\t\t\tif (Plugin.getOption('data.saveState') === false) return;\r\n\t\t\t\tvar value = null;\r\n\t\t\t\tif (Plugin.getOption('data.saveState.webstorage') && localStorage) {\r\n\t\t\t\t\tvalue = localStorage.getItem(key);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tvalue = Cookies.get(key);\r\n\t\t\t\t}\r\n\t\t\t\tif (typeof value !== 'undefined' && value !== null) {\r\n\t\t\t\t\treturn JSON.parse(value);\r\n\t\t\t\t}\r\n\t\t\t},\r\n\r\n\t\t\t/**\r\n\t\t\t * Update data in state without clear existing\r\n\t\t\t * @param key\r\n\t\t\t * @param value\r\n\t\t\t */\r\n\t\t\tstateUpdate: function(key, value) {\r\n\t\t\t\tvar ori = Plugin.stateGet(key);\r\n\t\t\t\tif (typeof ori === 'undefined' || ori === null) ori = {};\r\n\t\t\t\tPlugin.stateKeep(key, $.extend({}, ori, value));\r\n\t\t\t},\r\n\r\n\t\t\t/**\r\n\t\t\t * Remove state item\r\n\t\t\t * @param key\r\n\t\t\t */\r\n\t\t\tstateRemove: function(key) {\r\n\t\t\t\tkey = Plugin.getTablePrefix(key);\r\n\t\t\t\tif (localStorage) {\r\n\t\t\t\t\tlocalStorage.removeItem(key);\r\n\t\t\t\t}\r\n\t\t\t\tCookies.remove(key);\r\n\t\t\t},\r\n\r\n\t\t\t/**\r\n\t\t\t * Get total columns.\r\n\t\t\t */\r\n\t\t\tgetTotalColumns: function(tablePart) {\r\n\t\t\t\tif (typeof tablePart === 'undefined') tablePart = datatable.tableBody;\r\n\t\t\t\treturn $(tablePart).find('.' + pfx + 'datatable__row').first().find('.' + pfx + 'datatable__cell').length;\r\n\t\t\t},\r\n\r\n\t\t\t/**\r\n\t\t\t * Get table row. Useful to get row when current table is in lock\r\n\t\t\t * mode. Can be used for both lock and normal table mode. By\r\n\t\t\t * default, returning result will be in a list of <td>.\r\n\t\t\t * @param tablePart\r\n\t\t\t * @param row 1-based index\r\n\t\t\t * @param tdOnly Optional. Default true\r\n\t\t\t * @returns {*}\r\n\t\t\t */\r\n\t\t\tgetOneRow: function(tablePart, row, tdOnly) {\r\n\t\t\t\tif (typeof tdOnly === 'undefined') tdOnly = true;\r\n\t\t\t\t// get list of <tr>\r\n\t\t\t\tvar result = $(tablePart).find('.' + pfx + 'datatable__row:not(.' + pfx + 'datatable__row-detail):nth-child(' + row + ')');\r\n\t\t\t\tif (tdOnly) {\r\n\t\t\t\t\t// get list of <td> or <th>\r\n\t\t\t\t\tresult = result.find('.' + pfx + 'datatable__cell');\r\n\t\t\t\t}\r\n\t\t\t\treturn result;\r\n\t\t\t},\r\n\r\n\t\t\t/**\r\n\t\t\t * Sort table row at HTML level by column index.\r\n\t\t\t * todo; Not in use.\r\n\t\t\t * @param header Header sort clicked\r\n\t\t\t * @param sort asc|desc. Optional. Default asc\r\n\t\t\t * @param int Boolean. Optional. Comparison value parse to integer.\r\n\t\t\t *     Default false\r\n\t\t\t */\r\n\t\t\tsortColumn: function(header, sort, int) {\r\n\t\t\t\tif (typeof sort === 'undefined') sort = 'asc'; // desc\r\n\t\t\t\tif (typeof int === 'undefined') int = false;\r\n\r\n\t\t\t\tvar column = $(header).index();\r\n\t\t\t\tvar rows = $(datatable.tableBody).find('.' + pfx + 'datatable__row');\r\n\t\t\t\tvar hIndex = $(header).closest('.' + pfx + 'datatable__lock').index();\r\n\t\t\t\tif (hIndex !== -1) {\r\n\t\t\t\t\trows = $(datatable.tableBody).find('.' + pfx + 'datatable__lock:nth-child(' + (hIndex + 1) + ')').find('.' + pfx + 'datatable__row');\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar container = $(rows).parent();\r\n\t\t\t\t$(rows).sort(function(a, b) {\r\n\t\t\t\t\tvar tda = $(a).find('td:nth-child(' + column + ')').text();\r\n\t\t\t\t\tvar tdb = $(b).find('td:nth-child(' + column + ')').text();\r\n\r\n\t\t\t\t\tif (int) {\r\n\t\t\t\t\t\t// useful for integer type sorting\r\n\t\t\t\t\t\ttda = parseInt(tda);\r\n\t\t\t\t\t\ttdb = parseInt(tdb);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (sort === 'asc') {\r\n\t\t\t\t\t\treturn tda > tdb ? 1 : tda < tdb ? -1 : 0;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\treturn tda < tdb ? 1 : tda > tdb ? -1 : 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t}).appendTo(container);\r\n\t\t\t},\r\n\r\n\t\t\t/**\r\n\t\t\t * Perform sort remote and local\r\n\t\t\t */\r\n\t\t\tsorting: function() {\r\n\t\t\t\tvar sortObj = {\r\n\t\t\t\t\tinit: function() {\r\n\t\t\t\t\t\tif (options.sortable) {\r\n\t\t\t\t\t\t\t$(datatable.tableHead).\r\n\t\t\t\t\t\t\t\tfind('.' + pfx + 'datatable__cell:not(.' + pfx + 'datatable__cell--check)').\r\n\t\t\t\t\t\t\t\taddClass(pfx + 'datatable__cell--sort').\r\n\t\t\t\t\t\t\t\toff('click').\r\n\t\t\t\t\t\t\t\ton('click', sortObj.sortClick);\r\n\t\t\t\t\t\t\t// first init\r\n\t\t\t\t\t\t\tsortObj.setIcon();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t},\r\n\t\t\t\t\tsetIcon: function() {\r\n\t\t\t\t\t\tvar meta = Plugin.getDataSourceParam('sort');\r\n\t\t\t\t\t\tif ($.isEmptyObject(meta)) return;\r\n\r\n\t\t\t\t\t\tvar column = Plugin.getColumnByField(meta.field);\r\n\t\t\t\t\t\t// sort is disabled for this column\r\n\t\t\t\t\t\tif (typeof column !== 'undefined' && typeof column.sortable !== 'undefined' && column.sortable === false) return;\r\n\r\n\t\t\t\t\t\t// sort icon beside column header\r\n\t\t\t\t\t\tvar td = $(datatable.tableHead).find('.' + pfx + 'datatable__cell[data-field=\"' + meta.field + '\"]').attr('data-sort', meta.sort);\r\n\t\t\t\t\t\tvar sorting = $(td).find('span');\r\n\t\t\t\t\t\tvar icon = $(sorting).find('i');\r\n\r\n\t\t\t\t\t\tvar icons = Plugin.getOption('layout.icons.sort');\r\n\t\t\t\t\t\t// update sort icon; desc & asc\r\n\t\t\t\t\t\tif ($(icon).length > 0) {\r\n\t\t\t\t\t\t\t$(icon).removeAttr('class').addClass(icons[meta.sort]);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t$(sorting).append($('<i/>').addClass(icons[meta.sort]));\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t// set sorted class to header on init\r\n\t\t\t\t\t\t$(td).addClass(pfx + 'datatable__cell--sorted');\r\n\t\t\t\t\t},\r\n\t\t\t\t\tsortClick: function(e) {\r\n\t\t\t\t\t\tvar meta = Plugin.getDataSourceParam('sort');\r\n\t\t\t\t\t\tvar field = $(this).data('field');\r\n\t\t\t\t\t\tvar column = Plugin.getColumnByField(field);\r\n\t\t\t\t\t\t// sort is disabled for this column\r\n\t\t\t\t\t\tif (typeof column.sortable !== 'undefined' && column.sortable === false) return;\r\n\r\n\t\t\t\t\t\t// set sorted class to header\r\n\t\t\t\t\t\t$(datatable.tableHead).find('th').removeClass(pfx + 'datatable__cell--sorted');\r\n\t\t\t\t\t\tutil.addClass(this, pfx + 'datatable__cell--sorted');\r\n\r\n\t\t\t\t\t\t$(datatable.tableHead).find('.' + pfx + 'datatable__cell > span > i').remove();\r\n\r\n\t\t\t\t\t\tif (options.sortable) {\r\n\t\t\t\t\t\t\tPlugin.spinnerCallback(true);\r\n\r\n\t\t\t\t\t\t\tvar sort = 'desc';\r\n\t\t\t\t\t\t\tif (Plugin.getObject('field', meta) === field) {\r\n\t\t\t\t\t\t\t\tsort = Plugin.getObject('sort', meta);\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t// toggle sort\r\n\t\t\t\t\t\t\tsort = typeof sort === 'undefined' || sort === 'desc'\r\n\t\t\t\t\t\t\t\t? 'asc'\r\n\t\t\t\t\t\t\t\t: 'desc';\r\n\r\n\t\t\t\t\t\t\t// update field and sort params\r\n\t\t\t\t\t\t\tmeta = {field: field, sort: sort};\r\n\t\t\t\t\t\t\tPlugin.setDataSourceParam('sort', meta);\r\n\r\n\t\t\t\t\t\t\tsortObj.setIcon();\r\n\r\n\t\t\t\t\t\t\tsetTimeout(function() {\r\n\t\t\t\t\t\t\t\tPlugin.dataRender('sort');\r\n\t\t\t\t\t\t\t\t$(datatable).trigger(pfx + 'datatable--on-sort', meta);\r\n\t\t\t\t\t\t\t}, 300);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t},\r\n\t\t\t\t};\r\n\t\t\t\tsortObj.init();\r\n\t\t\t},\r\n\r\n\t\t\t/**\r\n\t\t\t * Update JSON data list linked with sort, filter and pagination.\r\n\t\t\t * Call this method, before using dataSet variable.\r\n\t\t\t * @returns {*|null}\r\n\t\t\t */\r\n\t\t\tlocalDataUpdate: function() {\r\n\t\t\t\tvar params = Plugin.getDataSourceParam();\r\n\t\t\t\tif (typeof datatable.originalDataSet === 'undefined') {\r\n\t\t\t\t\tdatatable.originalDataSet = datatable.dataSet;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar field = Plugin.getObject('sort.field', params);\r\n\t\t\t\tvar sort = Plugin.getObject('sort.sort', params);\r\n\t\t\t\tvar column = Plugin.getColumnByField(field);\r\n\t\t\t\tif (typeof column !== 'undefined' && Plugin.getOption('data.serverSorting') !== true) {\r\n\t\t\t\t\tif (typeof column.sortCallback === 'function') {\r\n\t\t\t\t\t\tdatatable.dataSet = column.sortCallback(datatable.originalDataSet, sort, column);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tdatatable.dataSet = Plugin.sortCallback(datatable.originalDataSet, sort, column);\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tdatatable.dataSet = datatable.originalDataSet;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// if server filter enable, don't pass local filter\r\n\t\t\t\tif (typeof params.query === 'object' && !Plugin.getOption('data.serverFiltering')) {\r\n\t\t\t\t\tparams.query = params.query || {};\r\n\r\n\t\t\t\t\tvar nestedSearch = function(obj) {\r\n\t\t\t\t\t\tfor (var field in obj) {\r\n\t\t\t\t\t\t\tif (!obj.hasOwnProperty(field)) continue;\r\n\t\t\t\t\t\t\tif (typeof obj[field] === 'string') {\r\n\t\t\t\t\t\t\t\tif (obj[field].toLowerCase() == search || obj[field].toLowerCase().indexOf(search) !== -1) {\r\n\t\t\t\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t} else if (typeof obj[field] === 'number') {\r\n\t\t\t\t\t\t\t\tif (obj[field] === search) {\r\n\t\t\t\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t} else if (typeof obj[field] === 'object') {\r\n\t\t\t\t\t\t\t\tif (nestedSearch(obj[field])) {\r\n\t\t\t\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t};\r\n\r\n\t\t\t\t\tvar search = $(Plugin.getOption('search.input')).val();\r\n\t\t\t\t\tif (typeof search !== 'undefined' && search !== '') {\r\n\t\t\t\t\t\tsearch = search.toLowerCase();\r\n\t\t\t\t\t\tdatatable.dataSet = $.grep(datatable.dataSet, nestedSearch);\r\n\t\t\t\t\t\t// remove generalSearch as we don't need this for next columns filter\r\n\t\t\t\t\t\tdelete params.query[Plugin.getGeneralSearchKey()];\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// remove empty element from array\r\n\t\t\t\t\t$.each(params.query, function(k, v) {\r\n\t\t\t\t\t\tif (v === '') {\r\n\t\t\t\t\t\t\tdelete params.query[k];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t\t// filter array by query\r\n\t\t\t\t\tdatatable.dataSet = Plugin.filterArray(datatable.dataSet, params.query);\r\n\r\n\t\t\t\t\t// reset array index\r\n\t\t\t\t\tdatatable.dataSet = datatable.dataSet.filter(function() {\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn datatable.dataSet;\r\n\t\t\t},\r\n\r\n\t\t\t/**\r\n\t\t\t * Utility helper to filter array by object pair of {key:value}\r\n\t\t\t * @param list\r\n\t\t\t * @param args\r\n\t\t\t * @param operator\r\n\t\t\t * @returns {*}\r\n\t\t\t */\r\n\t\t\tfilterArray: function(list, args, operator) {\r\n\t\t\t\tif (typeof list !== 'object') {\r\n\t\t\t\t\treturn [];\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (typeof operator === 'undefined') operator = 'AND';\r\n\r\n\t\t\t\tif (typeof args !== 'object') {\r\n\t\t\t\t\treturn list;\r\n\t\t\t\t}\r\n\r\n\t\t\t\toperator = operator.toUpperCase();\r\n\r\n\t\t\t\tif ($.inArray(operator, ['AND', 'OR', 'NOT']) === -1) {\r\n\t\t\t\t\treturn [];\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar count = Object.keys(args).length;\r\n\t\t\t\tvar filtered = [];\r\n\r\n\t\t\t\t$.each(list, function(key, obj) {\r\n\t\t\t\t\tvar to_match = obj;\r\n\r\n\t\t\t\t\tvar matched = 0;\r\n\t\t\t\t\t$.each(args, function(m_key, m_value) {\r\n\t\t\t\t\t\tm_value = m_value instanceof Array ? m_value : [m_value];\r\n\t\t\t\t\t\tvar match_property = Plugin.getObject(m_key, to_match);\r\n\t\t\t\t\t\tif (typeof match_property !== 'undefined' && match_property) {\r\n\t\t\t\t\t\t\tvar lhs = match_property.toString().toLowerCase();\r\n\t\t\t\t\t\t\tm_value.forEach(function(item, index) {\r\n\t\t\t\t\t\t\t\tif (item.toString().toLowerCase() == lhs || lhs.indexOf(item.toString().toLowerCase()) !== -1) {\r\n\t\t\t\t\t\t\t\t\tmatched++;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t\tif (('AND' == operator && matched == count) ||\r\n\t\t\t\t\t\t('OR' == operator && matched > 0) ||\r\n\t\t\t\t\t\t('NOT' == operator && 0 == matched)) {\r\n\t\t\t\t\t\tfiltered[key] = obj;\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t\tlist = filtered;\r\n\r\n\t\t\t\treturn list;\r\n\t\t\t},\r\n\r\n\t\t\t/**\r\n\t\t\t * Reset lock column scroll to 0 when resize\r\n\t\t\t */\r\n\t\t\tresetScroll: function() {\r\n\t\t\t\tif (typeof options.detail === 'undefined' && Plugin.getDepth() === 1) {\r\n\t\t\t\t\t$(datatable.table).find('.' + pfx + 'datatable__row').css('left', 0);\r\n\t\t\t\t\t$(datatable.table).find('.' + pfx + 'datatable__lock').css('top', 0);\r\n\t\t\t\t\t$(datatable.tableBody).scrollTop(0);\r\n\t\t\t\t}\r\n\t\t\t},\r\n\r\n\t\t\t/**\r\n\t\t\t * Get column options by field\r\n\t\t\t * @param field\r\n\t\t\t * @returns {boolean}\r\n\t\t\t */\r\n\t\t\tgetColumnByField: function(field) {\r\n\t\t\t\tif (typeof field === 'undefined') return;\r\n\t\t\t\tvar result;\r\n\t\t\t\t$.each(options.columns, function(i, column) {\r\n\t\t\t\t\tif (field === column.field) {\r\n\t\t\t\t\t\tresult = column;\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t\treturn result;\r\n\t\t\t},\r\n\r\n\t\t\t/**\r\n\t\t\t * Get default sort column\r\n\t\t\t */\r\n\t\t\tgetDefaultSortColumn: function() {\r\n\t\t\t\tvar result;\r\n\t\t\t\t$.each(options.columns, function(i, column) {\r\n\t\t\t\t\tif (typeof column.sortable !== 'undefined'\r\n\t\t\t\t\t\t&& $.inArray(column.sortable, ['asc', 'desc']) !== -1) {\r\n\t\t\t\t\t\tresult = {sort: column.sortable, field: column.field};\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t\treturn result;\r\n\t\t\t},\r\n\r\n\t\t\t/**\r\n\t\t\t * Helper to get element dimensions, when the element is hidden\r\n\t\t\t * @param element\r\n\t\t\t * @param includeMargin\r\n\t\t\t * @returns {{width: number, height: number, innerWidth: number,\r\n\t\t\t *     innerHeight: number, outerWidth: number, outerHeight:\r\n\t\t\t *     number}}\r\n\t\t\t */\r\n\t\t\tgetHiddenDimensions: function(element, includeMargin) {\r\n\t\t\t\tvar props = {\r\n\t\t\t\t\t\tposition: 'absolute',\r\n\t\t\t\t\t\tvisibility: 'hidden',\r\n\t\t\t\t\t\tdisplay: 'block',\r\n\t\t\t\t\t},\r\n\t\t\t\t\tdim = {\r\n\t\t\t\t\t\twidth: 0,\r\n\t\t\t\t\t\theight: 0,\r\n\t\t\t\t\t\tinnerWidth: 0,\r\n\t\t\t\t\t\tinnerHeight: 0,\r\n\t\t\t\t\t\touterWidth: 0,\r\n\t\t\t\t\t\touterHeight: 0,\r\n\t\t\t\t\t},\r\n\t\t\t\t\thiddenParents = $(element).parents().addBack().not(':visible');\r\n\t\t\t\tincludeMargin = (typeof includeMargin === 'boolean')\r\n\t\t\t\t\t? includeMargin\r\n\t\t\t\t\t: false;\r\n\r\n\t\t\t\tvar oldProps = [];\r\n\t\t\t\thiddenParents.each(function() {\r\n\t\t\t\t\tvar old = {};\r\n\r\n\t\t\t\t\tfor (var name in props) {\r\n\t\t\t\t\t\told[name] = this.style[name];\r\n\t\t\t\t\t\tthis.style[name] = props[name];\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\toldProps.push(old);\r\n\t\t\t\t});\r\n\r\n\t\t\t\tdim.width = $(element).width();\r\n\t\t\t\tdim.outerWidth = $(element).outerWidth(includeMargin);\r\n\t\t\t\tdim.innerWidth = $(element).innerWidth();\r\n\t\t\t\tdim.height = $(element).height();\r\n\t\t\t\tdim.innerHeight = $(element).innerHeight();\r\n\t\t\t\tdim.outerHeight = $(element).outerHeight(includeMargin);\r\n\r\n\t\t\t\thiddenParents.each(function(i) {\r\n\t\t\t\t\tvar old = oldProps[i];\r\n\t\t\t\t\tfor (var name in props) {\r\n\t\t\t\t\t\tthis.style[name] = old[name];\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t\treturn dim;\r\n\t\t\t},\r\n\r\n\t\t\tgetGeneralSearchKey: function() {\r\n\t\t\t\tvar searchInput = $(Plugin.getOption('search.input'));\r\n\t\t\t\treturn $(searchInput).prop('name') || $(searchInput).prop('id');\r\n\t\t\t},\r\n\r\n\t\t\t/**\r\n\t\t\t * Get value by dot notation path string and to prevent undefined\r\n\t\t\t * errors\r\n\t\t\t * @param path String Dot notation path in string\r\n\t\t\t * @param object Object to iterate\r\n\t\t\t * @returns {*}\r\n\t\t\t */\r\n\t\t\tgetObject: function(path, object) {\r\n\t\t\t\treturn path.split('.').reduce(function(obj, i) {\r\n\t\t\t\t\treturn obj !== null && typeof obj[i] !== 'undefined' ? obj[i] : null;\r\n\t\t\t\t}, object);\r\n\t\t\t},\r\n\r\n\t\t\t/**\r\n\t\t\t * Extend object\r\n\t\t\t * @param obj\r\n\t\t\t * @param path\r\n\t\t\t * @param value\r\n\t\t\t * @returns {*}\r\n\t\t\t */\r\n\t\t\textendObj: function(obj, path, value) {\r\n\t\t\t\tvar levels = path.split('.'),\r\n\t\t\t\t\ti = 0;\r\n\r\n\t\t\t\tfunction createLevel(child) {\r\n\t\t\t\t\tvar name = levels[i++];\r\n\t\t\t\t\tif (typeof child[name] !== 'undefined' && child[name] !== null) {\r\n\t\t\t\t\t\tif (typeof child[name] !== 'object' &&\r\n\t\t\t\t\t\t\ttypeof child[name] !== 'function') {\r\n\t\t\t\t\t\t\tchild[name] = {};\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tchild[name] = {};\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (i === levels.length) {\r\n\t\t\t\t\t\tchild[name] = value;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tcreateLevel(child[name]);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tcreateLevel(obj);\r\n\t\t\t\treturn obj;\r\n\t\t\t},\r\n\r\n\t\t\trowEvenOdd: function() {\r\n\t\t\t\t// row even class\r\n\t\t\t\t$(datatable.tableBody).find('.' + pfx + 'datatable__row').removeClass(pfx + 'datatable__row--even');\r\n\t\t\t\tif ($(datatable.wrap).hasClass(pfx + 'datatable--subtable')) {\r\n\t\t\t\t\t$(datatable.tableBody).find('.' + pfx + 'datatable__row:not(.' + pfx + 'datatable__row-detail):even').addClass(pfx + 'datatable__row--even');\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$(datatable.tableBody).find('.' + pfx + 'datatable__row:nth-child(even)').addClass(pfx + 'datatable__row--even');\r\n\t\t\t\t}\r\n\t\t\t},\r\n\r\n\t\t\t/********************\r\n\t\t\t ** PUBLIC API METHODS\r\n\t\t\t ********************/\r\n\r\n\t\t\t// delay timer\r\n\t\t\ttimer: 0,\r\n\r\n\t\t\t/**\r\n\t\t\t * Redraw datatable by recalculating its DOM elements, etc.\r\n\t\t\t * @returns {jQuery}\r\n\t\t\t */\r\n\t\t\tredraw: function() {\r\n\t\t\t\tPlugin.adjustCellsWidth.call();\r\n\t\t\t\tif (Plugin.isLocked()) {\r\n\t\t\t\t\t// fix hiding cell width issue\r\n\t\t\t\t\tPlugin.scrollbar();\r\n\t\t\t\t\tPlugin.resetScroll();\r\n\t\t\t\t\tPlugin.adjustCellsHeight.call();\r\n\t\t\t\t}\r\n\t\t\t\tPlugin.adjustLockContainer.call();\r\n\t\t\t\tPlugin.initHeight.call();\r\n\t\t\t\treturn datatable;\r\n\t\t\t},\r\n\r\n\t\t\t/**\r\n\t\t\t * Shortcode to reload\r\n\t\t\t * @returns {jQuery}\r\n\t\t\t */\r\n\t\t\tload: function() {\r\n\t\t\t\tPlugin.reload();\r\n\t\t\t\treturn datatable;\r\n\t\t\t},\r\n\r\n\t\t\t/**\r\n\t\t\t * Datasource reload\r\n\t\t\t * @returns {jQuery}\r\n\t\t\t */\r\n\t\t\treload: function() {\r\n\t\t\t\tvar delay = (function() {\r\n\t\t\t\t\treturn function(callback, ms) {\r\n\t\t\t\t\t\tclearTimeout(Plugin.timer);\r\n\t\t\t\t\t\tPlugin.timer = setTimeout(callback, ms);\r\n\t\t\t\t\t};\r\n\t\t\t\t})();\r\n\t\t\t\tdelay(function() {\r\n\t\t\t\t\t// local only. remote pagination will skip this block\r\n\t\t\t\t\tif (!options.data.serverFiltering) {\r\n\t\t\t\t\t\tPlugin.localDataUpdate();\r\n\t\t\t\t\t}\r\n\t\t\t\t\tPlugin.dataRender();\r\n\t\t\t\t\t$(datatable).trigger(pfx + 'datatable--on-reloaded');\r\n\t\t\t\t}, Plugin.getOption('search.delay'));\r\n\t\t\t\treturn datatable;\r\n\t\t\t},\r\n\r\n\t\t\t/**\r\n\t\t\t * Get record by record ID\r\n\t\t\t * @param id\r\n\t\t\t * @returns {jQuery}\r\n\t\t\t */\r\n\t\t\tgetRecord: function(id) {\r\n\t\t\t\tif (typeof datatable.tableBody === 'undefined') datatable.tableBody = $(datatable.table).children('tbody');\r\n\t\t\t\t$(datatable.tableBody).find('.' + pfx + 'datatable__cell:first-child').each(function(i, cell) {\r\n\t\t\t\t\tif (id == $(cell).text()) {\r\n\t\t\t\t\t\tvar rowNumber = $(cell).closest('.' + pfx + 'datatable__row').index() + 1;\r\n\t\t\t\t\t\tdatatable.API.record = datatable.API.value = Plugin.getOneRow(datatable.tableBody, rowNumber);\r\n\t\t\t\t\t\treturn datatable;\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t\treturn datatable;\r\n\t\t\t},\r\n\r\n\t\t\t/**\r\n\t\t\t * @deprecated in v5.0.6\r\n\t\t\t * Get column of current record ID\r\n\t\t\t * @param columnName\r\n\t\t\t * @returns {jQuery}\r\n\t\t\t */\r\n\t\t\tgetColumn: function(columnName) {\r\n\t\t\t\tPlugin.setSelectedRecords();\r\n\t\t\t\tdatatable.API.value = $(datatable.API.record).find('[data-field=\"' + columnName + '\"]');\r\n\t\t\t\treturn datatable;\r\n\t\t\t},\r\n\r\n\t\t\t/**\r\n\t\t\t * Destroy datatable to original DOM state before datatable was\r\n\t\t\t * initialized\r\n\t\t\t * @returns {jQuery}\r\n\t\t\t */\r\n\t\t\tdestroy: function() {\r\n\t\t\t\t$(datatable).parent().find('.' + pfx + 'datatable__pager').remove();\r\n\t\t\t\tvar initialDatatable = $(datatable.initialDatatable).addClass(pfx + 'datatable--destroyed').show();\r\n\t\t\t\t$(datatable).replaceWith(initialDatatable);\r\n\t\t\t\tdatatable = initialDatatable;\r\n\t\t\t\t$(datatable).trigger(pfx + 'datatable--on-destroy');\r\n\t\t\t\tPlugin.isInit = false;\r\n\t\t\t\tinitialDatatable = null;\r\n\t\t\t\treturn initialDatatable;\r\n\t\t\t},\r\n\r\n\t\t\t/**\r\n\t\t\t * Sort by column field\r\n\t\t\t * @param field\r\n\t\t\t * @param sort\r\n\t\t\t */\r\n\t\t\tsort: function(field, sort) {\r\n\t\t\t\t// toggle sort\r\n\t\t\t\tsort = typeof sort === 'undefined' ? 'asc' : sort;\r\n\r\n\t\t\t\tPlugin.spinnerCallback(true);\r\n\r\n\t\t\t\t// update field and sort params\r\n\t\t\t\tvar meta = {field: field, sort: sort};\r\n\t\t\t\tPlugin.setDataSourceParam('sort', meta);\r\n\r\n\t\t\t\tsetTimeout(function() {\r\n\t\t\t\t\tPlugin.dataRender('sort');\r\n\t\t\t\t\t$(datatable).trigger(pfx + 'datatable--on-sort', meta);\r\n\t\t\t\t\t$(datatable.tableHead).find('.' + pfx + 'datatable__cell > span > i').remove();\r\n\t\t\t\t}, 300);\r\n\r\n\t\t\t\treturn datatable;\r\n\t\t\t},\r\n\r\n\t\t\t/**\r\n\t\t\t * @deprecated in v5.0.6\r\n\t\t\t * Get current selected column value\r\n\t\t\t * @returns {jQuery}\r\n\t\t\t */\r\n\t\t\tgetValue: function() {\r\n\t\t\t\treturn $(datatable.API.value).text();\r\n\t\t\t},\r\n\r\n\t\t\t/**\r\n\t\t\t * Set checkbox active\r\n\t\t\t * @param cell JQuery selector or checkbox ID\r\n\t\t\t */\r\n\t\t\tsetActive: function(cell) {\r\n\t\t\t\tif (typeof cell === 'string') {\r\n\t\t\t\t\t// set by checkbox id\r\n\t\t\t\t\tcell = $(datatable.tableBody).find('.' + pfx + 'checkbox--single > [type=\"checkbox\"][value=\"' + cell + '\"]');\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$(cell).prop('checked', true);\r\n\r\n\t\t\t\tvar ids = [];\r\n\t\t\t\t$(cell).each(function(i, td) {\r\n\t\t\t\t\t// normal table\r\n\t\t\t\t\tvar row = $(td).closest('tr').addClass(pfx + 'datatable__row--active');\r\n\t\t\t\t\tvar colIndex = $(row).index() + 1;\r\n\r\n\t\t\t\t\t// lock table\r\n\t\t\t\t\t$(row).closest('tbody').find('tr:nth-child(' + colIndex + ')').not('.' + pfx + 'datatable__row-subtable').addClass(pfx + 'datatable__row--active');\r\n\r\n\t\t\t\t\tvar id = $(td).attr('value');\r\n\t\t\t\t\tif (typeof id !== 'undefined') {\r\n\t\t\t\t\t\tids.push(id);\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t\t$(datatable).trigger(pfx + 'datatable--on-check', [ids]);\r\n\t\t\t},\r\n\r\n\t\t\t/**\r\n\t\t\t * Set checkbox inactive\r\n\t\t\t * @param cell JQuery selector or checkbox ID\r\n\t\t\t */\r\n\t\t\tsetInactive: function(cell) {\r\n\t\t\t\tif (typeof cell === 'string') {\r\n\t\t\t\t\t// set by checkbox id\r\n\t\t\t\t\tcell = $(datatable.tableBody).find('.' + pfx + 'checkbox--single > [type=\"checkbox\"][value=\"' + cell + '\"]');\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$(cell).prop('checked', false);\r\n\r\n\t\t\t\tvar ids = [];\r\n\t\t\t\t$(cell).each(function(i, td) {\r\n\t\t\t\t\t// normal table\r\n\t\t\t\t\tvar row = $(td).closest('tr').removeClass(pfx + 'datatable__row--active');\r\n\t\t\t\t\tvar colIndex = $(row).index() + 1;\r\n\r\n\t\t\t\t\t// lock table\r\n\t\t\t\t\t$(row).closest('tbody').find('tr:nth-child(' + colIndex + ')').not('.' + pfx + 'datatable__row-subtable').removeClass(pfx + 'datatable__row--active');\r\n\r\n\t\t\t\t\tvar id = $(td).attr('value');\r\n\t\t\t\t\tif (typeof id !== 'undefined') {\r\n\t\t\t\t\t\tids.push(id);\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t\t$(datatable).trigger(pfx + 'datatable--on-uncheck', [ids]);\r\n\t\t\t},\r\n\r\n\t\t\t/**\r\n\t\t\t * Set all checkboxes active or inactive\r\n\t\t\t * @param active\r\n\t\t\t */\r\n\t\t\tsetActiveAll: function(active) {\r\n\t\t\t\tvar checkboxes = $(datatable.table).\r\n\t\t\t\t\tfind('> tbody, > thead').\r\n\t\t\t\t\tfind('tr').not('.' + pfx + 'datatable__row-subtable').\r\n\t\t\t\t\tfind('.' + pfx + 'datatable__cell--check [type=\"checkbox\"]');\r\n\t\t\t\tif (active) {\r\n\t\t\t\t\tPlugin.setActive(checkboxes);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tPlugin.setInactive(checkboxes);\r\n\t\t\t\t}\r\n\t\t\t},\r\n\r\n\t\t\t/**\r\n\t\t\t * @deprecated in v5.0.6\r\n\t\t\t * Get selected rows which are active\r\n\t\t\t * @returns {jQuery}\r\n\t\t\t */\r\n\t\t\tsetSelectedRecords: function() {\r\n\t\t\t\tdatatable.API.record = $(datatable.tableBody).find('.' + pfx + 'datatable__row--active');\r\n\t\t\t\treturn datatable;\r\n\t\t\t},\r\n\r\n\t\t\t/**\r\n\t\t\t * Get selected records\r\n\t\t\t * @returns {null}\r\n\t\t\t */\r\n\t\t\tgetSelectedRecords: function() {\r\n\t\t\t\t// support old method\r\n\t\t\t\tPlugin.setSelectedRecords();\r\n\t\t\t\tdatatable.API.record = datatable.rows('.' + pfx + 'datatable__row--active').nodes();\r\n\t\t\t\treturn datatable.API.record;\r\n\t\t\t},\r\n\r\n\t\t\t/**\r\n\t\t\t * Get options by dots notation path\r\n\t\t\t * @param path String Dot notation path in string\r\n\t\t\t * @returns {*}\r\n\t\t\t */\r\n\t\t\tgetOption: function(path) {\r\n\t\t\t\treturn Plugin.getObject(path, options);\r\n\t\t\t},\r\n\r\n\t\t\t/**\r\n\t\t\t * Set global options nodes by dots notation path\r\n\t\t\t * @param path\r\n\t\t\t * @param object\r\n\t\t\t */\r\n\t\t\tsetOption: function(path, object) {\r\n\t\t\t\toptions = Plugin.extendObj(options, path, object);\r\n\t\t\t},\r\n\r\n\t\t\t/**\r\n\t\t\t * Search filter for local & remote\r\n\t\t\t * @param value\r\n\t\t\t * @param columns. Optional list of columns to be filtered.\r\n\t\t\t */\r\n\t\t\tsearch: function(value, columns) {\r\n\t\t\t\tif (typeof columns !== 'undefined') columns = $.makeArray(columns);\r\n\t\t\t\tvar delay = (function() {\r\n\t\t\t\t\treturn function(callback, ms) {\r\n\t\t\t\t\t\tclearTimeout(Plugin.timer);\r\n\t\t\t\t\t\tPlugin.timer = setTimeout(callback, ms);\r\n\t\t\t\t\t};\r\n\t\t\t\t})();\r\n\r\n\t\t\t\tdelay(function() {\r\n\t\t\t\t\t// get query parameters\r\n\t\t\t\t\tvar query = Plugin.getDataSourceQuery();\r\n\r\n\t\t\t\t\t// search not by columns\r\n\t\t\t\t\tif (typeof columns === 'undefined' && typeof value !== 'undefined') {\r\n\t\t\t\t\t\tvar key = Plugin.getGeneralSearchKey();\r\n\t\t\t\t\t\tquery[key] = value;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// search by columns, support multiple columns\r\n\t\t\t\t\tif (typeof columns === 'object') {\r\n\t\t\t\t\t\t$.each(columns, function(k, column) {\r\n\t\t\t\t\t\t\tquery[column] = value;\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\t// remove empty element from arrays\r\n\t\t\t\t\t\t$.each(query, function(k, v) {\r\n\t\t\t\t\t\t\tif (v === '' || $.isEmptyObject(v)) {\r\n\t\t\t\t\t\t\t\tdelete query[k];\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tPlugin.setDataSourceQuery(query);\r\n\r\n\t\t\t\t\t// reset pagination to 1 when doing seearching\r\n\t\t\t\t\tdatatable.setDataSourceParam('pagination', Object.assign({}, datatable.getDataSourceParam('pagination'), {page: 1}));\r\n\r\n\t\t\t\t\t// local filter only. remote pagination will skip this block\r\n\t\t\t\t\tif (!options.data.serverFiltering) {\r\n\t\t\t\t\t\tPlugin.localDataUpdate();\r\n\t\t\t\t\t}\r\n\t\t\t\t\tPlugin.dataRender('search');\r\n\t\t\t\t}, Plugin.getOption('search.delay'));\r\n\t\t\t},\r\n\r\n\t\t\t/**\r\n\t\t\t * Set datasource params extract\r\n\t\t\t * @param param\r\n\t\t\t * @param value\r\n\t\t\t */\r\n\t\t\tsetDataSourceParam: function(param, value) {\r\n\t\t\t\tdatatable.API.params = $.extend({}, {\r\n\t\t\t\t\tpagination: {page: 1, perpage: Plugin.getOption('data.pageSize')},\r\n\t\t\t\t\tsort: Plugin.getDefaultSortColumn(),\r\n\t\t\t\t\tquery: {},\r\n\t\t\t\t}, datatable.API.params, Plugin.stateGet(Plugin.stateId));\r\n\r\n\t\t\t\tdatatable.API.params = Plugin.extendObj(datatable.API.params, param, value);\r\n\r\n\t\t\t\tPlugin.stateKeep(Plugin.stateId, datatable.API.params);\r\n\t\t\t},\r\n\r\n\t\t\t/**\r\n\t\t\t * Get datasource params\r\n\t\t\t * @param param\r\n\t\t\t */\r\n\t\t\tgetDataSourceParam: function(param) {\r\n\t\t\t\tdatatable.API.params = $.extend({}, {\r\n\t\t\t\t\tpagination: {page: 1, perpage: Plugin.getOption('data.pageSize')},\r\n\t\t\t\t\tsort: Plugin.getDefaultSortColumn(),\r\n\t\t\t\t\tquery: {},\r\n\t\t\t\t}, datatable.API.params, Plugin.stateGet(Plugin.stateId));\r\n\r\n\t\t\t\tif (typeof param === 'string') {\r\n\t\t\t\t\treturn Plugin.getObject(param, datatable.API.params);\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn datatable.API.params;\r\n\t\t\t},\r\n\r\n\t\t\t/**\r\n\t\t\t * Shortcode to datatable.getDataSourceParam('query');\r\n\t\t\t * @returns {*}\r\n\t\t\t */\r\n\t\t\tgetDataSourceQuery: function() {\r\n\t\t\t\treturn Plugin.getDataSourceParam('query') || {};\r\n\t\t\t},\r\n\r\n\t\t\t/**\r\n\t\t\t * Shortcode to datatable.setDataSourceParam('query', query);\r\n\t\t\t * @param query\r\n\t\t\t */\r\n\t\t\tsetDataSourceQuery: function(query) {\r\n\t\t\t\tPlugin.setDataSourceParam('query', query);\r\n\t\t\t},\r\n\r\n\t\t\t/**\r\n\t\t\t * Get current page number\r\n\t\t\t * @returns {number}\r\n\t\t\t */\r\n\t\t\tgetCurrentPage: function() {\r\n\t\t\t\treturn $(datatable.table).\r\n\t\t\t\t\tsiblings('.' + pfx + 'datatable__pager').\r\n\t\t\t\t\tlast().\r\n\t\t\t\t\tfind('.' + pfx + 'datatable__pager-nav').\r\n\t\t\t\t\tfind('.' + pfx + 'datatable__pager-link.' + pfx + 'datatable__pager-link--active').\r\n\t\t\t\t\tdata('page') || 1;\r\n\t\t\t},\r\n\r\n\t\t\t/**\r\n\t\t\t * Get selected dropdown page size\r\n\t\t\t * @returns {*|number}\r\n\t\t\t */\r\n\t\t\tgetPageSize: function() {\r\n\t\t\t\treturn $(datatable.table).siblings('.' + pfx + 'datatable__pager').last().find('select.' + pfx + 'datatable__pager-size').val() || 10;\r\n\t\t\t},\r\n\r\n\t\t\t/**\r\n\t\t\t * Get total rows\r\n\t\t\t */\r\n\t\t\tgetTotalRows: function() {\r\n\t\t\t\treturn datatable.API.params.pagination.total;\r\n\t\t\t},\r\n\r\n\t\t\t/**\r\n\t\t\t * Get full dataset in grid\r\n\t\t\t * @returns {*|null|Array}\r\n\t\t\t */\r\n\t\t\tgetDataSet: function() {\r\n\t\t\t\treturn datatable.originalDataSet;\r\n\t\t\t},\r\n\r\n\t\t\tnodeTr: [],\r\n\t\t\tnodeTd: [],\r\n\t\t\tnodeCols: [],\r\n\t\t\trecentNode: [],\r\n\r\n\t\t\ttable: function() {\r\n\t\t\t\tif (typeof datatable.table !== 'undefined') {\r\n\t\t\t\t\treturn datatable.table;\r\n\t\t\t\t}\r\n\t\t\t},\r\n\r\n\t\t\t/**\r\n\t\t\t * Select a single row from the table\r\n\t\t\t * @param selector\r\n\t\t\t * @returns {jQuery}\r\n\t\t\t */\r\n\t\t\trow: function(selector) {\r\n\t\t\t\tPlugin.rows(selector);\r\n\t\t\t\tPlugin.nodeTr = Plugin.recentNode = $(Plugin.nodeTr).first();\r\n\t\t\t\treturn datatable;\r\n\t\t\t},\r\n\r\n\t\t\t/**\r\n\t\t\t * Select multiple rows from the table\r\n\t\t\t * @param selector\r\n\t\t\t * @returns {jQuery}\r\n\t\t\t */\r\n\t\t\trows: function(selector) {\r\n\t\t\t\tif (Plugin.isLocked()) {\r\n\t\t\t\t\tPlugin.nodeTr = Plugin.recentNode = $(datatable.tableBody).find(selector).filter('.' + pfx + 'datatable__lock--scroll > .' + pfx + 'datatable__row');\r\n\t\t\t\t} else {\r\n\t\t\t\t\tPlugin.nodeTr = Plugin.recentNode = $(datatable.tableBody).find(selector).filter('.' + pfx + 'datatable__row');\r\n\t\t\t\t}\r\n\t\t\t\treturn datatable;\r\n\t\t\t},\r\n\r\n\t\t\t/**\r\n\t\t\t * Select a single column from the table\r\n\t\t\t * @param index zero-based index\r\n\t\t\t * @returns {jQuery}\r\n\t\t\t */\r\n\t\t\tcolumn: function(index) {\r\n\t\t\t\tPlugin.nodeCols = Plugin.recentNode = $(datatable.tableBody).find('.' + pfx + 'datatable__cell:nth-child(' + (index + 1) + ')');\r\n\t\t\t\treturn datatable;\r\n\t\t\t},\r\n\r\n\t\t\t/**\r\n\t\t\t * Select multiple columns from the table\r\n\t\t\t * @param selector\r\n\t\t\t * @returns {jQuery}\r\n\t\t\t */\r\n\t\t\tcolumns: function(selector) {\r\n\t\t\t\tvar context = datatable.table;\r\n\t\t\t\tif (Plugin.nodeTr === Plugin.recentNode) {\r\n\t\t\t\t\tcontext = Plugin.nodeTr;\r\n\t\t\t\t}\r\n\t\t\t\tvar columns = $(context).find('.' + pfx + 'datatable__cell[data-field=\"' + selector + '\"]');\r\n\t\t\t\tif (columns.length > 0) {\r\n\t\t\t\t\tPlugin.nodeCols = Plugin.recentNode = columns;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tPlugin.nodeCols = Plugin.recentNode = $(context).find(selector).filter('.' + pfx + 'datatable__cell');\r\n\t\t\t\t}\r\n\t\t\t\treturn datatable;\r\n\t\t\t},\r\n\r\n\t\t\tcell: function(selector) {\r\n\t\t\t\tPlugin.cells(selector);\r\n\t\t\t\tPlugin.nodeTd = Plugin.recentNode = $(Plugin.nodeTd).first();\r\n\t\t\t\treturn datatable;\r\n\t\t\t},\r\n\r\n\t\t\tcells: function(selector) {\r\n\t\t\t\tvar cells = $(datatable.tableBody).find('.' + pfx + 'datatable__cell');\r\n\t\t\t\tif (typeof selector !== 'undefined') {\r\n\t\t\t\t\tcells = $(cells).filter(selector);\r\n\t\t\t\t}\r\n\t\t\t\tPlugin.nodeTd = Plugin.recentNode = cells;\r\n\t\t\t\treturn datatable;\r\n\t\t\t},\r\n\r\n\t\t\t/**\r\n\t\t\t * Delete the selected row from the table\r\n\t\t\t * @returns {jQuery}\r\n\t\t\t */\r\n\t\t\tremove: function() {\r\n\t\t\t\tif ($(Plugin.nodeTr.length) && Plugin.nodeTr === Plugin.recentNode) {\r\n\t\t\t\t\t$(Plugin.nodeTr).remove();\r\n\t\t\t\t}\r\n\t\t\t\tPlugin.layoutUpdate();\r\n\t\t\t\treturn datatable;\r\n\t\t\t},\r\n\r\n\t\t\t/**\r\n\t\t\t * Show or hide the columns or rows\r\n\t\t\t */\r\n\t\t\tvisible: function(bool) {\r\n\t\t\t\tif ($(Plugin.recentNode.length)) {\r\n\t\t\t\t\tvar locked = Plugin.lockEnabledColumns();\r\n\t\t\t\t\tif (Plugin.recentNode === Plugin.nodeCols) {\r\n\t\t\t\t\t\tvar index = Plugin.recentNode.index();\r\n\r\n\t\t\t\t\t\tif (Plugin.isLocked()) {\r\n\t\t\t\t\t\t\tvar scrollColumns = $(Plugin.recentNode).closest('.' + pfx + 'datatable__lock--scroll').length;\r\n\t\t\t\t\t\t\tif (scrollColumns) {\r\n\t\t\t\t\t\t\t\t// is at center of scrollable area\r\n\t\t\t\t\t\t\t\tindex += locked.left.length + 1;\r\n\t\t\t\t\t\t\t} else if ($(Plugin.recentNode).closest('.' + pfx + 'datatable__lock--right').length) {\r\n\t\t\t\t\t\t\t\t// is at the right locked table\r\n\t\t\t\t\t\t\t\tindex += locked.left.length + scrollColumns + 1;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (bool) {\r\n\t\t\t\t\t\tif (Plugin.recentNode === Plugin.nodeCols) {\r\n\t\t\t\t\t\t\tdelete options.columns[index].visible;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t$(Plugin.recentNode).show();\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tif (Plugin.recentNode === Plugin.nodeCols) {\r\n\t\t\t\t\t\t\tPlugin.setOption('columns.' + (index) + '.visible', false);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t$(Plugin.recentNode).hide();\r\n\t\t\t\t\t}\r\n\t\t\t\t\tPlugin.columnHide();\r\n\t\t\t\t\tPlugin.redraw();\r\n\t\t\t\t}\r\n\t\t\t},\r\n\r\n\t\t\t/**\r\n\t\t\t * Get the the DOM element for the selected rows or columns\r\n\t\t\t * @returns {Array}\r\n\t\t\t */\r\n\t\t\tnodes: function() {\r\n\t\t\t\treturn Plugin.recentNode;\r\n\t\t\t},\r\n\r\n\t\t\t/**\r\n\t\t\t * will be implemented soon\r\n\t\t\t * @returns {jQuery}\r\n\t\t\t */\r\n\t\t\tdataset: function() {\r\n\t\t\t\treturn datatable;\r\n\t\t\t},\r\n\r\n\t\t\t/**\r\n\t\t\t * Open page by number\r\n\t\t\t * @param page number\r\n\t\t\t */\r\n\t\t\tgotoPage: function (page) {\r\n\t\t\t\tif (typeof Plugin.pagingObject !== 'undefined') {\r\n\t\t\t\t\tPlugin.isInit = true;\r\n\t\t\t\t\tPlugin.pagingObject.openPage(page);\r\n\t\t\t\t}\r\n\t\t\t},\r\n\r\n\t\t};\r\n\r\n\t\t/**\r\n\t\t * Public API methods can be used directly by datatable\r\n\t\t */\r\n\t\t$.each(Plugin, function(funcName, func) {\r\n\t\t\tdatatable[funcName] = func;\r\n\t\t});\r\n\r\n\t\t// initialize main datatable plugin\r\n\t\tif (typeof options !== 'undefined') {\r\n\t\t\tif (typeof options === 'string') {\r\n\t\t\t\tvar method = options;\r\n\t\t\t\tdatatable = $(this).data(pluginName);\r\n\t\t\t\tif (typeof datatable !== 'undefined') {\r\n\t\t\t\t\toptions = datatable.options;\r\n\t\t\t\t\tPlugin[method].apply(this, Array.prototype.slice.call(arguments, 1));\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tif (!datatable.data(pluginName) && !$(this).hasClass(pfx + 'datatable--loaded')) {\r\n\t\t\t\t\tdatatable.dataSet = null;\r\n\t\t\t\t\tdatatable.textAlign = {\r\n\t\t\t\t\t\tleft: pfx + 'datatable__cell--left',\r\n\t\t\t\t\t\tcenter: pfx + 'datatable__cell--center',\r\n\t\t\t\t\t\tright: pfx + 'datatable__cell--right',\r\n\t\t\t\t\t};\r\n\r\n\t\t\t\t\t// merge default and user defined options\r\n\t\t\t\t\toptions = $.extend(true, {}, $.fn[pluginName].defaults, options);\r\n\r\n\t\t\t\t\tdatatable.options = options;\r\n\r\n\t\t\t\t\t// init plugin process\r\n\t\t\t\t\tPlugin.init.apply(this, [options]);\r\n\r\n\t\t\t\t\t$(datatable.wrap).data(pluginName, datatable);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t// get existing instance datatable\r\n\t\t\tdatatable = $(this).data(pluginName);\r\n\t\t\tif (typeof datatable === 'undefined') {\r\n\t\t\t\t$.error(pluginName + ' not initialized');\r\n\t\t\t}\r\n\t\t\toptions = datatable.options;\r\n\t\t}\r\n\r\n\t\treturn datatable;\r\n\t};\r\n\r\n\t// default options\r\n\t$.fn[pluginName].defaults = {\r\n\t\t// datasource definition\r\n\t\tdata: {\r\n\t\t\ttype: 'local',\r\n\t\t\tsource: null,\r\n\t\t\tpageSize: 10, // display records per page\r\n\t\t\tsaveState: {\r\n\t\t\t\t// save datatable state(pagination, filtering, sorting, etc) in cookie or browser webstorage\r\n\t\t\t\tcookie: false,\r\n\t\t\t\twebstorage: true,\r\n\t\t\t},\r\n\r\n\t\t\tserverPaging: false,\r\n\t\t\tserverFiltering: false,\r\n\t\t\tserverSorting: false,\r\n\r\n\t\t\tautoColumns: false,\r\n\t\t\tattr: {\r\n\t\t\t\trowProps: [],\r\n\t\t\t},\r\n\t\t},\r\n\r\n\t\t// layout definition\r\n\t\tlayout: {\r\n\t\t\ttheme: 'default', // datatable will support multiple themes and designs\r\n\t\t\tclass: pfx + 'datatable--brand', // custom wrapper class\r\n\t\t\tscroll: false, // enable/disable datatable scroll both horizontal and vertical when needed.\r\n\t\t\theight: null, // datatable's body's fixed height\r\n\t\t\tminHeight: null,\r\n\t\t\tfooter: false, // display/hide footer\r\n\t\t\theader: true, // display/hide header\r\n\t\t\tcustomScrollbar: true, // set false to disable custom scrollbar\r\n\r\n\t\t\t// datatable spinner\r\n\t\t\tspinner: {\r\n\t\t\t\toverlayColor: '#000000',\r\n\t\t\t\topacity: 0,\r\n\t\t\t\ttype: 'loader',\r\n\t\t\t\tstate: 'brand',\r\n\t\t\t\tmessage: true,\r\n\t\t\t},\r\n\r\n\t\t\t// datatable UI icons\r\n\t\t\ticons: {\r\n\t\t\t\tsort: {asc: 'flaticon2-arrow-up', desc: 'flaticon2-arrow-down'},\r\n\t\t\t\tpagination: {\r\n\t\t\t\t\tnext: 'flaticon2-next',\r\n\t\t\t\t\tprev: 'flaticon2-back',\r\n\t\t\t\t\tfirst: 'flaticon2-fast-back',\r\n\t\t\t\t\tlast: 'flaticon2-fast-next',\r\n\t\t\t\t\tmore: 'flaticon-more-1',\r\n\t\t\t\t},\r\n\t\t\t\trowDetail: {expand: 'fa fa-caret-down', collapse: 'fa fa-caret-right'},\r\n\t\t\t},\r\n\t\t},\r\n\r\n\t\t// column sorting\r\n\t\tsortable: true,\r\n\r\n\t\t// resize column size with mouse drag coming soon)\r\n\t\tresizable: false,\r\n\r\n\t\t// column based filtering (coming soon)\r\n\t\tfilterable: false,\r\n\r\n\t\tpagination: true,\r\n\r\n\t\t// inline and bactch editing (cooming soon)\r\n\t\teditable: false,\r\n\r\n\t\t// columns definition\r\n\t\tcolumns: [],\r\n\r\n\t\tsearch: {\r\n\t\t\t// enable trigger search by keyup enter\r\n\t\t\tonEnter: false,\r\n\t\t\t// input text for search\r\n\t\t\tinput: null,\r\n\t\t\t// search delay in milliseconds\r\n\t\t\tdelay: 400,\r\n\t\t},\r\n\r\n\t\trows: {\r\n\t\t\t// deprecated\r\n\t\t\tcallback: function() {\r\n\t\t\t},\r\n\t\t\t// call before row template\r\n\t\t\tbeforeTemplate: function() {\r\n\t\t\t},\r\n\t\t\t// call after row template\r\n\t\t\tafterTemplate: function() {\r\n\t\t\t},\r\n\t\t\tautoHide: true,\r\n\t\t},\r\n\r\n\t\t// toolbar\r\n\t\ttoolbar: {\r\n\t\t\t// place pagination and displayInfo blocks according to the array order\r\n\t\t\tlayout: ['pagination', 'info'],\r\n\r\n\t\t\t// toolbar placement can be at top or bottom or both top and bottom repeated\r\n\t\t\tplacement: ['bottom'],  //'top', 'bottom'\r\n\r\n\t\t\t// toolbar items\r\n\t\t\titems: {\r\n\t\t\t\t// pagination\r\n\t\t\t\tpagination: {\r\n\t\t\t\t\t// pagination type(default or scroll)\r\n\t\t\t\t\ttype: 'default',\r\n\r\n\t\t\t\t\t// number of pages to display by breakpoints\r\n\t\t\t\t\tpages: {\r\n\t\t\t\t\t\tdesktop: {\r\n\t\t\t\t\t\t\tlayout: 'default',\r\n\t\t\t\t\t\t\tpagesNumber: 5,\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\ttablet: {\r\n\t\t\t\t\t\t\tlayout: 'default',\r\n\t\t\t\t\t\t\tpagesNumber: 3,\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tmobile: {\r\n\t\t\t\t\t\t\tlayout: 'compact',\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t},\r\n\r\n\t\t\t\t\t// navigation buttons\r\n\t\t\t\t\tnavigation: {\r\n\t\t\t\t\t\tprev: true, // display prev button\r\n\t\t\t\t\t\tnext: true, // display next button\r\n\t\t\t\t\t\tfirst: true, // display first button\r\n\t\t\t\t\t\tlast: true, // display last button\r\n\t\t\t\t\t\tmore: false // display more button\r\n\t\t\t\t\t},\r\n\r\n\t\t\t\t\t// page size select\r\n\t\t\t\t\tpageSizeSelect: [], // display dropdown to select pagination size. -1 is used for \"ALl\" option\r\n\t\t\t\t},\r\n\r\n\t\t\t\t// records info\r\n\t\t\t\tinfo: true,\r\n\t\t\t},\r\n\t\t},\r\n\r\n\t\t// here we will keep all strings and message used by datatable UI so developer can easiliy translate to any language.\r\n\t\t// By default the stirngs will be in the plugin source and here can override it\r\n\t\ttranslate: {\r\n\t\t\trecords: {\r\n\t\t\t\tprocessing: 'Please wait...',\r\n\t\t\t\tnoRecords: 'No records found',\r\n\t\t\t},\r\n\t\t\ttoolbar: {\r\n\t\t\t\tpagination: {\r\n\t\t\t\t\titems: {\r\n\t\t\t\t\t\tdefault: {\r\n\t\t\t\t\t\t\tfirst: 'First',\r\n\t\t\t\t\t\t\tprev: 'Previous',\r\n\t\t\t\t\t\t\tnext: 'Next',\r\n\t\t\t\t\t\t\tlast: 'Last',\r\n\t\t\t\t\t\t\tmore: 'More pages',\r\n\t\t\t\t\t\t\tinput: 'Page number',\r\n\t\t\t\t\t\t\tselect: 'Select page size',\r\n\t\t\t\t\t\t\tall: 'all',\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tinfo: 'Showing {{start}} - {{end}} of {{total}}',\r\n\t\t\t\t\t},\r\n\t\t\t\t},\r\n\t\t\t},\r\n\t\t},\r\n\r\n\t\textensions: {},\r\n\t};\r\n\r\n}(jQuery));\r\n\n\n//# sourceURL=webpack:///../src/assets/js/global/components/base/datatable/core.datatable.js?");
  
  /***/ }),
  
  /***/ "../src/assets/js/global/components/base/datatable/datatable.checkbox.js":
  /*!*******************************************************************************!*\
    !*** ../src/assets/js/global/components/base/datatable/datatable.checkbox.js ***!
    \*******************************************************************************/
  /*! no static exports found */
  /***/ (function(module, exports, __webpack_require__) {
  
  "use strict";
  eval("\r\n(function($) {\r\n\r\n\tvar pluginName = 'KTDatatable';\r\n\tvar pfx = 'kt-';\r\n\r\n\t$.fn[pluginName] = $.fn[pluginName] || {};\r\n\r\n\t/**\r\n\t * @param datatable Main datatable plugin instance\r\n\t * @param options Extension options\r\n\t * @returns {*}\r\n\t */\r\n\t$.fn[pluginName].checkbox = function(datatable, options) {\r\n\t\tvar Extension = {\r\n\t\t\tselectedAllRows: false,\r\n\t\t\tselectedRows: [],\r\n\t\t\tunselectedRows: [],\r\n\r\n\t\t\tinit: function() {\r\n\t\t\t\tif (Extension.selectorEnabled()) {\r\n\t\t\t\t\t// reset\r\n\t\t\t\t\tdatatable.setDataSourceParam(options.vars.selectedAllRows, false);\r\n\t\t\t\t\tdatatable.stateRemove('checkbox');\r\n\r\n\t\t\t\t\t// requestIds is not null\r\n\t\t\t\t\tif (options.vars.requestIds) {\r\n\t\t\t\t\t\t// request ids in response\r\n\t\t\t\t\t\tdatatable.setDataSourceParam(options.vars.requestIds, true);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// remove selected checkbox on datatable reload\r\n\t\t\t\t\t$(datatable).on(pfx + 'datatable--on-reloaded', function() {\r\n\t\t\t\t\t\tdatatable.stateRemove('checkbox');\r\n\t\t\t\t\t\tdatatable.setDataSourceParam(options.vars.selectedAllRows, false);\r\n\t\t\t\t\t\tExtension.selectedAllRows = false;\r\n\t\t\t\t\t\tExtension.selectedRows = [];\r\n\t\t\t\t\t\tExtension.unselectedRows = [];\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t\t// select all on extension init\r\n\t\t\t\t\tExtension.selectedAllRows = datatable.getDataSourceParam(options.vars.selectedAllRows);\r\n\r\n\t\t\t\t\t$(datatable).on(pfx + 'datatable--on-layout-updated', function(e, args) {\r\n\t\t\t\t\t\tif (args.table != $(datatable.wrap).attr('id')) {\r\n\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tdatatable.ready(function() {\r\n\t\t\t\t\t\t\tExtension.initVars();\r\n\t\t\t\t\t\t\tExtension.initEvent();\r\n\t\t\t\t\t\t\tExtension.initSelect();\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t\t$(datatable).on(pfx + 'datatable--on-check', function(e, ids) {\r\n\t\t\t\t\t\tids.forEach(function(id) {\r\n\t\t\t\t\t\t\tExtension.selectedRows.push(id);\r\n\t\t\t\t\t\t\t// // remove from unselected rows\r\n\t\t\t\t\t\t\tExtension.unselectedRows = Extension.remove(Extension.unselectedRows, id);\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\tvar storage = {};\r\n\t\t\t\t\t\tstorage['selectedRows'] = $.unique(Extension.selectedRows);\r\n\t\t\t\t\t\tstorage['unselectedRows'] = $.unique(Extension.unselectedRows);\r\n\t\t\t\t\t\tdatatable.stateKeep('checkbox', storage);\r\n\t\t\t\t\t});\r\n\t\t\t\t\t$(datatable).on(pfx + 'datatable--on-uncheck', function(e, ids) {\r\n\t\t\t\t\t\tids.forEach(function(id) {\r\n\t\t\t\t\t\t\tExtension.unselectedRows.push(id);\r\n\t\t\t\t\t\t\t// // remove from selected rows\r\n\t\t\t\t\t\t\tExtension.selectedRows = Extension.remove(Extension.selectedRows, id);\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\tvar storage = {};\r\n\t\t\t\t\t\tstorage['selectedRows'] = $.unique(Extension.selectedRows);\r\n\t\t\t\t\t\tstorage['unselectedRows'] = $.unique(Extension.unselectedRows);\r\n\t\t\t\t\t\tdatatable.stateKeep('checkbox', storage);\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t},\r\n\r\n\t\t\t/**\r\n\t\t\t * Init checkbox clicks event\r\n\t\t\t */\r\n\t\t\tinitEvent: function() {\r\n\t\t\t\t// select all checkbox click\r\n\t\t\t\t$(datatable.tableHead).find('.' + pfx + 'checkbox--all > [type=\"checkbox\"]').click(function(e) {\r\n\t\t\t\t\t// clear selected and unselected rows\r\n\t\t\t\t\tExtension.selectedRows = Extension.unselectedRows = [];\r\n\t\t\t\t\tdatatable.stateRemove('checkbox');\r\n\r\n\t\t\t\t\t// select all rows\r\n\t\t\t\t\tif ($(this).is(':checked')) {\r\n\t\t\t\t\t\tExtension.selectedAllRows = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tExtension.selectedAllRows = false;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// local select all current page rows\r\n\t\t\t\t\tif (!options.vars.requestIds) {\r\n\t\t\t\t\t\tif ($(this).is(':checked')) {\r\n\t\t\t\t\t\t\tExtension.selectedRows = $.makeArray($(datatable.tableBody).find('.' + pfx + 'checkbox--single > [type=\"checkbox\"]').map(function(i, chk) {\r\n\t\t\t\t\t\t\t\treturn $(chk).val();\r\n\t\t\t\t\t\t\t}));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tvar storage = {};\r\n\t\t\t\t\t\tstorage['selectedRows'] = $.unique(Extension.selectedRows);\r\n\t\t\t\t\t\tdatatable.stateKeep('checkbox', storage);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// keep selectedAllRows in datasource params\r\n\t\t\t\t\tdatatable.setDataSourceParam(options.vars.selectedAllRows, Extension.selectedAllRows);\r\n\r\n\t\t\t\t\t$(datatable).trigger(pfx + 'datatable--on-click-checkbox', [$(this)]);\r\n\t\t\t\t});\r\n\r\n\t\t\t\t// single row checkbox click\r\n\t\t\t\t$(datatable.tableBody).find('.' + pfx + 'checkbox--single > [type=\"checkbox\"]').click(function(e) {\r\n\t\t\t\t\tvar id = $(this).val();\r\n\t\t\t\t\tif ($(this).is(':checked')) {\r\n\t\t\t\t\t\tExtension.selectedRows.push(id);\r\n\t\t\t\t\t\t// remove from unselected rows\r\n\t\t\t\t\t\tExtension.unselectedRows = Extension.remove(Extension.unselectedRows, id);\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tExtension.unselectedRows.push(id);\r\n\t\t\t\t\t\t// remove from selected rows\r\n\t\t\t\t\t\tExtension.selectedRows = Extension.remove(Extension.selectedRows, id);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// local checkbox header check\r\n\t\t\t\t\tif (!options.vars.requestIds && Extension.selectedRows.length < 1) {\r\n\t\t\t\t\t\t// remove select all checkbox, if there is no checked checkbox left\r\n\t\t\t\t\t\t$(datatable.tableHead).find('.' + pfx + 'checkbox--all > [type=\"checkbox\"]').prop('checked', false);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tvar storage = {};\r\n\t\t\t\t\tstorage['selectedRows'] = $.unique(Extension.selectedRows);\r\n\t\t\t\t\tstorage['unselectedRows'] = $.unique(Extension.unselectedRows);\r\n\t\t\t\t\tdatatable.stateKeep('checkbox', storage);\r\n\r\n\t\t\t\t\t$(datatable).trigger(pfx + 'datatable--on-click-checkbox', [$(this)]);\r\n\t\t\t\t});\r\n\t\t\t},\r\n\r\n\t\t\tinitSelect: function() {\r\n\t\t\t\t// selected all rows from server\r\n\t\t\t\tif (Extension.selectedAllRows && options.vars.requestIds) {\r\n\t\t\t\t\tif (!datatable.hasClass(pfx + 'datatable--error')) {\r\n\t\t\t\t\t\t// set header select all checkbox checked\r\n\t\t\t\t\t\t$(datatable.tableHead).find('.' + pfx + 'checkbox--all > [type=\"checkbox\"]').prop('checked', true);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// set all checkbox in table body\r\n\t\t\t\t\tdatatable.setActiveAll(true);\r\n\r\n\t\t\t\t\t// remove unselected rows\r\n\t\t\t\t\tExtension.unselectedRows.forEach(function(id) {\r\n\t\t\t\t\t\tdatatable.setInactive(id);\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\t// single check for server and local\r\n\t\t\t\t\tExtension.selectedRows.forEach(function(id) {\r\n\t\t\t\t\t\tdatatable.setActive(id);\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t\t// local checkbox; check if all checkboxes of currect page are checked\r\n\t\t\t\t\tif (!datatable.hasClass(pfx + 'datatable--error') && $(datatable.tableBody).find('.' + pfx + 'checkbox--single > [type=\"checkbox\"]').not(':checked').length < 1) {\r\n\t\t\t\t\t\t// set header select all checkbox checked\r\n\t\t\t\t\t\t$(datatable.tableHead).find('.' + pfx + 'checkbox--all > [type=\"checkbox\"]').prop('checked', true);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t},\r\n\r\n\t\t\t/**\r\n\t\t\t * Check if selector is enabled from options\r\n\t\t\t */\r\n\t\t\tselectorEnabled: function() {\r\n\t\t\t\treturn $.grep(datatable.options.columns, function(n, i) {\r\n\t\t\t\t\treturn n.selector || false;\r\n\t\t\t\t})[0];\r\n\t\t\t},\r\n\r\n\t\t\tinitVars: function() {\r\n\t\t\t\t// get single select/unselect from localstorage\r\n\t\t\t\tvar storage = datatable.stateGet('checkbox');\r\n\t\t\t\tif (typeof storage !== 'undefined') {\r\n\t\t\t\t\tExtension.selectedRows = storage['selectedRows'] || [];\r\n\t\t\t\t\tExtension.unselectedRows = storage['unselectedRows'] || [];\r\n\t\t\t\t}\r\n\t\t\t},\r\n\r\n\t\t\tgetSelectedId: function(path) {\r\n\t\t\t\tExtension.initVars();\r\n\r\n\t\t\t\t// server selected all rows\r\n\t\t\t\tif (Extension.selectedAllRows && options.vars.requestIds) {\r\n\t\t\t\t\tif (typeof path === 'undefined') {\r\n\t\t\t\t\t\tpath = options.vars.rowIds;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// if selected all rows, return id from response meta\r\n\t\t\t\t\tvar selectedAllRows = datatable.getObject(path, datatable.lastResponse) || [];\r\n\r\n\t\t\t\t\tif (selectedAllRows.length > 0) {\r\n\t\t\t\t\t\t// remove single unselected rows from selectedAllRows ids from server response emta\r\n\t\t\t\t\t\tExtension.unselectedRows.forEach(function(id) {\r\n\t\t\t\t\t\t\tselectedAllRows = Extension.remove(selectedAllRows, parseInt(id));\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn selectedAllRows;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// else return single checked selected rows\r\n\t\t\t\treturn Extension.selectedRows;\r\n\t\t\t},\r\n\r\n\t\t\tremove: function(array, element) {\r\n\t\t\t\treturn array.filter(function(e) {\r\n\t\t\t\t\treturn e !== element;\r\n\t\t\t\t});\r\n\t\t\t},\r\n\t\t};\r\n\r\n\t\t// make the extension accessible from datatable init\r\n\t\tdatatable.checkbox = function() {\r\n\t\t\treturn Extension;\r\n\t\t};\r\n\r\n\t\tif (typeof options === 'object') {\r\n\t\t\toptions = $.extend(true, {}, $.fn[pluginName].checkbox.default, options);\r\n\t\t\tExtension.init.apply(this, [options]);\r\n\t\t}\r\n\r\n\t\treturn datatable;\r\n\t};\r\n\r\n\t$.fn[pluginName].checkbox.default = {\r\n\t\tvars: {\r\n\t\t\t// select all rows flag to be sent to the server\r\n\t\t\tselectedAllRows: 'selectedAllRows',\r\n\t\t\t// request id parameter's name\r\n\t\t\trequestIds: 'requestIds',\r\n\t\t\t// response path to all rows id\r\n\t\t\trowIds: 'meta.rowIds',\r\n\t\t},\r\n\t};\r\n\r\n}(jQuery));\n\n//# sourceURL=webpack:///../src/assets/js/global/components/base/datatable/datatable.checkbox.js?");
  
  /***/ }),
  
  /***/ "../src/assets/js/global/components/base/datatable/datatable.rtl.js":
  /*!**************************************************************************!*\
    !*** ../src/assets/js/global/components/base/datatable/datatable.rtl.js ***!
    \**************************************************************************/
  /*! no static exports found */
  /***/ (function(module, exports) {
  
  eval("var defaults = {\r\n\tlayout: {\r\n\t\ticons: {\r\n\t\t\tpagination: {\r\n\t\t\t\tnext: 'flaticon2-next',\r\n\t\t\t\tprev: 'flaticon2-back',\r\n\t\t\t\tfirst: 'flaticon2-fast-back',\r\n\t\t\t\tlast: 'flaticon2-fast-next',\r\n\t\t\t\tmore: 'flaticon-more-1',\r\n\t\t\t},\r\n\t\t\trowDetail: {expand: 'fa fa-caret-down', collapse: 'fa fa-caret-right'},\r\n\t\t}\r\n\t}\r\n};\r\n\r\nif (KTUtil.isRTL()) {\r\n\tdefaults = {\r\n\t\tlayout: {\r\n\t\t\ticons: {\r\n\t\t\t\tpagination: {\r\n\t\t\t\t\tnext: 'flaticon2-back',\r\n\t\t\t\t\tprev: 'flaticon2-next',\r\n\t\t\t\t\tfirst: 'flaticon2-fast-next',\r\n\t\t\t\t\tlast: 'flaticon2-fast-back',\r\n\t\t\t\t},\r\n\t\t\t\trowDetail: {collapse: 'fa fa-caret-down', expand: 'fa fa-caret-right'},\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\n$.extend(true, $.fn.KTDatatable.defaults, defaults);\n\n//# sourceURL=webpack:///../src/assets/js/global/components/base/datatable/datatable.rtl.js?");
  
  /***/ }),
  
  /***/ "../src/assets/js/global/components/base/dialog.js":
  /*!*********************************************************!*\
    !*** ../src/assets/js/global/components/base/dialog.js ***!
    \*********************************************************/
  /*! no static exports found */
  /***/ (function(module, exports, __webpack_require__) {
  
  "use strict";
  eval("\r\n\r\n// plugin setup\r\nvar KTDialog = function(options) {\r\n    // Main object\r\n    var the = this;\r\n\r\n    // Get element object\r\n    var element;\r\n    var body = KTUtil.get('body');  \r\n\r\n    // Default options\r\n    var defaultOptions = {\r\n        'placement' : 'top center',\r\n        'type'  : 'loader',\r\n        'width' : 100,\r\n        'state' : 'default',\r\n        'message' : 'Loading...' \r\n    };    \r\n\r\n    ////////////////////////////\r\n    // ** Private Methods  ** //\r\n    ////////////////////////////\r\n\r\n    var Plugin = {\r\n        /**\r\n         * Construct\r\n         */\r\n\r\n        construct: function(options) {\r\n            Plugin.init(options);\r\n\r\n            return the;\r\n        },\r\n\r\n        /**\r\n         * Handles subtoggle click toggle\r\n         */\r\n        init: function(options) {\r\n            the.events = [];\r\n\r\n            // merge default and user defined options\r\n            the.options = KTUtil.deepExtend({}, defaultOptions, options);\r\n\r\n            the.state = false;\r\n        },\r\n\r\n        /**\r\n         * Show dialog\r\n         */\r\n        show: function() {\r\n            Plugin.eventTrigger('show');\r\n\r\n            element = document.createElement(\"DIV\");\r\n            KTUtil.setHTML(element, the.options.message);\r\n            \r\n            KTUtil.addClass(element, 'kt-dialog kt-dialog--shown');\r\n            KTUtil.addClass(element, 'kt-dialog--' + the.options.state);\r\n            KTUtil.addClass(element, 'kt-dialog--' + the.options.type); \r\n\r\n            if (the.options.placement == 'top center') {\r\n                KTUtil.addClass(element, 'kt-dialog--top-center');\r\n            }\r\n\r\n            body.appendChild(element);\r\n\r\n            the.state = 'shown';\r\n\r\n            Plugin.eventTrigger('shown');\r\n\r\n            return the;\r\n        },\r\n\r\n        /**\r\n         * Hide dialog\r\n         */\r\n        hide: function() {\r\n            if (element) {\r\n                Plugin.eventTrigger('hide');\r\n\r\n                element.remove();\r\n                the.state = 'hidden';\r\n\r\n                Plugin.eventTrigger('hidden');\r\n            }\r\n\r\n            return the;\r\n        },\r\n\r\n        /**\r\n         * Trigger events\r\n         */\r\n        eventTrigger: function(name) {\r\n            for (var i = 0; i < the.events.length; i++) {\r\n                var event = the.events[i];\r\n\r\n                if (event.name == name) {\r\n                    if (event.one == true) {\r\n                        if (event.fired == false) {\r\n                            the.events[i].fired = true;                            \r\n                            return event.handler.call(this, the);\r\n                        }\r\n                    } else {\r\n                        return event.handler.call(this, the);\r\n                    }\r\n                }\r\n            }\r\n        },\r\n\r\n        addEvent: function(name, handler, one) {\r\n            the.events.push({\r\n                name: name,\r\n                handler: handler,\r\n                one: one,\r\n                fired: false\r\n            });\r\n\r\n            return the;\r\n        }\r\n    };\r\n\r\n    //////////////////////////\r\n    // ** Public Methods ** //\r\n    //////////////////////////\r\n\r\n    /**\r\n     * Set default options \r\n     */\r\n\r\n    the.setDefaults = function(options) {\r\n        defaultOptions = options;\r\n    };\r\n\r\n    /**\r\n     * Check shown state \r\n     */\r\n    the.shown = function() {\r\n        return the.state == 'shown';\r\n    };\r\n\r\n    /**\r\n     * Check hidden state \r\n     */\r\n    the.hidden = function() {\r\n        return the.state == 'hidden';\r\n    };\r\n\r\n    /**\r\n     * Show dialog \r\n     */\r\n    the.show = function() {\r\n        return Plugin.show();\r\n    };\r\n\r\n    /**\r\n     * Hide dialog\r\n     */\r\n    the.hide = function() {\r\n        return Plugin.hide();\r\n    };\r\n\r\n    /**\r\n     * Attach event\r\n     * @returns {KTToggle}\r\n     */\r\n    the.on = function(name, handler) {\r\n        return Plugin.addEvent(name, handler);\r\n    };\r\n\r\n    /**\r\n     * Attach event that will be fired once\r\n     * @returns {KTToggle}\r\n     */\r\n    the.one = function(name, handler) {\r\n        return Plugin.addEvent(name, handler, true);\r\n    };\r\n\r\n    // Construct plugin\r\n    Plugin.construct.apply(the, [options]);\r\n\r\n    return the;\r\n};\r\n\r\n// webpack support\r\nif ( true && typeof module.exports !== 'undefined') {\r\n    module.exports = KTDialog;\r\n}\n\n//# sourceURL=webpack:///../src/assets/js/global/components/base/dialog.js?");
  
  /***/ }),
  
  /***/ "../src/assets/js/global/components/base/header.js":
  /*!*********************************************************!*\
    !*** ../src/assets/js/global/components/base/header.js ***!
    \*********************************************************/
  /*! no static exports found */
  /***/ (function(module, exports, __webpack_require__) {
  
  "use strict";
  eval("\r\nvar KTHeader = function(elementId, options) {\r\n    // Main object\r\n    var the = this;\r\n    var init = false;\r\n\r\n    // Get element object\r\n    var element = KTUtil.get(elementId);\r\n    var body = KTUtil.get('body');\r\n\r\n    if (element === undefined) {\r\n        return;\r\n    }\r\n\r\n    // Default options\r\n    var defaultOptions = {\r\n        classic: false,\r\n        offset: {\r\n            mobile: 150,\r\n            desktop: 200\r\n        },\r\n        minimize: {\r\n            mobile: false,\r\n            desktop: false\r\n        }\r\n    };\r\n\r\n    ////////////////////////////\r\n    // ** Private Methods  ** //\r\n    ////////////////////////////\r\n\r\n    var Plugin = {\r\n        /**\r\n         * Run plugin\r\n         * @returns {KTHeader}\r\n         */\r\n        construct: function(options) {\r\n            if (KTUtil.data(element).has('header')) {\r\n                the = KTUtil.data(element).get('header');\r\n            } else {\r\n                // reset header\r\n                Plugin.init(options);\r\n\r\n                // build header\r\n                Plugin.build();\r\n\r\n                KTUtil.data(element).set('header', the);\r\n            }\r\n\r\n            return the;\r\n        },\r\n\r\n        /**\r\n         * Handles subheader click toggle\r\n         * @returns {KTHeader}\r\n         */\r\n        init: function(options) {\r\n            the.events = [];\r\n\r\n            // merge default and user defined options\r\n            the.options = KTUtil.deepExtend({}, defaultOptions, options);\r\n        },\r\n\r\n        /**\r\n         * Reset header\r\n         * @returns {KTHeader}\r\n         */\r\n        build: function() {\r\n            var lastScrollTop = 0;\r\n            var eventTriggerState = true;\r\n            var viewportHeight = KTUtil.getViewPort().height;\r\n            var documentHeight = KTUtil.getDocumentHeight();\r\n\r\n            if (the.options.minimize.mobile === false && the.options.minimize.desktop === false) {\r\n                return;\r\n            }\r\n\r\n            window.addEventListener('scroll', function() {\r\n                var offset = 0, on, off, st;\r\n\r\n                if (KTUtil.isInResponsiveRange('desktop')) {\r\n                    offset = the.options.offset.desktop;\r\n                    on = the.options.minimize.desktop.on;\r\n                    off = the.options.minimize.desktop.off;\r\n                } else if (KTUtil.isInResponsiveRange('tablet-and-mobile')) {\r\n                    offset = the.options.offset.mobile;\r\n                    on = the.options.minimize.mobile.on;\r\n                    off = the.options.minimize.mobile.off;\r\n                }\r\n\r\n                st = KTUtil.getScrollTop();\r\n\r\n                if (\r\n                    (KTUtil.isInResponsiveRange('tablet-and-mobile') && the.options.classic && the.options.classic.mobile) ||\r\n                    (KTUtil.isInResponsiveRange('desktop') && the.options.classic && the.options.classic.desktop)\r\n                ) {\r\n                    if (st > offset) { // down scroll mode\r\n                        KTUtil.addClass(body, on);\r\n                        KTUtil.removeClass(body, off);\r\n\r\n                        if (eventTriggerState) {\r\n                            Plugin.eventTrigger('minimizeOn', the);\r\n                            eventTriggerState = false;\r\n                        }\r\n                    } else { // back scroll mode\r\n                        KTUtil.addClass(body, off);\r\n                        KTUtil.removeClass(body, on);\r\n\r\n                        if (eventTriggerState == false) {\r\n                            Plugin.eventTrigger('minimizeOff', the);\r\n                            eventTriggerState = true;\r\n                        }\r\n                    }\r\n                } else {\r\n                    if (st > offset && lastScrollTop < st) { // down scroll mode\r\n                        KTUtil.addClass(body, on);\r\n                        KTUtil.removeClass(body, off);\r\n\r\n                        if (eventTriggerState) {\r\n                            Plugin.eventTrigger('minimizeOn', the);\r\n                            eventTriggerState = false;\r\n                        }\r\n                    } else { // back scroll mode\r\n                        KTUtil.addClass(body, off);\r\n                        KTUtil.removeClass(body, on);\r\n\r\n                        if (eventTriggerState == false) {\r\n                            Plugin.eventTrigger('minimizeOff', the);\r\n                            eventTriggerState = true;\r\n                        }\r\n                    }\r\n\r\n                    lastScrollTop = st;\r\n                }\r\n            });\r\n        },\r\n\r\n        /**\r\n         * Trigger events\r\n         */\r\n        eventTrigger: function(name, args) {\r\n            for (var i = 0; i < the.events.length; i++) {\r\n                var event = the.events[i];\r\n                if (event.name == name) {\r\n                    if (event.one == true) {\r\n                        if (event.fired == false) {\r\n                            the.events[i].fired = true;\r\n                            return event.handler.call(this, the, args);\r\n                        }\r\n                    } else {\r\n                        return event.handler.call(this, the, args);\r\n                    }\r\n                }\r\n            }\r\n        },\r\n\r\n        addEvent: function(name, handler, one) {\r\n            the.events.push({\r\n                name: name,\r\n                handler: handler,\r\n                one: one,\r\n                fired: false\r\n            });\r\n        }\r\n    };\r\n\r\n    //////////////////////////\r\n    // ** Public Methods ** //\r\n    //////////////////////////\r\n\r\n    /**\r\n     * Set default options\r\n     */\r\n\r\n    the.setDefaults = function(options) {\r\n        defaultOptions = options;\r\n    };\r\n\r\n    /**\r\n     * Register event\r\n     */\r\n    the.on = function(name, handler) {\r\n        return Plugin.addEvent(name, handler);\r\n    };\r\n\r\n    ///////////////////////////////\r\n    // ** Plugin Construction ** //\r\n    ///////////////////////////////\r\n\r\n    // Run plugin\r\n    Plugin.construct.apply(the, [options]);\r\n\r\n    // Init done\r\n    init = true;\r\n\r\n    // Return plugin instance\r\n    return the;\r\n};\r\n\r\n// webpack support\r\nif ( true && typeof module.exports !== 'undefined') {\r\n    module.exports = KTHeader;\r\n}\r\n\n\n//# sourceURL=webpack:///../src/assets/js/global/components/base/header.js?");
  
  /***/ }),
  
  /***/ "../src/assets/js/global/components/base/menu.js":
  /*!*******************************************************!*\
    !*** ../src/assets/js/global/components/base/menu.js ***!
    \*******************************************************/
  /*! no static exports found */
  /***/ (function(module, exports, __webpack_require__) {
  
  "use strict";
  eval("\r\nvar KTMenu = function(elementId, options) {\r\n    // Main object\r\n    var the = this;\r\n    var init = false;\r\n\r\n    // Get element object\r\n    var element = KTUtil.get(elementId);\r\n    var body = KTUtil.get('body');\r\n\r\n    if (!element) {\r\n        return;\r\n    }\r\n\r\n    // Default options\r\n    var defaultOptions = {\r\n        // scrollable area with Perfect Scroll\r\n        scroll: {\r\n            rememberPosition: false\r\n        },\r\n\r\n        // accordion submenu mode\r\n        accordion: {\r\n            slideSpeed: 200, // accordion toggle slide speed in milliseconds\r\n            autoScroll: false, // enable auto scrolling(focus) to the clicked menu item\r\n            autoScrollSpeed: 1200,\r\n            expandAll: true // allow having multiple expanded accordions in the menu\r\n        },\r\n\r\n        // dropdown submenu mode\r\n        dropdown: {\r\n            timeout: 500 // timeout in milliseconds to show and hide the hoverable submenu dropdown\r\n        }\r\n    };\r\n\r\n    ////////////////////////////\r\n    // ** Private Methods  ** //\r\n    ////////////////////////////\r\n\r\n    var Plugin = {\r\n        /**\r\n         * Run plugin\r\n         * @returns {KTMenu}\r\n         */\r\n        construct: function(options) {\r\n            if (KTUtil.data(element).has('menu')) {\r\n                the = KTUtil.data(element).get('menu');\r\n            } else {\r\n                // reset menu\r\n                Plugin.init(options);\r\n\r\n                // reset menu\r\n                Plugin.reset();\r\n\r\n                // build menu\r\n                Plugin.build();\r\n\r\n                KTUtil.data(element).set('menu', the);\r\n            }\r\n\r\n            return the;\r\n        },\r\n\r\n        /**\r\n         * Handles submenu click toggle\r\n         * @returns {KTMenu}\r\n         */\r\n        init: function(options) {\r\n            the.events = [];\r\n\r\n            the.eventHandlers = {};\r\n\r\n            // merge default and user defined options\r\n            the.options = KTUtil.deepExtend({}, defaultOptions, options);\r\n\r\n            // pause menu\r\n            the.pauseDropdownHoverTime = 0;\r\n\r\n            the.uid = KTUtil.getUniqueID();\r\n        },\r\n\r\n        update: function(options) {\r\n            // merge default and user defined options\r\n            the.options = KTUtil.deepExtend({}, defaultOptions, options);\r\n\r\n            // pause menu\r\n            the.pauseDropdownHoverTime = 0;\r\n\r\n             // reset menu\r\n            Plugin.reset();\r\n\r\n            the.eventHandlers = {};\r\n\r\n            // build menu\r\n            Plugin.build();\r\n\r\n            KTUtil.data(element).set('menu', the);\r\n        },\r\n\r\n        reload: function() {\r\n             // reset menu\r\n            Plugin.reset();\r\n\r\n            // build menu\r\n            Plugin.build();\r\n\r\n            // reset submenu props\r\n            Plugin.resetSubmenuProps();\r\n        },\r\n\r\n        /**\r\n         * Reset menu\r\n         * @returns {KTMenu}\r\n         */\r\n        build: function() {\r\n            // General accordion submenu toggle\r\n            the.eventHandlers['event_1'] = KTUtil.on( element, '.kt-menu__toggle', 'click', Plugin.handleSubmenuAccordion);\r\n\r\n            // Dropdown mode(hoverable)\r\n            if (Plugin.getSubmenuMode() === 'dropdown' || Plugin.isConditionalSubmenuDropdown()) {\r\n                // dropdown submenu - hover toggle\r\n                the.eventHandlers['event_2'] = KTUtil.on( element, '[data-ktmenu-submenu-toggle=\"hover\"]', 'mouseover', Plugin.handleSubmenuDrodownHoverEnter);\r\n                the.eventHandlers['event_3'] = KTUtil.on( element, '[data-ktmenu-submenu-toggle=\"hover\"]', 'mouseout', Plugin.handleSubmenuDrodownHoverExit);\r\n\r\n                // dropdown submenu - click toggle\r\n                the.eventHandlers['event_4'] = KTUtil.on( element, '[data-ktmenu-submenu-toggle=\"click\"] > .kt-menu__toggle, [data-ktmenu-submenu-toggle=\"click\"] > .kt-menu__link .kt-menu__toggle', 'click', Plugin.handleSubmenuDropdownClick);\r\n                the.eventHandlers['event_5'] = KTUtil.on( element, '[data-ktmenu-submenu-toggle=\"tab\"] > .kt-menu__toggle, [data-ktmenu-submenu-toggle=\"tab\"] > .kt-menu__link .kt-menu__toggle', 'click', Plugin.handleSubmenuDropdownTabClick);\r\n            }\r\n\r\n            // handle link click\r\n            the.eventHandlers['event_6'] = KTUtil.on(element, '.kt-menu__item > .kt-menu__link:not(.kt-menu__toggle):not(.kt-menu__link--toggle-skip)', 'click', Plugin.handleLinkClick);\r\n\r\n            // Init scrollable menu\r\n            if (the.options.scroll && the.options.scroll.height) {\r\n                Plugin.scrollInit();\r\n            }\r\n        },\r\n\r\n        /**\r\n         * Reset menu\r\n         * @returns {KTMenu}\r\n         */\r\n        reset: function() {\r\n            KTUtil.off( element, 'click', the.eventHandlers['event_1']);\r\n\r\n            // dropdown submenu - hover toggle\r\n            KTUtil.off( element, 'mouseover', the.eventHandlers['event_2']);\r\n            KTUtil.off( element, 'mouseout', the.eventHandlers['event_3']);\r\n\r\n            // dropdown submenu - click toggle\r\n            KTUtil.off( element, 'click', the.eventHandlers['event_4']);\r\n            KTUtil.off( element, 'click', the.eventHandlers['event_5']);\r\n\r\n            // handle link click\r\n            KTUtil.off(element, 'click', the.eventHandlers['event_6']);\r\n        },\r\n\r\n        /**\r\n         * Init scroll menu\r\n         *\r\n        */\r\n        scrollInit: function() {\r\n            if ( the.options.scroll && the.options.scroll.height ) {\r\n                KTUtil.scrollDestroy(element);\r\n                KTUtil.scrollInit(element, {mobileNativeScroll: true, windowScroll: false, resetHeightOnDestroy: true, handleWindowResize: true, height: the.options.scroll.height, rememberPosition: the.options.scroll.rememberPosition});\r\n            } else {\r\n                KTUtil.scrollDestroy(element);\r\n            }\r\n        },\r\n\r\n        /**\r\n         * Update scroll menu\r\n        */\r\n        scrollUpdate: function() {\r\n            if ( the.options.scroll && the.options.scroll.height ) {\r\n                KTUtil.scrollUpdate(element);\r\n            }\r\n        },\r\n\r\n        /**\r\n         * Scroll top\r\n        */\r\n        scrollTop: function() {\r\n            if ( the.options.scroll && the.options.scroll.height ) {\r\n                KTUtil.scrollTop(element);\r\n            }\r\n        },\r\n\r\n        /**\r\n         * Get submenu mode for current breakpoint and menu state\r\n         * @returns {KTMenu}\r\n         */\r\n        getSubmenuMode: function(el) {\r\n            if ( KTUtil.isInResponsiveRange('desktop') ) {\r\n                if (el && KTUtil.hasAttr(el, 'data-ktmenu-submenu-toggle') && KTUtil.attr(el, 'data-ktmenu-submenu-toggle') == 'hover') {\r\n                    return 'dropdown';\r\n                }\r\n\r\n                if ( KTUtil.isset(the.options.submenu, 'desktop.state.body') ) {\r\n                    if ( KTUtil.hasClasses(body, the.options.submenu.desktop.state.body) ) {\r\n                        return the.options.submenu.desktop.state.mode;\r\n                    } else {\r\n                        return the.options.submenu.desktop.default;\r\n                    }\r\n                } else if ( KTUtil.isset(the.options.submenu, 'desktop') ) {\r\n                    return the.options.submenu.desktop;\r\n                }\r\n            } else if ( KTUtil.isInResponsiveRange('tablet') && KTUtil.isset(the.options.submenu, 'tablet') ) {\r\n                return the.options.submenu.tablet;\r\n            } else if ( KTUtil.isInResponsiveRange('mobile') && KTUtil.isset(the.options.submenu, 'mobile') ) {\r\n                return the.options.submenu.mobile;\r\n            } else {\r\n                return false;\r\n            }\r\n        },\r\n\r\n        /**\r\n         * Get submenu mode for current breakpoint and menu state\r\n         * @returns {KTMenu}\r\n         */\r\n        isConditionalSubmenuDropdown: function() {\r\n            if ( KTUtil.isInResponsiveRange('desktop') && KTUtil.isset(the.options.submenu, 'desktop.state.body') ) {\r\n                return true;\r\n            } else {\r\n                return false;\r\n            }\r\n        },\r\n\r\n\r\n        /**\r\n         * Reset submenu attributes\r\n         * @returns {KTMenu}\r\n         */\r\n        resetSubmenuProps: function(e) {\r\n            var submenus = KTUtil.findAll(element, '.kt-menu__submenu');\r\n            if ( submenus ) {\r\n                for (var i = 0, len = submenus.length; i < len; i++) {\r\n                    KTUtil.css(submenus[0], 'display', '');\r\n                    KTUtil.css(submenus[0], 'overflow', '');\r\n                }\r\n            }\r\n        },\r\n\r\n        /**\r\n         * Handles submenu hover toggle\r\n         * @returns {KTMenu}\r\n         */\r\n        handleSubmenuDrodownHoverEnter: function(e) {\r\n            if ( Plugin.getSubmenuMode(this) === 'accordion' ) {\r\n                return;\r\n            }\r\n\r\n            if ( the.resumeDropdownHover() === false ) {\r\n                return;\r\n            }\r\n\r\n            var item = this;\r\n\r\n            if ( item.getAttribute('data-hover') == '1' ) {\r\n                item.removeAttribute('data-hover');\r\n                clearTimeout( item.getAttribute('data-timeout') );\r\n                item.removeAttribute('data-timeout');\r\n            }\r\n\r\n            Plugin.showSubmenuDropdown(item);\r\n        },\r\n\r\n        /**\r\n         * Handles submenu hover toggle\r\n         * @returns {KTMenu}\r\n         */\r\n        handleSubmenuDrodownHoverExit: function(e) {\r\n            if ( the.resumeDropdownHover() === false ) {\r\n                return;\r\n            }\r\n\r\n            if ( Plugin.getSubmenuMode(this) === 'accordion' ) {\r\n                return;\r\n            }\r\n\r\n            var item = this;\r\n            var time = the.options.dropdown.timeout;\r\n\r\n            var timeout = setTimeout(function() {\r\n                if ( item.getAttribute('data-hover') == '1' ) {\r\n                    Plugin.hideSubmenuDropdown(item, true);\r\n                }\r\n            }, time);\r\n\r\n            item.setAttribute('data-hover', '1');\r\n            item.setAttribute('data-timeout', timeout);\r\n        },\r\n\r\n        /**\r\n         * Handles submenu click toggle\r\n         * @returns {KTMenu}\r\n         */\r\n        handleSubmenuDropdownClick: function(e) {\r\n            if ( Plugin.getSubmenuMode(this) === 'accordion' ) {\r\n                return;\r\n            }\r\n\r\n            var item = this.closest('.kt-menu__item');\r\n\r\n            if ( item.getAttribute('data-ktmenu-submenu-mode') == 'accordion' ) {\r\n                return;\r\n            }\r\n\r\n            if ( KTUtil.hasClass(item, 'kt-menu__item--hover') === false ) {\r\n                KTUtil.addClass(item, 'kt-menu__item--open-dropdown');\r\n                Plugin.showSubmenuDropdown(item);\r\n            } else {\r\n                KTUtil.removeClass(item, 'kt-menu__item--open-dropdown' );\r\n                Plugin.hideSubmenuDropdown(item, true);\r\n            }\r\n\r\n            e.preventDefault();\r\n        },\r\n\r\n        /**\r\n         * Handles tab click toggle\r\n         * @returns {KTMenu}\r\n         */\r\n        handleSubmenuDropdownTabClick: function(e) {\r\n            if (Plugin.getSubmenuMode(this) === 'accordion') {\r\n                return;\r\n            }\r\n\r\n            var item = this.closest('.kt-menu__item');\r\n\r\n            if (item.getAttribute('data-ktmenu-submenu-mode') == 'accordion') {\r\n                return;\r\n            }\r\n\r\n            if (KTUtil.hasClass(item, 'kt-menu__item--hover') == false) {\r\n                KTUtil.addClass(item, 'kt-menu__item--open-dropdown');\r\n                Plugin.showSubmenuDropdown(item);\r\n            }\r\n\r\n            e.preventDefault();\r\n        },\r\n\r\n        /**\r\n         * Handles link click\r\n         * @returns {KTMenu}\r\n         */\r\n        handleLinkClick: function(e) {\r\n            var submenu = this.closest('.kt-menu__item.kt-menu__item--submenu'); //\r\n\r\n            var result = Plugin.eventTrigger('linkClick', this, e);\r\n            if (result === false) {\r\n                return;\r\n            }\r\n\r\n            if ( submenu && Plugin.getSubmenuMode(submenu) === 'dropdown' ) {\r\n                Plugin.hideSubmenuDropdowns();\r\n            }\r\n        },\r\n\r\n        /**\r\n         * Handles submenu dropdown close on link click\r\n         * @returns {KTMenu}\r\n         */\r\n        handleSubmenuDropdownClose: function(e, el) {\r\n            // exit if its not submenu dropdown mode\r\n            if (Plugin.getSubmenuMode(el) === 'accordion') {\r\n                return;\r\n            }\r\n\r\n            var shown = element.querySelectorAll('.kt-menu__item.kt-menu__item--submenu.kt-menu__item--hover:not(.kt-menu__item--tabs)');\r\n\r\n            // check if currently clicked link's parent item ha\r\n            if (shown.length > 0 && KTUtil.hasClass(el, 'kt-menu__toggle') === false && el.querySelectorAll('.kt-menu__toggle').length === 0) {\r\n                // close opened dropdown menus\r\n                for (var i = 0, len = shown.length; i < len; i++) {\r\n                    Plugin.hideSubmenuDropdown(shown[0], true);\r\n                }\r\n            }\r\n        },\r\n\r\n        /**\r\n         * helper functions\r\n         * @returns {KTMenu}\r\n         */\r\n        handleSubmenuAccordion: function(e, el) {\r\n            var query;\r\n            var item = el ? el : this;\r\n\r\n            if ( Plugin.getSubmenuMode(el) === 'dropdown' && (query = item.closest('.kt-menu__item') ) ) {\r\n                if (query.getAttribute('data-ktmenu-submenu-mode') != 'accordion' ) {\r\n                    e.preventDefault();\r\n                    return;\r\n                }\r\n            }\r\n\r\n            var li = item.closest('.kt-menu__item');\r\n            var submenu = KTUtil.child(li, '.kt-menu__submenu, .kt-menu__inner');\r\n\r\n            if (KTUtil.hasClass(item.closest('.kt-menu__item'), 'kt-menu__item--open-always')) {\r\n                return;\r\n            }\r\n\r\n            if ( li && submenu ) {\r\n                e.preventDefault();\r\n                var speed = the.options.accordion.slideSpeed;\r\n                var hasClosables = false;\r\n\r\n                if ( KTUtil.hasClass(li, 'kt-menu__item--open') === false ) {\r\n                    // hide other accordions\r\n                    if ( the.options.accordion.expandAll === false ) {\r\n                        var subnav = item.closest('.kt-menu__nav, .kt-menu__subnav');\r\n                        var closables = KTUtil.children(subnav, '.kt-menu__item.kt-menu__item--open.kt-menu__item--submenu:not(.kt-menu__item--here):not(.kt-menu__item--open-always)');\r\n\r\n                        if ( subnav && closables ) {\r\n                            for (var i = 0, len = closables.length; i < len; i++) {\r\n                                var el_ = closables[0];\r\n                                var submenu_ = KTUtil.child(el_, '.kt-menu__submenu');\r\n                                if ( submenu_ ) {\r\n                                    KTUtil.slideUp(submenu_, speed, function() {\r\n                                        Plugin.scrollUpdate();\r\n                                        KTUtil.removeClass(el_, 'kt-menu__item--open');\r\n                                    });\r\n                                }\r\n                            }\r\n                        }\r\n                    }\r\n\r\n                    KTUtil.slideDown(submenu, speed, function() {\r\n                        Plugin.scrollToItem(item);\r\n                        Plugin.scrollUpdate();\r\n\r\n                        Plugin.eventTrigger('submenuToggle', submenu, e);\r\n                    });\r\n\r\n                    KTUtil.addClass(li, 'kt-menu__item--open');\r\n\r\n                } else {\r\n                    KTUtil.slideUp(submenu, speed, function() {\r\n                        Plugin.scrollToItem(item);\r\n                        Plugin.eventTrigger('submenuToggle', submenu, e);\r\n                    });\r\n\r\n                    KTUtil.removeClass(li, 'kt-menu__item--open');\r\n                }\r\n            }\r\n        },\r\n\r\n        /**\r\n         * scroll to item function\r\n         * @returns {KTMenu}\r\n         */\r\n        scrollToItem: function(item) {\r\n            // handle auto scroll for accordion submenus\r\n            if ( KTUtil.isInResponsiveRange('desktop') && the.options.accordion.autoScroll && element.getAttribute('data-ktmenu-scroll') !== '1' ) {\r\n                KTUtil.scrollTo(item, the.options.accordion.autoScrollSpeed);\r\n            }\r\n        },\r\n\r\n        /**\r\n         * Hide submenu dropdown\r\n         * @returns {KTMenu}\r\n         */\r\n        hideSubmenuDropdown: function(item, classAlso) {\r\n            // remove submenu activation class\r\n            if ( classAlso ) {\r\n                KTUtil.removeClass(item, 'kt-menu__item--hover');\r\n                KTUtil.removeClass(item, 'kt-menu__item--active-tab');\r\n            }\r\n\r\n            // clear timeout\r\n            item.removeAttribute('data-hover');\r\n\r\n            if ( item.getAttribute('data-ktmenu-dropdown-toggle-class') ) {\r\n                KTUtil.removeClass(body, item.getAttribute('data-ktmenu-dropdown-toggle-class'));\r\n            }\r\n\r\n            var timeout = item.getAttribute('data-timeout');\r\n            item.removeAttribute('data-timeout');\r\n            clearTimeout(timeout);\r\n        },\r\n\r\n        /**\r\n         * Hide submenu dropdowns\r\n         * @returns {KTMenu}\r\n         */\r\n        hideSubmenuDropdowns: function() {\r\n            var items;\r\n            if ( items = element.querySelectorAll('.kt-menu__item--submenu.kt-menu__item--hover:not(.kt-menu__item--tabs):not([data-ktmenu-submenu-toggle=\"tab\"])') ) {\r\n                for (var j = 0, cnt = items.length; j < cnt; j++) {\r\n                    Plugin.hideSubmenuDropdown(items[j], true);\r\n                }\r\n            }\r\n        },\r\n\r\n        /**\r\n         * helper functions\r\n         * @returns {KTMenu}\r\n         */\r\n        showSubmenuDropdown: function(item) {\r\n            // close active submenus\r\n            var list = element.querySelectorAll('.kt-menu__item--submenu.kt-menu__item--hover, .kt-menu__item--submenu.kt-menu__item--active-tab');\r\n\r\n            if ( list ) {\r\n                for (var i = 0, len = list.length; i < len; i++) {\r\n                    var el = list[i];\r\n                    if ( item !== el && el.contains(item) === false && item.contains(el) === false ) {\r\n                        Plugin.hideSubmenuDropdown(el, true);\r\n                    }\r\n                }\r\n            }\r\n\r\n            // add submenu activation class\r\n            KTUtil.addClass(item, 'kt-menu__item--hover');\r\n\r\n            if ( item.getAttribute('data-ktmenu-dropdown-toggle-class') ) {\r\n                KTUtil.addClass(body, item.getAttribute('data-ktmenu-dropdown-toggle-class'));\r\n            }\r\n        },\r\n\r\n        /**\r\n         * Handles submenu slide toggle\r\n         * @returns {KTMenu}\r\n         */\r\n        createSubmenuDropdownClickDropoff: function(el) {\r\n            var query;\r\n            var zIndex = (query = KTUtil.child(el, '.kt-menu__submenu') ? KTUtil.css(query, 'z-index') : 0) - 1;\r\n\r\n            var dropoff = document.createElement('<div class=\"kt-menu__dropoff\" style=\"background: transparent; position: fixed; top: 0; bottom: 0; left: 0; right: 0; z-index: ' + zIndex + '\"></div>');\r\n\r\n            body.appendChild(dropoff);\r\n\r\n            KTUtil.addEvent(dropoff, 'click', function(e) {\r\n                e.stopPropagation();\r\n                e.preventDefault();\r\n                KTUtil.remove(this);\r\n                Plugin.hideSubmenuDropdown(el, true);\r\n            });\r\n        },\r\n\r\n        /**\r\n         * Handles submenu hover toggle\r\n         * @returns {KTMenu}\r\n         */\r\n        pauseDropdownHover: function(time) {\r\n            var date = new Date();\r\n\r\n            the.pauseDropdownHoverTime = date.getTime() + time;\r\n        },\r\n\r\n        /**\r\n         * Handles submenu hover toggle\r\n         * @returns {KTMenu}\r\n         */\r\n        resumeDropdownHover: function() {\r\n            var date = new Date();\r\n\r\n            return (date.getTime() > the.pauseDropdownHoverTime ? true : false);\r\n        },\r\n\r\n        /**\r\n         * Reset menu's current active item\r\n         * @returns {KTMenu}\r\n         */\r\n        resetActiveItem: function(item) {\r\n            var list;\r\n            var parents;\r\n\r\n            list = element.querySelectorAll('.kt-menu__item--active');\r\n\r\n            for (var i = 0, len = list.length; i < len; i++) {\r\n                var el = list[0];\r\n                KTUtil.removeClass(el, 'kt-menu__item--active');\r\n                KTUtil.hide( KTUtil.child(el, '.kt-menu__submenu') );\r\n                parents = KTUtil.parents(el, '.kt-menu__item--submenu') || [];\r\n\r\n                for (var i_ = 0, len_ = parents.length; i_ < len_; i_++) {\r\n                    var el_ = parents[i];\r\n                    KTUtil.removeClass(el_, 'kt-menu__item--open');\r\n                    KTUtil.hide( KTUtil.child(el_, '.kt-menu__submenu') );\r\n                }\r\n            }\r\n\r\n            // close open submenus\r\n            if ( the.options.accordion.expandAll === false ) {\r\n                if ( list = element.querySelectorAll('.kt-menu__item--open') ) {\r\n                    for (var i = 0, len = list.length; i < len; i++) {\r\n                        KTUtil.removeClass(parents[0], 'kt-menu__item--open');\r\n                    }\r\n                }\r\n            }\r\n        },\r\n\r\n        /**\r\n         * Sets menu's active item\r\n         * @returns {KTMenu}\r\n         */\r\n        setActiveItem: function(item) {\r\n            // reset current active item\r\n            Plugin.resetActiveItem();\r\n\r\n            var parents = KTUtil.parents(item, '.kt-menu__item--submenu') || [];\r\n            for (var i = 0, len = parents.length; i < len; i++) {\r\n                KTUtil.addClass(KTUtil.get(parents[i]), 'kt-menu__item--open');\r\n            }\r\n\r\n            KTUtil.addClass(KTUtil.get(item), 'kt-menu__item--active');\r\n        },\r\n\r\n        /**\r\n         * Returns page breadcrumbs for the menu's active item\r\n         * @returns {KTMenu}\r\n         */\r\n        getBreadcrumbs: function(item) {\r\n            var query;\r\n            var breadcrumbs = [];\r\n            var link = KTUtil.child(item, '.kt-menu__link');\r\n\r\n            breadcrumbs.push({\r\n                text: (query = KTUtil.child(link, '.kt-menu__link-text') ? query.innerHTML : ''),\r\n                title: link.getAttribute('title'),\r\n                href: link.getAttribute('href')\r\n            });\r\n\r\n            var parents = KTUtil.parents(item, '.kt-menu__item--submenu');\r\n            for (var i = 0, len = parents.length; i < len; i++) {\r\n                var submenuLink = KTUtil.child(parents[i], '.kt-menu__link');\r\n\r\n                breadcrumbs.push({\r\n                    text: (query = KTUtil.child(submenuLink, '.kt-menu__link-text') ? query.innerHTML : ''),\r\n                    title: submenuLink.getAttribute('title'),\r\n                    href: submenuLink.getAttribute('href')\r\n                });\r\n            }\r\n\r\n            return  breadcrumbs.reverse();\r\n        },\r\n\r\n        /**\r\n         * Returns page title for the menu's active item\r\n         * @returns {KTMenu}\r\n         */\r\n        getPageTitle: function(item) {\r\n            var query;\r\n\r\n            return (query = KTUtil.child(item, '.kt-menu__link-text') ? query.innerHTML : '');\r\n        },\r\n\r\n        /**\r\n         * Trigger events\r\n         */\r\n        eventTrigger: function(name, target, e) {\r\n            for (var i = 0; i < the.events.length; i++ ) {\r\n                var event = the.events[i];\r\n                if ( event.name == name ) {\r\n                    if ( event.one == true ) {\r\n                        if ( event.fired == false ) {\r\n                            the.events[i].fired = true;\r\n                            return event.handler.call(this, target, e);\r\n                        }\r\n                    } else {\r\n                        return event.handler.call(this, target, e);\r\n                    }\r\n                }\r\n            }\r\n        },\r\n\r\n        addEvent: function(name, handler, one) {\r\n            the.events.push({\r\n                name: name,\r\n                handler: handler,\r\n                one: one,\r\n                fired: false\r\n            });\r\n        },\r\n\r\n        removeEvent: function(name) {\r\n            if (the.events[name]) {\r\n                delete the.events[name];\r\n            }\r\n        }\r\n    };\r\n\r\n    //////////////////////////\r\n    // ** Public Methods ** //\r\n    //////////////////////////\r\n\r\n    /**\r\n     * Set default options\r\n     */\r\n\r\n    the.setDefaults = function(options) {\r\n        defaultOptions = options;\r\n    };\r\n\r\n    /**\r\n     * Update scroll\r\n     */\r\n    the.scrollUpdate = function() {\r\n        return Plugin.scrollUpdate();\r\n    };\r\n\r\n    /**\r\n     * Re-init scroll\r\n     */\r\n    the.scrollReInit = function() {\r\n        return Plugin.scrollInit();\r\n    };\r\n\r\n    /**\r\n     * Scroll top\r\n     */\r\n    the.scrollTop = function() {\r\n        return Plugin.scrollTop();\r\n    };\r\n\r\n    /**\r\n     * Set active menu item\r\n     */\r\n    the.setActiveItem = function(item) {\r\n        return Plugin.setActiveItem(item);\r\n    };\r\n\r\n    the.reload = function() {\r\n        return Plugin.reload();\r\n    };\r\n\r\n    the.update = function(options) {\r\n        return Plugin.update(options);\r\n    };\r\n\r\n    /**\r\n     * Set breadcrumb for menu item\r\n     */\r\n    the.getBreadcrumbs = function(item) {\r\n        return Plugin.getBreadcrumbs(item);\r\n    };\r\n\r\n    /**\r\n     * Set page title for menu item\r\n     */\r\n    the.getPageTitle = function(item) {\r\n        return Plugin.getPageTitle(item);\r\n    };\r\n\r\n    /**\r\n     * Get submenu mode\r\n     */\r\n    the.getSubmenuMode = function(el) {\r\n        return Plugin.getSubmenuMode(el);\r\n    };\r\n\r\n    /**\r\n     * Hide dropdown\r\n     * @returns {Object}\r\n     */\r\n    the.hideDropdown = function(item) {\r\n        Plugin.hideSubmenuDropdown(item, true);\r\n    };\r\n\r\n    /**\r\n     * Hide dropdowns\r\n     * @returns {Object}\r\n     */\r\n    the.hideDropdowns = function() {\r\n        Plugin.hideSubmenuDropdowns();\r\n    };\r\n\r\n    /**\r\n     * Disable menu for given time\r\n     * @returns {Object}\r\n     */\r\n    the.pauseDropdownHover = function(time) {\r\n        Plugin.pauseDropdownHover(time);\r\n    };\r\n\r\n    /**\r\n     * Disable menu for given time\r\n     * @returns {Object}\r\n     */\r\n    the.resumeDropdownHover = function() {\r\n        return Plugin.resumeDropdownHover();\r\n    };\r\n\r\n    /**\r\n     * Register event\r\n     */\r\n    the.on = function(name, handler) {\r\n        return Plugin.addEvent(name, handler);\r\n    };\r\n\r\n    the.off = function(name) {\r\n        return Plugin.removeEvent(name);\r\n    };\r\n\r\n    the.one = function(name, handler) {\r\n        return Plugin.addEvent(name, handler, true);\r\n    };\r\n\r\n    ///////////////////////////////\r\n    // ** Plugin Construction ** //\r\n    ///////////////////////////////\r\n\r\n    // Run plugin\r\n    Plugin.construct.apply(the, [options]);\r\n\r\n    // Handle plugin on window resize\r\n    KTUtil.addResizeHandler(function() {\r\n        if (init) {\r\n            the.reload();\r\n        }\r\n    });\r\n\r\n    // Init done\r\n    init = true;\r\n\r\n    // Return plugin instance\r\n    return the;\r\n};\r\n\r\n// webpack support\r\nif ( true && typeof module.exports !== 'undefined') {\r\n    module.exports = KTMenu;\r\n}\r\n\r\n// Plugin global lazy initialization\r\ndocument.addEventListener(\"click\", function (e) {\r\n    var body = KTUtil.get('body');\r\n    var query;\r\n    if ( query = body.querySelectorAll('.kt-menu__nav .kt-menu__item.kt-menu__item--submenu.kt-menu__item--hover:not(.kt-menu__item--tabs)[data-ktmenu-submenu-toggle=\"click\"]') ) {\r\n        for (var i = 0, len = query.length; i < len; i++) {\r\n            var element = query[i].closest('.kt-menu__nav').parentNode;\r\n\r\n            if ( element ) {\r\n                var the = KTUtil.data(element).get('menu');\r\n\r\n                if ( !the ) {\r\n                    break;\r\n                }\r\n\r\n                if ( !the || the.getSubmenuMode() !== 'dropdown' ) {\r\n                    break;\r\n                }\r\n\r\n                if ( e.target !== element && element.contains(e.target) === false ) {\r\n                    the.hideDropdowns();\r\n                }\r\n            }\r\n        }\r\n    }\r\n});\r\n\n\n//# sourceURL=webpack:///../src/assets/js/global/components/base/menu.js?");
  
  /***/ }),
  
  /***/ "../src/assets/js/global/components/base/offcanvas.js":
  /*!************************************************************!*\
    !*** ../src/assets/js/global/components/base/offcanvas.js ***!
    \************************************************************/
  /*! no static exports found */
  /***/ (function(module, exports, __webpack_require__) {
  
  "use strict";
  eval("\r\nvar KTOffcanvas = function(elementId, options) {\r\n    // Main object\r\n    var the = this;\r\n    var init = false;\r\n\r\n    // Get element object\r\n    var element = KTUtil.get(elementId);\r\n    var body = KTUtil.get('body');\r\n\r\n    if (!element) {\r\n        return;\r\n    }\r\n\r\n    // Default options\r\n    var defaultOptions = {};\r\n\r\n    ////////////////////////////\r\n    // ** Private Methods  ** //\r\n    ////////////////////////////\r\n\r\n    var Plugin = {\r\n        construct: function(options) {\r\n            if (KTUtil.data(element).has('offcanvas')) {\r\n                the = KTUtil.data(element).get('offcanvas');\r\n            } else {\r\n                // reset offcanvas\r\n                Plugin.init(options);\r\n\r\n                // build offcanvas\r\n                Plugin.build();\r\n\r\n                KTUtil.data(element).set('offcanvas', the);\r\n            }\r\n\r\n            return the;\r\n        },\r\n\r\n        init: function(options) {\r\n            the.events = [];\r\n\r\n            // merge default and user defined options\r\n            the.options = KTUtil.deepExtend({}, defaultOptions, options);\r\n            the.overlay;\r\n\r\n            the.classBase = the.options.baseClass;\r\n            the.classShown = the.classBase + '--on';\r\n            the.classOverlay = the.classBase + '-overlay';\r\n\r\n            the.state = KTUtil.hasClass(element, the.classShown) ? 'shown' : 'hidden';\r\n        },\r\n\r\n        build: function() {\r\n            // offcanvas toggle\r\n            if (the.options.toggleBy) {\r\n                if (typeof the.options.toggleBy === 'string') {\r\n                    KTUtil.addEvent( the.options.toggleBy, 'click', function(e) {\r\n                        e.preventDefault();\r\n                        Plugin.toggle();\r\n                    });\r\n                } else if (the.options.toggleBy && the.options.toggleBy[0]) {\r\n                    if (the.options.toggleBy[0].target) {\r\n                        for (var i in the.options.toggleBy) {\r\n                            KTUtil.addEvent( the.options.toggleBy[i].target, 'click', function(e) {\r\n                                e.preventDefault();\r\n                                Plugin.toggle();\r\n                            });\r\n                        }\r\n                    } else {\r\n                        for (var i in the.options.toggleBy) {\r\n                            KTUtil.addEvent( the.options.toggleBy[i], 'click', function(e) {\r\n                                e.preventDefault();\r\n                                Plugin.toggle();\r\n                            });\r\n                        }\r\n                    }\r\n\r\n                } else if (the.options.toggleBy && the.options.toggleBy.target) {\r\n                    KTUtil.addEvent( the.options.toggleBy.target, 'click', function(e) {\r\n                        e.preventDefault();\r\n                        Plugin.toggle();\r\n                    });\r\n                }\r\n            }\r\n\r\n            // offcanvas close\r\n            var closeBy = KTUtil.get(the.options.closeBy);\r\n            if (closeBy) {\r\n                KTUtil.addEvent(closeBy, 'click', function(e) {\r\n                    e.preventDefault();\r\n                    Plugin.hide();\r\n                });\r\n            }\r\n\r\n            // Window resize\r\n            /*\r\n            KTUtil.addResizeHandler(function() {\r\n                if (parseInt(KTUtil.css(element, 'left')) >= 0 || parseInt(KTUtil.css(element, 'right') >= 0) || KTUtil.css(element, 'position') != 'fixed') {\r\n                    KTUtil.css(element, 'opacity', '1');\r\n                }\r\n            });\r\n            */\r\n        },\r\n\r\n        isShown: function(target) {\r\n            return (the.state == 'shown' ? true : false);\r\n        },\r\n\r\n        toggle: function() {;\r\n            Plugin.eventTrigger('toggle');\r\n\r\n            if (the.state == 'shown') {\r\n                Plugin.hide(this);\r\n            } else {\r\n                Plugin.show(this);\r\n            }\r\n        },\r\n\r\n        show: function(target) {\r\n            if (the.state == 'shown') {\r\n                return;\r\n            }\r\n\r\n            Plugin.eventTrigger('beforeShow');\r\n\r\n            Plugin.togglerClass(target, 'show');\r\n\r\n            // Offcanvas panel\r\n            KTUtil.addClass(body, the.classShown);\r\n            KTUtil.addClass(element, the.classShown);\r\n            //KTUtil.css(element, 'opacity', '1');\r\n\r\n            the.state = 'shown';\r\n\r\n            if (the.options.overlay) {\r\n                the.overlay = KTUtil.insertAfter(document.createElement('DIV') , element );\r\n                KTUtil.addClass(the.overlay, the.classOverlay);\r\n                KTUtil.addEvent(the.overlay, 'click', function(e) {\r\n                    e.stopPropagation();\r\n                    e.preventDefault();\r\n                    Plugin.hide(target);\r\n                });\r\n            }\r\n\r\n            Plugin.eventTrigger('afterShow');\r\n        },\r\n\r\n        hide: function(target) {\r\n            if (the.state == 'hidden') {\r\n                return;\r\n            }\r\n\r\n            Plugin.eventTrigger('beforeHide');\r\n\r\n            Plugin.togglerClass(target, 'hide');\r\n\r\n            KTUtil.removeClass(body, the.classShown);\r\n            KTUtil.removeClass(element, the.classShown);\r\n\r\n            the.state = 'hidden';\r\n\r\n            if (the.options.overlay && the.overlay) {\r\n                KTUtil.remove(the.overlay);\r\n            }\r\n\r\n            /*\r\n            KTUtil.transitionEnd(element, function() {\r\n                KTUtil.css(element, 'opacity', '0');\r\n            });\r\n            */\r\n\r\n            Plugin.eventTrigger('afterHide');\r\n        },\r\n\r\n        togglerClass: function(target, mode) {\r\n            // Toggler\r\n            var id = KTUtil.attr(target, 'id');\r\n            var toggleBy;\r\n\r\n            if (the.options.toggleBy && the.options.toggleBy[0] && the.options.toggleBy[0].target) {\r\n                for (var i in the.options.toggleBy) {\r\n                    if (the.options.toggleBy[i].target === id) {\r\n                        toggleBy = the.options.toggleBy[i];\r\n                    }\r\n                }\r\n            } else if (the.options.toggleBy && the.options.toggleBy.target) {\r\n                toggleBy = the.options.toggleBy;\r\n            }\r\n\r\n            if (toggleBy) {\r\n                var el = KTUtil.get(toggleBy.target);\r\n\r\n                if (mode === 'show') {\r\n                    KTUtil.addClass(el, toggleBy.state);\r\n                }\r\n\r\n                if (mode === 'hide') {\r\n                    KTUtil.removeClass(el, toggleBy.state);\r\n                }\r\n            }\r\n        },\r\n\r\n        eventTrigger: function(name, args) {\r\n            for (var i = 0; i < the.events.length; i++) {\r\n                var event = the.events[i];\r\n                if (event.name == name) {\r\n                    if (event.one == true) {\r\n                        if (event.fired == false) {\r\n                            the.events[i].fired = true;\r\n                            return event.handler.call(this, the, args);\r\n                        }\r\n                    } else {\r\n                        return event.handler.call(this, the, args);\r\n                    }\r\n                }\r\n            }\r\n        },\r\n\r\n        addEvent: function(name, handler, one) {\r\n            the.events.push({\r\n                name: name,\r\n                handler: handler,\r\n                one: one,\r\n                fired: false\r\n            });\r\n        }\r\n    };\r\n\r\n    //////////////////////////\r\n    // ** Public Methods ** //\r\n    //////////////////////////\r\n    the.setDefaults = function(options) {\r\n        defaultOptions = options;\r\n    };\r\n\r\n    the.isShown = function() {\r\n        return Plugin.isShown();\r\n    };\r\n\r\n    the.hide = function() {\r\n        return Plugin.hide();\r\n    };\r\n\r\n    the.show = function() {\r\n        return Plugin.show();\r\n    };\r\n\r\n    the.on = function(name, handler) {\r\n        return Plugin.addEvent(name, handler);\r\n    };\r\n\r\n    the.one = function(name, handler) {\r\n        return Plugin.addEvent(name, handler, true);\r\n    };\r\n\r\n    ///////////////////////////////\r\n    // ** Plugin Construction ** //\r\n    ///////////////////////////////\r\n\r\n    // Run plugin\r\n    Plugin.construct.apply(the, [options]);\r\n\r\n    // Init done\r\n    init = true;\r\n\r\n    // Return plugin instance\r\n    return the;\r\n};\r\n\r\n// webpack support\r\nif ( true && typeof module.exports !== 'undefined') {\r\n    module.exports = KTOffcanvas;\r\n}\r\n\n\n//# sourceURL=webpack:///../src/assets/js/global/components/base/offcanvas.js?");
  
  /***/ }),
  
  /***/ "../src/assets/js/global/components/base/portlet.js":
  /*!**********************************************************!*\
    !*** ../src/assets/js/global/components/base/portlet.js ***!
    \**********************************************************/
  /*! no static exports found */
  /***/ (function(module, exports, __webpack_require__) {
  
  "use strict";
  eval("\r\n// plugin setup\r\nvar KTPortlet = function(elementId, options) {\r\n    // Main object\r\n    var the = this;\r\n    var init = false;\r\n\r\n    // Get element object\r\n    var element = KTUtil.get(elementId);\r\n    var body = KTUtil.get('body');\r\n\r\n    if (!element) {\r\n        return;\r\n    }\r\n\r\n    // Default options\r\n    var defaultOptions = {\r\n        bodyToggleSpeed: 400,\r\n        tooltips: true,\r\n        tools: {\r\n            toggle: {\r\n                collapse: 'Collapse',\r\n                expand: 'Expand'\r\n            },\r\n            reload: 'Reload',\r\n            remove: 'Remove',\r\n            fullscreen: {\r\n                on: 'Fullscreen',\r\n                off: 'Exit Fullscreen'\r\n            }\r\n        },\r\n        sticky: {\r\n            offset: 300,\r\n            zIndex: 101\r\n        }\r\n    };\r\n\r\n    ////////////////////////////\r\n    // ** Private Methods  ** //\r\n    ////////////////////////////\r\n\r\n    var Plugin = {\r\n        /**\r\n         * Construct\r\n         */\r\n\r\n        construct: function(options) {\r\n            if (KTUtil.data(element).has('portlet')) {\r\n                the = KTUtil.data(element).get('portlet');\r\n            } else {\r\n                // reset menu\r\n                Plugin.init(options);\r\n\r\n                // build menu\r\n                Plugin.build();\r\n\r\n                KTUtil.data(element).set('portlet', the);\r\n            }\r\n\r\n            return the;\r\n        },\r\n\r\n        /**\r\n         * Init portlet\r\n         */\r\n        init: function(options) {\r\n            the.element = element;\r\n            the.events = [];\r\n\r\n            // merge default and user defined options\r\n            the.options = KTUtil.deepExtend({}, defaultOptions, options);\r\n            the.head = KTUtil.child(element, '.kt-portlet__head');\r\n            the.foot = KTUtil.child(element, '.kt-portlet__foot');\r\n\r\n            if (KTUtil.child(element, '.kt-portlet__body')) {\r\n                the.body = KTUtil.child(element, '.kt-portlet__body');\r\n            } else if (KTUtil.child(element, '.kt-form')) {\r\n                the.body = KTUtil.child(element, '.kt-form');\r\n            }\r\n        },\r\n\r\n        /**\r\n         * Build Form Wizard\r\n         */\r\n        build: function() {\r\n            // Remove\r\n            var remove = KTUtil.find(the.head, '[data-ktportlet-tool=remove]');\r\n            if (remove) {\r\n                KTUtil.addEvent(remove, 'click', function(e) {\r\n                    e.preventDefault();\r\n                    Plugin.remove();\r\n                });\r\n            }\r\n\r\n            // Reload\r\n            var reload = KTUtil.find(the.head, '[data-ktportlet-tool=reload]');\r\n            if (reload) {\r\n                KTUtil.addEvent(reload, 'click', function(e) {\r\n                    e.preventDefault();\r\n                    Plugin.reload();\r\n                });\r\n            }\r\n\r\n            // Toggle\r\n            var toggle = KTUtil.find(the.head, '[data-ktportlet-tool=toggle]');\r\n            if (toggle) {\r\n                KTUtil.addEvent(toggle, 'click', function(e) {\r\n                    e.preventDefault();\r\n                    Plugin.toggle();\r\n                });\r\n            }\r\n\r\n            //== Fullscreen\r\n            var fullscreen = KTUtil.find(the.head, '[data-ktportlet-tool=fullscreen]');\r\n            if (fullscreen) {\r\n                KTUtil.addEvent(fullscreen, 'click', function(e) {\r\n                    e.preventDefault();\r\n                    Plugin.fullscreen();\r\n                });\r\n            }\r\n\r\n            Plugin.setupTooltips();\r\n        },\r\n\r\n        /**\r\n         * Enable stickt mode\r\n         */\r\n        initSticky: function() {\r\n            var lastScrollTop = 0;\r\n            var offset = the.options.sticky.offset;\r\n\r\n            if (!the.head) {\r\n                return;\r\n            }\r\n\r\n\t        window.addEventListener('scroll', Plugin.onScrollSticky);\r\n        },\r\n\r\n\t    /**\r\n\t     * Window scroll handle event for sticky portlet\r\n\t     */\r\n\t    onScrollSticky: function(e) {\r\n\t\t    var offset = the.options.sticky.offset;\r\n\r\n\t\t    if(isNaN(offset)) return;\r\n\r\n\t\t    var st = KTUtil.getScrollTop();\r\n\r\n\t\t    if (st >= offset && KTUtil.hasClass(body, 'kt-portlet--sticky') === false) {\r\n\t\t\t    Plugin.eventTrigger('stickyOn');\r\n\r\n\t\t\t    KTUtil.addClass(body, 'kt-portlet--sticky');\r\n\t\t\t    KTUtil.addClass(element, 'kt-portlet--sticky');\r\n\r\n\t\t\t    Plugin.updateSticky();\r\n\r\n\t\t    } else if ((st*1.5) <= offset && KTUtil.hasClass(body, 'kt-portlet--sticky')) {\r\n\t\t\t    // back scroll mode\r\n\t\t\t    Plugin.eventTrigger('stickyOff');\r\n\r\n\t\t\t    KTUtil.removeClass(body, 'kt-portlet--sticky');\r\n\t\t\t    KTUtil.removeClass(element, 'kt-portlet--sticky');\r\n\r\n\t\t\t    Plugin.resetSticky();\r\n\t\t    }\r\n\t    },\r\n\r\n        updateSticky: function() {\r\n            if (!the.head) {\r\n                return;\r\n            }\r\n\r\n            var top;\r\n\r\n            if (KTUtil.hasClass(body, 'kt-portlet--sticky')) {\r\n                if (the.options.sticky.position.top instanceof Function) {\r\n                    top = parseInt(the.options.sticky.position.top.call(this, the));\r\n                } else {\r\n                    top = parseInt(the.options.sticky.position.top);\r\n                }\r\n\r\n                var left;\r\n                if (the.options.sticky.position.left instanceof Function) {\r\n                    left = parseInt(the.options.sticky.position.left.call(this, the));\r\n                } else {\r\n                    left = parseInt(the.options.sticky.position.left);\r\n                }\r\n\r\n                var right;\r\n                if (the.options.sticky.position.right instanceof Function) {\r\n                    right = parseInt(the.options.sticky.position.right.call(this, the));\r\n                } else {\r\n                    right = parseInt(the.options.sticky.position.right);\r\n                }\r\n\r\n                KTUtil.css(the.head, 'z-index', the.options.sticky.zIndex);\r\n                KTUtil.css(the.head, 'top', top + 'px');\r\n                KTUtil.css(the.head, 'left', left + 'px');\r\n                KTUtil.css(the.head, 'right', right + 'px');\r\n            }\r\n        },\r\n\r\n        resetSticky: function() {\r\n            if (!the.head) {\r\n                return;\r\n            }\r\n\r\n            if (KTUtil.hasClass(body, 'kt-portlet--sticky') === false) {\r\n                KTUtil.css(the.head, 'z-index', '');\r\n                KTUtil.css(the.head, 'top', '');\r\n                KTUtil.css(the.head, 'left', '');\r\n                KTUtil.css(the.head, 'right', '');\r\n            }\r\n        },\r\n\r\n        /**\r\n         * Remove portlet\r\n         */\r\n        remove: function() {\r\n            if (Plugin.eventTrigger('beforeRemove') === false) {\r\n                return;\r\n            }\r\n\r\n            if (KTUtil.hasClass(body, 'kt-portlet--fullscreen') && KTUtil.hasClass(element, 'kt-portlet--fullscreen')) {\r\n                Plugin.fullscreen('off');\r\n            }\r\n\r\n            Plugin.removeTooltips();\r\n\r\n            KTUtil.remove(element);\r\n\r\n            Plugin.eventTrigger('afterRemove');\r\n        },\r\n\r\n        /**\r\n         * Set content\r\n         */\r\n        setContent: function(html) {\r\n            if (html) {\r\n                the.body.innerHTML = html;\r\n            }\r\n        },\r\n\r\n        /**\r\n         * Get body\r\n         */\r\n        getBody: function() {\r\n            return the.body;\r\n        },\r\n\r\n        /**\r\n         * Get self\r\n         */\r\n        getSelf: function() {\r\n            return element;\r\n        },\r\n\r\n        /**\r\n         * Setup tooltips\r\n         */\r\n        setupTooltips: function() {\r\n            if (the.options.tooltips) {\r\n                var collapsed = KTUtil.hasClass(element, 'kt-portlet--collapse') || KTUtil.hasClass(element, 'kt-portlet--collapsed');\r\n                var fullscreenOn = KTUtil.hasClass(body, 'kt-portlet--fullscreen') && KTUtil.hasClass(element, 'kt-portlet--fullscreen');\r\n\r\n                //== Remove\r\n                var remove = KTUtil.find(the.head, '[data-ktportlet-tool=remove]');\r\n                if (remove) {\r\n                    var placement = (fullscreenOn ? 'bottom' : 'top');\r\n                    var tip = new Tooltip(remove, {\r\n                        title: the.options.tools.remove,\r\n                        placement: placement,\r\n                        offset: (fullscreenOn ? '0,10px,0,0' : '0,5px'),\r\n                        trigger: 'hover',\r\n                        template: '<div class=\"tooltip tooltip-portlet tooltip bs-tooltip-' + placement + '\" role=\"tooltip\">\\\r\n                            <div class=\"tooltip-arrow arrow\"></div>\\\r\n                            <div class=\"tooltip-inner\"></div>\\\r\n                        </div>'\r\n                    });\r\n\r\n                    KTUtil.data(remove).set('tooltip', tip);\r\n                }\r\n\r\n                //== Reload\r\n                var reload = KTUtil.find(the.head, '[data-ktportlet-tool=reload]');\r\n                if (reload) {\r\n                    var placement = (fullscreenOn ? 'bottom' : 'top');\r\n                    var tip = new Tooltip(reload, {\r\n                        title: the.options.tools.reload,\r\n                        placement: placement,\r\n                        offset: (fullscreenOn ? '0,10px,0,0' : '0,5px'),\r\n                        trigger: 'hover',\r\n                        template: '<div class=\"tooltip tooltip-portlet tooltip bs-tooltip-' + placement + '\" role=\"tooltip\">\\\r\n                            <div class=\"tooltip-arrow arrow\"></div>\\\r\n                            <div class=\"tooltip-inner\"></div>\\\r\n                        </div>'\r\n                    });\r\n\r\n                    KTUtil.data(reload).set('tooltip', tip);\r\n                }\r\n\r\n                //== Toggle\r\n                var toggle = KTUtil.find(the.head, '[data-ktportlet-tool=toggle]');\r\n                if (toggle) {\r\n                    var placement = (fullscreenOn ? 'bottom' : 'top');\r\n                    var tip = new Tooltip(toggle, {\r\n                        title: (collapsed ? the.options.tools.toggle.expand : the.options.tools.toggle.collapse),\r\n                        placement: placement,\r\n                        offset: (fullscreenOn ? '0,10px,0,0' : '0,5px'),\r\n                        trigger: 'hover',\r\n                        template: '<div class=\"tooltip tooltip-portlet tooltip bs-tooltip-' + placement + '\" role=\"tooltip\">\\\r\n                            <div class=\"tooltip-arrow arrow\"></div>\\\r\n                            <div class=\"tooltip-inner\"></div>\\\r\n                        </div>'\r\n                    });\r\n\r\n                    KTUtil.data(toggle).set('tooltip', tip);\r\n                }\r\n\r\n                //== Fullscreen\r\n                var fullscreen = KTUtil.find(the.head, '[data-ktportlet-tool=fullscreen]');\r\n                if (fullscreen) {\r\n                    var placement = (fullscreenOn ? 'bottom' : 'top');\r\n                    var tip = new Tooltip(fullscreen, {\r\n                        title: (fullscreenOn ? the.options.tools.fullscreen.off : the.options.tools.fullscreen.on),\r\n                        placement: placement,\r\n                        offset: (fullscreenOn ? '0,10px,0,0' : '0,5px'),\r\n                        trigger: 'hover',\r\n                        template: '<div class=\"tooltip tooltip-portlet tooltip bs-tooltip-' + placement + '\" role=\"tooltip\">\\\r\n                            <div class=\"tooltip-arrow arrow\"></div>\\\r\n                            <div class=\"tooltip-inner\"></div>\\\r\n                        </div>'\r\n                    });\r\n\r\n                    KTUtil.data(fullscreen).set('tooltip', tip);\r\n                }\r\n            }\r\n        },\r\n\r\n        /**\r\n         * Setup tooltips\r\n         */\r\n        removeTooltips: function() {\r\n            if (the.options.tooltips) {\r\n                //== Remove\r\n                var remove = KTUtil.find(the.head, '[data-ktportlet-tool=remove]');\r\n                if (remove && KTUtil.data(remove).has('tooltip')) {\r\n                    KTUtil.data(remove).get('tooltip').dispose();\r\n                }\r\n\r\n                //== Reload\r\n                var reload = KTUtil.find(the.head, '[data-ktportlet-tool=reload]');\r\n                if (reload && KTUtil.data(reload).has('tooltip')) {\r\n                    KTUtil.data(reload).get('tooltip').dispose();\r\n                }\r\n\r\n                //== Toggle\r\n                var toggle = KTUtil.find(the.head, '[data-ktportlet-tool=toggle]');\r\n                if (toggle && KTUtil.data(toggle).has('tooltip')) {\r\n                    KTUtil.data(toggle).get('tooltip').dispose();\r\n                }\r\n\r\n                //== Fullscreen\r\n                var fullscreen = KTUtil.find(the.head, '[data-ktportlet-tool=fullscreen]');\r\n                if (fullscreen && KTUtil.data(fullscreen).has('tooltip')) {\r\n                    KTUtil.data(fullscreen).get('tooltip').dispose();\r\n                }\r\n            }\r\n        },\r\n\r\n        /**\r\n         * Reload\r\n         */\r\n        reload: function() {\r\n            Plugin.eventTrigger('reload');\r\n        },\r\n\r\n        /**\r\n         * Toggle\r\n         */\r\n        toggle: function() {\r\n            if (KTUtil.hasClass(element, 'kt-portlet--collapse') || KTUtil.hasClass(element, 'kt-portlet--collapsed')) {\r\n                Plugin.expand();\r\n            } else {\r\n                Plugin.collapse();\r\n            }\r\n        },\r\n\r\n        /**\r\n         * Collapse\r\n         */\r\n        collapse: function() {\r\n            if (Plugin.eventTrigger('beforeCollapse') === false) {\r\n                return;\r\n            }\r\n\r\n            KTUtil.slideUp(the.body, the.options.bodyToggleSpeed, function() {\r\n                Plugin.eventTrigger('afterCollapse');\r\n            });\r\n\r\n            KTUtil.addClass(element, 'kt-portlet--collapse');\r\n\r\n            var toggle = KTUtil.find(the.head, '[data-ktportlet-tool=toggle]');\r\n            if (toggle && KTUtil.data(toggle).has('tooltip')) {\r\n                KTUtil.data(toggle).get('tooltip').updateTitleContent(the.options.tools.toggle.expand);\r\n            }\r\n        },\r\n\r\n        /**\r\n         * Expand\r\n         */\r\n        expand: function() {\r\n            if (Plugin.eventTrigger('beforeExpand') === false) {\r\n                return;\r\n            }\r\n\r\n            KTUtil.slideDown(the.body, the.options.bodyToggleSpeed, function() {\r\n                Plugin.eventTrigger('afterExpand');\r\n            });\r\n\r\n            KTUtil.removeClass(element, 'kt-portlet--collapse');\r\n            KTUtil.removeClass(element, 'kt-portlet--collapsed');\r\n\r\n            var toggle = KTUtil.find(the.head, '[data-ktportlet-tool=toggle]');\r\n            if (toggle && KTUtil.data(toggle).has('tooltip')) {\r\n                KTUtil.data(toggle).get('tooltip').updateTitleContent(the.options.tools.toggle.collapse);\r\n            }\r\n        },\r\n\r\n        /**\r\n         * fullscreen\r\n         */\r\n        fullscreen: function(mode) {\r\n            var d = {};\r\n            var speed = 300;\r\n\r\n            if (mode === 'off' || (KTUtil.hasClass(body, 'kt-portlet--fullscreen') && KTUtil.hasClass(element, 'kt-portlet--fullscreen'))) {\r\n                Plugin.eventTrigger('beforeFullscreenOff');\r\n\r\n                KTUtil.removeClass(body, 'kt-portlet--fullscreen');\r\n                KTUtil.removeClass(element, 'kt-portlet--fullscreen');\r\n\r\n                Plugin.removeTooltips();\r\n                Plugin.setupTooltips();\r\n\r\n                if (the.foot) {\r\n                    KTUtil.css(the.body, 'margin-bottom', '');\r\n                    KTUtil.css(the.foot, 'margin-top', '');\r\n                }\r\n\r\n                Plugin.eventTrigger('afterFullscreenOff');\r\n            } else {\r\n                Plugin.eventTrigger('beforeFullscreenOn');\r\n\r\n                KTUtil.addClass(element, 'kt-portlet--fullscreen');\r\n                KTUtil.addClass(body, 'kt-portlet--fullscreen');\r\n\r\n                Plugin.removeTooltips();\r\n                Plugin.setupTooltips();\r\n\r\n\r\n                if (the.foot) {\r\n                    var height1 = parseInt(KTUtil.css(the.foot, 'height'));\r\n                    var height2 = parseInt(KTUtil.css(the.foot, 'height')) + parseInt(KTUtil.css(the.head, 'height'));\r\n                    KTUtil.css(the.body, 'margin-bottom', height1 + 'px');\r\n                    KTUtil.css(the.foot, 'margin-top', '-' + height2 + 'px');\r\n                }\r\n\r\n                Plugin.eventTrigger('afterFullscreenOn');\r\n            }\r\n        },\r\n\r\n        /**\r\n         * Trigger events\r\n         */\r\n        eventTrigger: function(name) {\r\n            //KTUtil.triggerCustomEvent(name);\r\n            for (var i = 0; i < the.events.length; i++) {\r\n                var event = the.events[i];\r\n                if (event.name == name) {\r\n                    if (event.one == true) {\r\n                        if (event.fired == false) {\r\n                            the.events[i].fired = true;\r\n                            return event.handler.call(this, the);\r\n                        }\r\n                    } else {\r\n                        return event.handler.call(this, the);\r\n                    }\r\n                }\r\n            }\r\n        },\r\n\r\n        addEvent: function(name, handler, one) {\r\n            the.events.push({\r\n                name: name,\r\n                handler: handler,\r\n                one: one,\r\n                fired: false\r\n            });\r\n\r\n            return the;\r\n        }\r\n    };\r\n\r\n    //////////////////////////\r\n    // ** Public Methods ** //\r\n    //////////////////////////\r\n\r\n    /**\r\n     * Set default options\r\n     */\r\n\r\n    the.setDefaults = function(options) {\r\n        defaultOptions = options;\r\n    };\r\n\r\n    /**\r\n     * Remove portlet\r\n     * @returns {KTPortlet}\r\n     */\r\n    the.remove = function() {\r\n        return Plugin.remove(html);\r\n    };\r\n\r\n    /**\r\n     * Remove portlet\r\n     * @returns {KTPortlet}\r\n     */\r\n    the.initSticky = function() {\r\n        return Plugin.initSticky();\r\n    };\r\n\r\n    /**\r\n     * Remove portlet\r\n     * @returns {KTPortlet}\r\n     */\r\n    the.updateSticky = function() {\r\n        return Plugin.updateSticky();\r\n    };\r\n\r\n    /**\r\n     * Remove portlet\r\n     * @returns {KTPortlet}\r\n     */\r\n    the.resetSticky = function() {\r\n        return Plugin.resetSticky();\r\n    };\r\n\r\n\t/**\r\n\t * Destroy sticky portlet\r\n\t */\r\n\tthe.destroySticky = function() {\r\n\t\tPlugin.resetSticky();\r\n\t\twindow.removeEventListener('scroll', Plugin.onScrollSticky);\r\n\t};\r\n\r\n    /**\r\n     * Reload portlet\r\n     * @returns {KTPortlet}\r\n     */\r\n    the.reload = function() {\r\n        return Plugin.reload();\r\n    };\r\n\r\n    /**\r\n     * Set portlet content\r\n     * @returns {KTPortlet}\r\n     */\r\n    the.setContent = function(html) {\r\n        return Plugin.setContent(html);\r\n    };\r\n\r\n    /**\r\n     * Toggle portlet\r\n     * @returns {KTPortlet}\r\n     */\r\n    the.toggle = function() {\r\n        return Plugin.toggle();\r\n    };\r\n\r\n    /**\r\n     * Collapse portlet\r\n     * @returns {KTPortlet}\r\n     */\r\n    the.collapse = function() {\r\n        return Plugin.collapse();\r\n    };\r\n\r\n    /**\r\n     * Expand portlet\r\n     * @returns {KTPortlet}\r\n     */\r\n    the.expand = function() {\r\n        return Plugin.expand();\r\n    };\r\n\r\n    /**\r\n     * Fullscreen portlet\r\n     * @returns {MPortlet}\r\n     */\r\n    the.fullscreen = function() {\r\n        return Plugin.fullscreen('on');\r\n    };\r\n\r\n    /**\r\n     * Fullscreen portlet\r\n     * @returns {MPortlet}\r\n     */\r\n    the.unFullscreen = function() {\r\n        return Plugin.fullscreen('off');\r\n    };\r\n\r\n    /**\r\n     * Get portletbody\r\n     * @returns {jQuery}\r\n     */\r\n    the.getBody = function() {\r\n        return Plugin.getBody();\r\n    };\r\n\r\n    /**\r\n     * Get portletbody\r\n     * @returns {jQuery}\r\n     */\r\n    the.getSelf = function() {\r\n        return Plugin.getSelf();\r\n    };\r\n\r\n    /**\r\n     * Attach event\r\n     */\r\n    the.on = function(name, handler) {\r\n        return Plugin.addEvent(name, handler);\r\n    };\r\n\r\n    /**\r\n     * Attach event that will be fired once\r\n     */\r\n    the.one = function(name, handler) {\r\n        return Plugin.addEvent(name, handler, true);\r\n    };\r\n\r\n    // Construct plugin\r\n    Plugin.construct.apply(the, [options]);\r\n\r\n    return the;\r\n};\r\n\r\n// webpack support\r\nif ( true && typeof module.exports !== 'undefined') {\r\n    module.exports = KTPortlet;\r\n}\r\n\n\n//# sourceURL=webpack:///../src/assets/js/global/components/base/portlet.js?");
  
  /***/ }),
  
  /***/ "../src/assets/js/global/components/base/scrolltop.js":
  /*!************************************************************!*\
    !*** ../src/assets/js/global/components/base/scrolltop.js ***!
    \************************************************************/
  /*! no static exports found */
  /***/ (function(module, exports, __webpack_require__) {
  
  "use strict";
  eval("\r\nvar KTScrolltop = function(elementId, options) {\r\n    // Main object\r\n    var the = this;\r\n    var init = false;\r\n\r\n    // Get element object\r\n    var element = KTUtil.get(elementId);\r\n    var body = KTUtil.get('body');\r\n\r\n    if (!element) {\r\n        return;\r\n    }\r\n\r\n    // Default options\r\n    var defaultOptions = {\r\n        offset: 300,\r\n        speed: 600,\r\n        toggleClass: 'kt-scrolltop--on'\r\n    };\r\n\r\n    ////////////////////////////\r\n    // ** Private Methods  ** //\r\n    ////////////////////////////\r\n\r\n    var Plugin = {\r\n        /**\r\n         * Run plugin\r\n         * @returns {mscrolltop}\r\n         */\r\n        construct: function(options) {\r\n            if (KTUtil.data(element).has('scrolltop')) {\r\n                the = KTUtil.data(element).get('scrolltop');\r\n            } else {\r\n                // reset scrolltop\r\n                Plugin.init(options);\r\n\r\n                // build scrolltop\r\n                Plugin.build();\r\n\r\n                KTUtil.data(element).set('scrolltop', the);\r\n            }\r\n\r\n            return the;\r\n        },\r\n\r\n        /**\r\n         * Handles subscrolltop click toggle\r\n         * @returns {mscrolltop}\r\n         */\r\n        init: function(options) {\r\n            the.events = [];\r\n\r\n            // merge default and user defined options\r\n            the.options = KTUtil.deepExtend({}, defaultOptions, options);\r\n        },\r\n\r\n        build: function() {\r\n            // handle window scroll\r\n            if (navigator.userAgent.match(/iPhone|iPad|iPod/i)) {\r\n                window.addEventListener('touchend', function() {\r\n                    Plugin.handle();\r\n                });\r\n\r\n                window.addEventListener('touchcancel', function() {\r\n                    Plugin.handle();\r\n                });\r\n\r\n                window.addEventListener('touchleave', function() {\r\n                    Plugin.handle();\r\n                });\r\n            } else {\r\n                window.addEventListener('scroll', function() { \r\n                    Plugin.handle();\r\n                });\r\n            }\r\n\r\n            // handle button click \r\n            KTUtil.addEvent(element, 'click', Plugin.scroll);\r\n        },\r\n\r\n        /**\r\n         * Handles scrolltop click scrollTop\r\n         */\r\n        handle: function() {\r\n            var pos = window.pageYOffset; // current vertical position\r\n            if (pos > the.options.offset) {\r\n                KTUtil.addClass(body, the.options.toggleClass);\r\n            } else {\r\n                KTUtil.removeClass(body, the.options.toggleClass);\r\n            }\r\n        },\r\n\r\n        /**\r\n         * Handles scrolltop click scrollTop\r\n         */\r\n        scroll: function(e) {\r\n            e.preventDefault();\r\n\r\n            KTUtil.scrollTop(0, the.options.speed);\r\n        },\r\n\r\n\r\n        /**\r\n         * Trigger events\r\n         */\r\n        eventTrigger: function(name, args) {\r\n            for (var i = 0; i < the.events.length; i++) {\r\n                var event = the.events[i];\r\n                if (event.name == name) {\r\n                    if (event.one == true) {\r\n                        if (event.fired == false) {\r\n                            the.events[i].fired = true;\r\n                            return event.handler.call(this, the, args);\r\n                        }\r\n                    } else {\r\n                       return event.handler.call(this, the, args);\r\n                    }\r\n                }\r\n            }\r\n        },\r\n\r\n        addEvent: function(name, handler, one) {\r\n            the.events.push({\r\n                name: name,\r\n                handler: handler,\r\n                one: one,\r\n                fired: false\r\n            });\r\n        }\r\n    };\r\n\r\n    //////////////////////////\r\n    // ** Public Methods ** //\r\n    //////////////////////////\r\n\r\n    /**\r\n     * Set default options \r\n     */\r\n\r\n    the.setDefaults = function(options) {\r\n        defaultOptions = options;\r\n    };\r\n\r\n    /**\r\n     * Get subscrolltop mode\r\n     */\r\n    the.on = function(name, handler) {\r\n        return Plugin.addEvent(name, handler);\r\n    };\r\n\r\n    /**\r\n     * Set scrolltop content\r\n     * @returns {mscrolltop}\r\n     */\r\n    the.one = function(name, handler) {\r\n        return Plugin.addEvent(name, handler, true);\r\n    };\r\n\r\n    ///////////////////////////////\r\n    // ** Plugin Construction ** //\r\n    ///////////////////////////////\r\n\r\n    // Run plugin\r\n    Plugin.construct.apply(the, [options]);\r\n\r\n    // Init done\r\n    init = true;\r\n\r\n    // Return plugin instance\r\n    return the;\r\n};\r\n\r\n// webpack support\r\nif ( true && typeof module.exports !== 'undefined') {\r\n    module.exports = KTScrolltop;\r\n}\n\n//# sourceURL=webpack:///../src/assets/js/global/components/base/scrolltop.js?");
  
  /***/ }),
  
  /***/ "../src/assets/js/global/components/base/toggle.js":
  /*!*********************************************************!*\
    !*** ../src/assets/js/global/components/base/toggle.js ***!
    \*********************************************************/
  /*! no static exports found */
  /***/ (function(module, exports, __webpack_require__) {
  
  "use strict";
  eval("\r\n\r\n// plugin setup\r\nvar KTToggle = function(elementId, options) {\r\n    // Main object\r\n    var the = this;\r\n    var init = false;\r\n\r\n    // Get element object\r\n    var element = KTUtil.get(elementId);\r\n    var body = KTUtil.get('body');  \r\n\r\n    if (!element) {\r\n        return;\r\n    }\r\n\r\n    // Default options\r\n    var defaultOptions = {\r\n        togglerState: '',\r\n        targetState: ''\r\n    };    \r\n\r\n    ////////////////////////////\r\n    // ** Private Methods  ** //\r\n    ////////////////////////////\r\n\r\n    var Plugin = {\r\n        /**\r\n         * Construct\r\n         */\r\n\r\n        construct: function(options) {\r\n            if (KTUtil.data(element).has('toggle')) {\r\n                the = KTUtil.data(element).get('toggle');\r\n            } else {\r\n                // reset menu\r\n                Plugin.init(options);\r\n\r\n                // build menu\r\n                Plugin.build();\r\n\r\n                KTUtil.data(element).set('toggle', the);\r\n            }\r\n\r\n            return the;\r\n        },\r\n\r\n        /**\r\n         * Handles subtoggle click toggle\r\n         */\r\n        init: function(options) {\r\n            the.element = element;\r\n            the.events = [];\r\n\r\n            // merge default and user defined options\r\n            the.options = KTUtil.deepExtend({}, defaultOptions, options);\r\n\r\n            the.target = KTUtil.get(the.options.target);\r\n            the.targetState = the.options.targetState;\r\n            the.togglerState = the.options.togglerState;\r\n\r\n            the.state = KTUtil.hasClasses(the.target, the.targetState) ? 'on' : 'off';\r\n        },\r\n\r\n        /**\r\n         * Setup toggle\r\n         */\r\n        build: function() {\r\n            KTUtil.addEvent(element, 'mouseup', Plugin.toggle);\r\n        },\r\n        \r\n        /**\r\n         * Handles offcanvas click toggle\r\n         */\r\n        toggle: function(e) {\r\n            Plugin.eventTrigger('beforeToggle');\r\n\r\n            if (the.state == 'off') {\r\n                Plugin.toggleOn();\r\n            } else {\r\n                Plugin.toggleOff();\r\n            }\r\n\r\n            Plugin.eventTrigger('afterToggle');\r\n\r\n            e.preventDefault();\r\n\r\n            return the;\r\n        },\r\n\r\n        /**\r\n         * Handles toggle click toggle\r\n         */\r\n        toggleOn: function() {\r\n            Plugin.eventTrigger('beforeOn');\r\n\r\n            KTUtil.addClass(the.target, the.targetState);\r\n\r\n            if (the.togglerState) {\r\n                KTUtil.addClass(element, the.togglerState);\r\n            }\r\n\r\n            the.state = 'on';\r\n\r\n            Plugin.eventTrigger('afterOn');\r\n\r\n            Plugin.eventTrigger('toggle');\r\n\r\n            return the;\r\n        },\r\n\r\n        /**\r\n         * Handles toggle click toggle\r\n         */\r\n        toggleOff: function() {\r\n            Plugin.eventTrigger('beforeOff');\r\n\r\n            KTUtil.removeClass(the.target, the.targetState);\r\n\r\n            if (the.togglerState) {\r\n                KTUtil.removeClass(element, the.togglerState);\r\n            }\r\n\r\n            the.state = 'off';\r\n\r\n            Plugin.eventTrigger('afterOff');\r\n\r\n            Plugin.eventTrigger('toggle');\r\n\r\n            return the;\r\n        },\r\n\r\n        /**\r\n         * Trigger events\r\n         */\r\n        eventTrigger: function(name) {\r\n            for (var i = 0; i < the.events.length; i++) {\r\n                var event = the.events[i];\r\n\r\n                if (event.name == name) {\r\n                    if (event.one == true) {\r\n                        if (event.fired == false) {\r\n                            the.events[i].fired = true;                            \r\n                            return event.handler.call(this, the);\r\n                        }\r\n                    } else {\r\n                        return event.handler.call(this, the);\r\n                    }\r\n                }\r\n            }\r\n        },\r\n\r\n        addEvent: function(name, handler, one) {\r\n            the.events.push({\r\n                name: name,\r\n                handler: handler,\r\n                one: one,\r\n                fired: false\r\n            });\r\n\r\n            return the;\r\n        }\r\n    };\r\n\r\n    //////////////////////////\r\n    // ** Public Methods ** //\r\n    //////////////////////////\r\n\r\n    /**\r\n     * Set default options \r\n     */\r\n\r\n    the.setDefaults = function(options) {\r\n        defaultOptions = options;\r\n    };\r\n\r\n    /**\r\n     * Get toggle state \r\n     */\r\n    the.getState = function() {\r\n        return the.state;\r\n    };\r\n\r\n    /**\r\n     * Toggle \r\n     */\r\n    the.toggle = function() {\r\n        return Plugin.toggle();\r\n    };\r\n\r\n    /**\r\n     * Toggle on \r\n     */\r\n    the.toggleOn = function() {\r\n        return Plugin.toggleOn();\r\n    };\r\n\r\n    /**\r\n     * Toggle off \r\n     */\r\n    the.toggleOff = function() {\r\n        return Plugin.toggleOff();\r\n    };\r\n\r\n    /**\r\n     * Attach event\r\n     * @returns {KTToggle}\r\n     */\r\n    the.on = function(name, handler) {\r\n        return Plugin.addEvent(name, handler);\r\n    };\r\n\r\n    /**\r\n     * Attach event that will be fired once\r\n     * @returns {KTToggle}\r\n     */\r\n    the.one = function(name, handler) {\r\n        return Plugin.addEvent(name, handler, true);\r\n    };\r\n\r\n    // Construct plugin\r\n    Plugin.construct.apply(the, [options]);\r\n\r\n    return the;\r\n};\r\n\r\n// webpack support\r\nif ( true && typeof module.exports !== 'undefined') {\r\n    module.exports = KTToggle;\r\n}\n\n//# sourceURL=webpack:///../src/assets/js/global/components/base/toggle.js?");
  
  /***/ }),
  
  /***/ "../src/assets/js/global/components/base/util.js":
  /*!*******************************************************!*\
    !*** ../src/assets/js/global/components/base/util.js ***!
    \*******************************************************/
  /*! no static exports found */
  /***/ (function(module, exports, __webpack_require__) {
  
  "use strict";
  eval("\r\n/**\r\n * @class KTUtil  base utilize class that privides helper functions\r\n */\r\n\r\n// Polyfills\r\n/**\r\n * Element.matches() polyfill (simple version)\r\n * https://developer.mozilla.org/en-US/docs/Web/API/Element/matches#Polyfill\r\n */\r\nif (!Element.prototype.matches) {\r\n    Element.prototype.matches = Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;\r\n}\r\n\r\n/**\r\n * Element.closest() polyfill\r\n * https://developer.mozilla.org/en-US/docs/Web/API/Element/closest#Polyfill\r\n */\r\nif (!Element.prototype.closest) {\r\n    if (!Element.prototype.matches) {\r\n        Element.prototype.matches = Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;\r\n    }\r\n    Element.prototype.closest = function (s) {\r\n        var el = this;\r\n        var ancestor = this;\r\n        if (!document.documentElement.contains(el)) return null;\r\n        do {\r\n            if (ancestor.matches(s)) return ancestor;\r\n            ancestor = ancestor.parentElement;\r\n        } while (ancestor !== null);\r\n        return null;\r\n    };\r\n}\r\n\r\n/**\r\n * ChildNode.remove() polyfill\r\n * https://gomakethings.com/removing-an-element-from-the-dom-the-es6-way/\r\n * @author Chris Ferdinandi\r\n * @license MIT\r\n */\r\n(function (elem) {\r\n    for (var i = 0; i < elem.length; i++) {\r\n        if (!window[elem[i]] || 'remove' in window[elem[i]].prototype) continue;\r\n        window[elem[i]].prototype.remove = function () {\r\n            this.parentNode.removeChild(this);\r\n        };\r\n    }\r\n})(['Element', 'CharacterData', 'DocumentType']);\r\n\r\n//\r\n// requestAnimationFrame polyfill by Erik Möller.\r\n//  With fixes from Paul Irish and Tino Zijdel\r\n//\r\n//  http://paulirish.com/2011/requestanimationframe-for-smart-animating/\r\n//  http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating\r\n//\r\n//  MIT license\r\n//\r\n(function() {\r\n    var lastTime = 0;\r\n    var vendors = ['webkit', 'moz'];\r\n    for (var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) {\r\n        window.requestAnimationFrame = window[vendors[x] + 'RequestAnimationFrame'];\r\n        window.cancelAnimationFrame =\r\n            window[vendors[x] + 'CancelAnimationFrame'] || window[vendors[x] + 'CancelRequestAnimationFrame'];\r\n    }\r\n\r\n    if (!window.requestAnimationFrame)\r\n        window.requestAnimationFrame = function(callback) {\r\n            var currTime = new Date().getTime();\r\n            var timeToCall = Math.max(0, 16 - (currTime - lastTime));\r\n            var id = window.setTimeout(function() {\r\n                callback(currTime + timeToCall);\r\n            }, timeToCall);\r\n            lastTime = currTime + timeToCall;\r\n            return id;\r\n        };\r\n\r\n    if (!window.cancelAnimationFrame)\r\n        window.cancelAnimationFrame = function(id) {\r\n            clearTimeout(id);\r\n        };\r\n}());\r\n\r\n// Source: https://github.com/jserz/js_piece/blob/master/DOM/ParentNode/prepend()/prepend().md\r\n(function(arr) {\r\n    arr.forEach(function(item) {\r\n        if (item.hasOwnProperty('prepend')) {\r\n            return;\r\n        }\r\n        Object.defineProperty(item, 'prepend', {\r\n            configurable: true,\r\n            enumerable: true,\r\n            writable: true,\r\n            value: function prepend() {\r\n                var argArr = Array.prototype.slice.call(arguments),\r\n                    docFrag = document.createDocumentFragment();\r\n\r\n                argArr.forEach(function(argItem) {\r\n                    var isNode = argItem instanceof Node;\r\n                    docFrag.appendChild(isNode ? argItem : document.createTextNode(String(argItem)));\r\n                });\r\n\r\n                this.insertBefore(docFrag, this.firstChild);\r\n            }\r\n        });\r\n    });\r\n})([Element.prototype, Document.prototype, DocumentFragment.prototype]);\r\n\r\n// Global variables\r\nwindow.KTUtilElementDataStore = {};\r\nwindow.KTUtilElementDataStoreID = 0;\r\nwindow.KTUtilDelegatedEventHandlers = {};\r\n\r\nvar KTUtil = function() {\r\n    var resizeHandlers = [];\r\n\r\n    /** @type {object} breakpoints The device width breakpoints **/\r\n    var breakpoints = {\r\n        sm: 544, // Small screen / phone\r\n        md: 768, // Medium screen / tablet\r\n        lg: 1024, // Large screen / desktop\r\n        xl: 1200 // Extra large screen / wide desktop\r\n    };\r\n\r\n    /**\r\n     * Handle window resize event with some\r\n     * delay to attach event handlers upon resize complete\r\n     */\r\n    var _windowResizeHandler = function() {\r\n        var _runResizeHandlers = function() {\r\n            // reinitialize other subscribed elements\r\n            for (var i = 0; i < resizeHandlers.length; i++) {\r\n                var each = resizeHandlers[i];\r\n                each.call();\r\n            }\r\n        };\r\n\r\n        var timeout = false; // holder for timeout id\r\n        var delay = 250; // delay after event is \"complete\" to run callback\r\n\r\n        window.addEventListener('resize', function() {\r\n            clearTimeout(timeout);\r\n            timeout = setTimeout(function() {\r\n                _runResizeHandlers();\r\n            }, delay); // wait 50ms until window resize finishes.\r\n        });\r\n    };\r\n\r\n    return {\r\n        /**\r\n         * Class main initializer.\r\n         * @param {object} options.\r\n         * @returns null\r\n         */\r\n        //main function to initiate the theme\r\n        init: function(options) {\r\n            if (options && options.breakpoints) {\r\n                breakpoints = options.breakpoints;\r\n            }\r\n\r\n            _windowResizeHandler();\r\n        },\r\n\r\n        /**\r\n         * Adds window resize event handler.\r\n         * @param {function} callback function.\r\n         */\r\n        addResizeHandler: function(callback) {\r\n            resizeHandlers.push(callback);\r\n        },\r\n\r\n        /**\r\n         * Removes window resize event handler.\r\n         * @param {function} callback function.\r\n         */\r\n        removeResizeHandler: function(callback) {\r\n            for (var i = 0; i < resizeHandlers.length; i++) {\r\n                if (callback === resizeHandlers[i]) {\r\n                    delete resizeHandlers[i];\r\n                }\r\n            }\r\n        },\r\n\r\n        /**\r\n         * Trigger window resize handlers.\r\n         */\r\n        runResizeHandlers: function() {\r\n            _runResizeHandlers();\r\n        },\r\n\r\n        resize: function() {\r\n            if (typeof(Event) === 'function') {\r\n                // modern browsers\r\n                window.dispatchEvent(new Event('resize'));\r\n            } else {\r\n                // for IE and other old browsers\r\n                // causes deprecation warning on modern browsers\r\n                var evt = window.document.createEvent('UIEvents');\r\n                evt.initUIEvent('resize', true, false, window, 0);\r\n                window.dispatchEvent(evt);\r\n            }\r\n        },\r\n\r\n        /**\r\n         * Get GET parameter value from URL.\r\n         * @param {string} paramName Parameter name.\r\n         * @returns {string}\r\n         */\r\n        getURLParam: function(paramName) {\r\n            var searchString = window.location.search.substring(1),\r\n                i, val, params = searchString.split(\"&\");\r\n\r\n            for (i = 0; i < params.length; i++) {\r\n                val = params[i].split(\"=\");\r\n                if (val[0] == paramName) {\r\n                    return unescape(val[1]);\r\n                }\r\n            }\r\n\r\n            return null;\r\n        },\r\n\r\n        /**\r\n         * Checks whether current device is mobile touch.\r\n         * @returns {boolean}\r\n         */\r\n        isMobileDevice: function() {\r\n            return (this.getViewPort().width < this.getBreakpoint('lg') ? true : false);\r\n        },\r\n\r\n        /**\r\n         * Checks whether current device is desktop.\r\n         * @returns {boolean}\r\n         */\r\n        isDesktopDevice: function() {\r\n            return KTUtil.isMobileDevice() ? false : true;\r\n        },\r\n\r\n        /**\r\n         * Gets browser window viewport size. Ref:\r\n         * http://andylangton.co.uk/articles/javascript/get-viewport-size-javascript/\r\n         * @returns {object}\r\n         */\r\n        getViewPort: function() {\r\n            var e = window,\r\n                a = 'inner';\r\n            if (!('innerWidth' in window)) {\r\n                a = 'client';\r\n                e = document.documentElement || document.body;\r\n            }\r\n\r\n            return {\r\n                width: e[a + 'Width'],\r\n                height: e[a + 'Height']\r\n            };\r\n        },\r\n\r\n        /**\r\n         * Checks whether given device mode is currently activated.\r\n         * @param {string} mode Responsive mode name(e.g: desktop,\r\n         *     desktop-and-tablet, tablet, tablet-and-mobile, mobile)\r\n         * @returns {boolean}\r\n         */\r\n        isInResponsiveRange: function(mode) {\r\n            var breakpoint = this.getViewPort().width;\r\n\r\n            if (mode == 'general') {\r\n                return true;\r\n            } else if (mode == 'desktop' && breakpoint >= (this.getBreakpoint('lg') + 1)) {\r\n                return true;\r\n            } else if (mode == 'tablet' && (breakpoint >= (this.getBreakpoint('md') + 1) && breakpoint < this.getBreakpoint('lg'))) {\r\n                return true;\r\n            } else if (mode == 'mobile' && breakpoint <= this.getBreakpoint('md')) {\r\n                return true;\r\n            } else if (mode == 'desktop-and-tablet' && breakpoint >= (this.getBreakpoint('md') + 1)) {\r\n                return true;\r\n            } else if (mode == 'tablet-and-mobile' && breakpoint <= this.getBreakpoint('lg')) {\r\n                return true;\r\n            } else if (mode == 'minimal-desktop-and-below' && breakpoint <= this.getBreakpoint('xl')) {\r\n                return true;\r\n            }\r\n\r\n            return false;\r\n        },\r\n\r\n        /**\r\n         * Generates unique ID for give prefix.\r\n         * @param {string} prefix Prefix for generated ID\r\n         * @returns {boolean}\r\n         */\r\n        getUniqueID: function(prefix) {\r\n            return prefix + Math.floor(Math.random() * (new Date()).getTime());\r\n        },\r\n\r\n        /**\r\n         * Gets window width for give breakpoint mode.\r\n         * @param {string} mode Responsive mode name(e.g: xl, lg, md, sm)\r\n         * @returns {number}\r\n         */\r\n        getBreakpoint: function(mode) {\r\n            return breakpoints[mode];\r\n        },\r\n\r\n        /**\r\n         * Checks whether object has property matchs given key path.\r\n         * @param {object} obj Object contains values paired with given key path\r\n         * @param {string} keys Keys path seperated with dots\r\n         * @returns {object}\r\n         */\r\n        isset: function(obj, keys) {\r\n            var stone;\r\n\r\n            keys = keys || '';\r\n\r\n            if (keys.indexOf('[') !== -1) {\r\n                throw new Error('Unsupported object path notation.');\r\n            }\r\n\r\n            keys = keys.split('.');\r\n\r\n            do {\r\n                if (obj === undefined) {\r\n                    return false;\r\n                }\r\n\r\n                stone = keys.shift();\r\n\r\n                if (!obj.hasOwnProperty(stone)) {\r\n                    return false;\r\n                }\r\n\r\n                obj = obj[stone];\r\n\r\n            } while (keys.length);\r\n\r\n            return true;\r\n        },\r\n\r\n        /**\r\n         * Gets highest z-index of the given element parents\r\n         * @param {object} el jQuery element object\r\n         * @returns {number}\r\n         */\r\n        getHighestZindex: function(el) {\r\n            var elem = KTUtil.get(el),\r\n                position, value;\r\n\r\n            while (elem && elem !== document) {\r\n                // Ignore z-index if position is set to a value where z-index is ignored by the browser\r\n                // This makes behavior of this function consistent across browsers\r\n                // WebKit always returns auto if the element is positioned\r\n                position = KTUtil.css(elem, 'position');\r\n\r\n                if (position === \"absolute\" || position === \"relative\" || position === \"fixed\") {\r\n                    // IE returns 0 when zIndex is not specified\r\n                    // other browsers return a string\r\n                    // we ignore the case of nested elements with an explicit value of 0\r\n                    // <div style=\"z-index: -10;\"><div style=\"z-index: 0;\"></div></div>\r\n                    value = parseInt(KTUtil.css(elem, 'z-index'));\r\n\r\n                    if (!isNaN(value) && value !== 0) {\r\n                        return value;\r\n                    }\r\n                }\r\n\r\n                elem = elem.parentNode;\r\n            }\r\n\r\n            return null;\r\n        },\r\n\r\n        /**\r\n         * Checks whether the element has any parent with fixed positionfreg\r\n         * @param {object} el jQuery element object\r\n         * @returns {boolean}\r\n         */\r\n        hasFixedPositionedParent: function(el) {\r\n            var position;\r\n\r\n            while (el && el !== document) {\r\n                position = KTUtil.css(el, 'position');\r\n\r\n                if (position === \"fixed\") {\r\n                    return true;\r\n                }\r\n\r\n                el = el.parentNode;\r\n            }\r\n\r\n            return false;\r\n        },\r\n\r\n        /**\r\n         * Simulates delay\r\n         */\r\n        sleep: function(milliseconds) {\r\n            var start = new Date().getTime();\r\n            for (var i = 0; i < 1e7; i++) {\r\n                if ((new Date().getTime() - start) > milliseconds) {\r\n                    break;\r\n                }\r\n            }\r\n        },\r\n\r\n        /**\r\n         * Gets randomly generated integer value within given min and max range\r\n         * @param {number} min Range start value\r\n         * @param {number} max Range end value\r\n         * @returns {number}\r\n         */\r\n        getRandomInt: function(min, max) {\r\n            return Math.floor(Math.random() * (max - min + 1)) + min;\r\n        },\r\n\r\n        /**\r\n         * Checks whether Angular library is included\r\n         * @returns {boolean}\r\n         */\r\n        isAngularVersion: function() {\r\n            return window.Zone !== undefined ? true : false;\r\n        },\r\n\r\n        // jQuery Workarounds\r\n\r\n        // Deep extend:  $.extend(true, {}, objA, objB);\r\n        deepExtend: function(out) {\r\n            out = out || {};\r\n\r\n            for (var i = 1; i < arguments.length; i++) {\r\n                var obj = arguments[i];\r\n\r\n                if (!obj)\r\n                    continue;\r\n\r\n                for (var key in obj) {\r\n                    if (obj.hasOwnProperty(key)) {\r\n                        if (typeof obj[key] === 'object')\r\n                            out[key] = KTUtil.deepExtend(out[key], obj[key]);\r\n                        else\r\n                            out[key] = obj[key];\r\n                    }\r\n                }\r\n            }\r\n\r\n            return out;\r\n        },\r\n\r\n        // extend:  $.extend({}, objA, objB);\r\n        extend: function(out) {\r\n            out = out || {};\r\n\r\n            for (var i = 1; i < arguments.length; i++) {\r\n                if (!arguments[i])\r\n                    continue;\r\n\r\n                for (var key in arguments[i]) {\r\n                    if (arguments[i].hasOwnProperty(key))\r\n                        out[key] = arguments[i][key];\r\n                }\r\n            }\r\n\r\n            return out;\r\n        },\r\n\r\n        get: function(query) {\r\n            var el;\r\n\r\n            if (query === document) {\r\n                return document;\r\n            }\r\n\r\n            if (!!(query && query.nodeType === 1)) {\r\n                return query;\r\n            }\r\n\r\n            if (el = document.getElementById(query)) {\r\n                return el;\r\n            } else if (el = document.getElementsByTagName(query), el.length > 0) {\r\n                return el[0];\r\n            } else if (el = document.getElementsByClassName(query), el.length > 0) {\r\n                return el[0];\r\n            } else {\r\n                return null;\r\n            }\r\n        },\r\n\r\n        getByID: function(query) {\r\n            if (!!(query && query.nodeType === 1)) {\r\n                return query;\r\n            }\r\n\r\n            return document.getElementById(query);\r\n        },\r\n\r\n        getByTag: function(query) {\r\n            var el;\r\n\r\n            if (el = document.getElementsByTagName(query)) {\r\n                return el[0];\r\n            } else {\r\n                return null;\r\n            }\r\n        },\r\n\r\n        getByClass: function(query) {\r\n            var el;\r\n\r\n            if (el = document.getElementsByClassName(query)) {\r\n                return el[0];\r\n            } else {\r\n                return null;\r\n            }\r\n        },\r\n\r\n        /**\r\n         * Checks whether the element has given classes\r\n         * @param {object} el jQuery element object\r\n         * @param {string} Classes string\r\n         * @returns {boolean}\r\n         */\r\n        hasClasses: function(el, classes) {\r\n            if (!el) {\r\n                return;\r\n            }\r\n\r\n            var classesArr = classes.split(\" \");\r\n\r\n            for (var i = 0; i < classesArr.length; i++) {\r\n                if (KTUtil.hasClass(el, KTUtil.trim(classesArr[i])) == false) {\r\n                    return false;\r\n                }\r\n            }\r\n\r\n            return true;\r\n        },\r\n\r\n        hasClass: function(el, className) {\r\n            if (!el) {\r\n                return;\r\n            }\r\n\r\n            return el.classList ? el.classList.contains(className) : new RegExp('\\\\b' + className + '\\\\b').test(el.className);\r\n        },\r\n\r\n        addClass: function(el, className) {\r\n            if (!el || typeof className === 'undefined') {\r\n                return;\r\n            }\r\n\r\n            var classNames = className.split(' ');\r\n\r\n            if (el.classList) {\r\n                for (var i = 0; i < classNames.length; i++) {\r\n                    if (classNames[i] && classNames[i].length > 0) {\r\n                        el.classList.add(KTUtil.trim(classNames[i]));\r\n                    }\r\n                }\r\n            } else if (!KTUtil.hasClass(el, className)) {\r\n                for (var x = 0; x < classNames.length; x++) {\r\n                    el.className += ' ' + KTUtil.trim(classNames[x]);\r\n                }\r\n            }\r\n        },\r\n\r\n        removeClass: function(el, className) {\r\n            if (!el || typeof className === 'undefined') {\r\n                return;\r\n            }\r\n\r\n            var classNames = className.split(' ');\r\n\r\n            if (el.classList) {\r\n                for (var i = 0; i < classNames.length; i++) {\r\n                    el.classList.remove(KTUtil.trim(classNames[i]));\r\n                }\r\n            } else if (KTUtil.hasClass(el, className)) {\r\n                for (var x = 0; x < classNames.length; x++) {\r\n                    el.className = el.className.replace(new RegExp('\\\\b' + KTUtil.trim(classNames[x]) + '\\\\b', 'g'), '');\r\n                }\r\n            }\r\n        },\r\n\r\n        triggerCustomEvent: function(el, eventName, data) {\r\n            var event;\r\n            if (window.CustomEvent) {\r\n                event = new CustomEvent(eventName, {\r\n                    detail: data\r\n                });\r\n            } else {\r\n                event = document.createEvent('CustomEvent');\r\n                event.initCustomEvent(eventName, true, true, data);\r\n            }\r\n\r\n            el.dispatchEvent(event);\r\n        },\r\n\r\n        triggerEvent: function(node, eventName) {\r\n            // Make sure we use the ownerDocument from the provided node to avoid cross-window problems\r\n            var doc;\r\n            if (node.ownerDocument) {\r\n                doc = node.ownerDocument;\r\n            } else if (node.nodeType == 9) {\r\n                // the node may be the document itself, nodeType 9 = DOCUMENT_NODE\r\n                doc = node;\r\n            } else {\r\n                throw new Error(\"Invalid node passed to fireEvent: \" + node.id);\r\n            }\r\n\r\n            if (node.dispatchEvent) {\r\n                // Gecko-style approach (now the standard) takes more work\r\n                var eventClass = \"\";\r\n\r\n                // Different events have different event classes.\r\n                // If this switch statement can't map an eventName to an eventClass,\r\n                // the event firing is going to fail.\r\n                switch (eventName) {\r\n                    case \"click\": // Dispatching of 'click' appears to not work correctly in Safari. Use 'mousedown' or 'mouseup' instead.\r\n                    case \"mouseenter\":\r\n                    case \"mouseleave\":\r\n                    case \"mousedown\":\r\n                    case \"mouseup\":\r\n                        eventClass = \"MouseEvents\";\r\n                        break;\r\n\r\n                    case \"focus\":\r\n                    case \"change\":\r\n                    case \"blur\":\r\n                    case \"select\":\r\n                        eventClass = \"HTMLEvents\";\r\n                        break;\r\n\r\n                    default:\r\n                        throw \"fireEvent: Couldn't find an event class for event '\" + eventName + \"'.\";\r\n                        break;\r\n                }\r\n                var event = doc.createEvent(eventClass);\r\n\r\n                var bubbles = eventName == \"change\" ? false : true;\r\n                event.initEvent(eventName, bubbles, true); // All events created as bubbling and cancelable.\r\n\r\n                event.synthetic = true; // allow detection of synthetic events\r\n                // The second parameter says go ahead with the default action\r\n                node.dispatchEvent(event, true);\r\n            } else if (node.fireEvent) {\r\n                // IE-old school style\r\n                var event = doc.createEventObject();\r\n                event.synthetic = true; // allow detection of synthetic events\r\n                node.fireEvent(\"on\" + eventName, event);\r\n            }\r\n        },\r\n\r\n        index: function( elm ){\r\n            elm = KTUtil.get(elm);\r\n            var c = elm.parentNode.children, i = 0;\r\n            for(; i < c.length; i++ )\r\n                if( c[i] == elm ) return i;\r\n        },\r\n\r\n        trim: function(string) {\r\n            return string.trim();\r\n        },\r\n\r\n        eventTriggered: function(e) {\r\n            if (e.currentTarget.dataset.triggered) {\r\n                return true;\r\n            } else {\r\n                e.currentTarget.dataset.triggered = true;\r\n\r\n                return false;\r\n            }\r\n        },\r\n\r\n        remove: function(el) {\r\n            if (el && el.parentNode) {\r\n                el.parentNode.removeChild(el);\r\n            }\r\n        },\r\n\r\n        find: function(parent, query) {\r\n            parent = KTUtil.get(parent);\r\n            if (parent) {\r\n                return parent.querySelector(query);\r\n            }\r\n        },\r\n\r\n        findAll: function(parent, query) {\r\n            parent = KTUtil.get(parent);\r\n            if (parent) {\r\n                return parent.querySelectorAll(query);\r\n            }\r\n        },\r\n\r\n        insertAfter: function(el, referenceNode) {\r\n            return referenceNode.parentNode.insertBefore(el, referenceNode.nextSibling);\r\n        },\r\n\r\n        parents: function(elem, selector) {\r\n            // Element.matches() polyfill\r\n            if (!Element.prototype.matches) {\r\n                Element.prototype.matches =\r\n                    Element.prototype.matchesSelector ||\r\n                    Element.prototype.mozMatchesSelector ||\r\n                    Element.prototype.msMatchesSelector ||\r\n                    Element.prototype.oMatchesSelector ||\r\n                    Element.prototype.webkitMatchesSelector ||\r\n                    function(s) {\r\n                        var matches = (this.document || this.ownerDocument).querySelectorAll(s),\r\n                            i = matches.length;\r\n                        while (--i >= 0 && matches.item(i) !== this) {}\r\n                        return i > -1;\r\n                    };\r\n            }\r\n\r\n            // Set up a parent array\r\n            var parents = [];\r\n\r\n            // Push each parent element to the array\r\n            for ( ; elem && elem !== document; elem = elem.parentNode ) {\r\n                if (selector) {\r\n                    if (elem.matches(selector)) {\r\n                        parents.push(elem);\r\n                    }\r\n                    continue;\r\n                }\r\n                parents.push(elem);\r\n            }\r\n\r\n            // Return our parent array\r\n            return parents;\r\n        },\r\n\r\n        children: function(el, selector, log) {\r\n            if (!el || !el.childNodes) {\r\n                return;\r\n            }\r\n\r\n            var result = [],\r\n                i = 0,\r\n                l = el.childNodes.length;\r\n\r\n            for (var i; i < l; ++i) {\r\n                if (el.childNodes[i].nodeType == 1 && KTUtil.matches(el.childNodes[i], selector, log)) {\r\n                    result.push(el.childNodes[i]);\r\n                }\r\n            }\r\n\r\n            return result;\r\n        },\r\n\r\n        child: function(el, selector, log) {\r\n            var children = KTUtil.children(el, selector, log);\r\n\r\n            return children ? children[0] : null;\r\n        },\r\n\r\n        matches: function(el, selector, log) {\r\n            var p = Element.prototype;\r\n            var f = p.matches || p.webkitMatchesSelector || p.mozMatchesSelector || p.msMatchesSelector || function(s) {\r\n                return [].indexOf.call(document.querySelectorAll(s), this) !== -1;\r\n            };\r\n\r\n            if (el && el.tagName) {\r\n                return f.call(el, selector);\r\n            } else {\r\n                return false;\r\n            }\r\n        },\r\n\r\n        data: function(element) {\r\n            element = KTUtil.get(element);\r\n\r\n            return {\r\n                set: function(name, data) {\r\n                    if (element == null || element === undefined) {\r\n                        return;\r\n                    }\r\n\r\n                    if (element.customDataTag === undefined) {\r\n                        window.KTUtilElementDataStoreID++;\r\n                        element.customDataTag = window.KTUtilElementDataStoreID;\r\n                    }\r\n\r\n                    if (window.KTUtilElementDataStore[element.customDataTag] === undefined) {\r\n                        window.KTUtilElementDataStore[element.customDataTag] = {};\r\n                    }\r\n\r\n                    window.KTUtilElementDataStore[element.customDataTag][name] = data;\r\n                },\r\n\r\n                get: function(name) {\r\n                    if (element === undefined) {\r\n                        return;\r\n                    }\r\n\r\n                    if (element == null || element.customDataTag === undefined) {\r\n                        return null;\r\n                    }\r\n\r\n                    return this.has(name) ? window.KTUtilElementDataStore[element.customDataTag][name] : null;\r\n                },\r\n\r\n                has: function(name) {\r\n                    if (element === undefined) {\r\n                        return false;\r\n                    }\r\n\r\n                    if (element == null || element.customDataTag === undefined) {\r\n                        return false;\r\n                    }\r\n\r\n                    return (window.KTUtilElementDataStore[element.customDataTag] && window.KTUtilElementDataStore[element.customDataTag][name]) ? true : false;\r\n                },\r\n\r\n                remove: function(name) {\r\n                    if (element && this.has(name)) {\r\n                        delete window.KTUtilElementDataStore[element.customDataTag][name];\r\n                    }\r\n                }\r\n            };\r\n        },\r\n\r\n        outerWidth: function(el, margin) {\r\n            var width;\r\n\r\n            if (margin === true) {\r\n                width = parseFloat(el.offsetWidth);\r\n                width += parseFloat(KTUtil.css(el, 'margin-left')) + parseFloat(KTUtil.css(el, 'margin-right'));\r\n\r\n                return parseFloat(width);\r\n            } else {\r\n                width = parseFloat(el.offsetWidth);\r\n\r\n                return width;\r\n            }\r\n        },\r\n\r\n        offset: function(elem) {\r\n            var rect, win;\r\n            elem = KTUtil.get(elem);\r\n\r\n            if ( !elem ) {\r\n                return;\r\n            }\r\n\r\n            // Return zeros for disconnected and hidden (display: none) elements (gh-2310)\r\n            // Support: IE <=11 only\r\n            // Running getBoundingClientRect on a\r\n            // disconnected node in IE throws an error\r\n\r\n            if ( !elem.getClientRects().length ) {\r\n                return { top: 0, left: 0 };\r\n            }\r\n\r\n            // Get document-relative position by adding viewport scroll to viewport-relative gBCR\r\n            rect = elem.getBoundingClientRect();\r\n            win = elem.ownerDocument.defaultView;\r\n\r\n            return {\r\n                top: rect.top + win.pageYOffset,\r\n                left: rect.left + win.pageXOffset\r\n            };\r\n        },\r\n\r\n        height: function(el) {\r\n            return KTUtil.css(el, 'height');\r\n        },\r\n\r\n        visible: function(el) {\r\n            return !(el.offsetWidth === 0 && el.offsetHeight === 0);\r\n        },\r\n\r\n        attr: function(el, name, value) {\r\n            el = KTUtil.get(el);\r\n\r\n            if (el == undefined) {\r\n                return;\r\n            }\r\n\r\n            if (value !== undefined) {\r\n                el.setAttribute(name, value);\r\n            } else {\r\n                return el.getAttribute(name);\r\n            }\r\n        },\r\n\r\n        hasAttr: function(el, name) {\r\n            el = KTUtil.get(el);\r\n\r\n            if (el == undefined) {\r\n                return;\r\n            }\r\n\r\n            return el.getAttribute(name) ? true : false;\r\n        },\r\n\r\n        removeAttr: function(el, name) {\r\n            el = KTUtil.get(el);\r\n\r\n            if (el == undefined) {\r\n                return;\r\n            }\r\n\r\n            el.removeAttribute(name);\r\n        },\r\n\r\n        animate: function(from, to, duration, update, easing, done) {\r\n            /**\r\n             * TinyAnimate.easings\r\n             *  Adapted from jQuery Easing\r\n             */\r\n            var easings = {};\r\n            var easing;\r\n\r\n            easings.linear = function(t, b, c, d) {\r\n                return c * t / d + b;\r\n            };\r\n\r\n            easing = easings.linear;\r\n\r\n            // Early bail out if called incorrectly\r\n            if (typeof from !== 'number' ||\r\n                typeof to !== 'number' ||\r\n                typeof duration !== 'number' ||\r\n                typeof update !== 'function') {\r\n                return;\r\n            }\r\n\r\n            // Create mock done() function if necessary\r\n            if (typeof done !== 'function') {\r\n                done = function() {};\r\n            }\r\n\r\n            // Pick implementation (requestAnimationFrame | setTimeout)\r\n            var rAF = window.requestAnimationFrame || function(callback) {\r\n                window.setTimeout(callback, 1000 / 50);\r\n            };\r\n\r\n            // Animation loop\r\n            var canceled = false;\r\n            var change = to - from;\r\n\r\n            function loop(timestamp) {\r\n                var time = (timestamp || +new Date()) - start;\r\n\r\n                if (time >= 0) {\r\n                    update(easing(time, from, change, duration));\r\n                }\r\n                if (time >= 0 && time >= duration) {\r\n                    update(to);\r\n                    done();\r\n                } else {\r\n                    rAF(loop);\r\n                }\r\n            }\r\n\r\n            update(from);\r\n\r\n            // Start animation loop\r\n            var start = window.performance && window.performance.now ? window.performance.now() : +new Date();\r\n\r\n            rAF(loop);\r\n        },\r\n\r\n        actualCss: function(el, prop, cache) {\r\n            el = KTUtil.get(el);\r\n            var css = '';\r\n\r\n            if (el instanceof HTMLElement === false) {\r\n                return;\r\n            }\r\n\r\n            if (!el.getAttribute('kt-hidden-' + prop) || cache === false) {\r\n                var value;\r\n\r\n                // the element is hidden so:\r\n                // making the el block so we can meassure its height but still be hidden\r\n                css = el.style.cssText;\r\n                el.style.cssText = 'position: absolute; visibility: hidden; display: block;';\r\n\r\n                if (prop == 'width') {\r\n                    value = el.offsetWidth;\r\n                } else if (prop == 'height') {\r\n                    value = el.offsetHeight;\r\n                }\r\n\r\n                el.style.cssText = css;\r\n\r\n                // store it in cache\r\n                el.setAttribute('kt-hidden-' + prop, value);\r\n\r\n                return parseFloat(value);\r\n            } else {\r\n                // store it in cache\r\n                return parseFloat(el.getAttribute('kt-hidden-' + prop));\r\n            }\r\n        },\r\n\r\n        actualHeight: function(el, cache) {\r\n            return KTUtil.actualCss(el, 'height', cache);\r\n        },\r\n\r\n        actualWidth: function(el, cache) {\r\n            return KTUtil.actualCss(el, 'width', cache);\r\n        },\r\n\r\n        getScroll: function(element, method) {\r\n            // The passed in `method` value should be 'Top' or 'Left'\r\n            method = 'scroll' + method;\r\n            return (element == window || element == document) ? (\r\n                self[(method == 'scrollTop') ? 'pageYOffset' : 'pageXOffset'] ||\r\n                (browserSupportsBoxModel && document.documentElement[method]) ||\r\n                document.body[method]\r\n            ) : element[method];\r\n        },\r\n\r\n        css: function(el, styleProp, value) {\r\n            el = KTUtil.get(el);\r\n\r\n            if (!el) {\r\n                return;\r\n            }\r\n\r\n            if (value !== undefined) {\r\n                el.style[styleProp] = value;\r\n            } else {\r\n                var defaultView = (el.ownerDocument || document).defaultView;\r\n                // W3C standard way:\r\n                if (defaultView && defaultView.getComputedStyle) {\r\n                    // sanitize property name to css notation\r\n                    // (hyphen separated words eg. font-Size)\r\n                    styleProp = styleProp.replace(/([A-Z])/g, \"-$1\").toLowerCase();\r\n                    return defaultView.getComputedStyle(el, null).getPropertyValue(styleProp);\r\n                } else if (el.currentStyle) { // IE\r\n                    // sanitize property name to camelCase\r\n                    styleProp = styleProp.replace(/\\-(\\w)/g, function(str, letter) {\r\n                        return letter.toUpperCase();\r\n                    });\r\n                    value = el.currentStyle[styleProp];\r\n                    // convert other units to pixels on IE\r\n                    if (/^\\d+(em|pt|%|ex)?$/i.test(value)) {\r\n                        return (function(value) {\r\n                            var oldLeft = el.style.left,\r\n                                oldRsLeft = el.runtimeStyle.left;\r\n                            el.runtimeStyle.left = el.currentStyle.left;\r\n                            el.style.left = value || 0;\r\n                            value = el.style.pixelLeft + \"px\";\r\n                            el.style.left = oldLeft;\r\n                            el.runtimeStyle.left = oldRsLeft;\r\n                            return value;\r\n                        })(value);\r\n                    }\r\n                    return value;\r\n                }\r\n            }\r\n        },\r\n\r\n        slide: function(el, dir, speed, callback, recalcMaxHeight) {\r\n            if (!el || (dir == 'up' && KTUtil.visible(el) === false) || (dir == 'down' && KTUtil.visible(el) === true)) {\r\n                return;\r\n            }\r\n\r\n            speed = (speed ? speed : 600);\r\n            var calcHeight = KTUtil.actualHeight(el);\r\n            var calcPaddingTop = false;\r\n            var calcPaddingBottom = false;\r\n\r\n            if (KTUtil.css(el, 'padding-top') && KTUtil.data(el).has('slide-padding-top') !== true) {\r\n                KTUtil.data(el).set('slide-padding-top', KTUtil.css(el, 'padding-top'));\r\n            }\r\n\r\n            if (KTUtil.css(el, 'padding-bottom') && KTUtil.data(el).has('slide-padding-bottom') !== true) {\r\n                KTUtil.data(el).set('slide-padding-bottom', KTUtil.css(el, 'padding-bottom'));\r\n            }\r\n\r\n            if (KTUtil.data(el).has('slide-padding-top')) {\r\n                calcPaddingTop = parseInt(KTUtil.data(el).get('slide-padding-top'));\r\n            }\r\n\r\n            if (KTUtil.data(el).has('slide-padding-bottom')) {\r\n                calcPaddingBottom = parseInt(KTUtil.data(el).get('slide-padding-bottom'));\r\n            }\r\n\r\n            if (dir == 'up') { // up\r\n                el.style.cssText = 'display: block; overflow: hidden;';\r\n\r\n                if (calcPaddingTop) {\r\n                    KTUtil.animate(0, calcPaddingTop, speed, function(value) {\r\n                        el.style.paddingTop = (calcPaddingTop - value) + 'px';\r\n                    }, 'linear');\r\n                }\r\n\r\n                if (calcPaddingBottom) {\r\n                    KTUtil.animate(0, calcPaddingBottom, speed, function(value) {\r\n                        el.style.paddingBottom = (calcPaddingBottom - value) + 'px';\r\n                    }, 'linear');\r\n                }\r\n\r\n                KTUtil.animate(0, calcHeight, speed, function(value) {\r\n                    el.style.height = (calcHeight - value) + 'px';\r\n                }, 'linear', function() {\r\n                    callback();\r\n                    el.style.height = '';\r\n                    el.style.display = 'none';\r\n                });\r\n\r\n\r\n            } else if (dir == 'down') { // down\r\n                el.style.cssText = 'display: block; overflow: hidden;';\r\n\r\n                if (calcPaddingTop) {\r\n                    KTUtil.animate(0, calcPaddingTop, speed, function(value) {\r\n                        el.style.paddingTop = value + 'px';\r\n                    }, 'linear', function() {\r\n                        el.style.paddingTop = '';\r\n                    });\r\n                }\r\n\r\n                if (calcPaddingBottom) {\r\n                    KTUtil.animate(0, calcPaddingBottom, speed, function(value) {\r\n                        el.style.paddingBottom = value + 'px';\r\n                    }, 'linear', function() {\r\n                        el.style.paddingBottom = '';\r\n                    });\r\n                }\r\n\r\n                KTUtil.animate(0, calcHeight, speed, function(value) {\r\n                    el.style.height = value + 'px';\r\n                }, 'linear', function() {\r\n                    callback();\r\n                    el.style.height = '';\r\n                    el.style.display = '';\r\n                    el.style.overflow = '';\r\n                });\r\n            }\r\n        },\r\n\r\n        slideUp: function(el, speed, callback) {\r\n            KTUtil.slide(el, 'up', speed, callback);\r\n        },\r\n\r\n        slideDown: function(el, speed, callback) {\r\n            KTUtil.slide(el, 'down', speed, callback);\r\n        },\r\n\r\n        show: function(el, display) {\r\n            if (typeof el !== 'undefined') {\r\n                el.style.display = (display ? display : 'block');\r\n            }\r\n        },\r\n\r\n        hide: function(el) {\r\n            if (typeof el !== 'undefined') {\r\n                el.style.display = 'none';\r\n            }\r\n        },\r\n\r\n        addEvent: function(el, type, handler, one) {\r\n            el = KTUtil.get(el);\r\n\r\n            if (typeof el !== 'undefined' && el !== null) {\r\n                el.addEventListener(type, handler);\r\n            }\r\n        },\r\n\r\n        removeEvent: function(el, type, handler) {\r\n            el = KTUtil.get(el);\r\n\r\n            if (el !== null) {\r\n                el.removeEventListener(type, handler);\r\n            }\r\n        },\r\n\r\n        on: function(element, selector, event, handler) {\r\n            if (!selector) {\r\n                return;\r\n            }\r\n\r\n            var eventId = KTUtil.getUniqueID('event');\r\n\r\n            window.KTUtilDelegatedEventHandlers[eventId] = function(e) {\r\n                var targets = element.querySelectorAll(selector);\r\n                var target = e.target;\r\n\r\n                while (target && target !== element) {\r\n                    for (var i = 0, j = targets.length; i < j; i++) {\r\n                        if (target === targets[i]) {\r\n                            handler.call(target, e);\r\n                        }\r\n                    }\r\n\r\n                    target = target.parentNode;\r\n                }\r\n            }\r\n\r\n            KTUtil.addEvent(element, event, window.KTUtilDelegatedEventHandlers[eventId]);\r\n\r\n            return eventId;\r\n        },\r\n\r\n        off: function(element, event, eventId) {\r\n            if (!element || !window.KTUtilDelegatedEventHandlers[eventId]) {\r\n                return;\r\n            }\r\n\r\n            KTUtil.removeEvent(element, event, window.KTUtilDelegatedEventHandlers[eventId]);\r\n\r\n            delete window.KTUtilDelegatedEventHandlers[eventId];\r\n        },\r\n\r\n        one: function onetime(el, type, callback) {\r\n            el = KTUtil.get(el);\r\n\r\n            el.addEventListener(type, function callee(e) {\r\n                // remove event\r\n                if (e.target && e.target.removeEventListener) {\r\n                    e.target.removeEventListener(e.type, callee);\r\n                }\r\n\r\n                // call handler\r\n                return callback(e);\r\n            });\r\n        },\r\n\r\n        hash: function(str) {\r\n            var hash = 0,\r\n                i, chr;\r\n\r\n            if (str.length === 0) return hash;\r\n            for (i = 0; i < str.length; i++) {\r\n                chr = str.charCodeAt(i);\r\n                hash = ((hash << 5) - hash) + chr;\r\n                hash |= 0; // Convert to 32bit integer\r\n            }\r\n\r\n            return hash;\r\n        },\r\n\r\n        animateClass: function(el, animationName, callback) {\r\n            var animation;\r\n            var animations = {\r\n                animation: 'animationend',\r\n                OAnimation: 'oAnimationEnd',\r\n                MozAnimation: 'mozAnimationEnd',\r\n                WebkitAnimation: 'webkitAnimationEnd',\r\n                msAnimation: 'msAnimationEnd',\r\n            };\r\n\r\n            for (var t in animations) {\r\n                if (el.style[t] !== undefined) {\r\n                    animation = animations[t];\r\n                }\r\n            }\r\n\r\n            KTUtil.addClass(el, 'animated ' + animationName);\r\n\r\n            KTUtil.one(el, animation, function() {\r\n                KTUtil.removeClass(el, 'animated ' + animationName);\r\n            });\r\n\r\n            if (callback) {\r\n                KTUtil.one(el, animation, callback);\r\n            }\r\n        },\r\n\r\n        transitionEnd: function(el, callback) {\r\n            var transition;\r\n            var transitions = {\r\n                transition: 'transitionend',\r\n                OTransition: 'oTransitionEnd',\r\n                MozTransition: 'mozTransitionEnd',\r\n                WebkitTransition: 'webkitTransitionEnd',\r\n                msTransition: 'msTransitionEnd'\r\n            };\r\n\r\n            for (var t in transitions) {\r\n                if (el.style[t] !== undefined) {\r\n                    transition = transitions[t];\r\n                }\r\n            }\r\n\r\n            KTUtil.one(el, transition, callback);\r\n        },\r\n\r\n        animationEnd: function(el, callback) {\r\n            var animation;\r\n            var animations = {\r\n                animation: 'animationend',\r\n                OAnimation: 'oAnimationEnd',\r\n                MozAnimation: 'mozAnimationEnd',\r\n                WebkitAnimation: 'webkitAnimationEnd',\r\n                msAnimation: 'msAnimationEnd'\r\n            };\r\n\r\n            for (var t in animations) {\r\n                if (el.style[t] !== undefined) {\r\n                    animation = animations[t];\r\n                }\r\n            }\r\n\r\n            KTUtil.one(el, animation, callback);\r\n        },\r\n\r\n        animateDelay: function(el, value) {\r\n            var vendors = ['webkit-', 'moz-', 'ms-', 'o-', ''];\r\n            for (var i = 0; i < vendors.length; i++) {\r\n                KTUtil.css(el, vendors[i] + 'animation-delay', value);\r\n            }\r\n        },\r\n\r\n        animateDuration: function(el, value) {\r\n            var vendors = ['webkit-', 'moz-', 'ms-', 'o-', ''];\r\n            for (var i = 0; i < vendors.length; i++) {\r\n                KTUtil.css(el, vendors[i] + 'animation-duration', value);\r\n            }\r\n        },\r\n\r\n        scrollTo: function(target, offset, duration) {\r\n            var duration = duration ? duration : 500;\r\n            var target = KTUtil.get(target);\r\n            var targetPos = target ? KTUtil.offset(target).top : 0;\r\n            var scrollPos = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0;\r\n            var from, to;\r\n\r\n            if (targetPos > scrollPos) {\r\n                from = targetPos;\r\n                to = scrollPos;\r\n            } else {\r\n                from = scrollPos;\r\n                to = targetPos;\r\n            }\r\n\r\n            if (offset) {\r\n                to += offset;\r\n            }\r\n\r\n            KTUtil.animate(from, to, duration, function(value) {\r\n                document.documentElement.scrollTop = value;\r\n                document.body.parentNode.scrollTop = value;\r\n                document.body.scrollTop = value;\r\n            }); //, easing, done\r\n        },\r\n\r\n        scrollTop: function(offset, duration) {\r\n            KTUtil.scrollTo(null, offset, duration);\r\n        },\r\n\r\n        isArray: function(obj) {\r\n            return obj && Array.isArray(obj);\r\n        },\r\n\r\n        ready: function(callback) {\r\n            if (document.attachEvent ? document.readyState === \"complete\" : document.readyState !== \"loading\") {\r\n                callback();\r\n            } else {\r\n                document.addEventListener('DOMContentLoaded', callback);\r\n            }\r\n        },\r\n\r\n        isEmpty: function(obj) {\r\n            for (var prop in obj) {\r\n                if (obj.hasOwnProperty(prop)) {\r\n                    return false;\r\n                }\r\n            }\r\n\r\n            return true;\r\n        },\r\n\r\n        numberString: function(nStr) {\r\n            nStr += '';\r\n            var x = nStr.split('.');\r\n            var x1 = x[0];\r\n            var x2 = x.length > 1 ? '.' + x[1] : '';\r\n            var rgx = /(\\d+)(\\d{3})/;\r\n            while (rgx.test(x1)) {\r\n                x1 = x1.replace(rgx, '$1' + ',' + '$2');\r\n            }\r\n            return x1 + x2;\r\n        },\r\n\r\n        detectIE: function() {\r\n            var ua = window.navigator.userAgent;\r\n\r\n            // Test values; Uncomment to check result …\r\n\r\n            // IE 10\r\n            // ua = 'Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; Trident/6.0)';\r\n\r\n            // IE 11\r\n            // ua = 'Mozilla/5.0 (Windows NT 6.3; Trident/7.0; rv:11.0) like Gecko';\r\n\r\n            // Edge 12 (Spartan)\r\n            // ua = 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.71 Safari/537.36 Edge/12.0';\r\n\r\n            // Edge 13\r\n            // ua = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2486.0 Safari/537.36 Edge/13.10586';\r\n\r\n            var msie = ua.indexOf('MSIE ');\r\n            if (msie > 0) {\r\n                // IE 10 or older => return version number\r\n                return parseInt(ua.substring(msie + 5, ua.indexOf('.', msie)), 10);\r\n            }\r\n\r\n            var trident = ua.indexOf('Trident/');\r\n            if (trident > 0) {\r\n                // IE 11 => return version number\r\n                var rv = ua.indexOf('rv:');\r\n                return parseInt(ua.substring(rv + 3, ua.indexOf('.', rv)), 10);\r\n            }\r\n\r\n            var edge = ua.indexOf('Edge/');\r\n            if (edge > 0) {\r\n                // Edge (IE 12+) => return version number\r\n                return parseInt(ua.substring(edge + 5, ua.indexOf('.', edge)), 10);\r\n            }\r\n\r\n            // other browser\r\n            return false;\r\n        },\r\n\r\n        isRTL: function() {\r\n            return (KTUtil.attr(KTUtil.get('html'), 'direction') == 'rtl');\r\n        },\r\n\r\n        //\r\n\r\n        // Scroller\r\n        scrollInit: function(element, options) {\r\n            if(!element) return;\r\n            // Define init function\r\n            function init() {\r\n                var ps;\r\n                var height;\r\n\r\n                if (options.height instanceof Function) {\r\n                    height = parseInt(options.height.call());\r\n                } else {\r\n                    height = parseInt(options.height);\r\n                }\r\n\r\n                // Destroy scroll on table and mobile modes\r\n                if ((options.mobileNativeScroll || options.disableForMobile) && KTUtil.isInResponsiveRange('tablet-and-mobile')) {\r\n                    ps = KTUtil.data(element).get('ps');\r\n                    if (ps) {\r\n                        if (options.resetHeightOnDestroy) {\r\n                            KTUtil.css(element, 'height', 'auto');\r\n                        } else {\r\n                            KTUtil.css(element, 'overflow', 'auto');\r\n                            if (height > 0) {\r\n                                KTUtil.css(element, 'height', height + 'px');\r\n                            }\r\n                        }\r\n\r\n                        ps.destroy();\r\n                        ps = KTUtil.data(element).remove('ps');\r\n                    } else if (height > 0){\r\n                        KTUtil.css(element, 'overflow', 'auto');\r\n                        KTUtil.css(element, 'height', height + 'px');\r\n                    }\r\n\r\n                    return;\r\n                }\r\n\r\n                if (height > 0) {\r\n                    KTUtil.css(element, 'height', height + 'px');\r\n                }\r\n\r\n                if (options.desktopNativeScroll) {\r\n                    KTUtil.css(element, 'overflow', 'auto');\r\n                    return;\r\n                }\r\n\r\n                // Init scroll\r\n                KTUtil.css(element, 'overflow', 'hidden');\r\n\r\n                ps = KTUtil.data(element).get('ps');\r\n                if (ps) {\r\n                    ps.update();\r\n                } else {\r\n                    KTUtil.addClass(element, 'kt-scroll');\r\n                    ps = new PerfectScrollbar(element, {\r\n                        wheelSpeed: 0.5,\r\n                        swipeEasing: true,\r\n                        wheelPropagation: (options.windowScroll === false ? false : true),\r\n                        minScrollbarLength: 40,\r\n                        maxScrollbarLength: 300,\r\n                        suppressScrollX: KTUtil.attr(element, 'data-scroll-x') != 'true' ? true : false\r\n                    });\r\n\r\n                    KTUtil.data(element).set('ps', ps);\r\n                }\r\n\r\n                // Remember scroll position in cookie\r\n                var uid = KTUtil.attr(element, 'id');\r\n\r\n                if (options.rememberPosition === true && Cookies && uid) {\r\n                    if (Cookies.get(uid)) {\r\n                        var pos = parseInt(Cookies.get(uid));\r\n\r\n                        if (pos > 0) {\r\n                            element.scrollTop = pos;\r\n                        }\r\n                    }\r\n\r\n                    element.addEventListener('ps-scroll-y', function() {\r\n                        Cookies.set(uid, element.scrollTop);\r\n                    });\r\n                }\r\n            }\r\n\r\n            // Init\r\n            init();\r\n\r\n            // Handle window resize\r\n            if (options.handleWindowResize) {\r\n                KTUtil.addResizeHandler(function() {\r\n                    init();\r\n                });\r\n            }\r\n        },\r\n\r\n        scrollUpdate: function(element) {\r\n            var ps = KTUtil.data(element).get('ps');\r\n            if (ps) {\r\n                ps.update();\r\n            }\r\n        },\r\n\r\n        scrollUpdateAll: function(parent) {\r\n            var scrollers = KTUtil.findAll(parent, '.ps');\r\n            for (var i = 0, len = scrollers.length; i < len; i++) {\r\n                KTUtil.scrollUpdate(scrollers[i]);\r\n            }\r\n        },\r\n\r\n        scrollDestroy: function(element) {\r\n            var ps = KTUtil.data(element).get('ps');\r\n            if (ps) {\r\n                ps.destroy();\r\n                ps = KTUtil.data(element).remove('ps');\r\n            }\r\n        },\r\n\r\n        setHTML: function(el, html) {\r\n            if (KTUtil.get(el)) {\r\n                KTUtil.get(el).innerHTML = html;\r\n            }\r\n        },\r\n\r\n        getHTML: function(el) {\r\n            if (KTUtil.get(el)) {\r\n                return KTUtil.get(el).innerHTML;\r\n            }\r\n        },\r\n\r\n        getDocumentHeight: function() {\r\n            var body = document.body;\r\n            var html = document.documentElement;\r\n\r\n            return Math.max( body.scrollHeight, body.offsetHeight, html.clientHeight, html.scrollHeight, html.offsetHeight );\r\n        },\r\n\r\n        getScrollTop: function() {\r\n            return  (document.scrollingElement || document.documentElement).scrollTop;\r\n        }\r\n    }\r\n}();\r\n\r\n// webpack support\r\nif ( true && typeof module.exports !== 'undefined') {\r\n    module.exports = KTUtil;\r\n}\r\n\r\n// Initialize KTUtil class on document ready\r\nKTUtil.ready(function() {\r\n    KTUtil.init();\r\n});\r\n\r\n// CSS3 Transitions only after page load(.kt-page-loading class added to body tag and remove with JS on page load)\r\nwindow.onload = function() {\r\n    KTUtil.removeClass(KTUtil.get('body'), 'kt-page--loading');\r\n}\r\n\n\n//# sourceURL=webpack:///../src/assets/js/global/components/base/util.js?");
  
  /***/ }),
  
  /***/ "../src/assets/js/global/components/base/wizard.js":
  /*!*********************************************************!*\
    !*** ../src/assets/js/global/components/base/wizard.js ***!
    \*********************************************************/
  /*! no static exports found */
  /***/ (function(module, exports, __webpack_require__) {
  
  eval("// plugin setup\r\nvar KTWizard = function(elementId, options) {\r\n    // Main object\r\n    var the = this;\r\n    var init = false;\r\n\r\n    // Get element object\r\n    var element = KTUtil.get(elementId);\r\n    var body = KTUtil.get('body');\r\n\r\n    if (!element) {\r\n        return;\r\n    }\r\n\r\n    // Default options\r\n    var defaultOptions = {\r\n        startStep: 1,\r\n        clickableSteps: true\r\n    };\r\n\r\n    ////////////////////////////\r\n    // ** Private Methods  ** //\r\n    ////////////////////////////\r\n\r\n    var Plugin = {\r\n        /**\r\n         * Construct\r\n         */\r\n\r\n        construct: function(options) {\r\n            if (KTUtil.data(element).has('wizard')) {\r\n                the = KTUtil.data(element).get('wizard');\r\n            } else {\r\n                // reset menu\r\n                Plugin.init(options);\r\n\r\n                // build menu\r\n                Plugin.build();\r\n\r\n                KTUtil.data(element).set('wizard', the);\r\n            }\r\n\r\n            return the;\r\n        },\r\n\r\n        /**\r\n         * Init wizard\r\n         */\r\n        init: function(options) {\r\n            the.element = element;\r\n            the.events = [];\r\n\r\n            // merge default and user defined options\r\n            the.options = KTUtil.deepExtend({}, defaultOptions, options);\r\n\r\n            // Elements\r\n            the.steps = KTUtil.findAll(element, '[data-ktwizard-type=\"step\"]');\r\n\r\n            the.btnSubmit = KTUtil.find(element, '[data-ktwizard-type=\"action-submit\"]');\r\n            the.btnNext = KTUtil.find(element, '[data-ktwizard-type=\"action-next\"]');\r\n            the.btnPrev = KTUtil.find(element, '[data-ktwizard-type=\"action-prev\"]');\r\n            the.btnLast = KTUtil.find(element, '[data-ktwizard-type=\"action-last\"]');\r\n            the.btnFirst = KTUtil.find(element, '[data-ktwizard-type=\"action-first\"]');\r\n\r\n            // Variables\r\n            the.events = [];\r\n            the.currentStep = 1;\r\n            the.stopped = false;\r\n            the.totalSteps = the.steps.length;\r\n\r\n            // Init current step\r\n            if (the.options.startStep > 1) {\r\n                Plugin.goTo(the.options.startStep);\r\n            }\r\n\r\n            // Init UI\r\n            Plugin.updateUI();\r\n        },\r\n\r\n        /**\r\n         * Build Form Wizard\r\n         */\r\n        build: function() {\r\n            // Next button event handler\r\n            KTUtil.addEvent(the.btnNext, 'click', function(e) {\r\n                e.preventDefault();\r\n                Plugin.goTo(Plugin.getNextStep(), true);\r\n            });\r\n\r\n            // Prev button event handler\r\n            KTUtil.addEvent(the.btnPrev, 'click', function(e) {\r\n                e.preventDefault();\r\n                Plugin.goTo(Plugin.getPrevStep(), true);\r\n            });\r\n\r\n            // First button event handler\r\n            KTUtil.addEvent(the.btnFirst, 'click', function(e) {\r\n                e.preventDefault();\r\n                Plugin.goTo(1, true);\r\n            });\r\n\r\n            // Last button event handler\r\n            KTUtil.addEvent(the.btnLast, 'click', function(e) {\r\n                e.preventDefault();\r\n                Plugin.goTo(the.totalSteps, true);\r\n            });\r\n\r\n            if (the.options.clickableSteps === true) {\r\n                KTUtil.on(element, '[data-ktwizard-type=\"step\"]', 'click', function() {\r\n                    var index = Array.prototype.indexOf.call(the.steps, this) + 1;\r\n                    if (index !== the.currentStep) {\r\n                        Plugin.goTo(index, true);\r\n                    }\r\n                });\r\n            }\r\n        },\r\n\r\n        /**\r\n         * Handles wizard click wizard\r\n         */\r\n        goTo: function(number, eventHandle) {\r\n            // Skip if this step is already shown\r\n            if (number === the.currentStep || number > the.totalSteps || number < 0) {\r\n                return;\r\n            }\r\n\r\n            // Validate step number\r\n            if (number) {\r\n                number = parseInt(number);\r\n            } else {\r\n                number = Plugin.getNextStep();\r\n            }\r\n\r\n            // Before next and prev events\r\n            var callback;\r\n\r\n            if (eventHandle === true) {\r\n                if (number > the.currentStep) {\r\n                    callback = Plugin.eventTrigger('beforeNext');\r\n                } else {\r\n                    callback = Plugin.eventTrigger('beforePrev');\r\n                }\r\n            }\r\n\r\n            // Skip if stopped\r\n            if (the.stopped === true) {\r\n                the.stopped = false;\r\n                return;\r\n            }\r\n\r\n            // Continue if no exit\r\n            if (callback !== false) {\r\n                // Before change\r\n                if (eventHandle === true) {\r\n                    Plugin.eventTrigger('beforeChange');\r\n                }\r\n\r\n                // Set current step\r\n                the.currentStep = number;\r\n\r\n                Plugin.updateUI();\r\n\r\n                // Trigger change event\r\n                if (eventHandle === true) {\r\n                    Plugin.eventTrigger('change');\r\n                }\r\n            }\r\n\r\n            // After next and prev events\r\n            if (eventHandle === true) {\r\n                if (number > the.startStep) {\r\n                    Plugin.eventTrigger('afterNext');\r\n                } else {\r\n                    Plugin.eventTrigger('afterPrev');\r\n                }\r\n            } else {\r\n                // this function called by method, stop for the next call\r\n                the.stopped = true;\r\n            }\r\n\r\n            return the;\r\n        },\r\n\r\n        /**\r\n         * Cancel\r\n         */\r\n        stop: function() {\r\n            the.stopped = true;\r\n        },\r\n\r\n        /**\r\n         * Resume\r\n         */\r\n        start: function() {\r\n            the.stopped = false;\r\n        },\r\n\r\n        /**\r\n         * Check last step\r\n         */\r\n        isLastStep: function() {\r\n            return the.currentStep === the.totalSteps;\r\n        },\r\n\r\n        /**\r\n         * Check first step\r\n         */\r\n        isFirstStep: function() {\r\n            return the.currentStep === 1;\r\n        },\r\n\r\n        /**\r\n         * Check between step\r\n         */\r\n        isBetweenStep: function() {\r\n            return Plugin.isLastStep() === false && Plugin.isFirstStep() === false;\r\n        },\r\n\r\n        /**\r\n         * Go to the first step\r\n         */\r\n        updateUI: function() {\r\n            var stepType = '';\r\n            var index = the.currentStep - 1;\r\n\r\n            if (Plugin.isLastStep()) {\r\n                stepType = 'last';\r\n            } else if (Plugin.isFirstStep()) {\r\n                stepType = 'first';\r\n            } else {\r\n                stepType = 'between';\r\n            }\r\n\r\n            KTUtil.attr(the.element, 'data-ktwizard-state', stepType);\r\n\r\n            // Steps\r\n            var steps = KTUtil.findAll(the.element, '[data-ktwizard-type=\"step\"]');\r\n\r\n            if (steps && steps.length > 0) {\r\n                for (var i = 0, len = steps.length; i < len; i++) {\r\n                    if (i == index) {\r\n                        KTUtil.attr(steps[i], 'data-ktwizard-state', 'current');\r\n                    } else {\r\n                        if (i < index) {\r\n                            KTUtil.attr(steps[i], 'data-ktwizard-state', 'done');\r\n                        } else {\r\n                            KTUtil.attr(steps[i], 'data-ktwizard-state', 'pending');\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n\r\n            // Steps Info\r\n            var stepsInfo = KTUtil.findAll(the.element, '[data-ktwizard-type=\"step-info\"]');\r\n            if (stepsInfo &&stepsInfo.length > 0) {\r\n                for (var i = 0, len = stepsInfo.length; i < len; i++) {\r\n                    if (i == index) {\r\n                        KTUtil.attr(stepsInfo[i], 'data-ktwizard-state', 'current');\r\n                    } else {\r\n                        KTUtil.removeAttr(stepsInfo[i], 'data-ktwizard-state');\r\n                    }\r\n                }\r\n            }\r\n\r\n            // Steps Content\r\n            var stepsContent = KTUtil.findAll(the.element, '[data-ktwizard-type=\"step-content\"]');\r\n            if (stepsContent&& stepsContent.length > 0) {\r\n                for (var i = 0, len = stepsContent.length; i < len; i++) {\r\n                    if (i == index) {\r\n                        KTUtil.attr(stepsContent[i], 'data-ktwizard-state', 'current');\r\n                    } else {\r\n                        KTUtil.removeAttr(stepsContent[i], 'data-ktwizard-state');\r\n                    }\r\n                }\r\n            }\r\n        },\r\n\r\n        /**\r\n         * Get next step\r\n         */\r\n        getNextStep: function() {\r\n            if (the.totalSteps >= (the.currentStep + 1)) {\r\n                return the.currentStep + 1;\r\n            } else {\r\n                return the.totalSteps;\r\n            }\r\n        },\r\n\r\n        /**\r\n         * Get prev step\r\n         */\r\n        getPrevStep: function() {\r\n            if ((the.currentStep - 1) >= 1) {\r\n                return the.currentStep - 1;\r\n            } else {\r\n                return 1;\r\n            }\r\n        },\r\n\r\n        /**\r\n         * Trigger events\r\n         */\r\n        eventTrigger: function(name, nested) {\r\n            //KTUtil.triggerCustomEvent(name);\r\n            for (var i = 0; i < the.events.length; i++) {\r\n                var event = the.events[i];\r\n                if (event.name == name) {\r\n                    if (event.one == true) {\r\n                        if (event.fired == false) {\r\n                            the.events[i].fired = true;\r\n                            return event.handler.call(this, the);\r\n                        }\r\n                    } else {\r\n                        return event.handler.call(this, the);\r\n                    }\r\n                }\r\n            }\r\n        },\r\n\r\n        addEvent: function(name, handler, one) {\r\n            the.events.push({\r\n                name: name,\r\n                handler: handler,\r\n                one: one,\r\n                fired: false\r\n            });\r\n\r\n            return the;\r\n        }\r\n    };\r\n\r\n    //////////////////////////\r\n    // ** Public Methods ** //\r\n    //////////////////////////\r\n\r\n    /**\r\n     * Set default options\r\n     */\r\n\r\n    the.setDefaults = function(options) {\r\n        defaultOptions = options;\r\n    };\r\n\r\n    /**\r\n     * Go to the next step\r\n     */\r\n    the.goNext = function(eventHandle) {\r\n        return Plugin.goTo(Plugin.getNextStep(), eventHandle);\r\n    };\r\n\r\n    /**\r\n     * Go to the prev step\r\n     */\r\n    the.goPrev = function(eventHandle) {\r\n        return Plugin.goTo(Plugin.getPrevStep(),eventHandle);\r\n    };\r\n\r\n    /**\r\n     * Go to the last step\r\n     */\r\n    the.goLast = function(eventHandle) {\r\n        return Plugin.goTo(the.totalSteps, eventHandle);\r\n    };\r\n\r\n    /**\r\n     * Go to the first step\r\n     */\r\n    the.goFirst = function(eventHandle) {\r\n        return Plugin.goTo(1, eventHandle);\r\n    };\r\n\r\n    /**\r\n     * Go to a step\r\n     */\r\n    the.goTo = function(number, eventHandle) {\r\n        return Plugin.goTo(number, eventHandle);\r\n    };\r\n\r\n    /**\r\n     * Cancel step\r\n     */\r\n    the.stop = function() {\r\n        return Plugin.stop();\r\n    };\r\n\r\n    /**\r\n     * Resume step\r\n     */\r\n    the.start = function() {\r\n        return Plugin.start();\r\n    };\r\n\r\n    /**\r\n     * Get current step number\r\n     */\r\n    the.getStep = function() {\r\n        return the.currentStep;\r\n    };\r\n\r\n    /**\r\n     * Check last step\r\n     */\r\n    the.isLastStep = function() {\r\n        return Plugin.isLastStep();\r\n    };\r\n\r\n    /**\r\n     * Check first step\r\n     */\r\n    the.isFirstStep = function() {\r\n        return Plugin.isFirstStep();\r\n    };\r\n\r\n    /**\r\n     * Attach event\r\n     */\r\n    the.on = function(name, handler) {\r\n        return Plugin.addEvent(name, handler);\r\n    };\r\n\r\n    /**\r\n     * Attach event that will be fired once\r\n     */\r\n    the.one = function(name, handler) {\r\n        return Plugin.addEvent(name, handler, true);\r\n    };\r\n\r\n    // Construct plugin\r\n    Plugin.construct.apply(the, [options]);\r\n\r\n    return the;\r\n};\r\n\r\n// webpack support\r\nif ( true && typeof module.exports !== 'undefined') {\r\n    module.exports = KTWizard;\r\n}\r\n\n\n//# sourceURL=webpack:///../src/assets/js/global/components/base/wizard.js?");
  
  /***/ }),
  
  /***/ "../src/assets/js/global/layout/chat.js":
  /*!**********************************************!*\
    !*** ../src/assets/js/global/layout/chat.js ***!
    \**********************************************/
  /*! no static exports found */
  /***/ (function(module, exports, __webpack_require__) {
  
  "use strict";
  eval("\r\n\r\n// Class definition\r\nvar KTChat = function () {\r\n\tvar initChat = function (parentEl) {\r\n\t\tvar messageListEl = KTUtil.find(parentEl, '.kt-scroll');\r\n\r\n\t\tif (!messageListEl) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// initialize perfect scrollbar(see:  https://github.com/utatti/perfect-scrollbar)\r\n\t\tKTUtil.scrollInit(messageListEl, {\r\n\t\t\twindowScroll: false, // allow browser scroll when the scroll reaches the end of the side\r\n\t\t\tmobileNativeScroll: true,  // enable native scroll for mobile\r\n\t\t\tdesktopNativeScroll: false, // disable native scroll and use custom scroll for desktop\r\n\t\t\tresetHeightOnDestroy: true,  // reset css height on scroll feature destroyed\r\n\t\t\thandleWindowResize: true, // recalculate hight on window resize\r\n\t\t\trememberPosition: true, // remember scroll position in cookie\r\n\t\t\theight: function() {  // calculate height\r\n\t\t\t\tvar height;\r\n\r\n\t\t\t\t// Mobile mode\r\n\t\t\t\tif (KTUtil.isInResponsiveRange('tablet-and-mobile')) {\r\n\t\t\t\t\treturn KTUtil.hasAttr(messageListEl, 'data-mobile-height') ? parseInt(KTUtil.attr(messageListEl, 'data-mobile-height')) : 300;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Desktop mode\r\n\t\t\t\tif (KTUtil.isInResponsiveRange('desktop') && KTUtil.hasAttr(messageListEl, 'data-height')) {\r\n\t\t\t\t\treturn parseInt(KTUtil.attr(messageListEl, 'data-height'));\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar chatEl = KTUtil.find(parentEl, '.kt-chat');\r\n\t\t\t\tvar portletHeadEl = KTUtil.find(parentEl, '.kt-portlet > .kt-portlet__head');\r\n\t\t\t\tvar portletBodyEl = KTUtil.find(parentEl, '.kt-portlet > .kt-portlet__body');\r\n\t\t\t\tvar portletFootEl = KTUtil.find(parentEl, '.kt-portlet > .kt-portlet__foot');\r\n\r\n\t\t\t\tif (KTUtil.isInResponsiveRange('desktop')) {\r\n\t\t\t\t\theight = KTLayout.getContentHeight();\r\n\t\t\t\t} else {\r\n\t\t\t\t\theight = KTUtil.getViewPort().height;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (chatEl) {\r\n\t\t\t\t\theight = height - parseInt(KTUtil.css(chatEl, 'margin-top')) - parseInt(KTUtil.css(chatEl, 'margin-bottom'));\r\n\t\t\t\t\theight = height - parseInt(KTUtil.css(chatEl, 'padding-top')) - parseInt(KTUtil.css(chatEl, 'padding-bottom'));\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (portletHeadEl) {\r\n\t\t\t\t\theight = height - parseInt(KTUtil.css(portletHeadEl, 'height'));\r\n\t\t\t\t\theight = height - parseInt(KTUtil.css(portletHeadEl, 'margin-top')) - parseInt(KTUtil.css(portletHeadEl, 'margin-bottom'));\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (portletBodyEl) {\r\n\t\t\t\t\theight = height - parseInt(KTUtil.css(portletBodyEl, 'margin-top')) - parseInt(KTUtil.css(portletBodyEl, 'margin-bottom'));\r\n\t\t\t\t\theight = height - parseInt(KTUtil.css(portletBodyEl, 'padding-top')) - parseInt(KTUtil.css(portletBodyEl, 'padding-bottom'));\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (portletFootEl) {\r\n\t\t\t\t\theight = height - parseInt(KTUtil.css(portletFootEl, 'height'));\r\n\t\t\t\t\theight = height - parseInt(KTUtil.css(portletFootEl, 'margin-top')) - parseInt(KTUtil.css(portletFootEl, 'margin-bottom'));\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// remove additional space\r\n\t\t\t\theight = height - 5;\r\n\r\n\t\t\t\treturn height;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\t// messaging\r\n\t\tvar handleMessaging = function() {\r\n\t\t\tvar scrollEl = KTUtil.find(parentEl, '.kt-scroll');\r\n\t\t\tvar messagesEl = KTUtil.find(parentEl, '.kt-chat__messages');\r\n            var textarea = KTUtil.find(parentEl, '.kt-chat__input textarea');\r\n\r\n            if (textarea.value.length === 0 ) {\r\n                return;\r\n            }\r\n\r\n\t\t\tvar node = document.createElement(\"DIV\");\r\n\t\t\tKTUtil.addClass(node, 'kt-chat__message kt-chat__message--brand kt-chat__message--right');\r\n\r\n\t\t\tvar html =\r\n\t\t\t\t'<div class=\"kt-chat__user\">' +\r\n\t\t\t\t\t'<span class=\"kt-chat__datetime\">Just now</span>' +\r\n\t\t\t\t\t'<a href=\"#\" class=\"kt-chat__username\">Jason Muller</span></a>' +\r\n\t\t\t\t\t'<span class=\"kt-media kt-media--circle kt-media--sm\">' +\r\n\t\t\t\t\t\t'<img src=\"./assets/media/users/100_12.jpg\" alt=\"image\">'  +\r\n\t\t\t\t\t'</span>' +\r\n\t\t\t\t'</div>' +\r\n\t\t\t\t'<div class=\"kt-chat__text kt-bg-light-brand\">' +\r\n\t\t\t\t\ttextarea.value\r\n\t\t\t\t'</div>';\r\n\r\n\t\t\tKTUtil.setHTML(node, html);\r\n\t\t\tmessagesEl.appendChild(node);\r\n\t\t\ttextarea.value = '';\r\n\t\t\tscrollEl.scrollTop = parseInt(KTUtil.css(messagesEl, 'height'));\r\n\r\n\t\t\tvar ps;\r\n\t\t\tif (ps = KTUtil.data(scrollEl).get('ps')) {\r\n\t\t\t\tps.update();\r\n\t\t\t}\r\n\r\n\t\t\tsetTimeout(function() {\r\n\t\t\t\tvar node = document.createElement(\"DIV\");\r\n\t\t\t\tKTUtil.addClass(node, 'kt-chat__message kt-chat__message--success');\r\n\r\n\t\t\t\tvar html =\r\n\t\t\t\t\t'<div class=\"kt-chat__user\">' +\r\n\t\t\t\t\t\t'<span class=\"kt-media kt-media--circle kt-media--sm\">' +\r\n\t\t\t\t\t\t\t'<img src=\"./assets/media/users/100_13.jpg\" alt=\"image\">'  +\r\n\t\t\t\t\t\t'</span>' +\r\n\t\t\t\t\t\t'<a href=\"#\" class=\"kt-chat__username\">Max Born</span></a>' +\r\n\t\t\t\t\t\t'<span class=\"kt-chat__datetime\">Just now</span>' +\r\n\t\t\t\t\t'</div>' +\r\n\t\t\t\t\t'<div class=\"kt-chat__text kt-bg-light-success\">' +\r\n\t\t\t\t\t'Right before vacation season we have the next Big Deal for you. <br>Book the car of your dreams and save up to <b>25%*</b> worldwide.' +\r\n\t\t\t\t\t'</div>';\r\n\r\n\t\t\t\tKTUtil.setHTML(node, html);\r\n\t\t\t\tmessagesEl.appendChild(node);\r\n\t\t\t\ttextarea.value = '';\r\n\t\t\t\tscrollEl.scrollTop = parseInt(KTUtil.css(messagesEl, 'height'));\r\n\r\n\t\t\t\tvar ps;\r\n\t\t\t\tif (ps = KTUtil.data(scrollEl).get('ps')) {\r\n\t\t\t\t\tps.update();\r\n\t\t\t\t}\r\n\t\t\t}, 2000);\r\n\t\t}\r\n\r\n\t\t// attach events\r\n\t\tKTUtil.on(parentEl, '.kt-chat__input textarea', 'keydown', function(e) {\r\n\t\t\tif (e.keyCode == 13) {\r\n\t\t\t\thandleMessaging();\r\n\t\t\t\te.preventDefault();\r\n\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tKTUtil.on(parentEl, '.kt-chat__input .kt-chat__reply', 'click', function(e) {\r\n\t\t\thandleMessaging();\r\n\t\t});\r\n\t}\r\n\r\n\treturn {\r\n\t\t// public functions\r\n\t\tinit: function() {\r\n\t\t\t// init modal chat example\r\n\t\t\tinitChat( KTUtil.getByID('kt_chat_modal'));\r\n\r\n\t\t\t// trigger click to show popup modal chat on page load\r\n\t\t\tif (encodeURI(window.location.hostname) == 'keenthemes.com' || encodeURI(window.location.hostname) == 'www.keenthemes.com') {\r\n\t\t\t\tsetTimeout(function() {\r\n\t\t            if (!Cookies.get('kt_app_chat_shown')) {\r\n\t\t                var expires = new Date(new Date().getTime() + 60 * 60 * 1000); // expire in 60 minutes from now\r\n\t\t                Cookies.set('kt_app_chat_shown', 1, { expires: expires });\r\n\t\t                KTUtil.getByID('kt_app_chat_launch_btn').click();\r\n\t\t            }\r\n\t\t        }, 2000);\r\n\t        }\r\n        },\r\n\r\n        setup: function(element) {\r\n            initChat(element);\r\n        }\r\n\t};\r\n}();\r\n\r\n// webpack support\r\nif (true) {\r\n\tmodule.exports = KTChat;\r\n}\r\n\r\nKTUtil.ready(function() {\r\n\tKTChat.init();\r\n});\r\n\n\n//# sourceURL=webpack:///../src/assets/js/global/layout/chat.js?");
  
  /***/ }),
  
  /***/ "../src/assets/js/global/layout/demo-panel.js":
  /*!****************************************************!*\
    !*** ../src/assets/js/global/layout/demo-panel.js ***!
    \****************************************************/
  /*! no static exports found */
  /***/ (function(module, exports, __webpack_require__) {
  
  "use strict";
  eval("\r\n\r\nvar KTDemoPanel = function() {\r\n    var demoPanel;\r\n    var offcanvas;\r\n\r\n    var init = function() {\r\n        offcanvas = new KTOffcanvas(demoPanel, {\r\n            overlay: true,\r\n            baseClass: 'kt-demo-panel',\r\n            closeBy: 'kt_demo_panel_close',\r\n            toggleBy: 'kt_demo_panel_toggle'\r\n        });\r\n\r\n        var head = KTUtil.find(demoPanel, '.kt-demo-panel__head');\r\n        var body = KTUtil.find(demoPanel, '.kt-demo-panel__body');\r\n\r\n        KTUtil.scrollInit(body, {\r\n            disableForMobile: true,\r\n            resetHeightOnDestroy: true,\r\n            handleWindowResize: true,\r\n            height: function() {\r\n                var height = parseInt(KTUtil.getViewPort().height);\r\n\r\n                if (head) {\r\n                    height = height - parseInt(KTUtil.actualHeight(head));\r\n                    height = height - parseInt(KTUtil.css(head, 'marginBottom'));\r\n                }\r\n\r\n                height = height - parseInt(KTUtil.css(demoPanel, 'paddingTop'));\r\n                height = height - parseInt(KTUtil.css(demoPanel, 'paddingBottom'));\r\n\r\n                return height;\r\n            }\r\n        });\r\n\r\n        if (typeof offcanvas !== 'undefined' && offcanvas.length === 0) {\r\n            offcanvas.on('hide', function() {\r\n                var expires = new Date(new Date().getTime() + 60 * 60 * 1000); // expire in 60 minutes from now\r\n                Cookies.set('kt_demo_panel_shown', 1, {expires: expires});\r\n            });\r\n        }\r\n    }\r\n\r\n    var remind = function() {\r\n        if (!(encodeURI(window.location.hostname) == 'keenthemes.com' || encodeURI(window.location.hostname) == 'www.keenthemes.com')) {\r\n            return;\r\n        }\r\n\r\n        setTimeout(function() {\r\n            if (!Cookies.get('kt_demo_panel_shown')) {\r\n                var expires = new Date(new Date().getTime() + 15 * 60 * 1000); // expire in 15 minutes from now\r\n                Cookies.set('kt_demo_panel_shown', 1, { expires: expires });\r\n                offcanvas.show();\r\n            }\r\n        }, 4000);\r\n    }\r\n\r\n    return {\r\n        init: function() {\r\n            demoPanel = KTUtil.getByID('kt_demo_panel');\r\n\r\n            init();\r\n            remind();\r\n        }\r\n    };\r\n}();\r\n\r\n$(document).ready(function() {\r\n    KTDemoPanel.init();\r\n});\r\n\n\n//# sourceURL=webpack:///../src/assets/js/global/layout/demo-panel.js?");
  
  /***/ }),
  
  /***/ "../src/assets/js/global/layout/layout.js":
  /*!************************************************!*\
    !*** ../src/assets/js/global/layout/layout.js ***!
    \************************************************/
  /*! no static exports found */
  /***/ (function(module, exports, __webpack_require__) {
  
  "use strict";
  eval("\r\n\r\nvar KTLayout = function() {\r\n    var body;\r\n\r\n    var header;\r\n    var headerMenu;\r\n    var headerMenuOffcanvas;\r\n\r\n    var asideMenu;\r\n    var asideMenuOffcanvas;\r\n    var asideToggler;\r\n\r\n    var asideSecondary;\r\n    var asideSecondaryToggler;\r\n\r\n    var scrollTop;\r\n\r\n    var pageStickyPortlet;\r\n\r\n    // Header\r\n    var initHeader = function() {\r\n        var tmp;\r\n        var headerEl = KTUtil.get('kt_header');\r\n        var options = {\r\n            classic: {\r\n                desktop: true,\r\n                mobile: false\r\n            },\r\n            offset: {},\r\n            minimize: {\r\n                desktop: {\r\n                    on: 'kt-header--minimize'\r\n                },\r\n                mobile: {\r\n                    on: 'kt-header--minimize'\r\n                }\r\n            }\r\n        };\r\n\r\n        if (tmp = KTUtil.attr(headerEl, 'data-ktheader-minimize-offset')) {\r\n            options.offset.desktop = tmp;\r\n        }\r\n\r\n        if (tmp = KTUtil.attr(headerEl, 'data-ktheader-minimize-mobile-offset')) {\r\n            options.offset.mobile = tmp;\r\n        }\r\n\r\n        header = new KTHeader('kt_header', options);\r\n    }\r\n\r\n    // Header Menu\r\n    var initHeaderMenu = function() {\r\n        // init aside left offcanvas\r\n        headerMenuOffcanvas = new KTOffcanvas('kt_header_menu_wrapper', {\r\n            overlay: true,\r\n            baseClass: 'kt-header-menu-wrapper',\r\n            closeBy: 'kt_header_menu_mobile_close_btn',\r\n            toggleBy: {\r\n                target: 'kt_header_mobile_toggler',\r\n                state: 'kt-header-mobile__toolbar-toggler--active'\r\n            }\r\n        });\r\n\r\n        headerMenu = new KTMenu('kt_header_menu', {\r\n            submenu: {\r\n                desktop: 'dropdown',\r\n                tablet: 'accordion',\r\n                mobile: 'accordion'\r\n            },\r\n            accordion: {\r\n                slideSpeed: 200, // accordion toggle slide speed in milliseconds\r\n                expandAll: false // allow having multiple expanded accordions in the menu\r\n            }\r\n        });\r\n    }\r\n\r\n    // Header Topbar\r\n    var initHeaderTopbar = function() {\r\n        asideToggler = new KTToggle('kt_header_mobile_topbar_toggler', {\r\n            target: 'body',\r\n            targetState: 'kt-header__topbar--mobile-on',\r\n            togglerState: 'kt-header-mobile__toolbar-topbar-toggler--active'\r\n        });\r\n    }\r\n\r\n    // Aside\r\n    var initAside = function() {\r\n        // init aside left offcanvas\r\n        var asidBrandHover = false;\r\n        var aside = KTUtil.get('kt_aside');\r\n        var asideBrand = KTUtil.get('kt_aside_brand');\r\n        var asideOffcanvasClass = KTUtil.hasClass(aside, 'kt-aside--offcanvas-default') ? 'kt-aside--offcanvas-default' : 'kt-aside';\r\n\r\n        asideMenuOffcanvas = new KTOffcanvas('kt_aside', {\r\n            baseClass: asideOffcanvasClass,\r\n            overlay: true,\r\n            closeBy: 'kt_aside_close_btn',\r\n            toggleBy: {\r\n                target: 'kt_aside_mobile_toggler',\r\n                state: 'kt-header-mobile__toolbar-toggler--active'\r\n            }\r\n        });\r\n\r\n        // Handle minimzied aside hover\r\n        if (KTUtil.hasClass(body, 'kt-aside--fixed')) {\r\n            var insideTm;\r\n            var outsideTm;\r\n\r\n            KTUtil.addEvent(aside, 'mouseenter', function(e) {\r\n                e.preventDefault();\r\n\r\n                if (KTUtil.isInResponsiveRange('desktop') === false) {\r\n                    return;\r\n                }\r\n\r\n                if (outsideTm) {\r\n                    clearTimeout(outsideTm);\r\n                    outsideTm = null;\r\n                }\r\n\r\n                insideTm = setTimeout(function() {\r\n                    if (KTUtil.hasClass(body, 'kt-aside--minimize') && KTUtil.isInResponsiveRange('desktop')) {\r\n                        KTUtil.removeClass(body, 'kt-aside--minimize');\r\n\r\n                        // Minimizing class\r\n                        KTUtil.addClass(body, 'kt-aside--minimizing');\r\n                        KTUtil.transitionEnd(body, function() {\r\n                            KTUtil.removeClass(body, 'kt-aside--minimizing');\r\n                        });\r\n\r\n                        // Hover class\r\n                        KTUtil.addClass(body, 'kt-aside--minimize-hover');\r\n                        asideMenu.scrollUpdate();\r\n                        asideMenu.scrollTop();\r\n                    }\r\n                }, 50);\r\n            });\r\n\r\n            KTUtil.addEvent(aside, 'mouseleave', function(e) {\r\n                e.preventDefault();\r\n\r\n                if (KTUtil.isInResponsiveRange('desktop') === false) {\r\n                    return;\r\n                }\r\n\r\n                if (insideTm) {\r\n                    clearTimeout(insideTm);\r\n                    insideTm = null;\r\n                }\r\n\r\n                outsideTm = setTimeout(function() {\r\n                    if (KTUtil.hasClass(body, 'kt-aside--minimize-hover') && KTUtil.isInResponsiveRange('desktop')) {\r\n                        KTUtil.removeClass(body, 'kt-aside--minimize-hover');\r\n                        KTUtil.addClass(body, 'kt-aside--minimize');\r\n\r\n                        // Minimizing class\r\n                        KTUtil.addClass(body, 'kt-aside--minimizing');\r\n                        KTUtil.transitionEnd(body, function() {\r\n                            KTUtil.removeClass(body, 'kt-aside--minimizing');\r\n                        });\r\n\r\n                        // Hover class\r\n                        asideMenu.scrollUpdate();\r\n                        asideMenu.scrollTop();\r\n                    }\r\n                }, 100);\r\n            });\r\n        }\r\n    }\r\n\r\n    // Aside menu\r\n    var initAsideMenu = function() {\r\n        // Init aside menu\r\n        var menu = KTUtil.get('kt_aside_menu');\r\n        var menuDesktopMode = (KTUtil.attr(menu, 'data-ktmenu-dropdown') === '1' ? 'dropdown' : 'accordion');\r\n\r\n        var scroll;\r\n        if (KTUtil.attr(menu, 'data-ktmenu-scroll') === '1') {\r\n            scroll = {\r\n                rememberPosition: true, // remember position on page reload\r\n                height: function() {  // calculate available scrollable area height\r\n                    var height;\r\n\r\n                    if (KTUtil.isInResponsiveRange('desktop')) {\r\n                        height =\r\n                            parseInt(KTUtil.getViewPort().height) -\r\n                            parseInt(KTUtil.actualHeight('kt_aside_brand')) -\r\n                            parseInt(KTUtil.getByID('kt_aside_footer') ? KTUtil.actualHeight('kt_aside_footer') : 0);\r\n                    } else {\r\n                        height =\r\n                            parseInt(KTUtil.getViewPort().height) -\r\n                            parseInt(KTUtil.getByID('kt_aside_footer') ? KTUtil.actualHeight('kt_aside_footer') : 0);\r\n                    }\r\n\r\n                    height = height - (parseInt(KTUtil.css(menu, 'marginBottom')) + parseInt(KTUtil.css(menu, 'marginTop')));\r\n\r\n                    return height;\r\n                }\r\n            };\r\n        }\r\n\r\n        asideMenu = new KTMenu('kt_aside_menu', {\r\n            // vertical scroll\r\n            scroll: scroll,\r\n\r\n            // submenu setup\r\n            submenu: {\r\n                desktop: menuDesktopMode,\r\n                tablet: 'accordion', // menu set to accordion in tablet mode\r\n                mobile: 'accordion' // menu set to accordion in mobile mode\r\n            },\r\n\r\n            //accordion setup\r\n            accordion: {\r\n                expandAll: false // allow having multiple expanded accordions in the menu\r\n            }\r\n        });\r\n    }\r\n\r\n    // Sidebar toggle\r\n    var initAsideToggler = function() {\r\n        if (!KTUtil.get('kt_aside_toggler')) {\r\n            return;\r\n        }\r\n\r\n        asideToggler = new KTToggle('kt_aside_toggler', {\r\n            target: 'body',\r\n            targetState: 'kt-aside--minimize',\r\n            togglerState: 'kt-aside__brand-aside-toggler--active'\r\n        });\r\n\r\n        asideToggler.on('toggle', function(toggle) {\r\n            KTUtil.addClass(body, 'kt-aside--minimizing');\r\n\r\n            if (KTUtil.get('kt_page_portlet')) {\r\n                pageStickyPortlet.updateSticky();\r\n            }\r\n\r\n            KTUtil.transitionEnd(body, function() {\r\n                KTUtil.removeClass(body, 'kt-aside--minimizing');\r\n            });\r\n\r\n            headerMenu.pauseDropdownHover(800);\r\n            asideMenu.pauseDropdownHover(800);\r\n\r\n            // Remember state in cookie\r\n            Cookies.set('kt_aside_toggle_state', toggle.getState());\r\n            // to set default minimized left aside use this cookie value in your\r\n            // server side code and add \"kt-brand--minimize kt-aside--minimize\" classes to\r\n            // the body tag in order to initialize the minimized left aside mode during page loading.\r\n        });\r\n\r\n        asideToggler.on('beforeToggle', function(toggle) {\r\n            var body = KTUtil.get('body');\r\n            if (KTUtil.hasClass(body, 'kt-aside--minimize') === false && KTUtil.hasClass(body, 'kt-aside--minimize-hover')) {\r\n                KTUtil.removeClass(body, 'kt-aside--minimize-hover');\r\n            }\r\n        });\r\n    }\r\n\r\n    // Scrolltop\r\n    var initScrolltop = function() {\r\n        var scrolltop = new KTScrolltop('kt_scrolltop', {\r\n            offset: 300,\r\n            speed: 600\r\n        });\r\n    }\r\n\r\n    // Init page sticky portlet\r\n    var initPageStickyPortlet = function() {\r\n\r\n        return new KTPortlet('kt_page_portlet', {\r\n\t\t\tsticky: {\r\n\t\t\t\toffset: parseInt(KTUtil.css(KTUtil.get('kt_header'), 'height')) + 200,\r\n\t\t\t\tzIndex: 90,\r\n\t\t\t\tposition: {\r\n\t\t\t\t\ttop: function() {\r\n\t\t\t\t\t\tvar pos = 0;\r\n\r\n\t\t\t\t\t\tif (KTUtil.isInResponsiveRange('desktop')) {\r\n\t\t\t\t\t\t\tif (KTUtil.hasClass(body, 'kt-header--fixed')) {\r\n\t\t\t\t\t\t\t\tpos = 55; // fixed header height\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tif (KTUtil.hasClass(body, 'kt-subheader--fixed') && KTUtil.get('kt_subheader')) {\r\n\t\t\t\t\t\t\t\tpos = pos + 54; // sticky subheader height\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tif (KTUtil.hasClass(body, 'kt-header-mobile--fixed')) {\r\n\t\t\t\t\t\t\t\tpos = parseInt(KTUtil.css(KTUtil.get('kt_header_mobile'), 'height'));\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\treturn pos;\r\n\t\t\t\t\t},\r\n\t\t\t\t\tleft: function(portlet) {\r\n\t\t\t\t\t\tvar porletEl = portlet.getSelf();\r\n\r\n\t\t\t\t\t\treturn KTUtil.offset(porletEl).left;\r\n\t\t\t\t\t},\r\n\t\t\t\t\tright: function(portlet) {\r\n\t\t\t\t\t\tvar porletEl = portlet.getSelf();\r\n\r\n\t\t\t\t\t\tvar portletWidth = parseInt(KTUtil.css(porletEl, 'width'));\r\n\t\t\t\t\t\tvar bodyWidth = parseInt(KTUtil.css(KTUtil.get('body'), 'width'));\r\n\t\t\t\t\t\tvar portletOffsetLeft = KTUtil.offset(porletEl).left;\r\n\r\n\t\t\t\t\t\treturn bodyWidth - portletWidth - portletOffsetLeft;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n    }\r\n\r\n\t// Calculate content available full height\r\n\tvar getContentHeight = function() {\r\n\t\tvar height;\r\n\r\n\t\theight = KTUtil.getViewPort().height;\r\n\r\n\t\tif (KTUtil.getByID('kt_header')) {\r\n            height = height - KTUtil.actualHeight('kt_header');\r\n\t\t}\r\n\r\n\t\tif (KTUtil.getByID('kt_subheader')) {\r\n            height = height - KTUtil.actualHeight('kt_subheader');\r\n\t\t}\r\n\r\n\t\tif (KTUtil.getByID('kt_footer')) {\r\n\t\t\theight = height - parseInt(KTUtil.css('kt_footer', 'height'));\r\n\t\t}\r\n\r\n\t\tif (KTUtil.getByID('kt_content')) {\r\n\t\t\theight = height - parseInt(KTUtil.css('kt_content', 'padding-top')) - parseInt(KTUtil.css('kt_content', 'padding-bottom'));\r\n        }\r\n\r\n        return height;\r\n\t}\r\n\r\n    return {\r\n        init: function() {\r\n            body = KTUtil.get('body');\r\n\r\n            this.initHeader();\r\n            this.initAside();\r\n            this.initPageStickyPortlet();\r\n\r\n            // Non functional links notice(can be removed in production)\r\n\t\t\t$('#kt_aside_menu, #kt_header_menu').on('click', '.kt-menu__link[href=\"#\"]', function(e) {\r\n\t\t\t\tswal.fire(\"\", \"You have clicked on a non-functional dummy link!\");\r\n\r\n\t\t\t\te.preventDefault();\r\n\t\t\t});\r\n        },\r\n\r\n        initHeader: function() {\r\n            initHeader();\r\n            initHeaderMenu();\r\n            initHeaderTopbar();\r\n            initScrolltop();\r\n        },\r\n\r\n        initAside: function() {\r\n            initAside();\r\n            initAsideMenu();\r\n            initAsideToggler();\r\n\r\n            this.onAsideToggle(function(e) {\r\n                // Update sticky portlet\r\n                if (pageStickyPortlet) {\r\n                    pageStickyPortlet.updateSticky();\r\n                }\r\n\r\n                // Reload datatable\r\n                var datatables = $('.kt-datatable');\r\n                if (datatables) {\r\n                    datatables.each(function() {\r\n                        $(this).KTDatatable('redraw');\r\n                    });\r\n                }\r\n            });\r\n        },\r\n\r\n        initAsideSecondary: function() {\r\n            initAsideSecondary();\r\n        },\r\n\r\n        initPageStickyPortlet: function() {\r\n            if (!KTUtil.get('kt_page_portlet')) {\r\n                return;\r\n            }\r\n\r\n            pageStickyPortlet = initPageStickyPortlet();\r\n            pageStickyPortlet.initSticky();\r\n\r\n            KTUtil.addResizeHandler(function(){\r\n                pageStickyPortlet.updateSticky();\r\n            });\r\n\r\n            initPageStickyPortlet();\r\n        },\r\n\r\n        getAsideMenu: function() {\r\n            return asideMenu;\r\n        },\r\n\r\n        onAsideToggle: function(handler) {\r\n            if (typeof asideToggler.element !== 'undefined') {\r\n                asideToggler.on('toggle', handler);\r\n            }\r\n        },\r\n\r\n        getAsideToggler: function() {\r\n            return asideToggler;\r\n        },\r\n\r\n        openAsideSecondary: function() {\r\n            asideSecondaryToggler.toggleOn();\r\n        },\r\n\r\n        closeAsideSecondary: function() {\r\n            asideSecondaryToggler.toggleOff();\r\n        },\r\n\r\n        getAsideSecondaryToggler: function() {\r\n            return asideSecondaryToggler;\r\n        },\r\n\r\n        onAsideSecondaryToggle: function(handler) {\r\n            if (asideSecondaryToggler) {\r\n                asideSecondaryToggler.on('toggle', handler);\r\n            }\r\n        },\r\n\r\n        closeMobileAsideMenuOffcanvas: function() {\r\n            if (KTUtil.isMobileDevice()) {\r\n                asideMenuOffcanvas.hide();\r\n            }\r\n        },\r\n\r\n        closeMobileHeaderMenuOffcanvas: function() {\r\n            if (KTUtil.isMobileDevice()) {\r\n                headerMenuOffcanvas.hide();\r\n            }\r\n        },\r\n\r\n        getContentHeight: function() {\r\n\t\t\treturn getContentHeight();\r\n\t\t}\r\n    };\r\n}();\r\n\r\n// webpack support\r\nif (true) {\r\n    module.exports = KTLayout;\r\n}\r\n\r\n$(document).ready(function() {\r\n    KTLayout.init();\r\n});\r\n\n\n//# sourceURL=webpack:///../src/assets/js/global/layout/layout.js?");
  
  /***/ }),
  
  /***/ "../src/assets/js/global/layout/offcanvas-panel.js":
  /*!*********************************************************!*\
    !*** ../src/assets/js/global/layout/offcanvas-panel.js ***!
    \*********************************************************/
  /*! no static exports found */
  /***/ (function(module, exports, __webpack_require__) {
  
  "use strict";
  eval("\r\n\r\nvar KTOffcanvasPanel = function() {\r\n    var notificationPanel;\r\n    var quickActionsPanel;\r\n    var profilePanel;\r\n    var searchPanel;\r\n\r\n    var initNotifications = function() {\r\n        var head = KTUtil.find(notificationPanel, '.kt-offcanvas-panel__head');\r\n        var body = KTUtil.find(notificationPanel, '.kt-offcanvas-panel__body');\r\n\r\n        var offcanvas = new KTOffcanvas(notificationPanel, {\r\n            overlay: true,\r\n            baseClass: 'kt-offcanvas-panel',\r\n            closeBy: 'kt_offcanvas_toolbar_notifications_close',\r\n            toggleBy: 'kt_offcanvas_toolbar_notifications_toggler_btn'\r\n        });\r\n\r\n        KTUtil.scrollInit(body, {\r\n            disableForMobile: true,\r\n            resetHeightOnDestroy: true,\r\n            handleWindowResize: true,\r\n            height: function() {\r\n                var height = parseInt(KTUtil.getViewPort().height);\r\n\r\n                if (head) {\r\n                    height = height - parseInt(KTUtil.actualHeight(head));\r\n                    height = height - parseInt(KTUtil.css(head, 'marginBottom'));\r\n                }\r\n\r\n                height = height - parseInt(KTUtil.css(notificationPanel, 'paddingTop'));\r\n                height = height - parseInt(KTUtil.css(notificationPanel, 'paddingBottom'));\r\n\r\n                return height;\r\n            }\r\n        });\r\n    }\r\n\r\n    var initQucikActions = function() {\r\n        var head = KTUtil.find(quickActionsPanel, '.kt-offcanvas-panel__head');\r\n        var body = KTUtil.find(quickActionsPanel, '.kt-offcanvas-panel__body');\r\n\r\n        var offcanvas = new KTOffcanvas(quickActionsPanel, {\r\n            overlay: true,\r\n            baseClass: 'kt-offcanvas-panel',\r\n            closeBy: 'kt_offcanvas_toolbar_quick_actions_close',\r\n            toggleBy: 'kt_offcanvas_toolbar_quick_actions_toggler_btn'\r\n        });\r\n\r\n        KTUtil.scrollInit(body, {\r\n            disableForMobile: true,\r\n            resetHeightOnDestroy: true,\r\n            handleWindowResize: true,\r\n            height: function() {\r\n                var height = parseInt(KTUtil.getViewPort().height);\r\n\r\n                if (head) {\r\n                    height = height - parseInt(KTUtil.actualHeight(head));\r\n                    height = height - parseInt(KTUtil.css(head, 'marginBottom'));\r\n                }\r\n\r\n                height = height - parseInt(KTUtil.css(quickActionsPanel, 'paddingTop'));\r\n                height = height - parseInt(KTUtil.css(quickActionsPanel, 'paddingBottom'));\r\n\r\n                return height;\r\n            }\r\n        });\r\n    }\r\n\r\n    var initProfile = function() {\r\n        var head = KTUtil.find(profilePanel, '.kt-offcanvas-panel__head');\r\n        var body = KTUtil.find(profilePanel, '.kt-offcanvas-panel__body');\r\n\r\n        var offcanvas = new KTOffcanvas(profilePanel, {\r\n            overlay: true,\r\n            baseClass: 'kt-offcanvas-panel',\r\n            closeBy: 'kt_offcanvas_toolbar_profile_close',\r\n            toggleBy: 'kt_offcanvas_toolbar_profile_toggler_btn'\r\n        });\r\n\r\n        KTUtil.scrollInit(body, {\r\n            disableForMobile: true,\r\n            resetHeightOnDestroy: true,\r\n            handleWindowResize: true,\r\n            height: function() {\r\n                var height = parseInt(KTUtil.getViewPort().height);\r\n\r\n                if (head) {\r\n                    height = height - parseInt(KTUtil.actualHeight(head));\r\n                    height = height - parseInt(KTUtil.css(head, 'marginBottom'));\r\n                }\r\n\r\n                height = height - parseInt(KTUtil.css(profilePanel, 'paddingTop'));\r\n                height = height - parseInt(KTUtil.css(profilePanel, 'paddingBottom'));\r\n\r\n                return height;\r\n            }\r\n        });\r\n    }\r\n\r\n    var initSearch = function() {\r\n        var head = KTUtil.find(searchPanel, '.kt-offcanvas-panel__head');\r\n        var body = KTUtil.find(searchPanel, '.kt-offcanvas-panel__body');\r\n        var search = KTUtil.get('kt_quick_search_offcanvas');\r\n        var form = KTUtil.find(search, '.kt-quick-search__form');\r\n        var wrapper = KTUtil.find(search, '.kt-quick-search__wrapper');\r\n\r\n        var offcanvas = new KTOffcanvas(searchPanel, {\r\n            overlay: true,\r\n            baseClass: 'kt-offcanvas-panel',\r\n            closeBy: 'kt_offcanvas_toolbar_search_close',\r\n            toggleBy: 'kt_offcanvas_toolbar_search_toggler_btn'\r\n        });\r\n\r\n        KTUtil.scrollInit(wrapper, {\r\n            disableForMobile: true,\r\n            resetHeightOnDestroy: true,\r\n            handleWindowResize: true,\r\n            height: function() {\r\n                var height = parseInt(KTUtil.getViewPort().height);\r\n\r\n                height = height - parseInt(KTUtil.actualHeight(form));\r\n                height = height - parseInt(KTUtil.css(form, 'marginBottom'));\r\n\r\n                if (head) {\r\n                    height = height - parseInt(KTUtil.actualHeight(head));\r\n                    height = height - parseInt(KTUtil.css(head, 'marginBottom'));\r\n                }\r\n\r\n                height = height - parseInt(KTUtil.css(searchPanel, 'paddingTop'));\r\n                height = height - parseInt(KTUtil.css(searchPanel, 'paddingBottom'));\r\n\r\n                return height;\r\n            }\r\n        });\r\n    }\r\n\r\n    return {\r\n        init: function() {\r\n            notificationPanel = KTUtil.get('kt_offcanvas_toolbar_notifications');\r\n            quickActionsPanel = KTUtil.get('kt_offcanvas_toolbar_quick_actions');\r\n            profilePanel = KTUtil.get('kt_offcanvas_toolbar_profile');\r\n            searchPanel = KTUtil.get('kt_offcanvas_toolbar_search');\r\n\r\n            initNotifications();\r\n            initQucikActions();\r\n            initProfile();\r\n            initSearch();\r\n        }\r\n    };\r\n}();\r\n\r\n// Init on page load completed\r\nKTUtil.ready(function() {\r\n    KTOffcanvasPanel.init();\r\n});\r\n\n\n//# sourceURL=webpack:///../src/assets/js/global/layout/offcanvas-panel.js?");
  
  /***/ }),
  
  /***/ "../src/assets/js/global/layout/quick-panel.js":
  /*!*****************************************************!*\
    !*** ../src/assets/js/global/layout/quick-panel.js ***!
    \*****************************************************/
  /*! no static exports found */
  /***/ (function(module, exports, __webpack_require__) {
  
  "use strict";
  eval("\r\n\r\nvar KTQuickPanel = function() {\r\n    var panel;\r\n    var notificationPanel;\r\n    var logsPanel;\r\n    var settingsPanel;\r\n\r\n    var getContentHeight = function() {\r\n        var height;\r\n        var nav = KTUtil.find(panel, '.kt-quick-panel__nav');\r\n        var content = KTUtil.find(panel, '.kt-quick-panel__content');\r\n\r\n        height = parseInt(KTUtil.getViewPort().height) - parseInt(KTUtil.actualHeight(nav)) - (2 * parseInt(KTUtil.css(nav, 'padding-top'))) - 10;\r\n\r\n        return height;\r\n    }\r\n\r\n    var initOffcanvas = function() {\r\n        new KTOffcanvas(panel, {\r\n            overlay: true,\r\n            baseClass: 'kt-quick-panel',\r\n            closeBy: 'kt_quick_panel_close_btn',\r\n            toggleBy: 'kt_quick_panel_toggler_btn'\r\n        });\r\n    }\r\n\r\n    var initNotifications = function() {\r\n        KTUtil.scrollInit(notificationPanel, {\r\n            mobileNativeScroll: true,\r\n            resetHeightOnDestroy: true,\r\n            handleWindowResize: true,\r\n            height: function() {\r\n                return getContentHeight();\r\n            }\r\n        });\r\n    }\r\n\r\n    var initLogs = function() {\r\n        KTUtil.scrollInit(logsPanel, {\r\n            mobileNativeScroll: true,\r\n            resetHeightOnDestroy: true,\r\n            handleWindowResize: true,\r\n            height: function() {\r\n                return getContentHeight();\r\n            }\r\n        });\r\n    }\r\n\r\n    var initSettings = function() {\r\n        KTUtil.scrollInit(settingsPanel, {\r\n            mobileNativeScroll: true,\r\n            resetHeightOnDestroy: true,\r\n            handleWindowResize: true,\r\n            height: function() {\r\n                return getContentHeight();\r\n            }\r\n        });\r\n    }\r\n\r\n    var updatePerfectScrollbars = function() {\r\n        $(panel).find('a[data-toggle=\"tab\"]').on('shown.bs.tab', function (e) {\r\n            KTUtil.scrollUpdate(notificationPanel);\r\n            KTUtil.scrollUpdate(logsPanel);\r\n            KTUtil.scrollUpdate(settingsPanel);\r\n        });\r\n    }\r\n\r\n    return {\r\n        init: function() {\r\n            panel = KTUtil.get('kt_quick_panel');\r\n            notificationPanel = KTUtil.get('kt_quick_panel_tab_notifications');\r\n            logsPanel = KTUtil.get('kt_quick_panel_tab_logs');\r\n            settingsPanel = KTUtil.get('kt_quick_panel_tab_settings');\r\n\r\n            initOffcanvas();\r\n            initNotifications();\r\n            initLogs();\r\n            initSettings();\r\n            updatePerfectScrollbars();\r\n        }\r\n    };\r\n}();\r\n\r\n$(document).ready(function() {\r\n    KTQuickPanel.init();\r\n});\r\n\n\n//# sourceURL=webpack:///../src/assets/js/global/layout/quick-panel.js?");
  
  /***/ }),
  
  /***/ "../src/assets/js/global/layout/quick-search.js":
  /*!******************************************************!*\
    !*** ../src/assets/js/global/layout/quick-search.js ***!
    \******************************************************/
  /*! no static exports found */
  /***/ (function(module, exports, __webpack_require__) {
  
  "use strict";
  eval("\r\n\r\nvar KTQuickSearch = function() {\r\n    var target;\r\n    var form;\r\n    var input;\r\n    var closeIcon;\r\n    var resultWrapper;\r\n    var resultDropdown;\r\n    var resultDropdownToggle;\r\n    var inputGroup;\r\n    var query = '';\r\n\r\n    var hasResult = false;\r\n    var timeout = false;\r\n    var isProcessing = false;\r\n    var requestTimeout = 200; // ajax request fire timeout in milliseconds\r\n    var spinnerClass = 'kt-spinner kt-spinner--input kt-spinner--sm kt-spinner--brand kt-spinner--right';\r\n    var resultClass = 'kt-quick-search--has-result';\r\n    var minLength = 2;\r\n\r\n    var showProgress = function() {\r\n        isProcessing = true;\r\n        KTUtil.addClass(inputGroup, spinnerClass);\r\n\r\n        if (closeIcon) {\r\n            KTUtil.hide(closeIcon);\r\n        }\r\n    }\r\n\r\n    var hideProgress = function() {\r\n        isProcessing = false;\r\n        KTUtil.removeClass(inputGroup, spinnerClass);\r\n\r\n        if (closeIcon) {\r\n            if (input.value.length < minLength) {\r\n                KTUtil.hide(closeIcon);\r\n            } else {\r\n                KTUtil.show(closeIcon, 'flex');\r\n            }\r\n        }\r\n    }\r\n\r\n    var showDropdown = function() {\r\n        if (resultDropdownToggle && !KTUtil.hasClass(resultDropdown, 'show')) {\r\n            $(resultDropdownToggle).dropdown('toggle');\r\n            $(resultDropdownToggle).dropdown('update');\r\n        }\r\n    }\r\n\r\n    var hideDropdown = function() {\r\n        if (resultDropdownToggle && KTUtil.hasClass(resultDropdown, 'show')) {\r\n            $(resultDropdownToggle).dropdown('toggle');\r\n        }\r\n    }\r\n\r\n    var processSearch = function() {\r\n        if (hasResult && query === input.value) {\r\n            hideProgress();\r\n            KTUtil.addClass(target, resultClass);\r\n            showDropdown();\r\n            KTUtil.scrollUpdate(resultWrapper);\r\n\r\n            return;\r\n        }\r\n\r\n        query = input.value;\r\n\r\n        KTUtil.removeClass(target, resultClass);\r\n        showProgress();\r\n        hideDropdown();\r\n\r\n        setTimeout(function() {\r\n            $.ajax({\r\n                url: 'https://keenthemes.com/metronic/tools/preview/api/quick_search.php',\r\n                data: {\r\n                    query: query\r\n                },\r\n                dataType: 'html',\r\n                success: function(res) {\r\n                    hasResult = true;\r\n                    hideProgress();\r\n                    KTUtil.addClass(target, resultClass);\r\n                    KTUtil.setHTML(resultWrapper, res);\r\n                    showDropdown();\r\n                    KTUtil.scrollUpdate(resultWrapper);\r\n                },\r\n                error: function(res) {\r\n                    hasResult = false;\r\n                    hideProgress();\r\n                    KTUtil.addClass(target, resultClass);\r\n                    KTUtil.setHTML(resultWrapper, '<span class=\"kt-quick-search__message\">Connection error. Pleae try again later.</div>');\r\n                    showDropdown();\r\n                    KTUtil.scrollUpdate(resultWrapper);\r\n                }\r\n            });\r\n        }, 1000);\r\n    }\r\n\r\n    var handleCancel = function(e) {\r\n        input.value = '';\r\n        query = '';\r\n        hasResult = false;\r\n        KTUtil.hide(closeIcon);\r\n        KTUtil.removeClass(target, resultClass);\r\n        hideDropdown();\r\n    }\r\n\r\n    var handleSearch = function() {\r\n        if (input.value.length < minLength) {\r\n            hideProgress();\r\n            hideDropdown();\r\n\r\n            return;\r\n        }\r\n\r\n        if (isProcessing == true) {\r\n            return;\r\n        }\r\n\r\n        if (timeout) {\r\n            clearTimeout(timeout);\r\n        }\r\n\r\n        timeout = setTimeout(function() {\r\n            processSearch();\r\n        }, requestTimeout);\r\n    }\r\n\r\n    return {\r\n        init: function(element) {\r\n            // Init\r\n            target = element;\r\n            form = KTUtil.find(target, '.kt-quick-search__form');\r\n            input = KTUtil.find(target, '.kt-quick-search__input');\r\n            closeIcon = KTUtil.find(target, '.kt-quick-search__close');\r\n            resultWrapper = KTUtil.find(target, '.kt-quick-search__wrapper');\r\n            resultDropdown = KTUtil.find(target, '.dropdown-menu');\r\n            resultDropdownToggle = KTUtil.find(target, '[data-toggle=\"dropdown\"]');\r\n            inputGroup = KTUtil.find(target, '.input-group');\r\n\r\n            // Attach input keyup handler\r\n            KTUtil.addEvent(input, 'keyup', handleSearch);\r\n            KTUtil.addEvent(input, 'focus', handleSearch);\r\n\r\n            // Prevent enter click\r\n            form.onkeypress = function(e) {\r\n                var key = e.charCode || e.keyCode || 0;\r\n                if (key == 13) {\r\n                    e.preventDefault();\r\n                }\r\n            }\r\n\r\n            KTUtil.addEvent(closeIcon, 'click', handleCancel);\r\n        }\r\n    };\r\n};\r\n\r\nvar KTQuickSearchInline = KTQuickSearch;\r\nvar KTQuickSearchOffcanvas = KTQuickSearch;\r\n\r\n// Init on page load completed\r\n\r\nKTUtil.ready(function() {\r\n    if (KTUtil.get('kt_quick_search_dropdown')) {\r\n        KTQuickSearch().init(KTUtil.get('kt_quick_search_dropdown'));\r\n    }\r\n\r\n    if (KTUtil.get('kt_quick_search_inline')) {\r\n        KTQuickSearchInline().init(KTUtil.get('kt_quick_search_inline'));\r\n    }\r\n\r\n    if (KTUtil.get('kt_quick_search_offcanvas')) {\r\n        KTQuickSearchOffcanvas().init(KTUtil.get('kt_quick_search_offcanvas'));\r\n    }\r\n});\r\n\n\n//# sourceURL=webpack:///../src/assets/js/global/layout/quick-search.js?");
  
  /***/ }),
  
  /***/ "./webpack/scripts.js":
  /*!****************************!*\
    !*** ./webpack/scripts.js ***!
    \****************************/
  /*! no static exports found */
  /***/ (function(module, exports, __webpack_require__) {
  
  "use strict";
  eval("\r\n\r\n/**\r\n * Define the output of this file. The output of CSS and JS file will be auto detected.\r\n *\r\n * @output js/scripts.bundle\r\n */\r\n\r\n// Keentheme\"s plugins\r\nwindow.KTUtil = __webpack_require__(/*! ../../src/assets/js/global/components/base/util */ \"../src/assets/js/global/components/base/util.js\");\r\nwindow.KTApp = __webpack_require__(/*! ../../src/assets/js/global/components/base/app */ \"../src/assets/js/global/components/base/app.js\");\r\nwindow.KTAvatar = __webpack_require__(/*! ../../src/assets/js/global/components/base/avatar */ \"../src/assets/js/global/components/base/avatar.js\");\r\nwindow.KTDialog = __webpack_require__(/*! ../../src/assets/js/global/components/base/dialog */ \"../src/assets/js/global/components/base/dialog.js\");\r\nwindow.KTHeader = __webpack_require__(/*! ../../src/assets/js/global/components/base/header */ \"../src/assets/js/global/components/base/header.js\");\r\nwindow.KTMenu = __webpack_require__(/*! ../../src/assets/js/global/components/base/menu */ \"../src/assets/js/global/components/base/menu.js\");\r\nwindow.KTOffcanvas = __webpack_require__(/*! ../../src/assets/js/global/components/base/offcanvas */ \"../src/assets/js/global/components/base/offcanvas.js\");\r\nwindow.KTPortlet = __webpack_require__(/*! ../../src/assets/js/global/components/base/portlet */ \"../src/assets/js/global/components/base/portlet.js\");\r\nwindow.KTScrolltop = __webpack_require__(/*! ../../src/assets/js/global/components/base/scrolltop */ \"../src/assets/js/global/components/base/scrolltop.js\");\r\nwindow.KTToggle = __webpack_require__(/*! ../../src/assets/js/global/components/base/toggle */ \"../src/assets/js/global/components/base/toggle.js\");\r\nwindow.KTWizard = __webpack_require__(/*! ../../src/assets/js/global/components/base/wizard */ \"../src/assets/js/global/components/base/wizard.js\");\r\n__webpack_require__(/*! ../../src/assets/js/global/components/base/datatable/core.datatable */ \"../src/assets/js/global/components/base/datatable/core.datatable.js\");\r\n__webpack_require__(/*! ../../src/assets/js/global/components/base/datatable/datatable.checkbox */ \"../src/assets/js/global/components/base/datatable/datatable.checkbox.js\");\r\n__webpack_require__(/*! ../../src/assets/js/global/components/base/datatable/datatable.rtl */ \"../src/assets/js/global/components/base/datatable/datatable.rtl.js\");\r\n\r\n// Layout scripts\r\nwindow.KTLayout = __webpack_require__(/*! ../../src/assets/js/global/layout/layout */ \"../src/assets/js/global/layout/layout.js\");\r\nwindow.KTChat = __webpack_require__(/*! ../../src/assets/js/global/layout/chat */ \"../src/assets/js/global/layout/chat.js\");\r\n__webpack_require__(/*! ../../src/assets/js/global/layout/demo-panel */ \"../src/assets/js/global/layout/demo-panel.js\");\r\n__webpack_require__(/*! ../../src/assets/js/global/layout/offcanvas-panel */ \"../src/assets/js/global/layout/offcanvas-panel.js\");\r\n__webpack_require__(/*! ../../src/assets/js/global/layout/quick-panel */ \"../src/assets/js/global/layout/quick-panel.js\");\r\n__webpack_require__(/*! ../../src/assets/js/global/layout/quick-search */ \"../src/assets/js/global/layout/quick-search.js\");\r\n\n\n//# sourceURL=webpack:///./webpack/scripts.js?");
  
  /***/ })
  
  /******/ });