{"version":3,"file":"adminlte.js","sources":["../../build/js/ControlSidebar.js","../../build/js/Layout.js","../../build/js/PushMenu.js","../../build/js/Treeview.js","../../build/js/DirectChat.js","../../build/js/TodoList.js","../../build/js/CardWidget.js","../../build/js/CardRefresh.js","../../build/js/Dropdown.js","../../build/js/Toasts.js"],"sourcesContent":["/**\r\n * --------------------------------------------\r\n * AdminLTE ControlSidebar.js\r\n * License MIT\r\n * --------------------------------------------\r\n */\r\n\r\nconst ControlSidebar = (($) => {\r\n /**\r\n * Constants\r\n * ====================================================\r\n */\r\n\r\n const NAME = 'ControlSidebar'\r\n const DATA_KEY = 'lte.controlsidebar'\r\n const EVENT_KEY = `.${DATA_KEY}`\r\n const JQUERY_NO_CONFLICT = $.fn[NAME]\r\n const DATA_API_KEY = '.data-api'\r\n\r\n const Event = {\r\n COLLAPSED: `collapsed${EVENT_KEY}`,\r\n EXPANDED: `expanded${EVENT_KEY}`,\r\n }\r\n\r\n const Selector = {\r\n CONTROL_SIDEBAR: '.control-sidebar',\r\n CONTROL_SIDEBAR_CONTENT: '.control-sidebar-content',\r\n DATA_TOGGLE: '[data-widget=\"control-sidebar\"]',\r\n CONTENT: '.content-wrapper',\r\n HEADER: '.main-header',\r\n FOOTER: '.main-footer',\r\n }\r\n\r\n const ClassName = {\r\n CONTROL_SIDEBAR_ANIMATE: 'control-sidebar-animate',\r\n CONTROL_SIDEBAR_OPEN: 'control-sidebar-open',\r\n CONTROL_SIDEBAR_SLIDE: 'control-sidebar-slide-open',\r\n LAYOUT_FIXED: 'layout-fixed',\r\n NAVBAR_FIXED: 'layout-navbar-fixed',\r\n NAVBAR_SM_FIXED: 'layout-sm-navbar-fixed',\r\n NAVBAR_MD_FIXED: 'layout-md-navbar-fixed',\r\n NAVBAR_LG_FIXED: 'layout-lg-navbar-fixed',\r\n NAVBAR_XL_FIXED: 'layout-xl-navbar-fixed',\r\n FOOTER_FIXED: 'layout-footer-fixed',\r\n FOOTER_SM_FIXED: 'layout-sm-footer-fixed',\r\n FOOTER_MD_FIXED: 'layout-md-footer-fixed',\r\n FOOTER_LG_FIXED: 'layout-lg-footer-fixed',\r\n FOOTER_XL_FIXED: 'layout-xl-footer-fixed',\r\n }\r\n\r\n const Default = {\r\n controlsidebarSlide: true,\r\n scrollbarTheme : 'os-theme-light',\r\n scrollbarAutoHide: 'l',\r\n }\r\n\r\n /**\r\n * Class Definition\r\n * ====================================================\r\n */\r\n\r\n class ControlSidebar {\r\n constructor(element, config) {\r\n this._element = element\r\n this._config = config\r\n\r\n this._init()\r\n }\r\n\r\n // Public\r\n\r\n collapse() {\r\n // Show the control sidebar\r\n if (this._config.controlsidebarSlide) {\r\n $('html').addClass(ClassName.CONTROL_SIDEBAR_ANIMATE)\r\n $('body').removeClass(ClassName.CONTROL_SIDEBAR_SLIDE).delay(300).queue(function(){\r\n $(Selector.CONTROL_SIDEBAR).hide()\r\n $('html').removeClass(ClassName.CONTROL_SIDEBAR_ANIMATE)\r\n $(this).dequeue()\r\n })\r\n } else {\r\n $('body').removeClass(ClassName.CONTROL_SIDEBAR_OPEN)\r\n }\r\n\r\n const collapsedEvent = $.Event(Event.COLLAPSED)\r\n $(this._element).trigger(collapsedEvent)\r\n }\r\n\r\n show() {\r\n // Collapse the control sidebar\r\n if (this._config.controlsidebarSlide) {\r\n $('html').addClass(ClassName.CONTROL_SIDEBAR_ANIMATE)\r\n $(Selector.CONTROL_SIDEBAR).show().delay(10).queue(function(){\r\n $('body').addClass(ClassName.CONTROL_SIDEBAR_SLIDE).delay(300).queue(function(){\r\n $('html').removeClass(ClassName.CONTROL_SIDEBAR_ANIMATE)\r\n $(this).dequeue()\r\n })\r\n $(this).dequeue()\r\n })\r\n } else {\r\n $('body').addClass(ClassName.CONTROL_SIDEBAR_OPEN)\r\n }\r\n\r\n const expandedEvent = $.Event(Event.EXPANDED)\r\n $(this._element).trigger(expandedEvent)\r\n }\r\n\r\n toggle() {\r\n const shouldClose = $('body').hasClass(ClassName.CONTROL_SIDEBAR_OPEN) || $('body')\r\n .hasClass(ClassName.CONTROL_SIDEBAR_SLIDE)\r\n if (shouldClose) {\r\n // Close the control sidebar\r\n this.collapse()\r\n } else {\r\n // Open the control sidebar\r\n this.show()\r\n }\r\n }\r\n\r\n // Private\r\n\r\n _init() {\r\n this._fixHeight()\r\n this._fixScrollHeight()\r\n\r\n $(window).resize(() => {\r\n this._fixHeight()\r\n this._fixScrollHeight()\r\n })\r\n\r\n $(window).scroll(() => {\r\n if ($('body').hasClass(ClassName.CONTROL_SIDEBAR_OPEN) || $('body').hasClass(ClassName.CONTROL_SIDEBAR_SLIDE)) {\r\n this._fixScrollHeight()\r\n }\r\n })\r\n }\r\n\r\n _fixScrollHeight() {\r\n const heights = {\r\n scroll: $(document).height(),\r\n window: $(window).height(),\r\n header: $(Selector.HEADER).outerHeight(),\r\n footer: $(Selector.FOOTER).outerHeight(),\r\n }\r\n const positions = {\r\n bottom: Math.abs((heights.window + $(window).scrollTop()) - heights.scroll),\r\n top: $(window).scrollTop(),\r\n }\r\n\r\n let navbarFixed = false;\r\n let footerFixed = false;\r\n\r\n if ($('body').hasClass(ClassName.LAYOUT_FIXED)) {\r\n if (\r\n $('body').hasClass(ClassName.NAVBAR_FIXED)\r\n || $('body').hasClass(ClassName.NAVBAR_SM_FIXED)\r\n || $('body').hasClass(ClassName.NAVBAR_MD_FIXED)\r\n || $('body').hasClass(ClassName.NAVBAR_LG_FIXED)\r\n || $('body').hasClass(ClassName.NAVBAR_XL_FIXED)\r\n ) {\r\n if ($(Selector.HEADER).css(\"position\") === \"fixed\") {\r\n navbarFixed = true;\r\n }\r\n }\r\n if (\r\n $('body').hasClass(ClassName.FOOTER_FIXED)\r\n || $('body').hasClass(ClassName.FOOTER_SM_FIXED)\r\n || $('body').hasClass(ClassName.FOOTER_MD_FIXED)\r\n || $('body').hasClass(ClassName.FOOTER_LG_FIXED)\r\n || $('body').hasClass(ClassName.FOOTER_XL_FIXED)\r\n ) {\r\n if ($(Selector.FOOTER).css(\"position\") === \"fixed\") {\r\n footerFixed = true;\r\n }\r\n }\r\n\r\n if (positions.top === 0 && positions.bottom === 0) {\r\n $(Selector.CONTROL_SIDEBAR).css('bottom', heights.footer);\r\n $(Selector.CONTROL_SIDEBAR).css('top', heights.header);\r\n $(Selector.CONTROL_SIDEBAR + ', ' + Selector.CONTROL_SIDEBAR + ' ' + Selector.CONTROL_SIDEBAR_CONTENT).css('height', heights.window - (heights.header + heights.footer))\r\n } else if (positions.bottom <= heights.footer) {\r\n if (footerFixed === false) { \r\n $(Selector.CONTROL_SIDEBAR).css('bottom', heights.footer - positions.bottom);\r\n $(Selector.CONTROL_SIDEBAR + ', ' + Selector.CONTROL_SIDEBAR + ' ' + Selector.CONTROL_SIDEBAR_CONTENT).css('height', heights.window - (heights.footer - positions.bottom))\r\n } else {\r\n $(Selector.CONTROL_SIDEBAR).css('bottom', heights.footer);\r\n }\r\n } else if (positions.top <= heights.header) {\r\n if (navbarFixed === false) {\r\n $(Selector.CONTROL_SIDEBAR).css('top', heights.header - positions.top);\r\n $(Selector.CONTROL_SIDEBAR + ', ' + Selector.CONTROL_SIDEBAR + ' ' + Selector.CONTROL_SIDEBAR_CONTENT).css('height', heights.window - (heights.header - positions.top))\r\n } else {\r\n $(Selector.CONTROL_SIDEBAR).css('top', heights.header);\r\n }\r\n } else {\r\n if (navbarFixed === false) {\r\n $(Selector.CONTROL_SIDEBAR).css('top', 0);\r\n $(Selector.CONTROL_SIDEBAR + ', ' + Selector.CONTROL_SIDEBAR + ' ' + Selector.CONTROL_SIDEBAR_CONTENT).css('height', heights.window)\r\n } else {\r\n $(Selector.CONTROL_SIDEBAR).css('top', heights.header);\r\n }\r\n }\r\n }\r\n }\r\n\r\n _fixHeight() {\r\n const heights = {\r\n window: $(window).height(),\r\n header: $(Selector.HEADER).outerHeight(),\r\n footer: $(Selector.FOOTER).outerHeight(),\r\n }\r\n\r\n if ($('body').hasClass(ClassName.LAYOUT_FIXED)) {\r\n let sidebarHeight = heights.window - heights.header;\r\n\r\n if (\r\n $('body').hasClass(ClassName.FOOTER_FIXED)\r\n || $('body').hasClass(ClassName.FOOTER_SM_FIXED)\r\n || $('body').hasClass(ClassName.FOOTER_MD_FIXED)\r\n || $('body').hasClass(ClassName.FOOTER_LG_FIXED)\r\n || $('body').hasClass(ClassName.FOOTER_XL_FIXED)\r\n ) {\r\n if ($(Selector.FOOTER).css(\"position\") === \"fixed\") {\r\n sidebarHeight = heights.window - heights.header - heights.footer;\r\n }\r\n }\r\n\r\n $(Selector.CONTROL_SIDEBAR + ' ' + Selector.CONTROL_SIDEBAR_CONTENT).css('height', sidebarHeight)\r\n \r\n if (typeof $.fn.overlayScrollbars !== 'undefined') {\r\n $(Selector.CONTROL_SIDEBAR + ' ' + Selector.CONTROL_SIDEBAR_CONTENT).overlayScrollbars({\r\n className : this._config.scrollbarTheme,\r\n sizeAutoCapable : true,\r\n scrollbars : {\r\n autoHide: this._config.scrollbarAutoHide, \r\n clickScrolling : true\r\n }\r\n })\r\n }\r\n }\r\n }\r\n\r\n\r\n // Static\r\n\r\n static _jQueryInterface(operation) {\r\n return this.each(function () {\r\n let data = $(this).data(DATA_KEY)\r\n const _options = $.extend({}, Default, $(this).data())\r\n\r\n if (!data) {\r\n data = new ControlSidebar(this, _options)\r\n $(this).data(DATA_KEY, data)\r\n }\r\n\r\n if (data[operation] === 'undefined') {\r\n throw new Error(`${operation} is not a function`)\r\n }\r\n\r\n data[operation]()\r\n })\r\n }\r\n }\r\n\r\n /**\r\n *\r\n * Data Api implementation\r\n * ====================================================\r\n */\r\n $(document).on('click', Selector.DATA_TOGGLE, function (event) {\r\n event.preventDefault()\r\n\r\n ControlSidebar._jQueryInterface.call($(this), 'toggle')\r\n })\r\n\r\n /**\r\n * jQuery API\r\n * ====================================================\r\n */\r\n\r\n $.fn[NAME] = ControlSidebar._jQueryInterface\r\n $.fn[NAME].Constructor = ControlSidebar\r\n $.fn[NAME].noConflict = function () {\r\n $.fn[NAME] = JQUERY_NO_CONFLICT\r\n return ControlSidebar._jQueryInterface\r\n }\r\n\r\n return ControlSidebar\r\n})(jQuery)\r\n\r\nexport default ControlSidebar\r\n \r\n","/**\r\n * --------------------------------------------\r\n * AdminLTE Layout.js\r\n * License MIT\r\n * --------------------------------------------\r\n */\r\n\r\nconst Layout = (($) => {\r\n /**\r\n * Constants\r\n * ====================================================\r\n */\r\n\r\n const NAME = 'Layout'\r\n const DATA_KEY = 'lte.layout'\r\n const EVENT_KEY = `.${DATA_KEY}`\r\n const JQUERY_NO_CONFLICT = $.fn[NAME]\r\n\r\n const Event = {\r\n SIDEBAR: 'sidebar'\r\n }\r\n\r\n const Selector = {\r\n HEADER : '.main-header',\r\n MAIN_SIDEBAR : '.main-sidebar',\r\n SIDEBAR : '.main-sidebar .sidebar',\r\n CONTENT : '.content-wrapper',\r\n BRAND : '.brand-link',\r\n CONTENT_HEADER : '.content-header',\r\n WRAPPER : '.wrapper',\r\n CONTROL_SIDEBAR: '.control-sidebar',\r\n CONTROL_SIDEBAR_CONTENT: '.control-sidebar-content',\r\n CONTROL_SIDEBAR_BTN: '[data-widget=\"control-sidebar\"]',\r\n LAYOUT_FIXED : '.layout-fixed',\r\n FOOTER : '.main-footer',\r\n PUSHMENU_BTN : '[data-widget=\"pushmenu\"]',\r\n LOGIN_BOX : '.login-box',\r\n REGISTER_BOX : '.register-box'\r\n }\r\n\r\n const ClassName = {\r\n HOLD : 'hold-transition',\r\n SIDEBAR : 'main-sidebar',\r\n CONTENT_FIXED : 'content-fixed',\r\n SIDEBAR_FOCUSED: 'sidebar-focused',\r\n LAYOUT_FIXED : 'layout-fixed',\r\n NAVBAR_FIXED : 'layout-navbar-fixed',\r\n FOOTER_FIXED : 'layout-footer-fixed',\r\n LOGIN_PAGE : 'login-page',\r\n REGISTER_PAGE : 'register-page',\r\n CONTROL_SIDEBAR_SLIDE_OPEN: 'control-sidebar-slide-open',\r\n CONTROL_SIDEBAR_OPEN: 'control-sidebar-open',\r\n }\r\n\r\n const Default = {\r\n scrollbarTheme : 'os-theme-light',\r\n scrollbarAutoHide: 'l'\r\n }\r\n\r\n /**\r\n * Class Definition\r\n * ====================================================\r\n */\r\n\r\n class Layout {\r\n constructor(element, config) {\r\n this._config = config\r\n this._element = element\r\n\r\n this._init()\r\n }\r\n\r\n // Public\r\n\r\n fixLayoutHeight(extra = null) {\r\n let control_sidebar = 0\r\n\r\n if ($('body').hasClass(ClassName.CONTROL_SIDEBAR_SLIDE_OPEN) || $('body').hasClass(ClassName.CONTROL_SIDEBAR_OPEN) || extra == 'control_sidebar') {\r\n control_sidebar = $(Selector.CONTROL_SIDEBAR_CONTENT).height()\r\n }\r\n\r\n const heights = {\r\n window: $(window).height(),\r\n header: $(Selector.HEADER).length !== 0 ? $(Selector.HEADER).outerHeight() : 0,\r\n footer: $(Selector.FOOTER).length !== 0 ? $(Selector.FOOTER).outerHeight() : 0,\r\n sidebar: $(Selector.SIDEBAR).length !== 0 ? $(Selector.SIDEBAR).height() : 0,\r\n control_sidebar: control_sidebar,\r\n }\r\n\r\n const max = this._max(heights)\r\n\r\n if (max == heights.control_sidebar) {\r\n $(Selector.CONTENT).css('min-height', max)\r\n } else if (max == heights.window) {\r\n $(Selector.CONTENT).css('min-height', max - heights.header - heights.footer)\r\n } else {\r\n $(Selector.CONTENT).css('min-height', max - heights.header)\r\n }\r\n\r\n if ($('body').hasClass(ClassName.LAYOUT_FIXED)) {\r\n $(Selector.CONTENT).css('min-height', max - heights.header - heights.footer)\r\n\r\n if (typeof $.fn.overlayScrollbars !== 'undefined') {\r\n $(Selector.SIDEBAR).overlayScrollbars({\r\n className : this._config.scrollbarTheme,\r\n sizeAutoCapable : true,\r\n scrollbars : {\r\n autoHide: this._config.scrollbarAutoHide, \r\n clickScrolling : true\r\n }\r\n })\r\n }\r\n }\r\n }\r\n\r\n // Private\r\n\r\n _init() {\r\n // Activate layout height watcher\r\n this.fixLayoutHeight()\r\n $(Selector.SIDEBAR)\r\n .on('collapsed.lte.treeview expanded.lte.treeview', () => {\r\n this.fixLayoutHeight()\r\n })\r\n\r\n $(Selector.PUSHMENU_BTN)\r\n .on('collapsed.lte.pushmenu shown.lte.pushmenu', () => {\r\n this.fixLayoutHeight()\r\n })\r\n\r\n $(Selector.CONTROL_SIDEBAR_BTN)\r\n .on('collapsed.lte.controlsidebar', () => {\r\n this.fixLayoutHeight()\r\n })\r\n .on('expanded.lte.controlsidebar', () => {\r\n this.fixLayoutHeight('control_sidebar')\r\n })\r\n\r\n $(window).resize(() => {\r\n this.fixLayoutHeight()\r\n })\r\n\r\n if (!$('body').hasClass(ClassName.LOGIN_PAGE) && !$('body').hasClass(ClassName.REGISTER_PAGE)) {\r\n $('body, html').css('height', 'auto')\r\n } else if ($('body').hasClass(ClassName.LOGIN_PAGE) || $('body').hasClass(ClassName.REGISTER_PAGE)) {\r\n let box_height = $(Selector.LOGIN_BOX + ', ' + Selector.REGISTER_BOX).height()\r\n\r\n $('body').css('min-height', box_height);\r\n }\r\n\r\n $('body.hold-transition').removeClass('hold-transition')\r\n }\r\n\r\n _max(numbers) {\r\n // Calculate the maximum number in a list\r\n let max = 0\r\n\r\n Object.keys(numbers).forEach((key) => {\r\n if (numbers[key] > max) {\r\n max = numbers[key]\r\n }\r\n })\r\n\r\n return max\r\n }\r\n\r\n // Static\r\n\r\n static _jQueryInterface(config = '') {\r\n return this.each(function () {\r\n let data = $(this).data(DATA_KEY)\r\n const _options = $.extend({}, Default, $(this).data())\r\n\r\n if (!data) {\r\n data = new Layout($(this), _options)\r\n $(this).data(DATA_KEY, data)\r\n }\r\n\r\n if (config === 'init' || config === '') {\r\n data['_init']()\r\n }\r\n })\r\n }\r\n }\r\n\r\n /**\r\n * Data API\r\n * ====================================================\r\n */\r\n\r\n $(window).on('load', () => {\r\n Layout._jQueryInterface.call($('body'))\r\n })\r\n\r\n $(Selector.SIDEBAR + ' a').on('focusin', () => {\r\n $(Selector.MAIN_SIDEBAR).addClass(ClassName.SIDEBAR_FOCUSED);\r\n })\r\n\r\n $(Selector.SIDEBAR + ' a').on('focusout', () => {\r\n $(Selector.MAIN_SIDEBAR).removeClass(ClassName.SIDEBAR_FOCUSED);\r\n })\r\n\r\n /**\r\n * jQuery API\r\n * ====================================================\r\n */\r\n\r\n $.fn[NAME] = Layout._jQueryInterface\r\n $.fn[NAME].Constructor = Layout\r\n $.fn[NAME].noConflict = function () {\r\n $.fn[NAME] = JQUERY_NO_CONFLICT\r\n return Layout._jQueryInterface\r\n }\r\n\r\n return Layout\r\n})(jQuery)\r\n\r\nexport default Layout\r\n","/**\r\n * --------------------------------------------\r\n * AdminLTE PushMenu.js\r\n * License MIT\r\n * --------------------------------------------\r\n */\r\n\r\nconst PushMenu = (($) => {\r\n /**\r\n * Constants\r\n * ====================================================\r\n */\r\n\r\n const NAME = 'PushMenu'\r\n const DATA_KEY = 'lte.pushmenu'\r\n const EVENT_KEY = `.${DATA_KEY}`\r\n const JQUERY_NO_CONFLICT = $.fn[NAME]\r\n\r\n const Event = {\r\n COLLAPSED: `collapsed${EVENT_KEY}`,\r\n SHOWN: `shown${EVENT_KEY}`\r\n }\r\n\r\n const Default = {\r\n autoCollapseSize: 992,\r\n enableRemember: false,\r\n noTransitionAfterReload: true\r\n }\r\n\r\n const Selector = {\r\n TOGGLE_BUTTON: '[data-widget=\"pushmenu\"]',\r\n SIDEBAR_MINI: '.sidebar-mini',\r\n SIDEBAR_COLLAPSED: '.sidebar-collapse',\r\n BODY: 'body',\r\n OVERLAY: '#sidebar-overlay',\r\n WRAPPER: '.wrapper'\r\n }\r\n\r\n const ClassName = {\r\n SIDEBAR_OPEN: 'sidebar-open',\r\n COLLAPSED: 'sidebar-collapse',\r\n OPEN: 'sidebar-open'\r\n }\r\n\r\n /**\r\n * Class Definition\r\n * ====================================================\r\n */\r\n\r\n class PushMenu {\r\n constructor(element, options) {\r\n this._element = element\r\n this._options = $.extend({}, Default, options)\r\n\r\n if (!$(Selector.OVERLAY).length) {\r\n this._addOverlay()\r\n }\r\n\r\n this._init()\r\n }\r\n\r\n // Public\r\n\r\n expand() {\r\n if (this._options.autoCollapseSize) {\r\n if ($(window).width() <= this._options.autoCollapseSize) {\r\n $(Selector.BODY).addClass(ClassName.OPEN)\r\n }\r\n }\r\n\r\n $(Selector.BODY).removeClass(ClassName.COLLAPSED)\r\n\r\n if(this._options.enableRemember) {\r\n localStorage.setItem(`remember${EVENT_KEY}`, ClassName.OPEN)\r\n }\r\n\r\n const shownEvent = $.Event(Event.SHOWN)\r\n $(this._element).trigger(shownEvent)\r\n }\r\n\r\n collapse() {\r\n if (this._options.autoCollapseSize) {\r\n if ($(window).width() <= this._options.autoCollapseSize) {\r\n $(Selector.BODY).removeClass(ClassName.OPEN)\r\n }\r\n }\r\n\r\n $(Selector.BODY).addClass(ClassName.COLLAPSED)\r\n\r\n if(this._options.enableRemember) {\r\n localStorage.setItem(`remember${EVENT_KEY}`, ClassName.COLLAPSED)\r\n }\r\n\r\n const collapsedEvent = $.Event(Event.COLLAPSED)\r\n $(this._element).trigger(collapsedEvent)\r\n }\r\n\r\n toggle() {\r\n if (!$(Selector.BODY).hasClass(ClassName.COLLAPSED)) {\r\n this.collapse()\r\n } else {\r\n this.expand()\r\n }\r\n }\r\n\r\n autoCollapse(resize = false) {\r\n if (this._options.autoCollapseSize) {\r\n if ($(window).width() <= this._options.autoCollapseSize) {\r\n if (!$(Selector.BODY).hasClass(ClassName.OPEN)) {\r\n this.collapse()\r\n }\r\n } else if (resize == true) {\r\n if ($(Selector.BODY).hasClass(ClassName.OPEN)) {\r\n $(Selector.BODY).removeClass(ClassName.OPEN)\r\n }\r\n }\r\n }\r\n }\r\n\r\n remember() {\r\n if(this._options.enableRemember) {\r\n let toggleState = localStorage.getItem(`remember${EVENT_KEY}`)\r\n if (toggleState == ClassName.COLLAPSED){\r\n if (this._options.noTransitionAfterReload) {\r\n $(\"body\").addClass('hold-transition').addClass(ClassName.COLLAPSED).delay(50).queue(function() {\r\n $(this).removeClass('hold-transition')\r\n $(this).dequeue()\r\n })\r\n } else {\r\n $(\"body\").addClass(ClassName.COLLAPSED)\r\n }\r\n } else {\r\n if (this._options.noTransitionAfterReload) {\r\n $(\"body\").addClass('hold-transition').removeClass(ClassName.COLLAPSED).delay(50).queue(function() {\r\n $(this).removeClass('hold-transition')\r\n $(this).dequeue()\r\n })\r\n } else {\r\n $(\"body\").removeClass(ClassName.COLLAPSED)\r\n }\r\n }\r\n }\r\n }\r\n\r\n // Private\r\n\r\n _init() {\r\n this.remember()\r\n this.autoCollapse()\r\n\r\n $(window).resize(() => {\r\n this.autoCollapse(true)\r\n })\r\n }\r\n\r\n _addOverlay() {\r\n const overlay = $('
', {\r\n id: 'sidebar-overlay'\r\n })\r\n\r\n overlay.on('click', () => {\r\n this.collapse()\r\n })\r\n\r\n $(Selector.WRAPPER).append(overlay)\r\n }\r\n\r\n // Static\r\n\r\n static _jQueryInterface(operation) {\r\n return this.each(function () {\r\n let data = $(this).data(DATA_KEY)\r\n const _options = $.extend({}, Default, $(this).data())\r\n\r\n if (!data) {\r\n data = new PushMenu(this, _options)\r\n $(this).data(DATA_KEY, data)\r\n }\r\n\r\n if (typeof operation === 'string' && operation.match(/collapse|expand|toggle/)) {\r\n data[operation]()\r\n }\r\n })\r\n }\r\n }\r\n\r\n /**\r\n * Data API\r\n * ====================================================\r\n */\r\n\r\n $(document).on('click', Selector.TOGGLE_BUTTON, (event) => {\r\n event.preventDefault()\r\n\r\n let button = event.currentTarget\r\n\r\n if ($(button).data('widget') !== 'pushmenu') {\r\n button = $(button).closest(Selector.TOGGLE_BUTTON)\r\n }\r\n\r\n PushMenu._jQueryInterface.call($(button), 'toggle')\r\n })\r\n\r\n $(window).on('load', () => {\r\n PushMenu._jQueryInterface.call($(Selector.TOGGLE_BUTTON))\r\n })\r\n\r\n /**\r\n * jQuery API\r\n * ====================================================\r\n */\r\n\r\n $.fn[NAME] = PushMenu._jQueryInterface\r\n $.fn[NAME].Constructor = PushMenu\r\n $.fn[NAME].noConflict = function () {\r\n $.fn[NAME] = JQUERY_NO_CONFLICT\r\n return PushMenu._jQueryInterface\r\n }\r\n\r\n return PushMenu\r\n})(jQuery)\r\n\r\nexport default PushMenu\r\n","/**\r\n * --------------------------------------------\r\n * AdminLTE Treeview.js\r\n * License MIT\r\n * --------------------------------------------\r\n */\r\n\r\nconst Treeview = (($) => {\r\n /**\r\n * Constants\r\n * ====================================================\r\n */\r\n\r\n const NAME = 'Treeview'\r\n const DATA_KEY = 'lte.treeview'\r\n const EVENT_KEY = `.${DATA_KEY}`\r\n const JQUERY_NO_CONFLICT = $.fn[NAME]\r\n\r\n const Event = {\r\n SELECTED : `selected${EVENT_KEY}`,\r\n EXPANDED : `expanded${EVENT_KEY}`,\r\n COLLAPSED : `collapsed${EVENT_KEY}`,\r\n LOAD_DATA_API: `load${EVENT_KEY}`\r\n }\r\n\r\n const Selector = {\r\n LI : '.nav-item',\r\n LINK : '.nav-link',\r\n TREEVIEW_MENU: '.nav-treeview',\r\n OPEN : '.menu-open',\r\n DATA_WIDGET : '[data-widget=\"treeview\"]'\r\n }\r\n\r\n const ClassName = {\r\n LI : 'nav-item',\r\n LINK : 'nav-link',\r\n TREEVIEW_MENU : 'nav-treeview',\r\n OPEN : 'menu-open',\r\n SIDEBAR_COLLAPSED: 'sidebar-collapse'\r\n }\r\n\r\n const Default = {\r\n trigger : `${Selector.DATA_WIDGET} ${Selector.LINK}`,\r\n animationSpeed : 300,\r\n accordion : true,\r\n expandSidebar : false,\r\n sidebarButtonSelector: '[data-widget=\"pushmenu\"]'\r\n }\r\n\r\n /**\r\n * Class Definition\r\n * ====================================================\r\n */\r\n class Treeview {\r\n constructor(element, config) {\r\n this._config = config\r\n this._element = element\r\n }\r\n\r\n // Public\r\n\r\n init() {\r\n this._setupListeners()\r\n }\r\n\r\n expand(treeviewMenu, parentLi) {\r\n const expandedEvent = $.Event(Event.EXPANDED)\r\n\r\n if (this._config.accordion) {\r\n const openMenuLi = parentLi.siblings(Selector.OPEN).first()\r\n const openTreeview = openMenuLi.find(Selector.TREEVIEW_MENU).first()\r\n this.collapse(openTreeview, openMenuLi)\r\n }\r\n\r\n treeviewMenu.stop().slideDown(this._config.animationSpeed, () => {\r\n parentLi.addClass(ClassName.OPEN)\r\n $(this._element).trigger(expandedEvent)\r\n })\r\n\r\n if (this._config.expandSidebar) {\r\n this._expandSidebar()\r\n }\r\n }\r\n\r\n collapse(treeviewMenu, parentLi) {\r\n const collapsedEvent = $.Event(Event.COLLAPSED)\r\n\r\n treeviewMenu.stop().slideUp(this._config.animationSpeed, () => {\r\n parentLi.removeClass(ClassName.OPEN)\r\n $(this._element).trigger(collapsedEvent)\r\n treeviewMenu.find(`${Selector.OPEN} > ${Selector.TREEVIEW_MENU}`).slideUp()\r\n treeviewMenu.find(Selector.OPEN).removeClass(ClassName.OPEN)\r\n })\r\n }\r\n\r\n toggle(event) {\r\n\r\n const $relativeTarget = $(event.currentTarget)\r\n const $parent = $relativeTarget.parent()\r\n\r\n let treeviewMenu = $parent.find('> ' + Selector.TREEVIEW_MENU)\r\n\r\n if (!treeviewMenu.is(Selector.TREEVIEW_MENU)) {\r\n\r\n if (!$parent.is(Selector.LI)) {\r\n treeviewMenu = $parent.parent().find('> ' + Selector.TREEVIEW_MENU)\r\n }\r\n\r\n if (!treeviewMenu.is(Selector.TREEVIEW_MENU)) {\r\n return\r\n }\r\n }\r\n \r\n event.preventDefault()\r\n\r\n const parentLi = $relativeTarget.parents(Selector.LI).first()\r\n const isOpen = parentLi.hasClass(ClassName.OPEN)\r\n\r\n if (isOpen) {\r\n this.collapse($(treeviewMenu), parentLi)\r\n } else {\r\n this.expand($(treeviewMenu), parentLi)\r\n }\r\n }\r\n\r\n // Private\r\n\r\n _setupListeners() {\r\n $(document).on('click', this._config.trigger, (event) => {\r\n this.toggle(event)\r\n })\r\n }\r\n\r\n _expandSidebar() {\r\n if ($('body').hasClass(ClassName.SIDEBAR_COLLAPSED)) {\r\n $(this._config.sidebarButtonSelector).PushMenu('expand')\r\n }\r\n }\r\n\r\n // Static\r\n\r\n static _jQueryInterface(config) {\r\n return this.each(function () {\r\n let data = $(this).data(DATA_KEY)\r\n const _options = $.extend({}, Default, $(this).data())\r\n\r\n if (!data) {\r\n data = new Treeview($(this), _options)\r\n $(this).data(DATA_KEY, data)\r\n }\r\n\r\n if (config === 'init') {\r\n data[config]()\r\n }\r\n })\r\n }\r\n }\r\n\r\n /**\r\n * Data API\r\n * ====================================================\r\n */\r\n\r\n $(window).on(Event.LOAD_DATA_API, () => {\r\n $(Selector.DATA_WIDGET).each(function () {\r\n Treeview._jQueryInterface.call($(this), 'init')\r\n })\r\n })\r\n\r\n /**\r\n * jQuery API\r\n * ====================================================\r\n */\r\n\r\n $.fn[NAME] = Treeview._jQueryInterface\r\n $.fn[NAME].Constructor = Treeview\r\n $.fn[NAME].noConflict = function () {\r\n $.fn[NAME] = JQUERY_NO_CONFLICT\r\n return Treeview._jQueryInterface\r\n }\r\n\r\n return Treeview\r\n})(jQuery)\r\n\r\nexport default Treeview\r\n","/**\r\n * --------------------------------------------\r\n * AdminLTE DirectChat.js\r\n * License MIT\r\n * --------------------------------------------\r\n */\r\n\r\nconst DirectChat = (($) => {\r\n /**\r\n * Constants\r\n * ====================================================\r\n */\r\n\r\n const NAME = 'DirectChat'\r\n const DATA_KEY = 'lte.directchat'\r\n const EVENT_KEY = `.${DATA_KEY}`\r\n const JQUERY_NO_CONFLICT = $.fn[NAME]\r\n const DATA_API_KEY = '.data-api'\r\n\r\n const Event = {\r\n TOGGLED: `toggled{EVENT_KEY}`\r\n }\r\n\r\n const Selector = {\r\n DATA_TOGGLE: '[data-widget=\"chat-pane-toggle\"]',\r\n DIRECT_CHAT: '.direct-chat'\r\n };\r\n\r\n const ClassName = {\r\n DIRECT_CHAT_OPEN: 'direct-chat-contacts-open'\r\n };\r\n\r\n /**\r\n * Class Definition\r\n * ====================================================\r\n */\r\n\r\n class DirectChat {\r\n constructor(element, config) {\r\n this._element = element\r\n }\r\n\r\n toggle() {\r\n $(this._element).parents(Selector.DIRECT_CHAT).first().toggleClass(ClassName.DIRECT_CHAT_OPEN);\r\n\r\n const toggledEvent = $.Event(Event.TOGGLED)\r\n $(this._element).trigger(toggledEvent)\r\n }\r\n\r\n // Static\r\n\r\n static _jQueryInterface(config) {\r\n return this.each(function () {\r\n let data = $(this).data(DATA_KEY)\r\n\r\n if (!data) {\r\n data = new DirectChat($(this))\r\n $(this).data(DATA_KEY, data)\r\n }\r\n\r\n data[config]()\r\n })\r\n }\r\n }\r\n\r\n /**\r\n *\r\n * Data Api implementation\r\n * ====================================================\r\n */\r\n\r\n $(document).on('click', Selector.DATA_TOGGLE, function (event) {\r\n if (event) event.preventDefault();\r\n DirectChat._jQueryInterface.call($(this), 'toggle');\r\n });\r\n\r\n /**\r\n * jQuery API\r\n * ====================================================\r\n */\r\n\r\n $.fn[NAME] = DirectChat._jQueryInterface\r\n $.fn[NAME].Constructor = DirectChat\r\n $.fn[NAME].noConflict = function () {\r\n $.fn[NAME] = JQUERY_NO_CONFLICT\r\n return DirectChat._jQueryInterface\r\n }\r\n\r\n return DirectChat\r\n})(jQuery)\r\n\r\nexport default DirectChat\r\n","/**\r\n * --------------------------------------------\r\n * AdminLTE TodoList.js\r\n * License MIT\r\n * --------------------------------------------\r\n */\r\n\r\nconst TodoList = (($) => {\r\n /**\r\n * Constants\r\n * ====================================================\r\n */\r\n\r\n const NAME = 'TodoList'\r\n const DATA_KEY = 'lte.todolist'\r\n const EVENT_KEY = `.${DATA_KEY}`\r\n const JQUERY_NO_CONFLICT = $.fn[NAME]\r\n\r\n const Selector = {\r\n DATA_TOGGLE: '[data-widget=\"todo-list\"]'\r\n }\r\n\r\n const ClassName = {\r\n TODO_LIST_DONE: 'done'\r\n }\r\n\r\n const Default = {\r\n onCheck: function (item) {\r\n return item;\r\n },\r\n onUnCheck: function (item) {\r\n return item;\r\n }\r\n }\r\n\r\n /**\r\n * Class Definition\r\n * ====================================================\r\n */\r\n\r\n class TodoList {\r\n constructor(element, config) {\r\n this._config = config\r\n this._element = element\r\n\r\n this._init()\r\n }\r\n\r\n // Public\r\n\r\n toggle(item) {\r\n item.parents('li').toggleClass(ClassName.TODO_LIST_DONE);\r\n if (! $(item).prop('checked')) {\r\n this.unCheck($(item));\r\n return;\r\n }\r\n\r\n this.check(item);\r\n }\r\n\r\n check (item) {\r\n this._config.onCheck.call(item);\r\n }\r\n\r\n unCheck (item) {\r\n this._config.onUnCheck.call(item);\r\n }\r\n\r\n // Private\r\n\r\n _init() {\r\n var that = this\r\n $(Selector.DATA_TOGGLE).find('input:checkbox:checked').parents('li').toggleClass(ClassName.TODO_LIST_DONE)\r\n $(Selector.DATA_TOGGLE).on('change', 'input:checkbox', (event) => {\r\n that.toggle($(event.target))\r\n })\r\n }\r\n\r\n // Static\r\n\r\n static _jQueryInterface(config) {\r\n return this.each(function () {\r\n let data = $(this).data(DATA_KEY)\r\n const _options = $.extend({}, Default, $(this).data())\r\n\r\n if (!data) {\r\n data = new TodoList($(this), _options)\r\n $(this).data(DATA_KEY, data)\r\n }\r\n\r\n if (config === 'init') {\r\n data[config]()\r\n }\r\n })\r\n }\r\n }\r\n\r\n /**\r\n * Data API\r\n * ====================================================\r\n */\r\n\r\n $(window).on('load', () => {\r\n TodoList._jQueryInterface.call($(Selector.DATA_TOGGLE))\r\n })\r\n\r\n /**\r\n * jQuery API\r\n * ====================================================\r\n */\r\n\r\n $.fn[NAME] = TodoList._jQueryInterface\r\n $.fn[NAME].Constructor = TodoList\r\n $.fn[NAME].noConflict = function () {\r\n $.fn[NAME] = JQUERY_NO_CONFLICT\r\n return TodoList._jQueryInterface\r\n }\r\n\r\n return TodoList\r\n})(jQuery)\r\n\r\nexport default TodoList\r\n","/**\r\n * --------------------------------------------\r\n * AdminLTE CardWidget.js\r\n * License MIT\r\n * --------------------------------------------\r\n */\r\n\r\nconst CardWidget = (($) => {\r\n /**\r\n * Constants\r\n * ====================================================\r\n */\r\n\r\n const NAME = 'CardWidget'\r\n const DATA_KEY = 'lte.cardwidget'\r\n const EVENT_KEY = `.${DATA_KEY}`\r\n const JQUERY_NO_CONFLICT = $.fn[NAME]\r\n\r\n const Event = {\r\n EXPANDED: `expanded${EVENT_KEY}`,\r\n COLLAPSED: `collapsed${EVENT_KEY}`,\r\n MAXIMIZED: `maximized${EVENT_KEY}`,\r\n MINIMIZED: `minimized${EVENT_KEY}`,\r\n REMOVED: `removed${EVENT_KEY}`\r\n }\r\n\r\n const ClassName = {\r\n CARD: 'card',\r\n COLLAPSED: 'collapsed-card',\r\n WAS_COLLAPSED: 'was-collapsed',\r\n MAXIMIZED: 'maximized-card',\r\n }\r\n\r\n const Selector = {\r\n DATA_REMOVE: '[data-card-widget=\"remove\"]',\r\n DATA_COLLAPSE: '[data-card-widget=\"collapse\"]',\r\n DATA_MAXIMIZE: '[data-card-widget=\"maximize\"]',\r\n CARD: `.${ClassName.CARD}`,\r\n CARD_HEADER: '.card-header',\r\n CARD_BODY: '.card-body',\r\n CARD_FOOTER: '.card-footer',\r\n COLLAPSED: `.${ClassName.COLLAPSED}`,\r\n }\r\n\r\n const Default = {\r\n animationSpeed: 'normal',\r\n collapseTrigger: Selector.DATA_COLLAPSE,\r\n removeTrigger: Selector.DATA_REMOVE,\r\n maximizeTrigger: Selector.DATA_MAXIMIZE,\r\n collapseIcon: 'fa-minus',\r\n expandIcon: 'fa-plus',\r\n maximizeIcon: 'fa-expand',\r\n minimizeIcon: 'fa-compress',\r\n }\r\n\r\n class CardWidget {\r\n constructor(element, settings) {\r\n this._element = element\r\n this._parent = element.parents(Selector.CARD).first()\r\n\r\n if (element.hasClass(ClassName.CARD)) {\r\n this._parent = element\r\n }\r\n\r\n this._settings = $.extend({}, Default, settings)\r\n }\r\n\r\n collapse() {\r\n this._parent.children(`${Selector.CARD_BODY}, ${Selector.CARD_FOOTER}`)\r\n .slideUp(this._settings.animationSpeed, () => {\r\n this._parent.addClass(ClassName.COLLAPSED)\r\n })\r\n this._parent.find(this._settings.collapseTrigger + ' .' + this._settings.collapseIcon)\r\n .addClass(this._settings.expandIcon)\r\n .removeClass(this._settings.collapseIcon)\r\n\r\n const collapsed = $.Event(Event.COLLAPSED)\r\n\r\n this._element.trigger(collapsed, this._parent)\r\n }\r\n\r\n expand() {\r\n this._parent.children(`${Selector.CARD_BODY}, ${Selector.CARD_FOOTER}`)\r\n .slideDown(this._settings.animationSpeed, () => {\r\n this._parent.removeClass(ClassName.COLLAPSED)\r\n })\r\n\r\n this._parent.find(this._settings.collapseTrigger + ' .' + this._settings.expandIcon)\r\n .addClass(this._settings.collapseIcon)\r\n .removeClass(this._settings.expandIcon)\r\n\r\n const expanded = $.Event(Event.EXPANDED)\r\n\r\n this._element.trigger(expanded, this._parent)\r\n }\r\n\r\n remove() {\r\n this._parent.slideUp()\r\n\r\n const removed = $.Event(Event.REMOVED)\r\n\r\n this._element.trigger(removed, this._parent)\r\n }\r\n\r\n toggle() {\r\n if (this._parent.hasClass(ClassName.COLLAPSED)) {\r\n this.expand()\r\n return\r\n }\r\n\r\n this.collapse()\r\n }\r\n \r\n maximize() {\r\n this._parent.find(this._settings.maximizeTrigger + ' .' + this._settings.maximizeIcon)\r\n .addClass(this._settings.minimizeIcon)\r\n .removeClass(this._settings.maximizeIcon)\r\n this._parent.css({\r\n 'height': this._parent.height(),\r\n 'width': this._parent.width(),\r\n 'transition': 'all .15s'\r\n }).delay(150).queue(function(){\r\n $(this).addClass(ClassName.MAXIMIZED)\r\n $('html').addClass(ClassName.MAXIMIZED)\r\n if ($(this).hasClass(ClassName.COLLAPSED)) {\r\n $(this).addClass(ClassName.WAS_COLLAPSED)\r\n }\r\n $(this).dequeue()\r\n })\r\n\r\n const maximized = $.Event(Event.MAXIMIZED)\r\n\r\n this._element.trigger(maximized, this._parent)\r\n }\r\n\r\n minimize() {\r\n this._parent.find(this._settings.maximizeTrigger + ' .' + this._settings.minimizeIcon)\r\n .addClass(this._settings.maximizeIcon)\r\n .removeClass(this._settings.minimizeIcon)\r\n this._parent.css('cssText', 'height:' + this._parent[0].style.height + ' !important;' +\r\n 'width:' + this._parent[0].style.width + ' !important; transition: all .15s;'\r\n ).delay(10).queue(function(){\r\n $(this).removeClass(ClassName.MAXIMIZED)\r\n $('html').removeClass(ClassName.MAXIMIZED)\r\n $(this).css({\r\n 'height': 'inherit',\r\n 'width': 'inherit'\r\n })\r\n if ($(this).hasClass(ClassName.WAS_COLLAPSED)) {\r\n $(this).removeClass(ClassName.WAS_COLLAPSED)\r\n }\r\n $(this).dequeue()\r\n })\r\n\r\n const MINIMIZED = $.Event(Event.MINIMIZED)\r\n\r\n this._element.trigger(MINIMIZED, this._parent)\r\n }\r\n\r\n toggleMaximize() {\r\n if (this._parent.hasClass(ClassName.MAXIMIZED)) {\r\n this.minimize()\r\n return\r\n }\r\n\r\n this.maximize()\r\n }\r\n\r\n // Private\r\n\r\n _init(card) {\r\n this._parent = card\r\n\r\n $(this).find(this._settings.collapseTrigger).click(() => {\r\n this.toggle()\r\n })\r\n\r\n $(this).find(this._settings.maximizeTrigger).click(() => {\r\n this.toggleMaximize()\r\n })\r\n\r\n $(this).find(this._settings.removeTrigger).click(() => {\r\n this.remove()\r\n })\r\n }\r\n\r\n // Static\r\n\r\n static _jQueryInterface(config) {\r\n let data = $(this).data(DATA_KEY)\r\n const _options = $.extend({}, Default, $(this).data())\r\n\r\n if (!data) {\r\n data = new CardWidget($(this), _options)\r\n $(this).data(DATA_KEY, typeof config === 'string' ? data: config)\r\n }\r\n\r\n if (typeof config === 'string' && config.match(/collapse|expand|remove|toggle|maximize|minimize|toggleMaximize/)) {\r\n data[config]()\r\n } else if (typeof config === 'object') {\r\n data._init($(this))\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Data API\r\n * ====================================================\r\n */\r\n\r\n $(document).on('click', Selector.DATA_COLLAPSE, function (event) {\r\n if (event) {\r\n event.preventDefault()\r\n }\r\n\r\n CardWidget._jQueryInterface.call($(this), 'toggle')\r\n })\r\n\r\n $(document).on('click', Selector.DATA_REMOVE, function (event) {\r\n if (event) {\r\n event.preventDefault()\r\n }\r\n\r\n CardWidget._jQueryInterface.call($(this), 'remove')\r\n })\r\n\r\n $(document).on('click', Selector.DATA_MAXIMIZE, function (event) {\r\n if (event) {\r\n event.preventDefault()\r\n }\r\n\r\n CardWidget._jQueryInterface.call($(this), 'toggleMaximize')\r\n })\r\n\r\n /**\r\n * jQuery API\r\n * ====================================================\r\n */\r\n\r\n $.fn[NAME] = CardWidget._jQueryInterface\r\n $.fn[NAME].Constructor = CardWidget\r\n $.fn[NAME].noConflict = function () {\r\n $.fn[NAME] = JQUERY_NO_CONFLICT\r\n return CardWidget._jQueryInterface\r\n }\r\n\r\n return CardWidget\r\n})(jQuery)\r\n\r\nexport default CardWidget\r\n","/**\r\n * --------------------------------------------\r\n * AdminLTE CardRefresh.js\r\n * License MIT\r\n * --------------------------------------------\r\n */\r\n\r\nconst CardRefresh = (($) => {\r\n /**\r\n * Constants\r\n * ====================================================\r\n */\r\n\r\n const NAME = 'CardRefresh'\r\n const DATA_KEY = 'lte.cardrefresh'\r\n const EVENT_KEY = `.${DATA_KEY}`\r\n const JQUERY_NO_CONFLICT = $.fn[NAME]\r\n\r\n const Event = {\r\n LOADED: `loaded${EVENT_KEY}`,\r\n OVERLAY_ADDED: `overlay.added${EVENT_KEY}`,\r\n OVERLAY_REMOVED: `overlay.removed${EVENT_KEY}`,\r\n }\r\n\r\n const ClassName = {\r\n CARD: 'card',\r\n }\r\n\r\n const Selector = {\r\n CARD: `.${ClassName.CARD}`,\r\n DATA_REFRESH: '[data-card-widget=\"card-refresh\"]',\r\n }\r\n\r\n const Default = {\r\n source: '',\r\n sourceSelector: '',\r\n params: {},\r\n trigger: Selector.DATA_REFRESH,\r\n content: '.card-body',\r\n loadInContent: true,\r\n loadOnInit: true,\r\n responseType: '',\r\n overlayTemplate: '
',\r\n onLoadStart: function () {\r\n },\r\n onLoadDone: function (response) {\r\n return response;\r\n }\r\n }\r\n\r\n class CardRefresh {\r\n constructor(element, settings) {\r\n this._element = element\r\n this._parent = element.parents(Selector.CARD).first()\r\n this._settings = $.extend({}, Default, settings)\r\n this._overlay = $(this._settings.overlayTemplate)\r\n\r\n if (element.hasClass(ClassName.CARD)) {\r\n this._parent = element\r\n }\r\n\r\n if (this._settings.source === '') {\r\n throw new Error('Source url was not defined. Please specify a url in your CardRefresh source option.');\r\n }\r\n\r\n this._init();\r\n\r\n if (this._settings.loadOnInit) {\r\n this.load();\r\n }\r\n }\r\n\r\n load() {\r\n this._addOverlay()\r\n this._settings.onLoadStart.call($(this))\r\n\r\n $.get(this._settings.source, this._settings.params, function (response) {\r\n if (this._settings.loadInContent) {\r\n if (this._settings.sourceSelector != '') {\r\n response = $(response).find(this._settings.sourceSelector).html()\r\n }\r\n\r\n this._parent.find(this._settings.content).html(response)\r\n }\r\n\r\n this._settings.onLoadDone.call($(this), response)\r\n this._removeOverlay();\r\n }.bind(this), this._settings.responseType !== '' && this._settings.responseType)\r\n\r\n const loadedEvent = $.Event(Event.LOADED)\r\n $(this._element).trigger(loadedEvent)\r\n }\r\n\r\n _addOverlay() {\r\n this._parent.append(this._overlay)\r\n\r\n const overlayAddedEvent = $.Event(Event.OVERLAY_ADDED)\r\n $(this._element).trigger(overlayAddedEvent)\r\n };\r\n\r\n _removeOverlay() {\r\n this._parent.find(this._overlay).remove()\r\n\r\n const overlayRemovedEvent = $.Event(Event.OVERLAY_REMOVED)\r\n $(this._element).trigger(overlayRemovedEvent)\r\n };\r\n\r\n\r\n // Private\r\n\r\n _init(card) {\r\n $(this).find(this._settings.trigger).on('click', () => {\r\n this.load()\r\n })\r\n }\r\n\r\n // Static\r\n\r\n static _jQueryInterface(config) {\r\n let data = $(this).data(DATA_KEY)\r\n const _options = $.extend({}, Default, $(this).data())\r\n\r\n if (!data) {\r\n data = new CardRefresh($(this), _options)\r\n $(this).data(DATA_KEY, typeof config === 'string' ? data: config)\r\n }\r\n\r\n if (typeof config === 'string' && config.match(/load/)) {\r\n data[config]()\r\n } else if (typeof config === 'object') {\r\n data._init($(this))\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Data API\r\n * ====================================================\r\n */\r\n\r\n $(document).on('click', Selector.DATA_REFRESH, function (event) {\r\n if (event) {\r\n event.preventDefault()\r\n }\r\n\r\n CardRefresh._jQueryInterface.call($(this), 'load')\r\n })\r\n\r\n /**\r\n * jQuery API\r\n * ====================================================\r\n */\r\n\r\n $.fn[NAME] = CardRefresh._jQueryInterface\r\n $.fn[NAME].Constructor = CardRefresh\r\n $.fn[NAME].noConflict = function () {\r\n $.fn[NAME] = JQUERY_NO_CONFLICT\r\n return CardRefresh._jQueryInterface\r\n }\r\n\r\n return CardRefresh\r\n})(jQuery)\r\n\r\nexport default CardRefresh\r\n","/**\r\n * --------------------------------------------\r\n * AdminLTE Dropdown.js\r\n * License MIT\r\n * --------------------------------------------\r\n */\r\n\r\nconst Dropdown = (($) => {\r\n /**\r\n * Constants\r\n * ====================================================\r\n */\r\n\r\n const NAME = 'Dropdown'\r\n const DATA_KEY = 'lte.dropdown'\r\n const EVENT_KEY = `.${DATA_KEY}`\r\n const JQUERY_NO_CONFLICT = $.fn[NAME]\r\n\r\n const Selector = {\r\n DROPDOWN_MENU: 'ul.dropdown-menu',\r\n DROPDOWN_TOGGLE: '[data-toggle=\"dropdown\"]',\r\n }\r\n\r\n const ClassName = {\r\n DROPDOWN_HOVER: '.dropdown-hover'\r\n }\r\n\r\n const Default = {\r\n }\r\n\r\n\r\n /**\r\n * Class Definition\r\n * ====================================================\r\n */\r\n\r\n class Dropdown {\r\n constructor(element, config) {\r\n this._config = config\r\n this._element = element\r\n }\r\n\r\n // Public\r\n\r\n toggleSubmenu() {\r\n this._element.siblings().show().toggleClass(\"show\");\r\n\r\n if (! this._element.next().hasClass('show')) {\r\n this._element.parents('.dropdown-menu').first().find('.show').removeClass(\"show\").hide();\r\n }\r\n\r\n this._element.parents('li.nav-item.dropdown.show').on('hidden.bs.dropdown', function(e) {\r\n $('.dropdown-submenu .show').removeClass(\"show\").hide();\r\n });\r\n\r\n }\r\n\r\n // Static\r\n\r\n static _jQueryInterface(config) {\r\n return this.each(function () {\r\n let data = $(this).data(DATA_KEY)\r\n const _config = $.extend({}, Default, $(this).data())\r\n\r\n if (!data) {\r\n data = new Dropdown($(this), _config)\r\n $(this).data(DATA_KEY, data)\r\n }\r\n\r\n if (config === 'toggleSubmenu') {\r\n data[config]()\r\n }\r\n })\r\n }\r\n }\r\n\r\n /**\r\n * Data API\r\n * ====================================================\r\n */\r\n\r\n $(Selector.DROPDOWN_MENU + ' ' + Selector.DROPDOWN_TOGGLE).on(\"click\", function(event) {\r\n event.preventDefault();\r\n event.stopPropagation();\r\n\r\n Dropdown._jQueryInterface.call($(this), 'toggleSubmenu')\r\n });\r\n\r\n // $(Selector.SIDEBAR + ' a').on('focusin', () => {\r\n // $(Selector.MAIN_SIDEBAR).addClass(ClassName.SIDEBAR_FOCUSED);\r\n // })\r\n\r\n // $(Selector.SIDEBAR + ' a').on('focusout', () => {\r\n // $(Selector.MAIN_SIDEBAR).removeClass(ClassName.SIDEBAR_FOCUSED);\r\n // })\r\n\r\n /**\r\n * jQuery API\r\n * ====================================================\r\n */\r\n\r\n $.fn[NAME] = Dropdown._jQueryInterface\r\n $.fn[NAME].Constructor = Dropdown\r\n $.fn[NAME].noConflict = function () {\r\n $.fn[NAME] = JQUERY_NO_CONFLICT\r\n return Dropdown._jQueryInterface\r\n }\r\n\r\n return Dropdown\r\n})(jQuery)\r\n\r\nexport default Dropdown\r\n","/**\r\n * --------------------------------------------\r\n * AdminLTE Toasts.js\r\n * License MIT\r\n * --------------------------------------------\r\n */\r\n\r\nconst Toasts = (($) => {\r\n /**\r\n * Constants\r\n * ====================================================\r\n */\r\n\r\n const NAME = 'Toasts'\r\n const DATA_KEY = 'lte.toasts'\r\n const EVENT_KEY = `.${DATA_KEY}`\r\n const JQUERY_NO_CONFLICT = $.fn[NAME]\r\n\r\n const Event = {\r\n INIT: `init${EVENT_KEY}`,\r\n CREATED: `created${EVENT_KEY}`,\r\n REMOVED: `removed${EVENT_KEY}`,\r\n }\r\n\r\n const Selector = {\r\n BODY: 'toast-body',\r\n CONTAINER_TOP_RIGHT: '#toastsContainerTopRight',\r\n CONTAINER_TOP_LEFT: '#toastsContainerTopLeft',\r\n CONTAINER_BOTTOM_RIGHT: '#toastsContainerBottomRight',\r\n CONTAINER_BOTTOM_LEFT: '#toastsContainerBottomLeft',\r\n }\r\n\r\n const ClassName = {\r\n TOP_RIGHT: 'toasts-top-right',\r\n TOP_LEFT: 'toasts-top-left',\r\n BOTTOM_RIGHT: 'toasts-bottom-right',\r\n BOTTOM_LEFT: 'toasts-bottom-left',\r\n FADE: 'fade',\r\n }\r\n\r\n const Position = {\r\n TOP_RIGHT: 'topRight',\r\n TOP_LEFT: 'topLeft',\r\n BOTTOM_RIGHT: 'bottomRight',\r\n BOTTOM_LEFT: 'bottomLeft',\r\n }\r\n\r\n const Id = {\r\n CONTAINER_TOP_RIGHT: 'toastsContainerTopRight',\r\n CONTAINER_TOP_LEFT: 'toastsContainerTopLeft',\r\n CONTAINER_BOTTOM_RIGHT: 'toastsContainerBottomRight',\r\n CONTAINER_BOTTOM_LEFT: 'toastsContainerBottomLeft',\r\n }\r\n\r\n const Default = {\r\n position: Position.TOP_RIGHT,\r\n fixed: true,\r\n autohide: false,\r\n autoremove: true,\r\n delay: 1000,\r\n fade: true,\r\n icon: null,\r\n image: null,\r\n imageAlt: null,\r\n imageHeight: '25px',\r\n title: null,\r\n subtitle: null,\r\n close: true,\r\n body: null,\r\n class: null,\r\n }\r\n\r\n /**\r\n * Class Definition\r\n * ====================================================\r\n */\r\n class Toasts {\r\n constructor(element, config) {\r\n this._config = config\r\n\r\n this._prepareContainer();\r\n\r\n const initEvent = $.Event(Event.INIT)\r\n $('body').trigger(initEvent)\r\n }\r\n\r\n // Public\r\n\r\n create() {\r\n var toast = $('
')\r\n\r\n toast.data('autohide', this._config.autohide)\r\n toast.data('animation', this._config.fade)\r\n \r\n if (this._config.class) {\r\n toast.addClass(this._config.class)\r\n }\r\n\r\n if (this._config.delay && this._config.delay != 500) {\r\n toast.data('delay', this._config.delay)\r\n }\r\n\r\n var toast_header = $('
')\r\n\r\n if (this._config.image != null) {\r\n var toast_image = $('').addClass('rounded mr-2').attr('src', this._config.image).attr('alt', this._config.imageAlt)\r\n \r\n if (this._config.imageHeight != null) {\r\n toast_image.height(this._config.imageHeight).width('auto')\r\n }\r\n\r\n toast_header.append(toast_image)\r\n }\r\n\r\n if (this._config.icon != null) {\r\n toast_header.append($('').addClass('mr-2').addClass(this._config.icon))\r\n }\r\n\r\n if (this._config.title != null) {\r\n toast_header.append($('').addClass('mr-auto').html(this._config.title))\r\n }\r\n\r\n if (this._config.subtitle != null) {\r\n toast_header.append($('').html(this._config.subtitle))\r\n }\r\n\r\n if (this._config.close == true) {\r\n var toast_close = $('