varbootbox=window.bootbox||function(a,b){functionc(a,b){return"undefined"==typeofb&&(b=d),"string"==typeofm[b][a]?m[b][a]:b!=e?c(a,e):a}vard="en",e="en",f=!0,g="static",h="javascript:;",i="",j={},k={},l={};l.setLocale=function(a){for(varbinm)if(b==a)returnd=a,void0;thrownewError("Invalid locale: "+a)},l.addLocale=function(a,b){"undefined"==typeofm[a]&&(m[a]={});for(varcinb)m[a][c]=b[c]},l.setIcons=function(a){k=a,("object"!=typeofk||null===k)&&(k={})},l.setBtnClasses=function(a){j=a,("object"!=typeofj||null===j)&&(j={})},l.alert=function(){vara="",b=c("OK"),d=null;switch(arguments.length){case1:a=arguments[0];break;case2:a=arguments[0],"function"==typeofarguments[1]?d=arguments[1]:b=arguments[1];break;case3:a=arguments[0],b=arguments[1],d=arguments[2];break;default:thrownewError("Incorrect number of arguments: expected 1-3")}returnl.dialog(a,{label:b,icon:k.OK,"class":j.OK,callback:d},{onEscape:d||!0})},l.confirm=function(){vara="",b=c("CANCEL"),d=c("CONFIRM"),e=null;switch(arguments.length){case1:a=arguments[0];break;case2:a=arguments[0],"function"==typeofarguments[1]?e=arguments[1]:b=arguments[1];break;case3:a=arguments[0],b=arguments[1],"function"==typeofarguments[2]?e=arguments[2]:d=arguments[2];break;case4:a=arguments[0],b=arguments[1],d=arguments[2],e=arguments[3];break;default:thrownewError("Incorrect number of arguments: expected 1-4")}varf=function(){return"function"==typeofe?e(!1):void0},g=function(){return"function"==typeofe?e(!0):void0};returnl.dialog(a,[{label:b,icon:k.CANCEL,"class":j.CANCEL,callback:f},{label:d,icon:k.CONFIRM,"class":j.CONFIRM,callback:g}],{onEscape:f})},l.prompt=function(){vara="",d=c("CANCEL"),e=c("CONFIRM"),f=null,g="";switch(arguments.length){case1:a=arguments[0];break;case2:a=arguments[0],"function"==typeofarguments[1]?f=arguments[1]:d=arguments[1];break;case3:a=arguments[0],d=arguments[1],"function"==typeofarguments[2]?f=arguments[2]:e=arguments[2];break;case4:a=arguments[0],d=arguments[1],e=arguments[2],f=arguments[3];break;case5:a=arguments[0],d=arguments[1],e=arguments[2],f=arguments[3],g=arguments[4];break;default:thrownewError("Incorrect number of arguments: expected 1-5")}varh=a,i=b("<form></form>");i.append("<input class='input-block-level' autocomplete=off type=text value='"+g+"' />");varm=function(){return"function"==typeoff?f(null):void0},n=function(){return"function"==typeoff?f(i.find("input[type=text]").val()):void0},o=l.dialog(i,[{label:d,icon:k.CANCEL,"class":j.CANCEL,callback:m},{label:e,icon:k.CONFIRM,"class":j.CONFIRM,callback:n}],{header:h,show:!1,onEscape:m});returno.on("shown",function(){i.find("input[type=text]").focus(),i.on("submit",function(a){a.preventDefault(),o.find(".btn-primary").click()})}),o.modal("show"),o},l.dialog=function(c,d,e){functionj(){vara=null;"function"==typeofe.onEscape&&(a=e.onEscape()),a!==!1&&x.modal("hide")}vark="",l=[];e||(e={}),"undefined"==typeofd?d=[]:"undefined"==typeofd.length&&(d=[d]);for(varm=d.length;m--;){varn=null,o=null,p=null,q="",r=null;if("undefined"==typeofd[m].label&&"undefined"==typeofd[m]["class"]&&"undefined"==typeofd[m].callback){vars=0,t=null;for(varuind[m])if(t=u,++s>1)break;1==s&&"function"==typeofd[m][u]&&(d[m].label=t,d[m].callback=d[m][u])}"function"==typeofd[m].callback&&(r=d[m].callback),d[m]["class"]?p=d[m]["class"]:m==d.length-1&&d.length<=2&&(p="btn-primary"),d[m].link!==!0&&(p="btn "+p),n=d[m].label?d[m].label:"Option "+(m+1),d[m].icon&&(q="<i class='"+d[m].icon+"'></i> "),o=d[m].href?d[m].href:h,k="<a data-handler='"+m+"' class='"+p+"' href='"+o+"'>"+q+n+"</a>"+k,l[m]=r}varv=["<div class='bootbox modal' tabindex='-1' style='overflow:hidden;'>"];if(e.header){varw="";("undefined"==typeofe.headerCloseButton||e.headerCloseButton)&&(w="<a href='"+h+"' class='close'>×</a>"),v.push("<div class='modal-header'>"+w+"<h3>"+e.header+"</h3></div>")}v.push("<div class='modal-body'></div>"),k&&v.push("<div class='modal-footer'>"+k+"</div>"),v.push("</div>");varx=b(v.join("\n")),y="undefined"==typeofe.animate?f:e.animate;y&&x.addClass("fade");varz="undefined"==typeofe.classes?i:e.classes;returnz&&x.addClass(z),x.find(".modal-body").html(c),x.on("keyup.dismiss.modal",function(a){27===a.which&&e.onEscape&&j("escape")}),x.on("click","a.close",function(a){a.preventDefault(),j("close")}),x.on("shown",function(){x.find("a.btn-primary:first").focus()}),x.on("hidden",function(a){a.target===this&&x.remove()}),x.on("click",".modal-footer a",function(a){varc=b(this).data("handler"),e=l[c],f=null;("undefined"==typeofc||"undefined"==typeofd[c].href)&&(a.preventDefault(),"function"==typeofe&&(f=e(a)),f!==!1&&x.modal("hide"))}),b("body").append(x),x.modal({backdrop:"undefined"==typeofe.backdrop?g:e.backdrop,keyboard:!1,show:!1}),x.on("show",function(){b(a).off("focusin.modal")}),("undefined"==typeofe.show||e.show===!0)&&x.modal("show"),x},l.modal=function(){vara,c,d,e={onEscape:null,keyboard:!0,backdrop:g};switch(arguments.length){case1:a=arguments[0];break;case2:a=arguments[0],"object"==typeofarguments[1]?d=arguments[1]:c=arguments[1];break;case3:a=arguments[0],c=arguments[1],d=arguments[2];break;default:thrownewError("Incorrect number of arguments: expected 1-3")}returne.header=c,d="object"==typeofd?b.extend(e,d):e,l.dialog(a,[],d)},l.hideAll=function(){b(".bootbox").modal("hide")},l.animate=function(a){f=a},l.backdrop=function(a){g=a},l.classes=function(a){i=a};varm={br:{OK:"OK",CANCEL:"Cancelar",CONFIRM:"Sim"},da:{OK:"OK",CANCEL:"Annuller",CONFIRM:"Accepter"},de:{OK:"OK",CANCEL:"Abbrechen",CONFIRM:"Akzeptieren"},en:{OK:"OK",CANCEL:"Cancel",CONFIRM:"OK"},es:{OK:"OK",CANCEL:"Cancelar",CONFIRM:"Aceptar"},fr:{OK:"OK",CANCEL:"Annuler",CONFIRM:"D'accord"},it:{OK:"OK",CANCEL:"Annulla",CONFIRM:"Conferma"},nl:{OK:"OK",CANCEL:"Annuleren",CONFIRM:"Accepteren"},pl:{OK:"OK",CANCEL:"Anuluj",CONFIRM:"Potwierdź"},ru:{OK:"OK",CANCEL:"Отмена",CONFIRM:"Применить"},zh_CN:{OK:"OK",CANCEL:"取消",CONFIRM:"确认"},zh_TW:{OK:"OK",CANCEL:"取消",CONFIRM:"確認"}};returnl}(document,window.jQuery);window.bootbox=bootbox;
\ No newline at end of file
window.bootbox=window.bootbox||functiona(b,c){"use strict";functiond(a){varb=s[q.locale];returnb?b[a]:s.en[a]}functione(a,c,d){a.preventDefault();vare=b.isFunction(d)&&d(a)===!1;e||c.modal("hide")}functionf(a){varb,c=0;for(bina)c++;returnc}functiong(a,c){vard=0;b.each(a,function(a,b){c(a,b,d++)})}functionh(a){varc,d;if("object"!=typeofa)thrownewError("Please supply an object of options");if(!a.message)thrownewError("Please specify a message");returna=b.extend({},q,a),a.buttons||(a.buttons={}),a.backdrop=a.backdrop?"static":!1,c=a.buttons,d=f(c),g(c,function(a,e,f){if(b.isFunction(e)&&(e=c[a]={callback:e}),"object"!==b.type(e))thrownewError("button with key "+a+" must be an object");e.label||(e.label=a),e.className||(e.className=2>=d&&f===d-1?"btn-primary":"btn-default")}),a}functioni(a,b){varc=a.length,d={};if(1>c||c>2)thrownewError("Invalid argument length");return2===c||"string"==typeofa[0]?(d[b[0]]=a[0],d[b[1]]=a[1]):d=a[0],d}functionj(a,c,d){returnb.extend(!0,{},a,i(c,d))}functionk(a,b,c){returnn(j(m.apply(null,a),b,c),a)}functionl(){for(vara={},b=0,c=arguments.length;c>b;b++){vare=arguments[b],f=e.toLowerCase(),g=e.toUpperCase();a[f]={label:d(g)}}returna}functionm(){return{buttons:l.apply(null,arguments)}}functionn(a,b){vard={};returng(b,function(a,b){d[b]=!0}),g(a.buttons,function(a){if(d[a]===c)thrownewError("button key "+a+" is not allowed (options are "+b.join("\n")+")")}),a}varo={dialog:"<div class='bootbox modal' tabindex='-1' role='dialog'><div class='modal-dialog'><div class='modal-content'><div class='modal-body'><div class='bootbox-body'></div></div></div></div></div>",header:"<div class='modal-header'><h4 class='modal-title'></h4></div>",footer:"<div class='modal-footer'></div>",closeButton:"<button type='button' class='bootbox-close-button close'>×</button>",form:"<form class='bootbox-form'></form>",inputs:{text:"<input class='bootbox-input form-control' autocomplete=off type=text />"}},p=b("body"),q={locale:"en",backdrop:!0,animate:!0,className:null,closeButton:!0,show:!0},r={};r.alert=function(){vara;if(a=k(["ok"],arguments,["message","callback"]),a.callback&&!b.isFunction(a.callback))thrownewError("alert requires callback property to be a function when provided");returna.buttons.ok.callback=a.onEscape=function(){returnb.isFunction(a.callback)?a.callback():!0},r.dialog(a)},r.confirm=function(){vara;if(a=k(["cancel","confirm"],arguments,["message","callback"]),a.buttons.cancel.callback=a.onEscape=function(){returna.callback(!1)},a.buttons.confirm.callback=function(){returna.callback(!0)},!b.isFunction(a.callback))thrownewError("confirm requires a callback");returnr.dialog(a)},r.prompt=function(){vara,d,e,f,g,h;if(f=b(o.form),d={buttons:l("cancel","confirm"),value:""},a=n(j(d,arguments,["title","callback"]),["cancel","confirm"]),h=a.show===c?!0:a.show,a.message=f,a.buttons.cancel.callback=a.onEscape=function(){returna.callback(null)},a.buttons.confirm.callback=function(){returna.callback(g.val())},a.show=!1,!a.title)thrownewError("prompt requires a title");if(!b.isFunction(a.callback))thrownewError("prompt requires a callback");returng=b(o.inputs.text),g.val(a.value),f.append(g),f.on("submit",function(a){a.preventDefault(),e.find(".btn-primary").click()}),e=r.dialog(a),e.off("shown.bs.modal"),e.on("shown.bs.modal",function(){g.focus()}),h===!0&&e.modal("show"),e},r.dialog=function(a){a=h(a);varc=b(o.dialog),d=c.find(".modal-body"),f=a.buttons,i="",j={onEscape:a.onEscape};if(g(f,function(a,b){i+="<button data-bb-handler='"+a+"' type='button' class='btn "+b.className+"'>"+b.label+"</button>",j[a]=b.callback}),d.find(".bootbox-body").html(a.message),a.animate===!0&&c.addClass("fade"),a.className&&c.addClass(a.className),a.title&&d.before(o.header),a.closeButton){vark=b(o.closeButton);a.title?c.find(".modal-header").prepend(k):k.css("margin-top","-10px").prependTo(d)}returna.title&&c.find(".modal-title").html(a.title),i.length&&(d.after(o.footer),c.find(".modal-footer").html(i)),c.on("hidden.bs.modal",function(a){a.target===this&&c.remove()}),c.on("shown.bs.modal",function(){c.find(".btn-primary:first").focus()}),c.on("escape.close.bb",function(a){j.onEscape&&e(a,c,j.onEscape)}),c.on("click",".modal-footer button",function(a){vard=b(this).data("bb-handler");e(a,c,j[d])}),c.on("click",".bootbox-close-button",function(a){e(a,c,j.onEscape)}),c.on("keyup",function(a){27===a.which&&c.trigger("escape.close.bb")}),p.append(c),c.modal({backdrop:a.backdrop,keyboard:!1,show:!1}),a.show&&c.modal("show"),c},r.setDefaults=function(a){b.extend(q,a)},r.hideAll=function(){b(".bootbox").modal("hide")};vars={br:{OK:"OK",CANCEL:"Cancelar",CONFIRM:"Sim"},da:{OK:"OK",CANCEL:"Annuller",CONFIRM:"Accepter"},de:{OK:"OK",CANCEL:"Abbrechen",CONFIRM:"Akzeptieren"},en:{OK:"OK",CANCEL:"Cancel",CONFIRM:"OK"},es:{OK:"OK",CANCEL:"Cancelar",CONFIRM:"Aceptar"},fi:{OK:"OK",CANCEL:"Peruuta",CONFIRM:"OK"},fr:{OK:"OK",CANCEL:"Annuler",CONFIRM:"D'accord"},it:{OK:"OK",CANCEL:"Annulla",CONFIRM:"Conferma"},nl:{OK:"OK",CANCEL:"Annuleren",CONFIRM:"Accepteren"},pl:{OK:"OK",CANCEL:"Anuluj",CONFIRM:"Potwierdź"},ru:{OK:"OK",CANCEL:"Отмена",CONFIRM:"Применить"},zh_CN:{OK:"OK",CANCEL:"取消",CONFIRM:"确认"},zh_TW:{OK:"OK",CANCEL:"取消",CONFIRM:"確認"}};returnr.init=function(c){window.bootbox=a(c||b)},r}(window.jQuery);