!function () { "use strict"; function t(t, e, s, n, o, r, a) { function i(t) { if (t)d(t.toastId); else for (var e = 0; e < O.length; e++)d(O[e].toastId) } function l(t, e, s) { var n = m().iconClasses.error; return g(n, t, e, s) } function c(t, e, s) { var n = m().iconClasses.info; return g(n, t, e, s) } function u(t, e, s) { var n = m().iconClasses.success; return g(n, t, e, s) } function p(t, e, s) { var n = m().iconClasses.warning; return g(n, t, e, s) } function d(e, s) { function n(t) { for (var e = 0; e < O.length; e++)if (O[e].toastId === t)return O[e] } function o() { return !O.length } var i = n(e); i && !i.deleting && (i.deleting = !0, i.isOpened = !1, t.leave(i.el).then(function () { i.scope.options.onHidden && i.scope.options.onHidden(s), i.scope.$destroy(); var t = O.indexOf(i); delete B[i.scope.message], O.splice(t, 1); var e = r.maxOpened; e && O.length >= e && O[e - 1].open.resolve(), o() && (h.remove(), h = null, T = a.defer()) })) } function g(t, e, s, n) { return angular.isObject(s) && (n = s, s = null), v({iconClass: t, message: e, optionsOverride: n, title: s}) } function m() { return angular.extend({}, r) } function f(e) { if (h)return T.promise; h = angular.element("
"), h.attr("id", e.containerId), h.addClass(e.positionClass), h.css({"pointer-events": "auto"}); var s = angular.element(document.querySelector(e.target)); if (!s || !s.length)throw"Target for toasts doesn't exist"; return t.enter(h, s).then(function () { T.resolve() }), T.promise } function v(s) { function r(t, e, s) { s.allowHtml ? (t.scope.allowHtml = !0, t.scope.title = o.trustAsHtml(e.title), t.scope.message = o.trustAsHtml(e.message)) : (t.scope.title = e.title, t.scope.message = e.message), t.scope.toastType = t.iconClass, t.scope.toastId = t.toastId, t.scope.options = { extendedTimeOut: s.extendedTimeOut, messageClass: s.messageClass, onHidden: s.onHidden, onShown: s.onShown, progressBar: s.progressBar, tapToDismiss: s.tapToDismiss, timeOut: s.timeOut, titleClass: s.titleClass, toastClass: s.toastClass }, s.closeButton && (t.scope.options.closeHtml = s.closeHtml) } function i() { function t(t) { for (var e = ["containerId", "iconClasses", "maxOpened", "newestOnTop", "positionClass", "preventDuplicates", "preventOpenDuplicates", "templates"], s = 0, n = e.length; n > s; s++)delete t[e[s]]; return t } var e = {toastId: C++, isOpened: !1, scope: n.$new(), open: a.defer()}; return e.iconClass = s.iconClass, s.optionsOverride && (p = angular.extend(p, t(s.optionsOverride)), e.iconClass = s.optionsOverride.iconClass || e.iconClass), r(e, s, p), e.el = l(e.scope), e } function l(t) { var s = angular.element("
"), n = e.get("$compile"); return n(s)(t) } function c() { return p.maxOpened && O.length <= p.maxOpened || !p.maxOpened } function u() { var t = p.preventDuplicates && s.message === w, e = p.preventOpenDuplicates && B[s.message]; return t || e ? !0 : (w = s.message, B[s.message] = !0, !1) } var p = m(); if (!u()) { var g = i(); if (O.push(g), p.autoDismiss && p.maxOpened > 0)for (var v = O.slice(0, O.length - p.maxOpened), T = 0, $ = v.length; $ > T; T++)d(v[T].toastId); return c() && g.open.resolve(), g.open.promise.then(function () { f(p).then(function () { if (g.isOpened = !0, p.newestOnTop)t.enter(g.el, h).then(function () { g.scope.init() }); else { var e = h[0].lastChild ? angular.element(h[0].lastChild) : null; t.enter(g.el, h, e).then(function () { g.scope.init() }) } }) }), g } } var h, C = 0, O = [], w = "", B = {}, T = a.defer(), $ = { clear: i, error: l, info: c, remove: d, success: u, warning: p }; return $ } angular.module("toastr", []).factory("toastr", t), t.$inject = ["$animate", "$injector", "$document", "$rootScope", "$sce", "toastrConfig", "$q"] }(), function () { "use strict"; angular.module("toastr").constant("toastrConfig", { allowHtml: !1, autoDismiss: !1, closeButton: !1, closeHtml: "", containerId: "toast-container", extendedTimeOut: 1e3, iconClasses: {error: "toast-error", info: "toast-info", success: "toast-success", warning: "toast-warning"}, maxOpened: 0, messageClass: "toast-message", newestOnTop: !0, onHidden: null, onShown: null, positionClass: "toast-top-right", preventDuplicates: !1, preventOpenDuplicates: !1, progressBar: !1, tapToDismiss: !0, target: "body", templates: {toast: "directives/toast/toast.html", progressbar: "directives/progressbar/progressbar.html"}, timeOut: 5e3, titleClass: "toast-title", toastClass: "toast" }) }(), function () { "use strict"; function t(t) { function e(t, e, s, n) { function o() { var t = (i - (new Date).getTime()) / a * 100; e.css("width", t + "%") } var r, a, i; n.progressBar = t, t.start = function (t) { r && clearInterval(r), a = parseFloat(t), i = (new Date).getTime() + a, r = setInterval(o, 10) }, t.stop = function () { r && clearInterval(r) }, t.$on("$destroy", function () { clearInterval(r) }) } return { replace: !0, require: "^toast", templateUrl: function () { return t.templates.progressbar }, link: e } } angular.module("toastr").directive("progressBar", t), t.$inject = ["toastrConfig"] }(), function () { "use strict"; function t() { this.progressBar = null, this.startProgressBar = function (t) { this.progressBar && this.progressBar.start(t) }, this.stopProgressBar = function () { this.progressBar && this.progressBar.stop() } } angular.module("toastr").controller("ToastController", t) }(), function () { "use strict"; function t(t, e, s, n) { function o(s, o, r, a) { function i(t) { return a.startProgressBar(t), e(function () { a.stopProgressBar(), n.remove(s.toastId) }, t, 1) } function l() { s.progressBar = !1, a.stopProgressBar() } function c() { return s.options.closeHtml } var u; if (s.toastClass = s.options.toastClass, s.titleClass = s.options.titleClass, s.messageClass = s.options.messageClass, s.progressBar = s.options.progressBar, c()) { var p = angular.element(s.options.closeHtml), d = t.get("$compile"); p.addClass("toast-close-button"), p.attr("ng-click", "close()"), d(p)(s), o.prepend(p) } s.init = function () { s.options.timeOut && (u = i(s.options.timeOut)), s.options.onShown && s.options.onShown() }, o.on("mouseenter", function () { l(), u && e.cancel(u) }), s.tapToast = function () { s.options.tapToDismiss && s.close(!0) }, s.close = function (t) { n.remove(s.toastId, t) }, o.on("mouseleave", function () { (0 !== s.options.timeOut || 0 !== s.options.extendedTimeOut) && (s.$apply(function () { s.progressBar = s.options.progressBar }), u = i(s.options.extendedTimeOut)) }) } return { replace: !0, templateUrl: function () { return s.templates.toast }, controller: "ToastController", link: o } } angular.module("toastr").directive("toast", t), t.$inject = ["$injector", "$interval", "toastrConfig", "toastr"] }(), angular.module("toastr").run(["$templateCache", function (t) { t.put("directives/progressbar/progressbar.html", '
\n'), t.put("directives/toast/toast.html", '
\n
\n
{{title}}
\n
{{message}}
\n
\n
\n
\n \n
\n') }]);