(function(){var a=Ext.Button.prototype.onClick;Ext.override(Ext.Button,{onClick:function(c){c=new Ext.EventObjectImpl(c);this.focus();a.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 a=Ext.Component.prototype.initComponent,c=Ext.Component.prototype.destroy;Ext.override(Ext.Component,{stateful:false,statefulRelativeDimensions:true,statefulName:undefined,initComponent:function(){if(this.stateful!==false){if(!this.stateId)this.stateId=Ext.id(null,"state-");Ext.state.Manager.register(this)}a.apply(this,arguments)},getStateName:function(){var b=this.statefulName;b||(b=this.getXType().match(/(?:zarafa\.)?(.*)/)[1]);return b},destroy:function(){if(this.plugins)for(var b in this.plugins){var d=
this.plugins[b];d instanceof Ext.util.Observable&&d.purgeListeners()}this.stateful!==false&&Ext.state.Manager.unregister(this);c.apply(this,arguments)}})})();(function(){Ext.override(Ext.Container,{bufferResize:false})})();
(function(){Ext.Element.addMethods({addUnits:function(a){if(Ext.isEmpty(a)||a=="auto")a=a||"";else if(isNaN(a))a="";else/\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,d=c===true?this.swallowEventHandlerPreventDefault:this.swallowEventHandler;if(Ext.isArray(a)){Ext.each(a,function(i){b.on(i,d,this)});return b}b.on(a,d,this);return b},swallowEventHandler:function(a){a.stopPropagation()},swallowEventHandlerPreventDefault:function(a){a.stopPropagation();
a.preventDefault()},spitOutEvent:function(a,c){var b=this,d=c===true?this.swallowEventHandlerPreventDefault:this.swallowEventHandler;if(Ext.isArray(a)){Ext.each(a,function(i){b.un(i,d,this)});return b}b.un(a,d,this);return b},selectable:function(){this.dom.unselectable="off";return this.spitOutEvent("selectstart",true).removeClass("x-unselectable")},clearClass:function(){this.dom.className=""},fireEvent:function(a){var c=/^(scroll|resize|load|unload|abort|error)$/,b=/^(focus|blur|select|change|reset|keypress|keydown|keyup)$/;
a=a.toLowerCase();a.replace(/^on/,"");var d;if(/^(click|dblclick|mousedown|mouseup|mouseover|mouseout|contextmenu)$/.test(a)){d=this.getBox();c=d.x+d.width/2;b=d.y+d.height/2;d=document.createEvent("MouseEvents");d.initMouseEvent(a,true,true,window,a=="dblclick"?2:1,c,b,c,b,false,false,false,false,0,null)}else if(b.test(a)){d=document.createEvent("UIEvents");d.initUIEvent(a,true,true,window,0)}else if(c.test(a)){d=document.createEvent("HTMLEvents");d.initEvent(a,true,true)}d&&this.dom.dispatchEvent(d)}})})();
(function(){Ext.apply(Ext.EventManager,function(){function a(f){var j=false,h=0,k=B.length,n=false,l;if(f){if(f.getElementById||f.navigator){for(;h<k;++h){l=B[h];try{if(l.el===f){j=l.id;break}}catch(m){}}if(!j){j=Ext.id(f);B.push({id:j,el:f});n=true}}else j=Ext.id(f);if(!Ext.elCache[j]){Ext.Element.addToCache(new Ext.Element(f),j);if(n)Ext.elCache[j].skipGC=true}}return j}function c(f,j,h,k,n,l){f=Ext.getDom(f);var m=a(f);m=Ext.elCache[m].events;var q;q=w.on(f,j,n);m[j]=m[j]||[];m[j].push([h,n,l,
q,k]);if(f.addEventListener&&j=="mousewheel"){var r=["DOMMouseScroll",n,false];f.addEventListener.apply(f,r);Ext.EventManager.addListener(C,"unload",function(){f.removeEventListener.apply(f,r)})}f==u&&j=="mousedown"&&Ext.EventManager.stoppedMouseDownEvent.addListener(n)}function b(){if(window!=top)return false;try{u.documentElement.doScroll("left")}catch(f){return false}g();return true}function d(){if(Ext.isIE&&b())return true;if(u.readyState==G){g();return true}y||(z=setTimeout(arguments.callee,
2));return false}function i(){D||(D=Ext.query("style, link[rel=stylesheet]"));if(D.length==u.styleSheets.length){g();return true}y||(z=setTimeout(arguments.callee,2));return false}function e(){u.removeEventListener(A,arguments.callee,false);i()}function g(){if(!y){y=true;z&&clearTimeout(z);H&&u.removeEventListener(A,g,false);Ext.isIE&&d.bindIE&&u.detachEvent("onreadystatechange",d);w.un(C,"load",arguments.callee)}if(v&&!Ext.isReady){Ext.isReady=true;v.fire();v.listeners=[]}}function p(f,j){return function(){var h=
Ext.toArray(arguments);j.target==Ext.EventObject.setEvent(h[0]).target&&f.apply(this,h)}}function o(f,j,h){return function(k){h.delay(j.buffer,f,null,[new Ext.EventObjectImpl(k)])}}function t(f,j,h,k,n){return function(l){Ext.EventManager.removeListener(j,h,k,n);f(l)}}function I(f,j,h){return function(k){var n=new Ext.util.DelayedTask(f);if(!h.tasks)h.tasks=[];h.tasks.push(n);n.delay(j.delay||10,f,null,[new Ext.EventObjectImpl(k)])}}function E(f,j,h,k,n){function l(s){if(Ext){s=Ext.EventObject.setEvent(s);
var F;if(m.delegate){if(!(F=s.getTarget(m.delegate,q)))return}else F=s.target;m.stopEvent&&s.stopEvent();m.preventDefault&&s.preventDefault();m.stopPropagation&&s.stopPropagation();if(m.normalized===false)s=s.browserEvent;k.call(n||q,s,F,m)}}var m=!h||typeof h=="boolean"?{}:h,q=Ext.getDom(f),r;k=k||m.fn;n=n||m.scope;if(!q)throw'Error listening for "'+j+'". Element "'+f+"\" doesn't exist.";if(m.target)l=p(l,m);if(m.delay)l=I(l,m,k);if(m.single)l=t(l,q,j,k,n);if(m.buffer){r=new Ext.util.DelayedTask(l);
l=o(l,m,r)}c(q,j,k,r,l,n);return l}var v,z,y=false,H=Ext.isGecko||Ext.isWebKit||Ext.isSafari,w=Ext.lib.Event,u=document,C=window,A="DOMContentLoaded",G="complete",J=/^(?:scope|delay|buffer|single|stopEvent|preventDefault|stopPropagation|normalized|args|delegate)$/,B=[],D,x={addListener:function(f,j,h,k,n){if(typeof j=="object"){var l;for(l in j){h=j[l];J.test(l)||(Ext.isFunction(h)?E(f,l,j,h,j.scope):E(f,l,h))}}else E(f,j,n,h,k)},removeListener:function(f,j,h,k){f=Ext.getDom(f);var n=a(f),l=f&&Ext.elCache[n].events[j]||
[],m,q,r;m=0;for(q=l.length;m<q;m++)if(Ext.isArray(r=l[m])&&r[0]==h&&(!k||r[2]==k)){r[4]&&r[4].cancel();if(k=h.tasks&&h.tasks.length){for(;k--;)h.tasks[k].cancel();delete h.tasks}h=r[1];w.un(f,j,w.extAdapter?r[3]:h);h&&f.addEventListener&&j=="mousewheel"&&f.removeEventListener("DOMMouseScroll",h,false);h&&f==u&&j=="mousedown"&&Ext.EventManager.stoppedMouseDownEvent.removeListener(h);l.splice(m,1);l.length===0&&delete Ext.elCache[n].events[j];for(k in Ext.elCache[n].events)return false;Ext.elCache[n].events=
{};return false}},removeAll:function(f){f=Ext.getDom(f);var j=a(f),h=(Ext.elCache[j]||{}).events||{},k,n,l,m,q,r,s;for(m in h)if(h.hasOwnProperty(m)){k=h[m];n=0;for(l=k.length;n<l;n++){q=k[n];q[4]&&q[4].cancel();if(q[0].tasks&&(r=q[0].tasks.length)){for(;r--;)q[0].tasks[r].cancel();delete q.tasks}s=q[1];w.un(f,m,w.extAdapter?q[3]:s);f.addEventListener&&s&&m=="mousewheel"&&f.removeEventListener("DOMMouseScroll",s,false);s&&f==u&&m=="mousedown"&&Ext.EventManager.stoppedMouseDownEvent.removeListener(s)}}if(Ext.elCache[j])Ext.elCache[j].events=
{}},getListeners:function(f,j){f=Ext.getDom(f);var h=a(f);return(h=(Ext.elCache[h]||{}).events||{})&&h[j]?h[j]:null},purgeElement:function(f,j,h){f=Ext.getDom(f);var k=a(f);k=(Ext.elCache[k]||{}).events||{};var n,l;if(h){if(k&&k.hasOwnProperty(h)){n=k[h];k=0;for(l=n.length;k<l;k++)Ext.EventManager.removeListener(f,h,n[k][0])}}else Ext.EventManager.removeAll(f);if(j&&f&&f.childNodes){k=0;for(l=f.childNodes.length;k<l;k++)Ext.EventManager.purgeElement(f.childNodes[k],j,h)}},_unload:function(){var f;
for(f in Ext.elCache)Ext.EventManager.removeAll(f);delete Ext.elCache;delete Ext.Element._flyweights;var j,h,k=Ext.lib.Ajax;typeof k.conn=="object"?j=k.conn:j={};for(h in j)(f=j[h])&&k.abort({conn:f,tId:h})},onDocumentReady:function(f,j,h){if(Ext.isReady){v||(v=new Ext.util.Event);v.addListener(f,j,h);v.fire();v.listeners=[]}else{if(!v){v||(v=new Ext.util.Event);H&&u.addEventListener(A,g,false);if(Ext.isIE){if(!d()){d.bindIE=true;u.attachEvent("onreadystatechange",d)}}else if(Ext.isOpera)u.readyState==
G&&i()||u.addEventListener(A,e,false);else Ext.isWebKit&&d();w.on(C,"load",g)}h=h||{};h.delay=h.delay||1;v.addListener(f,j,h)}},fireDocReady:g};x.on=x.addListener;x.un=x.removeListener;x.stoppedMouseDownEvent=new Ext.util.Event;return x}())})();(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})})();
(function(){Ext.apply(Ext.Fx,{fxUnwrap:function(a,c,b){var d=this.dom;Ext.fly(d).clearPositioning();Ext.fly(d).setPositioning(c);if(!b.wrap)if(c=Ext.fly(a).dom.parentNode){c.insertBefore(d,a);Ext.fly(a).remove()}}});Ext.Element.addMethods(Ext.Fx)})();
(function(){var a=Ext.QuickTip.prototype.register,c=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(){return Ext.util.Format.htmlEncode(c.apply(this,arguments))}})})();(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(){a.apply(this,arguments);this.el&&this.el.unselectable()}})})();(function(){var a=Ext.data.Node.prototype.appendChild,c=Ext.data.Node.prototype.removeChild;Ext.override(Ext.data.Node,{appendChild:function(){this.leaf=false;return a.apply(this,arguments)},removeChild:function(){var b=c.apply(this,arguments);if(!this.hasChildNodes())this.leaf=true;return b}})})();
(function(){var a=function(c){return c!==undefined&&c!==null&&c!==""?parseInt(c,10):this.useNull?null:0};Ext.data.Types.INT.convert=a;Ext.data.Types.INTEGER.convert=a;a=function(c){return c!==undefined&&c!==null&&c!==""?parseFloat(c,10):this.useNull?null:0};Ext.data.Types.FLOAT.convert=a;Ext.data.Types.NUMBER.convert=a})();Ext.override(Ext.dd.DD,{scroll:false});
(function(){var a=Ext.dd.DragDropMgr.getLocation;Ext.apply(Ext.dd.DragDropMgr,{getGroupDDById:function(c,b){if(this.ids[c]&&this.ids[c][b])return this.ids[c][b];return null},getLocation:function(c){var b=c.getEl(),d=a.apply(this,arguments);if(b&&d)for(b=Ext.get(b.parentNode);b&&d;){if(b.isScrollable())d=d.intersect(b.getRegion());b=b.parent()}return d},getZIndex:function(){return-1}})})();
(function(){var a=Ext.dd.DragSource.prototype.onDragOver,c=Ext.dd.DragSource.prototype.onDragOut,b=Ext.dd.DragSource.prototype.onDragDrop;Ext.override(Ext.dd.DragSource,{onDragEnter:function(d,i){this.cachedTarget&&this.onDragOut(d,this.cachedTarget.id);var e;if((this.cachedTarget=e=this.ddGroup?Ext.dd.DragDropMgr.getGroupDDById(this.ddGroup,i):Ext.dd.DragDropMgr.getDDById(i))&&this.beforeDragEnter(e,d,i)!==false){e.isNotifyTarget?this.proxy.setStatus(e.notifyEnter(this,d,this.dragData)):this.proxy.setStatus(this.dropAllowed);
this.afterDragEnter&&this.afterDragEnter(e,d,i)}},onDragOver:function(d,i){this.cachedTarget||this.onDragEnter(d,i);this.cachedTarget=this.cachedTarget||Ext.dd.DragDropMgr.getGroupDDById(this.ddGroup,i);return a.apply(this,arguments)},onDragOut:function(){if(this.cachedTarget)return c.apply(this,arguments)},onDragDrop:function(){if(this.cachedTarget)return b.apply(this,arguments)}})})();
(function(){Ext.override(Ext.form.BasicForm,{updateRecord:function(a){a.beginEdit();var c,b;a.fields.each(function(d){if(c=this.findField(d.name)){b=c.getValue();if(Ext.type(b)!==false&&b.getGroupValue)b=b.getGroupValue();else if(c.isSingleValued!==true&&c.eachItem){b=[];c.eachItem(function(i){b.push(i.getValue())})}a.set(d.name,b)}},this);a.endEdit();return this},setValues:function(a){if(Ext.isArray(a))for(var c=0,b=a.length;c<b;c++){var d=a[c],i=this.findField(d.id);if(i)if(!i.hasFocus||i.originalValue==
i.el.dom.value){i.setValue(d.value);if(this.trackResetOnLoad)i.originalValue=i.getValue()}}else for(b in a)if(!Ext.isFunction(a[b])&&(c=this.findField(b)))if(!c.hasFocus||c.originalValue==c.el.dom.value){c.setValue(a[b]);if(this.trackResetOnLoad)c.originalValue=c.getValue()}return this}})})();
(function(){var a=Ext.form.Checkbox.prototype.onRender;Ext.override(Ext.form.Checkbox,{onRender:function(){a.apply(this,arguments);this.wrap.addClass("x-form-item");if(this.boxLabel&&this.el){var c=Ext.query(".x-form-cb-label",this.el.parent().dom)[0];c&&Ext.get(c).unselectable()}}})})();
(function(){var a=Ext.form.ComboBox.prototype.initList;Ext.override(Ext.form.ComboBox,{initList:function(){if(!this.tpl)this.tpl='<tpl for="."><div class="x-combo-list-item">{'+this.displayField+":htmlEncode}</div></tpl>";a.apply(this,arguments)}})})();
(function(){var a=Ext.form.DateField.prototype.getValue,c=Ext.form.DateField.prototype.initComponent,b=Ext.form.DateField.prototype.onTriggerClick,d=Ext.form.DateField.prototype.menuEvents;Ext.override(Ext.form.DateField,{showNow:false,initComponent:function(){if(!this.initialConfig.startDay)this.startDay=container.getSettingsModel().get("zarafa/v1/main/week_start");c.apply(this,arguments);this.addEvents("selectnow");if(this.startDay<0||this.startDay>=Date.dayNames.length)this.startDay=0},getValue:function(){var i=
a.apply(this,arguments);return Ext.isEmpty(i)?null:i},processValue:function(i){return Ext.isEmpty(i)?"":i},onTriggerClick:function(){if(this.showNow&&this.menu==null)this.menu=new Ext.menu.DateMenu({hideOnClick:false,focusOnSelect:false,initialConfig:{showNow:true,todayText:_("Now")}});b.apply(this,arguments);this.showNow&&this.menu.relayEvents(this.menu.picker,["selectnow"])},menuEvents:function(i){d.apply(this,arguments);this.showNow&&this.menu[i]("selectnow",this.onSelectnow,this)},onSelectnow:function(i,
e){this.fireEvent("selectnow",this,e)}})})();(function(){Ext.override(Ext.form.DisplayField,{cls:"x-form-item"})})();(function(){Ext.override(Ext.form.FormPanel,{labelAlign:"right"})})();
(function(){var a=Ext.form.HtmlEditor.prototype.createToolbar,c=Ext.form.HtmlEditor.prototype.initEditor,b=Ext.form.HtmlEditor.prototype.initFrame;Ext.override(Ext.form.HtmlEditor,{createToolbar:function(){a.apply(this,arguments);this.getToolbar().layout.overflowTabIndex=-1;if(this.enableFont&&!Ext.isSafari2){var d=Ext.DomQuery.select(".x-font-select",this.tb.getEl().dom);Ext.isEmpty(d)||d[0].setAttribute("tabindex","-1")}},onFirstFocus:function(){this.activated=true;this.disableItems(this.readOnly);
this.fireEvent("activate",this)},fixKeys:function(){if(Ext.isIE)return function(d){var i=d.getKey(),e=this.getDoc(),g;if(i==d.TAB){d.stopEvent();i=this.win.getSelection();if(i.getRangeAt&&i.rangeCount){g=i.getRangeAt(0);g.deleteContents();d=e.createElement("div");d.innerHTML="&nbsp;&nbsp;&nbsp;&nbsp;";e=e.createDocumentFragment();for(var p,o;p=d.firstChild;)o=e.appendChild(p);g.insertNode(e);if(o){g=g.cloneRange();g.setStartAfter(o);g.collapse(true);i.removeAllRanges();i.addRange(g)}}this.deferFocus()}else if(i==
d.ENTER){i=this.win.getSelection();if(i.getRangeAt&&i.rangeCount){g=i.getRangeAt(0);g.deleteContents();p=g.commonAncestorContainer;if(!p||p.nodeName.toLowerCase()!="li"&&p.parentNode.nodeName.toLowerCase()!="li"){d.stopEvent();d=e.createElement("div");d.innerHTML="<br />";for(e=e.createDocumentFragment();p=d.firstChild;)o=e.appendChild(p);g.insertNode(e);if(o){g=g.cloneRange();g.setStartAfter(o);g.collapse(false);i.removeAllRanges();i.addRange(g)}}}}};else if(Ext.isOpera)return function(d){if(d.getKey()==
d.TAB){d.stopEvent();this.win.focus();this.execCmd("InsertHTML","&nbsp;&nbsp;&nbsp;&nbsp;");this.deferFocus()}};else if(Ext.isWebKit)return function(d){if(d.getKey()==d.TAB){d.stopEvent();this.execCmd("InsertText","\t");this.deferFocus()}}}(),initEditor:function(){c.apply(this,arguments);this.getWin().addEventListener("dragover",Zarafa.onWindowDragDrop,false);this.getWin().addEventListener("drop",Zarafa.onWindowDragDrop,false)},initFrame:function(){b.apply(this,arguments);if(Ext.isChrome&&window.location.href.search(/#$/)!==
-1){var d=this.findParentBy(function(i){return i.getEl().isScrollable()});this.getEditorBody().scrollTop=0;d!==null&&d.getEl().scrollTo("top",0)}}})})();(function(){var a=Ext.form.Label.prototype.onRender;Ext.override(Ext.form.Label,{cls:"x-form-item-label",onRender:function(){a.apply(this,arguments);this.positionEl=this.el.wrap({cls:"x-form-item"});this.el.unselectable()}})})();
(function(){var a=/^(100?|\d?\d)?%?$/,c=/^[1-9]\d*$/i,b=/^(\w+)([\-+.\'][\w]+)*@(\w[\-\w]*\.){1,5}([A-Za-z]){2,10}$/;Ext.apply(Ext.form.VTypes,{percentage:function(d){return a.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 b.test(d)}})})();
(function(){var a=Ext.grid.ColumnModel.prototype.setColumnWidth;Ext.override(Ext.grid.ColumnModel,{setColumnWidth:function(c,b){isFinite(b)&&a.apply(this,arguments)}})})();
(function(){var a=Ext.grid.GridPanel.prototype.onClick;Ext.override(Ext.grid.GridPanel,{onClick:function(){a.apply(this,arguments);this.view.focusEl.focus()},reconfigure:function(c,b){this.stateful!==false&&b!==this.colModel&&this.mun(this.colModel,"hiddenchange",this.saveState,this);var d=this.rendered;if(d)if(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,b);this.store=c;this.colModel=
b;if(this.stateful!==false){this.initStateEvents();this.initState()}d&&this.view.refresh(true);this.fireEvent("reconfigure",this,c,b)}})})();
(function(){var a=Ext.grid.GridView.prototype.onColConfigChange,c=Ext.grid.GridView.prototype.initTemplates;Ext.override(Ext.grid.GridView,{getColumnWidth:function(b){b=this.cm.getColumnWidth(b);var d=this.borderWidth;return Ext.isNumber(b)?Ext.isBorderBox?b+"px":Math.max(b-d,0)+"px":b},onColConfigChange:function(){var b=this.grid;b.stateful!==false&&b.initState();a.apply(this,arguments)},initTemplates:function(){c.apply(this);var b=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>");b.disableFormats=true;this.templates.hcell=b.compile()},renderHeaders:function(){var b=this.cm,d=this.templates,i=d.hcell,e={},g=b.getColumnCount(),p=g-1,o=[],t;for(t=0;t<g;t++){e=t==0?"x-grid3-cell-first ":
t==p?"x-grid3-cell-last ":"";e={id:b.getColumnId(t),value:b.getColumnHeader(t)||"",style:this.getColumnStyle(t,true),css:e,tooltip:this.getColumnTooltip(t),cls:b.getColumnAt(t).headerCls||""};if(b.config[t].align=="right")e.istyle="padding-right: 16px;";else delete e.istyle;o[t]=i.apply(e)}return d.header.apply({cells:o.join(""),tstyle:String.format("width: {0};",this.getTotalWidth())})}})})();
(function(){var a=navigator.userAgent.toLowerCase(),c=!Ext.isOpera&&(/msie/.test(a)||/trident/.test(a)),b=true,d={toString:1};for(var i in d)b=null;if(b)b=["hasOwnProperty","valueOf","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","constructor"];Ext.apply(Ext,{isIE:c,isIE10:c&&/msie 10/.test(a),isIE11:c&&/rv:11/.test(a),clone:function(e){if(e===null||e===undefined)return e;if(e.nodeType&&e.cloneNode)return e.cloneNode(true);var g=Object.prototype.toString.call(e);if(g==="[object Date]")return new Date(e.getTime());
var p,o;if(g==="[object Array]"){g=e.length;for(o=[];g--;)o[g]=Ext.clone(e[g])}else if(g==="[object Object]"&&e.constructor===Object){o={};for(p in e)o[p]=Ext.clone(e[p]);if(b)for(g=b.length;g--;){p=b[g];if(e.hasOwnProperty(p))o[p]=e[p]}}return o||e}})})();
(function(){var a=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");a.apply(this,arguments)},onExpand:function(){this.splitEl&&this.splitEl.removeClass("x-hide-display");c.apply(this,arguments)}})})();
(function(){var a=Ext.layout.ToolbarLayout.prototype.configureItem,c=Ext.layout.ToolbarLayout.prototype.hideItem,b=Ext.layout.ToolbarLayout.prototype.unhideItem,d=Ext.layout.ToolbarLayout.prototype.onLayout,i=Ext.layout.ToolbarLayout.prototype.addComponentToMenu;Ext.override(Ext.layout.ToolbarLayout,{triggerWidth:41,overflowTabIndex:undefined,onLayout:function(e){d.apply(this,arguments);e.items.each(function(g){Ext.isFunction(g.doLayout)&&g.doLayout()},this);this.overflowTabIndex&&this.more&&Ext.get(this.more.el).child("button").set({tabIndex:this.overflowTabIndex})},
configureItem:function(e){var g=this.container,p=g.getLayoutTarget();a.apply(this,arguments);e.on("show",function(o){o.xtbHidden!==true&&this.onLayout(g,p)},this);e.on("hide",function(o){o.xtbHidden!==true&&this.onLayout(g,p)},this)},hideItem:function(e){var g=this;c.apply(this,arguments);e.xtbOrigShow=e.show;e.show=function(){e.xtbOrigShow(true);e.xtbWidth=e.getPositionEl().dom.parentNode.offsetWidth;e.xtbOrigHide(false)};e.xtbOrigHide=e.hide;e.hide=function(){g.unhideItem(e);e.hide()}},unhideItem:function(e){e.show=
e.xtbOrigShow;delete e.xtbOrigShow;e.hide=e.xtbOrigHide;delete e.xtbOrigHide;delete e.xtbWidth;b.apply(this,arguments)},addComponentToMenu:function(e,g){if(g.xtbHidden===true||g.hidden!==true)i.apply(this,arguments)}})})();(function(){var a=Ext.layout.boxOverflow.Menu.prototype.addComponentToMenu;Ext.override(Ext.layout.boxOverflow.Menu,{addComponentToMenu:function(c,b){if(b.xtbHidden===true||b.hidden!==true)a.apply(this,arguments)}})})();
(function(){Ext.apply(Ext.state.Manager,{components:new Ext.util.MixedCollection(false,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(){var a=Ext.tree.TreeEditor.prototype.bindScroll,c=Ext.tree.TreeEditor.prototype.fitToTree;Ext.override(Ext.tree.TreeEditor,{fitToTree:function(){this.tree&&this.tree.isDestroyed!==true&&c.apply(this,arguments)},bindScroll:function(){this.tree&&this.tree.isDestroyed!==true&&a.apply(this,arguments)}})})();(function(){Ext.override(Ext.tree.TreeSorter,{doSort:function(a){if(a.childNodes){var c=document.activeElement;a.sort(this.sortFn);c&&c.focus()}}})})();
(function(){Ext.apply(Ext.util.Format,{fileSize:function(a){Ext.isNumber(a)||(a=0);if(a<1024)return String.format(ngettext("{0} byte","{0} bytes",a),a);a=parseFloat((a/1024).toFixed(1));if(a<1024)return String.format(ngettext("{0} KB","{0} KB",a),a);a=parseFloat((a/1024).toFixed(1));if(a<1024)return String.format(ngettext("{0} MB","{0} MB",a),a);a=parseFloat((a/1024).toFixed(1));if(a<1024)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,c){Ext.isDefined(c)||(c=2);return(a*100).toFixed(c)+"%"},duration:function(a,c){c=Ext.isDefined(c)?c:0;if(a<60)return String.format(ngettext("{0} minute","{0} minutes",a),a);a=parseFloat((a/60).toFixed(c));if(a<24)return String.format(ngettext("{0} hour","{0} hours",a),a);a=parseFloat((a/24).toFixed(c));if(a<7)return String.format(ngettext("{0} day","{0} days",a),a);a=parseFloat((a/7).toFixed(c));return String.format(ngettext("{0} week","{0} weeks",a),a)},indent:function(a,
c){for(var b=(Ext.isDefined(a)?a:1)*(Ext.isDefined(c)?c:4),d="",i=0;i<b;i++)d+="&nbsp;";return d},elide:function(a,c,b){c=c||0;b=Ext.isDefined(b)?b:c;if(c===0&&b===0)return a;if(a&&a.length>c+b)return a.substr(0,c)+"..."+a.substr(a.length-b);return a},htmlEncodeUndef:function(){return this.htmlEncode(this.undef.apply(this,arguments))},htmlEncodeDefaultValue:function(){return this.htmlEncode(this.defaultValue.apply(this,arguments))},htmlEncodeElide:function(){return this.htmlEncode(this.elide.apply(this,
arguments))},htmlEncodeEllipsis:function(){return this.htmlEncode(this.ellipsis.apply(this,arguments))},basename:function(a){return a.split("\\").pop()},htmlEncodeBasename:function(){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)}})})();
(function(){Ext.override(Ext.ux.Spinner,{initSpinner:function(){this.field.addEvents({spin:true,spinup:true,spindown:true});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:true});this.field.mon(this.trigger,
{mouseover:this.onMouseOver,mouseout:this.onMouseOut,mousemove:this.onMouseMove,mousedown:this.onMouseDown,mouseup:this.onMouseUp,scope:this,preventDefault:true});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,c){if(!Ext.isDefined(c))return a;var b=a.indexOf(c);if(b==-1)return a;for(var d=b-1;a[d]==" "&&d>=0;)d--;for(b=b+c.length;a[b]==" "&&b<a.length;)b++;return[a.substr(0,d+1),a.substr(b)]},MultiSplitTranslation:function(a,c){Ext.isArray(c)||(c=[c]);var b=new Ext.util.MixedCollection;b.add(a);for(var d=0;d<c.length;d++)b.each(function(i,e){var g=Zarafa.util.Translations.SplitTranslation(i,c[d]);
if(!Ext.isArray(g))return true;b.removeAt(e);if(!Ext.isEmpty(g[0])){b.insert(e,g[0]);e++}b.insert(e,c[d]);e++;Ext.isEmpty(g[1])||b.insert(e,g[1]);return false});return b.getRange()}};
(function(){Ext.apply(Date,{dayNames:[_("Sunday"),_("Monday"),_("Tuesday"),_("Wednesday"),_("Thursday"),_("Friday"),_("Saturday")],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.form.HtmlEditor,{createLinkText:_("Please enter the URL for the link")+":",buttonTips:{bold:{title:_("Bold (Ctrl+B) text"),text:_("Make the selected text bold."),cls:"x-html-editor-tip"},italic:{title:_("Italic (Ctrl+I)"),
text:_("Make the selected text italic."),cls:"x-html-editor-tip"},underline:{title:_("Underline (Ctrl+U)"),text:_("Underline the selected text."),cls:"x-html-editor-tip"},increasefontsize:{title:_("Grow Text"),text:_("Increase the font size."),cls:"x-html-editor-tip"},decreasefontsize:{title:_("Shrink Text"),text:_("Decrease the font size."),cls:"x-html-editor-tip"},backcolor:{title:_("Text Highlight Color"),text:_("Change the background color of the selected text."),cls:"x-html-editor-tip"},forecolor:{title:_("Font Color"),
text:_("Change the color of the selected text."),cls:"x-html-editor-tip"},justifyleft:{title:_("Align Text Left"),text:_("Align text to the left."),cls:"x-html-editor-tip"},justifycenter:{title:_("Center Text"),text:_("Center text in the editor."),cls:"x-html-editor-tip"},justifyright:{title:_("Align Text Right"),text:_("Align text to the right."),cls:"x-html-editor-tip"},insertunorderedlist:{title:_("Bullet List"),text:_("Start a bulleted list."),cls:"x-html-editor-tip"},insertorderedlist:{title:_("Numbered List"),
text:_("Start a numbered list."),cls:"x-html-editor-tip"},createlink:{title:_("Hyperlink"),text:_("Make the selected text a hyperlink."),cls:"x-html-editor-tip"},sourceedit:{title:_("Source Edit"),text:_("Switch to source editing mode."),cls:"x-html-editor-tip"}}});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 _")})})();
(function(){var a=Ext.DatePicker.prototype.onRender,c=Ext.DatePicker.prototype.update,b=Ext.DatePicker.prototype.beforeDestroy,d=Ext.DatePicker.prototype.initComponent,i=Ext.DatePicker.prototype.selectToday;Ext.override(Ext.DatePicker,{width:"180",showWeekNumber:false,weekCells:undefined,showNow:false,initComponent:function(){if(!this.initialConfig.startDay)this.startDay=container.getSettingsModel().get("zarafa/v1/main/week_start");if(this.startDay<0||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(e){if(this.showWeekNumber===true&&!Ext.isDefined(this.weekCells)){var g=this.el.child("table.x-date-inner",true),p=g.tHead.rows[0],o={tag:"th",html:"<span>"+_("Wk")+"</span>"};Ext.DomHelper.insertFirst(p,o);g=g.tBodies[0];p={tag:"td",cls:"x-date-weeknumber",html:"<a><em><span></span></em></a>"};for(o=0;o<g.rows.length;o++)Ext.DomHelper.insertFirst(g.rows[o],
p);this.weekCells=this.el.select("td.x-date-weeknumber a em span")}c.apply(this,arguments);if(this.showWeekNumber===true){g=this.weekCells.elements;p=e.getFirstDateOfMonth();o=0;for(var t=g.length;o<t;o++){g[o].innerHTML=p.getWeekOfYear();p=p.add(Date.DAY,7)}}},beforeDestroy:function(){b.apply(this,arguments);if(this.rendered&&Ext.isDefined(this.weekCells)){Ext.destroy(this.weekCells.el);delete this.weekCells}},selectToday:function(){this.showNow&&this.fireEvent("selectnow",this,this.value);i.apply(this,
arguments)}})})();
