/*!
 * ngToast v1.2.1 (http://tameraydin.github.io/ngToast)
 * Copyright 2014 Tamer Aydin
 * Licensed under MIT (http://tameraydin.mit-license.org/)
 */
!function(a,b){"use strict";b.module("ngToast.provider",[]).provider("ngToast",[function(){function a(a){for(var d=Math.floor(1e3*Math.random());c.indexOf(d)>-1;)d=Math.floor(1e3*Math.random());this.id=d,this.class=e.class,this.dismissOnTimeout=e.dismissOnTimeout,this.timeout=e.timeout,this.dismissButton=e.dismissButton,this.dismissButtonHtml=e.dismissButtonHtml,this.dismissOnClick=e.dismissOnClick,b.extend(this,a)}var c=[],d=[],e={"class":"success",dismissOnTimeout:!0,timeout:4e3,dismissButton:!1,dismissButtonHtml:"&times;",dismissOnClick:!0,horizontalPosition:"right",verticalPosition:"top",maxNumber:0};this.configure=function(a){b.extend(e,a)},this.$get=[function(){return{settings:e,messages:c,dismiss:function(a){if(a){for(var b=c.length-1;b>=0;b--)if(c[b].id===a)return c.splice(b,1),void d.splice(d.indexOf(a),1)}else{for(;c.length>0;)c.pop();d=[]}},create:function(b){e.maxNumber>0&&d.length>=e.maxNumber&&this.dismiss(d[0]),b="string"==typeof b?{content:b}:b;var f=new a(b);return"bottom"===e.verticalPosition?c.unshift(f):c.push(f),d.push(f.id),f.id}}}]}])}(window,window.angular),function(a,b){"use strict";b.module("ngToast.directives",["ngToast.provider"]).directive("toast",["ngToast","$templateCache","$log",function(a,b,c){return{replace:!0,restrict:"E",template:'<div class="ng-toast ng-toast--{{hPos}} ng-toast--{{vPos}}"><ul class="ng-toast__list"><toast-message ng-repeat="message in messages" message="message"><span ng-bind-html="message.content"></span></toast-message></ul></div>',compile:function(d,e){if(e.template){var f=b.get(e.template);f?d.replaceWith(f):c.warn("ngToast: Provided template could not be loaded. Please be sure that it is populated before the <toast> element is represented.")}return function(b){b.hPos=a.settings.horizontalPosition,b.vPos=a.settings.verticalPosition,b.messages=a.messages}}}}]).directive("toastMessage",["$timeout","ngToast",function(a,b){return{replace:!0,transclude:!0,restrict:"E",scope:{message:"="},controller:["$scope","ngToast",function(a,b){a.dismiss=function(){b.dismiss(a.message.id)}}],template:'<li class="ng-toast__message"><div class="alert alert-{{message.class}}" ng-class="{\'alert-dismissable\': message.dismissButton}"><button type="button" class="close" ng-if="message.dismissButton" ng-bind-html="message.dismissButtonHtml" ng-click="!message.dismissOnClick && dismiss()"></button><span ng-transclude></span></div></li>',link:function(c,d){c.message.dismissOnTimeout&&a(function(){b.dismiss(c.message.id)},c.message.timeout),c.message.dismissOnClick&&d.bind("click",function(){b.dismiss(c.message.id),c.$apply()})}}}])}(window,window.angular),function(a,b){"use strict";b.module("ngToast",["ngAnimate","ngSanitize","ngToast.directives","ngToast.provider"])}(window,window.angular);