(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: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 c=this.statefulName;c||(c=this.getXType().match(/(?:zarafa\.)?(.*)/)[1]);return c},destroy:function(){if(this.plugins)for(var c in this.plugins){var d=
this.plugins[c];d instanceof Ext.util.Observable&&d.purgeListeners()}this.stateful!==false&&Ext.state.Manager.unregister(this);b.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,b){var c=this,d=b===true?this.swallowEventHandlerPreventDefault:this.swallowEventHandler;if(Ext.isArray(a)){Ext.each(a,function(j){c.on(j,d,this)});return c}c.on(a,d,this);return c},swallowEventHandler:function(a){a.stopPropagation()},swallowEventHandlerPreventDefault:function(a){a.stopPropagation();
a.preventDefault()},spitOutEvent:function(a,b){var c=this,d=b===true?this.swallowEventHandlerPreventDefault:this.swallowEventHandler;if(Ext.isArray(a)){Ext.each(a,function(j){c.un(j,d,this)});return c}c.un(a,d,this);return c},selectable:function(){this.dom.unselectable="off";return this.spitOutEvent("selectstart",true).removeClass("x-unselectable")},clearClass:function(){this.dom.className=""}})})();
(function(){Ext.apply(Ext.EventManager,function(){function a(f){var i=false,g=0,k=A.length,n=false,l;if(f){if(f.getElementById||f.navigator){for(;g<k;++g){l=A[g];try{if(l.el===f){i=l.id;break}}catch(m){}}if(!i){i=Ext.id(f);A.push({id:i,el:f});n=true}}else i=Ext.id(f);if(!Ext.elCache[i]){Ext.Element.addToCache(new Ext.Element(f),i);if(n)Ext.elCache[i].skipGC=true}}return i}function b(f,i,g,k,n,l){f=Ext.getDom(f);var m=a(f);m=Ext.elCache[m].events;var p;p=v.on(f,i,n);m[i]=m[i]||[];m[i].push([g,n,l,
p,k]);if(f.addEventListener&&i=="mousewheel"){var r=["DOMMouseScroll",n,false];f.addEventListener.apply(f,r);Ext.EventManager.addListener(B,"unload",function(){f.removeEventListener.apply(f,r)})}f==t&&i=="mousedown"&&Ext.EventManager.stoppedMouseDownEvent.addListener(n)}function c(){if(window!=top)return false;try{t.documentElement.doScroll("left")}catch(f){return false}h();return true}function d(){if(Ext.isIE&&c())return true;if(t.readyState==F){h();return true}x||(y=setTimeout(arguments.callee,
2));return false}function j(){C||(C=Ext.query("style, link[rel=stylesheet]"));if(C.length==t.styleSheets.length){h();return true}x||(y=setTimeout(arguments.callee,2));return false}function e(){t.removeEventListener(z,arguments.callee,false);j()}function h(){if(!x){x=true;y&&clearTimeout(y);G&&t.removeEventListener(z,h,false);Ext.isIE&&d.bindIE&&t.detachEvent("onreadystatechange",d);v.un(B,"load",arguments.callee)}if(u&&!Ext.isReady){Ext.isReady=true;u.fire();u.listeners=[]}}function o(f,i){return function(){var g=
Ext.toArray(arguments);i.target==Ext.EventObject.setEvent(g[0]).target&&f.apply(this,g)}}function q(f,i,g){return function(k){g.delay(i.buffer,f,null,[new Ext.EventObjectImpl(k)])}}function H(f,i,g,k,n){return function(l){Ext.EventManager.removeListener(i,g,k,n);f(l)}}function I(f,i,g){return function(k){var n=new Ext.util.DelayedTask(f);if(!g.tasks)g.tasks=[];g.tasks.push(n);n.delay(i.delay||10,f,null,[new Ext.EventObjectImpl(k)])}}function D(f,i,g,k,n){function l(s){if(Ext){s=Ext.EventObject.setEvent(s);
var E;if(m.delegate){if(!(E=s.getTarget(m.delegate,p)))return}else E=s.target;m.stopEvent&&s.stopEvent();m.preventDefault&&s.preventDefault();m.stopPropagation&&s.stopPropagation();if(m.normalized===false)s=s.browserEvent;k.call(n||p,s,E,m)}}var m=!g||typeof g=="boolean"?{}:g,p=Ext.getDom(f),r;k=k||m.fn;n=n||m.scope;if(!p)throw'Error listening for "'+i+'". Element "'+f+"\" doesn't exist.";if(m.target)l=o(l,m);if(m.delay)l=I(l,m,k);if(m.single)l=H(l,p,i,k,n);if(m.buffer){r=new Ext.util.DelayedTask(l);
l=q(l,m,r)}b(p,i,k,r,l,n);return l}var u,y,x=false,G=Ext.isGecko||Ext.isWebKit||Ext.isSafari,v=Ext.lib.Event,t=document,B=window,z="DOMContentLoaded",F="complete",J=/^(?:scope|delay|buffer|single|stopEvent|preventDefault|stopPropagation|normalized|args|delegate)$/,A=[],C,w={addListener:function(f,i,g,k,n){if(typeof i=="object"){var l;for(l in i){g=i[l];J.test(l)||(Ext.isFunction(g)?D(f,l,i,g,i.scope):D(f,l,g))}}else D(f,i,n,g,k)},removeListener:function(f,i,g,k){f=Ext.getDom(f);var n=a(f),l=f&&Ext.elCache[n].events[i]||
[],m,p,r;m=0;for(p=l.length;m<p;m++)if(Ext.isArray(r=l[m])&&r[0]==g&&(!k||r[2]==k)){r[4]&&r[4].cancel();if(k=g.tasks&&g.tasks.length){for(;k--;)g.tasks[k].cancel();delete g.tasks}g=r[1];v.un(f,i,v.extAdapter?r[3]:g);g&&f.addEventListener&&i=="mousewheel"&&f.removeEventListener("DOMMouseScroll",g,false);g&&f==t&&i=="mousedown"&&Ext.EventManager.stoppedMouseDownEvent.removeListener(g);l.splice(m,1);l.length===0&&delete Ext.elCache[n].events[i];for(k in Ext.elCache[n].events)return false;Ext.elCache[n].events=
{};return false}},removeAll:function(f){f=Ext.getDom(f);var i=a(f),g=(Ext.elCache[i]||{}).events||{},k,n,l,m,p,r,s;for(m in g)if(g.hasOwnProperty(m)){k=g[m];n=0;for(l=k.length;n<l;n++){p=k[n];p[4]&&p[4].cancel();if(p[0].tasks&&(r=p[0].tasks.length)){for(;r--;)p[0].tasks[r].cancel();delete p.tasks}s=p[1];v.un(f,m,v.extAdapter?p[3]:s);f.addEventListener&&s&&m=="mousewheel"&&f.removeEventListener("DOMMouseScroll",s,false);s&&f==t&&m=="mousedown"&&Ext.EventManager.stoppedMouseDownEvent.removeListener(s)}}if(Ext.elCache[i])Ext.elCache[i].events=
{}},getListeners:function(f,i){f=Ext.getDom(f);var g=a(f);return(g=(Ext.elCache[g]||{}).events||{})&&g[i]?g[i]:null},purgeElement:function(f,i,g){f=Ext.getDom(f);var k=a(f);k=(Ext.elCache[k]||{}).events||{};var n,l;if(g){if(k&&k.hasOwnProperty(g)){n=k[g];k=0;for(l=n.length;k<l;k++)Ext.EventManager.removeListener(f,g,n[k][0])}}else Ext.EventManager.removeAll(f);if(i&&f&&f.childNodes){k=0;for(l=f.childNodes.length;k<l;k++)Ext.EventManager.purgeElement(f.childNodes[k],i,g)}},_unload:function(){var f;
for(f in Ext.elCache)Ext.EventManager.removeAll(f);delete Ext.elCache;delete Ext.Element._flyweights;var i,g,k=Ext.lib.Ajax;typeof k.conn=="object"?i=k.conn:i={};for(g in i)(f=i[g])&&k.abort({conn:f,tId:g})},onDocumentReady:function(f,i,g){if(Ext.isReady){u||(u=new Ext.util.Event);u.addListener(f,i,g);u.fire();u.listeners=[]}else{if(!u){u||(u=new Ext.util.Event);G&&t.addEventListener(z,h,false);if(Ext.isIE){if(!d()){d.bindIE=true;t.attachEvent("onreadystatechange",d)}}else if(Ext.isOpera)t.readyState==
F&&j()||t.addEventListener(z,e,false);else Ext.isWebKit&&d();v.on(B,"load",h)}g=g||{};g.delay=g.delay||1;u.addListener(f,i,g)}},fireDocReady:h};w.on=w.addListener;w.un=w.removeListener;w.stoppedMouseDownEvent=new Ext.util.Event;return w}())})();(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,b,c){var d=this.dom;Ext.fly(d).clearPositioning();Ext.fly(d).setPositioning(b);if(!c.wrap)if(b=Ext.fly(a).dom.parentNode){b.insertBefore(d,a);Ext.fly(a).remove()}}});Ext.Element.addMethods(Ext.Fx)})();
(function(){var a=Ext.QuickTip.prototype.register,b=Ext.QuickTip.prototype.getTipCfg;Ext.override(Ext.QuickTip,{register:function(c){c.title=Ext.util.Format.htmlEncode(c.title);c.text=Ext.util.Format.htmlEncode(c.text);a.apply(this,arguments)},getTipCfg:function(){return Ext.util.Format.htmlEncode(b.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,b=Ext.data.Node.prototype.removeChild;Ext.override(Ext.data.Node,{appendChild:function(){this.leaf=false;return a.apply(this,arguments)},removeChild:function(){var c=b.apply(this,arguments);if(!this.hasChildNodes())this.leaf=true;return c}})})();
(function(){var a=function(b){return b!==undefined&&b!==null&&b!==""?parseInt(b,10):this.useNull?null:0};Ext.data.Types.INT.convert=a;Ext.data.Types.INTEGER.convert=a;a=function(b){return b!==undefined&&b!==null&&b!==""?parseFloat(b,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(b,c){if(this.ids[b]&&this.ids[b][c])return this.ids[b][c];return null},getLocation:function(b){var c=b.getEl(),d=a.apply(this,arguments);if(c&&d)for(c=Ext.get(c.parentNode);c&&d;){if(c.isScrollable())d=d.intersect(c.getRegion());c=c.parent()}return d},getZIndex:function(){return-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(d,j){this.cachedTarget&&this.onDragOut(d,this.cachedTarget.id);var e;if((this.cachedTarget=e=this.ddGroup?Ext.dd.DragDropMgr.getGroupDDById(this.ddGroup,j):Ext.dd.DragDropMgr.getDDById(j))&&this.beforeDragEnter(e,d,j)!==false){e.isNotifyTarget?this.proxy.setStatus(e.notifyEnter(this,d,this.dragData)):this.proxy.setStatus(this.dropAllowed);
this.afterDragEnter&&this.afterDragEnter(e,d,j)}},onDragOver:function(d,j){this.cachedTarget||this.onDragEnter(d,j);this.cachedTarget=this.cachedTarget||Ext.dd.DragDropMgr.getGroupDDById(this.ddGroup,j);return a.apply(this,arguments)},onDragOut:function(){if(this.cachedTarget)return b.apply(this,arguments)},onDragDrop:function(){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();if(Ext.type(c)!==false&&c.getGroupValue)c=c.getGroupValue();else if(b.isSingleValued!==true&&b.eachItem){c=[];b.eachItem(function(j){c.push(j.getValue())})}a.set(d.name,c)}},this);a.endEdit();return this},setValues:function(a){if(Ext.isArray(a))for(var b=0,c=a.length;b<c;b++){var d=a[b],j=this.findField(d.id);if(j)if(!j.hasFocus||j.originalValue==
j.el.dom.value){j.setValue(d.value);if(this.trackResetOnLoad)j.originalValue=j.getValue()}}else for(c in a)if(!Ext.isFunction(a[c])&&(b=this.findField(c)))if(!b.hasFocus||b.originalValue==b.el.dom.value){b.setValue(a[c]);if(this.trackResetOnLoad)b.originalValue=b.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 b=Ext.query(".x-form-cb-label",this.el.parent().dom)[0];b&&Ext.get(b).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,b=Ext.form.DateField.prototype.initComponent;Ext.override(Ext.form.DateField,{initComponent:function(){if(!this.initialConfig.startDay)this.startDay=container.getSettingsModel().get("zarafa/v1/main/week_start");b.apply(this,arguments);if(this.startDay<0||this.startDay>=Date.dayNames.length)this.startDay=0},getValue:function(){var c=a.apply(this,arguments);return Ext.isEmpty(c)?null:c},processValue:function(c){return Ext.isEmpty(c)?"":c}})})();
(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,b=Ext.form.HtmlEditor.prototype.initEditor,c=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 j=d.getKey(),e=this.getDoc(),h;if(j==d.TAB){d.stopEvent();j=this.win.getSelection();if(j.getRangeAt&&j.rangeCount){h=j.getRangeAt(0);h.deleteContents();d=e.createElement("div");d.innerHTML="&nbsp;&nbsp;&nbsp;&nbsp;";e=e.createDocumentFragment();for(var o,q;o=d.firstChild;)q=e.appendChild(o);h.insertNode(e);if(q){h=h.cloneRange();h.setStartAfter(q);h.collapse(true);j.removeAllRanges();j.addRange(h)}}this.deferFocus()}else if(j==
d.ENTER){j=this.win.getSelection();if(j.getRangeAt&&j.rangeCount){h=j.getRangeAt(0);h.deleteContents();o=h.commonAncestorContainer;if(!o||o.nodeName.toLowerCase()!="li"&&o.parentNode.nodeName.toLowerCase()!="li"){d.stopEvent();d=e.createElement("div");d.innerHTML="<br />";for(e=e.createDocumentFragment();o=d.firstChild;)q=e.appendChild(o);h.insertNode(e);if(q){h=h.cloneRange();h.setStartAfter(q);h.collapse(false);j.removeAllRanges();j.addRange(h)}}}}};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(){b.apply(this,arguments);this.getWin().addEventListener("dragover",Zarafa.onWindowDragDrop,false);this.getWin().addEventListener("drop",Zarafa.onWindowDragDrop,false)},initFrame:function(){c.apply(this,arguments);if(Ext.isChrome&&window.location.href.search(/#$/)!==
-1){var d=this.findParentBy(function(j){return j.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)?%?$/,b=/^[1-9]\d*$/i;Ext.apply(Ext.form.VTypes,{percentage:function(c){return a.test(c)},percentageText:_("Value must be between 0% to 100%"),naturalInteger:function(c){return b.test(c)},naturalIntegerText:_("Number must be higher than zero")})})();(function(){var a=Ext.grid.ColumnModel.prototype.setColumnWidth;Ext.override(Ext.grid.ColumnModel,{setColumnWidth:function(b,c){isFinite(c)&&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(b,c){this.stateful!==false&&c!==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:b},this.initialConfig.loadMask))}this.view&&this.view.initData(b,c);this.store=b;this.colModel=
c;if(this.stateful!==false){this.initStateEvents();this.initState()}d&&this.view.refresh(true);this.fireEvent("reconfigure",this,b,c)}})})();(function(){var a=Ext.grid.GridView.prototype.onColConfigChange;Ext.override(Ext.grid.GridView,{getColumnWidth:function(b){b=this.cm.getColumnWidth(b);var c=this.borderWidth;return Ext.isNumber(b)?Ext.isBorderBox?b+"px":Math.max(b-c,0)+"px":b},onColConfigChange:function(){var b=this.grid;b.stateful!==false&&b.initState();a.apply(this,arguments)}})})();
(function(){var a=navigator.userAgent.toLowerCase(),b=!Ext.isOpera&&(/msie/.test(a)||/trident/.test(a)),c=true,d={toString:1};for(var j in d)c=null;if(c)c=["hasOwnProperty","valueOf","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","constructor"];Ext.apply(Ext,{isIE:b,isIE10:b&&/msie 10/.test(a),isIE11:b&&/rv:11/.test(a),clone:function(e){if(e===null||e===undefined)return e;if(e.nodeType&&e.cloneNode)return e.cloneNode(true);var h=Object.prototype.toString.call(e);if(h==="[object Date]")return new Date(e.getTime());
var o,q;if(h==="[object Array]"){h=e.length;for(q=[];h--;)q[h]=Ext.clone(e[h])}else if(h==="[object Object]"&&e.constructor===Object){q={};for(o in e)q[o]=Ext.clone(e[o]);if(c)for(h=c.length;h--;){o=c[h];if(e.hasOwnProperty(o))q[o]=e[o]}}return q||e}})})();
(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,j=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(h){Ext.isFunction(h.doLayout)&&h.doLayout()},this);this.overflowTabIndex&&this.more&&Ext.get(this.more.el).child("button").set({tabIndex:this.overflowTabIndex})},
configureItem:function(e){var h=this.container,o=h.getLayoutTarget();a.apply(this,arguments);e.on("show",function(q){q.xtbHidden!==true&&this.onLayout(h,o)},this);e.on("hide",function(q){q.xtbHidden!==true&&this.onLayout(h,o)},this)},hideItem:function(e){var h=this;b.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(){h.unhideItem(e);e.hide()}},unhideItem:function(e){e.show=
e.xtbOrigShow;delete e.xtbOrigShow;e.hide=e.xtbOrigHide;delete e.xtbOrigHide;delete e.xtbWidth;c.apply(this,arguments)},addComponentToMenu:function(e,h){if(h.xtbHidden===true||h.hidden!==true)j.apply(this,arguments)}})})();(function(){var a=Ext.layout.boxOverflow.Menu.prototype.addComponentToMenu;Ext.override(Ext.layout.boxOverflow.Menu,{addComponentToMenu:function(b,c){if(c.xtbHidden===true||c.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,b=Ext.tree.TreeEditor.prototype.fitToTree;Ext.override(Ext.tree.TreeEditor,{fitToTree:function(){this.tree&&this.tree.isDestroyed!==true&&b.apply(this,arguments)},bindScroll:function(){this.tree&&this.tree.isDestroyed!==true&&a.apply(this,arguments)}})})();(function(){Ext.override(Ext.tree.TreeSorter,{doSort:function(a){a.childNodes&&a.sort(this.sortFn)}})})();
(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,b){Ext.isDefined(b)||(b=2);return(a*100).toFixed(b)+"%"},duration:function(a,b){b=Ext.isDefined(b)?b:0;if(a<60)return String.format(ngettext("{0} minute","{0} minutes",a),a);a=parseFloat((a/60).toFixed(b));if(a<24)return String.format(ngettext("{0} hour","{0} hours",a),a);a=parseFloat((a/24).toFixed(b));if(a<7)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="",j=0;j<c;j++)d+="&nbsp;";return d},elide:function(a,b,c){b=b||0;c=Ext.isDefined(c)?c:b;if(b===0&&c===0)return a;if(a&&a.length>b+c)return a.substr(0,b)+"..."+a.substr(a.length-c);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,b){if(!Ext.isDefined(b))return a;var c=a.indexOf(b);if(c==-1)return a;for(var d=c-1;a[d]==" "&&d>=0;)d--;for(c=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(j,e){var h=Zarafa.util.Translations.SplitTranslation(j,b[d]);
if(!Ext.isArray(h))return true;c.removeAt(e);if(!Ext.isEmpty(h[0])){c.insert(e,h[0]);e++}c.insert(e,b[d]);e++;Ext.isEmpty(h[1])||c.insert(e,h[1]);return false});return c.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,b=Ext.DatePicker.prototype.update,c=Ext.DatePicker.prototype.beforeDestroy,d=Ext.DatePicker.prototype.initComponent;Ext.override(Ext.DatePicker,{width:"180",showWeekNumber:false,weekCells:undefined,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(j){if(this.showWeekNumber===true&&!Ext.isDefined(this.weekCells)){var e=this.el.child("table.x-date-inner",true),h=e.tHead.rows[0],o={tag:"th",html:"<span>"+_("Wk")+"</span>"};Ext.DomHelper.insertFirst(h,o);e=e.tBodies[0];h={tag:"td",cls:"x-date-weeknumber",html:"<a><em><span></span></em></a>"};for(o=0;o<e.rows.length;o++)Ext.DomHelper.insertFirst(e.rows[o],h);this.weekCells=this.el.select("td.x-date-weeknumber a em span")}b.apply(this,
arguments);if(this.showWeekNumber===true){e=this.weekCells.elements;h=j.getFirstDateOfMonth();o=0;for(var q=e.length;o<q;o++){e[o].innerHTML=h.getWeekOfYear();h=h.add(Date.DAY,7)}}},beforeDestroy:function(){c.apply(this,arguments);if(this.rendered&&Ext.isDefined(this.weekCells)){Ext.destroy(this.weekCells.el);delete this.weekCells}}})})();
