egroupware_official/phpgwapi/js/jsapi.min.js

37 lines
875 KiB
JavaScript
Raw Normal View History

/*!
* EGroupware (http://www.egroupware.org/) minified Javascript
*
* full sources are available under https://svn.stylite.de/viewvc/egroupware/
*
* build Wed Mar 02 2016 15:23:51
*/
2016-03-02 09:46:43 +01:00
function egw_insertJS(_html){if(_html){var in_pos=-1,out_pos=-1;do{var in_pos=_html.search(/<script/im),out_pos=_html.search(/<\/script>/im);if(in_pos>-1&&out_pos>-1){if(out_pos>in_pos){var scriptStart=_html.indexOf(">",in_pos);if(scriptStart>in_pos){var script=_html.substring(scriptStart+1,out_pos);try{var tag=document.createElement("script");tag.setAttribute("type","text/javascript"),tag.text=script,document.getElementsByTagName("head")[0].appendChild(tag)}catch(e){"undefined"!=typeof console&&"undefined"!=typeof console.log&&console.log("Error while inserting JS code:",_e)}}}_html=_html.substr(out_pos+9)}}while(in_pos>-1&&out_pos>-1)}}function egw_topWindow(){return"undefined"!=typeof window.parent&&"undefined"!=typeof window.parent.top?window.parent.top:"undefined"!=typeof window.opener&&"undefined"!=typeof window.opener.top?window.opener.top:window.top}function egw_appWindow(_app){var framework=egw_getFramework();return framework&&framework.egw_appWindow?framework.egw_appWindow(_app):window}function egw_appWindowOpen(_app,_url){"undefined"==typeof _url&&(_url="about:blank"),window.location=_url}function egw_getApp(_name){return window.parent.framework.getApplicationByName(_name)}function egw_getAppName(){return"undefined"==typeof egw_appName?"egroupware":egw_appName}function egw_refresh(_msg,_app,_id,_type,_targetapp,_replace,_with,_msg_type){egw(window).refresh(_msg,_app,_id,_type,_targetapp,_replace,_with,_msg_type)}function egw_message(_msg,_type){egw(window).message(_msg,_type)}function egw_app_header(_header,_app){egw(window).app_header(_header,_app)}function egw_open(id,app,type,extra,target){window.egw.open(id,app,type,extra,target)}function egw_set_checkbox_multiselect_enabled(_id,_enabled){var ms=document.getElementById("exec["+_id+"]");if(null!==ms){var label_color="";_enabled?(ms.style.backgroundColor="white",label_color="black"):(ms.style.backgroundColor="#EEEEEE",label_color="gray");for(var i=0;i<ms.childNodes.length;i++)"LABEL"==ms.childNodes[i].nodeName&&(ms.childNodes[i].style.color=label_color,ms.childNodes[i].childNodes.length>=1&&"INPUT"==ms.childNodes[i].childNodes[0].nodeName&&(ms.childNodes[i].childNodes[0].disabled=!_enabled,ms.childNodes[i].childNodes[0].checked&=_enabled))}}function egw_openWindowCentered2(_url,_windowName,_width,_height,_status,_app,_returnID){return egw(window).openPopup(_url,_width,_height,_windowName,_app,_returnID,_status)}function egw_openWindowCentered(_url,_windowName,_width,_height){return egw_openWindowCentered2(_url,_windowName,_width,_height,"no",!1,!0)}function egw_getWindowLeft(){try{if(is_mozilla)return window.screenX}catch(e){}return window.screenLeft}function egw_getWindowTop(){try{if(is_mozilla)return window.screenY}catch(e){}return window.screenTop-90}function egw_getWindowInnerWidth(){return is_mozilla?window.innerWidth:document.body.clientWidth}function egw_getWindowInnerHeight(){return is_mozilla?window.innerHeight:document.documentElement.clientHeight}function egw_getWindowOuterWidth(){try{if(is_mozilla)return window.outerWidth}catch(e){}return egw_getWindowInnerWidth()}function egw_getWindowOuterHeight(){try{if(is_mozilla)return window.outerHeight}catch(e){}return egw_getWindowInnerHeight()}function dropdown_menu_hack(el){function showMenu(){function selectMenu(obj){var o=document.createElement("option");for(o.value=obj.value,o.text=obj.innerHTML,o.text=o.text.replace("<NOBR>",""),o.text=o.text.replace("</NOBR>",""),""!=o.value&&(o.innerHTML=o.text);el.options.length>0;)el.options[0].removeNode(!0);el.appendChild(o),el.title=o.innerHTML,el.contentIndex=obj.selectedIndex,el.menu.hide(),el.onchange&&el.onchange()}el.menu.show(0,el.offsetHeight,10,10,el);var mb=el.menu.document.body;mb.style.cssText="border:solid 1px black;margin:0;padding:0;overflow-y:auto;overflow-x:auto;background:white;font:12px Tahoma, sans-serif;";var t=el.contentHTML;t=t.replace(/<select/gi,"<div"),t=t.replace(/<option/gi,"<span"),t=t.replace(/<\/option/gi,"</span"),t=t.replace(/<\/select/gi,"</div"),t=t.replace(/<optgroup label=\"([\w\s\wäöüßÄÖÜ]*[^>])*">/gi,'<span value=
defaultAction=_links[k].actionObj;break}return defaultAction},ai._searchShortcut=function(_key,_objs,_links){for(var i=0;i<_objs.length;i++){var sc=_objs[i].shortcut;if(sc&&sc.keyCode==_key.keyCode&&sc.shift==_key.shift&&sc.ctrl==_key.ctrl&&sc.alt==_key.alt&&"popup"==_objs[i].type&&("undefined"==typeof _links[_objs[i].id]||_links[_objs[i].id].enabled))return _objs[i];var obj=this._searchShortcut(_key,_objs[i].children,_links);if(obj)return obj}},ai._searchShortcutInLinks=function(_key,_links){var objs=[];for(var k in _links)_links[k].enabled&&objs.push(_links[k].actionObj);return ai._searchShortcut(_key,objs,_links)},ai._handleKeyPress=function(_key,_selected,_links,_target){if(_key.keyCode==EGW_KEY_ENTER&&!_key.ctrl&&!_key.shift&&!_key.alt){var defaultAction=this._getDefaultLink(_links);if(defaultAction)return defaultAction.execute(_selected),!0}if(_key.keyCode==EGW_KEY_MENU&&!_key.ctrl)return this.doExecuteImplementation({posx:0,posy:0},_selected,_links,_target);var obj=this._searchShortcutInLinks(_key,_links);return obj?(obj.execute(_selected),!0):!1},ai._registerContext=function(_node,_callback,_context){var contextHandler=function(e){if(egwIsMobile()&&(3==e.originalEvent.which,jQuery(".nm-mob-header .nm_action_header").toggleClass("back",_egw_active_menu)),e||(e=window.event),_egw_active_menu)_egw_active_menu.hide();else if(!e.ctrlKey&&3==e.which||0===e.which){var _xy=ai._getPageXY(e),_implContext={event:e,posx:_xy.posx,posy:_xy.posy};_callback.call(_context,_implContext,ai)}return e.cancelBubble=!e.ctrlKey||1==e.which,e.stopPropagation&&e.cancelBubble&&e.stopPropagation(),!e.cancelBubble};$j(_node).on("contextmenu",contextHandler)},ai.doRegisterAction=function(_aoi,_callback,_context){var node=_aoi.getDOMNode();return node?(this._registerDefault(node,_callback,_context),this._registerContext(node,_callback,_context),!0):!1},ai.doUnregisterAction=function(_aoi){},ai.doExecuteImplementation=function(_context,_selected,_links,_target){if("undefined"==typeof _target&&(_target=null),ai._context=_context,"object"==typeof _context&&"object"==typeof _context.keyEvent)return ai._handleKeyPress(_context.keyEvent,_selected,_links,_target);if("default"!=_context){if(("number"!=typeof _context.posx||"number"!=typeof _context.posy)&&"undefined"!=typeof _context.id){var node=_context;x=$j(node).offset().left,y=$j(node).offset().top,_context={posx:x,posy:y}}var menu=ai._buildMenu(_links,_selected,_target);return menu.showAt(_context.posx,_context.posy),!0}var defaultAction=ai._getDefaultLink(_links);return defaultAction&&defaultAction.execute(_selected),!1},ai._groupLayers=function(_layer,_links,_parentGroup){for(var link_groups={},i=0;i<_layer.children.length;i++){var actionObj=_layer.children[i].action,grp=actionObj.group;"undefined"==typeof link_groups[grp]&&(link_groups[grp]=[]);var visible=!0,enabled=!0;"undefined"!=typeof _links[actionObj.id]&&(visible=_links[actionObj.id].visible,enabled=_links[actionObj.id].enabled);for(var inserted=!1,groupObj={actionObj:actionObj,visible:visible,enabled:enabled,groups:[]},j=0;j<link_groups[grp].length;j++){var elem=link_groups[grp][j].actionObj;if(elem.order>actionObj.order){inserted=!0,link_groups[grp].splice(j,0,groupObj);break}}inserted||link_groups[grp].push(groupObj),_layer.children[i].children.length>0&&this._groupLayers(_layer.children[i],_links,groupObj)}var groups=[];for(var k in link_groups)groups.push({grp:k,links:link_groups[k]});groups.sort(function(a,b){var ia=parseInt(a.grp),ib=parseInt(b.grp);return ia>ib?1:ib>ia?-1:0});for(var groups2=[],i=0;i<groups.length;i++)groups2.push(groups[i].links);_parentGroup.groups=groups2},ai._buildMenuLayer=function(_menu,_groups,_selected,_enabled,_target){for(var firstGroup=!0,i=0;i<_groups.length;i++){for(var firstElem=!0,j=0;j<_groups[i].length;j++){var link=_groups[i][j];if(link.visible){!firstGroup&&firstElem&&_menu.addItem("","-"),firstElem=!1;var item=_menu.addItem(link.actionObj.id,link.actionObj.caption,link.actionObj.iconUrl);if(item.default=link.actionObj.default,"popup"==link.actionObj.type&&(item.set_hint(link.actionObj.hint)
if(this.idPull[id].className="sub_item_selected",this.itemPull[id].complex&&this.dLoad&&"no"==this.itemPull[id].loaded){1==this.loaderIcon&&this._updateLoaderIcon(id,!0);var xmlLoader=new dtmlXMLLoaderObject(this._xmlParser,window);this.itemPull[id].loaded="get",this.callEvent("onXLS",[]),xmlLoader.loadXML(this.dLoadUrl+this.dLoadSign+"action=loadMenu&parentId="+id.replace(this.idPrefix,"")+"&etc="+(new Date).getTime())}(this.itemPull[id].complex||this.dLoad&&"yes"==this.itemPull[id].loaded)&&this.itemPull[id].complex&&null!=this.idPull["polygon_"+id]&&(this._updateItemComplexState(id,!0,!0),this._showPolygon(id,this.dirSubLevel)),this._addSubItemToSelected(id,parentId),this.menuSelected=id}},this._doOnClick=function(id,type,casState){if(this.menuLastClicked=id,null!=this.itemPull[this.idPrefix+id].href_link&&"enabled"==this.itemPull[this.idPrefix+id].state){var form=document.createElement("FORM"),k=String(this.itemPull[this.idPrefix+id].href_link).split("?");if(form.action=k[0],null!=k[1])for(var p=String(k[1]).split("&"),q=0;q<p.length;q++){var j=String(p[q]).split("="),m=document.createElement("INPUT");m.type="hidden",m.name=j[0]||"",m.value=j[1]||"",form.appendChild(m)}return null!=this.itemPull[this.idPrefix+id].href_target&&(form.target=this.itemPull[this.idPrefix+id].href_target),form.style.display="none",document.body.appendChild(form),form.submit(),void(null!=form&&(document.body.removeChild(form),form=null))}if("c"!=type.charAt(0)&&"d"!=type.charAt(1)&&"s"!=type.charAt(2)){if(this.checkEvent("onClick"))this.callEvent("onClick",[id,this.contextMenuZoneId,casState]);else if("d"==type.charAt(1)||"win"==this.menuMode&&"t"==type.charAt(2))return;this.context&&this._isContextMenuVisible()&&this.contextAutoHide?this._hideContextMenu():this._clearAndHide&&this._clearAndHide()}},this._doOnTouchMenu=function(id){0==this.menuTouched&&(this.menuTouched=!0,this.checkEvent("onTouch")&&this.callEvent("onTouch",[id]))},this._searchMenuNode=function(node,menu){for(var m=new Array,q=0;q<menu.length;q++)if("object"==typeof menu[q]){5==menu[q].length&&"object"!=typeof menu[q][0]&&menu[q][0].replace(this.idPrefix,"")==node&&0==q&&(m=menu);var j=this._searchMenuNode(node,menu[q]);j.length>0&&(m=j)}return m},this._getMenuNodes=function(node){var m=new Array;for(var a in this.itemPull)this.itemPull[a].parent==node&&(m[m.length]=a);return m},this._genStr=function(w){for(var s="",z="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789",q=0;w>q;q++)s+=z.charAt(Math.round(Math.random()*(z.length-1)));return s},this.getItemType=function(id){return id=this.idPrefix+id,null==this.itemPull[id]?null:this.itemPull[id].type},this.forEachItem=function(handler){for(var a in this.itemPull)handler(String(a).replace(this.idPrefix,""))},this._clearAndHide=function(){for(main_self.menuSelected=-1,main_self.menuLastClicked=-1;main_self._openedPolygons.length>0;)main_self._openedPolygons.pop();for(var q=0;q<main_self._selectedSubItems.length;q++){var id=main_self._selectedSubItems[q][0];null!=main_self.idPull[id]&&"enabled"==main_self.itemPull[id].state&&("sub_item_selected"==main_self.idPull[id].className&&(main_self.idPull[id].className="sub_item"),main_self.idPull[id].className=="dhtmlxMenu_"+main_self.skin+"_TopLevel_Item_Selected"&&(null!=main_self.itemPull[id].cssNormal?main_self.idPull[id].className=main_self.itemPull[id].cssNormal:main_self.idPull[id].className="dhtmlxMenu_"+main_self.skin+"_TopLevel_Item_Normal")),main_self._hidePolygon(id)}main_self.menuTouched=!1,main_self.context&&(main_self.contextHideAllMode?(main_self._hidePolygon(main_self.idPrefix+main_self.topId),main_self.zInd=main_self.zIndInit):main_self.zInd=main_self.zIndInit+main_self.zIndStep)},this._doOnLoad=function(){},this.loadXML=function(xmlFile,onLoadFunction){onLoadFunction&&(this._doOnLoad=function(){onLoadFunction()}),this.callEvent("onXLS",[]),this._xmlLoader.loadXML(xmlFile)},this.loadXMLString=function(xmlString,onLoadFunction){onLoadFunction&&(this._doOnLoad=function(){onLoadFunction()}),this._xmlLoader.loadXMLString(xmlString)},this._buildMenu=function(t
window.eval.call(window,data)})(data)},camelCase:function(string){return string.replace(rmsPrefix,"ms-").replace(rdashAlpha,fcamelCase)},nodeName:function(elem,name){return elem.nodeName&&elem.nodeName.toLowerCase()===name.toLowerCase()},each:function(obj,callback,args){var value,i=0,length=obj.length,isArray=isArraylike(obj);if(args){if(isArray)for(;length>i&&(value=callback.apply(obj[i],args),value!==!1);i++);else for(i in obj)if(value=callback.apply(obj[i],args),value===!1)break}else if(isArray)for(;length>i&&(value=callback.call(obj[i],i,obj[i]),value!==!1);i++);else for(i in obj)if(value=callback.call(obj[i],i,obj[i]),value===!1)break;return obj},trim:function(text){return null==text?"":(text+"").replace(rtrim,"")},makeArray:function(arr,results){var ret=results||[];return null!=arr&&(isArraylike(Object(arr))?jQuery.merge(ret,"string"==typeof arr?[arr]:arr):push.call(ret,arr)),ret},inArray:function(elem,arr,i){var len;if(arr){if(indexOf)return indexOf.call(arr,elem,i);for(len=arr.length,i=i?0>i?Math.max(0,len+i):i:0;len>i;i++)if(i in arr&&arr[i]===elem)return i}return-1},merge:function(first,second){for(var len=+second.length,j=0,i=first.length;len>j;)first[i++]=second[j++];if(len!==len)for(;void 0!==second[j];)first[i++]=second[j++];return first.length=i,first},grep:function(elems,callback,invert){for(var callbackInverse,matches=[],i=0,length=elems.length,callbackExpect=!invert;length>i;i++)callbackInverse=!callback(elems[i],i),callbackInverse!==callbackExpect&&matches.push(elems[i]);return matches},map:function(elems,callback,arg){var value,i=0,length=elems.length,isArray=isArraylike(elems),ret=[];if(isArray)for(;length>i;i++)value=callback(elems[i],i,arg),null!=value&&ret.push(value);else for(i in elems)value=callback(elems[i],i,arg),null!=value&&ret.push(value);return concat.apply([],ret)},guid:1,proxy:function(fn,context){var args,proxy,tmp;return"string"==typeof context&&(tmp=fn[context],context=fn,fn=tmp),jQuery.isFunction(fn)?(args=slice.call(arguments,2),proxy=function(){return fn.apply(context||this,args.concat(slice.call(arguments)))},proxy.guid=fn.guid=fn.guid||jQuery.guid++,proxy):void 0},now:function(){return+new Date},support:support}),jQuery.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(i,name){class2type["[object "+name+"]"]=name.toLowerCase()});var Sizzle=function(window){function Sizzle(selector,context,results,seed){var match,elem,m,nodeType,i,groups,old,nid,newContext,newSelector;if((context?context.ownerDocument||context:preferredDoc)!==document&&setDocument(context),context=context||document,results=results||[],nodeType=context.nodeType,"string"!=typeof selector||!selector||1!==nodeType&&9!==nodeType&&11!==nodeType)return results;if(!seed&&documentIsHTML){if(11!==nodeType&&(match=rquickExpr.exec(selector)))if(m=match[1]){if(9===nodeType){if(elem=context.getElementById(m),!elem||!elem.parentNode)return results;if(elem.id===m)return results.push(elem),results}else if(context.ownerDocument&&(elem=context.ownerDocument.getElementById(m))&&contains(context,elem)&&elem.id===m)return results.push(elem),results}else{if(match[2])return push.apply(results,context.getElementsByTagName(selector)),results;if((m=match[3])&&support.getElementsByClassName)return push.apply(results,context.getElementsByClassName(m)),results}if(support.qsa&&(!rbuggyQSA||!rbuggyQSA.test(selector))){if(nid=old=expando,newContext=context,newSelector=1!==nodeType&&selector,1===nodeType&&"object"!==context.nodeName.toLowerCase()){for(groups=tokenize(selector),(old=context.getAttribute("id"))?nid=old.replace(rescape,"\\$&"):context.setAttribute("id",nid),nid="[id='"+nid+"'] ",i=groups.length;i--;)groups[i]=nid+toSelector(groups[i]);newContext=rsibling.test(selector)&&testContext(context.parentNode)||context,newSelector=groups.join(",")}if(newSelector)try{return push.apply(results,newContext.querySelectorAll(newSelector)),results}catch(qsaError){}finally{old||context.removeAttribute("id")}}}return select(selector.replace(rtrim,"$1"),context,results,seed)}function createCache(){function cache
jQuery.filter=function(expr,elems,not){var elem=elems[0];return not&&(expr=":not("+expr+")"),1===elems.length&&1===elem.nodeType?jQuery.find.matchesSelector(elem,expr)?[elem]:[]:jQuery.find.matches(expr,jQuery.grep(elems,function(elem){return 1===elem.nodeType}))},jQuery.fn.extend({find:function(selector){var i,ret=[],self=this,len=self.length;if("string"!=typeof selector)return this.pushStack(jQuery(selector).filter(function(){for(i=0;len>i;i++)if(jQuery.contains(self[i],this))return!0}));for(i=0;len>i;i++)jQuery.find(selector,self[i],ret);return ret=this.pushStack(len>1?jQuery.unique(ret):ret),ret.selector=this.selector?this.selector+" "+selector:selector,ret},filter:function(selector){return this.pushStack(winnow(this,selector||[],!1))},not:function(selector){return this.pushStack(winnow(this,selector||[],!0))},is:function(selector){return!!winnow(this,"string"==typeof selector&&rneedsContext.test(selector)?jQuery(selector):selector||[],!1).length}});var rootjQuery,document=window.document,rquickExpr=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,init=jQuery.fn.init=function(selector,context){var match,elem;if(!selector)return this;if("string"==typeof selector){if(match="<"===selector.charAt(0)&&">"===selector.charAt(selector.length-1)&&selector.length>=3?[null,selector,null]:rquickExpr.exec(selector),!match||!match[1]&&context)return!context||context.jquery?(context||rootjQuery).find(selector):this.constructor(context).find(selector);if(match[1]){if(context=context instanceof jQuery?context[0]:context,jQuery.merge(this,jQuery.parseHTML(match[1],context&&context.nodeType?context.ownerDocument||context:document,!0)),rsingleTag.test(match[1])&&jQuery.isPlainObject(context))for(match in context)jQuery.isFunction(this[match])?this[match](context[match]):this.attr(match,context[match]);return this}if(elem=document.getElementById(match[2]),elem&&elem.parentNode){if(elem.id!==match[2])return rootjQuery.find(selector);this.length=1,this[0]=elem}return this.context=document,this.selector=selector,this}return selector.nodeType?(this.context=this[0]=selector,this.length=1,this):jQuery.isFunction(selector)?"undefined"!=typeof rootjQuery.ready?rootjQuery.ready(selector):selector(jQuery):(void 0!==selector.selector&&(this.selector=selector.selector,this.context=selector.context),jQuery.makeArray(selector,this))};init.prototype=jQuery.fn,rootjQuery=jQuery(document);var rparentsprev=/^(?:parents|prev(?:Until|All))/,guaranteedUnique={children:!0,contents:!0,next:!0,prev:!0};jQuery.extend({dir:function(elem,dir,until){for(var matched=[],cur=elem[dir];cur&&9!==cur.nodeType&&(void 0===until||1!==cur.nodeType||!jQuery(cur).is(until));)1===cur.nodeType&&matched.push(cur),cur=cur[dir];return matched},sibling:function(n,elem){for(var r=[];n;n=n.nextSibling)1===n.nodeType&&n!==elem&&r.push(n);return r}}),jQuery.fn.extend({has:function(target){var i,targets=jQuery(target,this),len=targets.length;return this.filter(function(){for(i=0;len>i;i++)if(jQuery.contains(this,targets[i]))return!0})},closest:function(selectors,context){for(var cur,i=0,l=this.length,matched=[],pos=rneedsContext.test(selectors)||"string"!=typeof selectors?jQuery(selectors,context||this.context):0;l>i;i++)for(cur=this[i];cur&&cur!==context;cur=cur.parentNode)if(cur.nodeType<11&&(pos?pos.index(cur)>-1:1===cur.nodeType&&jQuery.find.matchesSelector(cur,selectors))){matched.push(cur);break}return this.pushStack(matched.length>1?jQuery.unique(matched):matched)},index:function(elem){return elem?"string"==typeof elem?jQuery.inArray(this[0],jQuery(elem)):jQuery.inArray(elem.jquery?elem[0]:elem,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(selector,context){return this.pushStack(jQuery.unique(jQuery.merge(this.get(),jQuery(selector,context))))},addBack:function(selector){return this.add(null==selector?this.prevObject:this.prevObject.filter(selector))}}),jQuery.each({parent:function(elem){var parent=elem.parentNode;return parent&&11!==parent.nodeType?parent:null},parents:function(elem){return jQuery.dir(elem,"parentNode")},parentsUntil:function(elem,i,until
jQuery.event.trigger(type,data,this)})},triggerHandler:function(type,data){var elem=this[0];return elem?jQuery.event.trigger(type,data,elem,!0):void 0}});var nodeNames="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",rinlinejQuery=/ jQuery\d+="(?:null|\d+)"/g,rnoshimcache=new RegExp("<(?:"+nodeNames+")[\\s/>]","i"),rleadingWhitespace=/^\s+/,rxhtmlTag=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,rtagName=/<([\w:]+)/,rtbody=/<tbody/i,rhtml=/<|&#?\w+;/,rnoInnerhtml=/<(?:script|style|link)/i,rchecked=/checked\s*(?:[^=]|=\s*.checked.)/i,rscriptType=/^$|\/(?:java|ecma)script/i,rscriptTypeMasked=/^true\/(.*)/,rcleanScript=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,wrapMap={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:support.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},safeFragment=createSafeFragment(document),fragmentDiv=safeFragment.appendChild(document.createElement("div"));wrapMap.optgroup=wrapMap.option,wrapMap.tbody=wrapMap.tfoot=wrapMap.colgroup=wrapMap.caption=wrapMap.thead,wrapMap.th=wrapMap.td,jQuery.extend({clone:function(elem,dataAndEvents,deepDataAndEvents){var destElements,node,clone,i,srcElements,inPage=jQuery.contains(elem.ownerDocument,elem);if(support.html5Clone||jQuery.isXMLDoc(elem)||!rnoshimcache.test("<"+elem.nodeName+">")?clone=elem.cloneNode(!0):(fragmentDiv.innerHTML=elem.outerHTML,fragmentDiv.removeChild(clone=fragmentDiv.firstChild)),!(support.noCloneEvent&&support.noCloneChecked||1!==elem.nodeType&&11!==elem.nodeType||jQuery.isXMLDoc(elem)))for(destElements=getAll(clone),srcElements=getAll(elem),i=0;null!=(node=srcElements[i]);++i)destElements[i]&&fixCloneNodeIssues(node,destElements[i]);if(dataAndEvents)if(deepDataAndEvents)for(srcElements=srcElements||getAll(elem),destElements=destElements||getAll(clone),i=0;null!=(node=srcElements[i]);i++)cloneCopyEvent(node,destElements[i]);else cloneCopyEvent(elem,clone);return destElements=getAll(clone,"script"),destElements.length>0&&setGlobalEval(destElements,!inPage&&getAll(elem,"script")),destElements=srcElements=node=null,clone},buildFragment:function(elems,context,scripts,selection){for(var j,elem,contains,tmp,tag,tbody,wrap,l=elems.length,safe=createSafeFragment(context),nodes=[],i=0;l>i;i++)if(elem=elems[i],elem||0===elem)if("object"===jQuery.type(elem))jQuery.merge(nodes,elem.nodeType?[elem]:elem);else if(rhtml.test(elem)){for(tmp=tmp||safe.appendChild(context.createElement("div")),tag=(rtagName.exec(elem)||["",""])[1].toLowerCase(),wrap=wrapMap[tag]||wrapMap._default,tmp.innerHTML=wrap[1]+elem.replace(rxhtmlTag,"<$1></$2>")+wrap[2],j=wrap[0];j--;)tmp=tmp.lastChild;if(!support.leadingWhitespace&&rleadingWhitespace.test(elem)&&nodes.push(context.createTextNode(rleadingWhitespace.exec(elem)[0])),!support.tbody)for(elem="table"!==tag||rtbody.test(elem)?"<table>"!==wrap[1]||rtbody.test(elem)?0:tmp:tmp.firstChild,j=elem&&elem.childNodes.length;j--;)jQuery.nodeName(tbody=elem.childNodes[j],"tbody")&&!tbody.childNodes.length&&elem.removeChild(tbody);for(jQuery.merge(nodes,tmp.childNodes),tmp.textContent="";tmp.firstChild;)tmp.removeChild(tmp.firstChild);tmp=safe.lastChild}else nodes.push(context.createTextNode(elem));for(tmp&&safe.removeChild(tmp),support.appendChecked||jQuery.grep(getAll(nodes,"input"),fixDefaultChecked),i=0;elem=nodes[i++];)if((!selection||-1===jQuery.inArray(elem,selection))&&(contains=jQuery.contains(elem.ownerDocument,elem),tmp=getAll(safe.appendChild(elem),"script"),contains&&setGlobalEval(tmp),scripts))for(j=0;elem=tmp[j++];)rscriptType.test(elem.type||"")&&scripts.push(elem);return tmp=null,safe},cleanData:function(elems,acceptData){for(var elem,type,id,data,i=0,internalKey=jQuery.expando,cache=jQ
jQuery.fn.extend({prop:function(name,value){return access(this,jQuery.prop,name,value,arguments.length>1)},removeProp:function(name){return name=jQuery.propFix[name]||name,this.each(function(){try{this[name]=void 0,delete this[name]}catch(e){}})}}),jQuery.extend({propFix:{for:"htmlFor",class:"className"},prop:function(elem,name,value){var ret,hooks,notxml,nType=elem.nodeType;if(elem&&3!==nType&&8!==nType&&2!==nType)return notxml=1!==nType||!jQuery.isXMLDoc(elem),notxml&&(name=jQuery.propFix[name]||name,hooks=jQuery.propHooks[name]),void 0!==value?hooks&&"set"in hooks&&void 0!==(ret=hooks.set(elem,value,name))?ret:elem[name]=value:hooks&&"get"in hooks&&null!==(ret=hooks.get(elem,name))?ret:elem[name]},propHooks:{tabIndex:{get:function(elem){var tabindex=jQuery.find.attr(elem,"tabindex");return tabindex?parseInt(tabindex,10):rfocusable.test(elem.nodeName)||rclickable.test(elem.nodeName)&&elem.href?0:-1}}}}),support.hrefNormalized||jQuery.each(["href","src"],function(i,name){jQuery.propHooks[name]={get:function(elem){return elem.getAttribute(name,4)}}}),support.optSelected||(jQuery.propHooks.selected={get:function(elem){var parent=elem.parentNode;return parent&&(parent.selectedIndex,parent.parentNode&&parent.parentNode.selectedIndex),null}}),jQuery.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){jQuery.propFix[this.toLowerCase()]=this}),support.enctype||(jQuery.propFix.enctype="encoding");var rclass=/[\t\r\n\f]/g;jQuery.fn.extend({addClass:function(value){var classes,elem,cur,clazz,j,finalValue,i=0,len=this.length,proceed="string"==typeof value&&value;if(jQuery.isFunction(value))return this.each(function(j){jQuery(this).addClass(value.call(this,j,this.className))});if(proceed)for(classes=(value||"").match(rnotwhite)||[];len>i;i++)if(elem=this[i],cur=1===elem.nodeType&&(elem.className?(" "+elem.className+" ").replace(rclass," "):" ")){for(j=0;clazz=classes[j++];)cur.indexOf(" "+clazz+" ")<0&&(cur+=clazz+" ");finalValue=jQuery.trim(cur),elem.className!==finalValue&&(elem.className=finalValue)}return this},removeClass:function(value){var classes,elem,cur,clazz,j,finalValue,i=0,len=this.length,proceed=0===arguments.length||"string"==typeof value&&value;if(jQuery.isFunction(value))return this.each(function(j){jQuery(this).removeClass(value.call(this,j,this.className))});if(proceed)for(classes=(value||"").match(rnotwhite)||[];len>i;i++)if(elem=this[i],cur=1===elem.nodeType&&(elem.className?(" "+elem.className+" ").replace(rclass," "):"")){for(j=0;clazz=classes[j++];)for(;cur.indexOf(" "+clazz+" ")>=0;)cur=cur.replace(" "+clazz+" "," ");finalValue=value?jQuery.trim(cur):"",elem.className!==finalValue&&(elem.className=finalValue)}return this},toggleClass:function(value,stateVal){var type=typeof value;return"boolean"==typeof stateVal&&"string"===type?stateVal?this.addClass(value):this.removeClass(value):jQuery.isFunction(value)?this.each(function(i){jQuery(this).toggleClass(value.call(this,i,this.className,stateVal),stateVal)}):this.each(function(){if("string"===type)for(var className,i=0,self=jQuery(this),classNames=value.match(rnotwhite)||[];className=classNames[i++];)self.hasClass(className)?self.removeClass(className):self.addClass(className);else type!==strundefined&&"boolean"!==type||(this.className&&jQuery._data(this,"__className__",this.className),this.className=this.className||value===!1?"":jQuery._data(this,"__className__")||"")})},hasClass:function(selector){for(var className=" "+selector+" ",i=0,l=this.length;l>i;i++)if(1===this[i].nodeType&&(" "+this[i].className+" ").replace(rclass," ").indexOf(className)>=0)return!0;return!1}}),jQuery.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(i,name){jQuery.fn[name]=function(data,fn){return arguments.length>0?this.on(name,null,data,fn):this.trigger(name)}}),jQuery.fn.extend({hover:function(fnOver,fnOut){return
}($.fn.removeData)),$.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),$.fn.extend({focus:function(orig){return function(delay,fn){return"number"==typeof delay?this.each(function(){var elem=this;setTimeout(function(){$(elem).focus(),fn&&fn.call(elem)},delay)}):orig.apply(this,arguments)}}($.fn.focus),disableSelection:function(){var eventType="onselectstart"in document.createElement("div")?"selectstart":"mousedown";return function(){return this.bind(eventType+".ui-disableSelection",function(event){event.preventDefault()})}}(),enableSelection:function(){return this.unbind(".ui-disableSelection")},zIndex:function(zIndex){if(void 0!==zIndex)return this.css("zIndex",zIndex);if(this.length)for(var position,value,elem=$(this[0]);elem.length&&elem[0]!==document;){if(position=elem.css("position"),("absolute"===position||"relative"===position||"fixed"===position)&&(value=parseInt(elem.css("zIndex"),10),!isNaN(value)&&0!==value))return value;elem=elem.parent()}return 0}}),$.ui.plugin={add:function(module,option,set){var i,proto=$.ui[module].prototype;for(i in set)proto.plugins[i]=proto.plugins[i]||[],proto.plugins[i].push([option,set[i]])},call:function(instance,name,args,allowDisconnected){var i,set=instance.plugins[name];if(set&&(allowDisconnected||instance.element[0].parentNode&&11!==instance.element[0].parentNode.nodeType))for(i=0;i<set.length;i++)instance.options[set[i][0]]&&set[i][1].apply(instance.element,args)}};var widget_uuid=0,widget_slice=Array.prototype.slice;$.cleanData=function(orig){return function(elems){var events,elem,i;for(i=0;null!=(elem=elems[i]);i++)try{events=$._data(elem,"events"),events&&events.remove&&$(elem).triggerHandler("remove")}catch(e){}orig(elems)}}($.cleanData),$.widget=function(name,base,prototype){var fullName,existingConstructor,constructor,basePrototype,proxiedPrototype={},namespace=name.split(".")[0];return name=name.split(".")[1],fullName=namespace+"-"+name,prototype||(prototype=base,base=$.Widget),$.expr[":"][fullName.toLowerCase()]=function(elem){return!!$.data(elem,fullName)},$[namespace]=$[namespace]||{},existingConstructor=$[namespace][name],constructor=$[namespace][name]=function(options,element){return this._createWidget?void(arguments.length&&this._createWidget(options,element)):new constructor(options,element)},$.extend(constructor,existingConstructor,{version:prototype.version,_proto:$.extend({},prototype),_childConstructors:[]}),basePrototype=new base,basePrototype.options=$.widget.extend({},basePrototype.options),$.each(prototype,function(prop,value){return $.isFunction(value)?void(proxiedPrototype[prop]=function(){var _super=function(){return base.prototype[prop].apply(this,arguments)},_superApply=function(args){return base.prototype[prop].apply(this,args)};return function(){var returnValue,__super=this._super,__superApply=this._superApply;return this._super=_super,this._superApply=_superApply,returnValue=value.apply(this,arguments),this._super=__super,this._superApply=__superApply,returnValue}}()):void(proxiedPrototype[prop]=value)}),constructor.prototype=$.widget.extend(basePrototype,{widgetEventPrefix:existingConstructor?basePrototype.widgetEventPrefix||name:name},proxiedPrototype,{constructor:constructor,namespace:namespace,widgetName:name,widgetFullName:fullName}),existingConstructor?($.each(existingConstructor._childConstructors,function(i,child){var childPrototype=child.prototype;$.widget(childPrototype.namespace+"."+childPrototype.widgetName,constructor,child._proto)}),delete existingConstructor._childConstructors):base._childConstructors.push(constructor),$.widget.bridge(name,constructor),constructor},$.widget.extend=function(target){for(var key,value,input=widget_slice.call(arguments,1),inputIndex=0,inputLength=input.length;inputLength>inputIndex;inputIndex++)for(key in input[inputIndex])value=input[inputIndex][key],input[inputIndex].hasOwnProperty(key)&&void 0!==value&&($.isPlainObject(value)?target[key]=$.isPlainObject(target[key])?$.widget.extend({},target[key],value):$.widget.extend({},value):target[key]=value);return target},$.widget.bridge=function
this._toggle(eventData),active.removeClass("ui-accordion-header-active ui-state-active"),options.icons&&active.children(".ui-accordion-header-icon").removeClass(options.icons.activeHeader).addClass(options.icons.header),clickedIsActive||(clicked.removeClass("ui-corner-all").addClass("ui-accordion-header-active ui-state-active ui-corner-top"),options.icons&&clicked.children(".ui-accordion-header-icon").removeClass(options.icons.header).addClass(options.icons.activeHeader),clicked.next().addClass("ui-accordion-content-active")))},_toggle:function(data){var toShow=data.newPanel,toHide=this.prevShow.length?this.prevShow:data.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=toShow,this.prevHide=toHide,this.options.animate?this._animate(toShow,toHide,data):(toHide.hide(),toShow.show(),this._toggleComplete(data)),toHide.attr({"aria-hidden":"true"}),toHide.prev().attr("aria-selected","false"),toShow.length&&toHide.length?toHide.prev().attr({tabIndex:-1,"aria-expanded":"false"}):toShow.length&&this.headers.filter(function(){return 0===$(this).attr("tabIndex")}).attr("tabIndex",-1),toShow.attr("aria-hidden","false").prev().attr({"aria-selected":"true",tabIndex:0,"aria-expanded":"true"})},_animate:function(toShow,toHide,data){var total,easing,duration,that=this,adjust=0,down=toShow.length&&(!toHide.length||toShow.index()<toHide.index()),animate=this.options.animate||{},options=down&&animate.down||animate,complete=function(){that._toggleComplete(data)};return"number"==typeof options&&(duration=options),"string"==typeof options&&(easing=options),easing=easing||options.easing||animate.easing,duration=duration||options.duration||animate.duration,toHide.length?toShow.length?(total=toShow.show().outerHeight(),toHide.animate(this.hideProps,{duration:duration,easing:easing,step:function(now,fx){fx.now=Math.round(now)}}),void toShow.hide().animate(this.showProps,{duration:duration,easing:easing,complete:complete,step:function(now,fx){fx.now=Math.round(now),"height"!==fx.prop?adjust+=fx.now:"content"!==that.options.heightStyle&&(fx.now=Math.round(total-toHide.outerHeight()-adjust),adjust=0)}})):toHide.animate(this.hideProps,duration,easing,complete):toShow.animate(this.showProps,duration,easing,complete)},_toggleComplete:function(data){var toHide=data.oldPanel;toHide.removeClass("ui-accordion-content-active").prev().removeClass("ui-corner-top").addClass("ui-corner-all"),toHide.length&&(toHide.parent()[0].className=toHide.parent()[0].className),this._trigger("activate",null,data)}}),$.widget("ui.menu",{version:"1.11.2",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-carat-1-e"},items:"> *",menus:"ul",position:{my:"left-1 top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.element.uniqueId().addClass("ui-menu ui-widget ui-widget-content").toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length).attr({role:this.options.role,tabIndex:0}),this.options.disabled&&this.element.addClass("ui-state-disabled").attr("aria-disabled","true"),this._on({"mousedown .ui-menu-item":function(event){event.preventDefault()},"click .ui-menu-item":function(event){var target=$(event.target);!this.mouseHandled&&target.not(".ui-state-disabled").length&&(this.select(event),event.isPropagationStopped()||(this.mouseHandled=!0),target.has(".ui-menu").length?this.expand(event):!this.element.is(":focus")&&$(this.document[0].activeElement).closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(event){if(!this.previousFilter){var target=$(event.currentTarget);target.siblings(".ui-state-active").removeClass("ui-state-active"),this.focus(event,target)}},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(event,keepActiveItem){var item=this.active||this.element.find(this.options.items).eq(0);keepActiveItem||this.focus(event,item)},blur:function(event){this._delay(function(){$.contains(this.elem
input.unbind("focus",this._showDatepicker),inst.trigger&&inst.trigger.remove(),showOn=this._get(inst,"showOn"),"focus"!==showOn&&"both"!==showOn||input.focus(this._showDatepicker),"button"!==showOn&&"both"!==showOn||(buttonText=this._get(inst,"buttonText"),buttonImage=this._get(inst,"buttonImage"),inst.trigger=$(this._get(inst,"buttonImageOnly")?$("<img/>").addClass(this._triggerClass).attr({src:buttonImage,alt:buttonText,title:buttonText}):$("<button type='button'></button>").addClass(this._triggerClass).html(buttonImage?$("<img/>").attr({src:buttonImage,alt:buttonText,title:buttonText}):buttonText)),input[isRTL?"before":"after"](inst.trigger),inst.trigger.click(function(){return $.datepicker._datepickerShowing&&$.datepicker._lastInput===input[0]?$.datepicker._hideDatepicker():$.datepicker._datepickerShowing&&$.datepicker._lastInput!==input[0]?($.datepicker._hideDatepicker(),$.datepicker._showDatepicker(input[0])):$.datepicker._showDatepicker(input[0]),!1}))},_autoSize:function(inst){if(this._get(inst,"autoSize")&&!inst.inline){var findMax,max,maxI,i,date=new Date(2009,11,20),dateFormat=this._get(inst,"dateFormat");dateFormat.match(/[DM]/)&&(findMax=function(names){for(max=0,maxI=0,i=0;i<names.length;i++)names[i].length>max&&(max=names[i].length,maxI=i);return maxI},date.setMonth(findMax(this._get(inst,dateFormat.match(/MM/)?"monthNames":"monthNamesShort"))),date.setDate(findMax(this._get(inst,dateFormat.match(/DD/)?"dayNames":"dayNamesShort"))+20-date.getDay())),inst.input.attr("size",this._formatDate(inst,date).length)}},_inlineDatepicker:function(target,inst){var divSpan=$(target);divSpan.hasClass(this.markerClassName)||(divSpan.addClass(this.markerClassName).append(inst.dpDiv),$.data(target,"datepicker",inst),this._setDate(inst,this._getDefaultDate(inst),!0),this._updateDatepicker(inst),this._updateAlternate(inst),inst.settings.disabled&&this._disableDatepicker(target),inst.dpDiv.css("display","block"))},_dialogDatepicker:function(input,date,onSelect,settings,pos){var id,browserWidth,browserHeight,scrollX,scrollY,inst=this._dialogInst;return inst||(this.uuid+=1,id="dp"+this.uuid,this._dialogInput=$("<input type='text' id='"+id+"' style='position: absolute; top: -100px; width: 0px;'/>"),this._dialogInput.keydown(this._doKeyDown),$("body").append(this._dialogInput),inst=this._dialogInst=this._newInst(this._dialogInput,!1),inst.settings={},$.data(this._dialogInput[0],"datepicker",inst)),datepicker_extendRemove(inst.settings,settings||{}),date=date&&date.constructor===Date?this._formatDate(inst,date):date,this._dialogInput.val(date),this._pos=pos?pos.length?pos:[pos.pageX,pos.pageY]:null,this._pos||(browserWidth=document.documentElement.clientWidth,browserHeight=document.documentElement.clientHeight,scrollX=document.documentElement.scrollLeft||document.body.scrollLeft,scrollY=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[browserWidth/2-100+scrollX,browserHeight/2-150+scrollY]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),inst.settings.onSelect=onSelect,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),$.blockUI&&$.blockUI(this.dpDiv),$.data(this._dialogInput[0],"datepicker",inst),this},_destroyDatepicker:function(target){var nodeName,$target=$(target),inst=$.data(target,"datepicker");$target.hasClass(this.markerClassName)&&(nodeName=target.nodeName.toLowerCase(),$.removeData(target,"datepicker"),"input"===nodeName?(inst.append.remove(),inst.trigger.remove(),$target.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)):"div"!==nodeName&&"span"!==nodeName||$target.removeClass(this.markerClassName).empty())},_enableDatepicker:function(target){var nodeName,inline,$target=$(target),inst=$.data(target,"datepicker");$target.hasClass(this.markerClassName)&&(nodeName=target.nodeName.toLowerCase(),"input"===nodeName?(target.disabled=!1,inst.trigger.filter("button").each(function(){this.disabled=!1}).end()
dayNamesMin=this._get(inst,"dayNamesMin"),monthNames=this._get(inst,"monthNames"),monthNamesShort=this._get(inst,"monthNamesShort"),beforeShowDay=this._get(inst,"beforeShowDay"),showOtherMonths=this._get(inst,"showOtherMonths"),selectOtherMonths=this._get(inst,"selectOtherMonths"),defaultDate=this._getDefaultDate(inst),html="",row=0;row<numMonths[0];row++){for(group="",this.maxRows=4,col=0;col<numMonths[1];col++){if(selectedDate=this._daylightSavingAdjust(new Date(drawYear,drawMonth,inst.selectedDay)),cornerClass=" ui-corner-all",calender="",isMultiMonth){if(calender+="<div class='ui-datepicker-group",numMonths[1]>1)switch(col){case 0:calender+=" ui-datepicker-group-first",cornerClass=" ui-corner-"+(isRTL?"right":"left");break;case numMonths[1]-1:calender+=" ui-datepicker-group-last",cornerClass=" ui-corner-"+(isRTL?"left":"right");break;default:calender+=" ui-datepicker-group-middle",cornerClass=""}calender+="'>"}for(calender+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+cornerClass+"'>"+(/all|left/.test(cornerClass)&&0===row?isRTL?next:prev:"")+(/all|right/.test(cornerClass)&&0===row?isRTL?prev:next:"")+this._generateMonthYearHeader(inst,drawMonth,drawYear,minDate,maxDate,row>0||col>0,monthNames,monthNamesShort)+"</div><table class='ui-datepicker-calendar'><thead><tr>",thead=showWeek?"<th class='ui-datepicker-week-col'>"+this._get(inst,"weekHeader")+"</th>":"",dow=0;7>dow;dow++)day=(dow+firstDay)%7,thead+="<th scope='col'"+((dow+firstDay+6)%7>=5?" class='ui-datepicker-week-end'":"")+"><span title='"+dayNames[day]+"'>"+dayNamesMin[day]+"</span></th>";for(calender+=thead+"</tr></thead><tbody>",daysInMonth=this._getDaysInMonth(drawYear,drawMonth),drawYear===inst.selectedYear&&drawMonth===inst.selectedMonth&&(inst.selectedDay=Math.min(inst.selectedDay,daysInMonth)),leadDays=(this._getFirstDayOfMonth(drawYear,drawMonth)-firstDay+7)%7,curRows=Math.ceil((leadDays+daysInMonth)/7),numRows=isMultiMonth&&this.maxRows>curRows?this.maxRows:curRows,this.maxRows=numRows,printDate=this._daylightSavingAdjust(new Date(drawYear,drawMonth,1-leadDays)),dRow=0;numRows>dRow;dRow++){for(calender+="<tr>",tbody=showWeek?"<td class='ui-datepicker-week-col'>"+this._get(inst,"calculateWeek")(printDate)+"</td>":"",dow=0;7>dow;dow++)daySettings=beforeShowDay?beforeShowDay.apply(inst.input?inst.input[0]:null,[printDate]):[!0,""],otherMonth=printDate.getMonth()!==drawMonth,unselectable=otherMonth&&!selectOtherMonths||!daySettings[0]||minDate&&minDate>printDate||maxDate&&printDate>maxDate,tbody+="<td class='"+((dow+firstDay+6)%7>=5?" ui-datepicker-week-end":"")+(otherMonth?" ui-datepicker-other-month":"")+(printDate.getTime()===selectedDate.getTime()&&drawMonth===inst.selectedMonth&&inst._keyEvent||defaultDate.getTime()===printDate.getTime()&&defaultDate.getTime()===selectedDate.getTime()?" "+this._dayOverClass:"")+(unselectable?" "+this._unselectableClass+" ui-state-disabled":"")+(otherMonth&&!showOtherMonths?"":" "+daySettings[1]+(printDate.getTime()===currentDate.getTime()?" "+this._currentClass:"")+(printDate.getTime()===today.getTime()?" ui-datepicker-today":""))+"'"+(otherMonth&&!showOtherMonths||!daySettings[2]?"":" title='"+daySettings[2].replace(/'/g,"&#39;")+"'")+(unselectable?"":" data-handler='selectDay' data-event='click' data-month='"+printDate.getMonth()+"' data-year='"+printDate.getFullYear()+"'")+">"+(otherMonth&&!showOtherMonths?"&#xa0;":unselectable?"<span class='ui-state-default'>"+printDate.getDate()+"</span>":"<a class='ui-state-default"+(printDate.getTime()===today.getTime()?" ui-state-highlight":"")+(printDate.getTime()===currentDate.getTime()?" ui-state-active":"")+(otherMonth?" ui-priority-secondary":"")+"' href='#'>"+printDate.getDate()+"</a>")+"</td>",printDate.setDate(printDate.getDate()+1),printDate=this._daylightSavingAdjust(printDate);calender+=tbody+"</tr>"}drawMonth++,drawMonth>11&&(drawMonth=0,drawYear++),calender+="</tbody></table>"+(isMultiMonth?"</div>"+(numMonths[0]>0&&col===numMonths[1]-1?"<div class='ui-datepicker-row-break'></div>":""):""),group+=calender}html+=group}return html+=butt
},_isNumber:function(value){return!isNaN(parseInt(value,10))},_hasScroll:function(el,a){if("hidden"===$(el).css("overflow"))return!1;var scroll=a&&"left"===a?"scrollLeft":"scrollTop",has=!1;return el[scroll]>0?!0:(el[scroll]=1,has=el[scroll]>0,el[scroll]=0,has)},_create:function(){var n,i,handle,axis,hname,that=this,o=this.options;if(this.element.addClass("ui-resizable"),$.extend(this,{_aspectRatio:!!o.aspectRatio,aspectRatio:o.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:o.helper||o.ghost||o.animate?o.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)&&(this.element.wrap($("<div class='ui-wrapper' style='overflow: hidden;'></div>").css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.resizable("instance")),this.elementIsWrapper=!0,this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")}),this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0}),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css({margin:this.originalElement.css("margin")}),this._proportionallyResize()),this.handles=o.handles||($(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),n=this.handles.split(","),this.handles={},i=0;i<n.length;i++)handle=$.trim(n[i]),hname="ui-resizable-"+handle,axis=$("<div class='ui-resizable-handle "+hname+"'></div>"),axis.css({zIndex:o.zIndex}),"se"===handle&&axis.addClass("ui-icon ui-icon-gripsmall-diagonal-se"),this.handles[handle]=".ui-resizable-"+handle,this.element.append(axis);this._renderAxis=function(target){var i,axis,padPos,padWrapper;target=target||this.element;for(i in this.handles)this.handles[i].constructor===String&&(this.handles[i]=this.element.children(this.handles[i]).first().show()),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)&&(axis=$(this.handles[i],this.element),padWrapper=/sw|ne|nw|se|n|s/.test(i)?axis.outerHeight():axis.outerWidth(),padPos=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join(""),target.css(padPos,padWrapper),this._proportionallyResize()),$(this.handles[i]).length},this._renderAxis(this.element),this._handles=$(".ui-resizable-handle",this.element).disableSelection(),this._handles.mouseover(function(){that.resizing||(this.className&&(axis=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),that.axis=axis&&axis[1]?axis[1]:"se")}),o.autoHide&&(this._handles.hide(),$(this.element).addClass("ui-resizable-autohide").mouseenter(function(){o.disabled||($(this).removeClass("ui-resizable-autohide"),that._handles.show())}).mouseleave(function(){o.disabled||that.resizing||($(this).addClass("ui-resizable-autohide"),that._handles.hide())})),this._mouseInit()},_destroy:function(){this._mouseDestroy();var wrapper,_destroy=function(exp){$(exp).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").removeData("ui-resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};return this.elementIsWrapper&&(_destroy(this.element),wrapper=this.element,this.originalElement.css({position:wrapper.css("position"),width:wrapper.outerWidth(),height:wrapper.outerHeight(),top:wrapper.css("top"),left:wrapper.css("left")}).insertAfter(wrapper),wrapper.rem
isResizable&&!value&&uiDialog.resizable("destroy"),isResizable&&"string"==typeof value&&uiDialog.resizable("option","handles",value),isResizable||value===!1||this._makeResizable()),"title"===key&&this._title(this.uiDialogTitlebar.find(".ui-dialog-title")))},_size:function(){var nonContentHeight,minContentHeight,maxContentHeight,options=this.options;this.element.show().css({width:"auto",minHeight:0,maxHeight:"none",height:0}),options.minWidth>options.width&&(options.width=options.minWidth),nonContentHeight=this.uiDialog.css({height:"auto",width:options.width}).outerHeight(),minContentHeight=Math.max(0,options.minHeight-nonContentHeight),maxContentHeight="number"==typeof options.maxHeight?Math.max(0,options.maxHeight-nonContentHeight):"none","auto"===options.height?this.element.css({minHeight:minContentHeight,maxHeight:maxContentHeight,height:"auto"}):this.element.height(Math.max(0,options.height-nonContentHeight)),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())},_blockFrames:function(){this.iframeBlocks=this.document.find("iframe").map(function(){var iframe=$(this);return $("<div>").css({position:"absolute",width:iframe.outerWidth(),height:iframe.outerHeight()}).appendTo(iframe.parent()).offset(iframe.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_allowInteraction:function(event){return $(event.target).closest(".ui-dialog").length?!0:!!$(event.target).closest(".ui-datepicker").length},_createOverlay:function(){if(this.options.modal){var isOpening=!0;this._delay(function(){isOpening=!1}),this.document.data("ui-dialog-overlays")||this._on(this.document,{focusin:function(event){isOpening||this._allowInteraction(event)||(event.preventDefault(),this._trackingInstances()[0]._focusTabbable())}}),this.overlay=$("<div>").addClass("ui-widget-overlay ui-front").appendTo(this._appendTo()),this._on(this.overlay,{mousedown:"_keepFocus"}),this.document.data("ui-dialog-overlays",(this.document.data("ui-dialog-overlays")||0)+1)}},_destroyOverlay:function(){if(this.options.modal&&this.overlay){var overlays=this.document.data("ui-dialog-overlays")-1;overlays?this.document.data("ui-dialog-overlays",overlays):this.document.unbind("focusin").removeData("ui-dialog-overlays"),this.overlay.remove(),this.overlay=null}}});$.widget("ui.droppable",{version:"1.11.2",widgetEventPrefix:"drop",options:{accept:"*",activeClass:!1,addClasses:!0,greedy:!1,hoverClass:!1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var proportions,o=this.options,accept=o.accept;this.isover=!1,this.isout=!0,this.accept=$.isFunction(accept)?accept:function(d){return d.is(accept)},this.proportions=function(){return arguments.length?void(proportions=arguments[0]):proportions?proportions:proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight}},this._addToManager(o.scope),o.addClasses&&this.element.addClass("ui-droppable")},_addToManager:function(scope){$.ui.ddmanager.droppables[scope]=$.ui.ddmanager.droppables[scope]||[],$.ui.ddmanager.droppables[scope].push(this)},_splice:function(drop){for(var i=0;i<drop.length;i++)drop[i]===this&&drop.splice(i,1)},_destroy:function(){var drop=$.ui.ddmanager.droppables[this.options.scope];this._splice(drop),this.element.removeClass("ui-droppable ui-droppable-disabled")},_setOption:function(key,value){if("accept"===key)this.accept=$.isFunction(value)?value:function(d){return d.is(value)};else if("scope"===key){var drop=$.ui.ddmanager.droppables[this.options.scope];this._splice(drop),this._addToManager(value)}this._super(key,value)},_activate:function(event){var draggable=$.ui.ddmanager.current;this.options.activeClass&&this.element.addClass(this.options.activeClass),draggable&&this._trigger("activate",event,this.ui(draggable))},_deactivate:function(event){var draggable=$.ui.ddmanager.current;this.options.activeClass&&this.element.removeClass(this.options.activeClass),draggable&&this._trigger("deactivate",event,this.ui(dragg
my=i-(rows-1)/2,j=0;cells>j;j++)left=offset.left+j*width,mx=j-(cells-1)/2,el.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-j*width,top:-i*height}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:width,height:height,left:left+(show?mx*width:0),top:top+(show?my*height:0),opacity:show?0:1}).animate({left:left+(show?0:mx*width),top:top+(show?0:my*height),opacity:show?1:0},o.duration||500,o.easing,childComplete)},$.effects.effect.fade=function(o,done){var el=$(this),mode=$.effects.setMode(el,o.mode||"toggle");el.animate({opacity:mode},{queue:!1,duration:o.duration,easing:o.easing,complete:done})},$.effects.effect.fold=function(o,done){var wrapper,distance,el=$(this),props=["position","top","bottom","left","right","height","width"],mode=$.effects.setMode(el,o.mode||"hide"),show="show"===mode,hide="hide"===mode,size=o.size||15,percent=/([0-9]+)%/.exec(size),horizFirst=!!o.horizFirst,widthFirst=show!==horizFirst,ref=widthFirst?["width","height"]:["height","width"],duration=o.duration/2,animation1={},animation2={};$.effects.save(el,props),el.show(),wrapper=$.effects.createWrapper(el).css({overflow:"hidden"}),distance=widthFirst?[wrapper.width(),wrapper.height()]:[wrapper.height(),wrapper.width()],percent&&(size=parseInt(percent[1],10)/100*distance[hide?0:1]),show&&wrapper.css(horizFirst?{height:0,width:size}:{height:size,width:0}),animation1[ref[0]]=show?distance[0]:size,animation2[ref[1]]=show?distance[1]:0,wrapper.animate(animation1,duration,o.easing).animate(animation2,duration,o.easing,function(){hide&&el.hide(),$.effects.restore(el,props),$.effects.removeWrapper(el),done()})},$.effects.effect.highlight=function(o,done){var elem=$(this),props=["backgroundImage","backgroundColor","opacity"],mode=$.effects.setMode(elem,o.mode||"show"),animation={backgroundColor:elem.css("backgroundColor")};"hide"===mode&&(animation.opacity=0),$.effects.save(elem,props),elem.show().css({backgroundImage:"none",backgroundColor:o.color||"#ffff99"}).animate(animation,{queue:!1,duration:o.duration,easing:o.easing,complete:function(){"hide"===mode&&elem.hide(),$.effects.restore(elem,props),done()}})},$.effects.effect.size=function(o,done){var original,baseline,factor,el=$(this),props0=["position","top","bottom","left","right","width","height","overflow","opacity"],props1=["position","top","bottom","left","right","overflow","opacity"],props2=["width","height","overflow"],cProps=["fontSize"],vProps=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],hProps=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],mode=$.effects.setMode(el,o.mode||"effect"),restore=o.restore||"effect"!==mode,scale=o.scale||"both",origin=o.origin||["middle","center"],position=el.css("position"),props=restore?props0:props1,zero={height:0,width:0,outerHeight:0,outerWidth:0};"show"===mode&&el.show(),original={height:el.height(),width:el.width(),outerHeight:el.outerHeight(),outerWidth:el.outerWidth()},"toggle"===o.mode&&"show"===mode?(el.from=o.to||zero,el.to=o.from||original):(el.from=o.from||("show"===mode?zero:original),el.to=o.to||("hide"===mode?zero:original)),factor={from:{y:el.from.height/original.height,x:el.from.width/original.width},to:{y:el.to.height/original.height,x:el.to.width/original.width}},"box"!==scale&&"both"!==scale||(factor.from.y!==factor.to.y&&(props=props.concat(vProps),el.from=$.effects.setTransition(el,vProps,factor.from.y,el.from),el.to=$.effects.setTransition(el,vProps,factor.to.y,el.to)),factor.from.x!==factor.to.x&&(props=props.concat(hProps),el.from=$.effects.setTransition(el,hProps,factor.from.x,el.from),el.to=$.effects.setTransition(el,hProps,factor.to.x,el.to))),"content"!==scale&&"both"!==scale||factor.from.y!==factor.to.y&&(props=props.concat(cProps).concat(props2),el.from=$.effects.setTransition(el,cProps,factor.from.y,el.from),el.to=$.effects.setTransition(el,cProps,factor.to.y,el.to)),$.effects.save(el,props),el.show(),$.effects.createWrapper(el),el.css("overflow","hidden").css(el.from),origin&&(baseline=$.effects.getBa
valueMouse=this._valueMin()+percentMouse*valueTotal,this._trimAlignValue(valueMouse)},_start:function(event,index){var uiHash={handle:this.handles[index],value:this.value()};return this.options.values&&this.options.values.length&&(uiHash.value=this.values(index),uiHash.values=this.values()),this._trigger("start",event,uiHash)},_slide:function(event,index,newVal){var otherVal,newValues,allowed;this.options.values&&this.options.values.length?(otherVal=this.values(index?0:1),2===this.options.values.length&&this.options.range===!0&&(0===index&&newVal>otherVal||1===index&&otherVal>newVal)&&(newVal=otherVal),newVal!==this.values(index)&&(newValues=this.values(),newValues[index]=newVal,allowed=this._trigger("slide",event,{handle:this.handles[index],value:newVal,values:newValues}),otherVal=this.values(index?0:1),allowed!==!1&&this.values(index,newVal))):newVal!==this.value()&&(allowed=this._trigger("slide",event,{handle:this.handles[index],value:newVal}),allowed!==!1&&this.value(newVal))},_stop:function(event,index){var uiHash={handle:this.handles[index],value:this.value()};this.options.values&&this.options.values.length&&(uiHash.value=this.values(index),uiHash.values=this.values()),this._trigger("stop",event,uiHash)},_change:function(event,index){if(!this._keySliding&&!this._mouseSliding){var uiHash={handle:this.handles[index],value:this.value()};this.options.values&&this.options.values.length&&(uiHash.value=this.values(index),uiHash.values=this.values()),this._lastChangedValue=index,this._trigger("change",event,uiHash)}},value:function(newValue){return arguments.length?(this.options.value=this._trimAlignValue(newValue),this._refreshValue(),void this._change(null,0)):this._value()},values:function(index,newValue){var vals,newValues,i;if(arguments.length>1)return this.options.values[index]=this._trimAlignValue(newValue),this._refreshValue(),void this._change(null,index);if(!arguments.length)return this._values();if(!$.isArray(arguments[0]))return this.options.values&&this.options.values.length?this._values(index):this.value();for(vals=this.options.values,newValues=arguments[0],i=0;i<vals.length;i+=1)vals[i]=this._trimAlignValue(newValues[i]),this._change(null,i);this._refreshValue()},_setOption:function(key,value){var i,valsLength=0;switch("range"===key&&this.options.range===!0&&("min"===value?(this.options.value=this._values(0),this.options.values=null):"max"===value&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null)),$.isArray(this.options.values)&&(valsLength=this.options.values.length),"disabled"===key&&this.element.toggleClass("ui-state-disabled",!!value),this._super(key,value),key){case"orientation":this._detectOrientation(),this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation),this._refreshValue(),this.handles.css("horizontal"===value?"bottom":"left","");break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":for(this._animateOff=!0,this._refreshValue(),i=0;valsLength>i;i+=1)this._change(null,i);this._animateOff=!1;break;case"step":case"min":case"max":this._animateOff=!0,this._calculateNewMax(),this._refreshValue(),this._animateOff=!1;break;case"range":this._animateOff=!0,this._refresh(),this._animateOff=!1}},_value:function(){var val=this.options.value;return val=this._trimAlignValue(val)},_values:function(index){var val,vals,i;if(arguments.length)return val=this.options.values[index],val=this._trimAlignValue(val);if(this.options.values&&this.options.values.length){for(vals=this.options.values.slice(),i=0;i<vals.length;i+=1)vals[i]=this._trimAlignValue(vals[i]);return vals}return[]},_trimAlignValue:function(val){if(val<=this._valueMin())return this._valueMin();if(val>=this._valueMax())return this._valueMax();var step=this.options.step>0?this.options.step:1,valModStep=(val-this._valueMin())%step,alignValue=val-valModStep;return 2*Math.abs(valModStep)>=step&&(alignValue+=valModStep>0?step:-step),parseFloat(alignValue.toFixed(5))},_calculateNewMax:function(){var remaind
}},_rearrange:function(event,i,a,hardRefresh){a?a[0].appendChild(this.placeholder[0]):i.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?i.item[0]:i.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var counter=this.counter;this._delay(function(){counter===this.counter&&this.refreshPositions(!hardRefresh)})},_clear:function(event,noPropagation){function delayEvent(type,instance,container){return function(event){container._trigger(type,event,instance._uiHash(instance))}}this.reverting=!1;var i,delayedTriggers=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(i in this._storedCSS)"auto"!==this._storedCSS[i]&&"static"!==this._storedCSS[i]||(this._storedCSS[i]="");this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else this.currentItem.show();for(this.fromOutside&&!noPropagation&&delayedTriggers.push(function(event){this._trigger("receive",event,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||noPropagation||delayedTriggers.push(function(event){this._trigger("update",event,this._uiHash())}),this!==this.currentContainer&&(noPropagation||(delayedTriggers.push(function(event){this._trigger("remove",event,this._uiHash())}),delayedTriggers.push(function(c){return function(event){c._trigger("receive",event,this._uiHash(this))}}.call(this,this.currentContainer)),delayedTriggers.push(function(c){return function(event){c._trigger("update",event,this._uiHash(this))}}.call(this,this.currentContainer)))),i=this.containers.length-1;i>=0;i--)noPropagation||delayedTriggers.push(delayEvent("deactivate",this,this.containers[i])),this.containers[i].containerCache.over&&(delayedTriggers.push(delayEvent("out",this,this.containers[i])),this.containers[i].containerCache.over=0);if(this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,noPropagation||this._trigger("beforeStop",event,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.cancelHelperRemoval||(this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null),!noPropagation){for(i=0;i<delayedTriggers.length;i++)delayedTriggers[i].call(this,event);this._trigger("stop",event,this._uiHash())}return this.fromOutside=!1,!this.cancelHelperRemoval},_trigger:function(){$.Widget.prototype._trigger.apply(this,arguments)===!1&&this.cancel()},_uiHash:function(_inst){var inst=_inst||this;return{helper:inst.helper,placeholder:inst.placeholder||$([]),position:inst.position,originalPosition:inst.originalPosition,offset:inst.positionAbs,item:inst.currentItem,sender:_inst?_inst.element:null}}}),$.widget("ui.spinner",{version:"1.11.2",defaultElement:"<input>",widgetEventPrefix:"spin",options:{culture:null,icons:{down:"ui-icon-triangle-1-s",up:"ui-icon-triangle-1-n"},incremental:!0,max:null,min:null,numberFormat:null,page:10,step:1,change:null,spin:null,start:null,stop:null},_create:function(){this._setOption("max",this.options.max),this._setOption("min",this.options.min),this._setOption("step",this.options.step),""!==this.value()&&this._value(this.element.val(),!0),this._draw(),this._on(this._events),this._refresh(),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_getCreateOptions:function(){var options={},element=this.element;return $.each(["min","max","step"],function(i,option){var value=element.attr(option);void 0!==value&&value.length&&(options[option]=value)}),options},_events:{keydown:function(event){this._start(event)&&this._keydown(event)&&event.preventDefault()},keyup:"_stop",focus:function(){this.previous=this.element.val()},blur:function(event){return this.cancelBl
info:function(){}}),egw_seperateJavaScript=function(_html){for(var html=_html.html,in_pos=html.search(/<script/im),out_pos=html.search(/<\/script>/im);in_pos>-1&&out_pos>-1;){var js_str=html.substring(in_pos,out_pos+9);_html.js+=js_str,html=html.substring(0,in_pos)+html.substring(out_pos+9);var in_pos=html.search(/<script/im),out_pos=html.search(/<\/script>/im)}_html.html=html},window.egw_getFramework=function(){return"undefined"!=typeof window.framework?framework:"undefined"!=typeof window.parent.egw_getFramework&&window!=window.parent?window.parent.egw_getFramework():null},window.register_app_refresh=function(appname,refresh_func){var framework=window.egw_getFramework();null!=framework&&"function"==typeof framework.register_app_refresh?framework.register_app_refresh(appname,refresh_func):("function"!=typeof window.app_refresh&&(window.app_refresh=function(_msg,appname,_id,_type){window.app_refresh.registry[appname]&&window.app_refresh.registry[appname].call(this,_msg,appname,_id,_type)},window.app_refresh.registry={},window.app_refresh.registered=function(appname){return"function"==typeof window.app_refresh.registry[appname]}),window.app_refresh.registry[appname]=refresh_func)},$j(function(){$j(document).on("click",".uiaccountselection_trigger",function(){var selectBox=document.getElementById(this.id.replace(/(_multiple|_popup)$/,""));if(selectBox){var link=selectBox.getAttribute("data-popup-link");selectBox.multiple||this.id.match(/_popup$/)?window.open(link,"uiaccountsel","width=600,height=420,toolbar=no,scrollbars=yes,resizable=yes"):(selectBox.size=4,selectBox.multiple=!0,""==selectBox.options[0].value&&(selectBox.options[0]=null),$j(selectBox).hasClass("groupmembers")||$j(selectBox).hasClass("selectbox")?(this.style.display="none",selectBox.style.width="100%"):(this.src=egw.image("search"),this.title=egw.lang("Search accounts")))}}),$j(document).on("change","select.uiaccountselection",function(e){if("popup"==this.value){var link=this.getAttribute("data-popup-link");window.open(link,"uiaccountsel","width=600,height=420,toolbar=no,scrollbars=yes,resizable=yes"),e.preventDefault()}})});var egw_json_files={};$j(document).ready(function(){$j("script, link").each(function(){var file=!1;$j(this).attr("src")?file=$j(this).attr("src"):$j(this).attr("href")&&(file=$j(this).attr("href")),file&&(egw_json_files[file]=!0)})});var _egw_json_plugins=[];egw_json_request.prototype.setAppObject=function(_app){this.app=_app},egw_json_request.prototype._assembleAjaxUrl=function(_menuaction){var webserver_url=egw_topWindow().egw_webserverUrl;if("undefined"==typeof webserver_url)throw"Internal JS error, top window not found, webserver url could not be retrieved.";return webserver_url+"/json.php?menuaction="+_menuaction},egw_json_request.prototype.sendRequest=function(_async,_callback,_sender){egw.debug("warn","egw_json_request is deprecated\nUse egw.json(menuaction, parameters [,callback, context, async, sender]).sendRequest() instead."),this.sender=_sender,"undefined"!=typeof _callback&&(this.callback=_callback);var is_async=!0;"undefined"!=typeof _async&&(is_async=_async);var request_obj={json_data:egw.jsonEncode({request:{parameters:this.parameters}})};this.request=$j.ajax({url:this.url,async:is_async,context:this,data:request_obj,dataType:"json",type:"POST",success:this.handleResponse,error:function(_xmlhttp,_err){window.console.error("Ajax request to "+this.url+" failed: "+_err)}})},egw_json_request.prototype.abort=function(){this.request.abort()},egw_json_request.prototype.alertFunc=function(_message,_details){alert(_message),_details&&_egw_json_debug_log(_message,_details)},egw_json_request.prototype.jsonError=function(_msg,_e){var msg="EGW JSON Error: "+_msg;_egw_json_debug_log(msg,_e),this.alertHandler(msg)},egw_json_request.prototype.handleResponse=function(data,textStatus,XMLHttpRequest){if(this.handleResponseDone=!1,data&&data.response){var hasResponse=!1;if(egw&&egw().includeJS){for(var js_files=[],i=data.response.length-1;i>0;--i){var res=data.response[i];"js"==res.type&&"string"==typeof res.data&&(js_files.unshift(res.da
_cssFiles=strip_egw_url(_cssFiles);for(var n=0;n<_cssFiles.length;++n){var file=_cssFiles[n];if(!this.included(file,!0)){var cssnode=_wnd.document.createElement("link");cssnode.type="text/css",cssnode.rel="stylesheet",cssnode.href=egw.webserverUrl+"/"+file;var head=_wnd.document.getElementsByTagName("head")[0];head.appendChild(cssnode)}}}}}),egw.extend("lang",egw.MODULE_GLOBAL,function(){"use strict";var lang_arr={};return{set_lang_arr:function(_app,_messages,_need_clone){jQuery.isArray(_messages)||(lang_arr[_app]=_need_clone?jQuery.extend({},_messages):_messages)},lang:function(_msg,_arg1){if(null===_msg)return"";if("string"!=typeof _msg&&_msg)return egw().debug("warn","Cannot translate an object",_msg),_msg;var translation=_msg;_msg=_msg.toLowerCase();for(var apps=this.lang_order||["custom",this.getAppName(),"etemplate","common"],i=0;i<apps.length;++i)if("undefined"!=typeof lang_arr[apps[i]]&&"undefined"!=typeof lang_arr[apps[i]][_msg]){translation=lang_arr[apps[i]][_msg];break}if(1==arguments.length)return translation;if(2==arguments.length)return translation.replace("%1",arguments[1]);translation=translation.replace(/%([0-9]+)/g,"|%$1|");for(var i=1;i<arguments.length;++i)translation=translation.replace("|%"+i+"|",arguments[i]);return translation},langRequireApp:function(_window,_appname,_callback,_context){var lang=egw.preference("lang"),langs=[{app:"common",lang:lang}];_appname&&"eGroupWare"!=_appname&&langs.push({app:_appname,lang:lang}),langs.push({app:"custom",lang:"en"}),egw.langRequire(_window,langs,_callback,_context)},langRequire:function(_window,_apps,_callback,_context){for(var ready=this.module("ready",_window),files=this.module("files",this.window),jss=[],apps=[],i=0;i<_apps.length;i++)"undefined"==typeof lang_arr[_apps[i].app]&&jss.push(this.webserverUrl+"/phpgwapi/lang.php?app="+_apps[i].app+"&lang="+_apps[i].lang+"&etag="+(_apps[i].etag||this.config("max_lang_time"))),apps.push(_apps[i].app);if(this!==egw&&apps.length>0&&(this.lang_order=apps.reverse()),jss.length>0)if("function"==typeof _callback)files.includeJS(jss,_callback,_context||null);else{var token=ready.readyWaitFor();files.includeJS(jss,function(){ready.readyDone(token)},this)}else"function"==typeof _callback&&_callback.call(_context||null)}}}),egw.extend("links",egw.MODULE_GLOBAL,function(){"use strict";var link_registry=void 0,title_cache={},title_queue={},title_uid=null;return{link_get_registry:function(_app,_name){if("object"!=typeof link_registry)return alert("egw.open() link registry is NOT defined!"),!1;if("undefined"==typeof link_registry[_app])return!1;var reg=link_registry[_app];if("undefined"==typeof reg[_name])switch(_name){case"name":reg.name=_app;break;case"icon":var app_data=this.app(_app);"undefined"!=typeof app_data&&"undefined"!=typeof app_data.icon&&null!=app_data.icon?reg.icon=("undefined"!=typeof app_data.icon_app?app_data.icon_app:_app)+"/"+app_data.icon:reg.icon=_app+"/navbar"}return reg&&"undefined"==typeof _name?reg:"undefined"==typeof reg[_name]?!1:reg[_name]},get_mime_info:function(_type){var wildcard_mime;for(var app in link_registry){var reg=link_registry[app];if("undefined"!=typeof reg.mime)for(var mime in reg.mime){if(mime==_type)return reg.mime[_type];"/"==mime[0]&&_type.match(new RegExp(mime.substring(1,mime.length-1),"i"))&&(wildcard_mime=reg.mime[mime])}}return wildcard_mime?wildcard_mime:null},mime_open:function(_path,_type){var path;"object"==typeof _path?(path="undefined"==typeof _path.path?"/apps/"+_path.app2+"/"+_path.id2+"/"+_path.id:_path.path,"string"==typeof _path.type&&(_type=_path.type)):"/"!=_path[0]||(path=_path);var mime_info=this.get_mime_info(_type);if(mime_info){var data={};for(var attr in mime_info)switch(attr){case"mime_url":data[mime_info.mime_url]="vfs://default"+path;break;case"mime_data":break;case"mime_type":data[mime_info.mime_type]=_type;break;case"mime_id":data[mime_info.mime_id]=path;break;default:data[attr]=mime_info[attr]}"undefined"==typeof mime_info.mime_url&&(data.url="object"==typeof _path&&_path.download_url?_path.download_url:"/webdav.php"+path)}else var data="object"==
"use strict";function hide(){null!=tooltip_div&&(tooltip_div.remove(),tooltip_div=null)}function show(){if(tooltip_div&&"undefined"!=typeof x&&"undefined"!=typeof y){var cursor_rect={left:x-8,top:y-8,right:x+8,bottom:y+8},window_width=$j(_wnd.document).width(),window_height=$j(_wnd.document).height(),space_left={left:cursor_rect.left,top:cursor_rect.top,right:window_width-cursor_rect.right,bottom:window_height-cursor_rect.bottom},tooltip_width=tooltip_div.width();tooltip_width>300&&(tooltip_width=300);var tooltip_height=tooltip_div.height();space_left.right<tooltip_width?tooltip_div.css("left",Math.max(0,cursor_rect.left-tooltip_width)):space_left.left>=tooltip_width?tooltip_div.css("left",cursor_rect.right):(tooltip_div.css("left",cursor_rect.right),tooltip_div.css("max-width",space_left.right)),space_left.bottom<tooltip_height?tooltip_div.css("top",cursor_rect.top-tooltip_height):space_left.top>=tooltip_height?tooltip_div.css("top",cursor_rect.bottom):(tooltip_div.css("top",cursor_rect.bottom),tooltip_div.css("max-height",space_left.bottom)),tooltip_div.fadeIn(100)}}function prepare(_html){hide(),tooltip_div=$j(_wnd.document.createElement("div")),tooltip_div.hide(),tooltip_div.append(_html),tooltip_div.addClass("egw_tooltip"),$j(_wnd.document.body).append(tooltip_div),tooltip_div.mouseenter(function(){hide()})}function showTooltipTimeout(){null!=current_elem&&(show_delta+=time_delta,show_delay>show_delta?_wnd.setTimeout(showTooltipTimeout,time_delta):(show_delta=0,show()))}var tooltip_div=null,current_elem=null,time_delta=100,show_delta=0,show_delay=200,x=0,y=0;return{tooltipBind:function(_elem,_html){""!=_html&&(_elem.bind("mouseenter.tooltip",function(e){return _elem!=current_elem&&(prepare(_html),current_elem=_elem,show_delta=0,x=e.clientX,y=e.clientY,_wnd.setTimeout(showTooltipTimeout,time_delta)),!1}),_elem.bind("mouseleave.tooltip",function(){current_elem=null,show_delta=0,tooltip_div&&tooltip_div.fadeOut(100)}),_elem.bind("mousemove.tooltip",function(e){var dx=x-e.clientX,dy=y-e.clientY,movedist=Math.sqrt(dx*dx+dy*dy);movedist>2&&(show_delta=0),x=e.clientX,y=e.clientY}))},tooltipUnbind:function(_elem){current_elem==_elem&&(hide(),current_elem=null),_elem.unbind(".tooltip")}}}),egw.extend("css",egw.MODULE_WND_LOCAL,function(_app,_wnd){"use strict";var sheet,selectors={},selectorCount=0;return{css:function(_selector,_rule){var index=sheet?Math.min(selectorCount,sheet.cssRules.length):0;if(!sheet||!sheet.ownerNode||sheet.ownerNode.ownerDocument!==_wnd.document){var style=_wnd.document.createElement("style");_wnd.document.getElementsByTagName("head")[0].appendChild(style),sheet=style.sheet?style.sheet:style.styleSheet,selectorCount=0,selectors={}}"undefined"!=typeof selectors[_selector]?(index=selectors[_selector],index<sheet.cssRules.length&&("undefined"!=typeof sheet.removeRule?sheet.removeRule(index):sheet.deleteRule(index)),delete selectors[_selector],_rule||selectorCount--):selectorCount++,_rule&&("undefined"!=typeof sheet.addRule?sheet.addRule(_selector,_rule,index):sheet.insertRule(_selector+"{"+_rule+"}",index),selectors[_selector]=index)}}}),function($){if($.ui.timepicker=$.ui.timepicker||{},!$.ui.timepicker.version){$.extend($.ui,{timepicker:{version:"@@version"}});var Timepicker=function(){this.regional=[],this.regional[""]={currentText:"Now",closeText:"Done",amNames:["AM","A"],pmNames:["PM","P"],timeFormat:"HH:mm",timeSuffix:"",timeOnlyTitle:"Choose Time",timeText:"Time",hourText:"Hour",minuteText:"Minute",secondText:"Second",millisecText:"Millisecond",microsecText:"Microsecond",timezoneText:"Time Zone",isRTL:!1},this._defaults={showButtonPanel:!0,timeOnly:!1,showHour:null,showMinute:null,showSecond:null,showMillisec:null,showMicrosec:null,showTimezone:null,showTime:!0,stepHour:1,stepMinute:1,stepSecond:1,stepMillisec:1,stepMicrosec:1,hour:0,minute:0,second:0,millisec:0,microsec:0,timezone:null,hourMin:0,minuteMin:0,secondMin:0,millisecMin:0,microsecMin:0,hourMax:23,minuteMax:59,secondMax:59,millisecMax:999,microsecMax:999,minDateTime:null,maxDateTime:null,onSelect:null,hourGrid:0,minuteGrid:0,secondGri
resTime):!1}),looseParse=function(f,s,o){try{var d=new Date("2012-01-01 "+s);if(isNaN(d.getTime())&&(d=new Date("2012-01-01T"+s),isNaN(d.getTime())&&(d=new Date("01/01/2012 "+s),isNaN(d.getTime()))))throw"Unable to parse time with native Date: "+s;return{hour:d.getHours(),minute:d.getMinutes(),second:d.getSeconds(),millisec:d.getMilliseconds(),microsec:d.getMicroseconds(),timezone:-1*d.getTimezoneOffset()}}catch(err){try{return strictParse(f,s,o)}catch(err2){$.timepicker.log("Unable to parse \ntimeString: "+s+"\ntimeFormat: "+f)}}return!1};return"function"==typeof o.parse?o.parse(timeFormat,timeString,o):"loose"===o.parse?looseParse(timeFormat,timeString,o):strictParse(timeFormat,timeString,o)},$.datepicker.formatTime=function(format,time,options){options=options||{},options=$.extend({},$.timepicker._defaults,options),time=$.extend({hour:0,minute:0,second:0,millisec:0,microsec:0,timezone:null},time);var tmptime=format,ampmName=options.amNames[0],hour=parseInt(time.hour,10);return hour>11&&(ampmName=options.pmNames[0]),tmptime=tmptime.replace(/(?:HH?|hh?|mm?|ss?|[tT]{1,2}|[zZ]|[lc]|'.*?')/g,function(match){switch(match){case"HH":return("0"+hour).slice(-2);case"H":return hour;case"hh":return("0"+convert24to12(hour)).slice(-2);case"h":return convert24to12(hour);case"mm":return("0"+time.minute).slice(-2);case"m":return time.minute;case"ss":return("0"+time.second).slice(-2);case"s":return time.second;case"l":return("00"+time.millisec).slice(-3);case"c":return("00"+time.microsec).slice(-3);case"z":return $.timepicker.timezoneOffsetString(null===time.timezone?options.timezone:time.timezone,!1);case"Z":return $.timepicker.timezoneOffsetString(null===time.timezone?options.timezone:time.timezone,!0);case"T":return ampmName.charAt(0).toUpperCase();case"TT":return ampmName.toUpperCase();case"t":return ampmName.charAt(0).toLowerCase();case"tt":return ampmName.toLowerCase();default:return match.replace(/'/g,"")}})},$.datepicker._base_selectDate=$.datepicker._selectDate,$.datepicker._selectDate=function(id,dateStr){var inst=this._getInst($(id)[0]),tp_inst=this._get(inst,"timepicker");tp_inst?(tp_inst._limitMinMaxDateTime(inst,!0),inst.inline=inst.stay_open=!0,this._base_selectDate(id,dateStr),inst.inline=inst.stay_open=!1,this._notifyChange(inst),this._updateDatepicker(inst)):this._base_selectDate(id,dateStr)},$.datepicker._base_updateDatepicker=$.datepicker._updateDatepicker,$.datepicker._updateDatepicker=function(inst){var input=inst.input[0];if(!($.datepicker._curInst&&$.datepicker._curInst!==inst&&$.datepicker._datepickerShowing&&$.datepicker._lastInput!==input||"boolean"==typeof inst.stay_open&&inst.stay_open!==!1)){this._base_updateDatepicker(inst);var tp_inst=this._get(inst,"timepicker");tp_inst&&tp_inst._addTimePicker(inst)}},$.datepicker._base_doKeyPress=$.datepicker._doKeyPress,$.datepicker._doKeyPress=function(event){var inst=$.datepicker._getInst(event.target),tp_inst=$.datepicker._get(inst,"timepicker");if(tp_inst&&$.datepicker._get(inst,"constrainInput")){var ampm=tp_inst.support.ampm,tz=null!==tp_inst._defaults.showTimezone?tp_inst._defaults.showTimezone:tp_inst.support.timezone,dateChars=$.datepicker._possibleChars($.datepicker._get(inst,"dateFormat")),datetimeChars=tp_inst._defaults.timeFormat.toString().replace(/[hms]/g,"").replace(/TT/g,ampm?"APM":"").replace(/Tt/g,ampm?"AaPpMm":"").replace(/tT/g,ampm?"AaPpMm":"").replace(/T/g,ampm?"AP":"").replace(/tt/g,ampm?"apm":"").replace(/t/g,ampm?"ap":"")+" "+tp_inst._defaults.separator+tp_inst._defaults.timeSuffix+(tz?tp_inst._defaults.timezoneList.join(""):"")+tp_inst._defaults.amNames.join("")+tp_inst._defaults.pmNames.join("")+dateChars,chr=String.fromCharCode(void 0===event.charCode?event.keyCode:event.charCode);return event.ctrlKey||" ">chr||!dateChars||datetimeChars.indexOf(chr)>-1}return $.datepicker._base_doKeyPress(event)},$.datepicker._base_updateAlternate=$.datepicker._updateAlternate,$.datepicker._updateAlternate=function(inst){var tp_inst=this._get(inst,"timepicker");if(tp_inst){var altField=tp_inst._defaults.altField;if(altField){var date=(tp_inst._defaults.alt
prototype._ifacefuncs=[];for(var i=0;i<interfaces.length;i++){var iface=interfaces[i];if(!(iface instanceof Interface))throw"Interfaces must be instance of Interface!";for(var key in iface)prototype._ifacefuncs.push(key)}for(var i=0;i<ifaces.length;i++)prototype._ifacefuncs.push(ifaces[i])}function addAttributeFunctions(prototype,_super){function _copyMerge(_new,_old){var result={};if("undefined"!=typeof _new)for(var key in _new)result[key]=_new[key];for(var key in _old)"undefined"==typeof result[key]&&(result[key]=_old[key]);return result}var attributes={};for(var key in prototype.attributes)attributes[key]=_copyMerge({},prototype.attributes[key]);for(var key in _super.attributes){var _old=_super.attributes[key];attributes[key]=_copyMerge(attributes[key],_old)}prototype._validate_attributes&&prototype._validate_attributes(attributes),prototype.attributes=attributes}function classExtend(interfaces,prop){function Class(){if(!initializing){for(var i=0;i<this._ifacefuncs.length;i++){var func=this._ifacefuncs[i];if("function"!=typeof this[func])throw"Trying to create abstract object, interface function '"+func+"' not implemented."}if(getMem_freeMem_trace){this.__OBJ_UID="obj_"+egw.uid();var className=this.className();tracedObjects[this.__OBJ_UID]={created:(new Date).getTime(),class:className},egw.debug("log","*"+this.__OBJ_UID+" ("+className+")")}this.init&&this.init.apply(this,arguments)}}"undefined"==typeof prop&&(prop=interfaces,interfaces=[]),interfaces instanceof Array||(interfaces=[interfaces]),"undefined"==typeof prop.attributes&&(prop.attributes={});var _super=this.prototype;initializing=!0;var prototype=new this;initializing=!1;for(var name in prop)"function"==typeof prop[name]&&"function"==typeof _super[name]&&fnTest.test(prop[name])?prototype[name]=function(name,fn){return function(){var tmp=this._super;this._super=_super[name];var ret=fn.apply(this,arguments);return this._super=tmp,ret}}(name,prop[name]):prototype[name]=prop[name];return addInterfaceFunctions(prototype,interfaces),addAttributeFunctions(prototype,_super),Class.prototype=prototype,Class.prototype.constructor=Class,Class.extend=classExtend,Class}var initializing=!1,getMem_freeMem_trace=!1,tracedObjects={},fnTest=/xyz/.test(function(){xyz})?/\b_super\b/:/.*/;this.Interface=function(fncts){for(var key in fncts)this[key]=fncts[key]},this.Class=function(){},Class.extend=classExtend,Class.prototype.attributes={},Class.prototype._ifacefuncs=[],Class.prototype.free=function(){this.destroy&&this.destroy(),getMem_freeMem_trace&&(delete tracedObjects[this.__OBJ_UID],egw.debug("log","-"+this.__OBJ_UID));for(var key in this)delete this[key];this.free=function(){}},getMem_freeMem_trace&&(Class.prototype.showTrace=function(){console.log(tracedObjects)},Class.prototype.className=function(){for(var key in window)if("et2"==key.substr(0,3)&&this.constructor==window[key])return key;return"?"}),Class.prototype.implements=function(_iface){for(var key in _iface)if(this._ifacefuncs.indexOf(key)<0)return!1;return!0},Class.prototype.instanceOf=function(_obj){return _obj instanceof Interface?this.implements(_obj):this instanceof _obj}}.call(window),egw.extend("message",egw.MODULE_WND_LOCAL,function(_app,_wnd){"use strict";function html_entity_decode(_str){return _str&&-1!=_str.indexOf("&")?jQuery("<span>"+_str+"</span>").text():_str}var message_timer,error_reg_exp,a_href_reg=/<a href="([^"]+)">([^<]+)<\/a>/gim,new_line_reg=/<\/?(p|br)\s*\/?>\n?/gi;return this.registerJSONPlugin(function(type,res,req){if("string"==typeof res.data)return egw.message(res.data,"error"),!0;throw"Invalid parameters"},null,"error"),{message:function(_msg,_type,_discard){var jQuery=_wnd.jQuery;if(_msg&&!_type&&("undefined"==typeof error_reg_exp&&(error_reg_exp=new RegExp("(error|"+egw.lang("error")+")","i")),_type=_msg.match(error_reg_exp)?"error":"success"),!this.is_popup()&&_wnd!==_wnd.top)return void egw(_wnd.top).message(_msg,_type);message_timer&&(_wnd.clearTimeout(message_timer),message_timer=null);var parent=jQuery("div#divAppboxHeader");if(parent.length&&!parent.hasClass("onlyPrint")||(pare
h_parent},refreshPositions:!0,update:function(event,ui){var favSortedList=jQuery(this).sortable("toArray",{attribute:"data-id"});self.egw.set_preference(self.appname,"fav_sort_pref",favSortedList),self._refresh_fav_nm()}});var egw_fw=egw_getFramework();return egw_fw&&egw_fw.applications[this.appname]&&egw_fw.applications[this.appname].browser&&egw_fw.applications[this.appname].browser.baseDiv&&$j(egw_fw.applications[this.appname].browser.baseDiv).off(".sidebox").on("change.sidebox",function(){self.highlight_favorite()}),!0}return!1},add_favorite:function(state){"undefined"==typeof this.favorite_popup&&this._create_favorite_popup(),this.favorite_popup.state=jQuery.extend({},this.getState(),state||{}),this.favorite_popup.state=jQuery.extend(!0,{},this.favorite_popup.state);var filter_list=[],add_to_popup=function(arr){filter_list.push("<ul>"),jQuery.each(arr,function(index,filter){filter_list.push("<li id='index'><span class='filter_id'>"+index+"</span>"+("object"!=typeof filter?"<span class='filter_value'>"+filter+"</span>":"")),"object"==typeof filter&&null!=filter&&add_to_popup(filter),filter_list.push("</li>")}),filter_list.push("</ul>")};return add_to_popup(this.favorite_popup.state),$j("#"+this.appname+"_favorites_popup_state",this.favorite_popup).replaceWith($j(filter_list.join("")).attr("id",this.appname+"_favorites_popup_state")),$j("#"+this.appname+"_favorites_popup_state",this.favorite_popup).hide().siblings(".ui-icon-circle-plus").removeClass("ui-icon-circle-minus"),this.favorite_popup.dialog("open"),console.log(this),!1},_refresh_fav_nm:function(){var self=this;if(!etemplate2||!etemplate2.getByApplication)throw new Error("_refresh_fav_nm():Either et2 is not ready/ not there yet. Make sure that etemplate2 is ready before call this method.");for(var et2=etemplate2.getByApplication(self.appname),i=0;i<et2.length;i++)et2[i].widgetContainer.iterateOver(function(_widget){_widget.stored_filters=_widget.load_favorites(self.appname),_widget.init_filters(_widget)},self,et2_favorites)},_create_favorite_popup:function(){var self=this,favorite_prefix="favorite_";this.favorite_popup&&this.favorite_popup.group&&(this.favorite_popup.group.free(),delete this.favorite_popup),this.favorite_popup=$j('<div id="'+this.dom_id+'_nm_favorites_popup" title="'+egw().lang("New favorite")+'"> <form> <label for="name">'+this.egw.lang("name")+'</label><input type="text" name="name" id="name"/> <div id="'+this.appname+'_favorites_popup_admin"/> <span>'+this.egw.lang("Details")+'</span><span style="float:left;" class="ui-icon ui-icon-circle-plus ui-button" /> <ul id="'+this.appname+'_favorites_popup_state"/> </form> </div>').appendTo(this.et2&&"calendar"!=this.appname?this.et2.getDOMNode():$j("body")),$j(".ui-icon-circle-plus",this.favorite_popup).prev().andSelf().click(function(){$j("#"+self.appname+"_favorites_popup_state",self.favorite_popup).slideToggle().siblings(".ui-icon-circle-plus").toggleClass("ui-icon-circle-minus")});var apps=egw().user("apps"),is_admin="undefined"!=typeof apps.admin;is_admin&&(this.favorite_popup.group=et2_createWidget("select-account",{id:"favorite[group]",account_type:"groups",empty_label:"Groups",no_lang:!0,parent_node:this.appname+"_favorites_popup_admin"},this.et2&&"calendar"!=this.appname?this.et2:null),this.favorite_popup.group.loadingFinished());var buttons={};return buttons.save={text:this.egw.lang("save"),default:!0,click:function(){var name=$j("#name",this);if(name.val()){name.val(name.val().replace(/(<([^>]+)>)/gi,""));var safe_name=name.val().replace(/[^A-Za-z0-9-_]/g,"_"),favorite={name:name.val(),group:"undefined"!=typeof self.favorite_popup.group&&self.favorite_popup.group.get_value()?self.favorite_popup.group.get_value():!1,state:self.favorite_popup.state},favorite_pref=favorite_prefix+safe_name;if("undefined"!=typeof self.favorite_popup.group&&""!=self.favorite_popup.group.getValue()?(self.egw.jsonq(self.appname+".egw_framework.ajax_set_favorite.template",[self.appname,name.val(),"add",self.favorite_popup.group.get_value(),self.favorite_popup.state]),self.favorite_popup.group.set
b||dhtmlxError.throwError("LoadXML","Incorrect XML",[b||this.xmlDoc,this.mainObject]),null!=c&&b.setProperty("SelectionNamespaces","xmlns:xsl='"+c+"'"),"single"==d?b.selectSingleNode(a):b.selectNodes(a)||[];var e=b;b||(b=this.xmlDoc.nodeName?this.xmlDoc:this.xmlDoc.responseXML),b||dhtmlxError.throwError("LoadXML","Incorrect XML",[b||this.xmlDoc,this.mainObject]),-1!=b.nodeName.indexOf("document")?e=b:(e=b,b=b.ownerDocument);var g=XPathResult.ANY_TYPE;"single"==d&&(g=XPathResult.FIRST_ORDERED_NODE_TYPE);var f=[],h=b.evaluate(a,e,function(){return c},g,null);if(g==XPathResult.FIRST_ORDERED_NODE_TYPE)return h.singleNodeValue;for(var i=h.iterateNext();i;)f[f.length]=i,i=h.iterateNext();return f},j.prototype.catchError=function(a,b){this.catches[a]=b},j.prototype.throwError=function(a,b,c){return this.catches[a]?this.catches[a](a,b,c):this.catches.ALL?this.catches.ALL(a,b,c):(alert("Error type: "+a+"\nDescription: "+b),null)},window.dhtmlxError=new j,dtmlXMLLoaderObject.prototype.doXPathOpera=function(a,b){var c=a.replace(/[\/]+/gi,"/").split("/"),d=null,e=1;if(!c.length)return[];if("."==c[0])d=[b];else{if(""!=c[0])return[];d=(this.xmlDoc.responseXML||this.xmlDoc).getElementsByTagName(c[e].replace(/\[[^\]]*\]/g,"")),e++}for(;e<c.length;e++)d=this._getAllNamedChilds(d,c[e]);return-1!=c[e-1].indexOf("[")&&(d=this._filterXPath(d,c[e-1])),d},dtmlXMLLoaderObject.prototype._filterXPath=function(a,b){for(var c=[],b=b.replace(/[^\[]*\[\@/g,"").replace(/[\[\]\@]*/g,""),d=0;d<a.length;d++)a[d].getAttribute(b)&&(c[c.length]=a[d]);return c},dtmlXMLLoaderObject.prototype._getAllNamedChilds=function(a,b){var c=[];_isKHTML&&(b=b.toUpperCase());for(var d=0;d<a.length;d++)for(var e=0;e<a[d].childNodes.length;e++)_isKHTML?a[d].childNodes[e].tagName&&a[d].childNodes[e].tagName.toUpperCase()==b&&(c[c.length]=a[d].childNodes[e]):a[d].childNodes[e].tagName==b&&(c[c.length]=a[d].childNodes[e]);return c},dtmlXMLLoaderObject.prototype.xslDoc=null,dtmlXMLLoaderObject.prototype.setXSLParamValue=function(a,b,c){c||(c=this.xslDoc),c.responseXML&&(c=c.responseXML);var d=this.doXPath("/xsl:stylesheet/xsl:variable[@name='"+a+"']",c,"http://www.w3.org/1999/XSL/Transform","single");null!=d&&(d.firstChild.nodeValue=b)},dtmlXMLLoaderObject.prototype.doXSLTransToObject=function(a,b){if(a||(a=this.xslDoc),a.responseXML&&(a=a.responseXML),b||(b=this.xmlDoc),b.responseXML&&(b=b.responseXML),_isIE){d=new ActiveXObject("Msxml2.DOMDocument.3.0");try{b.transformNodeToObject(a,d)}catch(c){d=b.transformNode(a)}}else{this.XSLProcessor||(this.XSLProcessor=new XSLTProcessor,this.XSLProcessor.importStylesheet(a));var d=this.XSLProcessor.transformToDocument(b)}return d},dtmlXMLLoaderObject.prototype.doXSLTransToString=function(a,b){var c=this.doXSLTransToObject(a,b);return"string"==typeof c?c:this.doSerialization(c)},dtmlXMLLoaderObject.prototype.doSerialization=function(a){if(a||(a=this.xmlDoc),a.responseXML&&(a=a.responseXML),_isIE)return a.xml;var b=new XMLSerializer;return b.serializeToString(a)},dhtmlxEventable=function(a){a.attachEvent=function(a,c,d){return a="ev_"+a.toLowerCase(),this[a]||(this[a]=new this.eventCatcher(d||this)),a+":"+this[a].addEvent(c)},a.callEvent=function(a,c){return a="ev_"+a.toLowerCase(),this[a]?this[a].apply(this,c):!0},a.checkEvent=function(a){return!!this["ev_"+a.toLowerCase()]},a.eventCatcher=function(a){var c=[],d=function(){for(var d=!0,g=0;g<c.length;g++)if(null!=c[g])var f=c[g].apply(a,arguments),d=d&&f;return d};return d.addEvent=function(a){return"function"!=typeof a&&(a=eval(a)),a?c.push(a)-1:!1},d.removeEvent=function(a){c[a]=null},d},a.detachEvent=function(a){if(0!=a){var c=a.split(":");this[c[0]].removeEvent(c[1])}},a.detachAllEvents=function(){for(var a in this)0==a.indexOf("ev_")&&(this.detachEvent(a),this[a]=null)},a=null},xmlPointer.prototype={text:function(){if(!_isFF)return this.d.xml;var x=new XMLSerializer;return x.serializeToString(this.d)},get:function(name){return this.d.getAttribute(name)},exists:function(){return!!this.d},content:function(){return this.d.firstChild?this.d.firstChild.data:""},each:function(name,f,t,i)
return temp?void this._xopenAll(temp):0},dhtmlXTreeObject.prototype.getOpenState=function(itemId){var temp=this._globalIdStorageFind(itemId);return temp?this._getOpenState(temp):""},dhtmlXTreeObject.prototype.closeAllItems=function(itemId){itemId===window.undefined&&(itemId=this.rootId);var temp=this._globalIdStorageFind(itemId);return temp?(this._xcloseAll(temp),this.allTree.childNodes[0].border="1",void(this.allTree.childNodes[0].border="0")):0},dhtmlXTreeObject.prototype.setUserData=function(itemId,name,value){var sNode=this._globalIdStorageFind(itemId,0,!0);sNode&&("hint"==name&&(sNode.htmlNode.childNodes[0].childNodes[0].title=value),"undefined"==typeof sNode.userData["t_"+name]&&(sNode._userdatalist?sNode._userdatalist+=","+name:sNode._userdatalist=name),sNode.userData["t_"+name]=value)},dhtmlXTreeObject.prototype.getUserData=function(itemId,name){var sNode=this._globalIdStorageFind(itemId,0,!0);if(sNode)return sNode.userData["t_"+name]},dhtmlXTreeObject.prototype.getItemColor=function(itemId){var temp=this._globalIdStorageFind(itemId);if(!temp)return 0;var res=new Object;return temp.acolor&&(res.acolor=temp.acolor),temp.scolor&&(res.scolor=temp.scolor),res},dhtmlXTreeObject.prototype.setItemColor=function(itemId,defaultColor,selectedColor){if(itemId&&itemId.span)var temp=itemId;else var temp=this._globalIdStorageFind(itemId);return temp?(temp.i_sel?selectedColor&&(temp.span.style.color=selectedColor):defaultColor&&(temp.span.style.color=defaultColor),selectedColor&&(temp.scolor=selectedColor),defaultColor&&(temp.acolor=defaultColor),void 0):0},dhtmlXTreeObject.prototype.getItemText=function(itemId){var temp=this._globalIdStorageFind(itemId);return temp?temp.htmlNode.childNodes[0].childNodes[0].childNodes[3].childNodes[0].innerHTML:0},dhtmlXTreeObject.prototype.getParentId=function(itemId){var temp=this._globalIdStorageFind(itemId);return temp&&temp.parentObject?temp.parentObject.id:""},dhtmlXTreeObject.prototype.changeItemId=function(itemId,newItemId){if(itemId!=newItemId){var temp=this._globalIdStorageFind(itemId);if(!temp)return 0;temp.id=newItemId,temp.span.contextMenuId=newItemId,this._idpull[newItemId]=this._idpull[itemId],delete this._idpull[itemId]}},dhtmlXTreeObject.prototype.doCut=function(){this.nodeCut&&this.clearCut(),this.nodeCut=(new Array).concat(this._selected);for(var i=0;i<this.nodeCut.length;i++){var tempa=this.nodeCut[i];tempa._cimgs=new Array,tempa._cimgs[0]=tempa.images[0],tempa._cimgs[1]=tempa.images[1],tempa._cimgs[2]=tempa.images[2],tempa.images[0]=tempa.images[1]=tempa.images[2]=this.cutImage,this._correctPlus(tempa)}},dhtmlXTreeObject.prototype.doPaste=function(itemId){var tobj=this._globalIdStorageFind(itemId);if(!tobj)return 0;for(var i=0;i<this.nodeCut.length;i++)this._checkPNodes(tobj,this.nodeCut[i])||this._moveNode(this.nodeCut[i],tobj);this.clearCut()},dhtmlXTreeObject.prototype.clearCut=function(){for(var i=0;i<this.nodeCut.length;i++){var tempa=this.nodeCut[i];tempa.images[0]=tempa._cimgs[0],tempa.images[1]=tempa._cimgs[1],tempa.images[2]=tempa._cimgs[2],this._correctPlus(tempa)}this.nodeCut=new Array},dhtmlXTreeObject.prototype._moveNode=function(itemObject,targetObject){return this._moveNodeTo(itemObject,targetObject)},dhtmlXTreeObject.prototype._fixNodesCollection=function(target,zParent){var flag=0,Nodes=target.childNodes,Count=target.childsCount-1;if(zParent!=Nodes[Count]){for(var i=0;Count>i;i++)Nodes[i]==Nodes[Count]&&(Nodes[i]=Nodes[i+1],Nodes[i+1]=Nodes[Count]);for(var i=0;Count+1>i;i++)if(flag){var temp=Nodes[i];Nodes[i]=flag,flag=temp}else Nodes[i]==zParent&&(flag=Nodes[i],Nodes[i]=Nodes[Count])}},dhtmlXTreeObject.prototype._recreateBranch=function(itemObject,targetObject,beforeNode,level){var i,st="";if(beforeNode){for(i=0;i<targetObject.childsCount&&targetObject.childNodes[i]!=beforeNode;i++);0!=i?beforeNode=targetObject.childNodes[i-1]:(st="TOP",beforeNode="")}var t2=this._onradh;this._onradh=null;var newNode=this._attachChildNode(targetObject,itemObject.id,itemObject.label,0,itemObject.images[0],itemObject.images[1],itemObject.images[2],st,0,beforeNode);if(newNod
checkbox_smart:"enableSmartCheckboxes",context_menu:"enableContextMenu",distributed_parsing:"enableDistributedParsing",drag:"enableDragAndDrop",drag_copy:"enableMercyDrag",drag_image:"enableImageDrag",drag_scroll:"enableDragAndDropScrolling",editor:"enableItemEditor",hover:"enableHighlighting",images:"enableTreeImages",image_fix:"enableIEImageFix",image_path:"setImagePath",lines:"enableTreeLines",loading_item:"enableLoadingItem",multiline:"enableMultiLineItems",multiselect:"enableMultiselection",navigation:"enableKeyboardNavigation",radio:"enableRadioButtons",radio_single:"enableSingleRadioMode",rtl:"enableRTL",search:"enableKeySearch",smart_parsing:"enableSmartXMLParsing",smart_rendering:"enableSmartRendering",text_icons:"enableTextSigns",xml:"loadXML",skin:"setSkin"},{})}(),dhtmlXTreeObject.prototype._dp_init=function(dp){dp.attachEvent("insertCallback",function(upd,id,parent){var data=this._loader.doXPath(".//item",upd),text=data[0].getAttribute("text");this.obj.insertNewItem(parent,id,text,0,0,0,0,"CHILD")}),dp.attachEvent("updateCallback",function(upd,id,parent){var data=this._loader.doXPath(".//item",upd),text=data[0].getAttribute("text");this.obj.setItemText(id,text),this.obj.getParentId(id)!=parent&&this.obj.moveItem(id,"item_child",parent),this.setUpdated(id,!0,"updated")}),dp.attachEvent("deleteCallback",function(upd,id,parent){this.obj.setUserData(id,this.action_param,"true_deleted"),this.obj.deleteItem(id,!1)}),dp._methods=["setItemStyle","","changeItemId","deleteItem"],this.attachEvent("onEdit",function(state,id){return 3==state&&dp.setUpdated(id,!0),!0}),this.attachEvent("onDrop",function(id,id_2,id_3,tree_1,tree_2){tree_1==tree_2&&dp.setUpdated(id,!0)}),this._onrdlh=function(rowId){var z=dp.getState(rowId);return"inserted"==z?(dp.set_invalid(rowId,!1),dp.setUpdated(rowId,!1),!0):"true_deleted"==z?(dp.setUpdated(rowId,!1),!0):(dp.setUpdated(rowId,!0,"deleted"),!1)},this._onradh=function(rowId){dp.setUpdated(rowId,!0,"inserted")},dp._getRowData=function(rowId){var data={},z=this.obj._globalIdStorageFind(rowId),z2=z.parentObject,i=0;for(i=0;i<z2.childsCount&&z2.childNodes[i]!=z;i++);for(data.tr_id=z.id,data.tr_pid=z2.id,data.tr_order=i,data.tr_text=z.span.innerHTML,z2=(z._userdatalist||"").split(","),i=0;i<z2.length;i++)data[z2[i]]=z.userData["t_"+z2[i]];return data}},jsonPointer.prototype={text:function(){var afff=function(n){for(var p=[],i=0;i<n.length;i++)p.push("{"+sfff(n[i])+"}");return p.join(",")},sfff=function(n){var p=[];for(var a in n)"object"==typeof n[a]?a.length?p.push('"'+a+'":['+afff(n[a])+"]"):p.push('"'+a+'":{'+sfff(n[a])+"}"):p.push('"'+a+'":"'+n[a]+'"');return p.join(",")};return"{"+sfff(this.d)+"}"},get:function(name){return this.d[name]},exists:function(){return!!this.d},content:function(){return this.d.content},each:function(name,f,t){var a=this.d[name],c=new jsonPointer;if(a)for(var i=0;i<a.length;i++)c.d=a[i],f.apply(t,[c,i])},get_all:function(){return this.d},sub:function(name){return new jsonPointer(this.d[name],this.d)},sub_exists:function(name){return!!this.d[name]},each_x:function(name,rule,f,t,i){var a=this.d[name],c=new jsonPointer(0,this.d);if(a)for(i=i||0;i<a.length;i++)if(a[i][rule]&&(c.d=a[i],-1==f.apply(t,[c,i])))return},up:function(name){return new jsonPointer(this.dp,this.d)},set:function(name,val){this.d[name]=val},clone:function(name){return new jsonPointer(this.d,this.dp)},through:function(name,rule,v,f,t){var a=this.d[name];if(a.length)for(var i=0;i<a.length;i++){if(null!=a[i][rule]&&""!=a[i][rule]&&(!v||a[i][rule]==v)){var c=new jsonPointer(a[i],this.d);f.apply(t,[c,i])}var w=this.d;this.d=a[i],this.sub_exists(name)&&this.through(name,rule,v,f,t),this.d=w}}},dhtmlXTreeObject.prototype.loadJSArrayFile=function(file,afterCall){this.parsCount||this.callEvent("onXLS",[this,this._ld_id]),this._ld_id=null,this.xmlstate=1;var that=this;this.XMLLoader=new dtmlXMLLoaderObject(function(){eval("var z="+arguments[4].xmlDoc.responseText),that.loadJSArray(z)},this,!0,this.no_cashe),afterCall&&(this.XMLLoader.waitCall=afterCall),this.XMLLoader.loadXML(file)},dhtmlXTreeObject.proto
return _groups},egwActionObject.prototype.isDragOut=function(_event){return(_event.altKey||_event.metaKey)&&_event.shiftKey&&1==_event.which},egwActionObject.prototype.isSelection=function(_event){return!_event.shiftKey&&1==_event.which&&(_event.metaKey||_event.ctrlKey)},egwActionObjectInterface.prototype.setStateChangeCallback=function(_callback,_context){this.stateChangeCallback=_callback,this.stateChangeContext=_context},egwActionObjectInterface.prototype.setReconnectActionsCallback=function(_callback,_context){this.reconnectActionsCallback=_callback,this.reconnectActionsContext=_context},egwActionObjectInterface.prototype.reconnectActions=function(){this.reconnectActionsCallback&&this.reconnectActionsCallback.call(this.reconnectActionsContext)},egwActionObjectInterface.prototype.updateState=function(_stateBit,_set,_shiftState){var newState=egwSetBit(this._state,_stateBit,_set);this.stateChangeCallback?this._state=this.stateChangeCallback.call(this.stateChangeContext,newState,_stateBit,_shiftState):this._state=newState},egwActionObjectInterface.prototype.getDOMNode=function(){return this.doGetDOMNode()},egwActionObjectInterface.prototype.setState=function(_state){_state!=this._state&&(this._state=_state,this.doSetState(_state))},egwActionObjectInterface.prototype.getState=function(){return this._state},egwActionObjectInterface.prototype.triggerEvent=function(_event,_data){return"undefined"==typeof _data&&(_data=null),this.doTriggerEvent(_event,_data)},egwActionObjectInterface.prototype.makeVisible=function(){return this.doMakeVisible()};var egwActionObjectDummyInterface=egwActionObjectInterface,EGW_KEY_BACKSPACE=8,EGW_KEY_TAB=9,EGW_KEY_ENTER=13,EGW_KEY_ESCAPE=27,EGW_KEY_DELETE=46,EGW_KEY_SPACE=32,EGW_KEY_PAGE_UP=33,EGW_KEY_PAGE_DOWN=34,EGW_KEY_ARROW_LEFT=37,EGW_KEY_ARROW_UP=38,EGW_KEY_ARROW_RIGHT=39,EGW_KEY_ARROW_DOWN=40,EGW_KEY_0=48,EGW_KEY_1=49,EGW_KEY_2=50,EGW_KEY_3=51,EGW_KEY_4=52,EGW_KEY_5=53,EGW_KEY_6=54,EGW_KEY_7=55,EGW_KEY_8=56,EGW_KEY_9=57,EGW_KEY_A=65,EGW_KEY_B=66,EGW_KEY_C=67,EGW_KEY_D=68,EGW_KEY_E=69,EGW_KEY_F=70,EGW_KEY_G=71,EGW_KEY_H=72,EGW_KEY_I=73,EGW_KEY_J=74,EGW_KEY_K=75,EGW_KEY_L=76,EGW_KEY_M=77,EGW_KEY_N=78,EGW_KEY_O=79,EGW_KEY_P=80,EGW_KEY_Q=81,EGW_KEY_R=82,EGW_KEY_S=83,EGW_KEY_T=84,EGW_KEY_U=85,EGW_KEY_V=86,EGW_KEY_W=87,EGW_KEY_X=88,EGW_KEY_Y=89,EGW_KEY_Z=90,EGW_KEY_MENU=93,EGW_KEY_F1=112,EGW_KEY_F2=113,EGW_KEY_F3=114,EGW_KEY_F4=115,EGW_KEY_F5=116,EGW_KEY_F6=117,EGW_KEY_F7=118,EGW_KEY_F8=119,EGW_KEY_F9=120,EGW_KEY_F10=121,EGW_KEY_F11=122,EGW_KEY_F12=123,EGW_VALID_KEYS=[8,9,13,27,46,32,33,34,37,38,39,40,48,49,50,51,52,53,54,55,56,57,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,93,112,113,114,115,116,117,118,119,120,121,122,123],egw_keycode_translation_function=function(_nativeKeyCode){return _nativeKeyCode>=96&&105>=_nativeKeyCode&&(_nativeKeyCode-=48),_nativeKeyCode};$j(document).ready(function(){$j(document).keydown(function(e){var keyCode=e.which;if(keyCode=egw_keycode_translation_function(keyCode),keyCode=egw_keycode_makeValid(keyCode),-1!=keyCode){var inInput=_egw_nodeIsInInput(e.target);(!inInput||keyCode>=EGW_KEY_F1&&EGW_KEY_F12>=keyCode)&&egw_keyHandler(keyCode,e.shiftKey,e.ctrlKey||e.metaKey,e.altKey)&&e.preventDefault()}})}),$j(window).on("contextmenu",document,function(event){return 1!=event.originalEvent.x||1!=event.originalEvent.y?!0:!event.ctrlKey&&egw_keyHandler(EGW_KEY_MENU,event.shiftKey,event.ctrlKey||event.metaKey,event.altKey)?(event.preventDefault(),!1):!0});var egw_registeredShortcuts={},_egw_active_menu=null;egwMenu.prototype._checkImpl=function(){return"function"==typeof egwMenuImpl},egwMenu.prototype.showAt=function(_x,_y,_force){if("undefined"==typeof _force&&(_force=!1),null!=_egw_active_menu){if(_egw_active_menu==this&&!_force)return this.hide(),!1;_egw_active_menu.hide()}if(null==this.instance&&this._checkImpl){this.instance=new egwMenuImpl(this.children),_egw_active_menu=this;var self=this;return this.instance.showAt(_x,_y,function(){self.instance=null,_egw_active_menu=null}),!0}return!1},egwMenu.prototype.hide=function(){_egw_active_
this._visible||main_self._redistribSubLevelSelection(this.id,this.parent),this._visible=!0},tr.onmouseout=function(){"web"==main_self.menuMode&&(main_self.menuTimeoutHandler&&window.clearTimeout(main_self.menuTimeoutHandler),main_self.menuTimeoutHandler=window.setTimeout(function(){main_self&&main_self._clearAndHide&&main_self._clearAndHide()},main_self.menuTimeoutMsec,"JavaScript"));var k=this;main_self._hideTMData[this.id]&&window.clearTimeout(main_self._hideTMData[this.id]),main_self._hideTMData[this.id]=window.setTimeout(function(){k._visible=!1},50)},tr.onclick=function(e){if(main_self.checkEvent("onClick")||!main_self.itemPull[this.id].complex){e=e||event,e.cancelBubble=!0,e.returnValue=!1,tc=main_self.itemPull[this.id].complex?"c":"-",td="enabled"==main_self.itemPull[this.id].state?"-":"d";var cas={ctrl:e.ctrlKey,alt:e.altKey,shift:e.shiftKey};switch(main_self.itemPull[this.id].type){case"checkbox":main_self._checkboxOnClickHandler(this.id.replace(main_self.idPrefix,""),tc+td+"n",cas);break;case"radio":main_self._radioOnClickHandler(this.id.replace(main_self.idPrefix,""),tc+td+"n",cas);break;case"item":main_self._doOnClick(this.id.replace(main_self.idPrefix,""),tc+td+"n",cas)}return!1}};var polygon=this.idPull["polygon_"+this.itemPull[id].parent];null!=pos&&(pos++,0>pos&&(pos=0),pos>polygon.tbd.childNodes.length-1&&(pos=null)),null!=pos&&null!=polygon.tbd.childNodes[pos]?polygon.tbd.insertBefore(tr,polygon.tbd.childNodes[pos]):polygon.tbd.appendChild(tr),this.idPull[tr.id]=tr},dhtmlXMenuObject.prototype._renderSeparator=function(id,pos){var level=this.context?"SubLevelArea":this.itemPull[id].parent==this.idPrefix+this.topId?"TopLevel":"SubLevelArea";if("TopLevel"!=level||!this.context){var main_self=this;if("TopLevel"!=level){var tr=document.createElement("TR");tr.className="sub_sep";var td=document.createElement("TD");td.colSpan="3",tr.appendChild(td)}var k=document.createElement("DIV");if(k.id="separator_"+id,k.className="TopLevel"==level?"top_sep":"sub_sep",k.onselectstart=function(e){e=e||event,e.returnValue=!1},k.onclick=function(e){e=e||event,e.cancelBubble=!0;var cas={ctrl:e.ctrlKey,alt:e.altKey,shift:e.shiftKey};main_self._doOnClick(this.id.replace("separator_"+main_self.idPrefix,""),"--s",cas)},"TopLevel"==level){if(null!=pos)pos++,0>pos&&(pos=0),null!=this.cont.childNodes[pos]?this.cont.insertBefore(k,this.cont.childNodes[pos]):this.cont.appendChild(k);else{var last=this.cont.childNodes[this.cont.childNodes.length-1];-1==String(last).search("TopLevel_Text")?this.cont.appendChild(k):this.cont.insertBefore(k,last)}this.idPull[k.id]=k}else{var polygon=this.idPull["polygon_"+this.itemPull[id].parent];null!=pos&&(pos++,0>pos&&(pos=0),pos>polygon.tbd.childNodes.length-1&&(pos=null)),null!=pos&&null!=polygon.tbd.childNodes[pos]?polygon.tbd.insertBefore(tr,polygon.tbd.childNodes[pos]):polygon.tbd.appendChild(tr),td.appendChild(k),this.idPull[k.id]=tr}}},dhtmlXMenuObject.prototype.addNewSeparator=function(nextToId,itemId){itemId=this.idPrefix+(null!=itemId?itemId:this._genStr(24));var parentId=this.idPrefix+this.getParentId(nextToId);this._addItemIntoGlobalStrorage(itemId,parentId,"","separator",!1,"",""),this._renderSeparator(itemId,this.getItemPosition(nextToId))},dhtmlXMenuObject.prototype.hide=function(){this._clearAndHide()},dhtmlXMenuObject.prototype.clearAll=function(){this.removeItem(this.idPrefix+this.topId,!0),this._isInited=!1,this.idPrefix=this._genStr(12),this.itemPull={}},dhtmlXMenuObject.prototype.unload=function(){if("function"==typeof window.addEventListener?(window.removeEventListener("click",this._bodyClick,!1),window.removeEventListener("contextmenu",this._bodyContext,!1)):(document.body.detachEvent("onclick",this._bodyClick),document.body.detachEvent("oncontextmenu",this._bodyContext)),this._bodyClick=null,this._bodyContext=null,this.removeItem(this.idPrefix+this.topId,!0),this.itemPull=null,this.idPull=null,this.context)for(var a in this.contextZones)this.removeContextZone(a);null!=this.cont&&(this.cont.className="",this.cont.parentNode.removeChild(this.cont),this.cont=null),null!=this.base
"item"==this.itemPull[a].type&&(""!=this.itemPull[a].imgen&&(imgEn=' img="'+this.itemPull[a].imgen+'"'),""!=this.itemPull[a].imgdis&&(imgDis=' imgdis="'+this.itemPull[a].imgdis+'"'),""!=this.itemPull[a].hotkey&&(hotKey="<hotkey>"+this.itemPull[a].hotkey+"</hotkey>")),"separator"==this.itemPull[a].type?itemType=' type="separator"':"disabled"==this.itemPull[a].state&&(itemState=' enabled="false"'),"checkbox"==this.itemPull[a].type&&(itemType=' type="checkbox"'+(this.itemPull[a].checked?' checked="true"':"")),"radio"==this.itemPull[a].type&&(itemType=' type="radio" group="'+this.itemPull[a].group+'" '+(this.itemPull[a].checked?' checked="true"':"")),xml+="<item id='"+itemId+"'"+itemText+itemType+imgEn+imgDis+itemState+">",xml+=hotKey,this.itemPull[a].complex&&(xml+=this._readLevel(a)),xml+="</item>"}return xml},dhtmlXMenuObject.prototype.serialize=function(){var xml="<menu>"+this._readLevel(this.idPrefix+this.topId)+"</menu>";return xml},"function"==typeof egw&&egw(window).includeCSS(egw.webserverUrl+"/phpgwapi/js/egw_action/test/skins/dhtmlxmenu_egw.css"),egwMenuImpl.prototype._translateStructure=function(_structure,_parentId,_idCnt){for(var counter=0,last_id=null,i=0;i<_structure.length;i++){var elem=_structure[i],id=elem.id||"elem_"+(_idCnt+counter);if(counter++,"-"==elem.caption&&null!=last_id)this.dhtmlxmenu.addNewSeparator(last_id,id);else{if(elem.checkbox&&0===elem.groupIndex)this.dhtmlxmenu.addCheckbox("child",_parentId,i,id,elem.caption,elem.checked,!elem.enabled);else if(elem.checkbox&&elem.groupIndex>0)elem._dhtmlx_grpid="grp_"+_idCnt+"_"+elem.groupIndex,this.dhtmlxmenu.addRadioButton("child",_parentId,i,id,elem.caption,elem._dhtmlx_grpid,elem.checked,!elem.enabled);else{var caption=elem.caption;elem.default&&(caption="<b>"+caption+"</b>"),this.dhtmlxmenu.addNewChild(_parentId,i,id,caption,!elem.enabled,elem.iconUrl,elem.iconUrl)}null!=elem.shortcutCaption&&this.dhtmlxmenu.setHotKey(id,elem.shortcutCaption),elem.children.length>0&&(counter+=this._translateStructure(elem.children,id,_idCnt+counter))}this.dhtmlxmenu.setUserData(id,"egw_menu",elem),elem.hint&&this.dhtmlxmenu.setTooltip(id,elem.hint);var last_id=id}return counter},egwMenuImpl.prototype.showAt=function(_x,_y,_onHide){var self=this;_onHide&&this.dhtmlxmenu.attachEvent("onHide",function(id){null===id&&_onHide()});var self=this;window.setTimeout(function(){self.dhtmlxmenu.showContextMenu(_x,_y)},0)},egwMenuImpl.prototype.hide=function(){this.dhtmlxmenu.hide()},function(){var SelectParser;SelectParser=function(){function SelectParser(){this.options_index=0,this.parsed=[]}return SelectParser.prototype.add_node=function(child){return"OPTGROUP"===child.nodeName.toUpperCase()?this.add_group(child):this.add_option(child)},SelectParser.prototype.add_group=function(group){var group_position,option,_i,_len,_ref,_results;for(group_position=this.parsed.length,this.parsed.push({array_index:group_position,group:!0,label:this.escapeExpression(group.label),children:0,disabled:group.disabled}),_ref=group.childNodes,_results=[],_i=0,_len=_ref.length;_len>_i;_i++)option=_ref[_i],_results.push(this.add_option(option,group_position,group.disabled));return _results},SelectParser.prototype.add_option=function(option,group_position,group_disabled){return"OPTION"===option.nodeName.toUpperCase()?(""!==option.text?(null!=group_position&&(this.parsed[group_position].children+=1),this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,value:option.value,text:option.text,html:option.innerHTML,selected:option.selected,disabled:group_disabled===!0?group_disabled:option.disabled,group_array_index:group_position,classes:option.className,style:option.style.cssText})):this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,empty:!0}),this.options_index+=1):void 0},SelectParser.prototype.escapeExpression=function(text){var map,unsafe_chars;return null==text||text===!1?"":/[\&\<\>\"\'\`]/.test(text)?(map={"<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},unsafe_chars=/&(?!\w+;)|[\<\>\"\'\`]/g,text.replace(unsafe_chars,function
2016-03-02 09:46:43 +01:00
//# sourceMappingURL=jsapi.min.js.map