}(function(e){vart=e.event.dispatch||e.event.handle,n=e.event.special,o="D"++newDate,i="D"+(+newDate+1);n.scrollstart={setup:function(i){vara,r=e.extend({latency:n.scrollstop.latency},i),s=function(e){varn=this,o=arguments;a?clearTimeout(a):(e.type="scrollstart",t.apply(n,o)),a=setTimeout(function(){a=null},r.latency)};e(this).bind("scroll",s).data(o,s)},teardown:function(){e(this).unbind("scroll",e(this).data(o))}},n.scrollstop={latency:250,setup:function(o){vara,r=e.extend({latency:n.scrollstop.latency},o),s=function(e){varn=this,o=arguments;a&&clearTimeout(a),a=setTimeout(function(){a=null,e.type="scrollstop",t.apply(n,o)},r.latency)};e(this).bind("scroll",s).data(i,s)},teardown:function(){e(this).unbind("scroll",e(this).data(i))}}});varbootbox=window.bootbox||function(e,t){functionn(e,t){return"undefined"==typeoft&&(t=o),"string"==typeoff[t][e]?f[t][e]:t!=i?n(e,i):e}varo="en",i="en",a=!0,r="static",s="javascript:;",c="",l={},u={},d={};d.setLocale=function(e){for(vartinf)if(t==e)returnvoid(o=e);thrownewError("Invalid locale: "+e)},d.addLocale=function(e,t){"undefined"==typeoff[e]&&(f[e]={});for(varnint)f[e][n]=t[n]},d.setIcons=function(e){u=e,"object"==typeofu&&null!==u||(u={})},d.setBtnClasses=function(e){l=e,"object"==typeofl&&null!==l||(l={})},d.alert=function(){vare="",t=n("OK"),o=null;switch(arguments.length){case1:e=arguments[0];break;case2:e=arguments[0],"function"==typeofarguments[1]?o=arguments[1]:t=arguments[1];break;case3:e=arguments[0],t=arguments[1],o=arguments[2];break;default:thrownewError("Incorrect number of arguments: expected 1-3")}returnd.dialog(e,{label:t,icon:u.OK,"class":l.OK,callback:o},{onEscape:o||!0})},d.confirm=function(){vare="",t=n("CANCEL"),o=n("CONFIRM"),i=null;switch(arguments.length){case1:e=arguments[0];break;case2:e=arguments[0],"function"==typeofarguments[1]?i=arguments[1]:t=arguments[1];break;case3:e=arguments[0],t=arguments[1],"function"==typeofarguments[2]?i=arguments[2]:o=arguments[2];break;case4:e=arguments[0],t=arguments[1],o=arguments[2],i=arguments[3];break;default:thrownewError("Incorrect number of arguments: expected 1-4")}vara=function(){if("function"==typeofi)returni(!1)},r=function(){if("function"==typeofi)returni(!0)};returnd.dialog(e,[{label:t,icon:u.CANCEL,"class":l.CANCEL,callback:a},{label:o,icon:u.CONFIRM,"class":l.CONFIRM,callback:r}],{onEscape:a})},d.prompt=function(){vare="",o=n("CANCEL"),i=n("CONFIRM"),a=null,r="";switch(arguments.length){case1:e=arguments[0];break;case2:e=arguments[0],"function"==typeofarguments[1]?a=arguments[1]:o=arguments[1];break;case3:e=arguments[0],o=arguments[1],"function"==typeofarguments[2]?a=arguments[2]:i=arguments[2];break;case4:e=arguments[0],o=arguments[1],i=arguments[2],a=arguments[3];break;case5:e=arguments[0],o=arguments[1],i=arguments[2],a=arguments[3],r=arguments[4];break;default:thrownewError("Incorrect number of arguments: expected 1-5")}vars=e,c=t("<form></form>");c.append("<input class='input-block-level' autocomplete=off type=text value='"+r+"' />");varf=function(){if("function"==typeofa)returna(null)},h=function(){if("function"==typeofa)returna(c.find("input[type=text]").val())},p=d.dialog(c,[{label:o,icon:u.CANCEL,"class":l.CANCEL,callback:f},{label:i,icon:u.CONFIRM,"class":l.CONFIRM,callback:h}],{header:s,show:!1,onEscape:f});returnp.on("shown",function(){c.find("input[type=text]").focus(),c.on("submit",function(e){e.preventDefault(),p.find(".btn-primary").click()})}),p.modal("show"),p},d.dialog=function(n,o,i){functionl(e){vart=null;"function"==typeofi.onEscape&&(t=i.onEscape()),t!==!1&&$.modal("hide")}varu="",d=[];i||(i={}),"undefined"==typeofo?o=[]:"undefined"==typeofo.length&&(o=[o]);for(varf=o.length;f--;){varh=null,p=null,m=null,v="",g=null;if("undefined"==typeofo[f].label&&"undefined"==typeofo[f]["class"]&&"undefined"==typeofo[f].callback){vary=0,b=null;for(varxino[f])if(b=x,++y>1)break;1==y&&"function"==typeofo[f][x]&&(o[f].label=b,o[f].callback=o[f][x])}"function"==typeofo[f].callback&&(g=o[f].callback),o[f]["class"]?m=o[f][