/*
 Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 No deletion without permission, or be held responsible to law.

 @author ThinkGem
 @version 2019-1-6
*/
var $jscomp = $jscomp || {};
$jscomp.scope = {};
$jscomp.findInternal = function (a, b, c) {
    a instanceof String && (a = String(a));
    for (var d = a.length, f = 0; f < d; f++) {
        var e = a[f];
        if (b.call(c, e, f, a)) return {i: f, v: e}
    }
    return {i: -1, v: void 0}
};
$jscomp.ASSUME_ES5 = !1;
$jscomp.ASSUME_NO_NATIVE_MAP = !1;
$jscomp.ASSUME_NO_NATIVE_SET = !1;
$jscomp.SIMPLE_FROUND_POLYFILL = !1;
$jscomp.defineProperty = $jscomp.ASSUME_ES5 || "function" == typeof Object.defineProperties ? Object.defineProperty : function (a, b, c) {
    a != Array.prototype && a != Object.prototype && (a[b] = c.value)
};
$jscomp.getGlobal = function (a) {
    a = ["object" == typeof window && window, "object" == typeof self && self, "object" == typeof global && global, a];
    for (var b = 0; b < a.length; ++b) {
        var c = a[b];
        if (c && c.Math == Math) return c
    }
    throw Error("Cannot find global object");
};
$jscomp.global = $jscomp.getGlobal(this);
$jscomp.polyfill = function (a, b, c, d) {
    if (b) {
        c = $jscomp.global;
        a = a.split(".");
        for (d = 0; d < a.length - 1; d++) {
            var f = a[d];
            f in c || (c[f] = {});
            c = c[f]
        }
        a = a[a.length - 1];
        d = c[a];
        b = b(d);
        b != d && null != b && $jscomp.defineProperty(c, a, {configurable: !0, writable: !0, value: b})
    }
};
$jscomp.polyfill("Array.prototype.find", function (a) {
    return a ? a : function (a, c) {
        return $jscomp.findInternal(this, a, c).v
    }
}, "es6", "es3");
try {
    self.frameElement && "IFRAME" == self.frameElement.tagName && (-1 == js.window.location.href.lastIndexOf("#" + ctxPath) ? js.window.location.reload(!0) : js.window.location = ctx + "/index")
} catch (a) {
}
+function (a) {
    function b(e) {
        return this.each(function () {
            var h = a(this), g = h.data("lte.pushmenu");
            g || (g = a.extend({}, c, h.data(), "object" == typeof e && e), h.data("lte.pushmenu", g = new d(g)));
            "toggle" == e && g.toggle()
        })
    }

    var c = {collapseScreenSize: 767, expandOnHover: !1, expandTransitionDelay: 0}, d = function (a) {
        this.options = a;
        this.init()
    };
    d.prototype.init = function () {
        if (this.options.expandOnHover || a("body").is(".sidebar-mini.fixed")) this.expandOnHover(), a("body").addClass("sidebar-mini-expand-feature");
        var e = this;
        a(".content-wrapper").click(function () {
            a(window).width() <=
            e.options.collapseScreenSize && a("body").hasClass("sidebar-open") && e.close()
        });
        a(".sidebar-form .form-control").click(function (a) {
            a.stopPropagation()
        })
    };
    d.prototype.toggle = function () {
        var e = a(window).width(), c = !a("body").hasClass("sidebar-collapse");
        e <= this.options.collapseScreenSize && (c = a("body").hasClass("sidebar-open"));
        c ? this.close() : this.open();
        a(".main-sidebar").show();
        a(".content-wrapper").css("margin-left", "")
    };
    d.prototype.open = function () {
        a(window).width() > this.options.collapseScreenSize ? a("body").removeClass("sidebar-collapse").trigger(a.Event("expanded.pushMenu")) :
            a("body").addClass("sidebar-open").trigger(a.Event("expanded.pushMenu"))
    };
    d.prototype.close = function () {
        a(window).width() > this.options.collapseScreenSize ? a("body").addClass("sidebar-collapse").trigger(a.Event("collapsed.pushMenu")) : a("body").removeClass("sidebar-open sidebar-collapse").trigger(a.Event("collapsed.pushMenu"))
    };
    d.prototype.expandOnHover = function () {
        var e = this;
        a(".main-sidebar").hover(function () {
            a("body").is(".sidebar-mini.sidebar-collapse") && a(window).width() > e.options.collapseScreenSize &&
            e.expand()
        }, function () {
            a("body").is(".sidebar-expanded-on-hover") && e.collapse()
        })
    };
    d.prototype.expand = function () {
        setTimeout(function () {
            a("body").removeClass("sidebar-collapse").addClass("sidebar-expanded-on-hover")
        }, this.options.expandTransitionDelay)
    };
    d.prototype.collapse = function () {
        setTimeout(function () {
            a("body").removeClass("sidebar-expanded-on-hover").addClass("sidebar-collapse")
        }, this.options.expandTransitionDelay)
    };
    var f = a.fn.pushMenu;
    a.fn.pushMenu = b;
    a.fn.pushMenu.Constructor = d;
    a.fn.pushMenu.noConflict =
        function () {
            a.fn.pushMenu = f;
            return this
        };
    a(function () {
        b.call(a(this));
        a('[data-toggle="push-menu"]').on("click", function (e) {
            e.preventDefault();
            b.call(a(this), "toggle");
            a(window).resize()
        });
        a('[data-toggle="push-menu"]').on("mousedown", function (e) {
            3 == e.which && (e.preventDefault(), a(".main-sidebar").is(":hidden") ? (a(".main-sidebar").show(), a(".content-wrapper").css("margin-left", "")) : (a(".main-sidebar").hide(), a(".content-wrapper").css("cssText", "margin-left:0!important;")), a(window).resize())
        });
        a('[data-toggle="push-menu"]').css({cursor: "pointer"})
    })
}(jQuery) +
function (a) {
    function b(e) {
        return this.each(function () {
            var b = a(this);
            if (!b.data("lte.tree")) {
                var g = a.extend({}, c, b.data(), "object" == typeof e && e);
                b.data("lte.tree", new d(b, g))
            }
        })
    }

    var c = {animationSpeed: 50, accordion: !0, followLink: !0, trigger: ".treeview a"}, d = function (e, c) {
        this.element = e;
        this.options = c;
        a(this.element).addClass("tree");
        a(".treeview.active", this.element).addClass("menu-open");
        this.isHover = "true" == a(this.element).attr("data-hover");
        this._setUpListeners()
    };
    d.prototype.toggle = function (e, c) {
        var d =
            e.next(".treeview-menu"), b = e.parent(), f = b.hasClass("menu-open");
        b.is(".treeview") && (this.options.followLink && "#" != e.attr("href") || c.preventDefault(), f ? this.collapse(d, b) : this.expand(d, b), 0 === d.children().length && (a(".active", this.element).removeClass("treeview-item active"), this.isHover || b.parents(".treeview:not(.active)").addClass("menu-open active"), b.addClass("treeview-item active")))
    };
    d.prototype.expand = function (c, d) {
        var e = a.Event("expanded.tree");
        if (this.options.accordion) {
            var b = d.siblings(".menu-open, .active"),
                f = b.children(".treeview-menu");
            this.collapse(f, b)
        }
        var h = this;
        d.addClass("menu-open");
        c.slideDown(h.options.animationSpeed, function () {
            a(h.element).trigger(e)
        });
        this.isHover && !d.parent().hasClass("tree") && (b = d.parent(), c.css({
            left: b.width(),
            top: d.offset().top - b.offset().top
        }))
    };
    d.prototype.collapse = function (c, d) {
        var e = a.Event("collapsed.tree"), b = this;
        c.find(".menu-open, .active").removeClass("menu-open");
        d.removeClass("menu-open");
        c.slideUp(b.options.animationSpeed, function () {
            c.find(".menu-open, .active > .treeview").slideUp();
            a(b.element).trigger(e)
        })
    };
    d.prototype._setUpListeners = function () {
        var c = this;
        if (this.isHover) {
            var d;
            a(this.element).on("mouseenter", this.options.trigger, function (e) {
                var b = a(this);
                e = b.next(".treeview-menu");
                b = b.parent();
                c.expand(e, b);
                window.clearTimeout(d)
            });
            a(this.element).on("mouseleave", ">li,.treeview-menu", function (b) {
                window.clearTimeout(d);
                d = window.setTimeout(function () {
                    a(c.element).find(".treeview-menu").hide()
                }, 500)
            });
            a(this.element).on("click", ".treeview a", function (b) {
                b = a(this).data("href");
                "" != b && "blank" != b && a(c.element).find(".treeview-menu").hide();
                a(this).trigger("mouseenter")
            })
        } else a(this.element).on("click", this.options.trigger, function (b) {
            c.toggle(a(this), b)
        })
    };
    var f = a.fn.tree;
    a.fn.tree = b;
    a.fn.tree.Constructor = d;
    a.fn.tree.noConflict = function () {
        a.fn.tree = f;
        return this
    };
    a(function () {
        a('[data-widget="tree"]').each(function () {
            b.call(a(this))
        })
    })
}(jQuery);
$(function () {
    var a = {
        height: function () {
            var a = $(window).height(), b = $(".main-header:visible").outerHeight() || 0,
                f = $(".main-footer:visible").outerHeight() || 0;
            a = a - b - f - 1;
            return 300 > a ? 300 : a
        }
    };
    "true" == js.cookie("tabPageModel") && (a.maxLength = 1);
    js.initTabPage("tabpanel", a);
    $(window).resize();
    a = $("#desktopTabPage");
    if (0 < a.length) {
        var b = a.data("url");
        "" != b && b != ctx && js.addTabPage(null, '<i class="fa fa-home"></i> ' + a.data("title"), b, !1, !1)
    }
    a = $("#modifyPasswordTip");
    0 < a.length && "" != a.data("message") && js.confirm(a.data("message"),
        function () {
            $("#modifyPassword").click()
        });
    window.isMenuClickFlag = !1;
    $(window).bind("hashchange", function (a) {
        if (!window.isMenuClickFlag) if ((a = window.location.hash.replace("#", "")) && "" != a && a != window.location.pathname) {
            var b = js.text("tabpanel.newTabPage"), c = a.lastIndexOf("#");
            -1 != c && (b = a.substring(c + 1), a = a.substring(0, c));
            (c = $(".main-header,.sidebar-menu").find('a.addTabPage[data-href="' + a + '"]').eq(0)) && 0 < c.length ? c.click() : 0 < $(".sidebar-menu").length && js.addTabPage(null, js.decodeUrl(b), a)
        } else a = $(".sidebar-menu > li:eq(0):not(.active) > a:eq(0)"),
        "blank" == a.data("href") && a.click();
        window.isMenuClickFlag = !1
    }).trigger("hashchange");
    $("#fullScreen").click(function () {
        if ("true" == $(this).data("isOpen")) $(this).data("isOpen", "false"), document.exitFullscreen ? document.exitFullscreen() : document.msExitFullscreen ? document.msExitFullscreen() : document.mozCancelFullScreen ? document.mozCancelFullScreen() : document.webkitCancelFullScreen && document.webkitCancelFullScreen(); else {
            $(this).data("isOpen", "true");
            var a = document.documentElement;
            a.requestFullscreen ?
                a.requestFullscreen() : a.msRequestFullscreen ? a.msRequestFullscreen() : a.mozRequestFullScreen ? a.mozRequestFullScreen() : a.webkitRequestFullScreen && a.webkitRequestFullScreen()
        }
        return !1
    }).tooltip();
    $("#switchSkin").click(function () {
        var a = $(this).data("layerWidth"), b = $(this).data("layerHeight");
        js.layer.open({
            type: 2,
            shadeClose: !0,
            title: $(this).attr("data-original-title"),
            area: [(a || "560") + "px", (b || "290") + "px"],
            content: ctx + "/portal/switchSkin/select",
            success: function (a, b) {
                (500 > $(js.layer.window).width() || 390 > $(js.layer.window).height()) &&
                js.layer.full(b)
            }
        })
    }).tooltip()
});
+function (a) {
    function b(b) {
        return this.each(function () {
            var e = a(this), f = e.data("lte.layout");
            f || (f = a.extend({}, c, e.data(), "object" === typeof b && b), e.data("lte.layout", f = new d(f)));
            if ("string" === typeof b) {
                if ("undefined" === typeof f[b]) throw Error("No method named " + b);
                f[b]()
            }
        })
    }

    var c = {slimscroll: !0, resetHeight: !0}, d = function (a) {
        this.options = a;
        this.bindedResize = !1;
        this.activate()
    };
    d.prototype.activate = function () {
        this.fix();
        this.fixSidebar();
        a("body").removeClass("hold-transition");
        if (!this.bindedResize) {
            var b =
                this;
            a(window).resize(function () {
                b.fix();
                b.fixSidebar();
                a(".main-header .logo, .sidebar").one("webkitTransitionEnd otransitionend oTransitionEnd msTransitionEnd transitionend", function () {
                    b.fix();
                    b.fixSidebar()
                });
                setTimeout(function () {
                    b.fix();
                    b.fixSidebar()
                }, 500)
            });
            this.bindedResize = !0
        }
    };
    d.prototype.fix = function () {
    };
    d.prototype.fixSidebar = function () {
        a("body").hasClass("fixed") && this.options.slimscroll && "undefined" !== typeof a.fn.slimScroll && a(".sidebar").slimScroll({
            height: a(".content-wrapper").height() +
                "px", color: "#aaa", size: "3px"
        })
    };
    var f = a.fn.layout;
    a.fn.layout = b;
    a.fn.layout.Constuctor = d;
    a.fn.layout.noConflict = function () {
        a.fn.layout = f;
        return this
    };
    a(function () {
        b.call(a("body"))
    })
}(jQuery);
