(function(){var a=Ext.Button.prototype.onClick;Ext.override(Ext.Button,{onClick:function(b){b=new Ext.EventObjectImpl(b);this.focus();a.call(this,b);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 a=Ext.Component.prototype.initComponent,b=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));a.apply(this,arguments)},getStateName:function(){var c=this.statefulName;c||(c=this.getXType().match(/(?:zarafa\.)?(.*)/)[1]);return c},destroy:function(){if(this.plugins)for(var c in this.plugins){var a=
this.plugins[c];a instanceof Ext.util.Observable&&a.purgeListeners()}!1!==this.stateful&&Ext.state.Manager.unregister(this);b.apply(this,arguments)}})})();(function(){Ext.override(Ext.Container,{bufferResize:!1})})();
(function(){var a=Ext.DataView.prototype.onClick,b=Ext.DataView.prototype.initComponent;Ext.override(Ext.DataView,{initComponent:function(){b.apply(this,arguments);this.addEvents("extraitemclick","beforeextraitemclick")},onClick:function(c){var b=!1,e;this.extraItemSelector&&(b=c.getTarget(this.extraItemSelector,this.getTemplateTarget()));b?(e=this.indexOf(b),!1!==this.onExtraItemClick(b,e,c)&&this.fireEvent("extraitemclick",this,e,b,c)):a.apply(this,arguments)},onExtraItemClick:function(c,a,b){return!1===
this.fireEvent("beforeextraitemclick",this,a,c,b)?!1:!0}})})();
(function(){var a=Ext.DatePicker.prototype.onRender,b=Ext.DatePicker.prototype.update,c=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(){a.apply(this,arguments);this.getEl().down("table").applyStyles({width:this.width})},update:function(c,a){if(!0===this.showWeekNumber&&!Ext.isDefined(this.weekCells)){var d=this.el.child("table.x-date-inner",!0),e=d.tHead.rows[0],f={tag:"th",html:"<span>"+_("Wk")+"</span>"};Ext.DomHelper.insertFirst(e,f);d=d.tBodies[0];e={tag:"td",cls:"x-date-weeknumber",html:"<a><em><span></span></em></a>"};for(f=0;f<d.rows.length;f++)Ext.DomHelper.insertFirst(d.rows[f],e);this.weekCells=
this.el.select("td.x-date-weeknumber a em span")}b.apply(this,arguments);if(!0===this.showWeekNumber)for(var d=this.weekCells.elements,e=c.getFirstDateOfMonth(),f=0,g=d.length;f<g;f++)d[f].innerHTML=e.getWeekOfYear(),e=e.add(Date.DAY,7)},beforeDestroy:function(){c.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(a){Ext.isEmpty(a)||"auto"==a?a=a||"":isNaN(a)?a="":/\d+(px|em|%|en|ex|pt|in|cm|mm|pc)$/i.test(a)||(a+=this.defaultUnit||"px");return a},swallowEvent:function(a,c){var b=this,e=!0===c?this.swallowEventHandlerPreventDefault:this.swallowEventHandler;if(Ext.isArray(a))return Ext.each(a,function(c){b.on(c,e,this)}),b;b.on(a,e,this);return b},swallowEventHandler:function(a){a.stopPropagation()},swallowEventHandlerPreventDefault:function(a){a.stopPropagation();
a.preventDefault()},spitOutEvent:function(a,c){var b=this,e=!0===c?this.swallowEventHandlerPreventDefault:this.swallowEventHandler;if(Ext.isArray(a))return Ext.each(a,function(a){b.un(a,e,this)}),b;b.un(a,e,this);return b},selectable:function(){this.dom.unselectable="off";return this.spitOutEvent("selectstart",!0).removeClass("x-unselectable")},clearClass:function(){this.dom.className=""},fireEvent:function(a,c){var b=/^(scroll|resize|load|unload|abort|error)$/,e=/^(focus|blur|select|change|reset|keypress|keydown|keyup)$/,
f=/^(wheel)$/;a=a.toLowerCase();a.replace(/^on/,"");var g;/^(click|dblclick|mousedown|mouseup|mouseover|mouseout|contextmenu)$/.test(a)?(g=document.createEvent("MouseEvents"),g.initMouseEvent(a,!0,!0,window,"dblclick"==a?2:1,c.screenX,c.screenY,c.clientX,c.clientY,c.ctrlKey,c.altKey,c.shiftKey,c.metaKey,0,null)):e.test(a)?(g=document.createEvent("UIEvents"),g.initUIEvent(a,!0,!0,window,0)):b.test(a)?(g=document.createEvent("HTMLEvents"),g.initEvent(a,!0,!0)):f.test(a)&&(g=new WheelEvent("wheel",c));
g&&this.dom.dispatchEvent(g)},getAlignToXY:function(a,c,d){a=Ext.get(a);if(!a||!a.dom)throw"Element.alignToXY with an element that doesn't exist";d=d||[0,0];c=(c&&"?"!=c?/-/.test(c)||""===c?c||"tl-bl":"tl-"+c:"tl-bl?").toLowerCase();var b=Zarafa.core.BrowserWindowMgr.getOwnerWindow(a),f,g,h,n=b.innerWidth-10,l=b.innerHeight-10,p,u,m,b=b.document,t=b.documentElement;m=b.body;b=(t.scrollLeft||m.scrollLeft||0)+5;t=(t.scrollTop||m.scrollTop||0)+5;h=c.match(/^([a-z]+)-([a-z]+)(\?)?$/);if(!h)throw"Element.alignTo with an invalid alignment "+
c;p=h[1];m=h[2];h=!!h[3];f=this.getAnchorXY(p,!0);g=a.getAnchorXY(m,!1);c=g[0]-f[0]+d[0];d=g[1]-f[1]+d[1];h&&(h=this.getWidth(),f=this.getHeight(),a=a.getRegion(),g=p.charAt(0),p=p.charAt(p.length-1),u=m.charAt(0),m=m.charAt(m.length-1),g="t"==g&&"b"==u||"b"==g&&"t"==u,m="r"==p&&"l"==m||"l"==p&&"r"==m,c+h>n+b&&(c=m?a.left-h:n+b-h),c<b&&(c=m?a.right:b),d+f>l+t&&(d=g?a.top-f:l+t-f),d<t&&(d=g?a.bottom:t));return[c,d]},adjustForConstraints:function(a,c,d){var b=Zarafa.core.BrowserWindowMgr.getActive();
return this.getConstrainToXY(c||b.document,!1,d,a)||a},getConstrainToXY:function(a,c,d,e){var b={top:0,left:0,bottom:0,right:0};return function(a,c,d,f){var e=Zarafa.core.BrowserWindowMgr.getActive();a=Ext.get(a);d=d?Ext.applyIf(d,b):b;var g,n=0,h=0;a.dom==e.document.body||a.dom==e.document?(g=e.innerWidth,e=e.innerHeight):(g=a.dom.clientWidth,e=a.dom.clientHeight,c||(h=a.getXY(),n=h[0],h=h[1]));a=a.getScroll();n+=d.left+a.left?a.left:0;h+=d.top+a.top?a.top:0;g-=d.right?d.right:0;e-=d.bottom?d.bottom:
0;d=n+g;g=h+e;f=f||(c?[this.getLeft(!0),this.getTop(!0)]:this.getXY());c=f[0];f=f[1];a=this.getConstrainOffset();e=this.dom.offsetWidth+a;a=this.dom.offsetHeight+a;var l=!1;c+e>d&&(c=d-e,l=!0);f+a>g&&(f=g-a,l=!0);c<n&&(c=n,l=!0);f<h&&(f=h,l=!0);return l?[c,f]:!1}}()});var a=Ext.Element.get;Ext.override(Ext.Element,{get:function(b){var c=null,d=Zarafa.core.BrowserWindowMgr.getActive();if(Ext.isDefined(d)&&"mainBrowserWindow"!==d.name&&"string"===typeof b)var e=d.document.getElementById(b),c=e?new Ext.Element(e):
e;null===c&&(c=a.apply(this,arguments));null===c&&"string"===typeof b?(e=Zarafa.core.BrowserWindowMgr.browserWindows,e.each(function(a){if(Ext.isDefined(a)&&"mainBrowserWindow"!==a.name&&a!==d&&(a=a.document.getElementById(b)))return c=new Ext.Element(a),!1})):(e=Zarafa.core.BrowserWindowMgr.browserWindows,Ext.isDefined(e)&&e.each(function(a){if(a.document===b){var d=function(){};d.prototype=Ext.Element.prototype;c=new d;c.dom=a.document}}));return c}});Ext.get=Ext.Element.prototype.get;Ext.Element.addMethods(function(){function a(a,
c){return c.charAt(1).toUpperCase()}function c(c){return e[c]||(e[c]="float"==c?d.cssFloat?"cssFloat":"styleFloat":c.replace(f,a))}var d=Ext.supports,e={},f=/(-[a-z])/gi,g=document.defaultView,h=/alpha\(opacity=(.*)\)/i;return{getStyle:function(){return g&&g.getComputedStyle?function(a){var b=this.dom,e,f,h;if(b==Zarafa.core.BrowserWindowMgr.getActive().document)return null;a=c(a);h=(e=b.style[a])?e:(f=g.getComputedStyle(b,""))?f[a]:null;"marginRight"!=a||"0px"==h||d.correctRightMargin||(e=b.style.display,
b.style.display="inline-block",h=g.getComputedStyle(b,"").marginRight,b.style.display=e);"backgroundColor"!=a||"rgba(0, 0, 0, 0)"!=h||d.correctTransparentColor||(h="transparent");return h}:function(a){var b=this.dom,d,e;if(b==document)return null;if("opacity"==a)return b.style.filter.match&&(d=b.style.filter.match(h))&&(a=parseFloat(d[1]),!isNaN(a))?a?a/100:0:1;a=c(a);return b.style[a]||((e=b.currentStyle)?e[a]:null)}}(),setStyle:function(a,b){var d,e;"object"!=typeof a&&(d={},d[a]=b,a=d);for(e in a)b=
a[e],"opacity"==e?this.setOpacity(b):this.dom.style[c(e)]=b;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 a=Ext.EventObject.setEvent;Ext.EventObject.setEvent=function(b){b=a.call(this,b);Ext.isMac&&b.ctrlKey&&!b.browserEvent.metaKey&&(b.ctrlKey=!1);Ext.isMac||(b.ctrlKey=b.browserEvent.ctrlKey||!1);return b}})();
(function(){Ext.Layer=function(a,b){a=a||{};var c=Ext.DomHelper,d=Zarafa.core.BrowserWindowMgr.getActive(),g=a.parentEl,d=g?Ext.getDom(g):d.document.body;b&&(this.dom=Ext.getDom(b));this.dom||(this.dom=c.append(d,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 a=Ext.Element.prototype,b=[];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=b.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),b.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 c=this.shadow;if(!this.updating&&this.isVisible()&&(c||this.useShim)){var b=this.getShim(),f=this.getWidth(),g=this.getHeight(),h=this.getLeft(!0),n=this.getTop(!0);c&&!this.shadowDisabled?(a&&!c.isVisible()?c.show(this):c.realign(h,n,f,g),b&&(a&&b.show(),a=c.el.getXY(),b=b.dom.style,c=c.el.getSize(),b.left=a[0]+"px",b.top=a[1]+"px",b.width=c.width+"px",
b.height=c.height+"px")):b&&(a&&b.show(),b.setSize(f,g),b.setLeftTop(h,n))}},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 c=Ext.lib.Dom.getViewWidth(),b=Ext.lib.Dom.getViewHeight(),
e=Ext.getDoc().getScroll(),f=this.getXY(),g=f[0],f=f[1],h=this.shadowOffset,n=this.dom.offsetWidth+h,l=this.dom.offsetHeight+h,p=!1;g+n>c+e.left&&(g=c-n-h,p=!0);f+l>b+e.top&&(f=b-l-h,p=!0);g<e.left&&(g=e.left,p=!0);f<e.top&&(f=e.top,p=!0);p&&(this.avoidY&&(c=this.avoidY,f<=c&&f+l>=c&&(f=c-l-5)),f=[g,f],this.storeXY(f),a.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?a.setXY.call(this,this.lastXY):this.lastLT&&a.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(c,b,e,f,g){c&&this.showAction();if(b&&c){var d=function(){this.sync(!0);f&&f()}.createDelegate(this);a.setVisible.call(this,!0,!0,e,d,g)}else c||this.hideUnders(!0),d=f,b&&(d=function(){this.hideAction();f&&f()}.createDelegate(this)),
a.setVisible.call(this,c,b,e,d,g),c?this.sync(!0):b||this.hideAction();return this},storeXY:function(a){delete this.lastLT;this.lastXY=a},storeLeftTop:function(a,b){delete this.lastXY;this.lastLT=[a,b]},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(c){this.storeLeftTop(c,
this.getTop(!0));a.setLeft.apply(this,arguments);this.sync();return this},setTop:function(c){this.storeLeftTop(this.getLeft(!0),c);a.setTop.apply(this,arguments);this.sync();return this},setLeftTop:function(c,b){this.storeLeftTop(c,b);a.setLeftTop.apply(this,arguments);this.sync();return this},setXY:function(c,b,e,f,g){this.fixDisplay();this.beforeAction();this.storeXY(c);f=this.createCB(f);a.setXY.call(this,c,b,e,f,g);b||f();return this},createCB:function(a){var b=this;return function(){b.constrainXY();
b.sync(!0);a&&a()}},setX:function(a,b,e,f,g){this.setXY([a,this.getY()],b,e,f,g);return this},setY:function(a,b,e,f,g){this.setXY([this.getX(),a],b,e,f,g);return this},setSize:function(b,d,e,f,g,h){this.beforeAction();g=this.createCB(g);a.setSize.call(this,b,d,e,f,g,h);e||g();return this},setWidth:function(b,d,e,f,g){this.beforeAction();f=this.createCB(f);a.setWidth.call(this,b,d,e,f,g);d||f();return this},setHeight:function(b,d,e,f,g){this.beforeAction();f=this.createCB(f);a.setHeight.call(this,
b,d,e,f,g);d||f();return this},setBounds:function(b,d,e,f,g,h,n,l){this.beforeAction();n=this.createCB(n);g?a.setBounds.call(this,b,d,e,f,g,h,n,l):(this.storeXY([b,d]),a.setXY.call(this,[b,d]),a.setSize.call(this,e,f,g,h,n,l),n());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(a){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(a){var b=Zarafa.core.BrowserWindowMgr.getActive();this.buttons[a].blur();this.dlg.isVisible()&&(this.dlg.hide(),this.handleHide(),Ext.callback(this.opt.fn,this.opt.scope||b,[a,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(a,b,c){this.opt&&!1!==this.opt.closable&&(this.dlg.hide(),
this.handleHide());c&&c.stopEvent()},updateButtons:function(a){var b=0,c;if(!a)return Ext.each(this.buttonNames,function(a){this.buttons[a].hide()},this),b;this.dlg.footer.dom.style.display="";Ext.iterate(this.buttons,function(d,e){(c=a[d])?(e.show(),e.setText(Ext.isString(c)?c:Ext.MessageBox.buttonText[d]),b+=e.getEl().getWidth()+15):e.hide()});return b},getDialog:function(a){if(this.dlg)return this.textboxEl.enableDisplayMode(),this.textareaEl.enableDisplayMode(),this.browserWindowsMessageBox.replace(this.activeWindowName,
Ext.copyTo({},this,this.browserWindowsMessageBoxProps)),this.dlg;var b=[];this.buttons={};Ext.each(this.buttonNames,function(a){b.push(this.buttons[a]=new Ext.Button({text:this.buttonText[a],handler:this.handleButton.createDelegate(this,[a]),hideMode:"offsets"}))},this);var c=Zarafa.core.BrowserWindowMgr.getActive();this.dlg=new Ext.Window({autoCreate:!0,title:a,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:b,enableOverflow:!1})});this.dlg.render(c.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);a=this.bodyEl.dom.childNodes[1];this.msgEl=Ext.get(a.firstChild);this.textboxEl=Ext.get(a.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(a.childNodes[2].childNodes[1]);this.textareaEl.enableDisplayMode();this.progressBar=
new Ext.ProgressBar({renderTo:this.bodyEl});this.bodyEl.createChild({cls:"x-clear"});this.browserWindowsMessageBox.add(c.name,Ext.copyTo({},this,this.browserWindowsMessageBoxProps));this.activeWindowName=c.name;return this.dlg},updateText:function(a){this.dlg.isVisible()||this.opt.width||this.dlg.setSize(this.maxWidth,100);this.msgEl.update(a?a+" ":"&#160;");var b=""!=this.iconCls?this.iconEl.getWidth()+this.iconEl.getMargins("lr"):0,c=this.msgEl.getWidth()+this.msgEl.getMargins("lr"),d=this.dlg.getFrameWidth("lr"),
e=this.dlg.body.getFrameWidth("lr"),c=Math.max(Math.min(this.opt.width||b+c+d+e,this.opt.maxWidth||this.maxWidth),Math.max(this.opt.minWidth||this.minWidth,this.bwidth||0));!0===this.opt.prompt&&this.activeTextEl.setWidth(c-b-d-e);!0!==this.opt.progress&&!0!==this.opt.wait||this.progressBar.setSize(c-b-d-e);Ext.isIE9m&&c==this.bwidth&&(c+=4);this.msgEl.update(a||"&#160;");this.dlg.setSize(c,"auto").center();return this},updateProgress:function(a,b,c){this.progressBar.updateProgress(a,b);c&&this.updateText(c);
return this},isVisible:function(){return this.dlg&&this.dlg.isVisible()},hide:function(){var a=this.dlg?this.dlg.activeGhost:null;if(this.isVisible()||a)this.dlg.hide(),this.handleHide(),a&&this.dlg.unghost(!1,!1);return this},show:function(a){this.isVisible()&&this.hide();this.opt=a;var b=this.getDialog(this.opt.title||"&#160;");this.opt.maxWidth||(this.opt.maxWidth=Math.max(Zarafa.core.BrowserWindowMgr.getOwnerWindow(b).innerWidth-20,200));b.setTitle(this.opt.title||"&#160;");var c=!1!==this.opt.closable&&
!0!==this.opt.progress&&!0!==this.opt.wait;b.tools.close.setDisplayed(c);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)b.focusEl=this.activeTextEl;else{a=this.opt.buttons;var d=null;a&&a.ok?d=this.buttons.ok:a&&a.yes&&(d=this.buttons.yes);d&&(b.focusEl=d)}Ext.isDefined(this.opt.iconCls)&&b.setIconClass(this.opt.iconCls);if(Ext.isDefined(this.opt.icon)){a=this.opt.icon;switch(a){case this.WARNING:a="";b.el.addClass(this.WARNING_CLS);console.warn("Deprecated warning icon used");break;case this.INFO:case this.QUESTION:a="";console.warn("Deprecated info/question icon used");break;
case this.ERROR:a="",b.el.addClass(this.ERROR_CLS),console.warn("Deprecated error icon used")}this.setIcon(a)}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&&b.el.addClass(this.opt.cls);b.proxyDrag=!0===this.opt.proxyDrag;b.modal=!1!==this.opt.modal;b.mask=!1!==
this.opt.modal?this.mask:!1;b.isVisible()||(Zarafa.core.BrowserWindowMgr.getActive().document.body.appendChild(this.dlg.el.dom),b.setAnimateTarget(this.opt.animEl),b.on("show",function(){!0===c?b.keyMap.enable():b.keyMap.disable()},this,{single:!0}),b.show(this.opt.animEl));!0===this.opt.wait&&this.progressBar.wait(this.opt.waitConfig);return this},setIcon:function(a){if(this.dlg)return this.bufferIcon=void 0,a&&""!=a?(this.iconEl.removeClass("x-hidden"),this.iconEl.replaceClass(this.iconCls,a),this.bodyEl.addClass("x-dlg-icon"),
this.iconCls=a):(this.iconEl.replaceClass(this.iconCls,"x-hidden"),this.bodyEl.removeClass("x-dlg-icon"),this.iconCls=""),this;this.bufferIcon=a},progress:function(a,b,c){this.show({title:a,msg:b,buttons:!1,progress:!0,closable:!1,minWidth:this.minProgressWidth,progressText:c});return this},wait:function(a,b,c){this.show({title:b,msg:a,buttons:!1,closable:!1,wait:!0,modal:!0,minWidth:this.minProgressWidth,waitConfig:c});return this},alert:function(a,b,c,d){this.show({title:a,msg:b,buttons:this.OK,
fn:c,scope:d,minWidth:this.minWidth});return this},confirm:function(a,b,c,d){this.show({title:a,msg:b,buttons:this.YESNO,fn:c,scope:d,icon:this.QUESTION,minWidth:this.minWidth});return this},prompt:function(a,b,c,d,e,f){this.show({title:a,msg:b,buttons:this.OKCANCEL,fn:c,minWidth:this.minPromptWidth,scope:d,prompt:!0,multiline:e,value:f});return this},setActiveWindowMessageBox:function(a){var b=this.browserWindowsMessageBox.get(a);if(b)this.browserWindowsMessageBox.replace(this.activeWindowName,Ext.copyTo({},
this,this.browserWindowsMessageBoxProps)),Ext.apply(this,b);else{var c={};Ext.each(this.browserWindowsMessageBoxProps,function(a){c[a]=void 0});Ext.apply(this,c)}this.activeWindowName=a},removeBrowserWindowMessageBox:function(a){this.browserWindowsMessageBox.removeKey(a)}});Ext.MessageBox=new Ext.MessageBox;Ext.Msg=Ext.MessageBox;
(function(){var a=Ext.QuickTip.prototype.register,b=Ext.QuickTip.prototype.getTipCfg;Ext.override(Ext.QuickTip,{register:function(b){b.title=Ext.util.Format.htmlEncode(b.title);b.text=Ext.util.Format.htmlEncode(b.text);a.apply(this,arguments)},getTipCfg:function(a){return Ext.util.Format.htmlEncode(b.apply(this,arguments))}})})();Ext.namespace("Ext.QuickTips");
Ext.QuickTips=Ext.extend(Object,{browserQuickTips:void 0,tip:void 0,disabled:!1,constructor:function(a){this.browserQuickTips=new Ext.util.MixedCollection},init:function(a){if(Ext.isReady)this.tip=new Ext.QuickTip({elements:"header,body",disabled:this.disabled}),!1!==a&&this.tip.render(Ext.getBody()),this.browserQuickTips.add(Zarafa.core.BrowserWindowMgr.getOwnerWindow(this.tip).name,this.tip);else Ext.onReady(function(){Ext.QuickTips.init(a)})},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 a=Ext.Tip.prototype.doAutoWidth;Ext.override(Ext.Tip,{doAutoWidth:function(){a.call(this,Ext.isIE?1:0)}})})();(function(){var a=Ext.Toolbar.TextItem.prototype.onRender;Ext.override(Ext.Toolbar.TextItem,{onRender:function(b,c){a.apply(this,arguments);this.el&&this.el.unselectable()}})})();
(function(){var a=Ext.Window.prototype.beforeShow,b=Ext.Window.prototype.onWindowResize;Ext.override(Ext.Window,{browserWindow:void 0,beforeShow:function(){a.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(){b.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 a=Ext.data.Node.prototype.appendChild,b=Ext.data.Node.prototype.removeChild;Ext.override(Ext.data.Node,{appendChild:function(b){this.leaf=!1;return a.apply(this,arguments)},removeChild:function(a,d){var c=b.apply(this,arguments);this.hasChildNodes()||(this.leaf=!0);return c}})})();
(function(){Ext.override(Ext.data.Record,{getSenderInitials:function(){var a=this.get("sent_representing_name")||this.get("display_name")||this.get("sender_name");return Ext.isEmpty(a)?Ext.isEmpty(this.get("smtp_address"))?"":(a=this.get("smtp_address").charAt(0),a.toUpperCase()):(a=a.replace(/\(.*?\)/g,"").trim().split(" "),a=1<a.length?a.shift().charAt(0)+a.pop().charAt(0):a.shift().charAt(0),a.toUpperCase())}})})();
(function(){var a=function(a){return void 0!==a&&null!==a&&""!==a?parseInt(a,10):this.useNull?null:0};Ext.data.Types.INT.convert=a;Ext.data.Types.INTEGER.convert=a;a=function(a){return void 0!==a&&null!==a&&""!==a?parseFloat(a,10):this.useNull?null:0};Ext.data.Types.FLOAT.convert=a;Ext.data.Types.NUMBER.convert=a})();(function(){var a=Ext.dd.DD.prototype.unreg;Ext.override(Ext.dd.DD,{scroll:!1,unreg:function(){a.apply(this,arguments);this==this.DDM.dragCurrent&&(this.DDM.dragCurrent=null)}})})();
(function(){var a=Ext.dd.DragDropMgr.getLocation;Ext.apply(Ext.dd.DragDropMgr,{getGroupDDById:function(a,c){return this.ids[a]&&this.ids[a][c]?this.ids[a][c]:null},getLocation:function(b){var c=b.getEl(),d=a.apply(this,arguments);if(c&&d)for(c=Ext.get(c.parentNode);c&&d;)c.isScrollable()&&(d=d.intersect(c.getRegion())),c=c.parent();return d},getZIndex:function(a){return-1},initEvents:function(a){Ext.EventManager.on(a.document,"mousemove",this.handleMouseMove,this,!0);Ext.EventManager.on(a.document,
"mouseup",this.handleMouseUp,this,!0)},isOverTarget:function(a,c,d){var b=this.locationCache[c.id];b&&this.useCache||(b=this.getLocation(c),this.locationCache[c.id]=b);if(!b)return!1;c.cursorIsOver=b.contains(a);var f=this.dragCurrent;if(!f||!f.getTargetCoord||!d&&!f.constrainX&&!f.constrainY)return c.cursorIsOver?(d=Zarafa.core.BrowserWindowMgr.getActive(),c=Zarafa.core.BrowserWindowMgr.getOwnerWindow(c),d===c):!1;c.overlap=null;a=f.getTargetCoord(a.x,a.y);f=f.getDragEl();return(b=(new Ext.lib.Region(a.y,
a.x+f.offsetWidth,a.y+f.offsetHeight,a.x)).intersect(b))?(c.overlap=b,d?!0:c.cursorIsOver):!1}})})();
(function(){var a=Ext.dd.DragSource.prototype.onDragOver,b=Ext.dd.DragSource.prototype.onDragOut,c=Ext.dd.DragSource.prototype.onDragDrop;Ext.override(Ext.dd.DragSource,{onDragEnter:function(a,b){if(this.cachedTarget)this.onDragOut(a,this.cachedTarget.id);var c;if((this.cachedTarget=c=this.ddGroup?Ext.dd.DragDropMgr.getGroupDDById(this.ddGroup,b):Ext.dd.DragDropMgr.getDDById(b))&&!1!==this.beforeDragEnter(c,a,b)){if(c.isNotifyTarget){var d=c.notifyEnter(this,a,this.dragData);this.proxy.setStatus(d)}else this.proxy.setStatus(this.dropAllowed);
this.afterDragEnter&&this.afterDragEnter(c,a,b)}},onDragOver:function(b,c){if(!this.cachedTarget)this.onDragEnter(b,c);this.cachedTarget=this.cachedTarget||Ext.dd.DragDropMgr.getGroupDDById(this.ddGroup,c);return a.apply(this,arguments)},onDragOut:function(a,c){if(this.cachedTarget)return b.apply(this,arguments)},onDragDrop:function(a,b){if(this.cachedTarget)return c.apply(this,arguments)}})})();
(function(){Ext.override(Ext.form.BasicForm,{updateRecord:function(a){a.beginEdit();var b,c;a.fields.each(function(d){if(b=this.findField(d.name))c=b.getValue(),!1!==Ext.type(c)&&c.getGroupValue?c=c.getGroupValue():!0!==b.isSingleValued&&b.eachItem&&(c=[],b.eachItem(function(a){c.push(a.getValue())})),a.set(d.name,c)},this);a.endEdit(this.isValid());return this},setValues:function(a){if(Ext.isArray(a))for(var b=0,c=a.length;b<c;b++){var d=a[b],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(c in a)Ext.isFunction(a[c])||!(b=this.findField(c))||b.hasFocus&&b.originalValue!=b.el.dom.value||(b.setValue(a[c]),this.trackResetOnLoad&&(b.originalValue=b.getValue()));return this}})})();
(function(){var a=Ext.form.Checkbox.prototype.onRender;Ext.override(Ext.form.Checkbox,{onRender:function(b,c){a.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 a=Ext.form.ComboBox.prototype.initList,b=Ext.form.ComboBox.prototype.expand,c=Ext.form.ComboBox.prototype.initComponent;Ext.override(Ext.form.ComboBox,{defaultAutoCreate:{tag:"input",type:"text",size:"24",autocomplete:"off",spellcheck:"true"},initComponent:function(){c.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>");a.apply(this,arguments)},expand:function(){!this.isExpanded()&&
this.hasFocus&&!1!==this.fireEvent("beforeexpand",this)&&b.apply(this,arguments)},getListParent:function(){var a=this.getEl()?this.getEl().dom.ownerDocument:void 0;return a?a.body:document.body},disableLabel:function(a){this.label&&this.label.toggleClass("x-item-disabled")}})})();
(function(){var a=Ext.form.DateField.prototype.getValue,b=Ext.form.DateField.prototype.initComponent,c=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"));b.apply(this,arguments);this.addEvents("selectnow");if(0>this.startDay||this.startDay>=Date.dayNames.length)this.startDay=0},getValue:function(){var b=
a.apply(this,arguments);return Ext.isEmpty(b)?null:b},beforeBlur:function(){var a=this.getRawValue();if(!Ext.isEmpty(a)){var b=Zarafa.core.Util.getDateByLanguageFormat(a,void 0,this.format),a=new Date,c=b[0],d=b[1],b=b[2];a.setFullYear(b?b:a.getFullYear(),d?d-1:a.getMonth(),c?c:a.getDate());Ext.isDefined(a)&&Ext.isDate(a)&&(a>this.maxValue?a=this.maxValue:a<this.minValue&&(a=this.minValue),this.setValue(a))}},processValue:function(a){return Ext.isEmpty(a)?"":a},onTriggerClick:function(){this.showNow&&
null==this.menu&&(this.menu=new Ext.menu.DateMenu({hideOnClick:!1,focusOnSelect:!1,initialConfig:{showNow:!0,todayText:_("Now")}}));c.apply(this,arguments);this.showNow&&this.menu.relayEvents(this.menu.picker,["selectnow"])},menuEvents:function(a){d.apply(this,arguments);if(this.showNow)this.menu[a]("selectnow",this.onSelectnow,this)},onSelectnow:function(a,b){this.fireEvent("selectnow",this,b)}})})();(function(){Ext.override(Ext.form.DisplayField,{cls:"x-form-item"})})();
(function(){Ext.override(Ext.form.FormPanel,{labelAlign:"right"})})();(function(){var a=Ext.form.Label.prototype.onRender;Ext.override(Ext.form.Label,{cls:"x-form-item-label",onRender:function(b,c){a.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 a=/^(100?|\d?\d)?%?$/,b=/^[1-9]\d*$/i,c=/^(\w+)([\-+.\']+[\w]+)*@(\w[\-\w]*\.){1,5}([A-Za-z]){2,10}$/;Ext.apply(Ext.form.VTypes,{percentage:function(b){return a.test(b)},percentageText:_("Value must be between 0% to 100%"),naturalInteger:function(a){return b.test(a)},naturalIntegerText:_("Number must be higher than zero"),email:function(a){return c.test(a)}})})();
(function(){var a=Ext.grid.ColumnModel.prototype.setColumnWidth;Ext.override(Ext.grid.ColumnModel,{setColumnWidth:function(b,c,d){isFinite(c)&&a.apply(this,arguments)}})})();
(function(){var a=Ext.grid.GridPanel.prototype.onClick;Ext.override(Ext.grid.GridPanel,{onClick:function(b){a.apply(this,arguments);var c=b.getTarget();"INPUT"!==c.tagName&&"x-grid-group-title"!==c.className&&"x-grid-group-hd"!==c.className&&this.view.focusEl.focus()},reconfigure:function(a,c){!1!==this.stateful&&c!==this.colModel&&this.mun(this.colModel,"hiddenchange",this.saveState,this);var b=this.rendered;b&&this.loadMask&&(this.loadMask.destroy(),this.loadMask=new Ext.LoadMask(this.bwrap,Ext.apply({},
{store:a},this.initialConfig.loadMask)));this.view&&this.view.initData(a,c);this.store=a;this.colModel=c;!1!==this.stateful&&(this.initStateEvents(),this.initState());b&&this.view.refresh(!0);this.fireEvent("reconfigure",this,a,c)}})})();
(function(){var a=Ext.grid.GridView.prototype.onColConfigChange,b=Ext.grid.GridView.prototype.initTemplates;Ext.override(Ext.grid.GridView,{getColumnWidth:function(a){a=this.cm.getColumnWidth(a);var b=this.borderWidth;return Ext.isNumber(a)?Ext.isBorderBox?a+"px":Math.max(a-b,0)+"px":a},onColConfigChange:function(){var b=this.grid;!1!==b.stateful&&b.initState();a.apply(this,arguments)},initTemplates:function(){b.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,b=this.templates,e=b.hcell,f,g=a.getColumnCount(),h=g-1,n=[],l;for(l=0;l<g;l++)f=0==l?"x-grid3-cell-first ":
l==h?"x-grid3-cell-last ":"",f={id:a.getColumnId(l),value:a.getColumnHeader(l)||"",style:this.getColumnStyle(l,!0),css:f,tooltip:this.getColumnTooltip(l),cls:a.getColumnAt(l).headerCls||""},"right"==a.config[l].align?f.istyle="padding-right: 16px;":delete f.istyle,n[l]=e.apply(f);return b.header.apply({cells:n.join(""),tstyle:String.format("width: {0};",this.getTotalWidth())})}})})();
(function(){var a=navigator.userAgent.toLowerCase(),b=!Ext.isOpera&&(/msie/.test(a)||/trident/.test(a)),c=Ext.getDom;Ext.apply(Ext,{isIE:b,isIE10:b&&/msie 10/.test(a),isIE11:b&&/rv:11/.test(a),isEdge:/Edge\/\d./i.test(navigator.userAgent),clone:function(a){if(null===a||void 0===a)return a;if(a.nodeType&&a.cloneNode)return a.cloneNode(!0);var b=Object.prototype.toString.call(a);if("[object Date]"===b)return new Date(a.getTime());var c;if("[object Array]"===b)for(b=a.length,c=[];b--;)c[b]=Ext.clone(a[b]);
else if("[object Object]"===b&&a.constructor===Object){c={};for(var d in a)c[d]=Ext.clone(a[d])}return c||a},isArray:function(a){return Array.isArray(a)},getDom:function(a){var b=null,d=Zarafa.core.BrowserWindowMgr.getActive();Ext.isDefined(d)&&"mainBrowserWindow"!==d.name&&"string"===typeof a&&(b=d.document.getElementById(a));null===b&&(b=c.apply(this,arguments));if(null===b&&"string"===typeof a){var g=Zarafa.core.BrowserWindowMgr.browserWindows;Ext.isDefined(g)&&g.each(function(c){var f=c.document.getElementById(a);
"mainBrowserWindow"!==c.name&&c!==d&&null!==f&&(b=f)})}return b},getBody:function(){var a=Zarafa.core.BrowserWindowMgr.getActive(),a=Ext.isDefined(a)?a.document:document;return Ext.get(a.body||a.documentElement)},getDoc:function(){var a=Zarafa.core.BrowserWindowMgr.getActive(),a=Ext.isDefined(a)?a.document:document;return Ext.get(a)}})})();
(function(){var a=Ext.layout.BorderLayout.Region.prototype.beforeCollapse,b=Ext.layout.BorderLayout.Region.prototype.onExpand;Ext.override(Ext.layout.BorderLayout.Region,{beforeCollapse:function(){this.splitEl&&this.splitEl.addClass("x-hide-display");a.apply(this,arguments)},onExpand:function(){this.splitEl&&this.splitEl.removeClass("x-hide-display");b.apply(this,arguments)}})})();
(function(){var a=Ext.layout.ToolbarLayout.prototype.configureItem,b=Ext.layout.ToolbarLayout.prototype.hideItem,c=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(a,b){d.apply(this,arguments);a.items.each(function(a){Ext.isFunction(a.doLayout)&&a.doLayout()},this);this.overflowTabIndex&&this.more&&Ext.get(this.more.el).child("button").set({tabIndex:this.overflowTabIndex})},
configureItem:function(b){var c=this.container,d=c.getLayoutTarget();a.apply(this,arguments);b.on("show",function(a){if(!0!==a.xtbHidden)this.onLayout(c,d)},this);b.on("hide",function(a){if(!0!==a.xtbHidden)this.onLayout(c,d)},this)},hideItem:function(a){var c=this;b.apply(this,arguments);a.xtbOrigShow=a.show;a.show=function(){a.xtbOrigShow(!0);a.xtbWidth=a.getPositionEl().dom.parentNode.offsetWidth;a.xtbOrigHide(!1)};a.xtbOrigHide=a.hide;a.hide=function(){c.unhideItem(a);a.hide()}},unhideItem:function(a){a.show=
a.xtbOrigShow;delete a.xtbOrigShow;a.hide=a.xtbOrigHide;delete a.xtbOrigHide;delete a.xtbWidth;c.apply(this,arguments)},addComponentToMenu:function(a,b){if(!0===b.xtbHidden||!0!==b.hidden)Ext.isDefined(b.menu)&&b.splitOnMoreMenu?Ext.each(b.menu.items.items,function(b){var c=this.createMenuConfig(b);b.isXType("menucheckitem")&&(c.xtype=b.xtype,b.model.store.hasFilterApplied&&(c.iconCls="",c.checked=!0));a.add(c)},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 a=this.insertCell(this.more,this.extrasTr,100);this.more.render(a)}},afterMoreButtonRender:function(a){a.menu=this.moreMenu},onBeforeShowMoreMenu:function(a){this.beforeMoreShow(a);a.items.each(function(a){Ext.isFunction(a.beforeShow)&&a.beforeShow.call(a.scope||
a,a)},this)}})})();(function(){var a=Ext.layout.boxOverflow.Menu.prototype.addComponentToMenu;Ext.override(Ext.layout.boxOverflow.Menu,{addComponentToMenu:function(b,c){!0!==c.xtbHidden&&!0===c.hidden||a.apply(this,arguments)}})})();
(function(){var a=Ext.menu.Menu.prototype.constructor;Ext.override(Ext.menu.Menu,{constructor:function(){a.apply(this,arguments);this.on("hide",this.onMenuHide,this)},onLoad:function(a,c,d){var b=[];Ext.each(this.records,function(c){(c=a.getById(c.id))?b.push(c):this.destroy()},this);this.records=b},onMenuHide:function(a){Ext.isDefined(a.ownerCt)||Ext.isDefined(a.parentMenu)||!a.autoDestroy||a.destroy()}})})();
(function(){Ext.apply(Ext.state.Manager,{components:new Ext.util.MixedCollection(!1,function(a){return a.getStateId()}),register:function(a){this.components.add(a)},unregister:function(a){this.components.remove(a)},getComponent:function(a){return this.components.get(a)}})})();
(function(){Ext.override(Ext.tree.DefaultSelectionModel,{select:function(a,b,c){if(!Ext.fly(a.ui.wrap).isVisible()&&b)return b.call(this,a);b=this.selNode;if(a==b)if(c||!Ext.isDefined(c))a.ui.onSelectedChange(!0);else a.ui.addClass("x-tree-selected");else if(!1!==this.fireEvent("beforeselect",this,a,b)){if(b&&b.ui)b.ui.onSelectedChange(!1);this.selNode=a;a.ui.onSelectedChange(!0);this.fireEvent("selectionchange",this,a,b)}return a}})})();
(function(){var a=Ext.tree.TreeEditor.prototype.bindScroll,b=Ext.tree.TreeEditor.prototype.fitToTree;Ext.override(Ext.tree.TreeEditor,{fitToTree:function(){this.tree&&!0!==this.tree.isDestroyed&&b.apply(this,arguments)},bindScroll:function(){this.tree&&!0!==this.tree.isDestroyed&&a.apply(this,arguments)}})})();(function(){Ext.override(Ext.tree.TreeSorter,{doSort:function(a){if(a.childNodes){var b=document.activeElement;a.sort(this.sortFn);b&&"IFRAME"!==b.tagName&&b.focus()}}})})();
(function(){Ext.apply(Ext.util.Format,{fileSize:function(a){Ext.isNumber(a)||(a=0);if(1024>a)return String.format(ngettext("{0} byte","{0} bytes",a),a);a=parseFloat((a/1024).toFixed(1));if(1024>a)return String.format(ngettext("{0} KB","{0} KB",a),a);a=parseFloat((a/1024).toFixed(1));if(1024>a)return String.format(ngettext("{0} MB","{0} MB",a),a);a=parseFloat((a/1024).toFixed(1));if(1024>a)return String.format(ngettext("{0} GB","{0} GB",a),a);a=parseFloat((a/1024).toFixed(1));return String.format(ngettext("{0} TB",
"{0} TB",a),a)},percentage:function(a,b){Ext.isDefined(b)||(b=2);return(100*a).toFixed(b)+"%"},duration:function(a,b){b=Ext.isDefined(b)?b:0;if(60>a)return String.format(ngettext("{0} minute","{0} minutes",a),a);a=parseFloat((a/60).toFixed(b));if(24>a)return String.format(ngettext("{0} hour","{0} hours",a),a);a=parseFloat((a/24).toFixed(b));if(7>a)return String.format(ngettext("{0} day","{0} days",a),a);a=parseFloat((a/7).toFixed(b));return String.format(ngettext("{0} week","{0} weeks",a),a)},indent:function(a,
b){for(var c=(Ext.isDefined(a)?a:1)*(Ext.isDefined(b)?b:4),d="",e=0;e<c;e++)d+="&nbsp;";return d},elide:function(a,b,c,d){d=d?"..":"...";b=b||0;c=Ext.isDefined(c)?c:b;return 0===b&&0===c?a:a&&a.length>b+c?a.substr(0,b)+d+a.substr(a.length-c):a},htmlEncodeUndef:function(a){return this.htmlEncode(this.undef.apply(this,arguments))},htmlEncodeDefaultValue:function(a,b){return this.htmlEncode(this.defaultValue.apply(this,arguments))},htmlEncodeElide:function(a,b,c,d){return this.htmlEncode(this.elide.apply(this,
arguments))},htmlEncodeEllipsis:function(a,b,c){return this.htmlEncode(this.ellipsis.apply(this,arguments))},basename:function(a){return a.split("\\").pop()},htmlEncodeBasename:function(a){return this.htmlEncode(this.basename.apply(this,arguments))},sensitivityString:function(a){return Zarafa.core.mapi.Sensitivity.getDisplayName(a)},importanceString:function(a){return Zarafa.core.mapi.Importance.getDisplayName(a)},meetingStatusString:function(a){return Zarafa.core.mapi.MeetingStatus.getDisplayName(a)},
responseStatusString:function(a){return Zarafa.core.mapi.ResponseStatus.getDisplayName(a)},taskStatusString:function(a){return Zarafa.core.mapi.TaskStatus.getDisplayName(a)},busyStatusString:function(a){return Zarafa.core.mapi.BusyStatus.getDisplayName(a)},formatDefaultTimeString:function(a,b){if(a)return a.formatDefaultTime(b)},getNiceFormat:function(a,b){if(a)return a.getNiceFormat(b)}})})();
(function(){Ext.override(Ext.ux.Spinner,{doRender:function(a,b){var c=this.el=this.field.getEl(),d=this.field;d.wrap?this.wrap=d.wrap.addClass("x-form-field-wrap"):d.wrap=this.wrap=c.wrap({cls:"x-form-field-wrap"});this.trigger=this.wrap.createChild({tag:"img",src:Ext.BLANK_IMAGE_URL,cls:"x-form-trigger "+this.triggerClass});d.width||this.wrap.setWidth(c.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(d.boxLabel)||this.wrap.createChild({tag:"label",htmlFor:this.el.id,cls:"x-form-cb-label",html:d.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(a){a.preventDefault();this.onSpinUp()},down:function(a){a.preventDefault();this.onSpinDown()},pageUp:function(a){a.preventDefault();this.onSpinUpAlternate()},pageDown:function(a){a.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(a,b){if(!Ext.isDefined(b))return a;var c=a.indexOf(b);if(-1==c)return a;for(var d=c-1;" "==a[d]&&0<=d;)d--;for(c+=b.length;" "==a[c]&&c<a.length;)c++;return[a.substr(0,d+1),a.substr(c)]},MultiSplitTranslation:function(a,b){Ext.isArray(b)||(b=[b]);var c=new Ext.util.MixedCollection;c.add(a);for(var d=0;d<b.length;d++)c.each(function(a,f){var e=Zarafa.util.Translations.SplitTranslation(a,b[d]);if(!Ext.isArray(e))return!0;
c.removeAt(f);Ext.isEmpty(e[0])||(c.insert(f,e[0]),f++);c.insert(f,b[d]);f++;Ext.isEmpty(e[1])||c.insert(f,e[1]);return!1});return c.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 a(a){var b=!1,c=0,d=z.length,e=!1,f;if(a){if(a.getElementById||a.navigator){for(;c<d;++c){f=z[c];try{if(f.el===a){b=f.id;break}}catch(E){}}b||(b=Ext.id(a),z.push({id:b,el:a}),e=!0)}else b=Ext.id(a);Ext.elCache[b]||(Ext.Element.addToCache(new Ext.Element(a),b),e&&(Ext.elCache[b].skipGC=!0))}return b}function b(b,c,d,e,f,g){b=Ext.getDom(b);var k=a(b),k=Ext.elCache[k].events,q;q=v.on(b,c,f);k[c]=k[c]||[];k[c].push([d,f,
g,q,e]);if(b.addEventListener&&"mousewheel"==c){var h=["DOMMouseScroll",f,!1];b.addEventListener.apply(b,h);Ext.EventManager.addListener(A,"unload",function(){b.removeEventListener.apply(b,h)})}b==r&&"mousedown"==c&&Ext.EventManager.stoppedMouseDownEvent.addListener(f)}function c(){if(window!=top)return!1;try{r.documentElement.doScroll("left")}catch(k){return!1}g();return!0}function d(a){if(Ext.isIE&&c())return!0;if("complete"==r.readyState)return g(),!0;x||(t=setTimeout(arguments.callee,2));return!1}
function e(a){B||(B=Ext.query("style, link[rel=stylesheet]"));if(B.length==r.styleSheets.length)return g(),!0;x||(t=setTimeout(arguments.callee,2));return!1}function f(a){r.removeEventListener("DOMContentLoaded",arguments.callee,!1);e()}function g(a){x||(x=!0,t&&clearTimeout(t),C&&r.removeEventListener("DOMContentLoaded",g,!1),Ext.isIE&&d.bindIE&&r.detachEvent("onreadystatechange",d),v.un(A,"load",arguments.callee));m&&!Ext.isReady&&(Ext.isReady=!0,m.fire(),m.listeners=[])}function h(a,b){return function(){var c=
Ext.toArray(arguments);b.target==Ext.EventObject.setEvent(c[0]).target&&a.apply(this,c)}}function n(a,b,c){return function(d){c.delay(b.buffer,a,null,[new Ext.EventObjectImpl(d)])}}function l(a,b,c,d,e){return function(f){Ext.EventManager.removeListener(b,c,d,e);a(f)}}function p(a,b,c){return function(d){var e=new Ext.util.DelayedTask(a);c.tasks||(c.tasks=[]);c.tasks.push(e);e.delay(b.delay||10,a,null,[new Ext.EventObjectImpl(d)])}}function u(a,c,d,e,f){function g(a){if(Ext){a=Ext.EventObject.setEvent(a);
var b;if(k.delegate){if(!(b=a.getTarget(k.delegate,q)))return}else b=a.target;k.stopEvent&&a.stopEvent();k.preventDefault&&a.preventDefault();k.stopPropagation&&a.stopPropagation();!1===k.normalized&&(a=a.browserEvent);e.call(f||q,a,b,k)}}var k=d&&"boolean"!=typeof d?d:{},q=Ext.getDom(a),y;e=e||k.fn;f=f||k.scope;if(!q)throw'Error listening for "'+c+'". Element "'+a+"\" doesn't exist.";k.target&&(g=h(g,k));k.delay&&(g=p(g,k,e));k.single&&(g=l(g,q,c,e,f));k.buffer&&(y=new Ext.util.DelayedTask(g),g=
n(g,k,y));b(q,c,e,y,g,f);return g}var m,t,x=!1,C=Ext.isGecko||Ext.isWebKit||Ext.isSafari,v=Ext.lib.Event,r=document,A=window,D=/^(?:scope|delay|buffer|single|stopEvent|preventDefault|stopPropagation|normalized|args|delegate)$/,z=[],B,w={addListener:function(a,b,c,d,e){if("object"==typeof b)for(var f in b)c=b[f],D.test(f)||(Ext.isFunction(c)?u(a,f,b,c,b.scope):u(a,f,c));else u(a,b,e,c,d)},removeListener:function(b,c,d,e){b=Ext.getDom(b);var f=a(b),g=b&&Ext.elCache[f].events[c]||[],k,h,q;k=0;for(h=
g.length;k<h;k++)if(Ext.isArray(q=g[k])&&q[0]==d&&(!e||q[2]==e)){q[4]&&q[4].cancel();if(e=d.tasks&&d.tasks.length){for(;e--;)d.tasks[e].cancel();delete d.tasks}d=q[1];v.un(b,c,v.extAdapter?q[3]:d);d&&b.addEventListener&&"mousewheel"==c&&b.removeEventListener("DOMMouseScroll",d,!1);d&&b==r&&"mousedown"==c&&Ext.EventManager.stoppedMouseDownEvent.removeListener(d);g.splice(k,1);0===g.length&&delete Ext.elCache[f].events[c];for(e in Ext.elCache[f].events)return!1;Ext.elCache[f].events={};return!1}},removeAll:function(b){b=
Ext.getDom(b);var c=a(b),d=(Ext.elCache[c]||{}).events||{},e,f,g,h,k,l,m;for(h in d)if(d.hasOwnProperty(h))for(e=d[h],f=0,g=e.length;f<g;f++){k=e[f];k[4]&&k[4].cancel();if(k[0].tasks&&(l=k[0].tasks.length)){for(;l--;)k[0].tasks[l].cancel();delete k.tasks}m=k[1];v.un(b,h,v.extAdapter?k[3]:m);b.addEventListener&&m&&"mousewheel"==h&&b.removeEventListener("DOMMouseScroll",m,!1);m&&b==r&&"mousedown"==h&&Ext.EventManager.stoppedMouseDownEvent.removeListener(m)}Ext.elCache[c]&&(Ext.elCache[c].events={})},
getListeners:function(b,c){b=Ext.getDom(b);var d=a(b);return(d=(Ext.elCache[d]||{}).events||{},d[c])?d[c]:null},purgeElement:function(b,c,d){b=Ext.getDom(b);var e=a(b),e=(Ext.elCache[e]||{}).events||{},f,g;if(d){if(e&&e.hasOwnProperty(d))for(f=e[d],e=0,g=f.length;e<g;e++)Ext.EventManager.removeListener(b,d,f[e][0])}else Ext.EventManager.removeAll(b);if(c&&b&&b.childNodes)for(e=0,g=b.childNodes.length;e<g;e++)Ext.EventManager.purgeElement(b.childNodes[e],c,d)},_unload:function(){for(var a in Ext.elCache)Ext.EventManager.removeAll(a);
delete Ext.elCache;delete Ext.Element._flyweights;var b,c,d=Ext.lib.Ajax;"object"==typeof d.conn?b=d.conn:b={};for(c in b)(a=b[c])&&d.abort({conn:a,tId:c})},onDocumentReady:function(a,b,c){Ext.isReady?(m||(m=new Ext.util.Event),m.addListener(a,b,c),m.fire(),m.listeners=[]):(m||(m||(m=new Ext.util.Event),C&&r.addEventListener("DOMContentLoaded",g,!1),Ext.isIE?d()||(d.bindIE=!0,r.attachEvent("onreadystatechange",d)):Ext.isOpera?"complete"==r.readyState&&e()||r.addEventListener("DOMContentLoaded",f,
!1):Ext.isWebKit&&d(),v.on(A,"load",g)),c=c||{},c.delay=c.delay||1,m.addListener(a,b,c))},fireDocReady:g};w.on=w.addListener;w.un=w.removeListener;w.stoppedMouseDownEvent=new Ext.util.Event;return w}())}();//# sourceMappingURL=extjs-mod.js.map
