(function(){var b=Ext.Button.prototype.onClick;Ext.override(Ext.Button,{onClick:function(c){c=new Ext.EventObjectImpl(c);this.focus();b.call(this,c);this.isDestroyed||this.blur()},template:new Ext.Template('<div id="{4}" class="x-btn {3}"><div class="{1}">','<em class="{2}" class="x-unselectable" unselectable="on"><button type="{0}"></button></em>',"</div></div>")})})();
(function(){var b=Ext.Component.prototype.initComponent,c=Ext.Component.prototype.destroy;Ext.override(Ext.Component,{stateful:!1,statefulRelativeDimensions:!0,statefulName:void 0,initComponent:function(){!1!==this.stateful&&(this.stateId||(this.stateId=Ext.id(null,"state-")),Ext.state.Manager.register(this));b.apply(this,arguments)},getStateName:function(){var a=this.statefulName;a||=this.getXType().match(/(?:zarafa\.)?(.*)/)[1];return a},destroy:function(){if(this.plugins)for(var a in this.plugins){var d=
this.plugins[a];d instanceof Ext.util.Observable&&d.purgeListeners()}!1!==this.stateful&&Ext.state.Manager.unregister(this);c.apply(this,arguments)}})})();(function(){Ext.override(Ext.Container,{bufferResize:!1})})();
(function(){var b=Ext.DataView.prototype.onClick,c=Ext.DataView.prototype.initComponent;Ext.override(Ext.DataView,{initComponent:function(){c.apply(this,arguments);this.addEvents("extraitemclick","beforeextraitemclick")},onClick:function(a){var d=!1;this.extraItemSelector&&(d=a.getTarget(this.extraItemSelector,this.getTemplateTarget()));if(d){var e=this.indexOf(d);!1!==this.onExtraItemClick(d,e,a)&&this.fireEvent("extraitemclick",this,e,d,a)}else b.apply(this,arguments)},onExtraItemClick:function(a,
d,e){return!1===this.fireEvent("beforeextraitemclick",this,d,a,e)?!1:!0}})})();
(function(){var b=Ext.DatePicker.prototype.onRender,c=Ext.DatePicker.prototype.update,a=Ext.DatePicker.prototype.beforeDestroy,d=Ext.DatePicker.prototype.initComponent,e=Ext.DatePicker.prototype.selectToday;Ext.override(Ext.DatePicker,{width:"180",showWeekNumber:!1,weekCells:void 0,showNow:!1,initComponent:function(){this.initialConfig.startDay||(this.startDay=container.getSettingsModel().get("zarafa/v1/main/week_start"));if(0>this.startDay||this.startDay>=Date.dayNames.length)this.startDay=0;d.apply(this,
arguments)},onRender:function(){b.apply(this,arguments);this.getEl().down("table").applyStyles({width:this.width})},update:function(f,g){if(!0===this.showWeekNumber&&!Ext.isDefined(this.weekCells)){var l=this.el.child("table.x-date-inner",!0),h=l.tHead.rows[0],m={tag:"th",html:"<span>"+_("Wk")+"</span>"};Ext.DomHelper.insertFirst(h,m);l=l.tBodies[0];h={tag:"td",cls:"x-date-weeknumber",html:"<a><em><span></span></em></a>"};for(m=0;m<l.rows.length;m++)Ext.DomHelper.insertFirst(l.rows[m],h);this.weekCells=
this.el.select("td.x-date-weeknumber a em span")}c.apply(this,arguments);if(!0===this.showWeekNumber){l=this.weekCells.elements;h=f.getFirstDateOfMonth();m=0;for(var r=l.length;m<r;m++)l[m].innerHTML=h.getWeekOfYear(),h=h.add(Date.DAY,7)}},beforeDestroy:function(){a.apply(this,arguments);this.rendered&&Ext.isDefined(this.weekCells)&&(Ext.destroy(this.weekCells.el),delete this.weekCells)},selectToday:function(){this.showNow&&this.fireEvent("selectnow",this,this.value);e.apply(this,arguments)}})})();
(function(){Ext.Element.addMethods({addUnits:function(c){Ext.isEmpty(c)||"auto"==c?c=c||"":isNaN(c)?c="":/\d+(px|em|%|en|ex|pt|in|cm|mm|pc)$/i.test(c)||(c+=this.defaultUnit||"px");return c},swallowEvent:function(c,a){var d=this,e=!0===a?this.swallowEventHandlerPreventDefault:this.swallowEventHandler;if(Ext.isArray(c))return Ext.each(c,function(f){d.on(f,e,this)}),d;d.on(c,e,this);return d},swallowEventHandler:function(c){c.stopPropagation()},swallowEventHandlerPreventDefault:function(c){c.stopPropagation();
c.preventDefault()},spitOutEvent:function(c,a){var d=this,e=!0===a?this.swallowEventHandlerPreventDefault:this.swallowEventHandler;if(Ext.isArray(c))return Ext.each(c,function(f){d.un(f,e,this)}),d;d.un(c,e,this);return d},selectable:function(){this.dom.unselectable="off";return this.spitOutEvent("selectstart",!0).removeClass("x-unselectable")},clearClass:function(){this.dom.className=""},fireEvent:function(c,a){var d=/^(scroll|resize|load|unload|abort|error)$/,e=/^(focus|blur|select|change|reset|keypress|keydown|keyup)$/,
f=/^(wheel)$/;c=c.toLowerCase();c.replace(/^on/,"");if(/^(click|dblclick|mousedown|mouseup|mouseover|mouseout|contextmenu)$/.test(c)){var g=document.createEvent("MouseEvents");g.initMouseEvent(c,!0,!0,window,"dblclick"==c?2:1,a.screenX,a.screenY,a.clientX,a.clientY,a.ctrlKey,a.altKey,a.shiftKey,a.metaKey,0,null)}else e.test(c)?(g=document.createEvent("UIEvents"),g.initUIEvent(c,!0,!0,window,0)):d.test(c)?(g=document.createEvent("HTMLEvents"),g.initEvent(c,!0,!0)):f.test(c)&&(g=new WheelEvent("wheel",
a));g&&this.dom.dispatchEvent(g)},getAlignToXY:function(c,a,d){c=Ext.get(c);if(!c||!c.dom)throw"Element.alignToXY with an element that doesn't exist";d=d||[0,0];a=(a&&"?"!=a?/-/.test(a)||""===a?a||"tl-bl":"tl-"+a:"tl-bl?").toLowerCase();var e=Zarafa.core.BrowserWindowMgr.getOwnerWindow(c),f=e.innerWidth-10,g=e.innerHeight-10;e=e.document;var l=e.documentElement;var h=e.body;e=(l.scrollLeft||h.scrollLeft||0)+5;l=(l.scrollTop||h.scrollTop||0)+5;var m=a.match(/^([a-z]+)-([a-z]+)(\?)?$/);if(!m)throw"Element.alignTo with an invalid alignment "+
a;var r=m[1];h=m[2];m=!!m[3];var x=this.getAnchorXY(r,!0);var v=c.getAnchorXY(h,!1);a=v[0]-x[0]+d[0];d=v[1]-x[1]+d[1];if(m){m=this.getWidth();x=this.getHeight();c=c.getRegion();v=r.charAt(0);r=r.charAt(r.length-1);var B=h.charAt(0);h=h.charAt(h.length-1);v="t"==v&&"b"==B||"b"==v&&"t"==B;h="r"==r&&"l"==h||"l"==r&&"r"==h;a+m>f+e&&(a=h?c.left-m:f+e-m);a<e&&(a=h?c.right:e);d+x>g+l&&(d=v?c.top-x:g+l-x);d<l&&(d=v?c.bottom:l)}return[a,d]},adjustForConstraints:function(c,a,d){var e=Zarafa.core.BrowserWindowMgr.getActive();
return this.getConstrainToXY(a||e.document,!1,d,c)||c},getConstrainToXY:function(c,a,d,e){var f={top:0,left:0,bottom:0,right:0};return function(g,l,h,m){var r=Zarafa.core.BrowserWindowMgr.getActive();g=Ext.get(g);h=h?Ext.applyIf(h,f):f;var x=0,v=0;if(g.dom==r.document.body||g.dom==r.document){var B=r.innerWidth;r=r.innerHeight}else B=g.dom.clientWidth,r=g.dom.clientHeight,l||(v=g.getXY(),x=v[0],v=v[1]);g=g.getScroll();x+=h.left+g.left?g.left:0;v+=h.top+g.top?g.top:0;B-=h.right?h.right:0;r-=h.bottom?
h.bottom:0;h=x+B;B=v+r;m=m||(l?[this.getLeft(!0),this.getTop(!0)]:this.getXY());l=m[0];m=m[1];g=this.getConstrainOffset();r=this.dom.offsetWidth+g;g=this.dom.offsetHeight+g;var D=!1;l+r>h&&(l=h-r,D=!0);m+g>B&&(m=B-g,D=!0);l<x&&(l=x,D=!0);m<v&&(m=v,D=!0);return D?[l,m]:!1}}()});var b=Ext.Element.get;Ext.override(Ext.Element,{get:function(c){var a=null,d=Zarafa.core.BrowserWindowMgr.getActive();if(Ext.isDefined(d)&&"mainBrowserWindow"!==d.name&&"string"===typeof c){var e=d.document.getElementById(c);
a=e?new Ext.Element(e):e}null===a&&(a=b.apply(this,arguments));null===a&&"string"===typeof c?(e=Zarafa.core.BrowserWindowMgr.browserWindows,e.each(function(f){if(Ext.isDefined(f)&&"mainBrowserWindow"!==f.name&&f!==d&&(f=f.document.getElementById(c)))return a=new Ext.Element(f),!1})):(e=Zarafa.core.BrowserWindowMgr.browserWindows,Ext.isDefined(e)&&e.each(function(f){if(f.document===c){var g=function(){};g.prototype=Ext.Element.prototype;a=new g;a.dom=f.document}}));return a}});Ext.get=Ext.Element.prototype.get;
Ext.Element.addMethods(function(){function c(h,m){return m.charAt(1).toUpperCase()}function a(h){return e[h]||(e[h]="float"==h?d.cssFloat?"cssFloat":"styleFloat":h.replace(f,c))}var d=Ext.supports,e={},f=/(-[a-z])/gi,g=document.defaultView,l=/alpha\(opacity=(.*)\)/i;return{getStyle:function(){return g&&g.getComputedStyle?function(h){var m=this.dom,r,x;if(m==Zarafa.core.BrowserWindowMgr.getActive().document)return null;h=a(h);var v=(r=m.style[h])?r:(x=g.getComputedStyle(m,""))?x[h]:null;"marginRight"!=
h||"0px"==v||d.correctRightMargin||(r=m.style.display,m.style.display="inline-block",v=g.getComputedStyle(m,"").marginRight,m.style.display=r);"backgroundColor"!=h||"rgba(0, 0, 0, 0)"!=v||d.correctTransparentColor||(v="transparent");return v}:function(h){var m=this.dom,r,x;if(m==document)return null;if("opacity"==h)return m.style.filter.match&&(r=m.style.filter.match(l))&&(h=parseFloat(r[1]),!isNaN(h))?h?h/100:0:1;h=a(h);return m.style[h]||((x=m.currentStyle)?x[h]:null)}}(),setStyle:function(h,m){var r;
if("object"!=typeof h){var x={};x[h]=m;h=x}for(r in h)m=h[r],"opacity"==r?this.setOpacity(m):this.dom.style[a(r)]=m;return this}}}())})();
(function(){Ext.apply(Ext.EventObjectImpl.prototype,{SEMI_COLON:186,EQUAL_SIGN:187,COMMA:188,DASH:189,PERIOD:190,FORWARD_SLASH:191,OPEN_BRACKET:219,BACK_SLASH:220,CLOSE_BRACKET:221,SINGLE_QUOTE:222});var b=Ext.EventObject.setEvent;Ext.EventObject.setEvent=function(c){c=b.call(this,c);Ext.isMac&&c.ctrlKey&&!c.browserEvent.metaKey&&(c.ctrlKey=!1);Ext.isMac||(c.ctrlKey=c.browserEvent.ctrlKey||!1);return c}})();
(function(){Ext.Layer=function(a,d){a=a||{};var e=Ext.DomHelper,f=Zarafa.core.BrowserWindowMgr.getActive(),g=a.parentEl;f=g?Ext.getDom(g):f.document.body;d&&(this.dom=Ext.getDom(d));this.dom||(this.dom=e.append(f,a.dh||{tag:"div",cls:"x-layer"}));a.cls&&this.addClass(a.cls);this.constrain=!1!==a.constrain;this.setVisibilityMode(Ext.Element.VISIBILITY);this.id=a.id?this.dom.id=a.id:Ext.id(this.dom);this.zindex=a.zindex||this.getZIndex();this.position("absolute",this.zindex);a.shadow?(this.shadowOffset=
a.shadowOffset||4,this.shadow=new Ext.Shadow({offset:this.shadowOffset,mode:a.shadow})):this.shadowOffset=0;this.useShim=!1!==a.shim&&Ext.useShims;this.useDisplay=a.useDisplay;this.hide()};var b=Ext.Element.prototype,c=[];Ext.extend(Ext.Layer,Ext.Element,{getZIndex:function(){return this.zindex||parseInt((this.getShim()||this).getStyle("z-index"),10)||11E3},getShim:function(){if(!this.useShim)return null;if(this.shim)return this.shim;var a=c.shift();a||(a=this.createShim(),a.enableDisplayMode("block"),
a.dom.style.display="none",a.dom.style.visibility="visible");var d=this.dom.parentNode;a.dom.parentNode!=d&&d.insertBefore(a.dom,this.dom);a.setStyle("z-index",this.getZIndex()-2);return this.shim=a},hideShim:function(){this.shim&&(this.shim.setDisplayed(!1),c.push(this.shim),delete this.shim)},disableShadow:function(){this.shadow&&(this.shadowDisabled=!0,this.shadow.hide(),this.lastShadowOffset=this.shadowOffset,this.shadowOffset=0)},enableShadow:function(a){this.shadow&&(this.shadowDisabled=!1,
Ext.isDefined(this.lastShadowOffset)&&(this.shadowOffset=this.lastShadowOffset,delete this.lastShadowOffset),a&&this.sync(!0))},sync:function(a){var d=this.shadow;if(!this.updating&&this.isVisible()&&(d||this.useShim)){var e=this.getShim(),f=this.getWidth(),g=this.getHeight(),l=this.getLeft(!0),h=this.getTop(!0);d&&!this.shadowDisabled?(a&&!d.isVisible()?d.show(this):d.realign(l,h,f,g),e&&(a&&e.show(),a=d.el.getXY(),e=e.dom.style,d=d.el.getSize(),e.left=a[0]+"px",e.top=a[1]+"px",e.width=d.width+"px",
e.height=d.height+"px")):e&&(a&&e.show(),e.setSize(f,g),e.setLeftTop(l,h))}},destroy:function(){this.hideShim();this.shadow&&this.shadow.hide();this.removeAllListeners();Ext.removeNode(this.dom);delete this.dom},remove:function(){this.destroy()},beginUpdate:function(){this.updating=!0},endUpdate:function(){this.updating=!1;this.sync(!0)},hideUnders:function(a){this.shadow&&this.shadow.hide();this.hideShim()},constrainXY:function(){if(this.constrain){var a=Ext.lib.Dom.getViewWidth(),d=Ext.lib.Dom.getViewHeight(),
e=Ext.getDoc().getScroll(),f=this.getXY(),g=f[0];f=f[1];var l=this.shadowOffset,h=this.dom.offsetWidth+l,m=this.dom.offsetHeight+l,r=!1;g+h>a+e.left&&(g=a-h-l,r=!0);f+m>d+e.top&&(f=d-m-l,r=!0);g<e.left&&(g=e.left,r=!0);f<e.top&&(f=e.top,r=!0);r&&(this.avoidY&&(a=this.avoidY,f<=a&&f+m>=a&&(f=a-m-5)),f=[g,f],this.storeXY(f),b.setXY.call(this,f),this.sync())}return this},getConstrainOffset:function(){return this.shadowOffset},isVisible:function(){return this.visible},showAction:function(){this.visible=
!0;!0===this.useDisplay?this.setDisplayed(""):this.lastXY?b.setXY.call(this,this.lastXY):this.lastLT&&b.setLeftTop.call(this,this.lastLT[0],this.lastLT[1])},hideAction:function(){this.visible=!1;!0===this.useDisplay?this.setDisplayed(!1):this.setLeftTop(-1E4,-1E4)},setVisible:function(a,d,e,f,g){a&&this.showAction();if(d&&a){var l=function(){this.sync(!0);f&&f()}.createDelegate(this);b.setVisible.call(this,!0,!0,e,l,g)}else a||this.hideUnders(!0),l=f,d&&(l=function(){this.hideAction();f&&f()}.createDelegate(this)),
b.setVisible.call(this,a,d,e,l,g),a?this.sync(!0):d||this.hideAction();return this},storeXY:function(a){delete this.lastLT;this.lastXY=a},storeLeftTop:function(a,d){delete this.lastXY;this.lastLT=[a,d]},beforeFx:function(){this.beforeAction();return Ext.Layer.superclass.beforeFx.apply(this,arguments)},afterFx:function(){Ext.Layer.superclass.afterFx.apply(this,arguments);this.sync(this.isVisible())},beforeAction:function(){!this.updating&&this.shadow&&this.shadow.hide()},setLeft:function(a){this.storeLeftTop(a,
this.getTop(!0));b.setLeft.apply(this,arguments);this.sync();return this},setTop:function(a){this.storeLeftTop(this.getLeft(!0),a);b.setTop.apply(this,arguments);this.sync();return this},setLeftTop:function(a,d){this.storeLeftTop(a,d);b.setLeftTop.apply(this,arguments);this.sync();return this},setXY:function(a,d,e,f,g){this.fixDisplay();this.beforeAction();this.storeXY(a);f=this.createCB(f);b.setXY.call(this,a,d,e,f,g);d||f();return this},createCB:function(a){var d=this;return function(){d.constrainXY();
d.sync(!0);a&&a()}},setX:function(a,d,e,f,g){this.setXY([a,this.getY()],d,e,f,g);return this},setY:function(a,d,e,f,g){this.setXY([this.getX(),a],d,e,f,g);return this},setSize:function(a,d,e,f,g,l){this.beforeAction();g=this.createCB(g);b.setSize.call(this,a,d,e,f,g,l);e||g();return this},setWidth:function(a,d,e,f,g){this.beforeAction();f=this.createCB(f);b.setWidth.call(this,a,d,e,f,g);d||f();return this},setHeight:function(a,d,e,f,g){this.beforeAction();f=this.createCB(f);b.setHeight.call(this,
a,d,e,f,g);d||f();return this},setBounds:function(a,d,e,f,g,l,h,m){this.beforeAction();h=this.createCB(h);g?b.setBounds.call(this,a,d,e,f,g,l,h,m):(this.storeXY([a,d]),b.setXY.call(this,[a,d]),b.setSize.call(this,e,f,g,l,h,m),h());return this},setZIndex:function(a){this.zindex=a;this.setStyle("z-index",a+2);this.shadow&&this.shadow.setZIndex(a+1);this.shim&&this.shim.setStyle("z-index",a);return this}})})();Ext.namespace("Ext.MessageBox");
Ext.MessageBox=Ext.extend(Object,{OK:void 0,CANCEL:void 0,OKCANCEL:void 0,YESNO:void 0,YESNOCANCEL:void 0,INFO:"ext-mb-info",WARNING:"ext-mb-warning",QUESTION:"ext-mb-question",ERROR:"ext-mb-error",WARNING_CLS:"k-warning-dialog",ERROR_CLS:"k-error-dialog",defaultTextHeight:75,maxWidth:600,minWidth:100,minProgressWidth:250,minPromptWidth:250,buttonText:void 0,browserWindowsMessageBoxProps:"dlg opt mask msgEl buttons textboxEl textareaEl progressBar iconEl iconCls".split(" "),browserWindowsMessageBox:void 0,
dlg:void 0,opt:void 0,mask:void 0,waitTimer:void 0,bodyEl:void 0,msgEl:void 0,textboxEl:void 0,textareaEl:void 0,progressBar:void 0,pp:void 0,iconEl:void 0,spacerEl:void 0,buttons:void 0,activeTextEl:void 0,bwidth:void 0,bufferIcon:"",iconCls:"",buttonNames:["ok","yes","no","cancel"],activeWindowName:void 0,constructor:function(b){this.OK={ok:!0};this.CANCEL={cancel:!0};this.OKCANCEL={ok:!0,cancel:!0};this.YESNO={yes:!0,no:!0};this.YESNOCANCEL={yes:!0,no:!0,cancel:!0};this.buttonText={ok:"OK",cancel:"Cancel",
yes:"Yes",no:"No"};this.browserWindowsMessageBox=new Ext.util.MixedCollection},handleButton:function(b){var c=Zarafa.core.BrowserWindowMgr.getActive();this.buttons[b].blur();this.dlg.isVisible()&&(this.dlg.hide(),this.handleHide(),Ext.callback(this.opt.fn,this.opt.scope||c,[b,this.activeTextEl.dom.value,this.opt],1))},handleHide:function(){this.opt&&this.opt.cls&&this.dlg.el.removeClass(this.opt.cls);this.progressBar.reset()},handleEsc:function(b,c,a){this.opt&&!1!==this.opt.closable&&(this.dlg.hide(),
this.handleHide());a&&a.stopEvent()},updateButtons:function(b){var c=0,a;if(!b)return Ext.each(this.buttonNames,function(d){this.buttons[d].hide()},this),c;this.dlg.footer.dom.style.display="";Ext.iterate(this.buttons,function(d,e){(a=b[d])?(e.show(),e.setText(Ext.isString(a)?a:Ext.MessageBox.buttonText[d]),c+=e.getEl().getWidth()+15):e.hide()});return c},getDialog:function(b){if(this.dlg)return this.textboxEl.enableDisplayMode(),this.textareaEl.enableDisplayMode(),this.browserWindowsMessageBox.replace(this.activeWindowName,
Ext.copyTo({},this,this.browserWindowsMessageBoxProps)),this.dlg;var c=[];this.buttons={};Ext.each(this.buttonNames,function(d){c.push(this.buttons[d]=new Ext.Button({text:this.buttonText[d],handler:this.handleButton.createDelegate(this,[d]),hideMode:"offsets"}))},this);var a=Zarafa.core.BrowserWindowMgr.getActive();this.dlg=new Ext.Window({autoCreate:!0,title:b,resizable:!1,constrain:!0,constrainHeader:!0,minimizable:!1,maximizable:!1,stateful:!1,modal:!0,shim:!0,buttonAlign:"center",width:400,height:100,
minHeight:80,plain:!0,footer:!0,closable:!0,close:function(){this.opt&&this.opt.buttons&&this.opt.buttons.no&&!this.opt.buttons.cancel?this.handleButton("no"):this.handleButton("cancel")}.createDelegate(this),fbar:new Ext.Toolbar({items:c,enableOverflow:!1})});this.dlg.render(a.document.body);this.dlg.getEl().addClass("x-window-dlg");this.mask=this.dlg.mask;this.bodyEl=this.dlg.body.createChild({html:'<div class="ext-mb-icon"></div><div class="ext-mb-content"><span class="ext-mb-text"></span><br /><div class="ext-mb-fix-cursor"><input type="text" class="ext-mb-input" /><textarea class="ext-mb-textarea"></textarea></div></div>'});
this.iconEl=Ext.get(this.bodyEl.dom.firstChild);b=this.bodyEl.dom.childNodes[1];this.msgEl=Ext.get(b.firstChild);this.textboxEl=Ext.get(b.childNodes[2].firstChild);this.textboxEl.enableDisplayMode();this.textboxEl.addKeyListener([10,13],function(){this.dlg.isVisible()&&this.opt&&this.opt.buttons&&(this.opt.buttons.ok?this.handleButton("ok"):this.opt.buttons.yes&&this.handleButton("yes"))},this);this.textareaEl=Ext.get(b.childNodes[2].childNodes[1]);this.textareaEl.enableDisplayMode();this.progressBar=
new Ext.ProgressBar({renderTo:this.bodyEl});this.bodyEl.createChild({cls:"x-clear"});this.browserWindowsMessageBox.add(a.name,Ext.copyTo({},this,this.browserWindowsMessageBoxProps));this.activeWindowName=a.name;return this.dlg},updateText:function(b){this.dlg.isVisible()||this.opt.width||this.dlg.setSize(this.maxWidth,100);this.msgEl.update(b?b+" ":"&#160;");var c=""!=this.iconCls?this.iconEl.getWidth()+this.iconEl.getMargins("lr"):0,a=this.msgEl.getWidth()+this.msgEl.getMargins("lr"),d=this.dlg.getFrameWidth("lr"),
e=this.dlg.body.getFrameWidth("lr");a=Math.max(Math.min(this.opt.width||c+a+d+e,this.opt.maxWidth||this.maxWidth),Math.max(this.opt.minWidth||this.minWidth,this.bwidth||0));!0===this.opt.prompt&&this.activeTextEl.setWidth(a-c-d-e);!0!==this.opt.progress&&!0!==this.opt.wait||this.progressBar.setSize(a-c-d-e);Ext.isIE9m&&a==this.bwidth&&(a+=4);this.msgEl.update(b||"&#160;");this.dlg.setSize(a,"auto").center();return this},updateProgress:function(b,c,a){this.progressBar.updateProgress(b,c);a&&this.updateText(a);
return this},isVisible:function(){return this.dlg&&this.dlg.isVisible()},hide:function(){var b=this.dlg?this.dlg.activeGhost:null;if(this.isVisible()||b)this.dlg.hide(),this.handleHide(),b&&this.dlg.unghost(!1,!1);return this},show:function(b){this.isVisible()&&this.hide();this.opt=b;var c=this.getDialog(this.opt.title||"&#160;");this.opt.maxWidth||(this.opt.maxWidth=Math.max(Zarafa.core.BrowserWindowMgr.getOwnerWindow(c).innerWidth-20,200));c.setTitle(this.opt.title||"&#160;");var a=!1!==this.opt.closable&&
!0!==this.opt.progress&&!0!==this.opt.wait;c.tools.close.setDisplayed(a);this.activeTextEl=this.textboxEl;this.opt.prompt=this.opt.prompt||(this.opt.multiline?!0:!1);this.opt.prompt?this.opt.multiline?(this.textboxEl.hide(),this.textareaEl.show(),this.textareaEl.setHeight(Ext.isNumber(this.opt.multiline)?this.opt.multiline:this.defaultTextHeight),this.activeTextEl=this.textareaEl):(this.textboxEl.show(),this.textareaEl.hide()):(this.textboxEl.hide(),this.textareaEl.hide());this.activeTextEl.dom.value=
this.opt.value||"";if(this.opt.prompt)c.focusEl=this.activeTextEl;else{b=this.opt.buttons;var d=null;b&&b.ok?d=this.buttons.ok:b&&b.yes&&(d=this.buttons.yes);d&&(c.focusEl=d)}Ext.isDefined(this.opt.iconCls)&&c.setIconClass(this.opt.iconCls);if(Ext.isDefined(this.opt.icon)){b=this.opt.icon;switch(b){case this.WARNING:b="";c.el.addClass(this.WARNING_CLS);console.warn("Deprecated warning icon used");break;case this.INFO:case this.QUESTION:b="";console.warn("Deprecated info/question icon used");break;
case this.ERROR:b="",c.el.addClass(this.ERROR_CLS),console.warn("Deprecated error icon used")}this.setIcon(b)}else this.iconEl.addClass("x-hidden"),this.iconEl.removeClass("ext-mb-icon");this.bwidth=this.updateButtons(this.opt.buttons);this.progressBar.setVisible(!0===this.opt.progress||!0===this.opt.wait);this.updateProgress(0,this.opt.progressText);this.updateText(this.opt.msg);this.opt.cls&&c.el.addClass(this.opt.cls);c.proxyDrag=!0===this.opt.proxyDrag;c.modal=!1!==this.opt.modal;c.mask=!1!==
this.opt.modal?this.mask:!1;c.isVisible()||(Zarafa.core.BrowserWindowMgr.getActive().document.body.appendChild(this.dlg.el.dom),c.setAnimateTarget(this.opt.animEl),c.on("show",function(){!0===a?c.keyMap.enable():c.keyMap.disable()},this,{single:!0}),c.show(this.opt.animEl));!0===this.opt.wait&&this.progressBar.wait(this.opt.waitConfig);return this},setIcon:function(b){if(this.dlg)return this.bufferIcon=void 0,b&&""!=b?(this.iconEl.removeClass("x-hidden"),this.iconEl.replaceClass(this.iconCls,b),this.bodyEl.addClass("x-dlg-icon"),
this.iconCls=b):(this.iconEl.replaceClass(this.iconCls,"x-hidden"),this.bodyEl.removeClass("x-dlg-icon"),this.iconCls=""),this;this.bufferIcon=b},progress:function(b,c,a){this.show({title:b,msg:c,buttons:!1,progress:!0,closable:!1,minWidth:this.minProgressWidth,progressText:a});return this},wait:function(b,c,a){this.show({title:c,msg:b,buttons:!1,closable:!1,wait:!0,modal:!0,minWidth:this.minProgressWidth,waitConfig:a});return this},alert:function(b,c,a,d){this.show({title:b,msg:c,buttons:this.OK,
fn:a,scope:d,minWidth:this.minWidth});return this},confirm:function(b,c,a,d){this.show({title:b,msg:c,buttons:this.YESNO,fn:a,scope:d,icon:this.QUESTION,minWidth:this.minWidth});return this},prompt:function(b,c,a,d,e,f){this.show({title:b,msg:c,buttons:this.OKCANCEL,fn:a,minWidth:this.minPromptWidth,scope:d,prompt:!0,multiline:e,value:f});return this},setActiveWindowMessageBox:function(b){var c=this.browserWindowsMessageBox.get(b);if(c)this.browserWindowsMessageBox.replace(this.activeWindowName,Ext.copyTo({},
this,this.browserWindowsMessageBoxProps)),Ext.apply(this,c);else{var a={};Ext.each(this.browserWindowsMessageBoxProps,function(d){a[d]=void 0});Ext.apply(this,a)}this.activeWindowName=b},removeBrowserWindowMessageBox:function(b){this.browserWindowsMessageBox.removeKey(b)}});Ext.MessageBox=new Ext.MessageBox;Ext.Msg=Ext.MessageBox;
(function(){var b=Ext.QuickTip.prototype.register,c=Ext.QuickTip.prototype.getTipCfg;Ext.override(Ext.QuickTip,{register:function(a){a.title=Ext.util.Format.htmlEncode(a.title);a.text=Ext.util.Format.htmlEncode(a.text);b.apply(this,arguments)},getTipCfg:function(a){return Ext.util.Format.htmlEncode(c.apply(this,arguments))}})})();Ext.namespace("Ext.QuickTips");
Ext.QuickTips=Ext.extend(Object,{browserQuickTips:void 0,tip:void 0,disabled:!1,constructor:function(b){this.browserQuickTips=new Ext.util.MixedCollection},init:function(b){if(Ext.isReady)this.tip=new Ext.QuickTip({elements:"header,body",disabled:this.disabled}),!1!==b&&this.tip.render(Ext.getBody()),this.browserQuickTips.add(Zarafa.core.BrowserWindowMgr.getOwnerWindow(this.tip).name,this.tip);else Ext.onReady(function(){Ext.QuickTips.init(b)})},ddDisable:function(){this.tip&&!this.disabled&&this.tip.disable()},
ddEnable:function(){this.tip&&!this.disabled&&this.tip.enable()},enable:function(){this.tip&&this.tip.enable();this.disabled=!1},disable:function(){this.tip&&this.tip.disable();this.disabled=!0},isEnabled:function(){return void 0!==this.tip&&!this.tip.disabled},getQuickTip:function(){return this.tip},register:function(){this.tip.register.apply(this.tip,arguments)},unregister:function(){this.tip.unregister.apply(this.tip,arguments)},tips:function(){this.tip.register.apply(this.tip,arguments)}});
Ext.QuickTips=new Ext.QuickTips;(function(){var b=Ext.Tip.prototype.doAutoWidth;Ext.override(Ext.Tip,{doAutoWidth:function(){b.call(this,Ext.isIE?1:0)}})})();(function(){var b=Ext.Toolbar.TextItem.prototype.onRender;Ext.override(Ext.Toolbar.TextItem,{onRender:function(c,a){b.apply(this,arguments);this.el&&this.el.unselectable()}})})();
(function(){var b=Ext.Window.prototype.beforeShow,c=Ext.Window.prototype.onWindowResize;Ext.override(Ext.Window,{browserWindow:void 0,beforeShow:function(){b.call(this);this.correctMaskSize();this.browserWindow=this.el.dom.ownerDocument.defaultView},afterShow:function(a){if(this.isDestroyed)return!1;this.proxy.hide();this.el.setStyle("display","block");this.el.show();this.maximized&&this.fitContainer();if(this.monitorResize||this.modal||this.constrain||this.constrainHeader)if("mainBrowserWindow"===
this.browserWindow.name)Ext.EventManager.onWindowResize(this.onWindowResize,this);else Zarafa.core.BrowserWindowMgr.on("separatewindowresize",this.onSeparateWindowResize,this);this.doConstrain();this.doLayout();this.keyMap&&this.keyMap.enable();this.toFront();this.updateHandles();a&&(Ext.isIE||Ext.isWebKit)&&(a=this.getSize(),this.onResize(a.width,a.height));this.onShow();this.fireEvent("show",this)},afterHide:function(){this.proxy.hide();if(this.monitorResize||this.modal||this.constrain||this.constrainHeader)"mainBrowserWindow"===
this.browserWindow.name?Ext.EventManager.removeResizeListener(this.onWindowResize,this):Zarafa.core.BrowserWindowMgr.un("separatewindowresize",this.onSeparateWindowResize,this);this.keyMap&&this.keyMap.disable();this.onHide();this.fireEvent("hide",this)},onWindowResize:function(){c.call(this);this.correctMaskSize()},onSeparateWindowResize:function(a){if(a===this.browserWindow)this.onWindowResize()},correctMaskSize:function(){this.modal&&(this.mask.hide(),this.mask.setSize(this.mask.dom.ownerDocument.body.scrollWidth,
this.mask.dom.ownerDocument.body.scrollHeight),this.mask.show())}})})();(function(){var b=Ext.data.Node.prototype.appendChild,c=Ext.data.Node.prototype.removeChild;Ext.override(Ext.data.Node,{appendChild:function(a){this.leaf=!1;return b.apply(this,arguments)},removeChild:function(a,d){var e=c.apply(this,arguments);this.hasChildNodes()||(this.leaf=!0);return e}})})();
(function(){Ext.override(Ext.data.Record,{getSenderInitials:function(){var b=this.get("sent_representing_name")||this.get("display_name")||this.get("sender_name");return Ext.isEmpty(b)?Ext.isEmpty(this.get("smtp_address"))?"":(b=this.get("smtp_address").charAt(0),b.toUpperCase()):(b=b.replace(/\(.*?\)/g,"").trim().split(" "),b=1<b.length?b.shift().charAt(0)+b.pop().charAt(0):b.shift().charAt(0),b.toUpperCase())}})})();
(function(){var b=function(c){return void 0!==c&&null!==c&&""!==c?parseInt(c,10):this.useNull?null:0};Ext.data.Types.INT.convert=b;Ext.data.Types.INTEGER.convert=b;b=function(c){return void 0!==c&&null!==c&&""!==c?parseFloat(c,10):this.useNull?null:0};Ext.data.Types.FLOAT.convert=b;Ext.data.Types.NUMBER.convert=b})();(function(){var b=Ext.dd.DD.prototype.unreg;Ext.override(Ext.dd.DD,{scroll:!1,unreg:function(){b.apply(this,arguments);this==this.DDM.dragCurrent&&(this.DDM.dragCurrent=null)}})})();
(function(){var b=Ext.dd.DragDropMgr.getLocation;Ext.apply(Ext.dd.DragDropMgr,{getGroupDDById:function(c,a){return this.ids[c]&&this.ids[c][a]?this.ids[c][a]:null},getLocation:function(c){var a=c.getEl(),d=b.apply(this,arguments);if(a&&d)for(a=Ext.get(a.parentNode);a&&d;)a.isScrollable()&&(d=d.intersect(a.getRegion())),a=a.parent();return d},getZIndex:function(c){return-1},initEvents:function(c){Ext.EventManager.on(c.document,"mousemove",this.handleMouseMove,this,!0);Ext.EventManager.on(c.document,
"mouseup",this.handleMouseUp,this,!0)},isOverTarget:function(c,a,d){var e=this.locationCache[a.id];e&&this.useCache||(e=this.getLocation(a),this.locationCache[a.id]=e);if(!e)return!1;a.cursorIsOver=e.contains(c);var f=this.dragCurrent;if(!f||!f.getTargetCoord||!d&&!f.constrainX&&!f.constrainY)return a.cursorIsOver?(d=Zarafa.core.BrowserWindowMgr.getActive(),a=Zarafa.core.BrowserWindowMgr.getOwnerWindow(a),d===a):!1;a.overlap=null;c=f.getTargetCoord(c.x,c.y);f=f.getDragEl();return(e=(new Ext.lib.Region(c.y,
c.x+f.offsetWidth,c.y+f.offsetHeight,c.x)).intersect(e))?(a.overlap=e,d?!0:a.cursorIsOver):!1}})})();
(function(){var b=Ext.dd.DragSource.prototype.onDragOver,c=Ext.dd.DragSource.prototype.onDragOut,a=Ext.dd.DragSource.prototype.onDragDrop;Ext.override(Ext.dd.DragSource,{onDragEnter:function(d,e){if(this.cachedTarget)this.onDragOut(d,this.cachedTarget.id);var f;if((this.cachedTarget=f=this.ddGroup?Ext.dd.DragDropMgr.getGroupDDById(this.ddGroup,e):Ext.dd.DragDropMgr.getDDById(e))&&!1!==this.beforeDragEnter(f,d,e)){if(f.isNotifyTarget){var g=f.notifyEnter(this,d,this.dragData);this.proxy.setStatus(g)}else this.proxy.setStatus(this.dropAllowed);
this.afterDragEnter&&this.afterDragEnter(f,d,e)}},onDragOver:function(d,e){if(!this.cachedTarget)this.onDragEnter(d,e);this.cachedTarget=this.cachedTarget||Ext.dd.DragDropMgr.getGroupDDById(this.ddGroup,e);return b.apply(this,arguments)},onDragOut:function(d,e){if(this.cachedTarget)return c.apply(this,arguments)},onDragDrop:function(d,e){if(this.cachedTarget)return a.apply(this,arguments)}})})();
(function(){Ext.override(Ext.form.BasicForm,{updateRecord:function(b){b.beginEdit();var c,a;b.fields.each(function(d){if(c=this.findField(d.name))a=c.getValue(),!1!==Ext.type(a)&&a.getGroupValue?a=a.getGroupValue():!0!==c.isSingleValued&&c.eachItem&&(a=[],c.eachItem(function(e){a.push(e.getValue())})),b.set(d.name,a)},this);b.endEdit(this.isValid());return this},setValues:function(b){if(Ext.isArray(b))for(var c=0,a=b.length;c<a;c++){var d=b[c],e=this.findField(d.id);!e||e.hasFocus&&e.originalValue!=
e.el.dom.value||(e.setValue(d.value),this.trackResetOnLoad&&(e.originalValue=e.getValue()))}else for(a in b)Ext.isFunction(b[a])||!(c=this.findField(a))||c.hasFocus&&c.originalValue!=c.el.dom.value||(c.setValue(b[a]),this.trackResetOnLoad&&(c.originalValue=c.getValue()));return this}})})();
(function(){var b=Ext.form.Checkbox.prototype.onRender;Ext.override(Ext.form.Checkbox,{onRender:function(c,a){b.apply(this,arguments);this.wrap.addClass("x-form-item");if(this.boxLabel&&this.el){var d=Ext.query(".x-form-cb-label",this.el.parent().dom)[0];d&&Ext.get(d).unselectable()}}})})();
(function(){var b=Ext.form.ComboBox.prototype.initList,c=Ext.form.ComboBox.prototype.expand,a=Ext.form.ComboBox.prototype.initComponent;Ext.override(Ext.form.ComboBox,{defaultAutoCreate:{tag:"input",type:"text",size:"24",autocomplete:"off",spellcheck:"true"},initComponent:function(){a.apply(this,arguments);this.addEvents("beforeexpand")},initList:function(){this.tpl||(this.tpl='<tpl for="."><div class="x-combo-list-item">{'+this.displayField+":htmlEncode}</div></tpl>");b.apply(this,arguments)},expand:function(){!this.isExpanded()&&
this.hasFocus&&!1!==this.fireEvent("beforeexpand",this)&&c.apply(this,arguments)},getListParent:function(){var d=this.getEl()?this.getEl().dom.ownerDocument:void 0;return d?d.body:document.body},disableLabel:function(d){this.label&&this.label.toggleClass("x-item-disabled")}})})();
(function(){var b=Ext.form.DateField.prototype.getValue,c=Ext.form.DateField.prototype.initComponent,a=Ext.form.DateField.prototype.onTriggerClick,d=Ext.form.DateField.prototype.menuEvents;Ext.override(Ext.form.DateField,{showNow:!1,initComponent:function(){this.initialConfig.startDay||(this.startDay=container.getSettingsModel().get("zarafa/v1/main/week_start"));c.apply(this,arguments);this.addEvents("selectnow");if(0>this.startDay||this.startDay>=Date.dayNames.length)this.startDay=0},getValue:function(){var e=
b.apply(this,arguments);return Ext.isEmpty(e)?null:e},beforeBlur:function(){var e=this.getRawValue();if(!Ext.isEmpty(e)){var f=Zarafa.core.Util.getDateByLanguageFormat(e,void 0,this.format);e=new Date;var g=f[0],l=f[1];f=f[2];e.setFullYear(f?f:e.getFullYear(),l?l-1:e.getMonth(),g?g:e.getDate());Ext.isDefined(e)&&Ext.isDate(e)&&(e>this.maxValue?e=this.maxValue:e<this.minValue&&(e=this.minValue),this.setValue(e))}},processValue:function(e){return Ext.isEmpty(e)?"":e},onTriggerClick:function(){this.showNow&&
null==this.menu&&(this.menu=new Ext.menu.DateMenu({hideOnClick:!1,focusOnSelect:!1,initialConfig:{showNow:!0,todayText:_("Now")}}));a.apply(this,arguments);this.showNow&&this.menu.relayEvents(this.menu.picker,["selectnow"])},menuEvents:function(e){d.apply(this,arguments);if(this.showNow)this.menu[e]("selectnow",this.onSelectnow,this)},onSelectnow:function(e,f){this.fireEvent("selectnow",this,f)}})})();(function(){Ext.override(Ext.form.DisplayField,{cls:"x-form-item"})})();
(function(){Ext.override(Ext.form.FormPanel,{labelAlign:"right"})})();(function(){var b=Ext.form.Label.prototype.onRender;Ext.override(Ext.form.Label,{cls:"x-form-item-label",onRender:function(c,a){b.apply(this,arguments);this.positionEl=this.el.wrap({cls:"x-form-item"});this.el.unselectable()}})})();(function(){Ext.override(Ext.form.TextField,{defaultAutoCreate:{tag:"input",type:"text",size:"20",autocomplete:"off",spellcheck:"true"}})})();
(function(){Ext.override(Ext.form.TriggerField,{defaultAutoCreate:{tag:"input",type:"text",size:"16",autocomplete:"off",spellcheck:"true"}})})();(function(){var b=/^(100?|\d?\d)?%?$/,c=/^[1-9]\d*$/i,a=/^(\w+)([\-+.']+[\w]+)*@(\w[\-\w]*\.){1,5}([A-Za-z]){2,10}$/;Ext.apply(Ext.form.VTypes,{percentage:function(d){return b.test(d)},percentageText:_("Value must be between 0% to 100%"),naturalInteger:function(d){return c.test(d)},naturalIntegerText:_("Number must be higher than zero"),email:function(d){return a.test(d)}})})();
(function(){var b=Ext.grid.ColumnModel.prototype.setColumnWidth;Ext.override(Ext.grid.ColumnModel,{setColumnWidth:function(c,a,d){isFinite(a)&&b.apply(this,arguments)}})})();
(function(){var b=Ext.grid.GridPanel.prototype.onClick;Ext.override(Ext.grid.GridPanel,{onClick:function(c){b.apply(this,arguments);var a=c.getTarget();"INPUT"!==a.tagName&&"x-grid-group-title"!==a.className&&"x-grid-group-hd"!==a.className&&this.view.focusEl.focus()},reconfigure:function(c,a){!1!==this.stateful&&a!==this.colModel&&this.mun(this.colModel,"hiddenchange",this.saveState,this);var d=this.rendered;d&&this.loadMask&&(this.loadMask.destroy(),this.loadMask=new Ext.LoadMask(this.bwrap,Ext.apply({},
{store:c},this.initialConfig.loadMask)));this.view&&this.view.initData(c,a);this.store=c;this.colModel=a;!1!==this.stateful&&(this.initStateEvents(),this.initState());d&&this.view.refresh(!0);this.fireEvent("reconfigure",this,c,a)}})})();
(function(){var b=Ext.grid.GridView.prototype.onColConfigChange,c=Ext.grid.GridView.prototype.initTemplates;Ext.override(Ext.grid.GridView,{getColumnWidth:function(a){a=this.cm.getColumnWidth(a);var d=this.borderWidth;return Ext.isNumber(a)?Ext.isBorderBox?a+"px":Math.max(a-d,0)+"px":a},onColConfigChange:function(){var a=this.grid;!1!==a.stateful&&a.initState();b.apply(this,arguments)},initTemplates:function(){c.apply(this);var a=new Ext.Template('<td class="x-grid3-hd x-grid3-cell x-grid3-td-{id} {css} {cls}" style="{style}">',
'<div {tooltip} {attr} class="x-grid3-hd-inner x-grid3-hd-{id}" unselectable="on" style="{istyle}">',this.grid.enableHdMenu?'<a class="x-grid3-hd-btn" href="#"></a>':"",'<div class="zarafa-x-grid3-hd-title">{value}</div>','<img alt="" class="x-grid3-sort-icon" src="',Ext.BLANK_IMAGE_URL,'" />',"</div>","</td>");a.disableFormats=!0;this.templates.hcell=a.compile()},renderHeaders:function(){var a=this.cm,d=this.templates,e=d.hcell,f=a.getColumnCount(),g=f-1,l=[],h;for(h=0;h<f;h++){var m=0==h?"x-grid3-cell-first ":
h==g?"x-grid3-cell-last ":"";m={id:a.getColumnId(h),value:a.getColumnHeader(h)||"",style:this.getColumnStyle(h,!0),css:m,tooltip:this.getColumnTooltip(h),cls:a.getColumnAt(h).headerCls||""};"right"==a.config[h].align?m.istyle="padding-right: 16px;":delete m.istyle;l[h]=e.apply(m)}return d.header.apply({cells:l.join(""),tstyle:String.format("width: {0};",this.getTotalWidth())})}})})();
(function(){var b=navigator.userAgent.toLowerCase(),c=!Ext.isOpera&&(/msie/.test(b)||/trident/.test(b)),a=Ext.getDom;Ext.apply(Ext,{isIE:c,isIE10:c&&/msie 10/.test(b),isIE11:c&&/rv:11/.test(b),isEdge:/Edge\/\d./i.test(navigator.userAgent),clone:function(d){if(null===d||void 0===d)return d;if(d.nodeType&&d.cloneNode)return d.cloneNode(!0);var e=Object.prototype.toString.call(d);if("[object Date]"===e)return new Date(d.getTime());var f;if("[object Array]"===e)for(e=d.length,f=[];e--;)f[e]=Ext.clone(d[e]);
else if("[object Object]"===e&&d.constructor===Object){f={};for(var g in d)f[g]=Ext.clone(d[g])}return f||d},isArray:function(d){return Array.isArray(d)},getDom:function(d){var e=null,f=Zarafa.core.BrowserWindowMgr.getActive();Ext.isDefined(f)&&"mainBrowserWindow"!==f.name&&"string"===typeof d&&(e=f.document.getElementById(d));null===e&&(e=a.apply(this,arguments));if(null===e&&"string"===typeof d){var g=Zarafa.core.BrowserWindowMgr.browserWindows;Ext.isDefined(g)&&g.each(function(l){var h=l.document.getElementById(d);
"mainBrowserWindow"!==l.name&&l!==f&&null!==h&&(e=h)})}return e},getBody:function(){var d=Zarafa.core.BrowserWindowMgr.getActive();d=Ext.isDefined(d)?d.document:document;return Ext.get(d.body||d.documentElement)},getDoc:function(){var d=Zarafa.core.BrowserWindowMgr.getActive();d=Ext.isDefined(d)?d.document:document;return Ext.get(d)}})})();
(function(){var b=Ext.layout.BorderLayout.Region.prototype.beforeCollapse,c=Ext.layout.BorderLayout.Region.prototype.onExpand;Ext.override(Ext.layout.BorderLayout.Region,{beforeCollapse:function(){this.splitEl&&this.splitEl.addClass("x-hide-display");b.apply(this,arguments)},onExpand:function(){this.splitEl&&this.splitEl.removeClass("x-hide-display");c.apply(this,arguments)}})})();
(function(){var b=Ext.layout.ToolbarLayout.prototype.configureItem,c=Ext.layout.ToolbarLayout.prototype.hideItem,a=Ext.layout.ToolbarLayout.prototype.unhideItem,d=Ext.layout.ToolbarLayout.prototype.onLayout,e=Ext.layout.ToolbarLayout.prototype.addComponentToMenu;Ext.override(Ext.layout.ToolbarLayout,{triggerWidth:41,overflowTabIndex:void 0,onLayout:function(f,g){d.apply(this,arguments);f.items.each(function(l){Ext.isFunction(l.doLayout)&&l.doLayout()},this);this.overflowTabIndex&&this.more&&Ext.get(this.more.el).child("button").set({tabIndex:this.overflowTabIndex})},
configureItem:function(f){var g=this.container,l=g.getLayoutTarget();b.apply(this,arguments);f.on("show",function(h){if(!0!==h.xtbHidden)this.onLayout(g,l)},this);f.on("hide",function(h){if(!0!==h.xtbHidden)this.onLayout(g,l)},this)},hideItem:function(f){var g=this;c.apply(this,arguments);f.xtbOrigShow=f.show;f.show=function(){f.xtbOrigShow(!0);f.xtbWidth=f.getPositionEl().dom.parentNode.offsetWidth;f.xtbOrigHide(!1)};f.xtbOrigHide=f.hide;f.hide=function(){g.unhideItem(f);f.hide()}},unhideItem:function(f){f.show=
f.xtbOrigShow;delete f.xtbOrigShow;f.hide=f.xtbOrigHide;delete f.xtbOrigHide;delete f.xtbWidth;a.apply(this,arguments)},addComponentToMenu:function(f,g){if(!0===g.xtbHidden||!0!==g.hidden)Ext.isDefined(g.menu)&&g.splitOnMoreMenu?Ext.each(g.menu.items.items,function(l){var h=this.createMenuConfig(l);l.isXType("menucheckitem")&&(h.xtype=l.xtype,l.model.store.hasFilterApplied&&(h.iconCls="",h.checked=!0));f.add(h)},this):e.apply(this,arguments)},initMore:function(){if(!this.more){this.moreMenu=new Ext.menu.Menu({ownerCt:this.container,
listeners:{beforeshow:this.onBeforeShowMoreMenu,scope:this}});this.more=new Ext.Button({iconCls:"icon_more",ownerCt:this.container,tooltip:_("More options"),overflowText:_("More options"),listeners:{afterrender:this.afterMoreButtonRender,scope:this}});var f=this.insertCell(this.more,this.extrasTr,100);this.more.render(f)}},afterMoreButtonRender:function(f){f.menu=this.moreMenu},onBeforeShowMoreMenu:function(f){this.beforeMoreShow(f);f.items.each(function(g){Ext.isFunction(g.beforeShow)&&g.beforeShow.call(g.scope||
g,g)},this)}})})();(function(){var b=Ext.layout.boxOverflow.Menu.prototype.addComponentToMenu;Ext.override(Ext.layout.boxOverflow.Menu,{addComponentToMenu:function(c,a){!0!==a.xtbHidden&&!0===a.hidden||b.apply(this,arguments)}})})();
(function(){var b=Ext.menu.Menu.prototype.constructor;Ext.override(Ext.menu.Menu,{constructor:function(){b.apply(this,arguments);this.on("hide",this.onMenuHide,this)},onLoad:function(c,a,d){var e=[];Ext.each(this.records,function(f){(f=c.getById(f.id))?e.push(f):this.destroy()},this);this.records=e},onMenuHide:function(c){Ext.isDefined(c.ownerCt)||Ext.isDefined(c.parentMenu)||!c.autoDestroy||c.destroy()}})})();
(function(){Ext.apply(Ext.state.Manager,{components:new Ext.util.MixedCollection(!1,function(b){return b.getStateId()}),register:function(b){this.components.add(b)},unregister:function(b){this.components.remove(b)},getComponent:function(b){return this.components.get(b)}})})();
(function(){Ext.override(Ext.tree.DefaultSelectionModel,{select:function(b,c,a){if(!Ext.fly(b.ui.wrap).isVisible()&&c)return c.call(this,b);c=this.selNode;if(b==c)if(a||!Ext.isDefined(a))b.ui.onSelectedChange(!0);else b.ui.addClass("x-tree-selected");else if(!1!==this.fireEvent("beforeselect",this,b,c)){if(c&&c.ui)c.ui.onSelectedChange(!1);this.selNode=b;b.ui.onSelectedChange(!0);this.fireEvent("selectionchange",this,b,c)}return b}})})();
(function(){var b=Ext.tree.TreeEditor.prototype.bindScroll,c=Ext.tree.TreeEditor.prototype.fitToTree;Ext.override(Ext.tree.TreeEditor,{fitToTree:function(){this.tree&&!0!==this.tree.isDestroyed&&c.apply(this,arguments)},bindScroll:function(){this.tree&&!0!==this.tree.isDestroyed&&b.apply(this,arguments)}})})();(function(){Ext.override(Ext.tree.TreeSorter,{doSort:function(b){if(b.childNodes){var c=document.activeElement;b.sort(this.sortFn);c&&"IFRAME"!==c.tagName&&c.focus()}}})})();
(function(){Ext.apply(Ext.util.Format,{fileSize:function(b){Ext.isNumber(b)||(b=0);if(1024>b)return String.format(ngettext("{0} byte","{0} bytes",b),b);b=parseFloat((b/1024).toFixed(1));if(1024>b)return String.format(ngettext("{0} KB","{0} KB",b),b);b=parseFloat((b/1024).toFixed(1));if(1024>b)return String.format(ngettext("{0} MB","{0} MB",b),b);b=parseFloat((b/1024).toFixed(1));if(1024>b)return String.format(ngettext("{0} GB","{0} GB",b),b);b=parseFloat((b/1024).toFixed(1));return String.format(ngettext("{0} TB",
"{0} TB",b),b)},percentage:function(b,c){Ext.isDefined(c)||(c=2);return(100*b).toFixed(c)+"%"},duration:function(b,c){c=Ext.isDefined(c)?c:0;if(60>b)return String.format(ngettext("{0} minute","{0} minutes",b),b);b=parseFloat((b/60).toFixed(c));if(24>b)return String.format(ngettext("{0} hour","{0} hours",b),b);b=parseFloat((b/24).toFixed(c));if(7>b)return String.format(ngettext("{0} day","{0} days",b),b);b=parseFloat((b/7).toFixed(c));return String.format(ngettext("{0} week","{0} weeks",b),b)},indent:function(b,
c){b=(Ext.isDefined(b)?b:1)*(Ext.isDefined(c)?c:4);c="";for(var a=0;a<b;a++)c+="&nbsp;";return c},elide:function(b,c,a,d){d=d?"..":"...";c=c||0;a=Ext.isDefined(a)?a:c;return 0===c&&0===a?b:b&&b.length>c+a?b.substr(0,c)+d+b.substr(b.length-a):b},htmlEncodeUndef:function(b){return this.htmlEncode(this.undef.apply(this,arguments))},htmlEncodeDefaultValue:function(b,c){return this.htmlEncode(this.defaultValue.apply(this,arguments))},htmlEncodeElide:function(b,c,a,d){return this.htmlEncode(this.elide.apply(this,
arguments))},htmlEncodeEllipsis:function(b,c,a){return this.htmlEncode(this.ellipsis.apply(this,arguments))},basename:function(b){return b.split("\\").pop()},htmlEncodeBasename:function(b){return this.htmlEncode(this.basename.apply(this,arguments))},sensitivityString:function(b){return Zarafa.core.mapi.Sensitivity.getDisplayName(b)},importanceString:function(b){return Zarafa.core.mapi.Importance.getDisplayName(b)},meetingStatusString:function(b){return Zarafa.core.mapi.MeetingStatus.getDisplayName(b)},
responseStatusString:function(b){return Zarafa.core.mapi.ResponseStatus.getDisplayName(b)},taskStatusString:function(b){return Zarafa.core.mapi.TaskStatus.getDisplayName(b)},busyStatusString:function(b){return Zarafa.core.mapi.BusyStatus.getDisplayName(b)},formatDefaultTimeString:function(b,c){if(b)return b.formatDefaultTime(c)},getNiceFormat:function(b,c){if(b)return b.getNiceFormat(c)}})})();
(function(){Ext.override(Ext.ux.Spinner,{doRender:function(b,c){b=this.el=this.field.getEl();c=this.field;c.wrap?this.wrap=c.wrap.addClass("x-form-field-wrap"):c.wrap=this.wrap=b.wrap({cls:"x-form-field-wrap"});this.trigger=this.wrap.createChild({tag:"img",src:Ext.BLANK_IMAGE_URL,cls:"x-form-trigger "+this.triggerClass});c.width||this.wrap.setWidth(b.getWidth()+this.trigger.getWidth());this.splitter=this.wrap.createChild({tag:"div",cls:this.splitterClass,style:"width:13px; height:2px;"});this.splitter.setRight(Ext.isIE?
1:2).setTop(10).show();Ext.isEmpty(c.boxLabel)||this.wrap.createChild({tag:"label",htmlFor:this.el.id,cls:"x-form-cb-label",html:c.boxLabel});this.proxy=this.trigger.createProxy("",this.splitter,!0);this.proxy.addClass("x-form-spinner-proxy");this.proxy.setStyle("left","0px");this.proxy.setSize(14,1);this.proxy.hide();this.dd=new Ext.dd.DDProxy(this.splitter.dom.id,"SpinnerDrag",{dragElId:this.proxy.id});this.initTrigger();this.initSpinner()},initSpinner:function(){this.field.addEvents({spin:!0,spinup:!0,
spindown:!0});this.keyNav=new Ext.KeyNav(this.el,{up:function(b){b.preventDefault();this.onSpinUp()},down:function(b){b.preventDefault();this.onSpinDown()},pageUp:function(b){b.preventDefault();this.onSpinUpAlternate()},pageDown:function(b){b.preventDefault();this.onSpinDownAlternate()},scope:this});this.field.mon(this.trigger,"click",this.onTriggerClick,this,{preventDefault:!0});this.field.mon(this.trigger,{mouseover:this.onMouseOver,mouseout:this.onMouseOut,mousemove:this.onMouseMove,mousedown:this.onMouseDown,
mouseup:this.onMouseUp,scope:this,preventDefault:!0});this.field.mon(this.wrap,"mousewheel",this.handleMouseWheel,this);this.dd.setXConstraint(0,0,10);this.dd.setYConstraint(1500,1500,10);this.dd.endDrag=this.endDrag.createDelegate(this);this.dd.startDrag=this.startDrag.createDelegate(this);this.dd.onDrag=this.onDrag.createDelegate(this)}})})();Ext.namespace("Zarafa.util");
Zarafa.util.Translations={msg:_("The quick brown fox jumps over the lazy dog"),SplitTranslation:function(b,c){if(!Ext.isDefined(c))return b;var a=b.indexOf(c);if(-1==a)return b;for(var d=a-1;" "==b[d]&&0<=d;)d--;for(c=a+c.length;" "==b[c]&&c<b.length;)c++;return[b.substr(0,d+1),b.substr(c)]},MultiSplitTranslation:function(b,c){Ext.isArray(c)||(c=[c]);var a=new Ext.util.MixedCollection;a.add(b);for(var d=0;d<c.length;d++)a.each(function(e,f){e=Zarafa.util.Translations.SplitTranslation(e,c[d]);if(!Ext.isArray(e))return!0;
a.removeAt(f);Ext.isEmpty(e[0])||(a.insert(f,e[0]),f++);a.insert(f,c[d]);f++;Ext.isEmpty(e[1])||a.insert(f,e[1]);return!1});return a.getRange()}};
(function(){Ext.apply(Date,{dayNames:[_("Sunday"),_("Monday"),_("Tuesday"),_("Wednesday"),_("Thursday"),_("Friday"),_("Saturday")],shortDayNames:[_("Sun"),_("Mon"),_("Tue"),_("Wed"),_("Thu"),_("Fri"),_("Sat")],monthNames:[_("January"),_("February"),_("March"),_("April"),_("May"),_("June"),_("July"),_("August"),_("September"),_("October"),_("November"),_("December")]});Ext.PagingToolbar.tmpPageText=Zarafa.util.Translations.SplitTranslation(_("Page {A} of {0}"),"{A}");Ext.override(Ext.PagingToolbar,
{displayMsg:_("Displaying messages {0} - {1} of {2}"),emptyMsg:_("No messages to display"),beforePageText:Ext.PagingToolbar.tmpPageText[0],afterPageText:Ext.PagingToolbar.tmpPageText[1],firstText:_("First Page"),prevText:_("Previous Page"),nextText:_("Next Page"),lastText:_("Last Page"),refreshText:_("Refresh")});delete Ext.PagingToolbar.tmpPageText;Ext.override(Ext.DatePicker,{todayText:_("Today"),okText:"&nbsp;"+_("OK")+"&nbsp;",cancelText:_("Cancel"),todayTip:_("{0} (Spacebar)"),minText:_("This date is before the minimum date"),
maxText:_("This date is after the maximum date"),format:_("d/m/Y"),disabledDaysText:_("Disabled"),disabledDatesText:_("Disabled"),nextText:_("Next Month (Control+Right)"),prevText:_("Previous Month (Control+Left)"),monthYearText:_("Choose a month (Control+Up/Down to move years)"),monthNames:Date.monthNames,dayNames:Date.dayNames});Ext.override(Ext.grid.GridView,{sortAscText:_("Sort Ascending"),sortDescText:_("Sort Descending"),columnsText:_("Columns")});Ext.override(Ext.grid.GroupingView,{groupByText:_("Group By This Field"),
showGroupsText:_("Show in Groups"),emptyGroupText:_("(None)")});Ext.MessageBox.buttonText.ok=_("Ok");Ext.MessageBox.buttonText.cancel=_("Cancel");Ext.MessageBox.buttonText.yes=_("Yes");Ext.MessageBox.buttonText.no=_("No");Ext.override(Ext.LoadMask,{msg:_("Loading")+"..."});Ext.override(Ext.form.ComboBox,{loadingText:_("Loading")+"..."});Ext.override(Ext.form.Field,{invalidText:_("The value in this field is invalid")});Ext.override(Ext.form.TextField,{minLengthText:_("The minimum length for this field is {0}"),
maxLengthText:_("The maximum length for this field is {0}"),blankText:_("This field is required")});Ext.override(Ext.form.NumberField,{minText:_("The minimum value for this field is {0}"),maxText:_("The maximum value for this field is {0}"),nanText:_("{0} is not a valid number")});Ext.override(Ext.form.DateField,{format:_("d/m/Y"),disabledDaysText:_("Disabled"),disabledDatesText:_("Disabled"),minText:_("The date in this field must be equal to or after {0}"),maxText:_("The date in this field must be equal to or before {0}"),
invalidText:_("{0} is not a valid date - it must be in the format {1}")});Ext.override(Ext.form.CheckboxGroup,{blankText:_("You must select at least one item in this group")});Ext.override(Ext.form.RadioGroup,{blankText:_("You must select one item in this group")});Ext.override(Ext.form.TimeField,{minText:_("The time in this field must be equal to or after {0}"),maxText:_("The time in this field must be equal to or before {0}"),invalidText:_("{0} is not a valid time"),format:_("G:i")});Ext.override(Ext.grid.GridView,
{sortAscText:_("Sort Ascending"),sortDescText:_("Sort Descending"),columnsText:_("Columns")});Ext.override(Ext.grid.PropertyColumnModel,{nameText:_("Name"),valueText:_("Value"),dateFormat:_("d/m/Y"),trueText:_("true"),falseText:_("false")});Ext.apply(Ext.form.VTypes,{emailText:_('This field should be an e-mail address in the format "user@example.com"'),urlText:String.format(_('This field should be a URL in the format "{0}"'),"http://www.example.com"),alphaText:_("This field should only contain letters and _"),
alphanumText:_("This field should only contain letters, numbers and _")})})();
(Ext.isIE||Ext.isEdge)&&function(){Ext.apply(Ext.EventManager,function(){function b(k){var n=!1,p=0,q=G.length,t=!1;if(k){if(k.getElementById||k.navigator){for(;p<q;++p){var u=G[p];try{if(u.el===k){n=u.id;break}}catch(w){}}n||(n=Ext.id(k),G.push({id:n,el:k}),t=!0)}else n=Ext.id(k);Ext.elCache[n]||(Ext.Element.addToCache(new Ext.Element(k),n),t&&(Ext.elCache[n].skipGC=!0))}return n}function c(k,n,p,q,t,u){k=Ext.getDom(k);var w=b(k);w=Ext.elCache[w].events;var y=E.on(k,n,t);w[n]=w[n]||[];w[n].push([p,
t,u,y,q]);if(k.addEventListener&&"mousewheel"==n){var z=["DOMMouseScroll",t,!1];k.addEventListener.apply(k,z);Ext.EventManager.addListener(H,"unload",function(){k.removeEventListener.apply(k,z)})}k==C&&"mousedown"==n&&Ext.EventManager.stoppedMouseDownEvent.addListener(t)}function a(){if(window!=top)return!1;try{C.documentElement.doScroll("left")}catch(k){return!1}g();return!0}function d(k){if(Ext.isIE&&a())return!0;if("complete"==C.readyState)return g(),!0;D||(B=setTimeout(arguments.callee,2));return!1}
function e(k){J||=Ext.query("style, link[rel=stylesheet]");if(J.length==C.styleSheets.length)return g(),!0;D||(B=setTimeout(arguments.callee,2));return!1}function f(k){C.removeEventListener("DOMContentLoaded",arguments.callee,!1);e()}function g(k){D||(D=!0,B&&clearTimeout(B),K&&C.removeEventListener("DOMContentLoaded",g,!1),Ext.isIE&&d.bindIE&&C.detachEvent("onreadystatechange",d),E.un(H,"load",arguments.callee));v&&!Ext.isReady&&(Ext.isReady=!0,v.fire(),v.listeners=[])}function l(k,n){return function(){var p=
Ext.toArray(arguments);n.target==Ext.EventObject.setEvent(p[0]).target&&k.apply(this,p)}}function h(k,n,p){return function(q){p.delay(n.buffer,k,null,[new Ext.EventObjectImpl(q)])}}function m(k,n,p,q,t){return function(u){Ext.EventManager.removeListener(n,p,q,t);k(u)}}function r(k,n,p){return function(q){var t=new Ext.util.DelayedTask(k);p.tasks||(p.tasks=[]);p.tasks.push(t);t.delay(n.delay||10,k,null,[new Ext.EventObjectImpl(q)])}}function x(k,n,p,q,t){function u(A){if(Ext){A=Ext.EventObject.setEvent(A);
var I;if(w.delegate){if(!(I=A.getTarget(w.delegate,y)))return}else I=A.target;w.stopEvent&&A.stopEvent();w.preventDefault&&A.preventDefault();w.stopPropagation&&A.stopPropagation();!1===w.normalized&&(A=A.browserEvent);q.call(t||y,A,I,w)}}var w=p&&"boolean"!=typeof p?p:{},y=Ext.getDom(k);q=q||w.fn;t=t||w.scope;if(!y)throw'Error listening for "'+n+'". Element "'+k+"\" doesn't exist.";w.target&&(u=l(u,w));w.delay&&(u=r(u,w,q));w.single&&(u=m(u,y,n,q,t));if(w.buffer){var z=new Ext.util.DelayedTask(u);
u=h(u,w,z)}c(y,n,q,z,u,t);return u}var v,B,D=!1,K=Ext.isGecko||Ext.isWebKit||Ext.isSafari,E=Ext.lib.Event,C=document,H=window,M=/^(?:scope|delay|buffer|single|stopEvent|preventDefault|stopPropagation|normalized|args|delegate)$/,G=[],J,F={addListener:function(k,n,p,q,t){if("object"==typeof n)for(var u in n)p=n[u],M.test(u)||(Ext.isFunction(p)?x(k,u,n,p,n.scope):x(k,u,p));else x(k,n,t,p,q)},removeListener:function(k,n,p,q){k=Ext.getDom(k);var t=b(k),u=k&&Ext.elCache[t].events[n]||[],w,y;var z=0;for(w=
u.length;z<w;z++)if(Ext.isArray(y=u[z])&&y[0]==p&&(!q||y[2]==q)){y[4]&&y[4].cancel();if(q=p.tasks&&p.tasks.length){for(;q--;)p.tasks[q].cancel();delete p.tasks}p=y[1];E.un(k,n,E.extAdapter?y[3]:p);p&&k.addEventListener&&"mousewheel"==n&&k.removeEventListener("DOMMouseScroll",p,!1);p&&k==C&&"mousedown"==n&&Ext.EventManager.stoppedMouseDownEvent.removeListener(p);u.splice(z,1);0===u.length&&delete Ext.elCache[t].events[n];for(q in Ext.elCache[t].events)return!1;Ext.elCache[t].events={};return!1}},removeAll:function(k){k=
Ext.getDom(k);var n=b(k),p=(Ext.elCache[n]||{}).events||{},q,t,u;for(t in p)if(p.hasOwnProperty(t)){var w=p[t];var y=0;for(q=w.length;y<q;y++){var z=w[y];z[4]&&z[4].cancel();if(z[0].tasks&&(u=z[0].tasks.length)){for(;u--;)z[0].tasks[u].cancel();delete z.tasks}var A=z[1];E.un(k,t,E.extAdapter?z[3]:A);k.addEventListener&&A&&"mousewheel"==t&&k.removeEventListener("DOMMouseScroll",A,!1);A&&k==C&&"mousedown"==t&&Ext.EventManager.stoppedMouseDownEvent.removeListener(A)}}Ext.elCache[n]&&(Ext.elCache[n].events=
{})},getListeners:function(k,n){k=Ext.getDom(k);k=b(k);return(k=(Ext.elCache[k]||{}).events||{},k[n])?k[n]:null},purgeElement:function(k,n,p){k=Ext.getDom(k);var q=b(k);q=(Ext.elCache[q]||{}).events||{};var t;if(p){if(q&&q.hasOwnProperty(p)){var u=q[p];q=0;for(t=u.length;q<t;q++)Ext.EventManager.removeListener(k,p,u[q][0])}}else Ext.EventManager.removeAll(k);if(n&&k&&k.childNodes)for(q=0,t=k.childNodes.length;q<t;q++)Ext.EventManager.purgeElement(k.childNodes[q],n,p)},_unload:function(){for(var k in Ext.elCache)Ext.EventManager.removeAll(k);
delete Ext.elCache;delete Ext.Element._flyweights;var n,p,q=Ext.lib.Ajax;"object"==typeof q.conn?n=q.conn:n={};for(p in n)(k=n[p])&&q.abort({conn:k,tId:p})},onDocumentReady:function(k,n,p){Ext.isReady?(v||=new Ext.util.Event,v.addListener(k,n,p),v.fire(),v.listeners=[]):(v||(v||=new Ext.util.Event,K&&C.addEventListener("DOMContentLoaded",g,!1),Ext.isIE?d()||(d.bindIE=!0,C.attachEvent("onreadystatechange",d)):Ext.isOpera?"complete"==C.readyState&&e()||C.addEventListener("DOMContentLoaded",f,!1):Ext.isWebKit&&
d(),E.on(H,"load",g)),p=p||{},p.delay=p.delay||1,v.addListener(k,n,p))},fireDocReady:g};F.on=F.addListener;F.un=F.removeListener;F.stoppedMouseDownEvent=new Ext.util.Event;return F}())}();//# sourceMappingURL=extjs-mod.js.map
