(function(){function e(c,a){return new zul.wgt.Button({label:msgzul[c.toUpperCase()]||c,listeners:{onClick:function(b){"function"==typeof a&&a.call(this,b);b=this.desktop;this.$o().detach();zAu.disabledRequest&&(zAu.disabledRequest=!1,zAu.sendNow(b))}}})}function g(c){var a=[],b;for(b in c){var d=c[b];a.push(e(b,"function"==typeof d?d:null))}a.length||a.push(e(msgzul.OK));return a}jq(function(){var c=zk.themeName,a="iceblue";c&&(a=c);jq(document.body).addClass(a)});var h=jq.alert,f={QUESTION:"z-messagebox-icon z-messagebox-question",
EXCLAMATION:"z-messagebox-icon z-messagebox-exclamation",INFORMATION:"z-messagebox-icon z-messagebox-information",ERROR:"z-messagebox-icon z-messagebox-error",NONE:"z-messagebox z-messagebox-none"};jq.alert=function(c,a){if(a&&"os"==a.mode)return h(c);a=a||{};zk.load("zul.wnd,zul.wgt,zul.box",function(){var b;if(b=zk.Widget.$(jq("$aualert"))){b=b.$f("msg");var d=b.parent;d=d.$n();b.setValue(b.getValue()+"\n"+c);!d.style.height&&d.offsetHeight>=.6*jq.innerHeight()&&(d.style.height=jq.px0(.6*jq.innerHeight()))}else b=
new zul.wnd.Window({id:"aualert",closable:!0,width:"250pt",sclass:"z-messagebox-window",title:a.title||zk.appName,border:"normal",listeners:{onClose:function(){zAu.disabledRequest&&(zAu.disabledRequest=!1,zAu.sendNow(this.desktop))}},children:[new zul.box.Box({mold:"horizontal",children:[new zul.wgt.Div({sclass:f[(a.icon||"").toUpperCase()]||a.icon||f.INFORMATION}),new zul.wgt.Div({id:"content",sclass:"z-messagebox",style:"overflow:auto",children:[new zul.wgt.Label({id:"msg",value:c,multiline:!0})]})]}),
new zul.wgt.Separator,new zul.box.Hlayout({sclass:"z-messagebox-buttons",children:g(a.button)})],mode:a.mode||"modal"}),(d=a.desktop||zk.Desktop.$())&&(d=d.firstChild)&&d.desktop?d.appendChild(b):jq(document.body).append(b)})};zAu.wrongValue_=function(c,a){var b=c.effects_;b.errMesg&&(b.errMesg.destroy(),delete b.errMesg);!1!==a&&(b.errMesg={destroy:zk.$void},zk.load("zul.inp",function(){b.errMesg&&(b.errMesg=new zul.inp.Errorbox(c,a)).show()}))}})();
