PageSourceSearch

https://app.merlinai.co/_next/static/chunks/9ce41b38-2b98db2b8f11197e.js

js merlinai.co collected 2026-09-30 05:39:03 UTC 82,690 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3617],{861781:function(t,e,i){i.d(e,{m:function(){return p}});var s,r=i(802761),a=i(529555),n=i(410886),o=i(465602),d=i(851939),l=(s=function(t,e){return(s=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}s(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),h=function(){return(h=Object.assign||function(t){for(var e,i=1,s=arguments.length;i<s;i++)for(var r in e=arguments[i])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},p=function(t){function e(e){var i=t.call(this,e)||this;return i.leftValue=0,i.previousLeftValue=0,i.isMouseDragged=!1,i.dependencyCancel=!1,i.isDragged=!1,i.editElement=null,i.elementOffsetLeft=0,i.elementOffsetTop=0,i.elementOffsetWidth=0,i.elementOffsetHeight=0,i.segmentIndex=-1,i.currentItemTop=0,i.currentItemPrevTop=0,i.topValue=0,i.draggedRecordMarginTop="0px",i.isClonedElement=!1,i.updatePosition=!1,i.tooltipValue=0,i.parent=e,i.initPublicProp(),i.wireEvents(),i.editTooltip=new d.O(i.parent,i),i}return l(e,t),e.prototype.wireEvents=function(){this.parent.on("chartMouseDown",this.mouseDownHandler,this),this.parent.on("chartMouseUp",this.mouseUpHandler,this),this.parent.on("chartMouseLeave",this.mouseLeaveHandler,this),this.parent.on("chartMouseMove",this.mouseMoveAction,this),this.parent.on("chartMouseClick",this.mouseClickHandler,this)},e.prototype.initPublicProp=function(){this.taskBarEditElement=null,this.taskBarEditRecord=null,this.taskBarEditAction=null,this.connectorSecondElement=null,this.connectorSecondRecord=null,this.connectorSecondAction=null,this.highlightedSecondElement=null,this.fromPredecessorText=null,this.toPredecessorText=null,this.finalPredecessor=null,this.drawPredecessor=!1,this.roundOffDuration=!0,this.dragMouseLeave=!1,this.isMouseDragged=!1,this.previousItemProperty=["left","progress","duration","isMilestone","startDate","endDate","width","progressWidth","autoLeft","autoDuration","autoStartDate","autoEndDate","autoWidth","segments"],this.tapPointOnFocus=!1,this.touchEdit=!1},e.prototype.mouseDownHandler=function(t){if(this.parent.editSettings.allowTaskbarEditing&&!this.parent.readOnly){if(this.canDrag=!1,this.taskBarEditElement){var e=this.getElementByPosition(t),i=(0,a.Cf)(e,o.Mo);(i&&i.innerHTML===this.taskBarEditElement.innerHTML||this.taskBarEditElement.classList.contains("e-segmented-taskbar")||this.taskBarEditElement.classList.contains("collpse-parent-border"))&&(this.updateTaskBarEditElement(t),this.canDrag=!0,t.preventDefault())}else this.parent.isAdaptive||this.updateTaskBarEditElement(t)}},e.prototype.mouseClickHandler=function(t){if(this.parent.editSettings.allowTaskbarEditing){var e=this.getElementByPosition(t),i=(0,a.Cf)(e,o.Mo);if(this.parent.selectionModule&&this.parent.selectionModule.enableSelectMultiTouch){this.tapPointOnFocus&&this.updateTaskBarEditElement(t);return}this.tapPointOnFocus&&!(0,r.le)(this.taskBarEditElement)&&i&&i.innerHTML!==this.taskBarEditElement.innerHTML?(this.connectorSecondRecord=this.parent.ganttChartModule.getRecordByTaskBar(i),this.connectorSecondAction="ConnectorPointLeftDrag",this.connectorSecondElement=i,this.fromPredecessorText="Finish",this.validateConnectorPoint()&&this.taskBarEditingAction(t,!0),this.showHideActivePredecessors(!1),this.initPublicProp()):e.classList.contains(o.ds)?(this.canDrag=!1,this.multipleSelectionEnabled(),this.showHideTaskBarEditingElements(e,this.taskBarEditElement),this.tapPointOnFocus=!0,this.taskBarEditAction="ConnectorPointLeftDrag",this.connectorSecondRecord=this.taskBarEditRecord,this.taskBarEditingAction(t,!1)):e.classList.contains(o.Yf)?(this.canDrag=!1,this.multipleSelectionEnabled(),this.showHideTaskBarEditingElements(e,this.taskBarEditElement),this.tapPointOnFocus=!0,this.taskBarEditAction="ConnectorPointRightDrag",this.connectorSecondRecord=this.taskBarEditRecord,this.taskBarEditingAction(t,!1)):(this.tapPointOnFocus&&(this.showHideActivePredecessors(!1),this.showHideTaskBarEditingElements(i,this.taskBarEditElement)),this.updateTaskBarEditElement(t))}},e.prototype.showHideActivePredecessors=function(t){var e=this.taskBarEditRecord.ganttProperties,i=e.predecessor,s="ResourceView"===this.parent.viewType?e.taskId:e.rowUniqueID;if(i)for(var a=0;a<i.length;a++){var n=i[a];(s.toString()===n.from||s.toString()===n.to)&&this.applyActiveColor(n.from,n.to,t)}var d=this.parent.ganttChartModule.chartBodyContainer;t?((0,r.cn)([this.taskBarEditElement],[o.DA]),(0,r.cn)([d],[o.sX])):((0,r.IV)([this.taskBarEditElement],[o.DA]),(0,r.IV)([d],[o.sX])),this.touchEdit=t,(0,r.le)(this.parent.toolbarModule)||this.parent.toolbarModule.refreshToolbarItems()}
1,e.prototype.applyActiveColor=function(t,e,i){var s=("ProjectView"===this.parent.viewType?this.taskBarEditRecord.ganttProperties.taskId.toString():this.taskBarEditRecord.ganttProperties.rowUniqueID.toString())===t?this.parent.connectorLineModule.getRecordByID(e):this.parent.connectorLineModule.getRecordByID(t),a=this.parent.ganttChartModule.getChartRows()[this.parent.currentViewData.indexOf(s)];if(!(0,r.le)(a)){var n=a.querySelector("."+o.Mo),d=this.parent.element.querySelector("#ConnectorLineparent"+t+"child"+e);i?((0,r.cn)([n],[o.u9]),d&&(0,r.cn)([d],[o.u9])):((0,r.IV)([n],[o.u9]),d&&(0,r.IV)([d],[o.u9]))}},e.prototype.validateConnectorPoint=function(){var t=this.taskBarEditRecord.ganttProperties,e=this.connectorSecondRecord.ganttProperties,i=!0,s="ResourceView"===this.parent.viewType?t.taskId:t.rowUniqueID,r="ResourceView"===this.parent.viewType?e.taskId:e.rowUniqueID;if(this.connectorSecondRecord.hasChildRecords)i=!1;else if(e.predecessor)for(var a=0;a<e.predecessor.length;a++){var n=e.predecessor[a];if(n.from===s.toString()&&n.to===r.toString()){this.parent.connectorLineEditModule.childRecord=this.connectorSecondRecord,this.parent.connectorLineEditModule.predecessorIndex=a,this.parent.connectorLineEditModule.renderPredecessorDeleteConfirmDialog(),i=!1;break}if(n.from===r.toString()&&n.to===s.toString()){this.parent.connectorLineEditModule.childRecord=this.taskBarEditRecord,this.parent.connectorLineEditModule.predecessorIndex=a,this.parent.connectorLineEditModule.renderPredecessorDeleteConfirmDialog(),i=!1;break}}return i},e.prototype.mouseLeaveHandler=function(t){"ChildDrag"===this.taskBarEditAction||"ParentDrag"===this.taskBarEditAction||"ProgressResizing"===this.taskBarEditAction||"LeftResizing"===this.taskBarEditAction||"RightResizing"===this.taskBarEditAction?this.dragMouseLeave=!1:this.dragMouseLeave=!0},e.prototype.updateTaskBarEditElement=function(t){var e,i,s=this.getElementByPosition(t);if(s.classList.contains(o.JG)||s.classList.contains(o.gM)||s.classList.contains(o.jh))i=(0,a.Cf)(s,o.gM);else if(s.classList.contains(o.zU))i=(0,a.Cf)(s,o.zU);else if(i=(0,a.Cf)(s,o.Mo),!(0,r.le)(i)&&!s.classList.contains("e-connectorpoint-left")&&!s.classList.contains("e-connectorpoint-right")){var n=this.parent.ganttChartModule.getRecordByTaskBar(i);if(!(0,r.le)(n.ganttProperties.segments)&&n.ganttProperties.segments.length>0){if(s.classList.contains("e-progressbar-handler-after")){for(var d=0;d<n.ganttProperties.segments.length;d++)if(n.ganttProperties.segments[d].showProgress){i=i.querySelectorAll(".e-segmented-taskbar")[d];break}}else i=(0,a.Cf)(s,o.su)}}if(this.parent.editSettings.allowTaskbarEditing&&i){this.showHideTaskBarEditingElements(i,this.editElement),this.editElement=i,this.realTaskbarElement=this.editElement;var l=this.editElement.getAttribute("data-segment-index");if((0,r.le)(l)?this.segmentIndex=-1:this.segmentIndex=Number(l),this.taskBarEditRecord=this.parent.ganttChartModule.getRecordByTaskBar(this.editElement),"mousedown"===t.type||"touchstart"===t.type||"click"===t.type){this.taskBarEditAction=this.getTaskBarAction(t);var h=this.editElement.getAttribute("data-segment-index"),n=this.parent.ganttChartModule.getRecordByTaskBar(i),p=n.ganttProperties,c=this.editElement.parentElement.offsetLeft;this.currentData=n;var u=(0,r.az)("div",{styles:"height:100%;border-style:dashed;border-bottom:none;border-top:none;border-width:1px;position:absolute;z-index:10000"});(0,r.cn)([u],"e-taskbar-resize-div"),u.style.setProperty("width",p.width+"px");var g=this.editElement.getAttribute("data-segment-index");!(0,r.le)(p.segments)&&this.parent.allowTaskbarDragAndDrop&&"LeftResizing"!==this.taskBarEditAction&&"RightResizing"!==this.taskBarEditAction&&"ProgressResizing"!==this.taskBarEditAction?u.style.setProperty("left",(0,r.le)(p.segments)?p.left+"px":c+"px"):u.style.setProperty("left",!(0,r.le)(p.segments)&&p.segments.length>1?c+p.segments[Number(g)].left+"px":p.left+"px");var m=this.parent.createElement("table"),f=this.parent.createElement("tbody");f.appendChild(u),m.appendChild(f);var E=this.parent.ganttChartModule.chartBodyContainer.querySelector(".e-clone-taskbar"),k=null;if(e="ChildDrag"!==this.taskBarEditAction&&"LeftResizing"!==this.taskBarEditAction||(0,r.le)(h)||(0,r.le)(h)||0!==Number(h)?
1-1!==this.segmentIndex&&this.parent.allowTaskbarDragAndDrop&&"LeftResizing"!==this.taskBarEditAction&&"RightResizing"!==this.taskBarEditAction&&"ProgressResizing"!==this.taskBarEditAction?this.editElement.parentElement.cloneNode(!0):this.editElement.cloneNode(!0):this.editElement.parentElement.cloneNode(!0),!E){if((0,r.cn)([e],"e-clone-taskbar"),e.style.setProperty("position","absolute"),n.hasChildRecords&&!n.ganttProperties.isAutoSchedule){var v=this.parent.getOffsetRect(this.parent.ganttChartModule.chartBodyContainer),D=this.parent.getOffsetRect(this.editElement);this.editElement.classList.contains("e-manualparent-main-container")?e.style.setProperty("left",n.ganttProperties.left-n.ganttProperties.autoLeft+"px"):e.style.setProperty(this.parent.enableRtl?"right":"left",Math.abs(D.left-v.left+Math.abs(this.parent.ganttChartModule.scrollElement.scrollLeft))+"px")}e.style.setProperty("top","0px"),k=this.parent.createElement("table");var R=this.parent.createElement("tbody");R.appendChild(e),k.appendChild(R)}if("ChildDrag"!==this.taskBarEditAction&&"LeftResizing"!==this.taskBarEditAction||(0,r.le)(h)||(0,r.le)(h)||0!==Number(h))this.cloneTaskbarElement=e;else{var M=e.getElementsByClassName("e-segmented-taskbar");this.cloneTaskbarElement=M[Number(h)]}if(this.taskBarEditElement=this.cloneTaskbarElement,this.taskbarElement=k,this.taskbarResizer=m,this.currentIndex=h,this.roundOffDuration=!0,("ConnectorPointLeftDrag"===this.taskBarEditAction||"ConnectorPointRightDrag"===this.taskBarEditAction)&&(0,r.le)(this.parent.taskFields.dependency)&&(this.taskBarEditAction=null),this.updateMouseDownProperties(t),"ResourceView"===this.parent.viewType||"ProjectView"===this.parent.viewType){if(0===this.taskBarEditRecord.level)return;if(this.parent.enableMultiTaskbar){var y=this.parent.getTaskByUniqueID(this.taskBarEditRecord.parentItem.uniqueID);(0,r.le)(y)||y.expanded||(this.prevZIndex=this.taskBarEditElement.style.zIndex,this.taskBarEditElement.style.zIndex="1000",this.taskBarEditElement.querySelector(".e-gantt-child-taskbar")&&(0,r.cn)([this.taskBarEditElement.querySelector(".e-gantt-child-taskbar")],"e-collapsed-taskbar-drag"))}}}}else this.parent.isAdaptive?(this.taskBarEditElement&&this.showHideTaskBarEditingElements(i,this.editElement),this.initPublicProp()):this.showHideTaskBarEditingElements(i,this.editElement)},e.prototype.showHideTaskBarEditingElements=function(t,e,i){e=e||this.editElement;var s=!!this.parent.taskFields.progress,a=!0;if(!this.parent.readOnly){var n=t?this.parent.ganttChartModule.getRecordByTaskBar(t):e?this.parent.ganttChartModule.getRecordByTaskBar(e):null;if(this.parent.enableMultiTaskbar&&t){var d=this.parent.getParentTask(n.parentItem);(0,r.le)(d)||d.expanded||(s=!1,a=!1)}if(t){if(t.querySelector("."+o.SH)){if((0,r.cn)([t.querySelector("."+o.SH)],[o.YN]),(0,r.cn)([t.querySelector("."+o.PW)],[o.h1]),s){var l=n&&n.ganttProperties.segments&&n.ganttProperties.segments.length>0?this.parent.getRowByIndex(this.parent.enableVirtualization?this.parent.currentViewData.indexOf(n):this.parent.flatData.indexOf(n)).querySelectorAll("."+o.go)[0]:t.querySelector("."+o.go);(0,r.le)(l)||((0,r.cn)([l],[o.hH]),l.style.top="3px")}}else this.parent.isAdaptive&&s&&this.parent.ganttChartModule.getRecordByTaskBar(t).hasChildRecords&&(0,r.cn)([t],[o.Dc]);if((0,r.cn)(this.parent.ganttChartModule.scrollElement.querySelectorAll("."+o.l0),[o.a0]),!(0,r.le)(this.parent.taskFields.dependency)&&(t.querySelector("."+o.Fh)||t.parentElement.querySelector("."+o.Fh))&&a){var h=(0,r.le)(t.querySelector("."+o.Fh))?t.parentElement:t;(0,r.le)(h.querySelector("."+o.Fh))||(0,r.cn)([h.querySelector("."+o.Fh)],[o.ds]),(0,r.le)(h.querySelector("."+o.qG))||(0,r.cn)([h.querySelector("."+o.qG)],[o.Yf])}}else i||(0,r.IV)(this.parent.ganttChartModule.scrollElement.querySelectorAll("."+o.l0),[o.a0]);if(e&&t!==e){if(e.querySelector("."+o.SH)){(0,r.IV)([e.querySelector("."+o.SH)],[o.YN]),(0,r.IV)([e.querySelector("."+o.PW)],[o.h1]);var l=n&&n.ganttProperties.segments&&n.ganttProperties.segments.length>0?this.parent.getRowByIndex(this.parent.enableVirtualization?this.parent.currentViewData.indexOf(n):this.parent.flatData.indexOf(n)):e;l&&l.querySelector("."+o.go)&&(0,r.IV)([l.querySelector("."+o.go)],[o.hH])}if(!(0,r.le)(this.parent.taskFields.dependency)&&(e.querySelector("."+o.Fh)||e.parentElement.querySelector("."+o.Fh))){var h=(0,r.le)(e.querySelector("."+o.Fh))?e.parentElement:e,p=h.querySelector("."+o.Fh),c=h.querySelector("."+o.qG);p&&(0,r.IV)([p],[o.ds]),c&&(0,r.IV)([c],[o.Yf])}else if(this.parent.isAdaptive){var u=this.parent.ganttChartModule.getRecordByTaskBar(e);u&&u.hasChildRecords&&(0,r.IV)([e],[o.Dc])}this.editElement=null}}},e.prototype.getTaskBarAction=function(t){var e=this.getElementByPosition(t),i=this.taskBarEditRecord,s="";return e.classList.contains(o.SH)?s="LeftResizing":e.classList.contains(o.PW)?s="RightResizing":(e.classList.contains(o.go)||(0,r.oq)(e,"."+o.go))&&this.parent.taskFields.progress?s="ProgressResizing":e.classList.contains(o.Fh)?s="ConnectorPointLeftDrag":e.classList.contains(o.qG)?s="ConnectorPointRightDrag":e.classList.contains(o.JG)?s="ParentResizing":e.classList.contains(o.jh)||e.classList.contains(o.gM)||e.classList.contains(o.zU)?s="ManualParentDrag":i&&(s=i.hasChildRecords?i[this.parent.taskFields.manual]?"":"ParentDrag":i.ganttProperties.isMilestone?"MilestoneDrag":"ChildDrag"),s},e.prototype.updateMouseDownProperties=function(t){var e=this.getCoordinate(t),i=this.parent.element.closest('[style*="zoom"]');if(i){var s=parseFloat(getComputedStyle(i).zoom);e.pageX=e.pageX/s,e.pageY=e.pageY/s}if(e.pageX||e.pageY){var r=this.parent.getOffsetRect(this.parent.ganttChartModule.chartBodyContainer);this.parent.enableRtl?this.mouseDownX=Math.abs(e.pageX-(r.left+Math.abs(this.parent.ganttChartModule.scrollObject.previousScroll.left))):this.mouseDownX=e.pageX-r.left+this.parent.ganttChartModule.scrollObject.previousScroll.left,this.tooltipPositionX=this.mouseDownX,this.mouseDownY=this.dragMoveY=e.pageY-r.top+this.parent.ganttChartModule.scrollObject.previousScroll.top}("ConnectorPointLeftDrag"===this.taskBarEditAction||"ConnectorPointRightDrag"===this.taskBarEditAction)&&(this.fromPredecessorText="ConnectorPointLeftDrag"===this.taskBarEditAction?"start":"finish",this.parent.connectorLineModule.tooltipTable.innerHTML=this.parent.connectorLineModule.getConnectorLineTooltipInnerTd(this.taskBarEditRecord.ganttProperties.taskName,this.fromPredecessorText,"",""))},e.prototype.isMouseDragCheck=function(){if(!this.isMouseDragged&&this.taskBarEditAction&&(this.mouseDownX!==this.mouseMoveX&&(this.mouseDownX+3<this.mouseMoveX||this.mouseDownX-3>this.mouseMoveX)||this.mouseDownY!==this.mouseMoveY&&(this.mouseDownY+3<this.mouseMoveY||this.mouseDownY-3>this.mouseMoveY))){this.isMouseDragged=!0,this.parent.initiateEditAction(!0);var t=this.taskBarEditRecord.ganttProperties;this.previousItem=this.parent.timelineModule.extendFunction(t,this.previousItemProperty),"ConnectorPointLeftDrag"===this.taskBarEditAction||"ConnectorPointRightDrag"===this.taskBarEditAction||"ResourceView"===this.parent.viewType&&"ParentDrag"===this.taskBarEditAction||this.editTooltip.showHideTaskbarEditTooltip(!0,this.segmentIndex),this.taskBarEditElement.setAttribute("aria-grabbed","true")}},e.prototype.removeFirstBorder=function(t){var e="bottomSegment"===this.parent.rowDragAndDropModule.dropPosition;this.parent.element.getElementsByClassName("e-firstrow-border").length>0&&t&&(0!==t.getAttribute("data-rowindex")||e)&&this.parent.element.getElementsByClassName("e-firstrow-border")[0].remove()},e.prototype.removeLastBorder=function(t){var e,i=t&&(t.classList.contains("e-emptyrow")||t.classList.contains("e-columnheader")||t.classList.contains("e-detailrow")),s=(e=this.parent.enableVirtualization?t&&!i&&this.parent.treeGrid.getRows()[this.parent.treeGrid.getCurrentViewRecords().length-1].getAttribute("data-uid")!==t.getAttribute("data-uid"):t&&!i&&this.parent.treeGrid.getRowByIndex(this.parent.treeGrid.getCurrentViewRecords().length-1).getAttribute("data-uid")!==t.getAttribute("data-uid"))||"topSegment"===this.parent.rowDragAndDropModule.dropPosition;this.parent.element.getElementsByClassName("e-lastrow-border").length>0&&t&&(e||s)&&this.parent.element.getElementsByClassName("e-lastrow-border")[0].remove()},e.prototype.removetopOrBottomBorder=function(){var t=[].slice.call(this.parent.element.querySelectorAll(".e-dropbottom, .e-droptop"));t.length&&(this.addRemoveClasses(t,!1,"e-dropbottom"),this.addRemoveClasses(t,!1,"e-droptop"))},e.prototype.topOrBottomBorder=function(t){var e;if(this.parent.enableVirtualization){var i=this.parent.treeGrid.getRows().filter(function(e){return e.getAttribute("data-rowindex")===t.getAttribute("data-rowindex")})[0],s=this.parent.treeGrid.getRows().indexOf(i);e=this.parent.getRowByIndex(s).children}else e=this.parent.getRowByIndex(parseInt(t.getAttribute("data-rowindex"),10)).children;e&&("above"===this.parent.rowDragAndDropModule.dropPosition&&(this.addRemoveClasses(e,!0,"e-droptop"),this.parent.element.getElementsByClassName("e-lastrow-dragborder").length>0&&this.parent.element.getElementsByClassName("e-lastrow-dragborder")[0].remove()),"below"===this.parent.rowDragAndDropModule.dropPosition&&this.addRemoveClasses(e,!0,"e-dropbottom"))},e.prototype.removeChildBorder=function(){var t=[].slice.call(this.parent.element.querySelectorAll(".e-childborder"));t.length>0&&this.addRemoveClasses(t,!1,"e-childborder")}
1,e.prototype.addRemoveClasses=function(t,e,i){for(var s=0,r=t.length;s<r;s++)e?t[parseInt(s.toString(),10)].classList.add(i):t[parseInt(s.toString(),10)].classList.remove(i)},e.prototype.addErrorElem=function(){var t=document.getElementsByClassName("e-clone-taskbar")[0];if(!document.querySelectorAll(".e-errorelem").length){var e=document.createElement("div");(0,r.s1)(e,["e-errorcontainer"],[]),(0,r.s1)(e,["e-icons","e-errorelem"],[]),this.taskBarEditRecord.ganttProperties.segments&&this.taskBarEditRecord.ganttProperties.segments.length>0&&(e.style.paddingTop=this.parent.taskbarHeight+"px"),t.appendChild(e)}},e.prototype.removeErrorElem=function(){var t=document.querySelector(".e-errorelem");t&&t.remove()},e.prototype.ensurePosition=function(t,e){var i=this;t.filter(function(t){if(t.hasChildRecords&&!(0,r.le)(t.childRecords)){if(-1===t.childRecords.indexOf(e))i.ensurePosition(t.childRecords,e);else{i.parent.rowDragAndDropModule.dropPosition="Invalid",i.addErrorElem();return}}})},e.prototype.mouseMoveAction=function(t){var e=this;if(this.parent.isAdaptive){if(!this.canDrag)return;this.multipleSelectionEnabled()}var i=this.parent.getOffsetRect(this.parent.ganttChartModule.chartBodyContainer),s=this.getCoordinate(t);this.parent.enableRtl?this.mouseMoveX=Math.abs(s.pageX-(i.left+Math.abs(this.parent.ganttChartModule.scrollObject.previousScroll.left))):this.mouseMoveX=s.pageX-i.left+this.parent.ganttChartModule.scrollObject.previousScroll.left,this.mouseMoveY=s.pageY-i.top+this.parent.ganttChartModule.scrollObject.previousScroll.top,this.dragMouseLeave=!1;var n=!1;if("ChildDrag"===this.taskBarEditAction||"ParentDrag"===this.taskBarEditAction||"ManualParentDrag"===this.taskBarEditAction||"MilestoneDrag"===this.taskBarEditAction){var d=void 0;if(this.parent.enableVirtualization){var l=this.parent.currentViewData.indexOf(this.taskBarEditRecord);d=this.parent.getRowByIndex(l)}else d=this.parent.getRowByIndex(this.taskBarEditRecord.index);var h={cancel:n,cloneElement:this.taskbarElement,data:this.taskBarEditRecord,target:t.target,rows:d};this.parent.trigger("rowDrag",h),n=h.cancel}if(n||this.isMouseDragCheck(),this.isMouseDragged&&this.taskBarEditAction){if(t.preventDefault(),!(0,r.le)(this.taskbarElement)&&!(0,r.le)(this.editElement)&&"ConnectorPointRightDrag"!==this.taskBarEditAction&&"ConnectorPointLeftDrag"!==this.taskBarEditAction&&!("ResourceView"===this.parent.viewType&&this.currentData.hasChildRecords)){var p=this.editElement.parentElement;if(this.parent.enableTimelineVirtualization&&this.parent.timelineModule.wholeTimelineWidth>3*this.parent.element.offsetWidth?p.style.setProperty("position","relative"):p.style.setProperty("position","absolute"),"ChildDrag"!==this.taskBarEditAction&&"LeftResizing"!==this.taskBarEditAction||(0,r.le)(this.currentIndex)||(0,r.le)(this.currentIndex)||0!==Number(this.currentIndex)?this.parent.allowTaskbarDragAndDrop&&"LeftResizing"!==this.taskBarEditAction&&"RightResizing"!==this.taskBarEditAction&&"ProgressResizing"!==this.taskBarEditAction?this.parent.chartPane.getElementsByClassName("e-gantt-chart")[0].appendChild(this.taskbarElement):p.appendChild(this.taskbarElement):(this.taskbarElement.childNodes[0].childNodes[0].style.setProperty("top",p.parentElement.offsetTop+"px"),this.parent.allowTaskbarDragAndDrop&&"LeftResizing"!==this.taskBarEditAction&&"RightResizing"!==this.taskBarEditAction&&"ProgressResizing"!==this.taskBarEditAction?this.parent.chartPane.getElementsByClassName("e-gantt-chart")[0].appendChild(this.taskbarElement):p.parentElement.appendChild(this.taskbarElement)),"ProgressResizing"!==this.taskBarEditAction){if(this.parent.enableTimelineVirtualization&&this.parent.timelineModule.wholeTimelineWidth>3*this.parent.element.offsetWidth){var c=this.parent.ganttChartModule.chartBodyContainer.querySelectorAll(".e-chart-scroll-container");c[0].appendChild(this.taskbarResizer)}else{var c=this.parent.ganttChartModule.chartBodyContainer.querySelectorAll(".e-chart-rows-container");c[0].appendChild(this.taskbarResizer)}}}if(this.parent.allowTaskbarDragAndDrop&&("ChildDrag"===this.taskBarEditAction||"ParentDrag"===this.taskBarEditAction||"MilestoneDrag"===this.taskBarEditAction||"ManualParentDrag"===this.taskBarEditAction)){var u,g
1=this.parent.getOffsetRect(this.taskBarEditElement),m=!(0,r.le)(document.body.className)&&document.body.className.includes("e-bigger")?12:0,f=3+this.parent.chartRowsModule.connectorPointWidth+m,E=void 0;E=this.parent.enableRtl?Math.abs(g.left+f+1):Math.abs(g.left-f-1),this.isClonedElement||this.parent.enableRtl||(E-=this.parent.ganttChartModule.scrollElement.scrollLeft,this.isClonedElement=!0);var k=0;this.parent.rowDragAndDropModule.dropPosition=void 0;var v=void 0,D=void 0;D="touchmove"===t.type||"touchstart"===t.type||"touchend"===t.type?t.changedTouches[0].pageY:t.y,this.parent.enableRtl?(v=document.elementFromPoint(this.parent.ganttChartModule.chartBodyContainer.offsetWidth,D)).classList.contains("e-taskbar-resize-div")&&(v=document.elementFromPoint(this.parent.ganttChartModule.chartBodyContainer.offsetWidth-v.offsetWidth,D)):v=document.elementFromPoint(E,D);var R=void 0;if(this.parent.enableVirtualization){if(!this.draggedTreeGridRowElement){var p=this.editElement.parentElement;R=p.parentElement,this.draggedTreeGridRowElement=R,this.draggedTreeGridRowHeight=this.draggedTreeGridRowElement.offsetHeight}}else if(R=this.parent.treeGrid.getRows()[this.parent.flatData.indexOf(this.taskBarEditRecord)],this.draggedTreeGridRowElement=R,this.parent.enableMultiTaskbar){if(this.taskBarEditRecord.parentItem&&!(0,r.le)(this.parent.getRowByID(this.taskBarEditRecord.parentItem.taskId))){if(this.draggedTreeGridRowHeight=this.parent.getRowByID(this.taskBarEditRecord.parentItem.taskId).offsetHeight,"ProjectView"===this.parent.viewType&&0===this.draggedTreeGridRowHeight)for(var M=this.parent.getRecordByID(this.taskBarEditRecord.parentItem.taskId);M.parentItem;)M=this.parent.getRecordByID(M.parentItem.taskId),this.draggedTreeGridRowHeight=this.parent.getRowByID(M.TaskID).offsetHeight}else{var p=this.editElement.parentElement;this.draggedTreeGridRowElement=p.parentElement,this.draggedTreeGridRowHeight=this.draggedTreeGridRowElement.offsetHeight}}else this.draggedTreeGridRowHeight=this.draggedTreeGridRowElement.offsetHeight;if(v&&(u=(0,r.oq)(v,"tr."+o.Lr)),u){var y=void 0;y=this.parent.enableVirtualization?this.parent.treeGrid.getRows().filter(function(t){return t.getAttribute("data-rowindex")===u.getAttribute("data-rowindex")})[0]:this.parent.treeGrid.getRows()[parseInt(u.getAttribute("data-rowindex"),10)],this.removeFirstBorder(y),this.removeLastBorder(y),((0,r.le)(y)||y.getAttribute("data-uid")!==this.draggedTreeGridRowElement.getAttribute("data-uid"))&&(0,a.Cf)(v,"e-chart-rows-container")||(this.parent.rowDragAndDropModule.dropPosition="Invalid",this.addErrorElem());var B=this.parent,w=0,P=B.toolbarModule?this.parent.toolbarModule.element.offsetHeight:0,b=this.parent.getOffsetRect(B.element),T=B.treeGrid.getHeaderContent().offsetHeight+b.top+P,C=B.treeGrid.getContent().firstElementChild.scrollTop;(0,r.le)(y)||(k=y.offsetTop-C);var A=((w=this.parent.enableVirtualization?this.parent.getOffsetRect(y).top:k+T)+this.draggedTreeGridRowHeight-w)/3,I=w+A,x=I+A,S="mousemove"===t.type?t.pageY:(0,r.le)(t.changedTouches)?null:t.changedTouches[0].pageY,L=S<=I,V=S>I&&S<=x,O=S>x&&S<=x+A;if(L||V||O){var X=void 0;if(this.parent.enableVirtualization){var l=this.parent.treeGrid.getRows().indexOf(y);X=this.parent.getRowByIndex(l)}else X=this.parent.getRowByIndex(parseInt(y.getAttribute("data-rowindex"),10));var W=(0,r.NA)("rowIndex",X),z=this.parent.flatData[W],H=!0;"ResourceView"!==this.parent.viewType||this.taskBarEditRecord.hasChildRecords||z.hasChildRecords||(0,r.le)(z.parentItem)||this.taskBarEditRecord.parentItem.taskId!==z.parentItem.taskId||(H=!1),z&&this.ensurePosition([this.taskBarEditRecord],z),H&&(L&&"Invalid"!==this.parent.rowDragAndDropModule.dropPosition&&(this.parent.rowDragAndDropModule.dropPosition="above",this.removeChildBorder(),this.removeErrorElem(),this.removetopOrBottomBorder(),this.topOrBottomBorder(X)),V&&"Invalid"!==this.parent.rowDragAndDropModule.dropPosition&&(this.parent.rowDragAndDropModule.dropPosition="child",this.removetopOrBottomBorder(),this.addRemoveClasses(X.children,!0,"e-childborder")),O&&"Invalid"!==this.parent.rowDragAndDropModule.dropPosition&&(this.parent.rowDragAndDropModule.dropPosition="below",this.removetopOrBottomBorder(),this.removeErrorElem(),this.removeChildBorder(),this.removeFirstBorder(y),this.topOrBottomBorder(y)))}}}var q={cancel:!1,requestType:"taskbarediting",taskBarEditAction:this.taskBarEditAction,data:this.taskBarEditRecord};-1!==this.segmentIndex&&(q.requestType="mergeSegment"),this.parent.trigger("actionBegin",q,function(i){if(("ConnectorPointRightDrag"===q.taskBarEditAction||"ConnectorPointLeftDrag"===q.taskBarEditAction||"LeftResizing"===q.taskBarEditAction||"RightResizing"===q.taskBarEditAction||"ProgressResizing"===q.taskBarEditAction||"ChildDrag"===q.taskBarEditAction||"ParentDrag"===q.taskBarEditAction||"MilestoneDrag"===q.taskBarEditAction||"ManualParentDrag"===q.taskBarEditAction||"ParentResizing"===q.taskBarEditAction)&&(e.parent.showIndicator=!1,e.parent.undoRedoModule&&e.parent.isUndoRedoItemPresent("Edit"))){e.parent.undoRedoModule.redoEnabled&&e.parent.undoRedoModule.disableRedo();var s={};0===e.parent.undoRedoModule.getUndoCollection.length?(e.isDragged=!0,s.modifiedRecords=[],s.action=q.taskBarEditAction,e.parent.undoRedoModule.createUndoCollection(),e.parent.undoRedoModule.getUndoCollection[e.parent.undoRedoModule.getUndoCollection.length-1]=s,e.parent.editModule.createArray=!1,e.parent.undoRedoModule.changedRecords=[]):e.parent.editModule.createArray&&(e.isDragged=!0,s.modifiedRecords=[],s.action=q.taskBarEditAction,e.parent.undoRedoModule.createUndoCollection(),e.parent.undoRedoModule.getUndoCollection[e.parent.undoRedoModule.getUndoCollection.length-1]=s,e.parent.editModule.createArray=!1,e.parent.undoRedoModule.changedRecords=[])}!(0,r.le)(e.parent.loadingIndicator)&&"Shimmer"===e.parent.loadingIndicator.indicatorType&&e.parent.showIndicator?e.parent.showMaskRow():e.parent.showIndicator&&e.parent.showSpinner(),!1===i.cancel&&e.taskBarEditingAction(t,!1)})}else this.parent.isAdaptive||this.taskBarEditAction||this.updateTaskBarEditElement(t)},e.prototype.taskBarEditingAction=function(t,e){var i=this,s={},n=this.parent.ganttChartModule.getIndexByTaskBar(this.taskBarEditElement);if(null!==this.taskBarEditRecord){if(s.editingFields=this.taskBarEditRecord.ganttProperties,s.data=this.taskBarEditRecord,"ResourceView"===this.parent.viewType&&0===s.data.level)return;s.recordIndex=n,s.taskBarEditAction=this.taskBarEditAction,s.roun
1dOffDuration=this.roundOffDuration,s.cancel=!1,s.previousData=this.previousItem,s.segmentIndex=this.segmentIndex,this.roundOffDuration=s.roundOffDuration,this.targetElement=s.target=(0,r.oq)(t.target,".e-gantt-child-taskbar"),this.updateMouseMoveProperties(t),this.oldData||(this.oldData=(0,r.l7)([],[],[this.taskBarEditRecord],!0)[0]);var d=-1!==this.segmentIndex?this.segmentIndex:null;if("ProgressResizing"===this.taskBarEditAction){if(this.mainElement=(0,a.Cf)(this.taskBarEditElement,o.Mo),this.taskBarEditRecord.ganttProperties.segments&&this.taskBarEditRecord.ganttProperties.segments.length>0){d=-1;for(var l=0;l<this.taskBarEditRecord.ganttProperties.segments.length;l++){var h=document.getElementsByClassName("e-child-progress-resizer e-progress-resize-gripper")[0].style,p=this.parent.enableRtl?parseInt(h.right,10)-8:parseInt(h.left,10)+8;p<this.taskBarEditRecord.ganttProperties.segments[l].width&&0===l&&(d=l),this.taskBarEditRecord.ganttProperties.segments[l+1]&&p<this.taskBarEditRecord.ganttProperties.segments[l+1].width+this.taskBarEditRecord.ganttProperties.segments[l+1].left&&p>this.taskBarEditRecord.ganttProperties.segments[l+1].left&&(d=l+1)}}this.performProgressResize(t,d)}else"LeftResizing"===this.taskBarEditAction?this.enableLeftResizing(t):"RightResizing"===this.taskBarEditAction||"ParentResizing"===this.taskBarEditAction?this.enableRightResizing(t):"ParentDrag"===this.taskBarEditAction||"ChildDrag"===this.taskBarEditAction||"MilestoneDrag"===this.taskBarEditAction||"ManualParentDrag"===this.taskBarEditAction?this.enableDragging(t):("ConnectorPointLeftDrag"===this.taskBarEditAction||"ConnectorPointRightDrag"===this.taskBarEditAction)&&(this.updateConnectorLineSecondProperties(t),this.triggerDependencyEvent(t),this.drawFalseLine());if(this.parent.allowTaskbarDragAndDrop&&"LeftResizing"!==this.taskBarEditAction&&"RightResizing"!==this.taskBarEditAction&&"ProgressResizing"!==this.taskBarEditAction){var c=this.parent.getOffsetRect(this.parent.chartPane),u=this.getCoordinate(t),g={top:u.pageY,left:u.pageX},m={left:Math.abs(g.left-c.left),top:g.top-c.top};if("ResourceView"===this.parent.viewType&&this.parent.enableMultiTaskbar){var f=this.parent.getRecordByID(this.taskBarEditRecord.parentItem.taskId);if(!this.parent.allowTaskbarOverlap&&this.taskBarEditRecord.parentItem&&!f.expanded){var E=0;if(parseInt(this.editElement.style.marginTop,10)>this.parent.rowHeight){for(var l=0;l<f.childRecords.length;l++)if(f.childRecords[l].ganttProperties.taskId!==this.taskBarEditRecord.ganttProperties.taskId)E+=this.parent.rowHeight;else break;m.top=m.top-E}}}this.topValue=m.top;var k=void 0;k="touchmove"===t.type||"touchstart"===t.type||"touchend"===t.type?t.changedTouches[0].pageX:t.pageX,this.parent.enableRtl?this.leftValue=m.left-Math.abs(k-this.parent.getOffsetRect(this.taskBarEditElement).left)-(0!==this.previousLeftValue?k-this.previousLeftValue:0):this.leftValue=m.left-(k-this.parent.getOffsetRect(this.taskBarEditElement).left)+(0!==this.previousLeftValue?k-this.previousLeftValue:0),0===this.previousLeftValue&&(this.parent.enableRtl?(this.leftValue=this.leftValue-this.parent.ganttChartModule.scrollObject.previousScroll.left,0===this.parent.ganttChartModule.scrollObject.previousScroll.left&&(this.leftValue=this.leftValue-60)):this.leftValue=this.leftValue-this.parent.ganttChartModule.scrollObject.previousScroll.left),this.previousLeftValue=k}else this.leftValue=this.taskBarEditRecord.ganttProperties.left;this.currentSegmentIndex=d,this.setItemPosition(),this.updateEditedItem(),this.tooltipValue="touchmove"===t.type||"touchstart"===t.type||"touchend"===t.type?t.changedTouches[0].pageX:t.pageX,this.taskBarEditRecord.ganttProperties.segments&&-1===d||this.editTooltip.updateTooltip(d),e&&this.taskBarEditedAction(t),this.parent.trigger("taskbarEditing",s,function(t){t.cancel&&null!==i.taskBarEditRecord&&(i.tapPointOnFocus=!1,(0,r.TS)(i.taskBarEditRecord.ganttProperties,t.previousData))})}},e.prototype.updateMouseMoveProperties=function(t){var e=this.parent.getOffsetRect(this.parent.ganttChartModule.chartBodyContainer),i=this.getCoordinate(t),s=this.parent.element.closest('[style*="zoom"]');if(s){var r=parseFloat(getComputedStyle(s).zoom);i.pageX=i.pageX/r,i.pageY=i.pageY/r}(i.pageX||i.pageY)&&(this.parent.enableRtl?this.mouseMoveX=Math.abs(i.pageX-(e.left+Math.abs(this.parent.ganttChartModule.scrollObject.previousScroll.left))):this.mouseMoveX=i.pageX-e.left+this.parent.ganttChartModule.scrollObject.previousScroll.left,this.tooltipPositionX=this.mouseMoveX,this.mouseMoveY=i.pageY-e.top+this.parent.ganttChartModule.scrollObject.previousScroll.top);var a="ConnectorPointLeftDrag"===this.taskBarEditAction||"ConnectorPointRightDrag"===this.taskBarEditAction;if((this.taskBarEditRecord.ganttProperties.width>3||this.taskBarEditRecord.ganttProperties.isMilestone)&&!("ProgressResizing"===this.taskBarEditAction&&(0===this.taskBarEditRecord.ganttProperties.progress||100===this.taskBarEditRecord.ganttProperties.progress))||a){var n=0;n=this.parent.enableRtl?Math.abs(Math.abs(this.mouseMoveX)-Math.abs(this.parent.ganttChartModule.scrollObject.previousScroll.left)+e.left):this.mouseMoveX-this.parent.ganttChartModule.scrollObject.previousScroll.left+e.left;var o=this.mouseMoveY-this.parent.ganttChartModule.scrollObject.previousScroll.top+e.top;n+20>e.left+this.parent.ganttChartModule.chartBodyContainer.offsetWidth?(this.timerCount=this.parent.ganttChartModule.scrollObject.previousScroll.left,this.startScrollTimer("right")):n+40>e.left+this.parent.ganttChartModule.chartBodyContainer.offsetWidth&&this.parent.enableRtl&&0===this.parent.ganttChartModule.scrollObject.previousScroll.left?(this.parent.ganttChartModule.scrollObject.previousScroll.left=-1,this.timerCount=this.parent.ganttChartModule.scrollObject.previousScroll.left,this.startScrollTimer("right")):n-20<e.left?(this.timerCount=this.parent.ganttChartModule.scrollObject.previousScroll.left,this.startScrollTimer("left")):o+80>e.top+this.parent.ganttChartModule.chartBodyContainer.offsetHeight?(this.timerCount=this.parent.ganttChartModule.scrollObject.previousScroll.top,this.startScrollTimer("bottom")):o-20<e.top?(this.timerCount=this.parent.ganttChartModule.scrollObject.previousScroll.top,this.startScrollTimer("top")):this.stopScrollTimer()}else this.stopScrollTimer()},e.prototype.startScrollTimer=function(t){var e=this;this.stopScrollTimer();var i=0;this.scrollTimer=window.setInterval(function(){if(-1===Math.sign(e.timerCount)&&(i=-1,e.timerCount=Math.abs(e.timerCount)),"right"===t){var s=e.parent.enableTimelineVirtualization?e.parent.timelineModule.wholeTimelineWidth:e.parent.timelineModule.totalTimelineWidth;e.timerCount=e.timerCount+1>=s?s:e.timerCount+1}else"bottom"===t?e.timerCount=e.timerCount+1:e.timerCount=e.timerCount-1<0?0:e.timerCount-1;"bottom"===t||"top"===t?e.parent.ganttChartModule.scrollObject.setScrollTop(e.timerCount):e.parent.ganttChartModule.scrollObject.setScrollLeft(e.timerCount,i),("ConnectorPointLeftDrag"===e.taskBarEditAction||"ConnectorPointRightDrag"===e.taskBarEditAction)&&e.drawFalseLine()},0)},e.prototype.stopScrollTimer=function(){window.clearInterval(this.scrollTimer),this.scrollTimer=null},e.prototype.enableDragging=function(t){var e=this.taskBarEditRecord.ganttProperties,i=this.parent.enableTimelineVirtualization?this.parent.timelineModule.wholeTimelineWidth:this.parent.timelineModule.totalTimelineWidth,s=0;if(this.taskBarEditElement.classList.contains("e-segmented-taskbar")&&!this.taskBarEditElement.classList.contains("e-segment-first")){var a=this.taskBarEditRecord.ganttProperties.segments.map(function(t){return h({},t)}),n=a[this.segmentIndex];this.mouseDownX>this.mouseMoveX?(s=(0,r.le)(this.previousMouseMove)?this.mouseDownX-this.mouseMoveX:this.previousMouseMove-this.mouseMoveX,this.previousMouseMove=this.mouseMoveX,n.left=n.left-s):(s=(0,r.le)(this.previousMouseMove)?this.mouseMoveX-this.mouseDownX:this.mouseMoveX-this.previousMouseMove,this.previousMouseMove=this.mouseMoveX,n.left=n.left+s);var o=a[this.segmentIndex-1],d=a[this.segmentIndex+1],l=void 0;l=this.taskBarEditElement.classList.contains("e-segment-inprogress")?n.left<o.left+o.width?o.left+o.width:n.width+n.left>d.left?d.left-n.width:n.left:n.left<o.left+o.width?o.left+o.width:e.left+n.width+n.left>=i?i-n.width:n.left,n.left=l,this.parent.setRecordValue("segments",a,e,!0),this.parent.dataOperation.updateMappingData(this.taskBarEditRecord,"segments")}else{this.mouseDownX>this.mouseMoveX?(s=this.mouseDownX-this.mouseMoveX)>0&&this.parent.setRecordValue("left",this.previousItem.left-s,e,!0):(s=this.mouseMoveX-this.mouseDownX,this.parent.setRecordValue("left",this.previousItem.left+s,e,!0));var l=e.left<0?0:e.left+e.width>=i?i-e.width:e.left;this.parent.setRecordValue("left",l,e,!0)}}
vendor: 14,435 bytes, line 1
1,e.prototype.validateProgressWidth=function(t,e,i){if(-1!==this.currentSegmentIndex&&t.segments){var s=this.currentSegmentIndex>=this.segmentIndex?0:0!==this.currentSegmentIndex?this.currentSegmentIndex:-1,r=this.currentSegmentIndex>=this.segmentIndex?this.currentSegmentIndex:this.segmentIndex;if(-1!==s)for(var a=s;a<r;a++)e-=t.segments[a+1].left-(t.segments[a].left+t.segments[a].width)}return t.segments&&t.segments.length>0&&(i=this.splitTasksDuration(t.segments)*this.parent.perDayWidth),{progressWidth:e,totalTaskWidth:i}},e.prototype.performProgressResize=function(t,e){var i=this.taskBarEditRecord.ganttProperties,s=0,r=i.progressWidth;this.mouseDownX>this.mouseMoveX?this.mouseMoveX>i.left&&this.mouseMoveX<i.left+i.width&&i.left>0?(s=this.mouseMoveX-i.left,this.parent.setRecordValue("progressWidth",s,i,!0)):this.mouseMoveX>=i.left+i.width?this.parent.setRecordValue("progressWidth",i.width,i,!0):this.parent.setRecordValue("progressWidth",0,i,!0):this.mouseMoveX>i.left&&this.mouseMoveX<i.left+i.width?(s=this.mouseMoveX-i.left,this.parent.setRecordValue("progressWidth",s,i,!0)):this.mouseMoveX<=i.left?this.parent.setRecordValue("progressWidth",0,i,!0):this.parent.setRecordValue("progressWidth",i.width,i,!0);var a=i.progressWidth>i.width?i.width:i.progressWidth;a=i.progressWidth<0?0:i.progressWidth,-1===e&&e?this.parent.setRecordValue("progressWidth",r,i,!0):this.parent.setRecordValue("progressWidth",a,i,!0),this.progressValue=a;var n=i.width-i.progressWidth;n<=4?this.progressBorderRadius=4-n:this.progressBorderRadius=0},e.prototype.enableLeftResizing=function(t){var e=this.taskBarEditRecord.ganttProperties,i=0;this.taskBarEditElement.classList.contains("e-segmented-taskbar")&&e.segments.length>1?this.enableSplitTaskLeftResize(e):(this.mouseDownX>this.mouseMoveX?this.mouseMoveX<e.left+e.width?(i=this.mouseDownX-this.mouseMoveX,e.left>0&&(this.parent.setRecordValue("left",this.previousItem.left-i,e,!0),this.parent.setRecordValue("width",this.previousItem.width+i,e,!0))):this.mouseMoveX>e.left+e.width&&(i=this.mouseDownX-this.mouseMoveX,this.parent.setRecordValue("left",this.previousItem.left-i,e,!0),this.parent.setRecordValue("width",3,e,!0)):this.mouseMoveX<e.left+e.width?(i=this.mouseMoveX-this.mouseDownX,e.left<e.left+e.width&&this.previousItem.left+i<=this.previousItem.left+this.previousItem.width&&(this.parent.setRecordValue("left",this.previousItem.left+i,e,!0),this.parent.setRecordValue("width",this.previousItem.width-i,e,!0))):(i=this.mouseMoveX-this.mouseDownX,this.parent.setRecordValue("left",this.previousItem.left+i,e,!0),this.parent.setRecordValue("width",3,e,!0)),e.segments&&1===e.segments.length&&(e.segments[0].width=e.width),this.updateEditPosition(t,e),this.parent.setRecordValue("left",this.previousItem.left+this.previousItem.width-e.width,e,!0))},e.prototype.enableSplitTaskLeftResize=function(t){var e=this.taskBarEditRecord.ganttProperties.segments.map(function(t){return h({},t)}),i=e[this.segmentIndex],s=0;if(this.mouseDownX>this.mouseMoveX){if(this.mouseMoveX<t.left+i.width+i.left){if(s=(0,r.le)(this.previousMouseMove)?this.mouseDownX-this.mouseMoveX:this.previousMouseMove-this.mouseMoveX,this.previousMouseMove=this.mouseMoveX,i.left>0){if(i.left=i.left-s,i.width=i.width+s,0!==this.segmentIndex){var a=e[this.segmentIndex-1];if(t.left+i.left<t.left+a.left+a.width){var n=t.left+a.left+a.width-(t.left+i.left);i.width-=n,i.left=i.left+n}}}else if(i.left<=0&&0===this.segmentIndex){this.parent.setRecordValue("left",t.left-s,t,!0),this.parent.setRecordValue("width",t.width+s,t,!0),i.width=i.width+s;for(var o=1;o<t.segments.length;o++){var d=e[o];d.left=d.left+s}}}else this.mouseMoveX>t.left+i.width+i.left&&(s=(0,r.le)(this.previousMouseMove)?this.mouseDownX-this.mouseMoveX:this.previousMouseMove-this.mouseMoveX,this.previousMouseMove=this.mouseMoveX,i.left=i.left-s,i.width=this.parent.perDayWidth)}else if(this.mouseMoveX<t.left+i.width+i.left-this.parent.perDayWidth){if(s=(0,r.le)(this.previousMouseMove)?this.mouseMoveX-this.mouseDownX:this.mouseMoveX-this.previousMouseMove,this.previousMouseMove=this.mouseMoveX,0===this.segmentIndex&&i.left<=0){this.parent.setRecordValue("left",t.left+s,t,!0),this.parent.setRecordValue("width",t.width-s,t,!0),i.width=i.width-s;for(var o=1;o<t.segments.length;o++){var l=e[o];l.left=l.left-s}}else i.left<i.left+i.width&&i.left+s<=i.left+i.width&&(i.left=i.left+s,i.width=i.width-s)}else if(this.mouseMoveX<t.left+i.left+i.width&&i.width>this.parent.perDayWidth){s=(0,r.le)(this.previousMouseMove)?this.mouseMoveX-this.mouseDownX:this.mouseMoveX-this.previousMouseMove,this.previousMouseMove=this.mouseMoveX;var p=i.width-s<this.parent.perDayWidth?this.parent.perDayWidth>i.width?this.parent.perDayWidth-i.width:i.width-this.parent.perDayWidth:0;if(s-=p,0===this.segmentIndex){this.parent.setRecordValue("width",t.width-s,t,!0),this.parent.setRecordValue("left",t.left+s,t,!0),i.width=i.width-s;for(var o=1;o<t.segments.length;o++){var c=e[o];c.left=c.left-s}}else i.left=i.left+s,i.width=i.width-s}this.parent.setRecordValue("segments",e,t,!0),this.parent.dataOperation.updateMappingData(this.taskBarEditRecord,"segments")},e.prototype.updateEditPosition=function(t,e){this.updateIsMilestone(e),this.parent.setRecordValue("progressWidth",this.parent.dataOperation.getProgressWidth(e.width,e.progress),e,!0)},e.prototype.updateIsMilestone=function(t){t.width<=3?(this.parent.setRecordValue("width",3,t,!0),this.parent.setRecordValue("isMilestone",!0,t,!0),(0,r.le)(this.taskBarEditRecord[this.parent.taskFields.milestone])||this.parent.setRecordValue(this.parent.taskFields.milestone,!0,this.taskBarEditRecord,!0)):(this.parent.setRecordValue("width",t.width,t,!0),this.parent.setRecordValue("isMilestone",!1,t,!0),(0,r.le)(this.taskBarEditRecord[this.parent.taskFields.milestone])||this.parent.setRecordValue(this.parent.taskFields.milestone,!1,this.taskBarEditRecord,!0))},e.prototype.enableRightResizing=function(t){var e=this.taskBarEditRecord.ganttProperties,i=0;if(this.taskBarEditElement.classList.contains("e-segmented-taskbar")&&e.segments.length>1){var s=this.taskBarEditRecord.ganttProperties.segments.map(function(t){return h({},t)}),a=s[this.segmentIndex];if(this.mouseDownX>this.mouseMoveX){if(this.mouseMoveX>e.left+a.left&&this.mouseDownX-this.mouseMoveX>3)i=(0,r.le)(this.previousMouseMove)?this.mouseDownX-this.mouseMoveX:this.previousMouseMove-this.mouseMoveX,this.previousMouseMove=this.mouseMoveX,a.width=a.width-i;else if(this.mouseMoveX<e.left+a.left){var n=this.parent.timelineModule.isSingleTier&&("Hour"===this.parent.timelineModule.customTimelineSettings.bottomTier.unit||"Hour"===this.parent.timelineModule.customTimelineSettings.topTier.unit||"Minutes"===this.parent.timelineModule.customTimelineSettings.bottomTier.unit||"Minutes"===this.parent.timelineModule.customTimelineSettings.topTier.unit)||"Hour"===this.parent.timelineModule.customTimelineSettings.bottomTier.unit||"Minutes"===this.parent.timelineModule.customTimelineSettings.bottomTier.unit?this.parent.timelineModule.customTimelineSettings.timelineUnitSize:this.parent.perDayWidth;a.width=n}}else this.mouseMoveX>a.left&&(i=(0,r.le)(this.previousMouseMove)?this.mouseMoveX-this.mouseDownX:this.mouseMoveX-this.previousMouseMove,this.previousMouseMove=this.mouseMoveX,a.width=a.width+i);var o=void 0,d=this.segmentIndex!==s.length-1?s[this.segmentIndex+1]:null;(0,r.le)(d)||(this.taskBarEditElement.classList.contains("e-segment-last")||(o=a.left+a.width>d.left?d.left-a.left:a.width),a.width=o),this.segmentIndex===e.segments.length-1&&0===this.segmentIndex&&this.parent.setRecordValue("width",a.width,e,!0),this.parent.setRecordValue("segments",s,e,!0),this.parent.dataOperation.updateMappingData(this.taskBarEditRecord,"segments")}else this.mouseDownX>this.mouseMoveX?this.mouseMoveX>e.left&&this.mouseDownX-this.mouseMoveX>3?(i=this.mouseDownX-this.mouseMoveX,this.parent.setRecordValue("width",this.previousItem.width-i,e,!0)):this.mouseMoveX<e.left&&this.parent.setRecordValue("width",3,e,!0):this.mouseMoveX>e.left&&(i=this.mouseMoveX-this.mouseDownX,this.parent.setRecordValue("width",this.previousItem.width+i,e,!0)),e.segments&&1===e.segments.length&&(e.segments[0].width=e.width),this.updateEditPosition(t,e)},e.prototype.updateEditedItem=function(){var t,e,i,s,a=this.taskBarEditRecord.ganttProperties;switch(this.taskBarEditAction){case"ProgressResizing":var n=a.progressWidth,o=a.width,d=this.validateProgressWidth(a,n,o);this.parent.setRecordValue("progress",this.getProgressPercent(d.totalTaskWidth,d.progressWidth),a,!0);break;case"LeftResizing":-1===this.segmentIndex?(t=this.getRoundOffStartLeft(a,this.roundOffDuration),e=this.getDateByLeft(t),(0,r.le)(a.endDate)&&(i=this.parent.dateValidationModule.getValidEndDate(a),this.parent.setRecordValue("endDate",i,a,!0)),s=this.parent.dateValidationModule.checkStartDate(e,a,null),this.parent.setRecordValue("startDate",new Date(s.getTime()),a,!0),0===this.parent.dateValidationModule.compareDates(a.startDate,a.endDate)&&(0,r.le)(a.isMilestone)&&!1===a.isMilestone&&0===a.duration&&this.parent.setRecordValue("duration",1,a,!0),a.isMilestone&&this.parent.setRecordValue("endDate",new Date(s.getTime()),a,!0),this.parent.dateValidationModule.calculateDuration(this.taskBarEditRecord),this.parent.editModule.updateResourceRelatedFields(this.taskBarEditRecord,"duration")):this.updateSplitLeftResize(a);break;case"RightResizing":case"ParentResizing":if(-1===this.segmentIndex){t=this.getRoundOffEndLeft(a,this.roundOffDuration);var l=this.getDateByLeft(t);(0,r.le)(a.startDate)&&(s=this.parent.dateValidationModule.getValidStartDate(a),this.parent.setRecordValue("startDate",s,a,!0));var h=(0,r.le)(a.startDate)?s:a.startDate;i=a.isMilestone?h:this.parent.dateValidationModule.checkEndDate(l,this.taskBarEditRecord.ganttProperties),this.parent.setRecordValue("endDate",new Date(i.getTime()),a,!0),this.parent.dateValidationModule.calculateDuration(this.taskBarEditRecord),this.parent.editModule.updateResourceRelatedFields(this.taskBarEditRecord,"duration")}else this.updateSplitRightResizing(a);break;case"ParentDrag":case"ChildDrag":case"MilestoneDrag":case"ManualParentDrag":-1===this.segmentIndex||0===this.segmentIndex||-1!==this.segmentIndex&&this.parent.allowTaskbarDragAndDrop?this.updateChildDrag(a):this.setSplitTaskDrag(a)}(0,r.le)(this.taskBarEditRecord.ganttProperties.segments)||this.parent.chartRowsModule.updateSegment(this.taskBarEditRecord.ganttProperties.segments,this.taskBarEditRecord.ganttProperties.taskId)},e.prototype.updateChildDrag=function(t){var e,i=this.getRoundOffStartLeft(t,this.roundOffDuration),s=this.getDateByLeft(i,t.isMilestone,t);0===this.segmentIndex?(this.parent.setRecordValue("startDate",this.parent.dateValidationModule.checkStartDate(s,t,null),t,!0),t.segments[0].startDate=s,t.segments[0].endDate=this.parent.dataOperation.getEndDate(t.segments[0].startDate,t.segments[0].duration,t.durationUnit,t,!1),this.parent.setRecordValue("segments",t.segments,t,!0),this.parent.dataOperation.updateMappingData(this.taskBarEditRecord,"segments"),this.parent.chartRowsModule.incrementSegments(t.segments,0,this.taskBarEditRecord),this.parent.setRecordValue("endDate",t.segments[t.segments.length-1].endDate,t,!0),this.parent.setRecordValue("taskData."+this.parent.taskFields.segments,t.segments,this.taskBarEditRecord,!0)):!(0,r.le)(t.endDate)&&(0,r.le)(t.startDate)?(e=this.parent.dateValidationModule.checkStartDate(s,t,null),e=this.parent.dateValidationModule.checkEndDate(e,this.taskBarEditRecord.ganttProperties),this.parent.setRecordValue("endDate",e,t,!0)):(this.parent.setRecordValue("startDate",this.parent.dateValidationModule.checkStartDate(s,t,null),t,!0),(0,r.le)(t.duration)||this.parent.dateValidationModule.calculateEndDate(this.taskBarEditRecord))},e.prototype.updateSplitLeftResize=function(t){var e=t.segments[this.segmentIndex],i=0===this.segmentIndex?this.getRoundOffStartLeft(t,this.roundOffDuration):this.getRoundOffStartLeft(e,this.roundOffDuration),s=this.getDateByLeft(i),a=this.parent.dataOperation.checkStartDate(s,t,!1),n=this.parent.dataOperation.getDuration(a,e.endDate,t.durationUnit,t.isAutoSchedule,t.isMilestone);if(e.startDate=new Date(a.getTime()),e.duration=n,this.parent.setRecordValue("duration",this.sumOfDuration(t.segments),t,!0),0===this.segmentIndex&&this.parent.setRecordValue("startDate",e.startDate,t,!0),this.parent.editModule.updateResourceRelatedFields(this.taskBarEditRecord,"duration"),!(0,r.le)(t.segments[this.segmentIndex-1])){var o=this.parent.dataOperation.getDuration(t.segments[this.segmentIndex-1].endDate,t.segments[this.segmentIndex].startDate,t.durationUnit,t.isAutoSchedule,t.isMilestone);e.offsetDuration=o}this.parent.setRecordValue("segments",t.segments,t,!0),this.parent.dataOperation.updateMappingData(this.taskBarEditRecord,"segments")},e.prototype.updateSplitRightResizing=function(t){var e=t.segments[this.segmentIndex],i=this.getRoundOffEndLeft(t,this.roundOffDuration),s=this.getDateByLeft(i),a=this.parent.dataOperation.checkEndDate(s,t,!1),n=this.parent.dataOperation.getDuration(e.startDate,a,t.durationUnit,t.isAutoSchedule,t.isMilestone);if(e.endDate=new Date(a.getTime()),e.duration=n,!(0,r.le)(t.segments[this.segmentIndex+1])){var o=t.segments[this.segmentIndex+1],d=this.parent.dataOperation.getDuration(t.segments[this.segmentIndex].endDate,o.startDate,t.durationUnit,t.isAutoSchedule,t.isMilestone);e.offsetDuration=d}this.parent.setRecordValue("segments",t.segments,t,!0),this.parent.dataOperation.updateMappingData(this.taskBarEditRecord,"segments"),this.parent.setRecordValue("duration",this.sumOfDuration(t.segments),t,!0),this.parent.setRecordValue("endDate",t.segments[t.segments.length-1].endDate,t,!0),this.parent.editModule.updateResourceRelatedFields(this.taskBarEditRecord,"duration")},e.prototype.sumOfDuration=function(t){for(var e=0,i=0;i<t.length;i++)e+=t[i].duration;return e},e.prototype.setSplitTaskDrag=function(t){var e=t.segments[this.segmentIndex],i=this.getRoundOffStartLeft(e,this.roundOffDuration),s=this.getDateByLeft(i);s=this.parent.dateValidationModule.checkStartDate(s,t,null),e.startDate=s;var a=this.parent.dataOperation.getEndDate(e.startDate,e.duration,t.durationUnit,t,!1);if(t.segments[this.segmentIndex+1]&&a.getTime()>t.segments[this.segmentIndex+1].startDate.getTime()?e.endDate=t.segments[this.segmentIndex+1].startDate:e.endDate=a,e.duration=this.parent.dataOperation.getDuration(e.startDate,e.endD
1ate,t.durationUnit,t.isAutoSchedule,t.isMilestone),this.parent.setRecordValue("duration",this.sumOfDuration(t.segments),t,!0),this.parent.setRecordValue("endDate",t.segments[t.segments.length-1].endDate,t,!0),(0,r.le)(this.parent.taskFields.endDate)||this.parent.dataOperation.updateMappingData(this.taskBarEditRecord,"endDate"),!(0,r.le)(t.segments[this.segmentIndex-1])){var n=this.parent.dataOperation.getDuration(t.segments[this.segmentIndex-1].endDate,t.segments[this.segmentIndex].startDate,t.durationUnit,t.isAutoSchedule,t.isMilestone);1!==e.startDate.getDay()||0!==n||this.parent.includeWeekend||(n=1),e.offsetDuration=n}if(!(0,r.le)(t.segments[this.segmentIndex+1])){var o=t.segments[this.segmentIndex+1],n=this.parent.dataOperation.getDuration(t.segments[this.segmentIndex].endDate,o.startDate,t.durationUnit,t.isAutoSchedule,t.isMilestone);1!==o.startDate.getDay()||0!==n||this.parent.includeWeekend||(n=1),o.offsetDuration=n}this.parent.setRecordValue("segments",t.segments,t,!0),this.parent.dataOperation.updateMappingData(this.taskBarEditRecord,"segments")},e.prototype.getRoundOffEndLeft=function(t,e){var i="None"!==this.parent.timelineModule.bottomTier?this.parent.timelineModule.bottomTier:this.parent.timelineModule.topTier,s=t.width+t.left;if(-1!==this.segmentIndex&&t.segments.length>1){var r=t.segments[this.segmentIndex];s=s-t.width+r.width+r.left}var a=1/(this.parent.timelineModule.getIncrement(this.getDateByLeft(s),1,"Day")/864e5),n=this.parent.perDayWidth-this.parent.perDayWidth/a,o=n/this.parent.perDayWidth;
1if(void 0===e&&(e=!1),e){if(e){if("Hour"===i){var d=this.parent.perDayWidth/24;a=1/(this.parent.timelineModule.getIncrement(this.getDateByLeft(s),1,"Hour")/36e5),0!=(n=this.parent.perDayWidth/24-this.parent.perDayWidth/24/a)&&(s=s-n+d)}else if("Minutes"===i){var l=this.parent.perDayWidth/1440;a=1/(this.parent.timelineModule.getIncrement(this.getDateByLeft(s),1,"Minutes")/6e4),0!=(n=this.parent.perDayWidth/1440-this.parent.perDayWidth/1440/a)&&(s=s-n+l)}else 0!==n&&(s=s-n+this.parent.perDayWidth)}}else"Hour"!==i&&"Minutes"!==i&&(o>.5?s=s-n+this.parent.perDayWidth:o<.5&&(s=s-n+this.parent.perDayWidth/2));return s},e.prototype.getRoundOffStartLeft=function(t,e){var i=((0,r.le)(t),t.left);-1!==this.segmentIndex&&(0,r.le)(t.segments)&&(i=t.left+this.taskBarEditRecord.ganttProperties.left);var s="None"!==this.parent.timelineModule.bottomTier?this.parent.timelineModule.bottomTier:this.parent.timelineModule.topTier,a=1/(this.parent.timelineModule.getIncrement(this.getDateByLeft(i,(0,r.le)(t)?t.isMilestone:null,t),1,"Day")/864e5),n=this.parent.perDayWidth-this.parent.perDayWidth/a,o=n/this.parent.perDayWidth;return void 0===e&&(e=!1),e?e&&("Hour"===s?(a=1/(this.parent.timelineModule.getIncrement(this.getDateByLeft(i),1,"Hour")/36e5),i-=n=this.parent.perDayWidth/24-this.parent.perDayWidth/24/a):"Minutes"===s?(a=1/(this.parent.timelineModule.getIncrement(this.getDateByLeft(i),1,"Minutes")/6e4),i-=n=this.parent.perDayWidth/1440-this.parent.perDayWidth/1440/a):i-=n):"Hour"!==s&&"Minutes"!==s&&(o<=.5?i-=n:o>.5&&(i=i-n+this.parent.perDayWidth/2)),i},e.prototype.getDateByLeft=function(t,e,i){var s=new Date(this.parent.timelineModule.timelineStartDate.toString()),a=864e5/this.parent.perDayWidth;
1if(s.setTime(s.getTime()+t*a),e&&!(0,r.le)(i.predecessorsName)&&""!==i.predecessorsName){var n=this.parent.getCurrentDayEndTime(i.isAutoSchedule?i.autoEndDate:i.endDate);this.parent.dateValidationModule.setTime(n,s),s=this.parent.dateValidationModule.checkStartDate(s,i,!0)}var o="None"!==this.parent.timelineModule.bottomTier?this.parent.timelineModule.topTier:this.parent.timelineModule.bottomTier;return"Hour"!==o&&"Minutes"!==o&&this.parent.isInDst(new Date(this.parent.timelineModule.timelineStartDate.toString()))&&!this.parent.isInDst(s)&&s.setTime(s.getTime()+36e5),s},e.prototype.setItemPosition=function(){if(!(0,r.le)(this.editElement)){var t,e=this.editElement.parentElement;this.parent.allowTaskbarDragAndDrop&&"ChildDrag"===this.taskBarEditAction?e.style.position=null:this.parent.enableTimelineVirtualization&&this.parent.timelineModule.wholeTimelineWidth>3*this.parent.element.offsetWidth?e.style.setProperty("position","relative"):e.style.setProperty("position","absolute")}var i=this.taskBarEditRecord.ganttProperties,s=this.parent.enableRtl?"right":"left",n=(0,r.le)(i.segments)?null:i.segments[this.segmentIndex],d="MilestoneDrag"===this.taskBarEditAction||i.isMilestone?this.parent.chartRowsModule.milestoneHeight:i.width,l=this.parent.isAdaptive?d-2:d-10;(0,r.le)(n)||(l=this.parent.isAdaptive?n.width-2:n.width-10),this.taskBarEditElement.style.setProperty("opacity",".75"),t=this.parent.allowTaskbarDragAndDrop&&!i.isAutoSchedule&&this.taskBarEditRecord.hasChildRecords?this.taskBarEditElement:this.taskBarEditElement.classList.contains(o.Mo)?this.taskBarEditElement:("ChildDrag"===this.taskBarEditAction||"LeftResizing"===this.taskBarEditAction)&&0===this.segmentIndex?this.taskBarEditElement.parentElement:(0,r.oq)(this.taskBarEditElement,"tr."+o.Lr).querySelector("."+o.Mo);var h=!!(this.taskBarEditElement.classList.contains("e-segmented-taskbar")||this.taskBarEditElement.querySelector(".e-segmented-taskbar")),p=this.taskBarEditElement.querySelector("."+o.xM),c=this.taskBarEditElement.querySelector("."+o.tM),u=h?(0,a.Cf)(this.taskBarEditElement,o.Mo).querySelector("."+o.go):this.taskBarEditElement.querySelector("."+o.go),g=this.taskBarEditElement.querySelector("."+o.PW),m=this.taskBarEditElement.querySelector("."+o.Kb),f=this.taskBarEditElement.querySelector("."+o.Kn),E=this.taskBarEditElement.querySelector("."+o.rb),k=t.querySelector("."+o.rb),v=this.taskBarEditElement,D=this.taskBarEditElement.querySelector("."+o.jh);this.taskBarEditElement.querySelector("."+o.JG),this.taskBarEditElement.querySelector("."+o.Lk);var R=this.parent.ganttChartModule.chartBodyContainer.querySelector(".e-taskbar-resize-div");if(this.parent.allowTaskbarDragAndDrop&&!this.updatePosition&&(this.leftValue=this.leftValue+30,this.updatePosition=!0),"ConnectorPointRightDrag"!==this.taskBarEditAction&&"ConnectorPointLeftDrag"!==this.taskBarEditAction){if("ParentResizing"!==this.taskBarEditAction&&"ManualParentDrag"!==this.taskBarEditAction){if(h&&!(0,r.le)(i.segments)&&("RightResizing"===this.taskBarEditAction||0!==this.segmentIndex)&&(!(0,r.le)(R)&&(!this.parent.allowTaskbarDragAndDrop||this.parent.allowTaskbarDragAndDrop&&this.parent.rowDragAndDropModule&&"ChildDrag"!==this.taskBarEditAction&&"ParentDrag"!==this.taskBarEditAction)&&(R.style.width=n.width+"px"),this.taskBarEditElement.style.width=n.width+"px",this.parent.enableRtl?this.taskBarEditElement.style.right=n.left+"px":(this.taskBarEditElement.style.left=n.left+"px",!(0,r.le)(R)&&(!this.parent.allowTaskbarDragAndDrop||this.parent.allowTaskbarDragAndDrop&&this.parent.rowDragAndDropModule&&"ChildDrag"!==this.taskBarEditAction&&"ParentDrag"!==this.taskBarEditAction)&&(R.style.left=n.left+this.editElement.parentElement.offsetLeft+"px"))),t.style.setProperty(s,(this.parent.allowTaskbarDragAndDrop?this.leftValue:i.left)+"px"),t.style.width=d+"px",h&&k&&(k.style.left=(this.parent.isAdaptive?d+10:d+2)+"px"),this.parent.allowTaskbarDragAndDrop&&this.parent.rowDragAndDropModule&&"LeftResizing"!==this.taskBarEditAction&&"RightResizing"!==this.taskBarEditAction&&"ProgressResizing"!==this.taskBarEditAction){var M=this.parent.taskbarHeight/2;t.style.setProperty("top",this.topValue+M+"px"),t.style.zIndex="4"}if("LeftResizing"===this.taskBarEditAction&&0===this.segmentIndex){this.taskBarEditElement.style.setProperty("opacity",".7
15");for(var y=this.taskBarEditElement.parentElement.getElementsByClassName("e-segmented-taskbar"),B=0;B<i.segments.length;B++){var w=i.segments[B],P=y[B];P.style.width=w.width+"px",1===i.segments.length?(R.style.width=w.width+"px",R.style.setProperty(s,i.left+"px")):(0===B&&(R.style.width=w.width+"px",R.style.setProperty(s,w.left+i.left+"px")),this.parent.enableRtl?P.style.right=w.left+"px":P.style.left=w.left+"px")}}"ChildDrag"===this.taskBarEditAction&&(0===this.segmentIndex||-1!==this.segmentIndex&&this.parent.allowTaskbarDragAndDrop)&&(R.style.width=d+"px",R.style.setProperty(s,i.left+"px"),t.style.setProperty("opacity",".75"))}if(E&&(this.parent.enableRtl?E.style.left=(this.parent.isAdaptive?d+10:d-2)+"px":E.style.left=(this.parent.isAdaptive?d+10:d+2)+"px"),E&&"LeftResizing"===this.taskBarEditAction&&(E.style.left=d-2+"px"),u&&p&&("LeftResizing"===this.taskBarEditAction||"RightResizing"===this.taskBarEditAction||"ChildDrag"===this.taskBarEditAction||"ParentDrag"===this.taskBarEditAction)&&(u.style.display="none",p.style.display="none"),E&&"ProgressResizing"===this.taskBarEditAction&&(E.style.display="none"),"MilestoneDrag"===this.taskBarEditAction||i.isMilestone)t.style.setProperty(s,(this.parent.allowTaskbarDragAndDrop?this.leftValue:i.left-d/2)+"px"),R.style.setProperty(s,i.left-d/2+"px"),R.style.width=d+"px";else if("ProgressResizing"===this.taskBarEditAction){if(-1===this.segmentIndex){if(c.style.setProperty(s,i.left+i.progressWidth-10+"px"),!(0,r.le)(p)){p.style.width=i.progressWidth+"px",p.style.borderBottomRightRadius=this.progressBorderRadius+"px",p.style.borderTopRightRadius=this.progressBorderRadius+"px";var b=this.parent.enableRtl?i.progressWidth+8:i.progressWidth-8;u.style.setProperty(s,b+"px")}}else{this.updateSegmentProgress(this.taskBarEditRecord.ganttProperties);for(var T=t.querySelectorAll(".e-gantt-child-progressbar"),C=0;C<T.length;C++)i.segments[C]&&i.segments[C].progressWidth&&this.segmentIndex!==C&&(T[C].style.display="block",T[C].style.width=i.segments[C].progressWidth+"px");p.style.width=i.segments[this.segmentIndex].progressWidth+"px",p.style.borderBottomRightRadius=this.progressBorderRadius+"px",p.style.borderTopRightRadius=this.progressBorderRadius+"px";var A=this.parent.enableRtl?this.progressValue+8:this.progressValue-8;u.style.setProperty(s,A+"px")}}else"RightResizing"!==this.taskBarEditAction||(0,r.le)(c)?"ParentDrag"===this.taskBarEditAction?(R.style.setProperty(s,i.left+"px"),R.style.width=d+"px",R.style.width=i.width+"px",(0,r.le)(m)||(m.style.width=d+"px",R.style.width=i.width+"px"),(0,r.le)(p
vendor: 4,500 bytes, line 1
1)||(f.style.width=i.progressWidth+"px")):"ParentResizing"===this.taskBarEditAction?(R.style.width=i.width+"px",R.style.setProperty(s,i.left+"px"),v.style.setProperty("width",i.width+"px"),D.style.setProperty("width",i.width+"px"),this.editElement.parentElement.style.setProperty("width",i.width+"px")):"ManualParentDrag"===this.taskBarEditAction?(R.style.width=i.width+"px",R.style.setProperty(s,i.left+"px"),v.style.setProperty(s,i.left-i.autoLeft+"px"),this.parent.allowTaskbarDragAndDrop&&(v.style.setProperty(s,this.leftValue+"px"),v.style.setProperty("top",this.topValue+"px"),v.style.zIndex="4")):((0,r.le)(c)||h||(c.style.width=i.width+"px",c.style.left=i.left+"px",this.taskBarEditElement.style.width=i.width+"px",this.taskBarEditElement.style.left=(this.parent.allowTaskbarDragAndDrop?this.leftValue:i.left)+"px",R.style.setProperty(s,i.left+"px"),R.style.width=i.width+"px"),(0,r.le)(p)||(g.style.setProperty(s,l+"px"),p.style.width=i.progressWidth+"px",(0,r.le)(u)||u.style.setProperty(s,i.progressWidth-10+"px")),h&&(g.style.setProperty(s,l+"px"),p.style.width=n.width+"px",(0,r.le)(u)||u.style.setProperty(s,n.width-10+"px"))):(R.style.width=d+"px",c.style.width=d+"px",(0,r.le)(p)||(p.style.width=i.progressWidth+"px",g.style.setProperty(s,l+"px"),(0,r.le)(u)||u.style.setProperty(s,i.progressWidth-10+"px")))}if(this.parent.allowTaskbarDragAndDrop&&("ChildDrag"===this.taskBarEditAction||"ParentDrag"===this.taskBarEditAction||"ManualParentDrag"===this.taskBarEditAction||"MilestoneDrag"===this.taskBarEditAction)){var I=this.parent.enableRtl?parseInt(R.style.right,10):parseInt(R.style.left,10);this.parent.enableRtl?R.style.right=I-30+"px":R.style.left=I+30+"px"}},e.prototype.mouseUpHandler=function(t){var e=this.isMouseDragged;if(this.previousMouseMove=null,this.editTooltip.showHideTaskbarEditTooltip(!1,this.segmentIndex),this.taskBarEditAction&&this.isMouseDragged){if(!this.dragMouseLeave&&this.taskBarEditedAction||this.parent.allowTaskbarDragAndDrop){if("touchmove"===t.type||"touchstart"===t.type||"touchend"===t.type){var i=this.getCoordinate(t);this.droppedTarget=document.elementFromPoint(i.pageX,i.pageY)}else{if(this.taskBarEditRecord.hasChildRecords&&!this.taskBarEditRecord.ganttProperties.isAutoSchedule){var s=this.parent.getOffsetRect(this.taskBarEditElement),a=!(0,r.le)(document.body.className)&&document.body.className.includes("e-bigger")?12:0,n=3+this.parent.chartRowsModule.connectorPointWidth+a,o=void 0;o=this.parent.enableRtl?Math.abs(s.left+n+1):Math.abs(Math.abs(s.left-n-1)-this.parent.ganttChartModule.scrollElement.scrollLeft),this.droppedTarget=document.elementFromPoint(o,t.y)}else this.droppedTarget=document.elementFromPoint(t.x,t.y);this.droppedTarget&&this.droppedTarget.classList.contains("e-span-label")&&(this.droppedTarget=document.elementFromPoint(t.x+this.droppedTarget.offsetWidth,t.y))}this.previousIds=this.parent.ids.slice(),this.previousFlatData=this.parent.flatData.slice(),this.taskBarEditedAction(t),this.isMouseDragged=!1}else{this.parent.isOnEdit=!1,this.cancelTaskbarEditActionInMouseLeave();var d=this.parent.criticalPathModule;this.parent.enableCriticalPath&&d&&d.criticalPathCollection&&d.criticalConnectorLine(d.criticalPathCollection,d.detailPredecessorCollection,!0,d.predecessorCollectionTaskIds)}}this.parent.enableMultiTaskbar&&!(0,r.le)(this.taskBarEditElement)&&!(0,r.le)(this.taskBarEditElement.querySelector(".e-gantt-child-taskbar"))&&this.taskBarEditElement.querySelector(".e-gantt-child-taskbar").classList.contains("e-collapsed-taskbar-drag")&&((0,r.IV)([this.taskBarEditElement.querySelector(".e-gantt-child-taskbar")],"e-collapsed-taskbar-drag"),this.taskBarEditElement.style.zIndex=this.prevZIndex,this.prevZIndex=""),(!this.parent.isAdaptive||e)&&this.initPublicProp(),this.stopScrollTimer()},e.prototype.taskBarEditedAction=function(t){var e={},i=this.mouseDownX,s=this.mouseDownY,a=this.taskBarEditRecord,n=this.parent.ganttChartModule.getIndexByTaskBar(this.taskBarEditElement),o=this.mouseMoveX,d=this.getCoordinate(t).pageY-this.parent.ganttChartModule.chartBodyContainer.offsetTop;"ConnectorPointLeftDrag"!==this.taskBarEditAction&&"ConnectorPointRightDrag"!==this.taskBarEditAction||this.drawPredecessor||(this.dependencyCancel=!0);var l=[];("ConnectorPointLeftDrag"===this.taskBarEditAction||"ConnectorPointRightDrag"===this.taskBarEditAction)&&this.drawPredecessor&&(!this.connectorSecondRecord.hasChildRecords||this.connectorSecondRecord.hasChildRecords&&this.parent.allowParentDependency)?(l.pu
1sh((0,r.l7)([],[],[this.taskBarEditRecord],!0)[0]),this.parent.undoRedoModule&&(this.parent.undoRedoModule.getUndoCollection[this.parent.undoRedoModule.getUndoCollection.length-1].connectedRecords=l,this.parent.toolbarModule&&this.parent.toolbarModule.enableItems([this.parent.controlId+"_undo"],!0)),this.parent.connectorLineEditModule.updatePredecessor(this.connectorSecondRecord,this.finalPredecessor)):("ConnectorPointLeftDrag"===this.taskBarEditAction||"ConnectorPointRightDrag"===this.taskBarEditAction||this.oldData&&JSON.stringify(a.ganttProperties)===JSON.stringify(this.oldData.ganttProperties)?this.parent.undoRedoModule&&this.parent.undoRedoModule.getUndoCollection.length>0&&(this.parent.totalUndoAction--,this.parent.undoRedoModule.getUndoCollection.splice(this.parent.undoRedoModule.getUndoCollection.length-1,1),this.parent.toolbarModule&&this.parent.toolbarModule.enableItems([this.parent.controlId+"_undo"],!1)):this.parent.undoRedoModule&&this.parent.toolbarModule&&this.parent.undoRedoModule.getUndoCollection.length>0&&this.parent.toolbarModule.enableItems([this.parent.controlId+"_undo"],!0),(i!==o||Math.abs(s-d)>=(this.parent.rowHeight-this.parent.taskbarHeight)/2)&&null!==a&&(e.editingFields=a.ganttProperties,e.data=a,e.recordIndex=n,e.previousData=this.previousItem,e.taskBarEditAction=this.taskBarEditAction,e.action="TaskbarEditing",e.roundOffDuration=this.roundOffDuration,e.target=this.targetElement,this.taskbarEditedArgs=e,this.taskbarEdited(e))),this.parent.isProjectDateUpdated=!1},e.prototype.cancelTaskbarEditActionInMouseLeave=function(){this.parent.editModule.reUpdatePreviousRecords(!0)},e.prototype.updateSegmentProgress=function(t){for(var e=t.segments,i=!0,s=this.splitTasksDuration(e)*this.parent.perDayWidth,r=Math.ceil(t.progressWidth/s*100),a=s*r/100,n=a,o=0;o<e.length;o++){var d=e[o];0!==o&&(a=d.left<=n?n-d.left:0),delete d.progressWidth,a>0&&a>d.width?(a-=d.width,d.progressWidth=d.width,d.showProgress=!1):i&&(d.progressWidth=a,d.showProgress=!0,a-=d.width,i=!1)}},e.prototype.taskbarEdited=function(t){var e=(0,r.l7)({},t),i=e.data,s=i.ganttProperties,a=this.parent.flatData.indexOf(i);if(this.parent.allowTaskbarDragAndDrop&&this.dragMoveY>0&&("ResourceView"===this.parent.viewType&&!i.hasChildRecords||"ProjectView"===this.parent.viewType)){if(this.parent.rowDragAndDropModule){var n=this.parent.currentViewData;this.taskBarEditRecord.parentItem&&n[this.taskBarEditRecord.parentItem.index]&&-1===this.parent.editedRecords.indexOf(n[this.taskBarEditRecord.parentItem.index])&&this.parent.editedRecords.push(n[this.taskBarEditRecord.parentItem.index]),this.removeChildBorder(),this.removeErrorElem(),this.removetopOrBottomBorder();var d=void 0;this.updatePosition=!1,this.draggedRecordMarginTop=this.taskBarEditElement.style.marginTop;var l=void 0;if((0,r.le)(this.droppedTarget)||(l=(0,r.oq)(this.droppedTarget,"tr."+o.Lr)),l){var h=parseInt(l.getAttribute("data-rowindex"),10);d=this.parent.flatData[h];var p=this.parent.getRootParent(d,0).index,c=this.parent.getRootParent(this.taskBarEditRecord,0).index,u={cancel:!1,data:this.taskBarEditRecord,fromIndex:this.taskBarEditRecord.index,dropIndex:d.index,dropPosition:this.parent.rowDragAndDropModule.dropPosition,dropRecord:d};if(this.parent.trigger("rowDrop",u),!u.cancel&&d&&h!==a&&(p!==c||this.taskBarEditRecord.hasChildRecords&&d.hasChildRecords||!this.taskBarEditRecord.hasChildRecords)){var g=this.parent.flatData.indexOf(d),m=void 0;m=("ProjectView"!==this.parent.viewType||(0,r.le)(this.parent.rowDragAndDropModule.dropPosition))&&(d.hasChildRecords||!d.parentItem&&0===d.childRecords.length)?"child":this.parent.rowDragAndDropModule.dropPosition,this.parent.rowDragAndDropModule&&("ResourceView"!==this.parent.viewType||"child"!==m||d.hasChildRecords||(0,r.le)(d.parentItem)||(m="Invalid",this.parent.rowDragAndDropModule.dropPosition="Invalid"),m&&this.parent.rowDragAndDropModule.reorderRows([a],g,m)),this.dragMoveY=0}}this.isClonedElement=!1}this.parent.showOverAllocation&&this.parent.ganttChartModule.renderOverAllocationContainer()}if("ProgressResizing"===e.taskBarEditAction){if(e.previousData.progress!==s.progress){var f=e.data.ganttProperties.progressWidth,E=e.data.ganttProperties.width,k=this.validateProgressWidth(e.data.ganttProperties,f,E);this.parent.setRecordValue("progress",this.getProgressPercent(k.totalTaskWidth,k.progressWidth),s,!0),i.parentItem&&this.parent.editModule.updateParentProgress(i.parentItem),(0,r.le)(s.segments)||this.updateSegmentProgress(s)}}else{var v=e.data.ganttProperties.segments;if(!(0,r.le)(v)&&v.length>0&&("LeftResizing"===this.taskBarEditAction&&0!==this.segmentIndex||"ChildDrag"===this.taskBarEditAction&&0!==this.segmentIndex||"RightResizing"===this.taskBarEditAction)){var D=v[this.segmentIndex],R=this.taskBarEditRecord.ganttProperties,M=0===this.segmentIndex?null:v[this.segmentIndex-1],y=this.segmentIndex===v.length-1?null:v[this.segmentIndex+1],B=(0,r.le)(y)?this.parent.cloneProjectEndDate:new Date(y.startDate.getTime()),w=(0,r.le)(M)?this.parent.cloneProjectStartDate:new Date(M.endDate.getTime()),P=new Date(D.startDate.getTime()),b=new Date(D.endDate.getTime());if("Day"===this.parent.timelineModule.topTier&&"Hour"===this.parent.timelineModule.bottomTier?(P.setHours(P.getHours()-1),b.setHours(b.getHours()+1)):(P.setDate(P.getDate()),b.setDate(b.getDate())),this.parent.includeWeekend){if(B.setHours(0,0,0,0),w.setHours(0,0,0,0),P.setDate(P.getDate()-1),b.setDate(b.getDate()+1),P.setHours(0,0,0,0),b.setHours(0,0,0,0),!(P.getTime()<=w.getTime())||(0,r.le)(M)||(0,r.le)(D)){if(b.getTime()>=B.getTime()&&this.segmentIndex!==v.length-1){var T=[{firstSegmentIndex:D.segmentIndex,secondSegmentIndex:y.segmentIndex}];this.parent.chartRowsModule.mergeTask(R.taskId,T)}else if(b.getTime()>=B.getTime()){D.endDate.setDate(this.parent.cloneProjectEndDate.getDate()-1),D.startDate=this.parent.dataOperation.getStartDate(D.endDate,D.duration,R.durationUnit,R);for(var C=v.length-2;C>=0;C++){var A=v[C],I=A.endDate;I.setDate(I.getDate()-A.offsetDuration),A.endDate=I,A.startDate=this.parent.dataOperation.getStartDate(A.endDate,A.duration,R.durationUnit,R)}}}else{var T=[{firstSegmentIndex:M.segmentIndex,secondSegmentIndex:D.segmentIndex}];this.parent.chartRowsModule.mergeTask(R.taskId,T)}}else if(b.getTime()<=B.getTime()&&this.segmentIndex!==v.length-1&&!this.parent.includeWeekend&&0===this.parent.dataOperation.getDuration(this.parent.dataOperation.checkStartDate(b,s,!1),B,s.durationUnit,!1,!1)){var T=[{firstSegmentIndex:D.segmentIndex,secondSegmentIndex:y.segmentIndex}];this.parent.chartRowsModule.mergeTask(R.taskId,T)}else if(P.getTime()>=w.getTime()&&!(0,r.le)(M)&&!(0,r.le)(D)&&!this.parent.includeWeekend&&0===this.parent.dataOperation.getDuration(this.parent.dataOperation.checkEndDate(P,s,!1),w,s.durationUnit,!1,!1)){var T=[{firstSegmentIndex:M.segmentIndex,secondSegmentIndex:D.segmentIndex}];this.parent.chartRowsModule.mergeTask(R.taskId,T)}}this.parent.dataOperation.updateWidthLeft(e.data)}this.isDragged=!1,this.parent.dataOperation.updateTaskData(i),this.parent.editModule.initiateUpdateAction(e)},e.prototype.getProgressPercent=function(t,e){return Math.ceil(e/t*100)},e.prototype.drawFalseLine=function(){var t,e=this.mouseDownX,i=this.mouseDownY,s=this.mouseMoveX,a=this.mouseMoveY,n=180*Math.atan2(a-i,s-e)/Math.PI,d="rotate("+(this.parent.enableRtl?-n:n)+"deg)",l=0;(0,r.le)(document.querySelectorAll(".e-chart-row")[0])||(l=document.querySelectorAll(".e-chart-row")[0].offsetWidth),"ConnectorPointLeftDrag"===this.taskBarEditAction&&(t=this.parent.enableRtl?l-(this.elementOffsetLeft+this.parent.chartRowsModule.connectorPointWidth/2)-Math.abs(this.parent.ganttChartModule.scrollObject.previousScroll.left):this.elementOffsetLeft-this.parent.chartRowsModule.connectorPointWidth/2-this.parent.ganttChartModule.scrollObject.previousScroll.left),"ConnectorPointRightDrag"===this.taskBarEditAction&&(t=this.parent.enableRtl?l-(this.elementOffsetLeft+this.elementOffsetWidth+this.parent.chartRowsModule.connectorPointWidth/2)-Math.abs(this.parent.ganttChartModule.scrollObject.previousScroll.left):this.elementOffsetLeft+this.elementOffsetWidth+this.parent.chartRowsModule.connectorPointWidth/2-Math.abs(this.parent.ganttChartModule.scrollObject.previousScroll.left));var h=this.elementOffsetTop+this.elementOffsetHeight/2+this.parent.ganttChartModule.chartBodyContainer.offsetTop-this.parent.ganttChartModule.scrollObject.previousScroll.top;this.removeFalseLine(!1),this.falseLine=(0,r.az)("div",{className:o.dV,id:"ganttfalseline"+this.parent.element.i
1d,styles:"position: absolute;transform:"+d+";border-top-width: 1px;border-top-style: dashed;z-index: 5;width:"+(Math.sqrt((e-s)*(e-s)+(i-a)*(i-a))-3)+"px;top:"+h+"px;"}),this.parent.enableRtl?(this.falseLine.style.left="auto",this.falseLine.style.right=t+"px",this.falseLine.style.transformOrigin="100% 0%"):(this.falseLine.style.right="auto",this.falseLine.style.left=t+"px",this.falseLine.style.transformOrigin="0% 100%"),this.parent.ganttChartModule.chartBodyContainer.appendChild(this.falseLine)},e.prototype.removeFalseLine=function(t){this.falseLine&&((0,r.Od)(this.falseLine),this.falseLine=null,t&&(this.elementOffsetLeft=0,this.elementOffsetTop=0,this.elementOffsetWidth=0,this.elementOffsetHeight=0,(0,r.IV)(this.parent.ganttChartModule.scrollElement.querySelectorAll("."+o.l0),[o.a0])))},e.prototype.updateConnectorLineSecondProperties=function(t){var e=this.getElementByPosition(t),i=(0,a.Cf)(e,o.Mo),s=document.body.className.includes("e-bigger");this.connectorSecondAction=null;var n=0;(0,a.Cf)(e,o.Fh)?(this.connectorSecondAction="ConnectorPointLeftDrag",this.toPredecessorText="Start"):(0,a.Cf)(e,o.qG)?(this.connectorSecondAction="ConnectorPointRightDrag",this.toPredecessorText="Finish"):(this.connectorSecondAction=null,this.toPredecessorText=null),this.taskBarEditElement!==i&&this.taskBarEditElement!==this.highlightedSecondElement&&(this.parent.virtualScrollModule&&this.parent.enableVirtualization&&(n=this.parent.virtualScrollModule.getTopPosition()),(this.parent.virtualScrollModule&&this.parent.enableVirtualization&&!this.elementOffsetLeft||!this.parent.enableVirtualization)&&(this.parent.allowParentDependency&&this.taskBarEditElement.children[0].classList.contains("e-manualparent-main-container")?(this.elementOffsetLeft=this.realTaskbarElement.children[0].offsetLeft+this.realTaskbarElement.offsetLeft-(s?10:0),this.elementOffsetTop=this.realTaskbarElement.parentElement.offsetTop+this.realTaskbarElement.offsetHeight/3-5+this.taskBarEditElement.children[0].offsetTop+n):(this.elementOffsetLeft=this.realTaskbarElement.offsetLeft-(s?10:0),this.elementOffsetTop=this.realTaskbarElement.parentElement.offsetTop+this.realTaskbarElement.offsetHeight/3+n),this.elementOffsetWidth=this.realTaskbarElement.offsetWidth+(s?20:0),this.elementOffsetHeight=this.realTaskbarElement.offsetHeight),this.showHideTaskBarEditingElements(i,this.highlightedSecondElement,!0)),(0,r.le)(this.connectorSecondAction)&&!(0,r.le)(this.connectorSecondElement)&&(!this.connectorSecondRecord.hasChildRecords||this.connectorSecondRecord.hasChildRecords&&this.parent.allowParentDependency)&&(this.editTooltip.showHideTaskbarEditTooltip(!1,this.segmentIndex),(0,r.IV)([this.connectorSecondElement.querySelector("."+o.Fh)],[o.T8]),(0,r.IV)([this.connectorSecondElement.querySelector("."+o.qG)],[o.T8])),this.connectorSecondElement=this.connectorSecondAction?i:null,this.highlightedSecondElement=i,this.connectorSecondRecord=(0,r.le)(this.connectorSecondElement)?null:this.parent.ganttChartModule.getRecordByTaskBar(this.connectorSecondElement)},e.prototype.triggerDependencyEvent=function(t,e){var i,s,a,n=this.parent.element.closest('[style*="zoom"]');if(n){var d=parseFloat(getComputedStyle(n).zoom);i=t.pageY/d}var l=this.taskBarEditRecord.ganttProperties,h=this.connectorSecondRecord?this.connectorSecondRecord.ganttProperties:null,p=this.getElementByPosition(t),c="ResourceView"===this.parent.viewType?l.taskId:l.rowUniqueID;if("ConnectorPointLeftDrag"===this.taskBarEditAction?s=c+(this.parent.enableRtl?"F":"S"):"ConnectorPointRightDrag"===this.taskBarEditAction&&(s=c+(this.parent.enableRtl?"S":"F")),this.connectorSecondAction&&("ConnectorPointLeftDrag"===this.connectorSecondAction?(s+=this.parent.enableRtl?"F":"S",a=this.parent.enableRtl?"finish":"start"):"ConnectorPointRightDrag"===this.connectorSecondAction&&(s+=this.parent.enableRtl?"S":"F",a=this.parent.enableRtl?"start":"finish")),(0,r.le)(h)){this.drawPredecessor=!1;return}h.predecessorsName?this.finalPredecessor=h.predecessorsName+","+s:this.finalPredecessor=s;var u=this.parent.connectorLineEditModule.validatePredecessorRelation(this.connectorSecondRecord,this.finalPredecessor),g=this.parent.predecessorModule.calculatePredecessor(s,this.connectorSecondRecord),m={};if(m.fromItem=l,m.toItem=h,m.newPredecessorString=this.finalPredecessor,m.predecessor=g&&g[0],m.isValidLink=u,m.requestType="ValidateDependency",this.parent.trigger("actionBegin",m),(0,r.le)(this.parent.loadingIndicator)||"Shimmer"!==this.parent.loadingIndicator.indicatorType||"ValidateDependency"===m.requestType?"ValidateDependency"!==m.requestType&&this.parent.showSpinner():this.parent.showMaskRow(),m.isValidLink=(!!u||!m.isValidLink)&&m.isValidLink,m.
1isValidLink){if(this.editTooltip.toolTipObj||this.parent.isAdaptive||this.editTooltip.showHideTaskbarEditTooltip(!0,this.segmentIndex),!(0,r.le)(this.editTooltip.toolTipObj)){this.parent.connectorLineModule.tooltipTable.innerHTML=this.parent.connectorLineModule.getConnectorLineTooltipInnerTd(this.parent.editModule.taskbarEditModule.taskBarEditRecord.ganttProperties.taskName,this.parent.editModule.taskbarEditModule.fromPredecessorText,"","");var f=this.parent.connectorLineModule.tooltipTable.querySelector("#toPredecessor").querySelectorAll("td");if(f[1].innerText=h.taskName,f[2].innerText=this.parent.localeObj.getConstant(a),!(0,r.le)(this.parent.connectorLineModule.tooltipTable.parentElement)&&!(0,r.le)(this.parent.connectorLineModule.tooltipTable.parentElement.parentElement)){var E=this.parent.connectorLineModule.tooltipTable.parentElement.parentElement;E.offsetTop+E.offsetHeight>i&&(E.style.top=t.pageY-E.offsetHeight-20+"px")}}this.drawPredecessor=!0}else this.parent.isAdaptive?(p.classList.contains(o.Fh)||p.classList.contains(o.qG))&&this.showHideActivePredecessors(!0):(0,r.cn)([p],[o.T8]),this.drawPredecessor=!1},e.prototype.getCoordinate=function(t){var e={};return e.pageX=t.pageX,e.pageY=t.pageY,t&&"click"!==t.type&&("touchmove"===t.type||"touchstart"===t.type||"touchend"===t.type)&&(e.pageX=t.changedTouches[0].pageX,e.pageY=t.changedTouches[0].pageY),e},e.prototype.getElementByPosition=function(t){if(!this.parent.isAdaptive)return t.target;var e=this.getCoordinate(t);return document.elementFromPoint(e.pageX-window.pageXOffset,e.pageY-window.pageYOffset)},e.prototype.multipleSelectionEnabled=function(){this.parent.selectionModule&&"Cell"!==this.parent.selectionSettings.mode&&"Multiple"===this.parent.selectionSettings.type&&this.parent.selectionModule.hidePopUp()},e.prototype.unWireEvents=function(){this.parent.isDestroyed||(this.parent.off("chartMouseDown",this.mouseDownHandler),this.parent.off("chartMouseUp",this.mouseUpHandler),this.parent.off("chartMouseLeave",this.mouseLeaveHandler),this.parent.off("chartMouseMove",this.mouseMoveAction),this.parent.off("chartMouseClick",this.mouseClickHandler))},e.prototype.destroy=function(){this.unWireEvents(),this.stopScrollTimer(),this.parent.editModule.taskbarEditModule=void 0},e}(n.X)}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.