!function(e){e(["jquery"],function(e){return function(){function t(e,t,n){return g({type:o.error,iconclass:m().iconclasses.error,message:e,optionsoverride:n,title:t})}function n(t,n){return t||(t=m()),v=e("#"+t.containerid),v.length?v:(n&&(v=u(t)),v)}function i(e,t,n){return g({type:o.info,iconclass:m().iconclasses.info,message:e,optionsoverride:n,title:t})}function o(e){w=e}function s(e,t,n){return g({type:o.success,iconclass:m().iconclasses.success,message:e,optionsoverride:n,title:t})}function a(e,t,n){return g({type:o.warning,iconclass:m().iconclasses.warning,message:e,optionsoverride:n,title:t})}function r(e,t){var i=m();v||n(i),l(e,i,t)||d(i)}function c(t){var i=m();return v||n(i),t&&0===e(":focus",t).length?void h(t):void(v.children().length&&v.remove())}function d(t){for(var n=v.children(),i=n.length-1;i>=0;i--)l(e(n[i]),t)}function l(t,n,i){var o=i&&i.force?i.force:!1;return t&&(o||0===e(":focus",t).length)?(t[n.hidemethod]({duration:n.hideduration,easing:n.hideeasing,complete:function(){h(t)}}),!0):!1}function u(t){return v=e("
").attr("id",t.containerid).addclass(t.positionclass).attr("aria-live","polite").attr("role","alert"),v.appendto(e(t.target)),v}function p(){return{taptodismiss:!0,toastclass:"toast",containerid:"toast-container",debug:!1,showmethod:"fadein",showduration:300,showeasing:"swing",onshown:void 0,hidemethod:"fadeout",hideduration:1e3,hideeasing:"swing",onhidden:void 0,closemethod:!1,closeduration:!1,closeeasing:!1,extendedtimeout:1e3,iconclasses:{error:"toast-error",info:"toast-info",success:"toast-success",warning:"toast-warning"},iconclass:"toast-info",positionclass:"toast-top-right",timeout:5e3,titleclass:"toast-title",messageclass:"toast-message",escapehtml:!1,target:"body",closehtml:'',newestontop:!0,preventduplicates:!1,progressbar:!1}}function f(e){w&&w(e)}function g(t){function i(e){return null==e&&(e=""),new string(e).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">")}function o(){r(),d(),l(),u(),p(),c()}function s(){y.hover(b,o),!x.onclick&&x.taptodismiss&&y.click(w),x.closebutton&&k&&k.click(function(e){e.stoppropagation?e.stoppropagation():void 0!==e.cancelbubble&&e.cancelbubble!==!0&&(e.cancelbubble=!0),w(!0)}),x.onclick&&y.click(function(e){x.onclick(e),w()})}function a(){y.hide(),y[x.showmethod]({duration:x.showduration,easing:x.showeasing,complete:x.onshown}),x.timeout>0&&(h=settimeout(w,x.timeout),q.maxhidetime=parsefloat(x.timeout),q.hideeta=(new date).gettime()+q.maxhidetime,x.progressbar&&(q.intervalid=setinterval(d,10)))}function r(){t.iconclass&&y.addclass(x.toastclass).addclass(e)}function c(){x.newestontop?v.prepend(y):v.append(y)}function d(){t.title&&(i.append(x.escapehtml?i(t.title):t.title).addclass(x.titleclass),y.append(i))}function l(){t.message&&(m.append(x.escapehtml?i(t.message):t.message).addclass(x.messageclass),y.append(m))}function u(){x.closebutton&&(k.addclass("toast-close-button").attr("role","button"),y.prepend(k))}function p(){x.progressbar&&(b.addclass("toast-progress"),y.prepend(b))}function g(e,t){if(e.preventduplicates){if(t.message===c)return!0;c=t.message}return!1}function w(t){var n=t&&x.closemethod!==!1?x.closemethod:x.hidemethod,i=t&&x.closeduration!==!1?x.closeduration:x.hideduration,o=t&&x.closeeasing!==!1?x.closeeasing:x.hideeasing;return!e(":focus",y).length||t?(cleartimeout(q.intervalid),y[n]({duration:i,easing:o,complete:function(){h(y),x.onhidden&&"hidden"!==j.state&&x.onhidden(),j.state="hidden",j.endtime=new date,f(j)}})):void 0}function o(){(x.timeout>0||x.extendedtimeout>0)&&(h=settimeout(w,x.extendedtimeout),q.maxhidetime=parsefloat(x.extendedtimeout),q.hideeta=(new date).gettime()+q.maxhidetime)}function b(){cleartimeout(h),q.hideeta=0,y.stop(!0,!0)[x.showmethod]({duration:x.showduration,easing:x.showeasing})}function d(){var e=(q.hideeta-(new date).gettime())/q.maxhidetime*100;b.width(e+"%")}var x=m(),e=t.iconclass||x.iconclass;if("undefined"!=typeof t.optionsoverride&&(x=e.extend(x,t.optionsoverride),e=t.optionsoverride.iconclass||e),!g(x,t)){t++,v=n(x,!0);var h=null,y=e(""),i=e(""),m=e(""),b=e(""),k=e(x.closehtml),q={intervalid:null,hideeta:null,maxhidetime:null},j={toastid:t,state:"visible",starttime:new date,options:x,map:t};return o(),a(),s(),f(j),x.debug&&console&&console.log(j),y}}function m(){return e.extend({},p(),b.options)}function h(e){v||(v=n()),e.is(":visible")||(e.remove(),e=null,0===v.children().length&&(v.remove(),c=void 0))}var v,w,c,t=0,o={error:"error",info:"info",success:"success",warning:"warning"},b={clear:r,remove:c,error:t,getcontainer:n,info:i,options:{},subscribe:o,success:s,version:"2.1.2",warning:a};return b}()})}("function"==typeof define&&define.amd?define:function(e,t){"undefined"!=typeof module&&module.exports?module.exports=t(require("jquery")):window.toastr=t(window.jquery)});