/*! bsAlerts v1.0.5 (https://github.com/eltimn/jquery-bs-alerts) * Copyright 2013-2017 eltimn * @license MIT */ !function(t,e,n,r){"use strict";var s=function(e,r){function s(t){return"notice"===t?"info":"error"===t?"danger":t}function i(e){return{errs:t.grep(e,function(t){return"error"===t.priority||"danger"===t.priority}),warns:t.grep(e,function(t){return"warning"===t.priority}),infos:t.grep(e,function(t){return"notice"===t.priority||"info"===t.priority}),succs:t.grep(e,function(t){return"success"===t.priority})}}var a,o=this;o.element=e,o.options=t.extend({},t.fn.bsAlerts.defaults,r),t(n).on("add-alerts",function(){var t=Array.prototype.slice.call(arguments,1);o.addAlerts(t)}),t(n).on("clear-alerts",function(){o.clearAlerts()}),t.each(this.options.ids.split(","),function(e,r){var s=t.trim(r);if(s.length>0){var i="set-alert-id-"+s;t(n).on(i,function(){var t=Array.prototype.slice.call(arguments,1);o.addAlerts(t)})}});var l=this.options.titles;t.each(Object.keys(l),function(t,e){var n=l[e];delete l[e],l[s(e)]=n}),o.clearAlerts=function(){t(this.element).html("")},o.addAlerts=function(t){var e=i([].concat(t));o.addAlertsToContainer(e.errs),o.addAlertsToContainer(e.warns),o.addAlertsToContainer(e.infos),o.addAlertsToContainer(e.succs);var n=parseInt(o.options.fade,10);!isNaN(n)&&n>0&&(clearTimeout(a),a=setTimeout(o.fade,n))},o.fade=function(){t("[data-alerts-container]").fadeOut("slow",function(){t(this).remove()})},o.buildNoticeContainer=function(e){if(e.length>0){var n=s(e[0].priority),r=t("",{type:"button",class:"close","data-dismiss":"alert","aria-hidden":!0,"aria-label":"close"}).html("×"),i=t(this.options.usebullets?"