var AdfDhtmlBaseProjectGanttPeer=AdfRichUIPeer.createPeerClass(A_N,"AdfDhtmlBaseProjectGanttPeer",!1);A_a("AdfDhtmlBaseProjectGanttPeer",AdfDhtmlBaseProjectGanttPeer);
AdfDhtmlBaseProjectGanttPeer.InitSubclass=function(){AdfRichUIPeer.addComponentEventHandlers(this,AdfSelectionEvent.SELECTION_EVENT_TYPE);this.qF="_cpSplit";this.ME="_cpMerge";this.qv="_bSplit";this.rv="_split";this.$u="_merge";this.qj="_cpProp";this.Ev="_tpVs";this.Iu="_dpLn";this.Zp="_dpdLn";this.oE="_dpAsLn";this.pE="_dpAsMn";this.qE="_dpNone";this.Sp="rPopup";this.Qp="_rcp";this.Rp="_rpp";this.eE="ct_conv";var a=this.Qf={};a[this.oE]="dependency_lines";a[this.pE]="dependency_menu";a[this.qE]=
"dependency_none";a=this.Nf={};a[this.qv]="split";a[this.rv]="split";a[this.$u]="merge";a[this.qF]="splitPopup";a[this.ME]="merge";a[this.qj]="properties";a[this.Ev]="viewSelected";a[this.Zp]="gotoDependentTask";a[this.Qp]="create";a[this.Rp]="paste";this.dragger=this.tl=null;this.ja=!1;this.lf=null;this.ga=this.Ca=!1;this.P=this.Fg=this.fb=0;this.He=this.vc=null;this.Dt=0;this.sc=!1;this.Bi=this.Ci=this.$d=this.$a=null};A_a("AdfDhtmlBaseProjectGanttPeer.InitSubclass",AdfDhtmlBaseProjectGanttPeer.InitSubclass);
AdfDhtmlBaseProjectGanttPeer.prototype.InitDomElement=function(a,b){AdfDhtmlBaseProjectGanttPeer.superclass.InitDomElement.call(this,a,b);this.$d=a.getProperty("selectedIds");null!=this.$d&&0<this.$d.length&&(this.$a=this.$d.split(","))};AdfDhtmlBaseProjectGanttPeer.prototype.InitDomElement=AdfDhtmlBaseProjectGanttPeer.prototype.InitDomElement;
AdfDhtmlBaseProjectGanttPeer.prototype.pC=function(a){if(a.getSource().getClientId()==A_Bc(this)){var b=a.getSource().getSelectedRowKeys(),c=0,d;for(d in b)c++;null==this.$a&&(this.$a=[]);1>=c&&(this.$a.length=0);c=a.getAddedSet();b=0;for(d in c)b++;for(d in c){c=!1;if(1<b)for(var e=0;e<this.$a.length;e++){var f=this.$a[e];if(f==d){c=!0;break}}c||this.$a.push(d)}a=a.getRemovedSet();for(d in a)for(e=0;e<this.$a.length;e++)f=this.$a[e],f==d&&(this.$a[e]=null);A_jd(this)}};
A_a("AdfDhtmlBaseProjectGanttPeer.prototype.HandleComponentSelection",AdfDhtmlBaseProjectGanttPeer.prototype.pC);
function A_jd(a){if(0<a.$a.length){var b=!0;for(i=0;i<a.$a.length;i++){var c=a.$a[i];null!=c&&(b=!1)}if(!b){b="";for(i=0;i<a.$a.length;i++)c=a.$a[i],null!=c&&(""!=b&&(b+=","),b+=c);a.$d=b;if(null!=a.Ci&&null!=a.Bi){for(var c=[],b=a.getComponent().getClientId()+AdfDhtmlBaseGanttPeer.D+AdfDhtmlBaseGanttPeer.Pb,b=document.getElementById(b).childNodes[1].childNodes,d=!1,e=!1,f=null,g=!1,h=0;h<b.length&&!g;h++){var l;l="DIV"!=b[h].nodeName?AdfAgent.AGENT.getPlatform()!=AdfAgent.WEBKIT_PLATFORM?b[h].childNodes[0].childNodes:
b[h].childNodes[1].childNodes:b[h].childNodes[0].childNodes[0].childNodes;for(var m=0;m<l.length&&!g;m++){var n=l[m].getAttribute("_afrrk");if(!d){if(n==a.Ci||n==a.Bi)d=!0;f=n==a.Ci?a.Bi:a.Ci;n==a.Bi&&(e=!0)}d&&c.push(n);n==f&&(g=!0)}}e&&c.reverse();a.$d=c.toString();a.$a=a.$d.split(",")}a.getComponent().setProperty("selectedIds",a.$d,!1,AdfUIComponent.PROPAGATE_ALWAYS)}}}
AdfDhtmlBaseProjectGanttPeer.prototype.kb=function(a){AdfDhtmlBaseProjectGanttPeer.superclass.kb.call(this,a);a=a.getNativeEvent();var b=A_H(this,A_L(a));null!=b&&(1==a.ctrlKey||0==a.shiftKey||null==this.Ci?(this.Ci=b,this.Bi=null):this.Bi=b)};A_a("AdfDhtmlBaseProjectGanttPeer.prototype.HandleComponentMouseDown",AdfDhtmlBaseProjectGanttPeer.prototype.kb);
AdfDhtmlBaseProjectGanttPeer.prototype.HandleComponentAction=function(a){AdfDhtmlBaseProjectGanttPeer.superclass.HandleComponentAction.call(this,a);var b=a.getSource();if(!b.getDisabled()){var b=b.getClientId(),c=AdfDhtmlBaseProjectGanttPeer.Qf,d;for(d in c)if(0<=b.indexOf(d)){this.uf(c[d]);a.cancel();return}c=AdfDhtmlBaseProjectGanttPeer.Nf;for(d in c)if(0<=b.indexOf(d)){this[c[d]].call(this,a);a.cancel();return}null!=this.Mb&&(a=A_Ec(this,this.Mb),a=new A_kd(this.getComponent(),a),AdfPage.PAGE.queueEventToServer(a),
this.Mb=null)}};A_a("AdfDhtmlBaseProjectGanttPeer.prototype.HandleComponentAction",AdfDhtmlBaseProjectGanttPeer.prototype.HandleComponentAction);AdfDhtmlBaseProjectGanttPeer.prototype.Bs=function(){var a=this.getDomElement().getAttribute("rcrcm");return null!=a?a:AdfDhtmlBaseProjectGanttPeer.Sp};
AdfDhtmlBaseProjectGanttPeer.prototype.jb=function(a){AdfDhtmlBaseProjectGanttPeer.superclass.jb.call(this,a);a=a.getNativeEvent();var b=A_L(a),c=A_E(this),d=A_J(this,b,AdfDhtmlBaseGanttPeer.v);null!=d&&null!=d.getAttribute(AdfDhtmlBaseGanttPeer.v)?(this.ms=A_H(this,d),b=this.getComponent(),this.showContextMenu(a,A_Jc(this),b,null,null,c)):this.Uj(AdfPage.PAGE.findComponent(c).getPeer().getDomElement(),b)&&null!=A_H(this,b)&&(b=this.getComponent(),this.showContextMenu(a,this.Bs(),b,null,null,c),this.Mb=
a)};AdfDhtmlBaseProjectGanttPeer.prototype.HandleComponentContextMenu=AdfDhtmlBaseProjectGanttPeer.prototype.jb;A_a("AdfDhtmlBaseProjectGanttPeer.prototype.HandleComponentContextMenu",AdfDhtmlBaseProjectGanttPeer.prototype.jb);AdfDhtmlBaseProjectGanttPeer.prototype.yd=function(a){AdfDhtmlBaseProjectGanttPeer.superclass.Ef.call(this,a);var b=this;setTimeout(function(){b.Mb=null;console.log("cleared")},0)};AdfDhtmlBaseProjectGanttPeer.prototype.HandleComponentPopupClosed=AdfDhtmlBaseProjectGanttPeer.prototype.yd;
A_a("AdfDhtmlBaseProjectGanttPeer.prototype.HandleComponentPopupClosed",AdfDhtmlBaseProjectGanttPeer.prototype.yd);AdfDhtmlBaseProjectGanttPeer.prototype.ui=function(){return!1};AdfDhtmlBaseProjectGanttPeer.prototype.FN=function(){this.uf("viewSelectedTask")};AdfDhtmlBaseProjectGanttPeer.prototype.viewSelected=AdfDhtmlBaseProjectGanttPeer.prototype.FN;AdfDhtmlBaseProjectGanttPeer.prototype.create=function(){this.Pj(this.Mb,"cmCreate");this.Mb=null};AdfDhtmlBaseProjectGanttPeer.prototype.create=AdfDhtmlBaseProjectGanttPeer.prototype.create;
AdfDhtmlBaseProjectGanttPeer.prototype.mt=function(){this.Pj(this.Mb,"cmPaste");this.Mb=null};AdfDhtmlBaseProjectGanttPeer.prototype.paste=AdfDhtmlBaseProjectGanttPeer.prototype.mt;AdfDhtmlBaseProjectGanttPeer.prototype.Pj=function(a,b){var c={};c.actionType=b;c.rowKey=A_H(this,A_L(a));c.location=A_Ec(this,a);var d=this.getComponent(),c=new A_M(d,c);c.setPartial(!0);d.queueEvent(c)};
AdfDhtmlBaseProjectGanttPeer.prototype.yi=function(a){var b={actionType:"properties",taskId:""};null!=this.ms?(b.rowKey=this.ms,this.ms=null):null!=a&&(a=A_L(a),null!=a&&(b.rowKey=A_H(this,a)));a=this.getComponent();b=new A_M(a,b);b.setPartial(!0);a.queueEvent(b)};AdfDhtmlBaseProjectGanttPeer.prototype.properties=AdfDhtmlBaseProjectGanttPeer.prototype.yi;
AdfDhtmlBaseProjectGanttPeer.prototype.link=function(){var a={actionType:"link"};a.rowKeys=this.$d;var b=this.getComponent(),a=new A_M(b,a);a.setPartial(!0);b.queueEvent(a)};AdfDhtmlBaseProjectGanttPeer.prototype.link=AdfDhtmlBaseProjectGanttPeer.prototype.link;AdfDhtmlBaseProjectGanttPeer.prototype.Lt=function(){var a={actionType:"unlink"};a.rowKeys=this.$d;var b=this.getComponent(),a=new A_M(b,a);a.setPartial(!0);b.queueEvent(a)};AdfDhtmlBaseProjectGanttPeer.prototype.unlink=AdfDhtmlBaseProjectGanttPeer.prototype.Lt;
AdfDhtmlBaseProjectGanttPeer.prototype.split=function(){var a={actionType:"split"};null!=this.ud()&&(a.taskId=this.ud());var b=this.getComponent(),a=new A_M(b,a);a.setPartial(!0);b.queueEvent(a)};AdfDhtmlBaseProjectGanttPeer.prototype.split=AdfDhtmlBaseProjectGanttPeer.prototype.split;
AdfDhtmlBaseProjectGanttPeer.prototype.qN=function(){var a={actionType:"split"};null!=this.ud()&&(a.taskId=this.ud());null!=this.xo&&(a.splitId=this.xo);a.splitLoc=this.Dt;a.splitterStart=this.Dt+10;var b=this.getComponent(),a=new A_M(b,a);a.setPartial(!0);b.queueEvent(a)};AdfDhtmlBaseProjectGanttPeer.prototype.splitPopup=AdfDhtmlBaseProjectGanttPeer.prototype.qN;
AdfDhtmlBaseProjectGanttPeer.prototype.Iz=function(){var a={actionType:"merge"};null!=this.ud()&&(a.taskId=this.ud());null!=this.xo&&(a.splitId=this.xo);var b=this.getComponent(),a=new A_M(b,a);a.setPartial(!0);b.queueEvent(a)};AdfDhtmlBaseProjectGanttPeer.prototype.merge=AdfDhtmlBaseProjectGanttPeer.prototype.Iz;
AdfDhtmlBaseProjectGanttPeer.prototype.BL=function(a){a=a.getSource().getClientId();var b=a.substring(a.lastIndexOf(AdfDhtmlBaseProjectGanttPeer.Zp)+AdfDhtmlBaseProjectGanttPeer.Zp.length,a.length);a={};a.taskId=b;b=this.getComponent();a=new A_I(b,"gotoDepTask",a);a.setPartial(!0);b.queueEvent(a)};AdfDhtmlBaseProjectGanttPeer.prototype.gotoDependentTask=AdfDhtmlBaseProjectGanttPeer.prototype.BL;
AdfDhtmlBaseProjectGanttPeer.prototype.wo=function(a){this.sc||this.ja||(this.dragger=A_L(a),null!=this.dragger.getAttribute(AdfDhtmlBaseGanttPeer.lc)?A_1c(this,"percentComplete")||(AdfAgent.getAgent().getPlatform()==AdfAgent.WEBKIT_PLATFORM?this.dragger.style.cursor="url("+A_2c(this)+"/bi/cursors/percentComplete.cur) 18 15, w-resize":this.dragger.style.cursor="url("+A_2c(this)+"/bi/cursors/percentComplete.cur), w-resize"):!A_1c(this,"edit")&&this.Fe()&&(this.dragger.style.cursor="w-resize"),this.Ca=
!0,this.ga=!1,null!=this.getTooltip()&&this.showTooltip(a))};AdfDhtmlBaseProjectGanttPeer.prototype.showResizeCursor=AdfDhtmlBaseProjectGanttPeer.prototype.wo;AdfDhtmlBaseProjectGanttPeer.prototype.Ct=function(a){this.ja||this.sc||(this.dragger=A_L(a),null!=this.getTooltip()&&this.showTooltip(a))};AdfDhtmlBaseProjectGanttPeer.prototype.showSummaryTooltip=AdfDhtmlBaseProjectGanttPeer.prototype.Ct;
AdfDhtmlBaseProjectGanttPeer.prototype.wz=function(){if(!this.ja&&!this.sc){var a=this.getTooltip();null!=a&&(a.style.display="none");this.dragger=null}};AdfDhtmlBaseProjectGanttPeer.prototype.hideSummaryTooltip=AdfDhtmlBaseProjectGanttPeer.prototype.wz;
AdfDhtmlBaseProjectGanttPeer.prototype.fA=function(a,b,c,d,e){c=A_0c(this);0<parseInt(a.style.left)+parseInt(a.offsetWidth)+10-(e.right-e.left+d)?a.style.top=parseInt(c.style.top)-parseInt(a.offsetHeight)+"px":a.style.left=parseInt(b)-parseInt(a.offsetWidth)-10+"px"};
AdfDhtmlBaseProjectGanttPeer.prototype.vo=function(a){if(this.sc)a=A_L(a),a=A_J(this,a,AdfDhtmlBaseGanttPeer.v),null==this.rb&&(this.rb=document.createElement("div")),this.rb.setAttribute(AdfDhtmlBaseGanttPeer.v,a.getAttribute(AdfDhtmlBaseGanttPeer.v)),this.rb.index=0,this.rb.style.position="absolute",this.rb.style.border="solid 2px #FF6600",AdfPage.PAGE.getLocaleContext().isRightToLeft()?this.rb.style.right=parseInt(a.style.right)-2+"px":this.rb.style.left=parseInt(a.style.left)-2+"px",this.rb.style.width=
parseInt(a.style.width)+5+"px",this.rb.style.top="50%",this.rb.style.marginTop="-10px",this.rb.style.height="15px",this.rb.style.display="block",a.parentNode.appendChild(this.rb);else if(!this.ja){this.dragger=A_L(a);!A_1c(this,"edit")&&this.Fe()&&(this.dragger.style.cursor="move");this.tl=this.dragger=A_J(this,this.dragger,AdfDhtmlBaseGanttPeer.v);this.xo=this.dragger.getAttribute(AdfDhtmlBaseGanttPeer.S);for(var b=0,c=this.dragger.parentNode;c;)b+=c.offsetLeft,c=c.offsetParent;this.Dt=a.clientX-
b;this.ga=!0;this.Ca=!1;null!=this.getTooltip()&&this.showTooltip(a);this.zi(a);this.Bt=!0}};AdfDhtmlBaseProjectGanttPeer.prototype.showMoveCursor=AdfDhtmlBaseProjectGanttPeer.prototype.vo;AdfDhtmlBaseProjectGanttPeer.prototype.ql=function(a){this.sc?null!=this.rb&&(this.rb.removeAttribute(AdfDhtmlBaseGanttPeer.v),this.rb.style.display="none"):null!=this.dragger&&null!=this.dragger.getAttribute(AdfDhtmlBaseGanttPeer.lc)||AdfDhtmlBaseProjectGanttPeer.superclass.ql.call(this,a)};
AdfDhtmlBaseProjectGanttPeer.prototype.resetCursor=AdfDhtmlBaseProjectGanttPeer.prototype.ql;
AdfDhtmlBaseProjectGanttPeer.prototype.Yz=function(a){var b=A_0c(this),c=a.target.parentNode;a.target.src=a.target.getAttribute("src_ovr");c=c.getAttribute("tooltip");if(null!=b){b.style.display="block";AdfPage.PAGE.getLocaleContext().isRightToLeft()?b.style.right=parseInt(this.C(a))+3+"px":b.style.left=parseInt(this.C(a))+3+"px";b.style.top=parseInt(this.pa(a))-30+"px";var d="\x3cdiv style\x3d'position:relative;padding-bottom:3px;padding-right:3px'\x3e";AdfPage.PAGE.getLocaleContext().isRightToLeft()&&
(d="\x3cdiv style\x3d'position:relative;padding-bottom:3px;padding-right:3px'\x3e");d=d+c+"\x3c/div\x3e";A_8c(this,b,this.C(a));b.childNodes[0].childNodes[1].childNodes[1].innerHTML=d}};AdfDhtmlBaseProjectGanttPeer.prototype.showDepTooltip=AdfDhtmlBaseProjectGanttPeer.prototype.Yz;AdfDhtmlBaseProjectGanttPeer.prototype.vz=function(a){var b=A_0c(this);a.target.src=a.target.getAttribute("src_ena");null!=b&&(b.style.display="none")};AdfDhtmlBaseProjectGanttPeer.prototype.hideDepTooltip=AdfDhtmlBaseProjectGanttPeer.prototype.vz;
AdfDhtmlBaseProjectGanttPeer.prototype.zi=function(a){if(!(this.si||A_1c(this,"split")||this.Pk||1==this.Dl)){var b=this.getComponent().getClientId(),b=AdfPage.PAGE.findComponent(b+AdfDhtmlBaseGanttPeer.D+A_Jc(this));if(null==b||!b.isPopupVisible())if(b=this.dragger.getAttribute(AdfDhtmlBaseGanttPeer.l),null!=b&&("bar"==b||"split"==b)){var c=new Date(parseInt(this.dragger.getAttribute(AdfDhtmlBaseGanttPeer.Dd))),b=new Date;b.setTime(c.getTime());var d=parseInt(this.os);if(0<d){var e=parseInt(AdfAgent.AGENT.getDomWindow().document.documentElement.scrollLeft),
e=parseInt(this.C(a))-e-(parseInt(AdfAgent.AGENT.getElementLeft(this.dragger))+e)+parseInt(AdfAgent.AGENT.getElementLeft(this.getDomElement())),d=Math.round(e/d);if(0!=d){var f=this.Nk;"hour"==f?b.setMinutes(c.getMinutes()+d):b.setDate(c.getDate()+d)}}c=A_6c(this,AdfDhtmlBaseGanttPeer.mq);null!=c?b=c.getAsString(b):(b=A_7c(this,b),"hour"==f&&(b+="\x3c/b\x3e"));f=A_0c(this);null!=f&&(f.style.display="block",AdfPage.PAGE.getLocaleContext().isRightToLeft()?f.style.right=parseInt(this.C(a))+3+"px":f.style.left=
parseInt(this.C(a))+3+"px",f.style.top=parseInt(this.pa(a))-30+"px",c="\x3cdiv style\x3d'position:relative;padding-bottom:3px;padding-right:3px'\x3e",AdfPage.PAGE.getLocaleContext().isRightToLeft()&&(c="\x3cdiv style\x3d'position:relative;padding-bottom:3px;padding-right:3px'\x3e"),c=c+b+"\x3c/div\x3e",A_8c(this,f,this.C(a)),f.childNodes[0].childNodes[1].childNodes[1].innerHTML=c)}}};AdfDhtmlBaseProjectGanttPeer.prototype.renderSplitTooltip=AdfDhtmlBaseProjectGanttPeer.prototype.zi;
function A_ld(a,b){var c=new Date(parseInt(a.dragger.parentNode.getAttribute("ctt"))),d=a.Nk,e=new Date;e.setTime(c.getTime());var f=parseInt(a.os);if(0<f){var g=a.C(b)-a.Lc,f=Math.round(g/f);"hour"==d?e.setMinutes(c.getMinutes()+f):e.setDate(c.getDate()+f)}c=A_Dc(a);null!=c&&(AdfPage.PAGE.getLocaleContext().isRightToLeft()?c.style.right=a.C(b)+"px":c.style.left=a.C(b)+"px",c.style.display="block",f="",f=a.getDomElement(),c.style.top=parseInt(a.pa(b))-30+"px",g=A_6c(a,AdfDhtmlBaseProjectGanttPeer.eE),
null!=g?e=g.getAsString(e):(e=A_7c(a,e),"hour"==d&&(e+="\x3c/b\x3e")),f="\x3ctable cellpadding\x3d'0' cellspacing\x3d'0' style\x3d'padding-bottom:3px;padding-right:3px'\x3e\x3ctr valign\x3d'top'\x3e\x3ctd class\x3d'"+f.getAttribute(AdfDhtmlBaseGanttPeer.Ed)+"' style\x3d'text-align:right; padding:0 8px 0 0; white-space: nowrap;'\x3eComplete Through\x3c/td\x3e\x3ctd  style\x3d'text-align:left;'\x3e"+e+"\x3c/td\x3e\x3c/tr\x3e\x3c/table\x3e",A_8c(a,c,a.C(b)),c.childNodes[0].childNodes[1].childNodes[1].innerHTML=
f,AdfPage.PAGE.getLocaleContext().isRightToLeft()?c.style.right=parseInt(c.style.right)-parseInt(c.offsetWidth)-10+"px":c.style.left=parseInt(c.style.left)-parseInt(c.offsetWidth)-10+"px")}
AdfDhtmlBaseProjectGanttPeer.prototype.Fi=function(a){if(!this.ja&&null!=this.dragger)if(a.cancelBubble=!0,A_3c(a)){null!=this.dragger&&(null==this.Gb&&(this.Gb=document.createElement("div")),this.Gb.setAttribute(AdfDhtmlBaseGanttPeer.v,this.dragger.getAttribute(AdfDhtmlBaseGanttPeer.v)),this.Gb.index=0,this.Gb.style.position="absolute",this.Gb.style.border="solid 2px #FF6600",AdfPage.PAGE.getLocaleContext().isRightToLeft()?this.Gb.style.right=parseInt(this.dragger.style.right)-2+"px":this.Gb.style.left=
parseInt(this.dragger.style.left)-2+"px",this.Gb.style.width=parseInt(this.dragger.style.width)+5+"px",this.Gb.style.top="50%",this.Gb.style.marginTop="-10px",this.Gb.style.height="15px",this.Gb.style.display="block",this.dragger.parentNode.appendChild(this.Gb),this.lf=this.dragger.style.border);this.ko=this.C(a);this.dt=this.pa(a);var b=this.getComponent(),c=document.getElementById(b.getClientId()+"::hline"),d=document.getElementById(b.getClientId()+"::vline"),b=document.getElementById(b.getClientId()+
"::connector");null!=c&&null!=d&&null!=b&&(c.display="block",d.display="block",AdfPage.PAGE.getLocaleContext().isRightToLeft()?c.style.right=this.C(a)+"px":c.style.left=this.C(a)+"px",c.style.top=this.pa(a)+"px",c.style.display="block",AdfPage.PAGE.getLocaleContext().isRightToLeft()?d.style.right=this.C(a)+"px":d.style.left=this.C(a)+"px",d.style.top=this.pa(a)+"px",d.style.display="block",AdfPage.PAGE.getLocaleContext().isRightToLeft()?b.style.right=parseInt(this.C(a))-6+"px":b.style.left=parseInt(this.C(a))-
6+"px",b.style.top=parseInt(this.pa(a))-13+"px",b.style.display="block",a=this.getTooltip(),null!=a&&(a.style.display="none"),a=A_0c(this),null!=a&&(a.style.display="none"),this.sc=!0)}else{this.Lc=this.C(a);this.ja=!0;c=this.getTooltip();null!=c&&(c.style.display="none");c=A_0c(this);null!=c&&(c.style.display="none");if(this.Ca){if(null!=this.dragger.getAttribute(AdfDhtmlBaseGanttPeer.lc)){this.fb=this.dragger.style.width;AdfPage.PAGE.getLocaleContext().isRightToLeft()?this.Fg=this.dragger.style.right:
this.Fg=this.dragger.style.left;return}this.P=AdfAgent.AGENT.getElementLeft(this.dragger.previousSibling);this.resizeGhostRight=this.resizeGhostBar=null;for(var b=this.dragger.getAttribute(AdfDhtmlBaseGanttPeer.S),e=this.dragger.getAttribute(AdfDhtmlBaseGanttPeer.Z),c=0;c<this.dragger.parentNode.childNodes.length;c++)if(d=this.dragger.parentNode.childNodes[c],null==b&&null==e||null!=b&&b==d.getAttribute(AdfDhtmlBaseGanttPeer.S)||null!=e&&e==d.getAttribute(AdfDhtmlBaseGanttPeer.Z))d.getAttribute("part")==
AdfDhtmlBaseGanttPeer.xc&&null==this.resizeGhostBar&&(this.resizeGhostBar=d.cloneNode(!0)),d.getAttribute("part")==AdfDhtmlBaseGanttPeer.Cd&&null==this.resizeGhostBar?this.resizeGhostBar=d.cloneNode(!0):d.getAttribute("part")==AdfDhtmlBaseGanttPeer.Ue&&null==this.resizeGhostRight&&(this.resizeGhostRight=d.cloneNode(!0));if(null!=b||null!=e)d="0",AdfPage.PAGE.getLocaleContext().isRightToLeft()?this.dragger.parentNode.style.right&&(d=this.dragger.parentNode.style.right):this.dragger.parentNode.style.left&&
(d=this.dragger.parentNode.style.left),c=AdfAgent.AGENT.getComputedStyle(this.dragger.parentNode).marginTop,this.resizeGhostBar.style.marginTop=c,AdfPage.PAGE.getLocaleContext().isRightToLeft()?this.resizeGhostBar.style.right=parseInt(this.resizeGhostBar.style.right)+parseInt(d)+"px":this.resizeGhostBar.style.left=parseInt(this.resizeGhostBar.style.left)+parseInt(d)+"px",this.resizeGhostBar.style.top="50%",this.resizeGhostRight.style.marginTop=c,AdfPage.PAGE.getLocaleContext().isRightToLeft()?this.resizeGhostRight.style.right=
parseInt(this.resizeGhostRight.style.right)+parseInt(d)+"px":this.resizeGhostRight.style.left=parseInt(this.resizeGhostRight.style.left)+parseInt(d)+"px",this.resizeGhostRight.style.top="50%";AdfAgent.AGENT.setOpacity(this.resizeGhostBar,70);this.resizeGhostBar.style.Lz="absolute";this.resizeGhostBar.style.width=parseInt(this.resizeGhostBar.style.width)+5+"px";this.resizeGhostBar.style.cursor="w-resize";this.resizeGhostRight.style.Lz="absolute";this.resizeGhostRight.style.cursor="w-resize";c=this.dragger.parentNode;
if(null!=b||null!=e)c=c.parentNode;c.appendChild(this.resizeGhostBar);c.appendChild(this.resizeGhostRight);this.fb=this.resizeGhostBar.style.width;this.resizeGhostWidth=parseInt(this.fb)}else if(this.ga){b=this.Za();b.style.height="18px";for(var e=this.dragger.getAttribute(AdfDhtmlBaseGanttPeer.S),f=this.dragger.getAttribute(AdfDhtmlBaseGanttPeer.Z),c=0;c<this.dragger.parentNode.childNodes.length;c++)if(d=this.dragger.parentNode.childNodes[c],null==e||e==d.getAttribute(AdfDhtmlBaseGanttPeer.S))if(null==
f||f==d.getAttribute(AdfDhtmlBaseGanttPeer.Z)){var g=d.cloneNode(!0);g.onmouseover=null;g.onmouseout=null;g.onmousedown=null;g.style.cursor="move";if(d.getAttribute(AdfDhtmlBaseGanttPeer.l)==AdfDhtmlBaseGanttPeer.gq||d.getAttribute(AdfDhtmlBaseGanttPeer.l)==AdfDhtmlBaseGanttPeer.xc||d.getAttribute(AdfDhtmlBaseGanttPeer.l)==AdfDhtmlBaseGanttPeer.Cd)AdfPage.PAGE.getLocaleContext().isRightToLeft()?g.style.right="0px":g.style.left="0px";else if(d.getAttribute(AdfDhtmlBaseGanttPeer.l)==AdfDhtmlBaseGanttPeer.gm)AdfPage.PAGE.getLocaleContext().isRightToLeft()?
g.style.right=parseInt(this.dragger.style.width)+"px":g.style.left=parseInt(this.dragger.style.width)+"px";else if(d.getAttribute(AdfDhtmlBaseGanttPeer.l)==AdfDhtmlBaseGanttPeer.Ue)AdfDhtmlBaseGanttPeer.R()?AdfPage.PAGE.getLocaleContext().isRightToLeft()?g.style.right=parseInt(this.dragger.style.width)+"px":g.style.left=parseInt(this.dragger.style.width)+"px":AdfPage.PAGE.getLocaleContext().isRightToLeft()?g.style.right=parseInt(this.dragger.style.width)+5+"px":g.style.left=parseInt(this.dragger.style.width)+
5+"px";else continue;b.firstChild.appendChild(g)}AdfAgent.AGENT.setOpacity(b,70);c=AdfAgent.AGENT.getComputedStyle(this.dragger).marginTop;d=c.indexOf("px");-1!=d&&(c=parseInt(c.substring(0,d)),b.style.marginTop=0-c+"px");b.style.width=parseInt(this.dragger.style.width)+6+"px";AdfPage.PAGE.getLocaleContext().isRightToLeft()?b.style.right=parseInt(A_fd(this,this.dragger))-parseInt(A_Gc(this.getDomElement()))+"px":b.style.left=parseInt(AdfAgent.AGENT.getElementLeft(this.dragger))-parseInt(AdfAgent.AGENT.getElementLeft(this.getDomElement()))+
"px";b.style.top=parseInt(AdfAgent.AGENT.getElementTop(this.dragger))-parseInt(AdfAgent.AGENT.getElementTop(this.getDomElement()))+"px";AdfPage.PAGE.getLocaleContext().isRightToLeft()?this.P=parseInt(b.style.right)-A_Hc(this)+"px":this.P=parseInt(b.style.left)-A_Hc(this)+"px"}if(null!=this.dragger.getAttribute(AdfDhtmlBaseGanttPeer.lc))for(A_ld(this,a),this.dragger.parentNode.style.width=parseInt(this.dragger.parentNode.style.width)+5+"px",c=0;c<this.dragger.parentNode.parentNode.childNodes.length;c++){if(d=
this.dragger.parentNode.parentNode.childNodes[c],d.getAttribute(AdfDhtmlBaseGanttPeer.l)==AdfDhtmlBaseGanttPeer.gm&&d.getAttribute(AdfDhtmlBaseGanttPeer.v)==this.dragger.parentNode.getAttribute(AdfDhtmlBaseGanttPeer.v)){d.style.width="0px";break}}else this.vc=new Date(parseInt(this.dragger.getAttribute(AdfDhtmlBaseGanttPeer.Dd))),this.He=new Date(parseInt(this.dragger.getAttribute(AdfDhtmlBaseGanttPeer.Pf))),A_4c(this,a)}};AdfDhtmlBaseProjectGanttPeer.prototype.startNormalDrag=AdfDhtmlBaseProjectGanttPeer.prototype.Fi;
AdfDhtmlBaseProjectGanttPeer.prototype.Gy=function(a,b){if(this.Ca&&1>=parseInt(this.resizeGhostBar.style.width))return!0;this.Ag(a,b);return!1};
AdfDhtmlBaseProjectGanttPeer.prototype.Ag=function(a){null==this.dragger&&this.Va();if(this.Ca){this.mergeWith=null;var b=this.dragger.getAttribute(AdfDhtmlBaseGanttPeer.S),c=this.dragger.getAttribute(AdfDhtmlBaseGanttPeer.Z);if(null!=b||null!=c)for(i=0;i<this.dragger.parentNode.childNodes.length;i++){var d=this.dragger.parentNode.childNodes[i];if(null!=b&&d.getAttribute(AdfDhtmlBaseGanttPeer.l)==AdfDhtmlBaseGanttPeer.Cd){if(b!=d.getAttribute(AdfDhtmlBaseGanttPeer.S))if(AdfPage.PAGE.getLocaleContext().isRightToLeft()){if(parseInt(this.dragger.style.right)+
parseInt(this.dragger.parentNode.style.right)<parseInt(d.style.right)+parseInt(this.dragger.parentNode.style.right)&&parseInt(this.resizeGhostBar.style.right)+parseInt(this.resizeGhostWidth)+a>parseInt(d.style.right)+parseInt(this.dragger.parentNode.style.right)){this.mergeWith=d.getAttribute(AdfDhtmlBaseGanttPeer.S);break}}else if(parseInt(this.dragger.style.left)+parseInt(this.dragger.parentNode.style.left)<parseInt(d.style.left)+parseInt(this.dragger.parentNode.style.left)&&parseInt(this.resizeGhostBar.style.left)+
parseInt(this.resizeGhostWidth)+a>parseInt(d.style.left)+parseInt(this.dragger.parentNode.style.left)){this.mergeWith=d.getAttribute(AdfDhtmlBaseGanttPeer.S);break}}else if(null!=c&&d.getAttribute(AdfDhtmlBaseGanttPeer.l)==AdfDhtmlBaseGanttPeer.xc&&c!=d.getAttribute(AdfDhtmlBaseGanttPeer.Z))if(AdfPage.PAGE.getLocaleContext().isRightToLeft()){if(parseInt(this.dragger.style.right)<parseInt(d.style.right)&&parseInt(this.resizeGhostBar.style.right)+parseInt(this.resizeGhostWidth)+a>parseInt(d.style.right)){this.mergeWith=
d.getAttribute(AdfDhtmlBaseGanttPeer.Z);break}}else if(parseInt(this.dragger.style.left)<parseInt(d.style.left)&&parseInt(this.resizeGhostBar.style.left)+parseInt(this.resizeGhostWidth)+a>parseInt(d.style.left)){this.mergeWith=d.getAttribute(AdfDhtmlBaseGanttPeer.Z);break}}this.resizeGhostWidth+=a;null==this.mergeWith&&(0<this.resizeGhostWidth?(this.resizeGhostBar.style.width=this.resizeGhostWidth+"px",AdfPage.PAGE.getLocaleContext().isRightToLeft()?this.resizeGhostRight.style.right=parseInt(this.resizeGhostBar.style.right)+
parseInt(this.resizeGhostBar.style.width)+"px":this.resizeGhostRight.style.left=parseInt(this.resizeGhostBar.style.left)+parseInt(this.resizeGhostBar.style.width)+"px"):this.resizeGhostBar.style.width="0px")}else if(this.ga){this.mergeWith=null;var e=this.Za(),f=AdfPage.PAGE.getLocaleContext().isRightToLeft()?A_fd(this,e):AdfAgent.AGENT.getElementLeft(e),b=this.dragger.getAttribute(AdfDhtmlBaseGanttPeer.S),c=this.dragger.getAttribute(AdfDhtmlBaseGanttPeer.Z);if(null!=b||null!=c)for(i=0;i<this.dragger.parentNode.childNodes.length;i++)if(d=
this.dragger.parentNode.childNodes[i],null!=b&&d.getAttribute(AdfDhtmlBaseGanttPeer.l)==AdfDhtmlBaseGanttPeer.Cd){if(b!=d.getAttribute(AdfDhtmlBaseGanttPeer.S))if(AdfPage.PAGE.getLocaleContext().isRightToLeft())if(parseInt(this.dragger.style.right)<parseInt(d.style.right)){if(0<a&&parseInt(f)+parseInt(e.style.width)>parseInt(A_fd(this,d))){this.mergeWith=d.getAttribute(AdfDhtmlBaseGanttPeer.S);break}}else{if(0>a&&parseInt(f)<parseInt(A_fd(this,d))+parseInt(d.style.width)+5){this.mergeWith=d.getAttribute(AdfDhtmlBaseGanttPeer.S);
break}}else if(parseInt(this.dragger.style.left)<parseInt(d.style.left)){if(0<a&&parseInt(f)+parseInt(e.style.width)>parseInt(AdfAgent.AGENT.getElementLeft(d))){this.mergeWith=d.getAttribute(AdfDhtmlBaseGanttPeer.S);break}}else if(0>a&&parseInt(f)<parseInt(AdfAgent.AGENT.getElementLeft(d))+parseInt(d.style.width)+5){this.mergeWith=d.getAttribute(AdfDhtmlBaseGanttPeer.S);break}}else if(null!=c&&d.getAttribute(AdfDhtmlBaseGanttPeer.l)==AdfDhtmlBaseGanttPeer.xc&&c!=d.getAttribute(AdfDhtmlBaseGanttPeer.Z)&&
(AdfPage.PAGE.getLocaleContext().isRightToLeft()&&parseInt(this.dragger.style.right)<parseInt(d.style.right)&&parseInt(f)>parseInt(A_fd(this,d))||!AdfPage.PAGE.getLocaleContext().isRightToLeft()&&parseInt(this.dragger.style.left)<parseInt(d.style.left)&&parseInt(f)>parseInt(AdfAgent.AGENT.getElementLeft(d)))){this.mergeWith=d.getAttribute(AdfDhtmlBaseGanttPeer.Z);break}null!=this.mergeWith||this.xb||(AdfPage.PAGE.getLocaleContext().isRightToLeft()?e.style.right=parseInt(e.style.right)+a+"px":e.style.left=
parseInt(e.style.left)+a+"px")}};
AdfDhtmlBaseProjectGanttPeer.prototype.Kg=function(a,b){this.Za().style.display="block";var c=this.getDomElement().offsetWidth,d=A_Hc(this),e=A_E(this),f=this.td(),g=0;f.scrollHeight!=f.clientHeight&&(g=22);var h=AdfDhtmlBaseGanttPeer.zd;if(0<b&&c<=this.C(a)+AdfDhtmlBaseGanttPeer.Ob+g||0>b&&this.C(a)<=d+AdfDhtmlBaseGanttPeer.Ob&&(!AdfPage.PAGE.getLocaleContext().isRightToLeft()&&0<f.scrollLeft||AdfPage.PAGE.getLocaleContext().isRightToLeft())){if(0<b&&c<=this.C(a)+AdfDhtmlBaseGanttPeer.Ob/2+g||0>
b&&this.C(a)<=d+AdfDhtmlBaseGanttPeer.Ob/2&&(!AdfPage.PAGE.getLocaleContext().isRightToLeft()&&0<f.scrollLeft||AdfPage.PAGE.getLocaleContext().isRightToLeft()))h*=2;if(null==this.Ai||!this.xb||this.xb&&this.Mk!=h)this.xb&&this.Va(),0<b?AdfDhtmlBaseGanttPeer.Ok(this.getComponent().getClientId(),e,this.C(a),this.pa(a),h,0):AdfDhtmlBaseGanttPeer.Ok(this.getComponent().getClientId(),e,this.C(a),this.pa(a),0-h,0),this.xb=!0,this.Mk=h}else this.xb&&this.Va();this.Ag(b)};
AdfDhtmlBaseProjectGanttPeer.prototype.handleAutoScrollMove=AdfDhtmlBaseProjectGanttPeer.prototype.Kg;
AdfDhtmlBaseProjectGanttPeer.prototype.oi=function(a,b,c){if(null!=this.dragger.getAttribute(AdfDhtmlBaseGanttPeer.lc)){if(0<b)if(this.C(a)<this.Lc)for(AdfPage.PAGE.getLocaleContext().isRightToLeft()?this.dragger.style.right=parseInt(this.dragger.style.right)+b+"px":this.dragger.style.left=parseInt(this.dragger.style.left)+b+"px",i=0;i<this.dragger.parentNode.childNodes.length;i++)_child=this.dragger.parentNode.childNodes[i],_child.getAttribute(AdfDhtmlBaseGanttPeer.l)==AdfDhtmlBaseGanttPeer.$b?_child.style.width=
parseInt(_child.style.width)+b+"px":_child.getAttribute(AdfDhtmlBaseGanttPeer.l)==AdfDhtmlBaseGanttPeer.Ue&&(AdfPage.PAGE.getLocaleContext().isRightToLeft()?_child.style.right=parseInt(_child.style.right)+b+"px":_child.style.left=parseInt(_child.style.left)+b+"px");else{if(c=AdfPage.PAGE.getLocaleContext().isRightToLeft()?parseInt(this.dragger.style.width)+parseInt(this.dragger.style.right)+b:parseInt(this.dragger.style.width)+parseInt(this.dragger.style.left)+b,AdfDhtmlBaseGanttPeer.R()&&(c+=5),
c<parseInt(this.dragger.parentNode.style.width)){for(i=0;i<this.dragger.parentNode.childNodes.length;i++)_child=this.dragger.parentNode.childNodes[i],_child.getAttribute(AdfDhtmlBaseGanttPeer.l)==AdfDhtmlBaseGanttPeer.Ue&&(AdfPage.PAGE.getLocaleContext().isRightToLeft()?_child.style.right=parseInt(_child.style.right)+b+"px":_child.style.left=parseInt(_child.style.left)+b+"px"),AdfDhtmlBaseGanttPeer.R()&&_child.getAttribute(AdfDhtmlBaseGanttPeer.l)==AdfDhtmlBaseGanttPeer.$b&&(_child.style.width=parseInt(_child.style.width)+
b+"px");this.dragger.style.width=parseInt(this.dragger.style.width)+b+"px"}}else if(5<parseInt(this.dragger.style.width)){for(i=0;i<this.dragger.parentNode.childNodes.length;i++)_child=this.dragger.parentNode.childNodes[i],_child.getAttribute(AdfDhtmlBaseGanttPeer.l)==AdfDhtmlBaseGanttPeer.Ue&&(AdfPage.PAGE.getLocaleContext().isRightToLeft()?_child.style.right=parseInt(_child.style.right)+b+"px":_child.style.left=parseInt(_child.style.left)+b+"px"),AdfDhtmlBaseGanttPeer.R()&&_child.getAttribute(AdfDhtmlBaseGanttPeer.l)==
AdfDhtmlBaseGanttPeer.$b&&(_child.style.width=parseInt(_child.style.width)+b+"px");this.dragger.style.width=parseInt(this.dragger.style.width)+b+"px"}else for(i=0;i<this.dragger.parentNode.childNodes.length;i++)_child=this.dragger.parentNode.childNodes[i],_child.getAttribute(AdfDhtmlBaseGanttPeer.l)==AdfDhtmlBaseGanttPeer.$b&&_child.style.width?(1>parseInt(_child.style.width)&&0<parseInt(this.dragger.style.width)&&(this.dragger.style.width=parseInt(this.dragger.style.width)+b+"px"),_child.style.width=
parseInt(_child.style.width)+b+"px"):_child.getAttribute(AdfDhtmlBaseGanttPeer.l)==AdfDhtmlBaseGanttPeer.Ue?AdfPage.PAGE.getLocaleContext().isRightToLeft()?0<parseInt(_child.style.right)+b&&(_child.style.right=parseInt(_child.style.right)+b+"px"):0<parseInt(_child.style.left)+b&&(_child.style.left=parseInt(_child.style.left)+b+"px"):null!=_child.getAttribute(AdfDhtmlBaseGanttPeer.lc)&&(AdfPage.PAGE.getLocaleContext().isRightToLeft()?0<parseInt(_child.style.right)+b&&(_child.style.right=parseInt(_child.style.right)+
b+"px"):0<parseInt(_child.style.left)+b&&(_child.style.left=parseInt(_child.style.left)+b+"px"));A_ld(this,a)}else AdfDhtmlBaseProjectGanttPeer.superclass.oi.call(this,a,b,c)};AdfDhtmlBaseProjectGanttPeer.prototype.handleAutoScrollResize=AdfDhtmlBaseProjectGanttPeer.prototype.oi;
AdfDhtmlBaseProjectGanttPeer.prototype.Lk=function(a,b,c){this.sc||(!this.ja&&null!=this.dragger&&this.ga&&this.Bt&&this.zi(a),this.ja&&null!=this.dragger&&(a.cancelBubble=!0,this.Ca?this.oi(a,b,c):this.ga&&this.Kg(a,b,c),null==this.dragger.getAttribute(AdfDhtmlBaseGanttPeer.lc)&&A_4c(this,a)))};AdfDhtmlBaseProjectGanttPeer.prototype.contNormalDrag=AdfDhtmlBaseProjectGanttPeer.prototype.Lk;
AdfDhtmlBaseProjectGanttPeer.prototype.ei=function(a){a.cancelBubble=!0;this.Lc=0;this.ja=!1;var b=A_Dc(this);null!=b&&(b.style.display="none");b=A_0c(this);null!=b&&(b.style.display="none");if(this.sc){if(this.$h(a),null!=this.Gb&&null!=this.rb){var b=this.Gb.getAttribute(AdfDhtmlBaseGanttPeer.v),c=this.rb.getAttribute(AdfDhtmlBaseGanttPeer.v);null!=b&&null!=c&&(b!=c&&(a={actionType:"link"},a.taskIds=b+","+c,b=this.td(),null!=b&&(a.scrollLeft=b.scrollLeft,a.scrollTop=b.scrollTop),b=this.getComponent(),
a=new A_M(b,a),a.setPartial(!0),b.queueEvent(a)),this.Gb.removeAttribute(AdfDhtmlBaseGanttPeer.v),this.rb.removeAttribute(AdfDhtmlBaseGanttPeer.v))}}else{a=this.getComponent();if(null!=this.dragger){var b={},d=a.getClientId()+AdfDhtmlBaseGanttPeer.D+AdfDhtmlBaseGanttPeer.sa,c=this.td();null!=c&&(b.scrollLeft=parseInt(c.scrollLeft),b.scrollTop=parseInt(c.scrollTop));if(this.Ca)if(this.Ca=!1,this.dragger.style.cursor="default",null!=this.resizeGhostBar&&null!=this.resizeGhostRight&&(this.resizeGhostBar.style.display=
"none",this.resizeGhostRight.style.display="none"),null==this.dragger.getAttribute(AdfDhtmlBaseGanttPeer.lc)){if(null!=this.resizeGhostBar&&this.resizeGhostBar.style.width!=this.fb){b.actionType=null!=this.mergeWith?"merge":"resize";b.taskId=this.ud();for(var c=null,d=this.dragger.getAttribute(AdfDhtmlBaseGanttPeer.S),e=this.dragger.getAttribute(AdfDhtmlBaseGanttPeer.Z),f=0;f<this.dragger.parentNode.childNodes.length;f++)if(null!=e){if(this.dragger.parentNode.childNodes[f].getAttribute(AdfDhtmlBaseGanttPeer.l)==
AdfDhtmlBaseGanttPeer.xc&&e==this.dragger.parentNode.childNodes[f].getAttribute(AdfDhtmlBaseGanttPeer.Z)){c=this.dragger.parentNode.childNodes[f];break}}else if(this.dragger.parentNode.childNodes[f].getAttribute(AdfDhtmlBaseGanttPeer.l)==AdfDhtmlBaseGanttPeer.xc||null!=d&&d==this.dragger.parentNode.childNodes[f].getAttribute(AdfDhtmlBaseGanttPeer.S)){c=this.dragger.parentNode.childNodes[f];break}null!=d?AdfPage.PAGE.getLocaleContext().isRightToLeft()?(b.oldwidth=parseInt(this.dragger.parentNode.style.right)+
parseInt(c.style.right)+parseInt(this.fb),b.newwidth=parseInt(this.dragger.parentNode.style.right)+parseInt(c.style.right)+parseInt(this.resizeGhostBar.style.width),b.newx=parseInt(this.dragger.parentNode.style.right),b.oldx=parseInt(this.dragger.parentNode.style.right)):(b.oldwidth=parseInt(this.dragger.parentNode.style.left)+parseInt(c.style.left)+parseInt(this.fb),b.newwidth=parseInt(this.dragger.parentNode.style.left)+parseInt(c.style.left)+parseInt(this.resizeGhostBar.style.width),b.newx=parseInt(this.dragger.parentNode.style.left),
b.oldx=parseInt(this.dragger.parentNode.style.left)):(AdfPage.PAGE.getLocaleContext().isRightToLeft()?(b.oldwidth=parseInt(c.style.right)+parseInt(this.fb),b.newwidth=parseInt(c.style.right)+parseInt(this.resizeGhostBar.style.width),b.newx=parseInt(c.style.right),b.oldx=parseInt(c.style.right)):(b.oldwidth=parseInt(c.style.left)+parseInt(this.fb),b.newwidth=parseInt(c.style.left)+parseInt(this.resizeGhostBar.style.width),b.newx=parseInt(c.style.left),b.oldx=parseInt(c.style.left)),b.st=parseInt(c.getAttribute("st")));
null!=this.dragger.getAttribute(AdfDhtmlBaseGanttPeer.S)&&(b.splitId=this.dragger.getAttribute(AdfDhtmlBaseGanttPeer.S));null!=this.dragger.getAttribute(AdfDhtmlBaseGanttPeer.Z)&&(b.recurId=this.dragger.getAttribute(AdfDhtmlBaseGanttPeer.Z));null!=this.mergeWith&&(b.mergeWith=this.mergeWith);b=new A_M(a,b);b.setPartial(!0);a.queueEvent(b)}}else null!=this.dragger.getAttribute(AdfDhtmlBaseGanttPeer.lc)&&(AdfPage.PAGE.getLocaleContext().isRightToLeft()&&this.dragger.style.right!=this.Fg||!AdfPage.PAGE.getLocaleContext().isRightToLeft()&&
this.dragger.style.left!=this.Fg||this.dragger.style.width!=this.fb)&&(b.actionType="pcResize",b.taskId=this.ud(),AdfPage.PAGE.getLocaleContext().isRightToLeft()?b.left=parseInt(this.dragger.parentNode.style.right):b.left=parseInt(this.dragger.parentNode.style.left),b.fullwidth=parseInt(this.dragger.parentNode.style.width)-1,b.oldpc=parseInt(this.dragger.getAttribute(AdfDhtmlBaseGanttPeer.lc)),b.oldwidth=parseInt(this.fb)+parseInt(this.Fg),AdfPage.PAGE.getLocaleContext().isRightToLeft()?b.newwidth=
parseInt(this.dragger.style.width)+parseInt(this.dragger.style.right):b.newwidth=parseInt(this.dragger.style.width)+parseInt(this.dragger.style.left),b=new A_M(a,b),b.setPartial(!0),a.queueEvent(b));else if(this.ga){this.ga=!1;c=this.Za();for(d=c.firstChild;d.firstChild;)d.removeChild(d.firstChild);c.style.display="none";d=this.getComponent().getClientId()+AdfDhtmlBaseGanttPeer.D+AdfDhtmlBaseGanttPeer.sa;d=AdfPage.PAGE.findComponent(d);f=0;f=null!=this.dragger.getAttribute(AdfDhtmlBaseGanttPeer.S)||
null!=this.dragger.getAttribute(AdfDhtmlBaseGanttPeer.Z)?parseInt(this.dragger.parentNode.parentNode.style.width):parseInt(this.dragger.parentNode.style.width);if(AdfPage.PAGE.getLocaleContext().isRightToLeft())var e=parseInt(c.style.right)-A_Hc(this)+"px",g=""!=this.dragger.style.width?parseInt(e)+parseInt(this.dragger.style.width):null;else e=parseInt(c.style.left)-A_Hc(this)+"px",g=""!=this.dragger.style.width?parseInt(e)+parseInt(this.dragger.style.width):null;e!=this.P&&(null==g||0<g)&&parseInt(e)<=
f&&(b.actionType=null!=this.mergeWith?"merge":"move",b.taskId=this.ud(),null!=this.dragger.getAttribute(AdfDhtmlBaseGanttPeer.S)?(f=AdfPage.PAGE.getLocaleContext().isRightToLeft()?parseInt(this.dragger.parentNode.style.right):parseInt(this.dragger.parentNode.style.left),b.oldx=parseInt(this.P)+f,b.newx=parseInt(e)+d.getScrollLeft()-2,b.oldwidth=parseInt(c.style.width)+parseInt(this.P)+f,b.newwidth=parseInt(c.style.width)+parseInt(e)):(b.oldx=parseInt(this.P),AdfPage.PAGE.getLocaleContext().isRightToLeft()?
(b.newx=parseInt(e)-d.getScrollLeft()+2,b.oldwidth=parseInt(c.style.width)+parseInt(this.P),b.newwidth=parseInt(c.style.width)):(b.newx=parseInt(e)+d.getScrollLeft()-2,b.oldwidth=parseInt(c.style.width)+parseInt(this.P),b.newwidth=parseInt(c.style.width)+parseInt(e)+d.getScrollLeft())),null!=this.dragger.getAttribute(AdfDhtmlBaseGanttPeer.S)&&(b.splitId=this.dragger.getAttribute(AdfDhtmlBaseGanttPeer.S)),null!=this.dragger.getAttribute(AdfDhtmlBaseGanttPeer.Z)&&(b.recurId=this.dragger.getAttribute(AdfDhtmlBaseGanttPeer.Z)),
null!=this.mergeWith&&(b.mergeWith=this.mergeWith),b=new A_M(a,b),b.setPartial(!0),a.queueEvent(b))}}this.Fg=this.fb=this.P=0;this.mergeWith=this.dragger=null}};AdfDhtmlBaseProjectGanttPeer.prototype.endNormalDrag=AdfDhtmlBaseProjectGanttPeer.prototype.ei;A_=AdfDhtmlBaseProjectGanttPeer.prototype;A_.ud=function(){if(null!=this.dragger){var a=this.dragger.getAttribute(AdfDhtmlBaseGanttPeer.v);null==a&&(a=this.dragger.parentNode.getAttribute(AdfDhtmlBaseGanttPeer.v));return a}return null};
A_.Eg=function(a){if(this.ja){this.Va();a.cancelBubble=!0;var b=A_Dc(this);null!=b&&(b.style.display="none");b=A_0c(this);null!=b&&(b.style.display="none");if(null==this.dragger||null==this.dragger.getAttribute(AdfDhtmlBaseGanttPeer.lc))null!=this.resizeGhostBar&&null!=this.resizeGhostRight&&(this.resizeGhostBar.style.display="none",this.resizeGhostRight.style.display="none",null!=this.resizeGhostBar.parentNode&&null!=this.resizeGhostRight.parentNode&&(this.resizeGhostBar.parentNode.removeChild(this.resizeGhostBar),
this.resizeGhostRight.parentNode.removeChild(this.resizeGhostRight)),this.resizeGhostRight=this.resizeGhostBar=null),this.Za().style.display="none",this.dragger.style.cursor="default",this.Lc=0,this.ja=!1,this.Fg=this.fb=this.P=0,this.mergeWith=this.dragger=null,this.ga=this.Ca=!1,AdfDhtmlBaseProjectGanttPeer.superclass.Eg.call(this,a)}};
A_.$h=function(a){this.sc=!1;var b=this.getComponent(),c=document.getElementById(b.getClientId()+"::hline"),d=document.getElementById(b.getClientId()+"::vline"),b=document.getElementById(b.getClientId()+"::connector");null!=this.Gb&&(this.Gb.style.display="none");null!=this.rb&&(this.rb.style.display="none");null!=c&&null!=d&&null!=b&&(c.style.width="0px",c.style.height="1px",c.style.display="none",d.style.width="1px",d.style.height="0px",d.style.display="none",b.style.display="none");AdfDhtmlBaseProjectGanttPeer.superclass.$h.call(this,
a)};
A_.bz=function(a){var b=document.createElement("div");a.getAttribute(AdfDhtmlBaseGanttPeer.l)==AdfDhtmlBaseGanttPeer.$b&&(a=a.parentNode);var c=Math.max(0,parseInt(a.style.left));AdfPage.PAGE.getLocaleContext().isRightToLeft()&&(c=Math.max(0,parseInt(a.style.right)));for(var d=0;d<a.parentNode.childNodes.length;d++){var e=a.parentNode.childNodes[d];if("split"==e.getAttribute(AdfDhtmlBaseGanttPeer.l)){a.parentNode.style.left="0px";AdfPage.PAGE.getLocaleContext().isRightToLeft()&&(a.parentNode.style.right="0px");
e=a.parentNode.cloneNode(!0);for(a=0;a<e.childNodes.length;a++)d=e.childNodes[a],d.style.position="absolute",AdfPage.PAGE.getLocaleContext().isRightToLeft()?d.style.right=parseInt(d.style.right)-c+"px":d.style.left=parseInt(d.style.left)-c+"px",d.onmouseover="",d.onmouseout="";e.style.position="absolute";e.style.top="0px";AdfPage.PAGE.getLocaleContext().isRightToLeft()?e.style.right="0px":e.style.left="0px";b.appendChild(e);break}else if(e.getAttribute(AdfDhtmlBaseGanttPeer.l)==AdfDhtmlBaseGanttPeer.xc||
e.getAttribute(AdfDhtmlBaseGanttPeer.l)==AdfDhtmlBaseGanttPeer.gm||e.getAttribute(AdfDhtmlBaseGanttPeer.l)==AdfDhtmlBaseGanttPeer.gq||e.getAttribute(AdfDhtmlBaseGanttPeer.l)==AdfDhtmlBaseGanttPeer.Ue)e=e.cloneNode(!0),e.style.top="0px",AdfPage.PAGE.getLocaleContext().isRightToLeft()?e.style.right=parseInt(e.style.right)-c+"px":e.style.left=parseInt(e.style.left)-c+"px",e.onmouseover="",e.onmouseout="",b.appendChild(e)}return b};
A_.Xs=function(a){AdfDhtmlBaseProjectGanttPeer.superclass.Xs.call(this,a);a=AdfPage.PAGE.findComponent(a+AdfDhtmlBaseGanttPeer.D+AdfDhtmlBaseGanttPeer.Pb).getSelectedRowKeys();var b=!1;null==this.$a&&(this.$a=[]);for(var c=0;c<this.$a.length;c++){var d=!1,e;for(e in a)if(e==this.$a[c]){d=!0;break}d||(b=!0,this.$a[c]=null)}for(e in a)-1==this.$a.indexOf(e)&&(b=!0,this.$a.push(e));b&&A_jd(this)};
A_.Ps=function(){return[AdfDhtmlBaseGanttPeer.hm,AdfDhtmlBaseGanttPeer.jm,AdfDhtmlBaseGanttPeer.im,AdfDhtmlBaseGanttPeer.km,AdfDhtmlBaseGanttPeer.$p,AdfDhtmlBaseGanttPeer.Wp,AdfDhtmlBaseGanttPeer.Tp,AdfDhtmlBaseGanttPeer.fm,AdfDhtmlBaseGanttPeer.Xp,AdfDhtmlBaseGanttPeer.Up,AdfDhtmlBaseGanttPeer.Yp,AdfDhtmlBaseProjectGanttPeer.qv,AdfDhtmlBaseProjectGanttPeer.rv,AdfDhtmlBaseGanttPeer.jq]};
A_.Vg=function(a){var b=AdfDhtmlBaseProjectGanttPeer.superclass.Vg.call(this,a);if(!(0>b)){var c=[AdfDhtmlBaseGanttPeer.Wu,AdfDhtmlBaseGanttPeer.Av,AdfDhtmlBaseGanttPeer.Xu,AdfDhtmlBaseGanttPeer.Bv];1<b?A_Wc(this,c,!1):A_Wc(this,c,!0);if(a=AdfPage.PAGE.findComponent(a+AdfDhtmlBaseGanttPeer.D+AdfDhtmlBaseProjectGanttPeer.$u)){if(b=1==b)a:{b=AdfPage.PAGE.findComponent(A_E(this));if(null!=b&&(c=b.getSelectedRowKeys(),null!=c))for(var d in c){b=b.getClientId();d=document.getElementById(b+":"+d+":tsb");
if(null!=d)for(d=d.childNodes,b=0;b<d.length;b++)if(null!=d[b].getAttribute("tid"))for(var c=d[b].childNodes,e=0;e<c.length;e++){var f=c[e].getAttribute("part");if("split"==f||"linker"==f){b=!0;break a}}break}b=!1}b?a.setProperty("disabled",!1):a.setProperty("disabled",!0)}}};
A_.Ez=function(a){if("DIV"!=a.nodeName)return!1;var b=AdfAgent.AGENT,c=b.getAttribute(a,AdfDhtmlBaseGanttPeer.v),d=b.getAttribute(a,AdfDhtmlBaseGanttPeer.Dd);a=b.getAttribute(a,AdfDhtmlBaseGanttPeer.l);return null!=c&&null!=d&&("bar"==a||"splitbar"==a)};
A_.Td=function(a,b){var c=b.keyCode;c!=AdfKeyStroke.ARROWUP_KEY&&c!=AdfKeyStroke.ARROWDOWN_KEY||null==this.cb||this.cb.removeAttribute("tabIndex");AdfDhtmlBaseProjectGanttPeer.superclass.Td.call(this,a,b);if(c==AdfKeyStroke.ARROWUP_KEY||c==AdfKeyStroke.ARROWDOWN_KEY)c=a.getPeer().getDomElement().getAttribute("aria-activedescendant"),null!=c&&(c=AdfAgent.AGENT.getElementById(c),c=A_Mc(this,c),null!=c&&this.Xb(c))};A_.Wk=function(a){return(a=AdfDhtmlBaseGanttPeer.fi(a))?this.qf(a):null};
A_.qf=function(a){var b=A_Mc(this,a);return null!=b?b:A_J(this,a,AdfDhtmlBaseGanttPeer.v)};
A_.Xb=function(a){null!=this.cb&&(this.cb.removeAttribute("aria-label"),this.cb.removeAttribute("tabIndex"));this.cb=a;if(null!=a){var b=A_K(this,"ts"),b=b.concat(" "),c=a.getAttribute("data-n");null!=c&&(b=A_ed(this,b,A_K(this,"tn"),c));c=a.getAttribute("data-tt");null!=c&&(b=A_ed(this,b,A_K(this,"tt"),c));c=a.getAttribute(AdfDhtmlBaseGanttPeer.Dd);if(null!=c){var d=a.getAttribute("data-fst");null==d&&(d=new Date(+c));b=A_ed(this,b,A_K(this,"start_time"),d)}c=a.getAttribute(AdfDhtmlBaseGanttPeer.Pf);
null!=c&&(d=a.getAttribute("data-fet"),null==d&&(d=new Date(+c)),b=A_ed(this,b,A_K(this,"end_time"),d));c=a.getAttribute("ctt");null!=c&&(d=a.getAttribute("data-fctt"),null==d&&(d=new Date(+c)),b=A_ed(this,b,A_K(this,"ct"),d));c=a.getAttribute("ast");null!=c&&(d=a.getAttribute("data-fast"),null==d&&(d=new Date(+c)),b=A_ed(this,b,A_K(this,"ast"),d));c=a.getAttribute("aet");null!=c&&(d=a.getAttribute("data-fest"),null==d&&(d=new Date(+c)),b=A_ed(this,b,A_K(this,"aet"),d));c=this.vs(a);null!=c&&(b=A_ed(this,
b,A_K(this,"lbl"),c));d=a.getAttribute("data-pre");if(null!=d){d=d.split(" ");c=A_K(this,"ps").replace("{0}",d.length);b=b.concat(c);b=b.concat(" ");c=A_md(this,d);for(d=0;d<c.length;d++){0<d&&(b=b.concat(", "));var e=c[d].getAttribute("data-n");null==e&&(e=c[d].getAttribute(AdfDhtmlBaseGanttPeer.v));b=b.concat(e)}b=b.concat(". ")}d=a.getAttribute("data-suc");if(null!=d){d=d.split(" ");c=A_K(this,"ss").replace("{0}",d.length);b=b.concat(c);b=b.concat(" ");c=A_md(this,d);for(d=0;d<c.length;d++)0<d&&
(b=b.concat(", ")),e=c[d].getAttribute("data-n"),null==e&&(e=c[d].getAttribute(AdfDhtmlBaseGanttPeer.v)),b=b.concat(e);b=b.concat(". ")}b=b.concat(A_nd(this,a));a.setAttribute("aria-label",b);AdfDhtmlBaseProjectGanttPeer.superclass.Xb.call(this,a)}};A_.vs=function(a){a=a.parentNode.childNodes;for(var b=0;b<a.length;b++)if(a[b].getAttribute(AdfDhtmlBaseGanttPeer.l)==AdfDhtmlBaseGanttPeer.nj)return a[b].textContent;return null};
function A_nd(a,b){for(var c=[],d=b.childNodes,e=0;e<d.length;e++){var f=d[e],g=f.getAttribute(AdfDhtmlBaseGanttPeer.l);null!=g&&g==AdfDhtmlBaseGanttPeer.Cd&&c.push(f)}d="";if(0<c.length)for(d=A_K(a,"sps").replace("{0}",c.length),e=0;e<c.length;e++)d=d.concat(" "),d=d.concat(A_K(a,"sp").replace("{0}",e+1)),f=c[e].getAttribute(AdfDhtmlBaseGanttPeer.Dd),d=A_ed(a,d,A_K(a,"start_time"),new Date(+f)),f=c[e].getAttribute(AdfDhtmlBaseGanttPeer.Pf),d=A_ed(a,d,A_K(a,"end_time"),new Date(+f));return d}
function A_md(a,b){for(var c=A_F(a).childNodes,d=c.length,e=[],f=!1,g=0;g<d&&!f;++g){var h=c[g].rows,l=0;null!=h&&(l=h.length);for(var m=0;m<l;++m){var n=a.Wk(h[m]);if(null!=n)for(var p=n.getAttribute(AdfDhtmlBaseGanttPeer.v),q=0;q<b.length;q++)if(b[q]==p){e.push(n);break}if(e.length==b.length){f=!0;break}}}return e};